@redneckz/wildless-cms-uni-blocks 0.14.770 → 0.14.772
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/bundle.umd.js +19 -26
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Header/useChatBot.d.ts +1 -1
- package/bundle/utils/url.d.ts +2 -2
- package/dist/components/Header/useChatBot.d.ts +1 -1
- package/dist/components/Header/useChatBot.js +7 -3
- package/dist/components/Header/useChatBot.js.map +1 -1
- package/dist/utils/url.d.ts +2 -2
- package/dist/utils/url.js +10 -2
- package/dist/utils/url.js.map +1 -1
- package/lib/components/Header/useChatBot.d.ts +1 -1
- package/lib/components/Header/useChatBot.js +7 -3
- package/lib/components/Header/useChatBot.js.map +1 -1
- package/lib/utils/url.d.ts +2 -2
- package/lib/utils/url.js +9 -1
- package/lib/utils/url.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +12 -23
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Header/useChatBot.d.ts +1 -1
- package/mobile/bundle/utils/url.d.ts +2 -2
- package/mobile/dist/components/Header/useChatBot.d.ts +1 -1
- package/mobile/dist/components/Header/useChatBot.js +7 -3
- package/mobile/dist/components/Header/useChatBot.js.map +1 -1
- package/mobile/dist/utils/url.d.ts +2 -2
- package/mobile/dist/utils/url.js +10 -2
- package/mobile/dist/utils/url.js.map +1 -1
- package/mobile/lib/components/Header/useChatBot.d.ts +1 -1
- package/mobile/lib/components/Header/useChatBot.js +7 -3
- package/mobile/lib/components/Header/useChatBot.js.map +1 -1
- package/mobile/lib/utils/url.d.ts +2 -2
- package/mobile/lib/utils/url.js +9 -1
- package/mobile/lib/utils/url.js.map +1 -1
- package/mobile/src/components/Header/useChatBot.ts +17 -3
- package/mobile/src/utils/url.ts +11 -2
- package/package.json +1 -1
- package/src/components/Header/useChatBot.ts +17 -3
- package/src/utils/url.ts +11 -2
- package/bundle/utils/joinPath.d.ts +0 -2
- package/dist/utils/joinPath.d.ts +0 -2
- package/dist/utils/joinPath.js +0 -24
- package/dist/utils/joinPath.js.map +0 -1
- package/lib/utils/joinPath.d.ts +0 -2
- package/lib/utils/joinPath.js +0 -20
- package/lib/utils/joinPath.js.map +0 -1
- package/mobile/bundle/utils/joinPath.d.ts +0 -2
- package/mobile/dist/utils/joinPath.d.ts +0 -2
- package/mobile/dist/utils/joinPath.js +0 -24
- package/mobile/dist/utils/joinPath.js.map +0 -1
- package/mobile/lib/utils/joinPath.d.ts +0 -2
- package/mobile/lib/utils/joinPath.js +0 -20
- package/mobile/lib/utils/joinPath.js.map +0 -1
- package/mobile/src/utils/joinPath.ts +0 -24
- package/src/utils/joinPath.ts +0 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={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"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),I=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=I,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const M=[],P=(e,{key:t,ancestors:n=M,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||M,[r.parent,l]]:n},a)))};function V({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function R(){return R._impl()}R._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),R.setup=e=>{R._impl=e};const z=["CDN","BASE_PATH"],D=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return z.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),_="http://_",$=(...e)=>{const t=e.filter(Boolean).map((e=>new URL(e,_))),n=t.find((e=>e.origin!==_))?.origin,l=L(t.map((e=>e.pathname))),a=j(...t.map((e=>e.searchParams))).toString(),i=t.find((e=>e.hash))?.hash;return[n,l,a?`?${a}`:"",i].filter(Boolean).join("")},j=(...e)=>{const t=new URLSearchParams;for(const n of e)for(const[e,l]of n)t.set(e,l);return t},L=e=>e.join("/").replace(/\/+/g,"/"),A=e=>Boolean(e?.includes(":")),O=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),E=e=>Boolean(e?.startsWith("#")),F=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var U=Object.freeze({__proto__:null,isURL:A,isLocalURL:O,isHash:E,withoutQuery:e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),hasPrefix:F,joinPath:$});const W="/api/",H=`${W}v1/storage`,Y=[D.CDN,W],K=e=>(t,n)=>{if(q(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${H}/${t}/attachment`;const l=t?.startsWith("/");return $(F(t)(n)?"":n,l?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},q=e=>!e||A(e)||E(e)||Y.some(F(e)),X={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},G={small:"16",medium:"24",large:"48",xl:"78"},Z=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",size:r,width:s=r&&G[r],height:d=s})=>{const m=R(),u="normal"===i?`${n}.svg`:`sprites.svg#${n}`,p=K(m)($(D.CDN,"/icons/",u));return"normal"===i?o("img",{className:e,style:J(e,d),src:p,alt:l,title:a,"aria-hidden":"true",width:s,height:d}):o(Q,{className:e,children:c("svg",{className:h(X[i],{"w-full h-full":!s,invert:"white"===i},t),width:s,height:d,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:p,xlinkHref:p})]})})})),J=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Q=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),ee=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function te(e=""){try{return new URL(e).pathname}catch(e){return""}}const ne=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":te(ee.SITE_URL);return t&&!A(t)?K(e)(t,n):t},le=(e,t)=>e?.media&&t?.media?e.media-t.media:0,ae=d((({className:e="",image:t,imageClassName:n=""})=>{const l=R();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(le).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:ne(l)(e),type:re(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ie({...t,src:ne(l)(t.src)},n):null]})})),ie=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),re=e=>e?`image/${String(e)}`:void 0,se=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(Z,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(ae,{className:e,imageClassName:n,image:t}):null)),oe={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","":""},ce="bg-main-divider text-main-disabled",de={primary:ce,secondary:ce,white:ce,link:"",transparent:"",gray:ce,"":""},me="text-center font-sans select-none",he={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","":""},ue=({className:e,rounded:t,version:n})=>[me,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?oe[n]:"",t?"rounded-full":"rounded-md",e].join(" "),pe=e=>pe._impl(e);function ge(e,t){const n=s({});return r((()=>new Proxy({},{get:(l,a)=>(n.current||={},n.current[a]||=n=>e.fire(t,{...n??{},type:a}),n.current[a])})),[e,t])}pe._impl=e=>e,pe.setup=e=>{pe._impl=e};class xe{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const fe=new xe,be=()=>ge(fe.emitter,"dialog");function ye(){const e=R(),{closeAll:t}=be();return n=>{const l=K(e)(n.href);return{...n,href:l,"aria-label":n.text,onClick:pe((a=>{n.onClick?.(a);const i=te(ee.SITE_URL);ve(l,n.target,i)&&(t(),a?.preventDefault(),e.push(((e,t="")=>e?.replace(t,"")||"/")(l,i)))}))}}}const ve=(e,t,n)=>O(e,t)&&!ee.SUB_PORTALS?.split(",")?.some(F(e))&&F(e)(n||"/"),Ne=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},we=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=Se(e)&&"hidden lg:block";return c("div",{className:h(ke(e),"flex gap-xs"),children:[l?o("div",{className:h(r,he[i]),children:l}):null,Se(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,he[i]),children:a}):null]})})),ke=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",Se(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},Se=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),Ce=({className:e,rounded:t,version:n})=>["inline-block",me,n?de[n]:"",t?"rounded-full":"rounded-md",e].join(" "),Ie=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[e,t]))({method:n,href:l}),s=ye()({onClick:r,href:l,...a}),c=t??o(we,{...s});return o(e?Be:Te,{...s,children:c})})),Te=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:ue({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...Ne(d),children:m}))),Be=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:Ce({className:e,rounded:l,version:n}),children:a})));function Me({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(ue({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(se,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(Ie,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Pe=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Ve={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Re=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&Ve[n],t),children:e}):null,ze=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Pe(),v=R(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Me({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Re(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),_e(V({...b,extraProps:{className:"@container-normal"}})),Re(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[De(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),De=e=>h(e?"row-span-2":"@xl:row-span-2"),_e=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,$e=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(se,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,je=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:l=!0,children:a})=>e||a?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:a})}):null)),Le=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Ae=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Oe=(e,t)=>e?o(Ae,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ee=(e,t)=>["label"in e?Oe(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Le(e.description,t)},String(t)):null,"__html"in e?o(je,{...e},`rte-${t}`):null],Fe=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?$e(n.icon,t):null,o("div",{children:Ee(n)})]}))),Ue=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Fe,{benefitsVersion:t,...e},String(n))))}):null)),We=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ee)}):null)),He=d((({isTabularBenefits:e,...t})=>o(e?We:Ue,{...t}))),Ye=e=>Boolean(e?.src||e?.icon),Ke=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(qe(n))}):null,qe=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Xe(a,r),d=Xe(i,r);return l||a?.icon?o(Ie,{className:h("basis-full @lg:basis-auto",e),appendLeft:Ge({...a,iconVersion:c}),appendRight:Ge({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Xe=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ge=e=>Ye(e)&&o(se,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ze=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Je=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Qe)}):null)),Qe=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Ae,{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:[Ze(2)(t)," ",n||"₽"]}):null]},String(l)),et=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(tt)}):null)),tt=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Ae,{size:"text-m",font:"font-light",children:e})},String(t)),nt={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},lt=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:I,...T})=>{const B=y?.src?o(se,{image:y}):null,M=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(ze,{className:e,padding:t,defaultPadding:n,...g?{title:M}:{insetTitle:M},...at(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ke(b),backwardButton:S,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(He,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,u?o(je,{richVersion:p,__html:u,isDotted:m,itemSize:nt[i]}):null,I,x?.length?o(Je,{priceList:x}):null,it(f)]})})})),at=(e,t)=>t?{rightImage:e}:{leftImage:e},it=e=>e?.length?o(et,{tags:e}):null;class rt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof rt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const st=()=>!0,ot=(e,t)=>(...n)=>e(...n)&&t(...n),ct=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const dt=e=>Boolean(e&&Array.isArray(e)),mt=e=>Boolean(e&&"object"==typeof e&&!dt(e)),ht=e=>e;function ut(e){return e instanceof rt?e._:e}class pt extends rt{from(e){return this.of(e.map(((e=ht)=>([,t])=>e(t))(ut)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(dt(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,l)=>l===e?t:this._[l])):Array.from({length:Number(e)+1},((n,l)=>l===e?t:void 0)))}}class gt extends rt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class xt extends rt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,ut(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class ft extends rt{proto=ct([e=>dt(this._)||"number"==typeof e,()=>pt.prototype],[e=>mt(this._)||"string"==typeof e,()=>xt.prototype],[st,()=>gt.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const bt=e=>e instanceof rt?e:new ft(e),yt=e=>{const t=(t,...n)=>ut(e(bt(t),...n));return t.fn=e,t},vt=[],Nt=e=>e instanceof Function?e:t=>e===t,wt=e=>(t,n,l=vt)=>bt(t).entries().reduce(((t,[n,a])=>wt(e)(a,t,l.concat(n))),e(n,[l,bt(t)])),kt=yt(((e,[t,n])=>{const[l,...a]=t;return e.set(l,a.length?kt(e.get(l),[a,n]):n)})),St=yt(((e,t)=>t.reduce(kt.fn,e))),Ct=e=>wt(((e,[t,n])=>It(n)?[...e,[t,ut(n)]]:e))(e,[]),It=e=>0===e.size();yt(((e,t=vt)=>t.reduce(((e,t)=>e.get(t)),e)));const Tt=yt(((e,[t,...n])=>n.length?e.set(t,Tt(e.get(t),n)):e.filter((([e])=>e!==t)))),Bt=(Mt=["$ref"]).map(((e,t)=>n=>Nt(e)(n[t+n.length-Mt.length]))).reduceRight(ot,st);var Mt;const Pt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(Vt,e),Vt=ct([dt,(e,t)=>e[parseInt(t,10)]],[mt,(e,t)=>e[t]],[st,ht]),Rt=(e,t)=>((e,t={})=>n=>St(t,Ct(n).map((t=>e(t)))))((([e,n])=>{return Bt(e)?[(l=e,l.slice(0,-1)),Pt(t(n),n)]:[e,n];var l}))(e),zt=e=>Ct(e).filter(((e=ht)=>([t])=>e(t))(Bt)),Dt=e=>{return t=zt(e).map((([,e])=>e)),[...new Set(t)];var t};async function _t(e,t){try{return e?await $t(e,t):null}catch(e){console.error(e)}return null}const $t=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),jt=e=>[...new Set(e)],Lt={},At=["/portal-resources"],Ot=(e,t)=>Rt(e,(e=>t?.[e])),Et=(e,t)=>{const n=Dt(e),[i,r]=l({});return a((()=>{Ft(n).then(r)}),[n.join()]),n.length?Ot(e,{...t,...i}):e},Ft=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(jt(e).filter((e=>!At.some((t=>e.startsWith(t))))).map((async e=>[e,Lt[e]||=await $t(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),l={...t,...n},a=Object.entries(n).flatMap((([,e])=>Dt(e)));return a.length?Ft(a,l):l}return t};function Ut(e,t={}){const n=d((t=>{const n=Et((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Wt=Ut((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(lt,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ht=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>Yt(0,t?.length)),[t]),l=t?.[n];return l?o(Wt,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),Yt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Kt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},qt=e=>e?.replace(/[^+\d]/g,""),Xt="/api/v1";const Gt=e=>e?{phone:qt(e)}:{},Zt=(e,t="birthday")=>e?{[t]:Kt(e)}:{},Jt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Qt=(e,t=!0)=>({[t?"email":"mail"]:e}),en=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:qt(e)}:{},tn=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e??[])t[l??""]?.(n,a)};function nn(){return nn._impl()}nn._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),nn.setup=e=>{nn._impl=e};const ln="rshb-query-params";function an(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(ln)||"";return e&&globalThis.sessionStorage?.setItem(ln,e),e}const rn=e=>{const t=e.target?.closest("a"),n=nn();if(A(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=an();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;l&&n.assign(l,t?.target)}};function sn(){return sn._impl()}function on(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}sn._impl=()=>({forwardQuery:rn}),sn.setup=e=>{sn._impl=e};const cn=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],dn=e=>!e?.length,mn=e=>t=>n=>e(n)?[]:[t],hn={},un=[];const pn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function gn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,h]=function(e,t,n){const[r,s]=l(e),o=i((e=>s((l=>{const a=e instanceof Function?e(l):e,i=t?t(a):a,r=pn(a,i)?a:i;return!pn(l,r)&&n?.(r),r}))),[t,n]);return a((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[u,{setTrue:p,setFalse:g}]=on(!1),x=s({}),[f,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??hn),[t,e]),l=r((()=>cn(n)(e)??un),[n,e]),a=dn(l);return[n,{isValid:a,errors:l}]}(m,n),v=i(((e,t={})=>{const{parse:n,format:l,onChange:a}=t,i=m[e],r=u||x.current?.[String(e)],s=t?.validator??f[e],o=r&&s?s(i):[];return{value:l?l(i):i,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{x.current||={},x.current[String(e)]=!0;const l=n?n(t):t;a?.(l),h((t=>({...t,[e]:l})))}}}),[m,u,f,h]),N=i((e=>{x.current=e,h(e)}),[h]),w=i((()=>{x.current={},g(),h(e)}),[e,h]),k=i((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:k}]}const xn=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})}));function fn(e,t={}){const{open:n,close:l,...a}=be();return{open:i(((a,i={})=>n({dialog:o(e,{...t,...a,onClose:()=>{l(),a.onClose?.()}}),...i})),[e,n,l]),close:l,...a}}function bn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function yn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return bn(globalThis.document,"click",n),t}const vn=({label:e,errors:t})=>e&&t?`${e}*`:e,Nn=()=>{},wn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",kn=e=>e?o(Ae,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Sn=d((({key:e,className:t,id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,pattern:g,autoFocus:x=!1,isTextarea:f=!1,disabled:b=!1,children:y,onChange:v,onFocus:N,onBlur:w})=>{const k=s(null),S=i((e=>{const t=(e.target?.value??"").trimStart();v&&v(t)}),[v]);a((()=>{x&&k.current?.focus()}),[x,k]);const C=y?"pr-3xl":"",I=(e=>e?wn:"border-error")(p),T=d??l??n;return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[kn(d),f?o("textarea",{className:h("block resize-y min-h-24",Cn,I),id:h("textarea",n),value:u,name:l||n,placeholder:m,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e):o("input",{ref:k,className:h("h-14",Cn,C,I),id:n,type:r,value:u,name:l||n,placeholder:m,pattern:g,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e)]}),y]})})),Cn="w-full border rounded-md text-primary-text outline-none p-m",In=e=>o("div",{className:"h-6",children:e?o(Ae,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Tn=d((({className:e,label:t,value:n="",placeholder:l,error:r,errors:s,onChange:d=Nn,onBlur:m,isTextarea:u,type:p,isInteger:g=!1,maxLength:x,disabled:f=!1})=>{const[b,{setFalse:y,setTrue:v}]=on(),N=yn(y),w=i((e=>{!b&&v(),x?e.length<=x&&d(e):d(e)}),[b,d]);return a((()=>{g&&n&&d(Bn(n))}),[n]),c("div",{className:h("shrink-0 w-full",e),ref:N,onBlur:y,onFocus:v,children:[o("div",{children:o(Sn,{disabled:f,type:p||"text","aria-label":t,label:vn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:w,onBlur:m,isTextarea:u,placeholder:Mn(l,s,t)})}),In(r)]})})),Bn=(e="")=>e.replace(/[^\d]+/g,""),Mn=(e,t,n)=>t&&!n?`${e}*`:e,Pn=e=>e?.text||e?.key||"",Vn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Rn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:Vn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Pn(e)}),o(Z,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function zn({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=ge(fe.emitter,"popup"),h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=yn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.open({popup:o(Rn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}const Dn=d((({className:e,label:t,options:n=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,disabled:u=!1,iconVersion:p="black",onChange:g})=>{const[x,{setFalse:f,setTrue:b}]=on(),[y,v]=l(""),N=jn(u,n.length),w=x&&!N,k=i((()=>{N||b()}),[N]),S=i((()=>{v(""),f()}),[]),C=zn({isOpen:x,options:n,value:a,query:y,onChange:g,onClose:S,iconVersion:p});return c("div",{className:h("space-y-xs",e),children:[kn(t),c("div",{className:h("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",$n(s,r,N)),onClick:w?S:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Pn(a)||d}),_n(w,p)]}),m&&w?o("div",{className:h("absolute top-0 w-full z-20"),children:o(Sn,{type:"text",value:y,autoFocus:!0,disabled:N,onChange:v})}):null]})]})})),_n=(e,t)=>o(Z,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),$n=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),jn=(e,t)=>e||0===t,Ln=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Dn,{...a,valid:!n,label:vn({label:t,errors:l})}),In(n)]}))),An=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],On=d((({field:e,input:t})=>o(Ln,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:An,...e(t?.name??"")}))),En=(e="")=>Boolean("trade"===e||"all"===e),Fn=e=>null!=e,Un=new Map,Wn=(e,t=Un)=>n=>{const l=Yn(n),a=t.get(l);if(l&&Fn(a))return a;const i=e(...n);return l&&Fn(i)&&t.set(l,Promise.resolve(i)),i},Hn=e=>Boolean(e?.every((e=>Array.isArray(e)?Hn(e):!e||"string"==typeof e))),Yn=e=>Hn(e)?e.toString():"",Kn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function qn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Xn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Fn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await Wn(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&Kn(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Xn(e){return Array.isArray(e)?e:e instanceof Function?Xn(e()):[e]}const Gn=`${Xt}/branches`,Zn=[];const Jn=async e=>await _t(e,{method:"GET"})||Zn;function Qn(e=!1){const{data:t}=qn(`${Xt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,$t);return Array.isArray(t)?t:[]}const el=(e="")=>"ULTRASERVICE"===e,tl=d((({field:e,input:t,params:n})=>{const l=el(n?.typeForm),i=e("region"),r=i?.value?.key,s=i?.value?.text,c=l?Qn(l)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=qn(e?`${Gn}?regionCode=${e}`:null,Jn);return t||Zn}(r)?.filter((e=>e?.address));return a((()=>{""!==i?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[i?.value]),o(Ln,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),nl=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},ll=(e,t,n)=>Math.max(t,Math.min(e,n));function al(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function il({list:e=[],min:t,max:n,step:l,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)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||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:n,step:l,value:s,disabled:i,onChange:t=>{const n=al(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const rl=1,sl=100,ol=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:rl),max:s=(a.length?a.length-1:sl),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=nl(e,{normalize:(e=0)=>a.length?cl(a)(e):ll(e,r,s),format:Ze()}),x=i((e=>{p&&p(al(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",wn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),il({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),dl(l)]})})),cl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),dl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ml=["От 1 000 ₽","До 1 000 000 000 ₽"],hl=d((({field:e,input:t})=>o(ol,{title:"Сумма, ₽",items:ml,min:1e3,max:1e9,...e(t?.name??"")}))),ul=d((({field:e,input:t})=>o(Tn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),pl="client",gl=[{key:pl,text:"Клиент"},{key:"representative",text:"Представитель клиента"}],xl=d((({field:e,input:t})=>o(Ln,{label:"Тип обратившегося",...t,options:gl,...e("applierType")}))),fl=d((({field:e,input:t})=>o(Tn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),bl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,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>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=yl(t,e),c=vl(t,i,r);h.push(o("td",{children:o("div",{className:Nl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},yl=(e,t)=>t&&e.toDateString()===t.toDateString(),vl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),Nl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),wl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],kl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:i=Nn})=>{const{firstDayOfWeek:s,totalDays:d}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:wl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:bl({firstDayOfWeek:s,today:e,totalDays:d,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:i})})]})})),Sl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];const Cl=e=>"_"===e,Il=e=>/\d/.test(e),Tl=e=>Cl(e)||Il(e),Bl=1940,Ml={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Pl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:i,disabled:r,onChange:d,onClick:m})=>{const u=s(null),[p,g]=l(i||"");return a((()=>{g(i||"")}),[i]),a((()=>{Rl({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==u.current&&u.current.focus(),m?.()},className:h("relative",n),children:[o("input",{ref:u,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(function(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const l=[...t],a=l.findIndex(Cl),i=l.map(((e,t)=>Tl(e)?l.slice(0,t).filter(Tl).length:-1)),r=l.map(((e,t)=>Il(e)?e:n.charAt(i[t])||e)),s=i.indexOf(n.length-1)+1;return r.slice(0,Math.max(a,s)).join("")}(t,"__.__.____"))},onBlur:()=>{Vl(p)?Rl({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(i||"")},disabled:r}),r?null:o(Z,{className:"mr-s",...Ml})]})})),Vl=e=>{const[t,n,l]=e.split(".");if((e=>Number(e)>=Bl&&Number(e)<=(new Date).getFullYear())(l)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(l),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;return Number(t)>0&&Number(t)<=a}return!1},Rl=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:l})=>{if(Vl(e)){const{day:a,month:i,year:r}=(e=>{const[t,n,l]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(l)}})(e);t(i),n(r),l?.(new Date(r,i,a))}},zl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:l,setSelectedMonth:a,setSelectedYear:i,disabled:r=!1})=>o(Pl,{onChange:l,disabled:r,onClick:e,value:t&&Kt(t),setSelectedMonth:a,setSelectedYear:i,className:h("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Dl=Sl.map((e=>({key:e}))),_l=Array.from({length:(new Date).getFullYear()-Bl+1},((e,t)=>Bl+t)).reverse().map((e=>({key:String(e)}))),$l=(e,t)=>{const n=new Date(e,t,1);let l=0;for(;n.getMonth()===t;)l++,n.setDate(n.getDate()+1);return l},jl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:l,onChange:a})=>{l&&a?.(new Date(t,n,Math.min(e,l.getDate())))},Ll={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Al={className:"min-w-32",iconVersion:"black",isBorder:!1},Ol=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:u})=>{const[p,{setValue:g,setFalse:x}]=on(!1),[f,b]=l(n?.getMonth()||(new Date).getMonth()),[y,v]=l(n?.getFullYear()??(new Date).getFullYear()),N=i((e=>{u?.(e),x()}),[u]),{handlePrevMonth:w,handleNextMonth:k,handleSelectMonth:S,handleSelectYear:C,monthsOptions:I,yearsOptions:T,handleChangeVisibleCalendar:B,ref:M}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r,onChange:s,value:o})=>{const c=yn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>{l(Sl.indexOf(e));const t=$l(r,Sl.indexOf(e));jl({maxDateOfMonth:t,selectedYear:r,selectedMonth:Sl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:i((({key:e})=>{a(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Dl,yearsOptions:_l,ref:c}})({onYearSelect:v,onMonthSelect:b,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:u,value:n}),P=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(M,370);return c("div",{className:h("space-y-xs",e),ref:M,children:[kn(t),c("div",{className:"relative",children:[zl({handleChangeVisibleCalendar:B,value:n,valid:r,onChange:u,disabled:m,setSelectedMonth:b,setSelectedYear:v}),p&&!m?c("div",{className:h("absolute bg-white z-20 select-none",{"bottom-full":P}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:w,children:o(Z,{...Ll,className:"-rotate-90 cursor-pointer"})}),o(Dn,{onChange:S,value:{key:Sl[f]},options:I,...Al}),o(Dn,{onChange:C,value:{key:String(y)},options:T,...Al}),o("div",{className:"my-auto",onClick:k,children:o(Z,{...Ll,className:"rotate-90 cursor-pointer"})})]}),o(kl,{today:n,currentMonth:f,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),El=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Ol,{label:vn({label:t,errors:l}),valid:Boolean(!n),...a}),In(n)]}))),Fl=d((({field:e,input:t})=>o(El,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Ul=d((({field:e,input:t})=>o(Tn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),Wl=d((({field:e,input:t})=>o(Tn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Hl=d((({field:e,input:t})=>o(El,{label:"Желаемая дата встречи",...e(t?.name??"")}))),Yl=d((({field:e,input:t})=>o(Tn,{label:"Электронная почта",...e(t?.name??""),...t}))),Kl=[{key:"ULTRASERVICE",text:"Ультра"}],ql=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Xl=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Gl=d((({field:e,input:t})=>o(Ln,{label:"Способ получения ответа",options:Xl,...e(t?.name??"")}))),Zl=d((({field:e,input:t})=>o(Tn,{label:"ФИО",...e(t?.name??""),...t}))),Jl=d((({field:e,input:t})=>o(Tn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??"")}))),Ql=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),ea="appearance-none w-5 h-5 border-solid flex-none",ta=[{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"}],na=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Ql,{paths:ta,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",aa(l)),onClick:s,children:[o("div",{className:h(ea,"m-0",a?"rounded-full border-2":ra(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ia(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,la(n)]})})})),la=e=>e?o("div",{className:"ml-s",children:o(Ae,{size:"text-l",font:"font-light",children:e})}):null,aa=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",ia=(e=!1)=>e?"radio":"checkbox",ra=(e=!1)=>h("rounded border",{"bg-primary-main":e}),sa=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0",e),children:[o(na,{text:t,value:n,disabled:a,onChange:r},l),In(i)]}))),oa=d((({field:e,input:t})=>o(sa,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ca=`${Xt}/outservice`,da=[];async function ma(){const e=await _t(`${ca}/outserviceregions`);return e&&Array.isArray(e)?e:da}const ha=d((({field:e,input:t})=>{const n=e("region"),l=n?.value?.key,{data:i}=qn("outServiceRegions",ma),s=r((()=>i?.find((e=>e.code===l))?.localities?.map((e=>({key:e,text:e})))),[i,l]);return a((()=>{""!==l&&e?.(t?.name??"")?.onChange?.("")}),[l,t?.name??""]),o(Ln,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),ua=d((({field:e,input:t})=>o(Tn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,...e(t?.name??""),...t}))),pa=d((({field:e,input:t})=>o(Tn,{label:"Имя",maxLength:60,...e(t?.name??""),...t}))),ga=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),xa=d((({field:e,input:t})=>En(e("acquiringType")?.value?.key)?o(ga,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),fa=d((({field:e,input:t})=>o(Tn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),ba=e=>"_"===e,ya=e=>/\d/.test(e),va=e=>ba(e)||ya(e),Na=[..."+7 (___) ___-__-__"],wa=Na.findIndex(ba),ka=Na.map(((e,t)=>va(e)?Na.slice(0,t).filter(va).length:-1));const Sa=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Na.map(((e,n)=>ya(e)?e:t.charAt(ka[n])||e)),l=ka.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(wa,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Sn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Ca=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Sa,{"aria-label":t,label:vn({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),In(n)]}))),Ia=d((({field:e,input:t})=>o(Ca,{label:"Телефон",...e(t?.name||"phone"),...t}))),Ta=d((({field:e})=>En(e("acquiringType")?.value?.key)?o(ga,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ba=Ut((({field:e,input:t,source:n})=>o(Ln,{placeholder:"Выберите продукт",label:"Продукт",options:Ma(n?.productList),...e(t?.name??"")}))),Ma=e=>(e??[]).map((e=>({key:e,value:e}))),Pa=`${Xt}/regions`,Va=[];function Ra(e=Pa){const{data:t}=qn(e,$t);return Array.isArray(t)?t:Va}const za=`${Xt}/outservice/outserviceregions`,Da=d((({field:e,input:t,params:n})=>{var l;const a=Ra((l=n?.typeForm,"OUTSERVICE"===l?za:void 0));return o(Ln,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),...e(t?.name??"")})})),_a=d((({field:e,input:t})=>{const n=Qn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(Ln,{label:"Регион",placeholder:"Выберите регион",options:l,...e(t?.name??"")})})),$a=d((({field:e,input:t})=>o(Tn,{label:"ФИО представителя",...t,...e("representativeName")}))),ja=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},La=/^[\u0400-\u04FF\d\s]+$/u,Aa=mn((e=>null!=e&&""!==e)),Oa="Некорректно заполненное поле",Ea=e=>Aa(e??Oa),Fa=e=>mn((e=>e?.key&&""!==e?.key))(e??Oa),Ua=e=>mn((e=>"string"==typeof e&&e.length>1&&((e="")=>La.test(e))(e)))(e??Oa),Wa=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Ha=e=>mn(Wa)(e),Ya=mn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Ka={fullName:Ea(),addressBranch:Fa(),desiredMeetingDate:Ea(),product:Ea(),localities:Ea(),partnerComments:Ea(),collectionCount:Ea(),acquiringType:Fa(),serviceType:Fa(),annualRevenue:Ea(),feedbackMethod:Fa(),serviceDirection:Fa(),secondaryPhone:Ha("Укажите номер телефона"),region:Fa(),situationDescription:Ea(),sufferedFrom:Ea(),applierType:Ea(),surname:Ua("Укажите свою фамилию на кириллице"),name:Ua("Укажите своё имя на кириллице"),middleName:Ua("Укажите своё отчество на кириллице"),birthday:Ea("Укажите дату рождения"),phone:Ha("Укажите номер телефона"),email:(qa="Укажите электронную почту",mn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(qa)),inn:(e=>mn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:Ea(),typeForm:Ea(),consentToReceiveMaterials:Ya,consentDataProcessing:Ya};var qa;const Xa=(e={})=>({name:t})=>Boolean(e[t??""]),Ga=e=>t=>!t?.condition||t.condition.values.find((n=>{const l=e?.[t?.condition?.name??""];return n===(l?.key??l)})),Za=d((({field:e})=>{const t=e("secondaryPhone");return o(Ca,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?ja(t,Ka.secondaryPhone):t})})),Ja=d((({field:e,input:t})=>o(Ln,{label:"Направление обслуживания",placeholder:"Выберите направление",options:ql,...e(t?.name??"")}))),Qa=d((({field:e,input:t})=>o(Tn,{label:"Описание ситуации",...t,...e("situationDescription")}))),ei=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],ti=d((({field:e,input:t})=>o(Ln,{label:"Пострадал в",...t,options:ei,...e("sufferedFrom")}))),ni=d((({field:e,input:t})=>o(Tn,{label:"Фамилия",maxLength:60,...e(t?.name??""),...t}))),li=["От 1 мес","До 15 лет"],ai=d((({field:e})=>o(ol,{title:"Срок, месяцев",items:li,min:1,max:180,...e("term")}))),ii=d((({field:e,input:t})=>o(Ln,{label:"Тип обслуживания",options:Kl,...e(t?.name??"")}))),ri={horizontal:"@lg:flex-row",vertical:""},si=d((({label:e,items:t,value:n,className:l,disabled:a=!1,orientation:i="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:h("flex flex-col gap-s",ri[i],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(na,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:a},String(e))))})]}))),oi=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],ci=d((({field:e,input:t})=>{const n=i((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(si,{className:"whitespace-normal",orientation:"horizontal",items:oi,...e(t?.name??"",{onChange:n})})})})),di=d((({field:e,input:t})=>o(na,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")})));const mi={$ref:"/wcms-resources/outservice-productlist.json"},hi={fullName:Zl,addressBranch:tl,desiredMeetingDate:Hl,product:e=>o(Ba,{...e,source:mi}),localities:ha,isClient:oa,partnerComments:fa,collectionCount:Ul,acquiringType:On,onlineCheckout:xa,posTerminal:Ta,serviceType:ii,term:ai,amount:hl,annualRevenue:ul,vedTypes:ci,feedbackMethod:Gl,serviceDirection:Ja,bankEmpolee:fl,secondaryPhone:Za,applicationDate:e=>o(Tn,{label:"Дата и время обращения в Банк",...e}),region:e=>el(e?.params?.typeForm)?o(_a,{...e}):o(Da,{...e}),consentToReceiveMaterials:di,sufferedFrom:ti,situationDescription:Qa,representativeName:$a,applierType:xl,surname:ni,name:pa,middleName:ua,birthday:Fl,phone:Ia,email:Yl,inn:Jl,comment:Wl},ui=(e,t,n={})=>(l,a)=>{const i={...hi,...n}[String(l.name)];return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:l,field:e})&&i?o("div",{children:o(i,{field:e,input:l,params:t})},a):null},pi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Ae,{size:"text-h6",children:e})}):null,gi={primary:h("text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},xi=h("group/btn-embedded","bg-transparent border border-transparent outline-none"),fi=h("bg-main-gray text-main-disabled cursor-not-allowed"),bi=d((({className:e,type:t="button",version:n="primary",shape:l="default",embedded:a,disabled:s,role:c,ariaLabel:d,data:m,dataTheme:u,children:p,onClick:g=Nn})=>{const x=i("tab"!==c?pe(g):g,[c,g]),f=r((()=>Ne(m)),[m]),b="round"===l;return o("button",{className:h("font-sans flex items-center gap-xs",{[gi[n]]:!s&&!a,[xi]:a,[fi]:s},a?"justify-between":"justify-center",a||b?"p-0":"px-9 py-4",{"rounded-md":"default"===l,"rounded-full":b},e),type:t,role:c,"aria-label":d,disabled:s,"aria-disabled":s?"true":void 0,"data-theme":u,...f,onClick:x,children:p})})),yi=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(Z,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),vi=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{className:h("relative bg-white pt-0 p-lg",e),role:"dialog",title:"Диалог",onClick:a,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(yi,{className:"absolute top-0 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),Ni=d((({ok:e,typeForm:t,onClose:n})=>{const l="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(vi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(se,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?l:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(bi,{type:"button",onClick:n,children:"Хорошо"})]})})})),wi=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:h,applierType:u,...p}=e,g=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${En(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,x={...p,...Ii(o),...Ci(c),...d&&{inn:d},...g?{partnerComments:g}:{},...s?{typeForm:s}:{},...Si(m?.text,h),...ki(u)};return Object.fromEntries(Object.entries(x)?.map((([e,t])=>[e,t?.key||t])))},ki=e=>e?.key?{isClient:e?.key===pl}:{},Si=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},Ci=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},Ii=e=>e?{vedTypes:Object.fromEntries(oi.map((({id:t})=>[t,t===e])))}:{},Ti={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:An[0],serviceType:Kl[0],feedbackMethod:Xl[0],serviceDirection:ql[0],vedTypes:oi[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Bi=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||Ti[e.name||""]]))),typeForm:{key:t,text:""}}),Mi=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:l="big"})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===l?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})}))),Pi=d((({isLoading:e,disabled:t,children:n,className:l,...a})=>c(bi,{type:"submit",className:h("relative",l),disabled:e||t,...a,children:[e?o(Mi,{blur:!0,size:"small"}):null,n]}))),Vi={primary:gi.primary,secondary:gi.secondary,white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",gray:gi.secondary,transparent:"","":""},Ri=d((e=>{const t=ye(),{className:n,href:l,target:a,text:i,aboveText:r,version:s="link",rel:c,ariaLabel:d,data:m,children:u,onClick:p}=t(e),g="link"!==s;return o("a",{className:h("group/btn inline-flex items-center h-fit","font-sans no-underline select-none","border border-transparent focus:border-primary-text focus:border","cursor-pointer",{[Vi[s]]:Boolean(s),[r?"px-9 py-2.5":"px-9 py-4"]:g,"rounded-md":g},n),href:l,target:a,rel:c,"aria-label":d??`Ссылка на ${i}`,role:l?"link":"button",onClick:p,...Ne(m),children:u??zi(i,r)})})),zi=(e,t)=>e||t?c("div",{className:"whitespace-pre",children:[t?o("div",{className:"font-light text-left text-xs",children:t}):null,o("div",{className:h("text-left",{"text-s -mt-3xs":Boolean(t)}),children:e})]}):null,Di=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Ae,{children:e}):null,t?o(Ri,{...t,ariaLabel:"условия передачи данных",children:t.text}):null]}))),_i=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(na,{...e}),o(Di,{link:t})]}),In(ja(e,Ya).error)]}):o(Di,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(Pi,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),$i={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=`${Xt}${g?"/lead":"/sendcorporatelead"}`,f={typeForm:n,...Jt(l,g),...Qt(i,g),...Gt(a),...Zt(s,"desiredMeetingDate"),...g?Zt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...en(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},ji=d((({className:e,title:t,typeForm:n="",sections:l=[],button:a,link:s,endpoint:d,additionalParams:m,isContacts:u,data:p,...g})=>{const x=r((()=>l?.flatMap((e=>e?.inputs))||[]),[l]),f=r((()=>Bi(x,n)),[x,n]),b=r((()=>((e,t={})=>{const n=e.filter((e=>Boolean(e?.required&&e?.name))),l={...Ka,...t},a=n.some((e=>e.condition?.values)),i=Object.fromEntries(n.filter(Xa(l)).map((({name:e})=>[e,l[e??""]])));return e=>a?Object.fromEntries(n.filter(Xa(l)).filter(Ga(e)).map((({name:e})=>[e,l[e??""]]))):i})(x)),[x]),y=fn(Ni),v=sn(),N=i((async(e,t)=>{const l=wi({...e,...m}),a=Boolean(await $i.send(l,"lead"===d));y.open({ok:a,typeForm:n}),a&&tn({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:k,onSubmit:S}]=gn(f,{resetOnSubmit:!0,formValidator:b,onSubmit:N}),C=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return c(xn,{className:h("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[l.map(((e,t)=>{return c("div",{className:h((l=e.columns,2===l?"@xl:grid-cols-2":""),"grid gap-x-m"),children:[pi(e.title),(e?.inputs||[])?.map(ui(k,{typeForm:n}))]},`section-${t}`);var l})),_i(C?k("consentDataProcessing"):void 0,s,a)]}),u?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(se,{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(se,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Li=d((({title:e,description:t})=>{const n=Pe();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(se,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),Ai=e=>e%2!=0,Oi=d((({className:e,children:t})=>o("span",{className:h("inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main",e),children:t}))),Ei=d((({isUnfolded:e,...t})=>o(Z,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Fi=d((({className:e,isUnfolded:t,short:n,label:l=(t?"Скрыть":"Развернуть"),embedded:a,...i})=>c(bi,{className:h({"w-full":!n},e),embedded:a,shape:n?"default":"square",role:"tab","aria-label":"Кнопка сворачивающейся секции",...i,children:[o(Oi,{children:l}),o(Ei,{isUnfolded:t,iconVersion:a?"color":""})]}))),Ui=d((({className:e,role:t="tablist",children:n})=>o("div",{className:h(e),role:t,children:n})));const Wi=d((({className:e,isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:h("transition-max-h duration-300 overflow-hidden",{"max-h-0":Boolean(l.current||!t)}),role:"tabpanel","aria-label":"Сворачивающаяся секция",children:o("div",{className:e,ref:i,children:n})})})),Hi="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Yi=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]],[s,{toggle:d}]=on(!1);return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(Hi),children:[P(i,{...a.options,parent:n}),Ai(i.length)?o(Ht,{className:"col-span-6",...a}):null]}),c(Ui,{children:[c(Wi,{className:h(Hi),isUnfolded:s,children:[P(r,{...a.options,parent:n}),Ai(r.length)?o(Ht,{className:"col-span-6",...a}):null]}),o(Fi,{className:h("text-h4",{hidden:e<1}),label:t,isUnfolded:s,disabled:!r?.length,dataTheme:a.options?.page?.colorPalette,onClick:d})]})]})})),Ki=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",qi=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Xi=10;function Gi(e=0){const t=Math.round(e*Xi);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const Zi=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Gi(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:u,role:"listitem",children:d})})),Ji=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Qi=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(tr(n))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?er(c,v):{},...N?qi(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(Zi,{className:h(m,a?Ji[a-1]:"",{"h-full":N},t),style:w?er(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),er=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),tr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),nr={"horizontal-list":"w-6","vertical-list":"h-6"},lr=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?nr[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),ar=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===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: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-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},ir=e=>e,rr=(e=ir)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),sr=rr(),or=(e=ir)=>rr((t=>-e(t))),cr=or(),dr=e=>t=>e.scrollWidth/t,mr=e=>(t,n)=>{e.scrollBy({left:n*dr(e)(t),behavior:"smooth"})},hr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[or()(a),rr()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?mr(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?mr(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},ur={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},pr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Pe(),[u,p]=hr({itemCount:s.length}),g=gr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Qi,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(ar({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",ur[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(lr({activeIndex:t,onClick:x,listType:l}))}):null})),gr=(e=!1)=>({behavior:e?"auto":"smooth"}),xr=d((({className:e,name:t,...n})=>o(bi,{className:h("w-12 h-12 min-w-12 min-h-12",e),shape:"round",...n,children:o(Z,{name:t,iconVersion:"",size:"small"})}))),fr=d((e=>o(xr,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),br=d((e=>o(xr,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),yr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",vr=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?Nr(t):null,i?o(fr,{className:h(wr(a),m?"left-1":"left-0"),onClick:s}):null,r?o(br,{className:h(wr(a),m?"right-1":"right-0"),onClick:d}):null]})})),Nr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(yr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(yr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),wr=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),kr=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=hr({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(Qi,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(vr,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(pr,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),Sr=({blocksToRender:e,...t})=>o(kr,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Ki(!0)),children:B(e,t)},String(n))})}),Cr=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Ir(n,t),o(Yi,{...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Ir(n,t),Sr({...l,blocksToRender:t})]});default:return null}})),Ir=(e,t)=>e&&!t.length?o(Li,{...e}):null,Tr=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Br=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ga,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Mr=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Tr(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Pr(l)).filter(Boolean))]}),n?o("div",{children:o(bi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Pr=e=>([t,n])=>{const l=n?.type;return"array"===l?Vr(t,e)(n):null},Vr=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Ae,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Br,{items:l,multiple:!n?.single,...t(e)})]},e)},Rr=e=>e;function zr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Dr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,_r=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Dr(t[e])||Dr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Dr(t[e])||Dr(n[e])||$r(t[e])<=$r(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Dr(t[e])||Dr(n[e])||$r(t[e]?.min)>=$r(n[e]?.min)&&$r(t[e]?.min)<=$r(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Dr(t[e])||Dr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Dr(t[e])||Dr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),$r=e=>Number(e||0),jr=(e,{block:t,page:n,normalize:l=Rr})=>{const a=t?.blocks||[],[i,s]=gn(e),o=r((()=>zr(a,a.map((e=>Ot(e.content,n?.fallback))))),[a,n?.fallback]),c=i===e?a:((e,t)=>(n=Rr)=>e?.filter((([,e])=>_r(t,n(e)||{}))).map((([e])=>e)))(o,i)(l);return[i,{blocksToRender:c,blocksWithProps:o},s]},Lr={},Ar={},Or=Ut((({className:e,filtrationSchema:t=Lr,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=jr(Ar,{block:a.block,page:a.options?.page}),d=o(Dn,{className:"w-64",label:n?.title,options:Er(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Er(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Mr,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(bi,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(Cr,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Er=e=>zr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Fr=(e=!1)=>e?"text-left":"text-center",Ur={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Wr=d((({className:e,iconBgVersion:t="primary",size:n,icon:l,...a})=>{const i=`${n?.width??44}px`;return l?o("div",{className:h("rounded-icon object-fit flex justify-center items-center",Ur[t],e),style:{width:i,height:i},role:"figure",children:o(Z,{name:l,width:"54%",...a})}):null})),Hr=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Pe();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:Fr(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Yr)}):null]})})),Yr=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Wr,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(se,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(Ae,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(je,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Kr=(e,t,n)=>{return o(kr,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Ae,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(se,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Ae,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},qr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Kr(e,0,t):null]}))),Xr={start:"justify-start",center:"justify-center",end:"justify-end"},Gr=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",Xr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ke(e)})})),Zr=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Jr="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Qr="flex flex-col lg:w-1/2 gap-2xl",es="flex flex-col gap-y-xl min-w-52",ts=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Ae,{size:"text-h3",children:"number"==typeof e?[l,Ze(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),ns=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o(Ae,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(ts,{value:n,...a}):o(Ae,{size:"text-h3",children:"-"})]}))),ls=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,as=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Ae,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ze(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),is=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o(Ae,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(Z,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),rs=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,color:a="text-secondary-text",children:i,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(as,{title:e,rate:t,unit:n,fractionDigits:l,color:a,...r})}),o(ns,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:a,...r}),i]}):o(is,{title:e,...r}),ss=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(ol,{items:e?[`От ${Ze(1)(l.min||0)} ${n}`,`До ${Ze(1)(l.max||0)} ${n}`]:[],step:t,...l}),os={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},cs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ds=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=os.prefMonthsNum,prefTravelBonusRate:i=os.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||cs,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},ms=Ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=gn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=ds(r,n);return o(Zr,{className:e,title:t,...i,children:c("section",{className:h(Jr,e),children:[c("div",{className:Qr,children:[ss({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),ss({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?rs({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:es,children:[x>=0?o(ns,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Ke(l,{isVertical:!0}),ls(a)]})]})})})),hs=Math.round(29.5),us=(e,t=0)=>e?.sum?e.sum:t,ps=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,gs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,xs=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Ae,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(si,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),fs=e=>xs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),bs=" (c капитализацией)",ys=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:es,children:[o(ns,{title:`Доход в конце срока${i?bs:""}`,value:e,postfix:n,prefix:"+"}),o(ns,{title:`Сумма в конце срока${i?bs:""}`,value:t,postfix:n}),Ke(l,{isVertical:!0}),a?.map(ls)]}),vs=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Ns([e,t],l),Ns=([e,t],n=[])=>({[e]:n.length?cr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?sr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ws=(e,[t,n],l)=>e>=l[t]&&e<=l[n],ks={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ss={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Cs=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?ks[e?.rateType]:"",{data:n}=qn(t?`${Xt}/depositrates/${t}`:null,$t);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&Is(s,e)&&ws(l,["minSum","maxSum"],e)&&ws(n,["minDays","maxDays"],e)))||Ss,{rate:m}=d,h=Ts(m,e),u=l+h,p=c||[Ss];return{...d,...Ns(["minSum","maxSum"],p),...Ns(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},Is=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ts=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Bs=Ut((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=gn({moneyValue:us(r,1e5),daysValue:ps(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Cs(m,s),{income:g,finalSum:x,rate:f,depositeName:b}=p;return o(Zr,{className:e,title:t,...d,children:c("section",{className:h(Jr,e),children:[c("div",{className:Qr,children:[ss({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(ol,{items:[`От ${gs(y.min||0)}`,`До ${gs(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Ms(p,u),fs({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),rs({rate:f,depositeName:b,isShowDepositeName:i}),ys({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var y})),Ms=(e,t)=>c("div",{className:"space-y-s",children:[o(Ae,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(na,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(na,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ps=(e=[],t=!1)=>Vs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Vs=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Rs=({min:e=0,max:t=0,availableMonths:n,...l})=>o(ol,{items:[`От ${zs(e)}`,`До ${zs(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),zs=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ds=e=>xs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),_s=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(ll(t?.[a],n.minMonths,n.maxMonths))},$s=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},js={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Ls=e=>As({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&As({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&As({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&As({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),As=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Os=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[js],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ls({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=vs(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=vs(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>Ls({row:e,userInputParams:t,paramsViewSettings:n})&&ws(l,["minSum","maxSum"],e)&&ws(a,["minMonths","maxMonths"],e)))||js)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=$s(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},Es=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Fs={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Us=Ut((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const u=(p=n?.rateRows,Vs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:x}]=gn({moneyValue:us(s,2e5),monthsValue:ps(s,hs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),f=Os(g,n,r),b=Ds({title:"Тип платежа",orientation:"vertical",...x("isAnnuity")}),{onChange:y}=x("moneyValue"),{onChange:v}=x("monthsValue");return a((()=>{y&&y(ll(g.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{v&&v(ll(g.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!Es(s)&&u&&_s({field:x,defParams:u,calcParams:f,map:Fs,monthsValue:"minMonths"})}),[n,s]),o(Zr,{className:e,title:t,...m,children:c("section",{className:h(Jr,e),children:[c("div",{className:Qr,children:[ss({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...x("moneyValue"),value:f.moneyValue}),Rs({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...x("monthsValue"),value:f.monthsValue}),Ws({...f,...r},x),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),Ke(l,{isVertical:!0}),ls(i)]})]})})})),Ws=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(na,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(na,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(na,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(na,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Hs=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Ys={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Ks=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Gs(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Xs({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Xs({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Xs({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Xs({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ws(l,["minSum","maxSum"],t),ws(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Ys,{rate:h}=m,u=qs(h,e),p=l+u,g=t||[Ys];return{...m,...Ns(["minSum","maxSum"],g),...Ns(["minMonths","maxMonths"],g),availableMonths:Hs(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},qs=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Xs=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Gs=(e,t)=>e+Math.round((t-e)/2),Zs=(e="rub")=>"rub"===e,Js=(e,t)=>{const{minMonths:n,maxMonths:l}=Ns(["minMonths","maxMonths"],no(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:ll(a,n,l)}},Qs=(e,t)=>{const{minSum:n,maxSum:l}=Ns(["minSum","maxSum"],no(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:ll(a,n,l)}},eo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),to=e=>{const t=Zs(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},no=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},lo=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?xs({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?xs({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),ao(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?fs({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},xs({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),ao(e.isShowNewClient),e.isShowNewClient?o(na,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},ao=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,io={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},ro={text:"₽",key:"rub"},so=Ut((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[ro],g=i((e=>t=>e?{...t,...to(t),...Qs(t,e),...Js(t,e),...eo(t,e)}:t)(u),[u]),[x,{field:f}]=gn({moneyValue:us(d,2e4),monthsValue:ps(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:ro},{normalizer:g}),b=f?.("currency")?.value??ro,y=f?.("isNewClient")?.value,v=no(u,b),N=Ks(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,I=i((()=>{_s({field:f,defParams:Ps(v,y),calcParams:N,monthsValue:"minMonths",map:io})}),[f,u]);a((()=>{!Es(d)&&v&&I()}),[d,u]);const T=w===Ps(v,y)?.rate;return o(Zr,{className:e,title:t,...m,children:c("section",{className:h(Jr,e),children:[c("div",{className:Qr,children:[c("div",{className:"flex gap-m",children:[ss({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:oo(b?.key)}),u&&u?.length>1?o(Ln,{label:"Валюта",options:p,...f("currency")}):null]}),Rs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),lo({...N,...s},f)]}),rs({rate:w,children:mo(I,T)}),ys({income:k,finalSum:S,buttons:[...l,co(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),oo=(e="")=>Zs(e)?1e3:100,co=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},mo=(e,t=!1)=>t?null:o(bi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),ho=e=>uo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&uo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),uo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],po={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},go=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[po],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=vs(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=vs(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>ho({row:e,userInputParams:t,paramsViewSettings:n})&&ws(l+r,["minSum","maxSum"],e)&&ws(i,["minSumOld","maxSumOld"],e)&&ws(r,["minSumExtra","maxSumExtra"],e)&&ws(a,["minMonths","maxMonths"],e)))||po)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=$s(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},xo=Ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=gn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=go(s,n,i),u=Ds({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Zr,{className:e,title:t,...r,children:c("section",{className:h(Jr,e),children:[c("div",{className:Qr,children:[ss({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),ss({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Rs({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),fo({...m,...i},d),m.isExtraMoney?ss({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(ns,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),Ke(l,{isVertical:!0}),ls(a)]})]})})})),fo=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(na,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(na,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(na,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),bo=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=nl(e,{normalize:(e=a)=>n&&l?String(ll(Number(yo(e)),n,l)):yo(e),format:Ze(r)}),d=i((e=>t&&t(yo(e))),[t]);return o(Sn,{onChange:d,...s,...c})})),yo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),vo=d((e=>o(bo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Ae,{size:"text-xl",font:"font-light",children:"₽"})})})));function No(e,t){for(const[n,l]of e.entries())null!=l?t.setItem(n,l):t.removeItem(n)}function wo(e,t){return No(e,t),No(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class ko{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new xe){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class So{bus;store=new Map;get size(){return this.store.size}constructor(e=new xe){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const Co={};function Io(e,t=Co){const n=s(null),o=function(){const[,e]=l(0);return i((()=>e((e=>(e+1)%65536))),[])}();return a((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,l)=>(n.current||=new Set,n.current.add(l),e.getItem(l)),has:(t,l)=>(n.current||=new Set,n.current.add(l),e.hasItem(l)),set:(t,n,l)=>(e.setItem(n,l),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const To=new So;function Bo(){return Io(To)}wo(To,new ko(globalThis?.sessionStorage));const Mo={private:"p2p/registerP2P",business:"b2c/registerB2C"},Po=({onClose:e,errorCode:t,errorMessage:n})=>{const l=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(vi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(se,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:"Ошибка перевода",description:l,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(se,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Vo=e=>{const t=fn(Po),n=Bo(),l=nn(),a="private"===e?"p2p":"b2c";return i((async({amount:i})=>{const r=await(async(e,t)=>{const n=nn(),l={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},a=`${Xt}/payment/${Mo[e]}`;try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(l)});return e.ok?await e.json():null}catch(e){return null}})(e,i);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:a,url:l.href},l.assign(`${a}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},Ro={amount:1500},zo=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:i="private",...r})=>{const[s,{setValue:d}]=on(!1),m=Vo(i),[{amount:u},{field:p,onSubmit:x}]=gn(Ro,{onSubmit:m});return a((()=>{d(u<=0)}),[u]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:x,children:[o(vo,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:u}),l?.text?o(Pi,{className:"w-full mt-lg",disabled:s,children:l.text}):null]})]})})),Do=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(Z,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),_o="relative h-full",$o={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},jo=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(Oo),r=n?{defaultPadding:"p-6xl pb-m"}:{};return V({...l,renderProps:(n,l,a)=>c("div",{className:Lo(n,{someCardsHighlighted:i}),children:[B(n,l,{className:Ao(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Oo(n)?Do({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Lo=(e,{someCardsHighlighted:t})=>h(_o,t&&(Oo(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ao=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(_o,"min-w-80",$o[l],t&&(Oo(e)?"pt-3xl sm:pt-16":"pt-3xl"),Ki(n),n&&"h-full"),Oo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Eo=Ut((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(kr,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Fo(s?.block?.blocks):[],hasBlur:!0,children:jo({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Fo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Uo="z-10 border border-solid w-full h-full",Wo=h(Uo,"absolute hidden @xl:block border-transparent"),Ho=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Wo,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Wo,"top-6 right-8 bg-green")}),o("div",{className:h(Wo,"top-3 right-4 bg-green-light")}),c("div",{className:h(Uo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ke([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Yo={black:"bg-black",white:"bg-white"},Ko=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(ze,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(se,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:Ke([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(Ae,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(qo)]}):null,a?c(Ae,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),qo=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Yo[e]}`},String(t)),Xo=d((({icon:e,...t})=>{const n=ye(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(se,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Go=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Zo(l):null]})}))),Zo=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Xo,{...e},String(t))))}),Jo=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Qo=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=ye()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...Ne(a),children:i})})),ec=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],tc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>ec.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ye(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},nc(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ke(m,{className:lc(s??!1,a??!1,n),buttonClassName:u})}),r?o(Ae,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),nc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",lc=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),ac=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Qo,{href:a,target:m,className:"h-full",data:Jo(v),children:c(ze,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...at(Ye(i)?o(se,{image:i}):null,f),buttons:d.length?o(tc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(He,{benefits:x}),s?o(je,{__html:s,isDotted:r,itemSize:"list-s"}):null,ic(l,p)]})})}))),ic=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,rc=new xe,sc=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Ae,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Ke(a)}):null]},String(t))},oc=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:u=[],options:p,data:x,...f})=>{const b=r((()=>u.map(sc)),[u]),[y,v]=r((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[N,k]=l(!1);a((()=>rc.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&k(e.isUnfolded)}))),[p?.parent]);const S=i((()=>{rc.fire("fold",{type:"fold",isUnfolded:!N,parent:p?.parent})}),[N,p?.parent]);return c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[o(se,{className:"self-center",image:s}),t?o(w,{className:h("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(Ie,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Ui,{children:[c("div",{children:[y,o(Wi,{isUnfolded:N,children:v})]}),u.length>=m?o(Fi,{className:"mt-m",label:N?"Скрыть":"Подробнее о тарифе",isUnfolded:N,embedded:!0,data:x,onClick:S}):null]}):o("div",{children:y})]})})),cc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,dc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),mc=1e9,hc={sum:{min:1e4,max:mc},period:3},uc=Ut((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=jr(hc,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:pc(e)})}),u=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=gc(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Mr,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(vo,{label:l?.title,min:500,max:mc,...d("sum",{parse:e=>({min:Number(e),max:mc}),format:({min:e})=>String(e)})}),o(ol,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Cr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),pc=e=>jt((e?.paramsSource?.rateRows||[]).filter(cc).flatMap((e=>dc(e.minMonths,e.maxMonths)))),gc=e=>jt(e.flatMap((e=>e||[])).filter(cc).flatMap((e=>dc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],xc=[{key:"10"},{key:"50"},{key:"100"}],fc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Dn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:xc,iconVersion:"black"})]})},bc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",yc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:bc,"aria-label":`Страница ${i}`,children:i},String(t)):null},vc={width:"24",height:"24"},Nc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(Z,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:wc(1===e),...vc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:bc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(yc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:bc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(Z,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:wc(e===n),...vc})})]})},wc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",kc=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Nc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(fc,{itemCount:l,onItemCountChange:a}):null]}),Sc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(se,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",wn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),Cc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Sc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Ol,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Ol,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(bi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Ic=d((({title:e,timestamp:t,publicId:n})=>{const l=ye(),{href:a}=l({href:`${Xt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Wr,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Ae,{size:"text-m","font-weight":"font-light",children:Kt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Tc=`${Xt}/depository`,Bc={startDate:void 0,endDate:void 0,query:""},Mc=Ut((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=gn(Bc),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?Kt(l,!0):"",r=a?Kt(a,!0):"",s=new URLSearchParams(Tc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=qn(Tc+o,$t);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(Cc,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Ae,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(Ic,{...e},String(e.publicId)))):o(Li,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(kc,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Pc=e=>"Image"===e?.contentType&&e?.image?o(se,{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,Vc=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Pc(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(Ie,{version:a?.version,text:a?.text,...a}):null]}))),Rc=new So;function zc(e){return Io(Rc,e)}wo(Rc,new ko(globalThis?.localStorage));const Dc=`${Xt}/region`;function _c(e="Москва"){return zc().location??{name:e}}function $c(e="Москва"){const t=zc(),n=i((async()=>{if(!t.location){const n=await _t(Dc);t.location=n??{name:e}}}),[t,e]);return qn(Dc,n),t}var jc;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(jc||(jc={}));const Lc=new Intl.NumberFormat("ru",{style:"currency",currency:jc.RUB}),Ac=e=>e?Lc.format(e):"",Oc="text-m font-light text-secondary-text ",Ec=`${Oc} text-left`,Fc=`${Oc} pl-5xl text-center`,Uc=`${Oc} pl-5xl text-right`,Wc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Hc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Ec,children:o(Ae,{size:"text-m",children:"Валюта"})}),o("th",{className:Fc,children:o(Ae,{size:"text-m",children:"Купить"})}),o("th",{className:Uc,children:o(Ae,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Yc)})]}))),Yc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(se,{image:{icon:Wc[t]},width:"24",height:"24"}):null,o(Ae,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Ae,{size:"text-h6",children:Ac(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Ae,{size:"text-h6",children:Ac(e?.buyExchangeRate)})})]},t)},Kc={icon:"GpsIcon"},qc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Wr,{...Kc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Xc=(e,t,n)=>{const l=Number(Gc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Gc=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function Zc(e){if(!e)throw new Error("Value should be fulfilled");return e}const Jc=e=>t=>{const[,n]=Zc(e.find((([e])=>e(t))));return n(t)},Qc=e=>Jc(e.map((([e,t])=>[e,()=>t])));Qc.if=e=>new ed(void 0,e);class ed{parent;predicate;unit;get entry(){return[Zc(this.predicate),Zc(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new ed(this,e)}then(e){return new ed(this.parent,this.predicate,e)}else(e){return Jc([...td(this),[()=>!0,e]])}}const td=e=>[...e?.parent?td(e.parent):[],e.entry],nd=e=>Qc([[e=>e.value!==jc.RUB&&e.oppositeValue!==jc.RUB,()=>e.handleConvert(e.value,jc.RUB)],[e=>e.value===jc.RUB&&e.oppositeValue===jc.RUB,()=>e.handleConvert(e.value,jc.USD)],[e=>e.value===jc.RUB&&e.oppositeValue===jc.RUB,()=>e.handleConvert(e.value,jc.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function ld(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Sn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Dn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const ad=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||jc.RUB,selectBuy:n?.[0]?.currency?.currency||jc.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[ld({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:id(r,d,n),value:r.inputSell,setValue:e=>sd(d,n)(e,r.selectSell,r.selectBuy)}),ld({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:rd(r,d,t),value:r.inputBuy,setValue:e=>od(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(Ie,{text:a.text,version:a?.version,...a}):null]})})),id=(e,t,n)=>l=>{t({selectSell:l}),nd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{sd(t,n)(e.inputSell,l,a)}})},rd=(e,t,n)=>l=>{t({selectBuy:l}),nd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>od(t,n)(e.inputBuy,l,a)})},sd=(e,t)=>(n,l,a)=>{e({inputSell:Gc(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Xc(n,i,l===jc.RUB)||"")})},od=(e,t)=>(n,l,a)=>{e({inputBuy:Gc(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Xc(n,i,l===jc.RUB)||"")})},cd=`${Xt}/exchangerates`;const dd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=qn(cd+`?regionCode=${t}`,$t);return n||{}}(_c()),i=md(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:jc.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:jc.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(ze,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[i?o(Hc,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(qc,{address:a?.address})]}),o(ad,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),md=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],hd=d((({className:e="",items:t})=>{const n=ye();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(ud(n))})})),ud=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...Ne(t),children:a||null})},String(l)):null},pd=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:gd(e)}))),gd=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(xd,{className:"w-full border-0 border-b border-solid border-main-divider last:border-b-0",item:e},String(t)))),xd=d((({className:e,item:t})=>{const[n,{toggle:l}]=on(!1);return c(Ui,{className:e,role:"menuitem",children:[c(bi,{className:h("w-full",t.icon?.icon?"py-xs":"py-lg"),embedded:!0,onClick:l,children:[c(Oi,{children:[o(Wr,{className:"shrink-0",...t.icon}),o(Ae,{size:"text-h6",font:"font-normal",color:"text-primary-text",children:t.text})]}),o(Ei,{iconVersion:"color",size:"medium",isUnfolded:n})]}),o(Wi,{className:"flex flex-wrap gap-lg group-last:last:pb-0",isUnfolded:n,children:t.items?o(hd,{items:t.items}):null})]})})),fd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(bd)}):null)),bd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Ae,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(yd)})]},String(t)),yd=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:vd(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),vd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Nd(t)}`,children:o(Ae,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Nd=e=>e.replaceAll(/\D/g,""),wd=d((({className:e="",index:t,text:n,...l})=>{const a=ye(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),kd=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Ae,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(wd,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Sd=d((({className:e="",index:t,...n})=>{const l=ye(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Cd=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o(Ae,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Sd,{index:t,...e},String(t))))}):null]}))),Id=Ut((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(pd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(fd,{items:r}),m?o(Ie,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(tc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(Ri,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(kd,{title:d,links:i}),o(Cd,{links:a,license:u})]})})),Td=Ut((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=m?.find((e=>e.name===s.key))?.href;return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Ln,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(Ri,{className:h("w-full @xl:w-auto"),href:u,target:"_blank",version:n?.version??"primary",data:Jo(i,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})})),Bd={width:"103",height:"21"},Md={"bg-white":"color",transparent:"white"},Pd={"bg-white":"text-primary-main",transparent:"text-white"},Vd=(e,t,n)=>o(se,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Md[e]},className:Pd[e],width:n?.width,height:n?.height}),Rd={"bg-white":"text-primary-text",transparent:"text-white"},zd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...Ne(s),children:[Vd(i,n?.image,Bd),r?l??o("div",{className:"ml-s",children:o(Ae,{font:"font-medium",color:Rd[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),Dd={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},_d=d((({version:e,text:t,mobileText:n,...l})=>{const a=Pe()?n:t;return a?o(Ie,{className:h("py-s px-lg font-light whitespace-nowrap",Dd["transparent"===e?"transparent":"default"]),...l,children:a}):null})),$d=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=R(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(zd,{className:"my-2xs",bgColor:e,logo:u,data:h,showTitle:!1})}):jd(p,r),o(_d,{version:a,...l})]})})),jd=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(Z,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,Ld={"bg-white":"primary",transparent:"transparent"},Ad=Ut((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=Ld[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o($d,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),Od=(e=!1)=>e?{}:{padding:"p-0"},Ed={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Fd=Ut((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=R();return o(g,{className:h("relative flex flex-col",Ed[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${ne(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:V({...c,extraProps:{className:h("w-full",Ki(r)),...Od(l)}})})}),{childrenTypes:[]}),Ud=Ut((e=>o(Fd,{...e})),{childrenTypes:[]}),Wd=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",Xr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(se,{image:l})})})),Hd=["байт","Кб","Мб","Гб","Тб","Пб"],Yd=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...Ne(i),children:[e,t?c(Ae,{size:"text-l",font:"font-light",children:[t," ",Kd(d,m),o(Ae,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Kd=(e,t)=>e||t?o("span",{children:", "}):"",qd=(e,t)=>(n,l)=>{const a=K(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Hd[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Gd(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Yd,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Xd(t),data:n?.data}),o(je,{__html:n?.__html})]},String(l))},Xd=e=>e?o(se,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Gd=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},Zd=d((({href:e,__html:t,target:n,onClose:l})=>c(vi,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:l,children:[t?o(je,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Ri,{href:e,target:n,version:"primary",ariaLabel:"Ссылка на согласие",onClick:l,children:"Я согласен"}),o(bi,{type:"button",version:"secondary",onClick:l,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),Jd=d((({text:e,href:t,target:n,__html:l,icon:a})=>{const{open:r}=fn(Zd),s=i((()=>r({__html:l,href:t,target:n})),[l,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Xd(a),o(Ae,{font:"font-light",children:e})]}):null})),Qd={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},em=Ut((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=R();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Qd[r]),role:"list",children:a.map(tm(d,i))}):null]})})),tm=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?nm(t)(n,l):qd(e,t)(n,l)},nm=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Jd,{...l,icon:e,href:lm(t)?t?.href:t?.attachment?.src}),o(je,{__html:t?.__html})]},String(n)):null},lm=e=>"href"in e,am=Ut((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(se,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(ze,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:Ke(l,{className:"flex-wrap"}),children:[a?o(Ae,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(je,{__html:r,itemSize:"list-m"}):null,o(Ae,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(se,{className:"w-fit",image:d})}):null,i?.src?o(se,{className:"lg:hidden",image:i}):null]})]})})})),im=(e,t)=>e&&"underlined"!==t?"primary":"secondary",rm=(e=[],t={})=>e.filter((({content:e={}})=>_r(t,e))).length,sm=(e,t)=>e===t;const om=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,l])=>e(l,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(sm,((e=sm)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))())),cm=[],dm={},mm={primary:"bg-white/30",secondary:"bg-main-divider"},hm={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},um=d((({count:e,version:t="secondary"})=>{const n=Pe(),l=n?"bg-main-divider":mm[t],a=hm[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Ae,{size:"text-xs",color:a,children:e})})})),pm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(se,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},gm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},xm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},fm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},bm={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},ym=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",gm[l],n?bm[l]:fm[l]),"aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?xm[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[pm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(um,{count:m,version:im(n,l)})}):null]})})})),vm=d((e=>o(e?.item?.href?Nm:wm,{...e}))),Nm=d((e=>{const t=ye(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(ym,{...e,tag:"a",item:a,onClick:l})})),wm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(ym,{item:e,onClick:l,...n})})),km=(e,t,n)=>(l,a)=>o(vm,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Sm=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(km(l,a,t))}))),Cm={categories:[],extraOptions:[],propertyType:[],stage:[]},Im=Ut((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=jr(Cm,{block:a.block,page:a.options?.page}),x=i(((e=Cm)=>p(e)),[]),f=(({hotFilters:e=cm,filtrationState:t=dm,blocks:n=cm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>om(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:rm(n,t.filter),version:im(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Sm,{...f}),o(Mr,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(Cr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Tm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Bm=d((({children:e})=>Tm?e:null)),Mm="/icons/MapMarkerClusterIcon.svg",Pm="/icons/MapMarkerClusterYellowIcon.svg";function Vm({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=Rm("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=Rm("workplaces",e,a),r=zm(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=zm(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=zm(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Rm=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Mm:Pm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),zm=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Mm:Pm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Dm={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},_m={...Dm,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},$m=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(_m).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(Z,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),jm=e=>globalThis[e];function Lm(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=jm(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(jm(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(jm(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const Am={...Dm,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Om=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Am).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(Z,{name:n,width:"20",height:"16"})})})),Em=[55.753995,37.614069],Fm=d((({points:e,className:t="",zoom:n=5,isLoad:l,selectedAddress:i})=>{const r=s(null),d=s(null),m=Lm("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${D.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{r.current?Vm({yandexMaps:m,map:r.current,points:e,isLoad:l}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Um(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Vm({yandexMaps:m,map:r.current,points:e,isLoad:l})})),r.current&&i&&m?.geocode(i).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,l,i]),!m)return null;const u="z-10";return c("div",{ref:d,className:h("relative","w-full",t),children:[l?o(Mi,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",u),children:[o(Om,{yandexMaps:r}),o(Om,{yandexMaps:r,direction:"out"})]}),$m(r,m,h("right-2 top-80",u))]})})),Um=e=>{const t=[Hm(Wm(e,0)),Hm(Wm(e,1))];return t.every((e=>e))?t:Em},Wm=(e,t)=>e.map((e=>e.coords?.[t])),Hm=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Ym={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Km={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},qm={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Xm="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Gm=d((({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(na,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]],[m,{toggle:h}]=on(!1);return o("div",{children:e?.length?o("div",{children:c(Ui,{children:[c("div",{children:[o("div",{className:Xm,children:s}),o(Wi,{className:Xm,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[l?o(Fi,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,short:!0,onClick:h}):null,c(bi,{embedded:!0,onClick:n,children:[o(Oi,{children:"Очистить фильтр"}),o(Z,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),Zm=(e,t,n)=>{const l=im("all"===t),a=im("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(bi,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(bi,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Jm=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(je,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(se,{image:e.image}):null,e?.text?o(Ae,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Qm=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Ae,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),eh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>qm[t](e)))))},th=()=>{},nh=()=>{},lh=e=>"all"===e?"block":"hidden",ah=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=nh,renderRemoteWorkplaceCard:s=nh,getBalloon:d=nh,getBalloonRemoteWorkplaces:m=nh,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=gn(Ym),{filteredItems:y,points:v,filteredRemoteWorkplaces:N,lengthItems:w}=(({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:l=th,getBalloonRemoteWorkplaces:a=th})=>{const[i,s,o,c]=r((()=>{const i=eh(e,n),r=eh(t,n),s=[...i.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[i,s,r,i.length+r?.length]}),[e,t,n,l,a]);return{filteredItems:i,points:s,filteredRemoteWorkplaces:o,lengthItems:c}})({data:t,remoteWorkplaces:a,filtrationState:x,getBalloon:d,getBalloonRemoteWorkplaces:m}),[k,S]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Qm(p,w),u?Jm(u):null,g&&Zm(t,k,S),o("div",{className:h("pb-3xl",lh(k)),children:o(Gm,{filters:ih([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:Km})})]}),o("div",{className:"h-[600px]",children:o(Bm,{children:o(Fm,{points:v,isLoad:n,className:"h-full"})})})]}),c(Bm,{children:[y.map(i),N.map(s)]})]})})),ih=e=>Object.keys(Ym).filter((t=>e.filter((e=>qm[t](e))).length)),rh=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",sh={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"}},oh=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",sh[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(se,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Ae,{size:"text-m",color:sh[n].text,children:t})]}))),ch=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:dh({textItems:i,subText:t,children:n,isPhone:l,...a})})),dh=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Ae,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||mh(n,s),a?o(Ae,{color:l,size:"text-m",children:a}):null]}),mh=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Ae,{size:"text-l",children:t?o("a",{href:`tel:${hh(e)}`,children:e.trim()}):e.trim()},String(n)))),hh=e=>e.replace(/\D/g,""),uh=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),ph=d((({children:e})=>{const[t,{toggle:n}]=on(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Ui,{className:"block sm:hidden",children:[o(Wi,{isUnfolded:t,children:e}),o(Fi,{className:"my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),gh=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:rh(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{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(Ae,{size:"text-h4",children:rh(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Z,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(oh,{color:"green",children:rh(s)})})]}),o(ph,{children:o(uh,{className:"flex-wrap",children:m?.map(((e,t)=>o(ch,{...e},String(t))))})})]},String(d))},xh=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${rh(t)} №${n}`,body:e.toUpperCase()}),fh=[];const bh=async e=>{const t=await _t(e,{method:"GET"});return Array.isArray(t)?t:fh},yh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},vh={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Nh=d((({descriptionData:e,className:t})=>{const n=_c(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=qn(`${Xt}/atms?regionCode=${e}`,bh);return{data:t||fh,isLoad:!t&&!n}}(l);return o(ah,{className:t,filterItems:wh,data:a,isLoad:i,initFilterState:yh,renderCard:gh,getBalloon:xh,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),wh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>vh[t](e))),n=!l.length||l.some((t=>vh[t](e)));return t&&n}))},kh=e=>{const t=Ch(e);return o(ch,{label:"Режим работы",value:t,className:"max-w-none"})},Sh=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Ch=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Sh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Sh({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},Ih=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Th=e=>Ih.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Bh=e=>{if(!e)return null;const t=Mh(e);return c(uh,{className:"border-none",children:[o(ch,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Ph)})}),o(ch,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]})},Mh=e=>{const t=Ih.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},Ph=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Ae,{size:"text-xs",children:e})},String(n)),Vh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(ch,{label:"Валюта",value:e.currency}):null,t?o(ch,{label:"Купить",value:String(t)}):null,n?o(ch,{label:"Продать",value:String(n)}):null]},String(l)),Rh=(new Date).getDay(),zh=e=>{const[t]=e?.slice(Rh-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(oh,{color:"green",children:a}):null,n&&i?o(oh,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(oh,{color:"red",children:"Выходной"})},Dh=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",_h=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(ch,{label:e,value:t&&n?n:"",subText:Dh({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),$h=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,jh=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Lh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Ah=(e,t)=>{if(!e.workSchedule)return null;const n=Th(e.workSchedule);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Ae,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Z,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e.address})]}):null]}),zh(n)]}),o(ph,{children:Oh(e)})]},String(t))},Oh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Th(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(uh,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(ch,{label:"Факс",value:t,isPhone:!0}),o(ch,{label:"Телефон филиала",value:e,isPhone:!0}),o(ch,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(ch,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(ch,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(ch,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(uh,{children:o(ch,{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(_h)})})}):c(uh,{children:[o(ch,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Ph)})}),kh(d)]}),r?.businessScheduleVisibleTag?Bh(r?.businessScheduleDescription):null,s?.currencies?.length?o(uh,{className:"flex-wrap",children:s?.currencies?.map(Vh)}):null]})},Eh=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Th(e),n=e?Ch(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?$h(n):Lh(n,l):jh(n):""})(n)}`;return{header:l,body:i}},Fh=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Ae,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(Z,{name:"GeolocationIcon",width:"24",height:"24"}),o(Ae,{size:"text-l",children:e})]}):null]})}),o(ph,{children:Uh(t)})]},String(n)):null,Uh=e=>c("div",{children:[c(uh,{className:"flex",children:[o(ch,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(ch,{label:"Операции для физических лиц",children:o(Ae,{children:"Оформление и обслуживание банковских карт"})}),o(ch,{label:"Операции для физических лиц",children:o(Ae,{children:"Инвестиционное и накопительное страхование"})}),o(ch,{label:"Операции для физических лиц",children:o(Ae,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(ch,{label:"Режим работы",className:"max-w-none",children:o(Ae,{children:e})})]}),Wh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Hh={branches:[],remoteWorkplaces:[]};const Yh=async e=>await _t(e,{method:"GET"})||Hh,Kh=d((({className:e})=>{const t=_c(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=qn(`${Xt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Yh);return{data:t||Hh,isLoad:!t&&!n}}(n);return o(ah,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:Ah,renderRemoteWorkplaceCard:Fh,getBalloon:Eh,getBalloonRemoteWorkplaces:Wh,title:`Офисы филиала ${t?.name}`})})),qh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Kh,{}):o(Nh,{descriptionData:e})})})),Xh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),Gh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...l,children:o(kr,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(lt,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),Zh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ye(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(se,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Jh({__html:i,richVersion:r}):null,Qh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Qh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Qh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ke([l]):null]})]}))),Jh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(je,{...e,itemSize:"list-s"})}),Qh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(Z,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Ae,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Ae,{size:"text-xl",color:l,children:t})]})]}):null,eu=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(je,{__html:t,richVersion:n})})})),tu=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",nu=Ut((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:l="default",label:a,version:i,role:r,...s})=>{const d=Pe(),[m,{toggle:u}]=on(t),p=o(Wi,{className:h("gap-lg",tu(d)),isUnfolded:m,children:V({...s,extraProps:{className:"w-full",padding:"p-0"}})}),x="accordion"===l,f=o(Fi,{className:h(x?"text-h6 my-lg":"text-h4"),label:a,isUnfolded:m,embedded:x,onClick:u});return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:r,...s,children:c(Ui,{children:[n?f:p,n?p:f]})})}),{childrenTypes:{exclude:["RollupItem"]}}),lu=d((({name:e,text:t,value:n,checked:l,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:h(wn.split(" ").filter((e=>"rounded"!==e)),ea,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Ae,{color:"text-primary-text",children:t}):null]})}))),au=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(lu,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(lu,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),iu=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Dn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),ru=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],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(iu,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(iu,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),su=["От 1 дня","До 365 дней"],ou=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Ae,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(ol,{min:1,max:365,value:e,items:su,onChange:t})]}))),cu=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],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(iu,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(iu,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),du=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,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(ru,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:mu(m)}),o(ou,{days:a,setDays:e=>m({days:e})}),o(cu,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:hu(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Ae,{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(au,{}),o(bi,{className:"order-6",version:"primary",onClick:h,children:"Офисы на карте"})]})]}))),mu=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},hu=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},uu=d((({days:e,tariffs:t=[]})=>{const n=gu(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[pu("Аренда за",e),pu("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(Z,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),pu=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Ae,{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})]}),gu=(e,t)=>{const n=xu(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},xu=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},fu=(e,t)=>e.find((e=>e.branchCode===t)),bu=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=fu(l,n.selectedBranch),d=yu(s?.safeBoxCaseVolumes),m=vu(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=Nu(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(du,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(uu,{days:n.days,tariffs:h})]})})),yu=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],vu=(e,t)=>e?.find((e=>e.volume===t)),Nu=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,wu=`${Xt}/safeboxes`,ku=[];const Su=async e=>await _t(e,{method:"GET"})||ku,Cu=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Ra(),p=Iu(m.selectedRegion,u),x=function(e){const{data:t}=qn(e?`${wu}?regionCode=${e}`:null,Su);return t||ku}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=fu(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(bu,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Fm,{points:b,className:"h-[640px]"}):null]})})),Iu=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Tu={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"},Bu=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Mu(e,n)(l,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Pu(l),i?.text?o(Ie,{className:"box-border py-s w-full mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},Mu=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=Vu(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Ru({step:n,iconVersion:a,i:l,stepVersion:t})})})},Pu=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",Tu.description),children:e.description}):null,o(je,{__html:e.__html})]}),Vu=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Ru=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Ye(e?.icon)?o(se,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===l?Tu.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},zu=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(Bu(d,r,i))}):null,Ke(a,{isVertical:!0})]})})),Du=d((({isActive:e,item:t,onClick:n})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(Z,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),_u=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{onClick:a,className:h("relative bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(yi,{className:"absolute top-1.5 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})));function $u(e,t,n){a((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const l=n[t];l&&l(e)}}))),[e,t,...Object.values(n)])}const ju=()=>{const[e,{push:t,pop:n,clear:a}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}();return $u(fe.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},Lu=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const Au=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(Ae,{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(Ou,{...e},String(t))))})]}):null,Ou=d((({icon:e,...t})=>{const n=ye(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(se,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Ae,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Eu=(e,t)=>n=>n.name?o(Qo,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Jo(e,n.name),children:o(Ae,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Fu=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(wn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Uu=d((({defaultLocation:e})=>{const t=_c(e),n=ye(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Qo,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Wu=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=$c(t?.default),[s,d]=l(""),m=Ra(),h=r((()=>Yu(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),u=r((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Hu)),[h]),p=i((e=>{a.location=e,n?.()}),[a,n]);return c(vi,{className:"pb-20",head:c("div",{children:[o(Ae,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Uu,{defaultLocation:t?.default}),o(Fu,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:h.filter((({name:e})=>e&&Lu(e.toLowerCase())(s.toLowerCase())>=.8)).map(Eu(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Ae,{size:"text-h6",children:e})}),t.map(Eu(x,g))]},e)))}),Au(e)]});var g,x})),Hu=e=>e.name?.charAt(0)??"",Yu=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Ku=d((({menuRef:e,menuItem:t,locationDialogProps:n,onClose:l})=>{const i=fn(Wu,n),{name:r}=_c(),s=e?.current?.getBoundingClientRect(),c=te(ee.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open({}),"reload"===e.data.type&&l?.(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[l]),o(_u,{head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),onClick:e=>e.stopPropagation(),onClose:l,children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),qu="burgerMenuDialog",Xu=({menuRef:e,centralMenuItem:t,locationDialogProps:n,onClose:l=Nn})=>{const{open:a}=fn(Ku),[r]=ju(),s=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(qu,r),o=i((()=>a({menuRef:e,locationDialogProps:n,menuItem:t,onClose:l},{id:qu})),[e,n,t,l]);return[s,{toggle:s?l:o}]},Gu=[],Zu=Ut((({sticky:e,...t})=>{const{menuItems:n=Gu}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=l(-1),[x,f]=l(""),{closeAll:b}=be(),y=i((()=>{p(-1),f(""),b()}),[b]),v=yn(y),N=s(null),[k,{toggle:S}]=Xu({menuRef:N,centralMenuItem:a,locationDialogProps:t.header,onClose:y}),C=(({menuRef:e,dialogRef:t,leftItems:n,rightItems:l,onClose:a})=>{const{open:r,close:s}=be(),c=i((()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=`${e?.contentWindow?.document.body.offsetHeight}px`}),[]);return i(((i,d)=>{const m="left"===d?n:l,h=e?.current?.getBoundingClientRect();r({id:"left"===d?n[i].title:l[i].title,dialog:o(_u,{className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:m[i].description||m[i].title})}),onClick:e=>e.stopPropagation(),onClose:()=>{s(),a?.()},children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",src:m[i]?.src,width:h?.width??0,onLoad:c})})})})}),[c,n,l,a])})({menuRef:N,dialogRef:v,leftItems:m,rightItems:h,onClose:y}),I=i((e=>{e.stopPropagation(),y(),S()}),[y,S]),T=i(((e,t)=>{f(t),p(e),b(),C(e,t)}),[b,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Ju(T,"left",{activeIndex:u,currentItemPosition:x})),o(Du,{item:a,isActive:k,onClick:e=>I(e)}),h.map(Ju(T,"right",{activeIndex:u,currentItemPosition:x}))]})})})),Ju=(e,t,n)=>(l,a,i)=>o(Du,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Qu="hidden sm:flex absolute z-40",ep={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},tp=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=hr({itemCount:t?.length||0});return a((()=>np(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Qi,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:ep[i].item,gap:ep[i].gap,children:t.map(km(n,l,i))}),s.canScrollLeft?o(fr,{className:h("left-6",Qu,ep[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(br,{className:h("right-6",Qu,ep[i].buttonTop),onClick:s.scrollRight}):null]})})),np=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},lp={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},ap=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(lp[t].wrapper,e),children:o(tp,{className:lp[t].component,tabsType:t,...n})}):null,ip=Ut((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=rp(n??{}),p=R(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(cp(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=op(f[y],y),S=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[ap({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:sp(t,f),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>P(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(op)?.filter(Boolean)||[]}),rp=({__id:e,anchor:t})=>t??e??"tabs",sp=(e,t)=>t?.length?t:e,op=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",cp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),dp={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},mp=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:dp[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),hp=d((({className:e="",isOpen:t,onClick:n})=>o(Fi,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),up={Buttons:({buttons:e})=>Ke(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(se,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(je,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Ae,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Ae,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(hp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},pp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return gp({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),gp=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in up))return null;return o(up[n],{...t,...l})},xp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,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(pp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),fp=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),bp=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Ae,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,yp=d((({rows:e})=>{return o(Qi,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=h("flex duration-1000 text-center",0!==n?"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(Ae,{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(-${fp(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Ae,{size:"text-xl",children:e.data}):null,e?.cols?bp(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),vp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Ae,{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(yp,{rows:t.rowsData})})})]},l)}))}))),Np=(e=!1)=>""+(e?"text-white":"text-secondary-text"),wp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Ae,{size:"text-xl",font:"font-light",color:Np(t===n),children:e||t+1})},e)))}):null,t?o(Ie,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(Z,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),kp=Ut((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(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(wp,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(vp,{activeTabIndex:r,items:m}),o(hp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Ae,{size:"text-h6",children:"Данных нет"}),o(hp,{onClick:n,isOpen:!0})]})})),Sp=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(kp,{...t,onClick:n})}):null]}))),Cp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(Sp,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(se,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Ae,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(mp,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(xp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),Ip=({className:e,btnClass:t,canDec:n,canInc:l,dec:a,inc:i})=>n||l?c("div",{children:[n?o(fr,{className:h("absolute z-40",t[0],e),onClick:a}):null,l?o(br,{className:h("absolute z-40",t[1],e),onClick:i}):null]}):null,Tp=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Ip({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Bp=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(Cp,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]],[N,{toggle:w}]=on(!1);return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?c(Ui,{children:[c(Tp,{controls:f,children:[y,o(Wi,{isUnfolded:N,children:v})]}),o(Fi,{className:"text-h4",isUnfolded:N,onClick:w})]}):o(Tp,{controls:f,children:b})})]})})),Mp=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?Pp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Ae,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Vp(n):null,a?o(je,{richVersion:i,__html:a}):null]})]}))),Pp=()=>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"}),Vp=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Rp=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Ae,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Ae,{size:"text-h2",children:n})}):null]}))),zp=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Rp,{prefix:t,unit:n,suffix:l})})})),Dp={AdTile:Ht,ApplicationForm:ji,BankAccountFiltration:Or,BenefitsBlock:Hr,BonusBenefitsBlock:qr,ButtonsBlock:Gr,CalculatorBonus:ms,CalculatorBusinessDeposit:Bs,CalculatorCredit:Us,CalculatorDeposit:so,CalculatorRefinancing:xo,CardTransfer:zo,Carousel:Eo,CarouselCard:Ho,CarouselCatalogCard:Ko,CarouselLinks:Go,CarouselRecommendationCard:ac,CarouselTariffsCard:oc,DepositFiltration:uc,Depository:Mc,ErrorBlock:Vc,ExchangeRateTile:dd,Footer:Id,GrantSupport:Td,Header:Ad,Headline:C,HorizontalLayout:Ud,ImgBlock:Wd,LinkDocs:em,MobileAppTile:am,MortgageFiltration:Im,OfficesAtmsMap:qh,Placeholder:Xh,ProductBlock:Wt,ProductGallery:Gh,RepresentativeOfficeInfo:Zh,RichTextBlock:eu,RollupItem:nu,SafeDepositRental:Cu,StepsBlock:zu,StickyBottomMenu:Zu,TabsLayout:ip,TariffsTable:Bp,TextBlock:Mp,UnitBlock:zp,VerticalLayout:Fd},_p=pe((()=>{a((()=>{an()}),[]);const e=sn();bn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");tn({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const $p="cookie",jp=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=on();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem($p)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem($p,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(je,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(yi,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null}));function Lp(e){const t=i((({key:t})=>{"Escape"===t&&e()}),[e]);bn(globalThis.document,"keydown",t)}const Ap=d((()=>{const[e,{close:t}]=ju(),n=Boolean(e.length);return Lp(t),a((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",children:e.map((({dialog:t,id:n},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==e.length-1}),children:t},String(n||l))))}):null})),Op=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);return $u(fe.observable,"popup",{open:t,close:n}),Lp(n),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",title:"Всплывающее окно",children:e.popup}):null})),Ep="header",Fp="footer",Up="sticky-footer",Wp={},Hp=d((({className:e,data:t=Wp,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=Et(s,r);_p(),$c();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.[Ep]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.[Ep],{...m,slotName:Ep})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[V({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.[Fp],{...m,slotName:Fp})]})]}),a?.[Up]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.[Up],{...m,slotName:Up})}):null,o(Ap,{}),o(Op,{}),o(jp,{__html:d?.cookieContent?.__html})]})}));Object.assign(Hp,{childrenTypes:[],slots:()=>[Ep,Fp,Up]});e.Blocks=Dp,e.ContentPage=Hp,e.handlerDecorator=pe,e.joinList=Tr,e.locationNavigator=nn,e.packageVersion="0.14.769",e.projectSettings=D,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=U,e.useRouter=R,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).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:h("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),S={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"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=S[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(k,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),I=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),T=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=I,blocksRegistry:r={},ancestors:s=T}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const M=[],P=(e,{key:t,ancestors:n=M,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||M,[r.parent,l]]:n},a)))};function V({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?P(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function R(){return R._impl()}R._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),R.setup=e=>{R._impl=e};const z=["CDN","BASE_PATH"],D=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return z.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),_=e=>Boolean(e?.includes(":")),$=(e,t)=>Boolean(e&&!_(e)&&(!t||"_self"===t)),j=e=>Boolean(e?.startsWith("#")),L=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),A=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var O=Object.freeze({__proto__:null,isURL:_,isLocalURL:$,isHash:j,withoutQuery:e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:L,hasPrefix:A});const E="/api/",F=`${E}v1/storage`,U=[D.CDN,E],W=e=>(t,n)=>{if(H(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return L(A(t)(n)?"":n,l?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},H=e=>!e||_(e)||j(e)||U.some(A(e)),Y={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},K={small:"16",medium:"24",large:"48",xl:"78"},q=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",size:r,width:s=r&&K[r],height:d=s})=>{const m=R(),u="normal"===i?`${n}.svg`:`sprites.svg#${n}`,p=W(m)(L(D.CDN,"/icons/",u));return"normal"===i?o("img",{className:e,style:X(e,d),src:p,alt:l,title:a,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:h(Y[i],{"w-full h-full":!s,invert:"white"===i},t),width:s,height:d,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:p,xlinkHref:p})]})})})),X=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function J(e=""){try{return new URL(e).pathname}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":J(Z.SITE_URL);return t&&!_(t)?W(e)(t,n):t},ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:n=""})=>{const l=R();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:Q(l)(e),type:le(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ne({...t,src:Q(l)(t.src)},n):null]})})),ne=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),le=e=>e?`image/${String(e)}`:void 0,ae=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(q,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(te,{className:e,imageClassName:n,image:t}):null)),ie={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","":""},re="bg-main-divider text-main-disabled",se={primary:re,secondary:re,white:re,link:"",transparent:"",gray:re,"":""},oe="text-center font-sans select-none",ce={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},de=({className:e,rounded:t,version:n})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),me=e=>me._impl(e);function he(e,t){const n=s({});return r((()=>new Proxy({},{get:(l,a)=>(n.current||={},n.current[a]||=n=>e.fire(t,{...n??{},type:a}),n.current[a])})),[e,t])}me._impl=e=>e,me.setup=e=>{me._impl=e};class ue{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const pe=new ue,ge=()=>he(pe.emitter,"dialog");function xe(){const e=R(),{closeAll:t}=ge();return n=>{const l=W(e)(n.href);return{...n,href:l,"aria-label":n.text,onClick:me((a=>{n.onClick?.(a);const i=J(Z.SITE_URL);fe(l,n.target,i)&&(t(),a?.preventDefault(),e.push(((e,t="")=>e?.replace(t,"")||"/")(l,i)))}))}}}const fe=(e,t,n)=>$(e,t)&&!Z.SUB_PORTALS?.split(",")?.some(A(e))&&A(e)(n||"/"),be=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},ye=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=Ne(e)&&"hidden lg:block";return c("div",{className:h(ve(e),"flex gap-xs"),children:[l?o("div",{className:h(r,ce[i]),children:l}):null,Ne(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(r,ce[i]),children:a}):null]})})),ve=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",Ne(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},Ne=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),we=({className:e,rounded:t,version:n})=>["inline-block",oe,n?se[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ke=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[e,t]))({method:n,href:l}),s=xe()({onClick:r,href:l,...a}),c=t??o(ye,{...s});return o(e?Ce:Se,{...s,children:c})})),Se=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:de({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...be(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:we({className:e,rounded:l,version:n}),children:a})));function Ie({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(ke,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Te=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Be={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Me=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&Be[n],t),children:e}):null,Pe=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Te(),v=R(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ie({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Me(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Re(V({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Ve(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Ve=e=>h(e?"row-span-2":"@xl:row-span-2"),Re=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:l=!0,children:a})=>e||a?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:a})}):null)),_e=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,$e=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),je=(e,t)=>e?o($e,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>["label"in e?je(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:_e(e.description,t)},String(t)):null,"__html"in e?o(De,{...e},`rte-${t}`):null],Ae=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?ze(n.icon,t):null,o("div",{children:Le(n)})]}))),Oe=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Ae,{benefitsVersion:t,...e},String(n))))}):null)),Ee=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?Ee:Oe,{...t}))),Ue=e=>Boolean(e?.src||e?.icon),We=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(He(n))}):null,He=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Ye(a,r),d=Ye(i,r);return l||a?.icon?o(ke,{className:h("basis-full @lg:basis-auto",e),appendLeft:Ke({...a,iconVersion:c}),appendRight:Ke({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Ye=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Ke=e=>Ue(e)&&o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}),qe=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),Xe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Ge)}):null)),Ge=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o($e,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[qe(2)(t)," ",n||"₽"]}):null]},String(l)),Ze=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Je)}):null)),Je=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o($e,{size:"text-m",font:"font-light",children:e})},String(t)),Qe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},et=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:I,...T})=>{const B=y?.src?o(ae,{image:y}):null,M=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Pe,{className:e,padding:t,defaultPadding:n,...g?{title:M}:{insetTitle:M},...tt(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:We(b),backwardButton:S,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,u?o(De,{richVersion:p,__html:u,isDotted:m,itemSize:Qe[i]}):null,I,x?.length?o(Xe,{priceList:x}):null,nt(f)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Ze,{tags:e}):null;class lt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof lt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const at=()=>!0,it=(e,t)=>(...n)=>e(...n)&&t(...n),rt=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const st=e=>Boolean(e&&Array.isArray(e)),ot=e=>Boolean(e&&"object"==typeof e&&!st(e)),ct=e=>e;function dt(e){return e instanceof lt?e._:e}class mt extends lt{from(e){return this.of(e.map(((e=ct)=>([,t])=>e(t))(dt)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(st(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,l)=>l===e?t:this._[l])):Array.from({length:Number(e)+1},((n,l)=>l===e?t:void 0)))}}class ht extends lt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class ut extends lt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,dt(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class pt extends lt{proto=rt([e=>st(this._)||"number"==typeof e,()=>mt.prototype],[e=>ot(this._)||"string"==typeof e,()=>ut.prototype],[at,()=>ht.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const gt=e=>e instanceof lt?e:new pt(e),xt=e=>{const t=(t,...n)=>dt(e(gt(t),...n));return t.fn=e,t},ft=[],bt=e=>e instanceof Function?e:t=>e===t,yt=e=>(t,n,l=ft)=>gt(t).entries().reduce(((t,[n,a])=>yt(e)(a,t,l.concat(n))),e(n,[l,gt(t)])),vt=xt(((e,[t,n])=>{const[l,...a]=t;return e.set(l,a.length?vt(e.get(l),[a,n]):n)})),Nt=xt(((e,t)=>t.reduce(vt.fn,e))),wt=e=>yt(((e,[t,n])=>kt(n)?[...e,[t,dt(n)]]:e))(e,[]),kt=e=>0===e.size();xt(((e,t=ft)=>t.reduce(((e,t)=>e.get(t)),e)));const St=xt(((e,[t,...n])=>n.length?e.set(t,St(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(It=["$ref"]).map(((e,t)=>n=>bt(e)(n[t+n.length-It.length]))).reduceRight(it,at);var It;const Tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(Bt,e),Bt=rt([st,(e,t)=>e[parseInt(t,10)]],[ot,(e,t)=>e[t]],[at,ct]),Mt=(e,t)=>((e,t={})=>n=>Nt(t,wt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(l=e,l.slice(0,-1)),Tt(t(n),n)]:[e,n];var l}))(e),Pt=e=>wt(e).filter(((e=ct)=>([t])=>e(t))(Ct)),Vt=e=>{return t=Pt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Rt(e,t){try{return e?await zt(e,t):null}catch(e){console.error(e)}return null}const zt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],_t={},$t=["/portal-resources"],jt=(e,t)=>Mt(e,(e=>t?.[e])),Lt=(e,t)=>{const n=Vt(e),[i,r]=l({});return a((()=>{At(n).then(r)}),[n.join()]),n.length?jt(e,{...t,...i}):e},At=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!$t.some((t=>e.startsWith(t))))).map((async e=>[e,_t[e]||=await zt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),l={...t,...n},a=Object.entries(n).flatMap((([,e])=>Vt(e)));return a.length?At(a,l):l}return t};function Ot(e,t={}){const n=d((t=>{const n=Lt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Et=Ot((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(et,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ft=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>Ut(0,t?.length)),[t]),l=t?.[n];return l?o(Et,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),Ut=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Wt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},Ht=e=>e?.replace(/[^+\d]/g,""),Yt="/api/v1";const Kt=e=>e?{phone:Ht(e)}:{},qt=(e,t="birthday")=>e?{[t]:Wt(e)}:{},Xt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Zt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ht(e)}:{},Jt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e??[])t[l??""]?.(n,a)};function Qt(){return Qt._impl()}Qt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Qt.setup=e=>{Qt._impl=e};const en="rshb-query-params";function tn(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(en)||"";return e&&globalThis.sessionStorage?.setItem(en,e),e}const nn=e=>{const t=e.target?.closest("a"),n=Qt();if(_(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=tn();if(!_(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;l&&n.assign(l,t?.target)}};function ln(){return ln._impl()}function an(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}ln._impl=()=>({forwardQuery:nn}),ln.setup=e=>{ln._impl=e};const rn=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],sn=e=>!e?.length,on=e=>t=>n=>e(n)?[]:[t],cn={},dn=[];const mn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function hn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,h]=function(e,t,n){const[r,s]=l(e),o=i((e=>s((l=>{const a=e instanceof Function?e(l):e,i=t?t(a):a,r=mn(a,i)?a:i;return!mn(l,r)&&n?.(r),r}))),[t,n]);return a((()=>{t&&s(t)}),[t]),[r,o]}(e,o,c),[u,{setTrue:p,setFalse:g}]=an(!1),x=s({}),[f,{isValid:b,errors:y}]=function(e,t){const n=r((()=>t?.(e)??cn),[t,e]),l=r((()=>rn(n)(e)??dn),[n,e]),a=sn(l);return[n,{isValid:a,errors:l}]}(m,n),v=i(((e,t={})=>{const{parse:n,format:l,onChange:a}=t,i=m[e],r=u||x.current?.[String(e)],s=t?.validator??f[e],o=r&&s?s(i):[];return{value:l?l(i):i,isDirty:r,errors:s&&o,error:o[0],onChange:t=>{x.current||={},x.current[String(e)]=!0;const l=n?n(t):t;a?.(l),h((t=>({...t,[e]:l})))}}}),[m,u,f,h]),N=i((e=>{x.current=e,h(e)}),[h]),w=i((()=>{x.current={},g(),h(e)}),[e,h]),k=i((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:k}]}const un=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})}));function pn(e,t={}){const{open:n,close:l,...a}=ge();return{open:i(((a,i={})=>n({dialog:o(e,{...t,...a,onClose:()=>{l(),a.onClose?.()}}),...i})),[e,n,l]),close:l,...a}}function gn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function xn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return gn(globalThis.document,"click",n),t}const fn=({label:e,errors:t})=>e&&t?`${e}*`:e,bn=()=>{},yn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",vn=e=>e?o($e,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Nn=d((({key:e,className:t,id:n,name:l,type:r="text",label:d,placeholder:m,value:u="",valid:p=!0,pattern:g,autoFocus:x=!1,isTextarea:f=!1,disabled:b=!1,children:y,onChange:v,onFocus:N,onBlur:w})=>{const k=s(null),S=i((e=>{const t=(e.target?.value??"").trimStart();v&&v(t)}),[v]);a((()=>{x&&k.current?.focus()}),[x,k]);const C=y?"pr-3xl":"",I=(e=>e?yn:"border-error")(p),T=d??l??n;return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[vn(d),f?o("textarea",{className:h("block resize-y min-h-24",wn,I),id:h("textarea",n),value:u,name:l||n,placeholder:m,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e):o("input",{ref:k,className:h("h-14",wn,C,I),id:n,type:r,value:u,name:l||n,placeholder:m,pattern:g,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e)]}),y]})})),wn="w-full border rounded-md text-primary-text outline-none p-m",kn=e=>o("div",{className:"h-6",children:e?o($e,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Sn=d((({className:e,label:t,value:n="",placeholder:l,error:r,errors:s,onChange:d=bn,onBlur:m,isTextarea:u,type:p,isInteger:g=!1,maxLength:x,disabled:f=!1})=>{const[b,{setFalse:y,setTrue:v}]=an(),N=xn(y),w=i((e=>{!b&&v(),x?e.length<=x&&d(e):d(e)}),[b,d]);return a((()=>{g&&n&&d(Cn(n))}),[n]),c("div",{className:h("shrink-0 w-full",e),ref:N,onBlur:y,onFocus:v,children:[o("div",{children:o(Nn,{disabled:f,type:p||"text","aria-label":t,label:fn({label:t,errors:s}),valid:Boolean(!r),value:n,onChange:w,onBlur:m,isTextarea:u,placeholder:In(l,s,t)})}),kn(r)]})})),Cn=(e="")=>e.replace(/[^\d]+/g,""),In=(e,t,n)=>t&&!n?`${e}*`:e,Tn=e=>e?.text||e?.key||"",Bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Mn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:Bn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Tn(e)}),o(q,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function Pn({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=he(pe.emitter,"popup"),h=i((()=>{m.close(),c&&c()}),[c]),u=i((e=>{h(),r&&r(e)}),[h,r]),p=s(null),g=xn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.open({popup:o(Mn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,u]),p}const Vn=d((({className:e,label:t,options:n=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,disabled:u=!1,iconVersion:p="black",onChange:g})=>{const[x,{setFalse:f,setTrue:b}]=an(),[y,v]=l(""),N=Dn(u,n.length),w=x&&!N,k=i((()=>{N||b()}),[N]),S=i((()=>{v(""),f()}),[]),C=Pn({isOpen:x,options:n,value:a,query:y,onChange:g,onClose:S,iconVersion:p});return c("div",{className:h("space-y-xs",e),children:[vn(t),c("div",{className:h("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",zn(s,r,N)),onClick:w?S:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Tn(a)||d}),Rn(w,p)]}),m&&w?o("div",{className:h("absolute top-0 w-full z-20"),children:o(Nn,{type:"text",value:y,autoFocus:!0,disabled:N,onChange:v})}):null]})]})})),Rn=(e,t)=>o(q,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),zn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Dn=(e,t)=>e||0===t,_n=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Vn,{...a,valid:!n,label:fn({label:t,errors:l})}),kn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(_n,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Ln=(e="")=>Boolean("trade"===e||"all"===e),An=e=>null!=e,On=new Map,En=(e,t=On)=>n=>{const l=Un(n),a=t.get(l);if(l&&An(a))return a;const i=e(...n);return l&&An(i)&&t.set(l,Promise.resolve(i)),i},Fn=e=>Boolean(e?.every((e=>Array.isArray(e)?Fn(e):!e||"string"==typeof e))),Un=e=>Fn(e)?e.toString():"",Wn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Hn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Yn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(An))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await En(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=n&&Wn(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Yn(e){return Array.isArray(e)?e:e instanceof Function?Yn(e()):[e]}const Kn=`${Yt}/branches`,qn=[];const Xn=async e=>await Rt(e,{method:"GET"})||qn;function Gn(e=!1){const{data:t}=Hn(`${Yt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,zt);return Array.isArray(t)?t:[]}const Zn=(e="")=>"ULTRASERVICE"===e,Jn=d((({field:e,input:t,params:n})=>{const l=Zn(n?.typeForm),i=e("region"),r=i?.value?.key,s=i?.value?.text,c=l?Gn(l)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Hn(e?`${Kn}?regionCode=${e}`:null,Xn);return t||qn}(r)?.filter((e=>e?.address));return a((()=>{""!==i?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[i?.value]),o(_n,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),Qn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},el=(e,t,n)=>Math.max(t,Math.min(e,n));function tl(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function nl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||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:n,step:l,value:s,disabled:i,onChange:t=>{const n=tl(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const ll=1,al=100,il=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:ll),max:s=(a.length?a.length-1:al),step:d=1,value:m=a[0]||r,disabled:u=!1,onChange:p}=e,g=Qn(e,{normalize:(e=0)=>a.length?rl(a)(e):el(e,r,s),format:qe()}),x=i((e=>{p&&p(tl(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",yn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),nl({list:a,min:r,max:s,step:d,disabled:u,value:m,onChange:p})]}),sl(l)]})})),rl=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),sl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ol=["От 1 000 ₽","До 1 000 000 000 ₽"],cl=d((({field:e,input:t})=>o(il,{title:"Сумма, ₽",items:ol,min:1e3,max:1e9,...e(t?.name??"")}))),dl=d((({field:e,input:t})=>o(Sn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ml="client",hl=[{key:ml,text:"Клиент"},{key:"representative",text:"Представитель клиента"}],ul=d((({field:e,input:t})=>o(_n,{label:"Тип обратившегося",...t,options:hl,...e("applierType")}))),pl=d((({field:e,input:t})=>o(Sn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),gl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min: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>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=xl(t,e),c=fl(t,i,r);h.push(o("td",{children:o("div",{className:bl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},xl=(e,t)=>t&&e.toDateString()===t.toDateString(),fl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),bl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),yl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],vl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:i=bn})=>{const{firstDayOfWeek:s,totalDays:d}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:yl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:gl({firstDayOfWeek:s,today:e,totalDays:d,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:i})})]})})),Nl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];const wl=e=>"_"===e,kl=e=>/\d/.test(e),Sl=e=>wl(e)||kl(e),Cl=1940,Il={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Tl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:i,disabled:r,onChange:d,onClick:m})=>{const u=s(null),[p,g]=l(i||"");return a((()=>{g(i||"")}),[i]),a((()=>{Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==u.current&&u.current.focus(),m?.()},className:h("relative",n),children:[o("input",{ref:u,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(function(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const l=[...t],a=l.findIndex(wl),i=l.map(((e,t)=>Sl(e)?l.slice(0,t).filter(Sl).length:-1)),r=l.map(((e,t)=>kl(e)?e:n.charAt(i[t])||e)),s=i.indexOf(n.length-1)+1;return r.slice(0,Math.max(a,s)).join("")}(t,"__.__.____"))},onBlur:()=>{Bl(p)?Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(i||"")},disabled:r}),r?null:o(q,{className:"mr-s",...Il})]})})),Bl=e=>{const[t,n,l]=e.split(".");if((e=>Number(e)>=Cl&&Number(e)<=(new Date).getFullYear())(l)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(l),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;return Number(t)>0&&Number(t)<=a}return!1},Ml=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:l})=>{if(Bl(e)){const{day:a,month:i,year:r}=(e=>{const[t,n,l]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(l)}})(e);t(i),n(r),l?.(new Date(r,i,a))}},Pl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:l,setSelectedMonth:a,setSelectedYear:i,disabled:r=!1})=>o(Tl,{onChange:l,disabled:r,onClick:e,value:t&&Wt(t),setSelectedMonth:a,setSelectedYear:i,className:h("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Vl=Nl.map((e=>({key:e}))),Rl=Array.from({length:(new Date).getFullYear()-Cl+1},((e,t)=>Cl+t)).reverse().map((e=>({key:String(e)}))),zl=(e,t)=>{const n=new Date(e,t,1);let l=0;for(;n.getMonth()===t;)l++,n.setDate(n.getDate()+1);return l},Dl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:l,onChange:a})=>{l&&a?.(new Date(t,n,Math.min(e,l.getDate())))},_l={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},$l={className:"min-w-32",iconVersion:"black",isBorder:!1},jl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,disabled:m,onChange:u})=>{const[p,{setValue:g,setFalse:x}]=an(!1),[f,b]=l(n?.getMonth()||(new Date).getMonth()),[y,v]=l(n?.getFullYear()??(new Date).getFullYear()),N=i((e=>{u?.(e),x()}),[u]),{handlePrevMonth:w,handleNextMonth:k,handleSelectMonth:S,handleSelectYear:C,monthsOptions:I,yearsOptions:T,handleChangeVisibleCalendar:B,ref:M}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r,onChange:s,value:o})=>{const c=xn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>{l(Nl.indexOf(e));const t=zl(r,Nl.indexOf(e));Dl({maxDateOfMonth:t,selectedYear:r,selectedMonth:Nl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:i((({key:e})=>{a(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Vl,yearsOptions:Rl,ref:c}})({onYearSelect:v,onMonthSelect:b,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:u,value:n}),P=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(M,370);return c("div",{className:h("space-y-xs",e),ref:M,children:[vn(t),c("div",{className:"relative",children:[Pl({handleChangeVisibleCalendar:B,value:n,valid:r,onChange:u,disabled:m,setSelectedMonth:b,setSelectedYear:v}),p&&!m?c("div",{className:h("absolute bg-white z-20 select-none",{"bottom-full":P}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:w,children:o(q,{..._l,className:"-rotate-90 cursor-pointer"})}),o(Vn,{onChange:S,value:{key:Nl[f]},options:I,...$l}),o(Vn,{onChange:C,value:{key:String(y)},options:T,...$l}),o("div",{className:"my-auto",onClick:k,children:o(q,{..._l,className:"rotate-90 cursor-pointer"})})]}),o(vl,{today:n,currentMonth:f,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),Ll=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:h("shrink-0 w-full",e),children:[o(jl,{label:fn({label:t,errors:l}),valid:Boolean(!n),...a}),kn(n)]}))),Al=d((({field:e,input:t})=>o(Ll,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Ol=d((({field:e,input:t})=>o(Sn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),El=d((({field:e,input:t})=>o(Sn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Fl=d((({field:e,input:t})=>o(Ll,{label:"Желаемая дата встречи",...e(t?.name??"")}))),Ul=d((({field:e,input:t})=>o(Sn,{label:"Электронная почта",...e(t?.name??""),...t}))),Wl=[{key:"ULTRASERVICE",text:"Ультра"}],Hl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Yl=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Kl=d((({field:e,input:t})=>o(_n,{label:"Способ получения ответа",options:Yl,...e(t?.name??"")}))),ql=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...e(t?.name??""),...t}))),Xl=d((({field:e,input:t})=>o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??"")}))),Gl=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Zl="appearance-none w-5 h-5 border-solid flex-none",Jl=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Ql=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Gl,{paths:Jl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",ta(l)),onClick:s,children:[o("div",{className:h(Zl,"m-0",a?"rounded-full border-2":la(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:na(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,ea(n)]})})})),ea=e=>e?o("div",{className:"ml-s",children:o($e,{size:"text-l",font:"font-light",children:e})}):null,ta=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",na=(e=!1)=>e?"radio":"checkbox",la=(e=!1)=>h("rounded border",{"bg-primary-main":e}),aa=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:h("shrink-0",e),children:[o(Ql,{text:t,value:n,disabled:a,onChange:r},l),kn(i)]}))),ia=d((({field:e,input:t})=>o(aa,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ra=`${Yt}/outservice`,sa=[];async function oa(){const e=await Rt(`${ra}/outserviceregions`);return e&&Array.isArray(e)?e:sa}const ca=d((({field:e,input:t})=>{const n=e("region"),l=n?.value?.key,{data:i}=Hn("outServiceRegions",oa),s=r((()=>i?.find((e=>e.code===l))?.localities?.map((e=>({key:e,text:e})))),[i,l]);return a((()=>{""!==l&&e?.(t?.name??"")?.onChange?.("")}),[l,t?.name??""]),o(_n,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),da=d((({field:e,input:t})=>o(Sn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,...e(t?.name??""),...t}))),ma=d((({field:e,input:t})=>o(Sn,{label:"Имя",maxLength:60,...e(t?.name??""),...t}))),ha=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ua=d((({field:e,input:t})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),pa=d((({field:e,input:t})=>o(Sn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),ga=e=>"_"===e,xa=e=>/\d/.test(e),fa=e=>ga(e)||xa(e),ba=[..."+7 (___) ___-__-__"],ya=ba.findIndex(ga),va=ba.map(((e,t)=>fa(e)?ba.slice(0,t).filter(fa).length:-1));const Na=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ba.map(((e,n)=>xa(e)?e:t.charAt(va[n])||e)),l=va.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ya,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Nn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),wa=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Na,{"aria-label":t,label:fn({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),kn(n)]}))),ka=d((({field:e,input:t})=>o(wa,{label:"Телефон",...e(t?.name||"phone"),...t}))),Sa=d((({field:e})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ca=Ot((({field:e,input:t,source:n})=>o(_n,{placeholder:"Выберите продукт",label:"Продукт",options:Ia(n?.productList),...e(t?.name??"")}))),Ia=e=>(e??[]).map((e=>({key:e,value:e}))),Ta=`${Yt}/regions`,Ba=[];function Ma(e=Ta){const{data:t}=Hn(e,zt);return Array.isArray(t)?t:Ba}const Pa=`${Yt}/outservice/outserviceregions`,Va=d((({field:e,input:t,params:n})=>{var l;const a=Ma((l=n?.typeForm,"OUTSERVICE"===l?Pa:void 0));return o(_n,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),...e(t?.name??"")})})),Ra=d((({field:e,input:t})=>{const n=Gn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(_n,{label:"Регион",placeholder:"Выберите регион",options:l,...e(t?.name??"")})})),za=d((({field:e,input:t})=>o(Sn,{label:"ФИО представителя",...t,...e("representativeName")}))),Da=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},_a=/^[\u0400-\u04FF\d\s]+$/u,$a=on((e=>null!=e&&""!==e)),ja="Некорректно заполненное поле",La=e=>$a(e??ja),Aa=e=>on((e=>e?.key&&""!==e?.key))(e??ja),Oa=e=>on((e=>"string"==typeof e&&e.length>1&&((e="")=>_a.test(e))(e)))(e??ja),Ea=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Fa=e=>on(Ea)(e),Ua=on((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Wa={fullName:La(),addressBranch:Aa(),desiredMeetingDate:La(),product:La(),localities:La(),partnerComments:La(),collectionCount:La(),acquiringType:Aa(),serviceType:Aa(),annualRevenue:La(),feedbackMethod:Aa(),serviceDirection:Aa(),secondaryPhone:Fa("Укажите номер телефона"),region:Aa(),situationDescription:La(),sufferedFrom:La(),applierType:La(),surname:Oa("Укажите свою фамилию на кириллице"),name:Oa("Укажите своё имя на кириллице"),middleName:Oa("Укажите своё отчество на кириллице"),birthday:La("Укажите дату рождения"),phone:Fa("Укажите номер телефона"),email:(Ha="Укажите электронную почту",on((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(Ha)),inn:(e=>on((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:La(),typeForm:La(),consentToReceiveMaterials:Ua,consentDataProcessing:Ua};var Ha;const Ya=(e={})=>({name:t})=>Boolean(e[t??""]),Ka=e=>t=>!t?.condition||t.condition.values.find((n=>{const l=e?.[t?.condition?.name??""];return n===(l?.key??l)})),qa=d((({field:e})=>{const t=e("secondaryPhone");return o(wa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Da(t,Wa.secondaryPhone):t})})),Xa=d((({field:e,input:t})=>o(_n,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Hl,...e(t?.name??"")}))),Ga=d((({field:e,input:t})=>o(Sn,{label:"Описание ситуации",...t,...e("situationDescription")}))),Za=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],Ja=d((({field:e,input:t})=>o(_n,{label:"Пострадал в",...t,options:Za,...e("sufferedFrom")}))),Qa=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,...e(t?.name??""),...t}))),ei=["От 1 мес","До 15 лет"],ti=d((({field:e})=>o(il,{title:"Срок, месяцев",items:ei,min:1,max:180,...e("term")}))),ni=d((({field:e,input:t})=>o(_n,{label:"Тип обслуживания",options:Wl,...e(t?.name??"")}))),li={horizontal:"@lg:flex-row",vertical:""},ai=d((({label:e,items:t,value:n,className:l,disabled:a=!1,orientation:i="horizontal",onChange:r})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o($e,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:h("flex flex-col gap-s",li[i],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ql,{isRadio:!0,text:t,value:n===e,onChange:()=>r?.(e),disabled:a},String(e))))})]}))),ii=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],ri=d((({field:e,input:t})=>{const n=i((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(ai,{className:"whitespace-normal",orientation:"horizontal",items:ii,...e(t?.name??"",{onChange:n})})})})),si=d((({field:e,input:t})=>o(Ql,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")})));const oi={$ref:"/wcms-resources/outservice-productlist.json"},ci={fullName:ql,addressBranch:Jn,desiredMeetingDate:Fl,product:e=>o(Ca,{...e,source:oi}),localities:ca,isClient:ia,partnerComments:pa,collectionCount:Ol,acquiringType:jn,onlineCheckout:ua,posTerminal:Sa,serviceType:ni,term:ti,amount:cl,annualRevenue:dl,vedTypes:ri,feedbackMethod:Kl,serviceDirection:Xa,bankEmpolee:pl,secondaryPhone:qa,applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>Zn(e?.params?.typeForm)?o(Ra,{...e}):o(Va,{...e}),consentToReceiveMaterials:si,sufferedFrom:Ja,situationDescription:Ga,representativeName:za,applierType:ul,surname:Qa,name:ma,middleName:da,birthday:Al,phone:ka,email:Ul,inn:Xl,comment:El},di=(e,t,n={})=>(l,a)=>{const i={...ci,...n}[String(l.name)];return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:l,field:e})&&i?o("div",{children:o(i,{field:e,input:l,params:t})},a):null},mi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o($e,{size:"text-h6",children:e})}):null,hi={primary:h("text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},ui=h("group/btn-embedded","bg-transparent border border-transparent outline-none"),pi=h("bg-main-gray text-main-disabled cursor-not-allowed"),gi=d((({className:e,type:t="button",version:n="primary",shape:l="default",embedded:a,disabled:s,role:c,ariaLabel:d,data:m,dataTheme:u,children:p,onClick:g=bn})=>{const x=i("tab"!==c?me(g):g,[c,g]),f=r((()=>be(m)),[m]),b="round"===l;return o("button",{className:h("font-sans flex items-center gap-xs",{[hi[n]]:!s&&!a,[ui]:a,[pi]:s},a?"justify-between":"justify-center",a||b?"p-0":"px-9 py-4",{"rounded-md":"default"===l,"rounded-full":b},e),type:t,role:c,"aria-label":d,disabled:s,"aria-disabled":s?"true":void 0,"data-theme":u,...f,onClick:x,children:p})})),xi=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(q,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),fi=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{className:h("relative bg-white pt-0 p-lg",e),role:"dialog",title:"Диалог",onClick:a,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(xi,{className:"absolute top-0 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),bi=d((({ok:e,typeForm:t,onClose:n})=>{const l="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(fi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?l:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(gi,{type:"button",onClick:n,children:"Хорошо"})]})})})),yi=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:h,applierType:u,...p}=e,g=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${Ln(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,x={...p,...ki(o),...wi(c),...d&&{inn:d},...g?{partnerComments:g}:{},...s?{typeForm:s}:{},...Ni(m?.text,h),...vi(u)};return Object.fromEntries(Object.entries(x)?.map((([e,t])=>[e,t?.key||t])))},vi=e=>e?.key?{isClient:e?.key===ml}:{},Ni=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},wi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ki=e=>e?{vedTypes:Object.fromEntries(ii.map((({id:t})=>[t,t===e])))}:{},Si={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Wl[0],feedbackMethod:Yl[0],serviceDirection:Hl[0],vedTypes:ii[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Ci=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||Si[e.name||""]]))),typeForm:{key:t,text:""}}),Ii=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:l="big"})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===l?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})}))),Ti=d((({isLoading:e,disabled:t,children:n,className:l,...a})=>c(gi,{type:"submit",className:h("relative",l),disabled:e||t,...a,children:[e?o(Ii,{blur:!0,size:"small"}):null,n]}))),Bi={primary:hi.primary,secondary:hi.secondary,white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",gray:hi.secondary,transparent:"","":""},Mi=d((e=>{const t=xe(),{className:n,href:l,target:a,text:i,aboveText:r,version:s="link",rel:c,ariaLabel:d,data:m,children:u,onClick:p}=t(e),g="link"!==s;return o("a",{className:h("group/btn inline-flex items-center h-fit","font-sans no-underline select-none","border border-transparent focus:border-primary-text focus:border","cursor-pointer",{[Bi[s]]:Boolean(s),[r?"px-9 py-2.5":"px-9 py-4"]:g,"rounded-md":g},n),href:l,target:a,rel:c,"aria-label":d??`Ссылка на ${i}`,role:l?"link":"button",onClick:p,...be(m),children:u??Pi(i,r)})})),Pi=(e,t)=>e||t?c("div",{className:"whitespace-pre",children:[t?o("div",{className:"font-light text-left text-xs",children:t}):null,o("div",{className:h("text-left",{"text-s -mt-3xs":Boolean(t)}),children:e})]}):null,Vi=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o($e,{children:e}):null,t?o(Mi,{...t,ariaLabel:"условия передачи данных",children:t.text}):null]}))),Ri=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Ql,{...e}),o(Vi,{link:t})]}),kn(Da(e,Ua).error)]}):o(Vi,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(Ti,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),zi={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=`${Yt}${g?"/lead":"/sendcorporatelead"}`,f={typeForm:n,...Xt(l,g),...Gt(i,g),...Kt(a),...qt(s,"desiredMeetingDate"),...g?qt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Zt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},Di=d((({className:e,title:t,typeForm:n="",sections:l=[],button:a,link:s,endpoint:d,additionalParams:m,isContacts:u,data:p,...g})=>{const x=r((()=>l?.flatMap((e=>e?.inputs))||[]),[l]),f=r((()=>Ci(x,n)),[x,n]),b=r((()=>((e,t={})=>{const n=e.filter((e=>Boolean(e?.required&&e?.name))),l={...Wa,...t},a=n.some((e=>e.condition?.values)),i=Object.fromEntries(n.filter(Ya(l)).map((({name:e})=>[e,l[e??""]])));return e=>a?Object.fromEntries(n.filter(Ya(l)).filter(Ka(e)).map((({name:e})=>[e,l[e??""]]))):i})(x)),[x]),y=pn(bi),v=ln(),N=i((async(e,t)=>{const l=yi({...e,...m}),a=Boolean(await zi.send(l,"lead"===d));y.open({ok:a,typeForm:n}),a&&Jt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:k,onSubmit:S}]=hn(f,{resetOnSubmit:!0,formValidator:b,onSubmit:N}),C=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return c(un,{className:h("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[l.map(((e,t)=>{return c("div",{className:h((l=e.columns,2===l?"@xl:grid-cols-2":""),"grid gap-x-m"),children:[mi(e.title),(e?.inputs||[])?.map(di(k,{typeForm:n}))]},`section-${t}`);var l})),Ri(C?k("consentDataProcessing"):void 0,s,a)]}),u?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),_i=d((({title:e,description:t})=>{const n=Te();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),$i=e=>e%2!=0,ji=d((({className:e,children:t})=>o("span",{className:h("inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main",e),children:t}))),Li=d((({isUnfolded:e,...t})=>o(q,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Ai=d((({className:e,isUnfolded:t,short:n,label:l=(t?"Скрыть":"Развернуть"),embedded:a,...i})=>c(gi,{className:h({"w-full":!n},e),embedded:a,shape:n?"default":"square",role:"tab","aria-label":"Кнопка сворачивающейся секции",...i,children:[o(ji,{children:l}),o(Li,{isUnfolded:t,iconVersion:a?"color":""})]}))),Oi=d((({className:e,role:t="tablist",children:n})=>o("div",{className:h(e),role:t,children:n})));const Ei=d((({className:e,isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:h("transition-max-h duration-300 overflow-hidden",{"max-h-0":Boolean(l.current||!t)}),role:"tabpanel","aria-label":"Сворачивающаяся секция",children:o("div",{className:e,ref:i,children:n})})})),Fi="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Ui=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]],[s,{toggle:d}]=an(!1);return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(Fi),children:[P(i,{...a.options,parent:n}),$i(i.length)?o(Ft,{className:"col-span-6",...a}):null]}),c(Oi,{children:[c(Ei,{className:h(Fi),isUnfolded:s,children:[P(r,{...a.options,parent:n}),$i(r.length)?o(Ft,{className:"col-span-6",...a}):null]}),o(Ai,{className:h("text-h4",{hidden:e<1}),label:t,isUnfolded:s,disabled:!r?.length,dataTheme:a.options?.page?.colorPalette,onClick:d})]})]})})),Wi=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Hi=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Yi=10;function Ki(e=0){const t=Math.round(e*Yi);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const qi=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const u=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:Ki(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:u,role:"listitem",children:d})})),Xi=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Gi=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(Ji(n))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Zi(c,v):{},...N?Hi(u):{},gap:`${r}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(qi,{className:h(m,a?Xi[a-1]:"",{"h-full":N},t),style:w?Zi(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Zi=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ji=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Qi={"horizontal-list":"w-6","vertical-list":"h-6"},er=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Qi[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),tr=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===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: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-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},nr=e=>e,lr=(e=nr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ar=lr(),ir=(e=nr)=>lr((t=>-e(t))),rr=ir(),sr=e=>t=>e.scrollWidth/t,or=e=>(t,n)=>{e.scrollBy({left:n*sr(e)(t),behavior:"smooth"})},cr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[ir()(a),lr()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?or(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?or(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},dr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},mr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Te(),[u,p]=cr({itemCount:s.length}),g=hr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Gi,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(tr({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",dr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(er({activeIndex:t,onClick:x,listType:l}))}):null})),hr=(e=!1)=>({behavior:e?"auto":"smooth"}),ur=d((({className:e,name:t,...n})=>o(gi,{className:h("w-12 h-12 min-w-12 min-h-12",e),shape:"round",...n,children:o(q,{name:t,iconVersion:"",size:"small"})}))),pr=d((e=>o(ur,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),gr=d((e=>o(ur,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),xr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",fr=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?br(t):null,i?o(pr,{className:h(yr(a),m?"left-1":"left-0"),onClick:s}):null,r?o(gr,{className:h(yr(a),m?"right-1":"right-0"),onClick:d}):null]})})),br=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(xr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(xr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),yr=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),vr=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=cr({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(Gi,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(fr,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(mr,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),Nr=({blocksToRender:e,...t})=>o(vr,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Wi(!0)),children:B(e,t)},String(n))})}),wr=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[kr(n,t),o(Ui,{...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[kr(n,t),Nr({...l,blocksToRender:t})]});default:return null}})),kr=(e,t)=>e&&!t.length?o(_i,{...e}):null,Sr=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Cr=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ha,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Ir=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Sr(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Tr(l)).filter(Boolean))]}),n?o("div",{children:o(gi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Tr=e=>([t,n])=>{const l=n?.type;return"array"===l?Br(t,e)(n):null},Br=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Cr,{items:l,multiple:!n?.single,...t(e)})]},e)},Mr=e=>e;function Pr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Vr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,Rr=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Vr(t[e])||Vr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Vr(t[e])||Vr(n[e])||zr(t[e])<=zr(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Vr(t[e])||Vr(n[e])||zr(t[e]?.min)>=zr(n[e]?.min)&&zr(t[e]?.min)<=zr(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Vr(t[e])||Vr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Vr(t[e])||Vr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),zr=e=>Number(e||0),Dr=(e,{block:t,page:n,normalize:l=Mr})=>{const a=t?.blocks||[],[i,s]=hn(e),o=r((()=>Pr(a,a.map((e=>jt(e.content,n?.fallback))))),[a,n?.fallback]),c=i===e?a:((e,t)=>(n=Mr)=>e?.filter((([,e])=>Rr(t,n(e)||{}))).map((([e])=>e)))(o,i)(l);return[i,{blocksToRender:c,blocksWithProps:o},s]},_r={},$r={},jr=Ot((({className:e,filtrationSchema:t=_r,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=Dr($r,{block:a.block,page:a.options?.page}),d=o(Vn,{className:"w-64",label:n?.title,options:Lr(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Lr(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ir,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(gi,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(wr,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Lr=e=>Pr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Ar=(e=!1)=>e?"text-left":"text-center",Or={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Er=d((({className:e,iconBgVersion:t="primary",size:n,icon:l,...a})=>{const i=`${n?.width??44}px`;return l?o("div",{className:h("rounded-icon object-fit flex justify-center items-center",Or[t],e),style:{width:i,height:i},role:"figure",children:o(q,{name:l,width:"54%",...a})}):null})),Fr=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Te();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:Ar(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Ur)}):null]})})),Ur=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Er,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ae,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o($e,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Wr=(e,t,n)=>{return o(vr,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:h("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o($e,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ae,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o($e,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},Hr=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Wr(e,0,t):null]}))),Yr={start:"justify-start",center:"justify-center",end:"justify-end"},Kr=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",Yr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:We(e)})})),qr=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Xr="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Gr="flex flex-col lg:w-1/2 gap-2xl",Zr="flex flex-col gap-y-xl min-w-52",Jr=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o($e,{size:"text-h3",children:"number"==typeof e?[l,qe(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Qr=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o($e,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Jr,{value:n,...a}):o($e,{size:"text-h3",children:"-"})]}))),es=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,ts=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o($e,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:qe(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),ns=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(q,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),ls=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,color:a="text-secondary-text",children:i,...r})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(ts,{title:e,rate:t,unit:n,fractionDigits:l,color:a,...r})}),o(Qr,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:a,...r}),i]}):o(ns,{title:e,...r}),as=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(il,{items:e?[`От ${qe(1)(l.min||0)} ${n}`,`До ${qe(1)(l.max||0)} ${n}`]:[],step:t,...l}),is={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},rs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ss=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=is.prefMonthsNum,prefTravelBonusRate:i=is.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||rs,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},os=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=hn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=ss(r,n);return o(qr,{className:e,title:t,...i,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),as({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?ls({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:Zr,children:[x>=0?o(Qr,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,We(l,{isVertical:!0}),es(a)]})]})})})),cs=Math.round(29.5),ds=(e,t=0)=>e?.sum?e.sum:t,ms=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,hs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,us=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o($e,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o($e,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(ai,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),ps=e=>us({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),gs=" (c капитализацией)",xs=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Zr,children:[o(Qr,{title:`Доход в конце срока${i?gs:""}`,value:e,postfix:n,prefix:"+"}),o(Qr,{title:`Сумма в конце срока${i?gs:""}`,value:t,postfix:n}),We(l,{isVertical:!0}),a?.map(es)]}),fs=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:bs([e,t],l),bs=([e,t],n=[])=>({[e]:n.length?rr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ar(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ys=(e,[t,n],l)=>e>=l[t]&&e<=l[n],vs={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ns={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},ws=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?vs[e?.rateType]:"",{data:n}=Hn(t?`${Yt}/depositrates/${t}`:null,zt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>r===e.isMonthlyInterestPayment&&ks(s,e)&&ys(l,["minSum","maxSum"],e)&&ys(n,["minDays","maxDays"],e)))||Ns,{rate:m}=d,h=Ss(m,e),u=l+h,p=c||[Ns];return{...d,...bs(["minSum","maxSum"],p),...bs(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},ks=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ss=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Cs=Ot((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=hn({moneyValue:ds(r,1e5),daysValue:ms(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=ws(m,s),{income:g,finalSum:x,rate:f,depositeName:b}=p;return o(qr,{className:e,title:t,...d,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(il,{items:[`От ${hs(y.min||0)}`,`До ${hs(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Is(p,u),ps({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),ls({rate:f,depositeName:b,isShowDepositeName:i}),xs({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var y})),Is=(e,t)=>c("div",{className:"space-y-s",children:[o($e,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ql,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ql,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ts=(e=[],t=!1)=>Bs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Bs=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Ms=({min:e=0,max:t=0,availableMonths:n,...l})=>o(il,{items:[`От ${Ps(e)}`,`До ${Ps(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Ps=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Vs=e=>us({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Rs=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(el(t?.[a],n.minMonths,n.maxMonths))},zs=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},Ds={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},_s=e=>$s({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&$s({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&$s({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&$s({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),$s=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],js=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[Ds],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>_s({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=fs(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=fs(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>_s({row:e,userInputParams:t,paramsViewSettings:n})&&ys(l,["minSum","maxSum"],e)&&ys(a,["minMonths","maxMonths"],e)))||Ds)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=zs(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},Ls=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),As={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Os=Ot((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const u=(p=n?.rateRows,Bs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],p));var p;const[g,{field:x}]=hn({moneyValue:ds(s,2e5),monthsValue:ms(s,cs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),f=js(g,n,r),b=Vs({title:"Тип платежа",orientation:"vertical",...x("isAnnuity")}),{onChange:y}=x("moneyValue"),{onChange:v}=x("monthsValue");return a((()=>{y&&y(el(g.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{v&&v(el(g.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!Ls(s)&&u&&Rs({field:x,defParams:u,calcParams:f,map:As,monthsValue:"minMonths"})}),[n,s]),o(qr,{className:e,title:t,...m,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...x("moneyValue"),value:f.moneyValue}),Ms({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...x("monthsValue"),value:f.monthsValue}),Es({...f,...r},x),o("div",{className:"sm:hidden",children:b})]}),c("div",{className:h(Zr,"@4xl:w-1/2"),children:[o(Qr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Qr,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(Qr,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:b}),We(l,{isVertical:!0}),es(i)]})]})})})),Es=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Ql,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Ql,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Fs=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Us={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Ws=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Ks(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Ys({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Ys({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Ys({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Ys({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ys(l,["minSum","maxSum"],t),ys(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Us,{rate:h}=m,u=Hs(h,e),p=l+u,g=t||[Us];return{...m,...bs(["minSum","maxSum"],g),...bs(["minMonths","maxMonths"],g),availableMonths:Fs(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:u,finalSum:p}},Hs=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Ys=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Ks=(e,t)=>e+Math.round((t-e)/2),qs=(e="rub")=>"rub"===e,Xs=(e,t)=>{const{minMonths:n,maxMonths:l}=bs(["minMonths","maxMonths"],Qs(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:el(a,n,l)}},Gs=(e,t)=>{const{minSum:n,maxSum:l}=bs(["minSum","maxSum"],Qs(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:el(a,n,l)}},Zs=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),Js=e=>{const t=qs(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Qs=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},eo=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?us({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?us({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),to(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?ps({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},us({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),to(e.isShowNewClient),e.isShowNewClient?o(Ql,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},to=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,no={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},lo={text:"₽",key:"rub"},ao=Ot((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[lo],g=i((e=>t=>e?{...t,...Js(t),...Gs(t,e),...Xs(t,e),...Zs(t,e)}:t)(u),[u]),[x,{field:f}]=hn({moneyValue:ds(d,2e4),monthsValue:ms(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:lo},{normalizer:g}),b=f?.("currency")?.value??lo,y=f?.("isNewClient")?.value,v=Qs(u,b),N=Ws(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,I=i((()=>{Rs({field:f,defParams:Ts(v,y),calcParams:N,monthsValue:"minMonths",map:no})}),[f,u]);a((()=>{!Ls(d)&&v&&I()}),[d,u]);const T=w===Ts(v,y)?.rate;return o(qr,{className:e,title:t,...m,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[c("div",{className:"flex gap-m",children:[as({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:io(b?.key)}),u&&u?.length>1?o(_n,{label:"Валюта",options:p,...f("currency")}):null]}),Ms({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),eo({...N,...s},f)]}),ls({rate:w,children:so(I,T)}),xs({income:k,finalSum:S,buttons:[...l,ro(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),io=(e="")=>qs(e)?1e3:100,ro=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},so=(e,t=!1)=>t?null:o(gi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),oo=e=>co({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&co({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),co=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],mo={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},ho=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[mo],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>oo({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=fs(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=fs(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>oo({row:e,userInputParams:t,paramsViewSettings:n})&&ys(l+r,["minSum","maxSum"],e)&&ys(i,["minSumOld","maxSumOld"],e)&&ys(r,["minSumExtra","maxSumExtra"],e)&&ys(a,["minMonths","maxMonths"],e)))||mo)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=zs(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},uo=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=hn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=ho(s,n,i),u=Vs({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(qr,{className:e,title:t,...r,children:c("section",{className:h(Xr,e),children:[c("div",{className:Gr,children:[as({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),as({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Ms({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),po({...m,...i},d),m.isExtraMoney?as({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:u})]}),c("div",{className:h(Zr,"@4xl:w-1/2"),children:[o(Qr,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Qr,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Qr,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Qr,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:u}),We(l,{isVertical:!0}),es(a)]})]})})})),po=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Ql,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Ql,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Ql,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),go=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Qn(e,{normalize:(e=a)=>n&&l?String(el(Number(xo(e)),n,l)):xo(e),format:qe(r)}),d=i((e=>t&&t(xo(e))),[t]);return o(Nn,{onChange:d,...s,...c})})),xo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),fo=d((e=>o(go,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o($e,{size:"text-xl",font:"font-light",children:"₽"})})})));function bo(e,t){for(const[n,l]of e.entries())null!=l?t.setItem(n,l):t.removeItem(n)}function yo(e,t){return bo(e,t),bo(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class vo{storage;bus;get size(){return this.storage?.length??0}constructor(e,t=new ue){this.storage=e,this.bus=t}hasItem(e){return Boolean(this.storage?.getItem(String(e)))}getItem(e){const t=this.storage?.getItem(String(e))??null;try{return JSON.parse(String(t))}catch(e){return null}}entries(){return Array.from({length:this.size},((e,t)=>{const n=String(this.storage?.key(t));return[n,this.getItem(n)]}))}setItem(e,t){null!==t?this.storage?.setItem(String(e),JSON.stringify(t)):this.storage?.removeItem(String(e)),this.bus?.subject(e,t)}removeItem(e){this.storage?.removeItem(String(e)),this.bus?.subject(e,null)}}class No{bus;store=new Map;get size(){return this.store.size}constructor(e=new ue){this.bus=e}hasItem(e){return this.store.has(e)}getItem(e){return this.store.get(e)}entries(){return this.store.entries()}setItem(e,t){this.store.set(e,t),this.bus.subject(e,t)}removeItem(e){this.store.delete(e),this.bus.subject(e,null)}}const wo={};function ko(e,t=wo){const n=s(null),o=function(){const[,e]=l(0);return i((()=>e((e=>(e+1)%65536))),[])}();return a((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),r((()=>new Proxy(t,{get:(t,l)=>(n.current||=new Set,n.current.add(l),e.getItem(l)),has:(t,l)=>(n.current||=new Set,n.current.add(l),e.hasItem(l)),set:(t,n,l)=>(e.setItem(n,l),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const So=new No;function Co(){return ko(So)}yo(So,new vo(globalThis?.sessionStorage));const Io={private:"p2p/registerP2P",business:"b2c/registerB2C"},To=({onClose:e,errorCode:t,errorMessage:n})=>{const l=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(fi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:"Ошибка перевода",description:l,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Bo=e=>{const t=pn(To),n=Co(),l=Qt(),a="private"===e?"p2p":"b2c";return i((async({amount:i})=>{const r=await(async(e,t)=>{const n=Qt(),l={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},a=`${Yt}/payment/${Io[e]}`;try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(l)});return e.ok?await e.json():null}catch(e){return null}})(e,i);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(r)&&(n.transaction={orderId:r.orderId,type:a,url:l.href},l.assign(`${a}/?formUrl=${encodeURIComponent(r.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(r)&&t.open({errorCode:r.errorCode,errorMessage:r.errorMessage})}),[e])},Mo={amount:1500},Po=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:i="private",...r})=>{const[s,{setValue:d}]=an(!1),m=Bo(i),[{amount:u},{field:p,onSubmit:x}]=hn(Mo,{onSubmit:m});return a((()=>{d(u<=0)}),[u]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...r,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:x,children:[o(fo,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:u}),l?.text?o(Ti,{className:"w-full mt-lg",disabled:s,children:l.text}):null]})]})})),Vo=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(q,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ro="relative h-full",zo={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Do=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(jo),r=n?{defaultPadding:"p-6xl pb-m"}:{};return V({...l,renderProps:(n,l,a)=>c("div",{className:_o(n,{someCardsHighlighted:i}),children:[B(n,l,{className:$o(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),jo(n)?Vo({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},_o=(e,{someCardsHighlighted:t})=>h(Ro,t&&(jo(e)?"pt-3xl":"pt-3xl sm:pt-16")),$o=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h(Ro,"min-w-80",zo[l],t&&(jo(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wi(n),n&&"h-full"),jo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Lo=Ot((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(vr,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Ao(s?.block?.blocks):[],hasBlur:!0,children:Do({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Ao=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Oo="z-10 border border-solid w-full h-full",Eo=h(Oo,"absolute hidden @xl:block border-transparent"),Fo=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:h("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:h(Eo,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Eo,"top-6 right-8 bg-green")}),o("div",{className:h(Eo,"top-3 right-4 bg-green-light")}),c("div",{className:h(Oo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),We([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Uo={black:"bg-black",white:"bg-white"},Wo=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Pe,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:We([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($e,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Ho)]}):null,a?c($e,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Ho=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Uo[e]}`},String(t)),Yo=d((({icon:e,...t})=>{const n=xe(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ae,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Ko=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?qo(l):null]})}))),qo=e=>o("div",{className:h("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(Yo,{...e},String(t))))}),Xo=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),Go=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=xe()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?r:{},role:t?"link":"none",...be(a),children:i})})),Zo=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Jo=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Zo.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ue(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},Qo(a));return c("div",{className:h("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:We(m,{className:ec(s??!1,a??!1,n),buttonClassName:u})}),r?o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Qo=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",ec=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),tc=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(Go,{href:a,target:m,className:"h-full",data:Xo(v),children:c(Pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...tt(Ue(i)?o(ae,{image:i}):null,f),buttons:d.length?o(Jo,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:x}),s?o(De,{__html:s,isDotted:r,itemSize:"list-s"}):null,nc(l,p)]})})}))),nc=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,lc=new ue,ac=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o($e,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o($e,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:We(a)}):null]},String(t))},ic=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:u=[],options:p,data:x,...f})=>{const b=r((()=>u.map(ac)),[u]),[y,v]=r((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[N,k]=l(!1);a((()=>lc.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&k(e.isUnfolded)}))),[p?.parent]);const S=i((()=>{lc.fire("fold",{type:"fold",isUnfolded:!N,parent:p?.parent})}),[N,p?.parent]);return c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[o(ae,{className:"self-center",image:s}),t?o(w,{className:h("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(ke,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Oi,{children:[c("div",{children:[y,o(Ei,{isUnfolded:N,children:v})]}),u.length>=m?o(Ai,{className:"mt-m",label:N?"Скрыть":"Подробнее о тарифе",isUnfolded:N,embedded:!0,data:x,onClick:S}):null]}):o("div",{children:y})]})})),rc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,sc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),oc=1e9,cc={sum:{min:1e4,max:oc},period:3},dc=Ot((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=Dr(cc,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:mc(e)})}),u=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=hc(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Ir,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(fo,{label:l?.title,min:500,max:oc,...d("sum",{parse:e=>({min:Number(e),max:oc}),format:({min:e})=>String(e)})}),o(il,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(wr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),mc=e=>Dt((e?.paramsSource?.rateRows||[]).filter(rc).flatMap((e=>sc(e.minMonths,e.maxMonths)))),hc=e=>Dt(e.flatMap((e=>e||[])).filter(rc).flatMap((e=>sc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],uc=[{key:"10"},{key:"50"},{key:"100"}],pc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Vn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:uc,iconVersion:"black"})]})},gc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",xc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:gc,"aria-label":`Страница ${i}`,children:i},String(t)):null},fc={width:"24",height:"24"},bc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(q,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:yc(1===e),...fc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:gc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(xc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:gc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(q,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:yc(e===n),...fc})})]})},yc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",vc=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(bc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(pc,{itemCount:l,onItemCountChange:a}):null]}),Nc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ae,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",yn),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),wc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Nc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(gi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),kc=d((({title:e,timestamp:t,publicId:n})=>{const l=xe(),{href:a}=l({href:`${Yt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Er,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o($e,{size:"text-m","font-weight":"font-light",children:Wt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Sc=`${Yt}/depository`,Cc={startDate:void 0,endDate:void 0,query:""},Ic=Ot((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=hn(Cc),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?Wt(l,!0):"",r=a?Wt(a,!0):"",s=new URLSearchParams(Sc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Hn(Sc+o,zt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),f=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(wc,{filtrationState:d,field:m,onClearFilter:u}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o($e,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),x.length?x.map((e=>o(kc,{...e},String(e.publicId)))):o(_i,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(vc,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Tc=e=>"Image"===e?.contentType&&e?.image?o(ae,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Bc=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Tc(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ke,{version:a?.version,text:a?.text,...a}):null]}))),Mc=new No;function Pc(e){return ko(Mc,e)}yo(Mc,new vo(globalThis?.localStorage));const Vc=`${Yt}/region`;function Rc(e="Москва"){return Pc().location??{name:e}}function zc(e="Москва"){const t=Pc(),n=i((async()=>{if(!t.location){const n=await Rt(Vc);t.location=n??{name:e}}}),[t,e]);return Hn(Vc,n),t}var Dc;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Dc||(Dc={}));const _c=new Intl.NumberFormat("ru",{style:"currency",currency:Dc.RUB}),$c=e=>e?_c.format(e):"",jc="text-m font-light text-secondary-text ",Lc=`${jc} text-left`,Ac=`${jc} pl-5xl text-center`,Oc=`${jc} pl-5xl text-right`,Ec={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Fc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Lc,children:o($e,{size:"text-m",children:"Валюта"})}),o("th",{className:Ac,children:o($e,{size:"text-m",children:"Купить"})}),o("th",{className:Oc,children:o($e,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Uc)})]}))),Uc=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ae,{image:{icon:Ec[t]},width:"24",height:"24"}):null,o($e,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o($e,{size:"text-h6",children:$c(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o($e,{size:"text-h6",children:$c(e?.buyExchangeRate)})})]},t)},Wc={icon:"GpsIcon"},Hc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Er,{...Wc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Yc=(e,t,n)=>{const l=Number(Kc(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Kc=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function qc(e){if(!e)throw new Error("Value should be fulfilled");return e}const Xc=e=>t=>{const[,n]=qc(e.find((([e])=>e(t))));return n(t)},Gc=e=>Xc(e.map((([e,t])=>[e,()=>t])));Gc.if=e=>new Zc(void 0,e);class Zc{parent;predicate;unit;get entry(){return[qc(this.predicate),qc(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Zc(this,e)}then(e){return new Zc(this.parent,this.predicate,e)}else(e){return Xc([...Jc(this),[()=>!0,e]])}}const Jc=e=>[...e?.parent?Jc(e.parent):[],e.entry],Qc=e=>Gc([[e=>e.value!==Dc.RUB&&e.oppositeValue!==Dc.RUB,()=>e.handleConvert(e.value,Dc.RUB)],[e=>e.value===Dc.RUB&&e.oppositeValue===Dc.RUB,()=>e.handleConvert(e.value,Dc.USD)],[e=>e.value===Dc.RUB&&e.oppositeValue===Dc.RUB,()=>e.handleConvert(e.value,Dc.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function ed(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Nn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Vn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const td=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Dc.RUB,selectBuy:n?.[0]?.currency?.currency||Dc.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[ed({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:nd(r,d,n),value:r.inputSell,setValue:e=>ad(d,n)(e,r.selectSell,r.selectBuy)}),ed({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:ld(r,d,t),value:r.inputBuy,setValue:e=>id(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(ke,{text:a.text,version:a?.version,...a}):null]})})),nd=(e,t,n)=>l=>{t({selectSell:l}),Qc({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{ad(t,n)(e.inputSell,l,a)}})},ld=(e,t,n)=>l=>{t({selectBuy:l}),Qc({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>id(t,n)(e.inputBuy,l,a)})},ad=(e,t)=>(n,l,a)=>{e({inputSell:Kc(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(Yc(n,i,l===Dc.RUB)||"")})},id=(e,t)=>(n,l,a)=>{e({inputBuy:Kc(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(Yc(n,i,l===Dc.RUB)||"")})},rd=`${Yt}/exchangerates`;const sd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Hn(rd+`?regionCode=${t}`,zt);return n||{}}(Rc()),i=od(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:Dc.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Dc.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Pe,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[i?o(Fc,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(Hc,{address:a?.address})]}),o(td,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),od=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],cd=d((({className:e="",items:t})=>{const n=xe();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(dd(n))})})),dd=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...be(t),children:a||null})},String(l)):null},md=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:hd(e)}))),hd=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(ud,{className:"w-full border-0 border-b border-solid border-main-divider last:border-b-0",item:e},String(t)))),ud=d((({className:e,item:t})=>{const[n,{toggle:l}]=an(!1);return c(Oi,{className:e,role:"menuitem",children:[c(gi,{className:h("w-full",t.icon?.icon?"py-xs":"py-lg"),embedded:!0,onClick:l,children:[c(ji,{children:[o(Er,{className:"shrink-0",...t.icon}),o($e,{size:"text-h6",font:"font-normal",color:"text-primary-text",children:t.text})]}),o(Li,{iconVersion:"color",size:"medium",isUnfolded:n})]}),o(Ei,{className:"flex flex-wrap gap-lg group-last:last:pb-0",isUnfolded:n,children:t.items?o(cd,{items:t.items}):null})]})})),pd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(gd)}):null)),gd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o($e,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(xd)})]},String(t)),xd=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:fd(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),fd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${bd(t)}`,children:o($e,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},bd=e=>e.replaceAll(/\D/g,""),yd=d((({className:e="",index:t,text:n,...l})=>{const a=xe(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),vd=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o($e,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(yd,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Nd=d((({className:e="",index:t,...n})=>{const l=xe(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),wd=d((({className:e="",links:t,license:n})=>c("div",{className:h("@container space-y-lg",e),children:[n?o("div",{children:o($e,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Nd,{index:t,...e},String(t))))}):null]}))),kd=Ot((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:u,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(md,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(pd,{items:r}),m?o(ke,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Jo,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(Mi,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(vd,{title:d,links:i}),o(wd,{links:a,license:u})]})})),Sd=Ot((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=m?.find((e=>e.name===s.key))?.href;return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(_n,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(Mi,{className:h("w-full @xl:w-auto"),href:u,target:"_blank",version:n?.version??"primary",data:Xo(i,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})})),Cd={width:"103",height:"21"},Id={"bg-white":"color",transparent:"white"},Td={"bg-white":"text-primary-main",transparent:"text-white"},Bd=(e,t,n)=>o(ae,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Id[e]},className:Td[e],width:n?.width,height:n?.height}),Md={"bg-white":"text-primary-text",transparent:"text-white"},Pd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...be(s),children:[Bd(i,n?.image,Cd),r?l??o("div",{className:"ml-s",children:o($e,{font:"font-medium",color:Md[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),Vd={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},Rd=d((({version:e,text:t,mobileText:n,...l})=>{const a=Te()?n:t;return a?o(ke,{className:h("py-s px-lg font-light whitespace-nowrap",Vd["transparent"===e?"transparent":"default"]),...l,children:a}):null})),zd=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=R(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...u}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(Pd,{className:"my-2xs",bgColor:e,logo:u,data:h,showTitle:!1})}):Dd(p,r),o(Rd,{version:a,...l})]})})),Dd=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(q,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,_d={"bg-white":"primary",transparent:"transparent"},$d=Ot((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=_d[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(zd,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),jd=(e=!1)=>e?{}:{padding:"p-0"},Ld={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Ad=Ot((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=R();return o(g,{className:h("relative flex flex-col",Ld[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:V({...c,extraProps:{className:h("w-full",Wi(r)),...jd(l)}})})}),{childrenTypes:[]}),Od=Ot((e=>o(Ad,{...e})),{childrenTypes:[]}),Ed=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",Yr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ae,{image:l})})})),Fd=["байт","Кб","Мб","Гб","Тб","Пб"],Ud=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...be(i),children:[e,t?c($e,{size:"text-l",font:"font-light",children:[t," ",Wd(d,m),o($e,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),Wd=(e,t)=>e||t?o("span",{children:", "}):"",Hd=(e,t)=>(n,l)=>{const a=W(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${Fd[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?Kd(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(Ud,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Yd(t),data:n?.data}),o(De,{__html:n?.__html})]},String(l))},Yd=e=>e?o(ae,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Kd=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},qd=d((({href:e,__html:t,target:n,onClose:l})=>c(fi,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:l,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Mi,{href:e,target:n,version:"primary",ariaLabel:"Ссылка на согласие",onClick:l,children:"Я согласен"}),o(gi,{type:"button",version:"secondary",onClick:l,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),Xd=d((({text:e,href:t,target:n,__html:l,icon:a})=>{const{open:r}=pn(qd),s=i((()=>r({__html:l,href:t,target:n})),[l,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[Yd(a),o($e,{font:"font-light",children:e})]}):null})),Gd={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Zd=Ot((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=R();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Gd[r]),role:"list",children:a.map(Jd(d,i))}):null]})})),Jd=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Qd(t)(n,l):Hd(e,t)(n,l)},Qd=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(Xd,{...l,icon:e,href:em(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},em=e=>"href"in e,tm=Ot((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ae,{className:"hidden lg:block",image:i}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:We(l,{className:"flex-wrap"}),children:[a?o($e,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(De,{__html:r,itemSize:"list-m"}):null,o($e,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:d})}):null,i?.src?o(ae,{className:"lg:hidden",image:i}):null]})]})})})),nm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",lm=(e=[],t={})=>e.filter((({content:e={}})=>Rr(t,e))).length,am=(e,t)=>e===t;const im=(e=>(t,n)=>t===n||Boolean(t&&n&&Object.keys(t).length===Object.keys(n).length&&Object.entries(t).every((([t,l])=>e(l,n[t])))))(function(...e){return(t,n)=>e.some((e=>e(t,n)))}(am,((e=am)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))())),rm=[],sm={},om={primary:"bg-white/30",secondary:"bg-main-divider"},cm={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},dm=d((({count:e,version:t="secondary"})=>{const n=Te(),l=n?"bg-main-divider":om[t],a=cm[t][n?"mobile":"desktop"];return o("div",{className:h("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o($e,{size:"text-xs",color:a,children:e})})})),mm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ae,{className:h("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},hm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},um={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},pm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},gm={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},xm=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:u,...p}=t;return o(i,{className:h("h-12","block flex-1","cursor-pointer",hm[l],n?gm[l]:pm[l]),"aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?um[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[mm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(dm,{count:m,version:nm(n,l)})}):null]})})})),fm=d((e=>o(e?.item?.href?bm:ym,{...e}))),bm=d((e=>{const t=xe(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(xm,{...e,tag:"a",item:a,onClick:l})})),ym=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(xm,{item:e,onClick:l,...n})})),vm=(e,t,n)=>(l,a)=>o(fm,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Nm=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:h("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(vm(l,a,t))}))),wm={categories:[],extraOptions:[],propertyType:[],stage:[]},km=Ot((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=Dr(wm,{block:a.block,page:a.options?.page}),x=i(((e=wm)=>p(e)),[]),f=(({hotFilters:e=rm,filtrationState:t=sm,blocks:n=rm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>im(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:lm(n,t.filter),version:nm(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Nm,{...f}),o(Ir,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(wr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Sm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Cm=d((({children:e})=>Sm?e:null)),Im="/icons/MapMarkerClusterIcon.svg",Tm="/icons/MapMarkerClusterYellowIcon.svg";function Bm({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=Mm("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=Mm("workplaces",e,a),r=Pm(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Pm(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=Pm(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Mm=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Im:Tm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Pm=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Im:Tm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Vm={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Rm={...Vm,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},zm=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Rm).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(q,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Dm=e=>globalThis[e];function _m(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=Dm(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Dm(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Dm(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const $m={...Vm,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},jm=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values($m).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(q,{name:n,width:"20",height:"16"})})})),Lm=[55.753995,37.614069],Am=d((({points:e,className:t="",zoom:n=5,isLoad:l,selectedAddress:i})=>{const r=s(null),d=s(null),m=_m("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${D.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{r.current?Bm({yandexMaps:m,map:r.current,points:e,isLoad:l}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:Om(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Bm({yandexMaps:m,map:r.current,points:e,isLoad:l})})),r.current&&i&&m?.geocode(i).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();r.current.setCenter(t),r.current.setZoom(18)}))}),[m,e,n,l,i]),!m)return null;const u="z-10";return c("div",{ref:d,className:h("relative","w-full",t),children:[l?o(Ii,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",u),children:[o(jm,{yandexMaps:r}),o(jm,{yandexMaps:r,direction:"out"})]}),zm(r,m,h("right-2 top-80",u))]})})),Om=e=>{const t=[Fm(Em(e,0)),Fm(Em(e,1))];return t.every((e=>e))?t:Lm},Em=(e,t)=>e.map((e=>e.coords?.[t])),Fm=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Um={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Wm={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Hm={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},Ym="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Km=d((({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Ql,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]],[m,{toggle:h}]=an(!1);return o("div",{children:e?.length?o("div",{children:c(Oi,{children:[c("div",{children:[o("div",{className:Ym,children:s}),o(Ei,{className:Ym,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[l?o(Ai,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,short:!0,onClick:h}):null,c(gi,{embedded:!0,onClick:n,children:[o(ji,{children:"Очистить фильтр"}),o(q,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),qm=(e,t,n)=>{const l=nm("all"===t),a=nm("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(gi,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(gi,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},Xm=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ae,{image:e.image}):null,e?.text?o($e,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Gm=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o($e,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Zm=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>Hm[t](e)))))},Jm=()=>{},Qm=()=>{},eh=e=>"all"===e?"block":"hidden",th=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Qm,renderRemoteWorkplaceCard:s=Qm,getBalloon:d=Qm,getBalloonRemoteWorkplaces:m=Qm,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=hn(Um),{filteredItems:y,points:v,filteredRemoteWorkplaces:N,lengthItems:w}=(({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:l=Jm,getBalloonRemoteWorkplaces:a=Jm})=>{const[i,s,o,c]=r((()=>{const i=Zm(e,n),r=Zm(t,n),s=[...i.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l(e)}))),...r.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[i,s,r,i.length+r?.length]}),[e,t,n,l,a]);return{filteredItems:i,points:s,filteredRemoteWorkplaces:o,lengthItems:c}})({data:t,remoteWorkplaces:a,filtrationState:x,getBalloon:d,getBalloonRemoteWorkplaces:m}),[k,S]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[Gm(p,w),u?Xm(u):null,g&&qm(t,k,S),o("div",{className:h("pb-3xl",eh(k)),children:o(Km,{filters:nh([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:Wm})})]}),o("div",{className:"h-[600px]",children:o(Cm,{children:o(Am,{points:v,isLoad:n,className:"h-full"})})})]}),c(Cm,{children:[y.map(i),N.map(s)]})]})})),nh=e=>Object.keys(Um).filter((t=>e.filter((e=>Hm[t](e))).length)),lh=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",ah={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"}},ih=d((({className:e,children:t,color:n="gray"})=>c("div",{className:h("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",ah[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ae,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o($e,{size:"text-m",color:ah[n].text,children:t})]}))),rh=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:sh({textItems:i,subText:t,children:n,isPhone:l,...a})})),sh=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o($e,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||oh(n,s),a?o($e,{color:l,size:"text-m",children:a}):null]}),oh=(e,t)=>e.filter(Boolean).map(((e,n)=>o($e,{size:"text-l",children:t?o("a",{href:`tel:${ch(e)}`,children:e.trim()}):e.trim()},String(n)))),ch=e=>e.replace(/\D/g,""),dh=d((({className:e,children:t})=>o("div",{className:h("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),mh=d((({children:e})=>{const[t,{toggle:n}]=an(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Oi,{className:"block sm:hidden",children:[o(Ei,{isUnfolded:t,children:e}),o(Ai,{className:"my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),hh=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:lh(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{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($e,{size:"text-h4",children:lh(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(ih,{color:"green",children:lh(s)})})]}),o(mh,{children:o(dh,{className:"flex-wrap",children:m?.map(((e,t)=>o(rh,{...e},String(t))))})})]},String(d))},uh=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${lh(t)} №${n}`,body:e.toUpperCase()}),ph=[];const gh=async e=>{const t=await Rt(e,{method:"GET"});return Array.isArray(t)?t:ph},xh={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},fh={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},bh=d((({descriptionData:e,className:t})=>{const n=Rc(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Hn(`${Yt}/atms?regionCode=${e}`,gh);return{data:t||ph,isLoad:!t&&!n}}(l);return o(th,{className:t,filterItems:yh,data:a,isLoad:i,initFilterState:xh,renderCard:hh,getBalloon:uh,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),yh=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>fh[t](e))),n=!l.length||l.some((t=>fh[t](e)));return t&&n}))},vh=e=>{const t=wh(e);return o(rh,{label:"Режим работы",value:t,className:"max-w-none"})},Nh=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",wh=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Nh({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Nh({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},kh=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Sh=e=>kh.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Ch=e=>{if(!e)return null;const t=Ih(e);return c(dh,{className:"border-none",children:[o(rh,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Th)})}),o(rh,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]})},Ih=e=>{const t=kh.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},Th=({short:e,status:t},n)=>o("div",{className:h("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o($e,{size:"text-xs",children:e})},String(n)),Bh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(rh,{label:"Валюта",value:e.currency}):null,t?o(rh,{label:"Купить",value:String(t)}):null,n?o(rh,{label:"Продать",value:String(n)}):null]},String(l)),Mh=(new Date).getDay(),Ph=e=>{const[t]=e?.slice(Mh-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(ih,{color:"green",children:a}):null,n&&i?o(ih,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(ih,{color:"red",children:"Выходной"})},Vh=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Rh=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(rh,{label:e,value:t&&n?n:"",subText:Vh({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),zh=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Dh=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,_h=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,$h=(e,t)=>{if(!e.workSchedule)return null;const n=Sh(e.workSchedule);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e.address})]}):null]}),Ph(n)]}),o(mh,{children:jh(e)})]},String(t))},jh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Sh(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(dh,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(rh,{label:"Факс",value:t,isPhone:!0}),o(rh,{label:"Телефон филиала",value:e,isPhone:!0}),o(rh,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(rh,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(rh,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(rh,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(dh,{children:o(rh,{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(Rh)})})}):c(dh,{children:[o(rh,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Th)})}),vh(d)]}),r?.businessScheduleVisibleTag?Ch(r?.businessScheduleDescription):null,s?.currencies?.length?o(dh,{className:"flex-wrap",children:s?.currencies?.map(Bh)}):null]})},Lh=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Sh(e),n=e?wh(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?zh(n):_h(n,l):Dh(n):""})(n)}`;return{header:l,body:i}},Ah=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o($e,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(q,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e})]}):null]})}),o(mh,{children:Oh(t)})]},String(n)):null,Oh=e=>c("div",{children:[c(dh,{className:"flex",children:[o(rh,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(rh,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание банковских карт"})}),o(rh,{label:"Операции для физических лиц",children:o($e,{children:"Инвестиционное и накопительное страхование"})}),o(rh,{label:"Операции для физических лиц",children:o($e,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(rh,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]}),Eh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Fh={branches:[],remoteWorkplaces:[]};const Uh=async e=>await Rt(e,{method:"GET"})||Fh,Wh=d((({className:e})=>{const t=Rc(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=Hn(`${Yt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,Uh);return{data:t||Fh,isLoad:!t&&!n}}(n);return o(th,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:$h,renderRemoteWorkplaceCard:Ah,getBalloon:Lh,getBalloonRemoteWorkplaces:Eh,title:`Офисы филиала ${t?.name}`})})),Hh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:h(t),defaultPadding:"p-0",...n,children:"offices"===l?o(Wh,{}):o(bh,{descriptionData:e})})})),Yh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),Kh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:h("overflow-hidden relative",e),padding:t,...l,children:o(vr,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(et,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),qh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ue(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Xh({__html:i,richVersion:r}):null,Gh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Gh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Gh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?We([l]):null]})]}))),Xh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),Gh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(q,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o($e,{size:"text-xl",color:l,children:t})]})]}):null,Zh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(De,{__html:t,richVersion:n})})})),Jh=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Qh=Ot((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:l="default",label:a,version:i,role:r,...s})=>{const d=Te(),[m,{toggle:u}]=an(t),p=o(Ei,{className:h("gap-lg",Jh(d)),isUnfolded:m,children:V({...s,extraProps:{className:"w-full",padding:"p-0"}})}),x="accordion"===l,f=o(Ai,{className:h(x?"text-h6 my-lg":"text-h4"),label:a,isUnfolded:m,embedded:x,onClick:u});return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:r,...s,children:c(Oi,{children:[n?f:p,n?p:f]})})}),{childrenTypes:{exclude:["RollupItem"]}}),eu=d((({name:e,text:t,value:n,checked:l,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:h(yn.split(" ").filter((e=>"rounded"!==e)),Zl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o($e,{color:"text-primary-text",children:t}):null]})}))),tu=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(eu,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(eu,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),nu=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Vn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),lu=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],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(nu,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(nu,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),au=["От 1 дня","До 365 дней"],iu=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o($e,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(il,{min:1,max:365,value:e,items:au,onChange:t})]}))),ru=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],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(nu,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(nu,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),su=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,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(lu,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:ou(m)}),o(iu,{days:a,setDays:e=>m({days:e})}),o(ru,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:cu(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(tu,{}),o(gi,{className:"order-6",version:"primary",onClick:h,children:"Офисы на карте"})]})]}))),ou=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},cu=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},du=d((({days:e,tariffs:t=[]})=>{const n=hu(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[mu("Аренда за",e),mu("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(q,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),mu=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),hu=(e,t)=>{const n=uu(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},uu=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},pu=(e,t)=>e.find((e=>e.branchCode===t)),gu=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=pu(l,n.selectedBranch),d=xu(s?.safeBoxCaseVolumes),m=fu(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=bu(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(su,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(du,{days:n.days,tariffs:h})]})})),xu=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],fu=(e,t)=>e?.find((e=>e.volume===t)),bu=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,yu=`${Yt}/safeboxes`,vu=[];const Nu=async e=>await Rt(e,{method:"GET"})||vu,wu=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Ma(),p=ku(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`${yu}?regionCode=${e}`:null,Nu);return t||vu}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=pu(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(gu,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Am,{points:b,className:"h-[640px]"}):null]})})),ku=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Su={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"},Cu=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Iu(e,n)(l,a)}),c("div",{className:h("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Tu(l),i?.text?o(ke,{className:"box-border py-s w-full mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},Iu=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=Bu(e,i),s=i?"transparent"===t:t;return o(g,{className:h("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Mu({step:n,iconVersion:a,i:l,stepVersion:t})})})},Tu=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:h("text-s font-light text-left",Su.description),children:e.description}):null,o(De,{__html:e.__html})]}),Bu=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Mu=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Ue(e?.icon)?o(ae,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:h("text-h4","transparent"===l?Su.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},Pu=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:h("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(Cu(d,r,i))}):null,We(a,{isVertical:!0})]})})),Vu=d((({isActive:e,item:t,onClick:n})=>c("div",{className:h(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(q,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),Ru=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{onClick:a,className:h("relative bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(xi,{className:"absolute top-1.5 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})));function zu(e,t,n){a((()=>e.subscribe(t,(e=>{const t=e?.type;if(t&&"string"==typeof t){const l=n[t];l&&l(e)}}))),[e,t,...Object.values(n)])}const Du=()=>{const[e,{push:t,pop:n,clear:a}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}();return zu(pe.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},_u=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const $u=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(ju,{...e},String(t))))})]}):null,ju=d((({icon:e,...t})=>{const n=xe(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Lu=(e,t)=>n=>n.name?o(Go,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Xo(e,n.name),children:o($e,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Au=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:h(yn,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Ou=d((({defaultLocation:e})=>{const t=Rc(e),n=xe(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(Go,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Eu=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=zc(t?.default),[s,d]=l(""),m=Ma(),h=r((()=>Uu(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),u=r((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,Fu)),[h]),p=i((e=>{a.location=e,n?.()}),[a,n]);return c(fi,{className:"pb-20",head:c("div",{children:[o($e,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(Ou,{defaultLocation:t?.default}),o(Au,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:h.filter((({name:e})=>e&&_u(e.toLowerCase())(s.toLowerCase())>=.8)).map(Lu(t?.dataSelect,p))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((g=p,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o($e,{size:"text-h6",children:e})}),t.map(Lu(x,g))]},e)))}),$u(e)]});var g,x})),Fu=e=>e.name?.charAt(0)??"",Uu=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Wu=d((({menuRef:e,menuItem:t,locationDialogProps:n,onClose:l})=>{const i=pn(Eu,n),{name:r}=Rc(),s=e?.current?.getBoundingClientRect(),c=J(Z.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open({}),"reload"===e.data.type&&l?.(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[l]),o(Ru,{head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),onClick:e=>e.stopPropagation(),onClose:l,children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Hu="burgerMenuDialog",Yu=({menuRef:e,centralMenuItem:t,locationDialogProps:n,onClose:l=bn})=>{const{open:a}=pn(Wu),[r]=Du(),s=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Hu,r),o=i((()=>a({menuRef:e,locationDialogProps:n,menuItem:t,onClose:l},{id:Hu})),[e,n,t,l]);return[s,{toggle:s?l:o}]},Ku=[],qu=Ot((({sticky:e,...t})=>{const{menuItems:n=Ku}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=l(-1),[x,f]=l(""),{closeAll:b}=ge(),y=i((()=>{p(-1),f(""),b()}),[b]),v=xn(y),N=s(null),[k,{toggle:S}]=Yu({menuRef:N,centralMenuItem:a,locationDialogProps:t.header,onClose:y}),C=(({menuRef:e,dialogRef:t,leftItems:n,rightItems:l,onClose:a})=>{const{open:r,close:s}=ge(),c=i((()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=`${e?.contentWindow?.document.body.offsetHeight}px`}),[]);return i(((i,d)=>{const m="left"===d?n:l,h=e?.current?.getBoundingClientRect();r({id:"left"===d?n[i].title:l[i].title,dialog:o(Ru,{className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:m[i].description||m[i].title})}),onClick:e=>e.stopPropagation(),onClose:()=>{s(),a?.()},children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",src:m[i]?.src,width:h?.width??0,onLoad:c})})})})}),[c,n,l,a])})({menuRef:N,dialogRef:v,leftItems:m,rightItems:h,onClose:y}),I=i((e=>{e.stopPropagation(),y(),S()}),[y,S]),T=i(((e,t)=>{f(t),p(e),b(),C(e,t)}),[b,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Xu(T,"left",{activeIndex:u,currentItemPosition:x})),o(Vu,{item:a,isActive:k,onClick:e=>I(e)}),h.map(Xu(T,"right",{activeIndex:u,currentItemPosition:x}))]})})})),Xu=(e,t,n)=>(l,a,i)=>o(Vu,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),Gu="hidden sm:flex absolute z-40",Zu={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Ju=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=cr({itemCount:t?.length||0});return a((()=>Qu(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Gi,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Zu[i].item,gap:Zu[i].gap,children:t.map(vm(n,l,i))}),s.canScrollLeft?o(pr,{className:h("left-6",Gu,Zu[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(gr,{className:h("right-6",Gu,Zu[i].buttonTop),onClick:s.scrollRight}):null]})})),Qu=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},ep={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},tp=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(ep[t].wrapper,e),children:o(Ju,{className:ep[t].component,tabsType:t,...n})}):null,np=Ot((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=lp(n??{}),p=R(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(rp(f,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(u))),N=f[y],w=f.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[u]?f.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[u])):w;v(-1===e?0:e)}),[b,w,u]);const k=ip(f[y],y),S=i((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[tp({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:ap(t,f),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>P(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(ip)?.filter(Boolean)||[]}),lp=({__id:e,anchor:t})=>t??e??"tabs",ap=(e,t)=>t?.length?t:e,ip=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",rp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),sp={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},op=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:sp[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),cp=d((({className:e="",isOpen:t,onClick:n})=>o(Ai,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),dp={Buttons:({buttons:e})=>We(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ae,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(De,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o($e,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o($e,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(cp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},mp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return hp({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),hp=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in dp))return null;return o(dp[n],{...t,...l})},up=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,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(mp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),pp=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),gp=(e,t)=>e?.length>0?o("div",{className:h("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o($e,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,xp=d((({rows:e})=>{return o(Gi,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=h("flex duration-1000 text-center",0!==n?"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($e,{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(-${pp(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o($e,{size:"text-xl",children:e.data}):null,e?.cols?gp(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),fp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o($e,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(xp,{rows:t.rowsData})})})]},l)}))}))),bp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),yp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:h("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o($e,{size:"text-xl",font:"font-light",color:bp(t===n),children:e||t+1})},e)))}):null,t?o(ke,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(q,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),vp=Ot((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(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(yp,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(fp,{activeTabIndex:r,items:m}),o(cp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o($e,{size:"text-h6",children:"Данных нет"}),o(cp,{onClick:n,isOpen:!0})]})})),Np=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:h("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(vp,{...t,onClick:n})}):null]}))),wp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[u,p]=l(void 0),g=i((e=>p(e)),[]);return c(Np,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(op,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(up,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),kp=({className:e,btnClass:t,canDec:n,canInc:l,dec:a,inc:i})=>n||l?c("div",{children:[n?o(pr,{className:h("absolute z-40",t[0],e),onClick:a}):null,l?o(gr,{className:h("absolute z-40",t[1],e),onClick:i}):null]}):null,Sp=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,kp({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Cp=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],u=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[x,f]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(u||[]).map(((e,t)=>o(wp,{row:e,activeIndex:x,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]],[N,{toggle:w}]=an(!1);return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?c(Oi,{children:[c(Sp,{controls:f,children:[y,o(Ei,{isUnfolded:N,children:v})]}),o(Ai,{className:"text-h4",isUnfolded:N,onClick:w})]}):o(Sp,{controls:f,children:b})})]})})),Ip=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:h("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?Tp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o($e,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Bp(n):null,a?o(De,{richVersion:i,__html:a}):null]})]}))),Tp=()=>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"}),Bp=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Mp=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o($e,{size:"text-h2",children:n})}):null]}))),Pp=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Mp,{prefix:t,unit:n,suffix:l})})})),Vp={AdTile:Ft,ApplicationForm:Di,BankAccountFiltration:jr,BenefitsBlock:Fr,BonusBenefitsBlock:Hr,ButtonsBlock:Kr,CalculatorBonus:os,CalculatorBusinessDeposit:Cs,CalculatorCredit:Os,CalculatorDeposit:ao,CalculatorRefinancing:uo,CardTransfer:Po,Carousel:Lo,CarouselCard:Fo,CarouselCatalogCard:Wo,CarouselLinks:Ko,CarouselRecommendationCard:tc,CarouselTariffsCard:ic,DepositFiltration:dc,Depository:Ic,ErrorBlock:Bc,ExchangeRateTile:sd,Footer:kd,GrantSupport:Sd,Header:$d,Headline:C,HorizontalLayout:Od,ImgBlock:Ed,LinkDocs:Zd,MobileAppTile:tm,MortgageFiltration:km,OfficesAtmsMap:Hh,Placeholder:Yh,ProductBlock:Et,ProductGallery:Kh,RepresentativeOfficeInfo:qh,RichTextBlock:Zh,RollupItem:Qh,SafeDepositRental:wu,StepsBlock:Pu,StickyBottomMenu:qu,TabsLayout:np,TariffsTable:Cp,TextBlock:Ip,UnitBlock:Pp,VerticalLayout:Ad},Rp=me((()=>{a((()=>{tn()}),[]);const e=ln();gn(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");Jt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const zp="cookie",Dp=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=an();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(zp)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(zp,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(xi,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null}));function _p(e){const t=i((({key:t})=>{"Escape"===t&&e()}),[e]);gn(globalThis.document,"keydown",t)}const $p=d((()=>{const[e,{close:t}]=Du(),n=Boolean(e.length);return _p(t),a((()=>{n?globalThis.document?.body.classList.add("no-scrollbar","overflow-hidden"):globalThis.document?.body.classList.remove("no-scrollbar","overflow-hidden")}),[n]),n?o("div",{className:"fixed inset-0 z-50",children:e.map((({dialog:t,id:n},l)=>o("div",{className:h("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==e.length-1}),children:t},String(n||l))))}):null})),jp=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);return zu(pe.observable,"popup",{open:t,close:n}),_p(n),e?o("div",{className:h("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",title:"Всплывающее окно",children:e.popup}):null})),Lp="header",Ap="footer",Op="sticky-footer",Ep={},Fp=d((({className:e,data:t=Ep,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=Lt(s,r);Rp(),zc();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.[Lp]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.[Lp],{...m,slotName:Lp})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[V({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.[Ap],{...m,slotName:Ap})]})]}),a?.[Op]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.[Op],{...m,slotName:Op})}):null,o($p,{}),o(jp,{}),o(Dp,{__html:d?.cookieContent?.__html})]})}));Object.assign(Fp,{childrenTypes:[],slots:()=>[Lp,Ap,Op]});e.Blocks=Vp,e.ContentPage=Fp,e.handlerDecorator=me,e.joinList=Sr,e.locationNavigator=Qt,e.packageVersion="0.14.771",e.projectSettings=D,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=R,Object.defineProperty(e,"__esModule",{value:!0})}));
|