@redneckz/wildless-cms-uni-blocks 0.14.774 → 0.14.776

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.
Files changed (57) hide show
  1. package/bundle/bundle.umd.js +57 -31
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  4. package/bundle/components/Header/useChatBot.d.ts +4 -1
  5. package/dist/components/Header/HeaderChatBotButton.js +2 -2
  6. package/dist/components/Header/HeaderChatBotButton.js.map +1 -1
  7. package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  8. package/dist/components/Header/HeaderSecondaryMenuButton.js +3 -3
  9. package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  10. package/dist/components/Header/useChatBot.d.ts +4 -1
  11. package/dist/components/Header/useChatBot.js +38 -16
  12. package/dist/components/Header/useChatBot.js.map +1 -1
  13. package/dist/hooks/useExternalNS.js +13 -9
  14. package/dist/hooks/useExternalNS.js.map +1 -1
  15. package/lib/components/Header/HeaderChatBotButton.js +2 -2
  16. package/lib/components/Header/HeaderChatBotButton.js.map +1 -1
  17. package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  18. package/lib/components/Header/HeaderSecondaryMenuButton.js +3 -3
  19. package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  20. package/lib/components/Header/useChatBot.d.ts +4 -1
  21. package/lib/components/Header/useChatBot.js +39 -17
  22. package/lib/components/Header/useChatBot.js.map +1 -1
  23. package/lib/hooks/useExternalNS.js +13 -9
  24. package/lib/hooks/useExternalNS.js.map +1 -1
  25. package/mobile/bundle/bundle.umd.js +6 -6
  26. package/mobile/bundle/bundle.umd.min.js +1 -1
  27. package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  28. package/mobile/bundle/components/Header/useChatBot.d.ts +4 -1
  29. package/mobile/dist/components/Header/HeaderChatBotButton.js +2 -2
  30. package/mobile/dist/components/Header/HeaderChatBotButton.js.map +1 -1
  31. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  32. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js +3 -3
  33. package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  34. package/mobile/dist/components/Header/useChatBot.d.ts +4 -1
  35. package/mobile/dist/components/Header/useChatBot.js +38 -16
  36. package/mobile/dist/components/Header/useChatBot.js.map +1 -1
  37. package/mobile/dist/hooks/useExternalNS.js +13 -9
  38. package/mobile/dist/hooks/useExternalNS.js.map +1 -1
  39. package/mobile/lib/components/Header/HeaderChatBotButton.js +2 -2
  40. package/mobile/lib/components/Header/HeaderChatBotButton.js.map +1 -1
  41. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -0
  42. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js +3 -3
  43. package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  44. package/mobile/lib/components/Header/useChatBot.d.ts +4 -1
  45. package/mobile/lib/components/Header/useChatBot.js +39 -17
  46. package/mobile/lib/components/Header/useChatBot.js.map +1 -1
  47. package/mobile/lib/hooks/useExternalNS.js +13 -9
  48. package/mobile/lib/hooks/useExternalNS.js.map +1 -1
  49. package/mobile/src/components/Header/HeaderChatBotButton.tsx +2 -1
  50. package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +13 -7
  51. package/mobile/src/components/Header/useChatBot.ts +58 -26
  52. package/mobile/src/hooks/useExternalNS.ts +14 -9
  53. package/package.json +1 -1
  54. package/src/components/Header/HeaderChatBotButton.tsx +2 -1
  55. package/src/components/Header/HeaderSecondaryMenuButton.tsx +13 -7
  56. package/src/components/Header/useChatBot.ts +58 -26
  57. package/src/hooks/useExternalNS.ts +14 -9
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),r=n("useCallback"),i=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},r=n?.slots?.default,i=l||r&&r();return e(Object.assign(a,i&&{children:i}),n)}return t.inheritAttrs=!1,t},h=(...e)=>e.map((e=>u(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),u=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:r,tag:i="section",role:s,children:c,style:d})=>{const m=t&&n;return o(i,{className:h("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...r?.anchor?{id:r.anchor}:{},role:s,style:d,children:c})})),x=d((({className:e,size:t})=>o("figure",{className:h("m-0 mt-xl min-w-[80%]",e),children:f(t)}))),f=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>o(n,{role:"heading",className:h("font-sans m-0",v[t],e),children:l||a}))),w=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),k={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:r="text-center",as:i,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=k[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:h("whitespace-pre-wrap",r),...u?.title,as:i||u?.title.as,title:l}):null,a?o(w,{size:u.descriptionSize,font:u.descriptionWeight,align:r,...p,children:a}):null]})})),C=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...l}={}){const{key:a,blockDecorator:r=C,blocksRegistry:i={},ancestors:s=I}=t,{type:c}=e;c&&c in i||console.warn(`No block with "${c}" is registered`);const d=c&&i[c];return r({blockClassName:h(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:r})=>{const{content:i}=n;return d?o(d,{className:r,block:e,options:t,...i,...l},a):null}},a)}const B=[],M=(e,{key:t,ancestors:n=B,slotName:l=null,extraProps:a,renderProps:r=T,...i})=>{const s=a?(e,t)=>T(e,t,a):r;return(e||[]).map(((e,a)=>s(e,{...i,key:`${t||e.type}-${a}`,ancestors:i.parent?[...n||B,[i.parent,l]]:n},a)))};function P({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const R=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return R.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),D=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!D(e)&&(!t||"_self"===t)),$=e=>Boolean(e?.startsWith("#")),j=e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),L=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),A=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var O=Object.freeze({__proto__:null,isURL:D,isLocalURL:_,isHash:$,withoutQuery:j,joinPath:L,hasPrefix:A});const E="/api/",F=`${E}v1/storage`,U=[z.CDN,E],W=e=>(t,n)=>{if(H(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return L(A(t)(n)?"":n,l?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},H=e=>!e||D(e)||$(e)||U.some(A(e)),Y={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},X={small:"16",medium:"24",large:"48",xl:"78"},K=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:r="color",size:i,width:s=i&&X[i],height:d=s})=>{const m=V(),u="normal"===r?`${n}.svg`:`sprites.svg#${n}`,p=W(m)(L(z.CDN,"/icons/",u));return"normal"===r?o("img",{className:e,style:q(e,d),src:p,alt:l,title:a,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:h(Y[r],{"w-full h-full":!s,invert:"white"===r},t),width:s,height:d,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:p,xlinkHref:p})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function J(e=""){try{return new URL(e).pathname}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":J(Z.SITE_URL);return t&&!D(t)?W(e)(t,n):t},ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:n,media:a},r)=>o("source",{srcSet:Q(l)(e),type:le(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?ne({...t,src:Q(l)(t.src)},n):null]})})),ne=(e,t="")=>o("img",{src:e.src,className:h("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),le=e=>e?`image/${String(e)}`:void 0,ae=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(K,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(te,{className:e,imageClassName:n,image:t}):null)),re={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ie="bg-main-divider text-main-disabled",se={primary:ie,secondary:ie,white:ie,link:"",transparent:"",gray:ie,"":""},oe="text-center font-sans select-none",ce={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},de=({className:e,rounded:t,version:n})=>[oe,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?re[n]:"",t?"rounded-full":"rounded-md",e].join(" "),me=e=>me._impl(e);function he(e,t){const n=s({});return i((()=>new Proxy({},{get:(l,a)=>(n.current||={},n.current[a]||=n=>e.fire(t,{...n??{},type:a}),n.current[a])})),[e,t])}me._impl=e=>e,me.setup=e=>{me._impl=e};class ue{watchers=new Set;subscribersMap={};subjectsStateMap={};emitter=this;observable=this;watch(e){return this.watchers.add(e),()=>{this.watchers.delete(e)}}subscribe(e,t){this.subscribersMap[e]||=new Set,this.subscribersMap[e]?.add(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.subscribersMap[e]?.delete(t)}}fire(e,t){e in this.subjectsStateMap?this.subject(e,t):this.fireSubscribers(e,t)}subject(e,t){return this.subjectsStateMap[e]!==t&&(this.subjectsStateMap[e]=t??void 0,this.fireSubscribers(e,t)),()=>{delete this.subjectsStateMap[e]}}fireSubscribers(e,t){for(const n of this.subscribersMap[e]??[])n(t??null);for(const n of this.watchers)n({type:e,event:t??null})}}const pe=new ue,ge=()=>he(pe.emitter,"dialog");function xe(){const e=V(),{closeAll:t}=ge();return n=>{const l=W(e)(n.href);return{...n,href:l,"aria-label":n.text,onClick:me((a=>{n.onClick?.(a);const r=J(Z.SITE_URL);fe(l,n.target,r)&&(t(),a?.preventDefault(),e.push(((e,t="")=>e?.replace(t,"")||"/")(l,r)))}))}}}const fe=(e,t,n)=>_(e,t)&&!Z.SUB_PORTALS?.split(",")?.some(A(e))&&A(e)(n||"/"),be=e=>{try{return Array.isArray(e)&&e.length?{"data-aspects":JSON.stringify(e)}:{}}catch(e){return{}}},ye=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:r="primary"}=e,i=Ne(e)&&"hidden lg:block";return c("div",{className:h(ve(e),"flex gap-xs"),children:[l?o("div",{className:h(i,ce[r]),children:l}):null,Ne(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:h(i,ce[r]),children:a}):null]})})),ve=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return h("group/btn items-center justify-center",Ne(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},Ne=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),we=({className:e,rounded:t,version:n})=>["inline-block",oe,n?se[n]:"",t?"rounded-full":"rounded-md",e].join(" "),ke=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const i=(({method:e,href:t})=>r((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:r}=new URL(t||""),i=document.createElement("form");i.setAttribute("method","POST"),i.setAttribute("action",[l,a].join(""));for(const[e,t]of r.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),i.appendChild(n)}document.body.appendChild(i),i.submit()}),[e,t]))({method:n,href:l}),s=xe()({onClick:i,href:l,...a}),c=t??o(ye,{...s});return o(e?Ce:Se,{...s,children:c})})),Se=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:r,rounded:i,onClick:s,type:c,data:d,children:m,text:h})=>o("a",{className:de({className:e,version:r,rounded:i}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${h}`,role:t?"link":"button",onClick:s,type:c,...be(d),children:m}))),Ce=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:we({className:e,rounded:l,version:n}),children:a})));function Ie({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",r="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:h(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:h(de({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),r),onClick:t,children:o(ae,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(ke,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const Te=()=>{const[e,t]=l(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Be={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Me=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&Be[n],t),children:e}):null,Pe=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:i,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Te(),v=V(),N=r((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=x&&!y;return c("div",{className:h("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ie({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:h("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Me(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:h("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[u,f]}),Re(P({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:h("@xl:justify-self-end @xl:col-start-2",{[Ve(p)]:i,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),i?o("div",{className:"self-end",children:i}):null]})]})]})})),Ve=e=>h(e?"row-span-2":"@xl:row-span-2"),Re=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:h("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ae,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((({__html:e="",richVersion:t="",itemSize:n="list-m",isDotted:l=!0,children:a})=>e||a?o("div",{"data-component":"rich-text-container",children:o("div",{className:h(t,n,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",l?"":"without-dots"),dangerouslySetInnerHTML:e?{__html:e}:void 0,children:a})}):null)),_e=(e,t)=>e?o(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,$e=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),je=(e,t)=>e?o($e,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Le=(e,t)=>["label"in e?je(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:_e(e.description,t)},String(t)):null,"__html"in e?o(De,{...e},`rte-${t}`):null],Ae=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:h("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?ze(n.icon,t):null,o("div",{children:Le(n)})]}))),Oe=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:h("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(Ae,{benefitsVersion:t,...e},String(n))))}):null)),Ee=d((({className:e,benefits:t})=>t?.length?o("div",{className:h("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Le)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?Ee:Oe,{...t}))),Ue=e=>Boolean(e?.src||e?.icon),We=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:h("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(He(n))}):null,He=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:r,version:i,...s}=t||{},c=Ye(a,i),d=Ye(r,i);return l||a?.icon?o(ke,{className:h("basis-full @lg:basis-auto",e),appendLeft:Xe({...a,iconVersion:c}),appendRight:Xe({...r,iconVersion:d}),version:i,text:l,...s},n?String(n):""):null},Ye=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},Xe=e=>Ue(e)&&o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ke=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),qe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Ge)}):null)),Ge=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o($e,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ke(2)(t)," ",n||"₽"]}):null]},String(l)),Ze=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Je)}):null)),Je=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o($e,{size:"text-m",font:"font-light",children:e})},String(t)),Qe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},et=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:r="L",align:i="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:h,__html:u,richVersion:p,isFullWidthTitle:g,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:I,...T})=>{const B=y?.src?o(ae,{image:y}):null,M=o(S,{title:l,description:a,headlineVersion:r,align:i,isEmbedded:!0}),P=h?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Pe,{className:e,padding:t,defaultPadding:n,...g?{title:M}:{insetTitle:M},...tt(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:We(b),backwardButton:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,u?o(De,{richVersion:p,__html:u,isDotted:m,itemSize:Qe[r]}):null,I,x?.length?o(qe,{priceList:x}):null,nt(f)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Ze,{tags:e}):null;class lt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof lt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const at=()=>!0,rt=(e,t)=>(...n)=>e(...n)&&t(...n),it=(...e)=>(...t)=>{const[,n]=function(e){if(!e)throw new Error("Value should be fulfilled");return e}(e.find((([e])=>e(...t))));return n(...t)};const st=e=>Boolean(e&&Array.isArray(e)),ot=e=>Boolean(e&&"object"==typeof e&&!st(e)),ct=e=>e;function dt(e){return e instanceof lt?e._:e}class mt extends lt{from(e){return this.of(e.map(((e=ct)=>([,t])=>e(t))(dt)))}entries(){return(this._??[]).map(((e,t)=>[t,this.of(e)]))}size(){return this._?.length??0}get(e){return this.of("number"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of(st(this._)?Array.from({length:Math.max(this._.length,Number(e)+1)},((n,l)=>l===e?t:this._[l])):Array.from({length:Number(e)+1},((n,l)=>l===e?t:void 0)))}}class ht extends lt{from(){return this}entries(){return[]}size(){return 0}get(e){return this.of(void 0!==e?void 0:this._)}set(e,t){return this.of(t)}}class ut extends lt{from(e){return this.of(Object.fromEntries(e.map((([e,t])=>[e,dt(t)]))))}entries(){return Object.entries(this._??{}).map((([e,t])=>[e,this.of(t)]))}size(){return Object.keys(this._??{}).length}get(e){return this.of("string"==typeof e?this._?.[e]:void 0)}set(e,t){return this.of({...this._,[e]:t})}}class pt extends lt{proto=it([e=>st(this._)||"number"==typeof e,()=>mt.prototype],[e=>ot(this._)||"string"==typeof e,()=>ut.prototype],[at,()=>ht.prototype]);from(e){return this.proto(void 0).from.call(this,e)}entries(){return this.proto(void 0).entries.call(this)}size(){return this.proto(void 0).size.call(this)}get(e){return this.proto(e).get.call(this,e)}set(e,t){return this.proto(e).set.call(this,e,t)}}const gt=e=>e instanceof lt?e:new pt(e),xt=e=>{const t=(t,...n)=>dt(e(gt(t),...n));return t.fn=e,t},ft=[],bt=e=>e instanceof Function?e:t=>e===t,yt=e=>(t,n,l=ft)=>gt(t).entries().reduce(((t,[n,a])=>yt(e)(a,t,l.concat(n))),e(n,[l,gt(t)])),vt=xt(((e,[t,n])=>{const[l,...a]=t;return e.set(l,a.length?vt(e.get(l),[a,n]):n)})),Nt=xt(((e,t)=>t.reduce(vt.fn,e))),wt=e=>yt(((e,[t,n])=>kt(n)?[...e,[t,dt(n)]]:e))(e,[]),kt=e=>0===e.size();xt(((e,t=ft)=>t.reduce(((e,t)=>e.get(t)),e)));const St=xt(((e,[t,...n])=>n.length?e.set(t,St(e.get(t),n)):e.filter((([e])=>e!==t)))),Ct=(It=["$ref"]).map(((e,t)=>n=>bt(e)(n[t+n.length-It.length]))).reduceRight(rt,at);var It;const Tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(Bt,e),Bt=it([st,(e,t)=>e[parseInt(t,10)]],[ot,(e,t)=>e[t]],[at,ct]),Mt=(e,t)=>((e,t={})=>n=>Nt(t,wt(n).map((t=>e(t)))))((([e,n])=>{return Ct(e)?[(l=e,l.slice(0,-1)),Tt(t(n),n)]:[e,n];var l}))(e),Pt=e=>wt(e).filter(((e=ct)=>([t])=>e(t))(Ct)),Vt=e=>{return t=Pt(e).map((([,e])=>e)),[...new Set(t)];var t};async function Rt(e,t){try{return e?await zt(e,t):null}catch(e){console.error(e)}return null}const zt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),Dt=e=>[...new Set(e)],_t={},$t=["/portal-resources"],jt=(e,t)=>Mt(e,(e=>t?.[e])),Lt=(e,t)=>{const n=Vt(e),[r,i]=l({});return a((()=>{At(n).then(i)}),[n.join()]),n.length?jt(e,{...t,...r}):e},At=async(e,t={})=>{if(e.length){const n=await(async e=>Object.fromEntries((await Promise.allSettled(Dt(e).filter((e=>!$t.some((t=>e.startsWith(t))))).map((async e=>[e,_t[e]||=await zt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(e),l={...t,...n},a=Object.entries(n).flatMap((([,e])=>Vt(e)));return a.length?At(a,l):l}return t};function Ot(e,t={}){const n=d((t=>{const n=Lt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:r,version:i,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const Et=Ot((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:h("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(et,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Ft=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=i((()=>Ut(0,t?.length)),[t]),l=t?.[n];return l?o(Et,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(x,{})})})),Ut=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Wt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},Ht=e=>e?.replace(/[^+\d]/g,""),Yt="/api/v1";const Xt=e=>e?{phone:Ht(e)}:{},Kt=(e,t="birthday")=>e?{[t]:Wt(e)}:{},qt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Zt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ht(e)}:{},Jt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e??[])t[l??""]?.(n,a)};function Qt(){return Qt._impl()}Qt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Qt.setup=e=>{Qt._impl=e};const en="rshb-query-params";function tn(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(en)||"";return e&&globalThis.sessionStorage?.setItem(en,e),e}const nn=e=>{const t=e.target?.closest("a"),n=Qt();if(D(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=tn();if(!D(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;l&&n.assign(l,t?.target)}};function ln(){return ln._impl()}function an(e=!1){const[t,n]=l(e),a=r((()=>n(!0)),[]),i=r((()=>n(!1)),[]),s=r((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:i,toggle:s}]}ln._impl=()=>({forwardQuery:nn}),ln.setup=e=>{ln._impl=e};const rn=e=>t=>t&&Object.entries(e??{}).flatMap((([e,n])=>n?n(t[e]):[]))||[],sn=e=>!e?.length,on=e=>t=>n=>e(n)?[]:[t],cn={},dn=[];const mn=(e,t)=>e&&t&&(e===t||Object.keys({...e,...t}).every((n=>e[n]===t[n])));function hn(e,{resetOnSubmit:t,formValidator:n,normalizer:o,onChange:c,onSubmit:d}={}){const[m,h]=function(e,t,n){const[i,s]=l(e),o=r((e=>s((l=>{const a=e instanceof Function?e(l):e,r=t?t(a):a,i=mn(a,r)?a:r;return!mn(l,i)&&n?.(i),i}))),[t,n]);return a((()=>{t&&s(t)}),[t]),[i,o]}(e,o,c),[u,{setTrue:p,setFalse:g}]=an(!1),x=s({}),[f,{isValid:b,errors:y}]=function(e,t){const n=i((()=>t?.(e)??cn),[t,e]),l=i((()=>rn(n)(e)??dn),[n,e]),a=sn(l);return[n,{isValid:a,errors:l}]}(m,n),v=r(((e,t={})=>{const{parse:n,format:l,onChange:a}=t,r=m[e],i=u||x.current?.[String(e)],s=t?.validator??f[e],o=i&&s?s(r):[];return{value:l?l(r):r,isDirty:i,errors:s&&o,error:o[0],onChange:t=>{x.current||={},x.current[String(e)]=!0;const l=n?n(t):t;a?.(l),h((t=>({...t,[e]:l})))}}}),[m,u,f,h]),N=r((e=>{x.current=e,h(e)}),[h]),w=r((()=>{x.current={},g(),h(e)}),[e,h]),k=r((e=>{e.preventDefault(),b?(t&&w(),d?.(m,e)):p()}),[t,m,b,w,d]);return[m,{errors:y,field:v,update:N,reset:w,onSubmit:k}]}const un=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container space-y-lg",children:[n?o(N,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})}));function pn(e,t={}){const{open:n,close:l,...a}=ge();return{open:r(((a,r={})=>n({dialog:o(e,{...t,...a,onClose:()=>{l(),a.onClose?.()}}),...r})),[e,n,l]),close:l,...a}}function gn(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function xn(e){const t=s(null),n=r((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return gn(globalThis.document,"click",n),t}const fn=({label:e,errors:t})=>e&&t?`${e}*`:e,bn=()=>{},yn="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",vn=e=>e?o($e,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,Nn=d((({key:e,className:t,id:n,name:l,type:i="text",label:d,placeholder:m,value:u="",valid:p=!0,pattern:g,autoFocus:x=!1,isTextarea:f=!1,disabled:b=!1,children:y,onChange:v,onFocus:N,onBlur:w})=>{const k=s(null),S=r((e=>{const t=(e.target?.value??"").trimStart();v&&v(t)}),[v]);a((()=>{x&&k.current?.focus()}),[x,k]);const C=y?"pr-3xl":"",I=(e=>e?yn:"border-error")(p),T=d??l??n;return c("div",{className:h("relative",t),children:[c("label",{className:"space-y-xs",children:[vn(d),f?o("textarea",{className:h("block resize-y min-h-24",wn,I),id:h("textarea",n),value:u,name:l||n,placeholder:m,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e):o("input",{ref:k,className:h("h-14",wn,C,I),id:n,type:i,value:u,name:l||n,placeholder:m,pattern:g,disabled:b,"aria-label":T,onChange:S,onFocus:N,onBlur:w},e)]}),y]})})),wn="w-full border rounded-md text-primary-text outline-none p-m",kn=e=>o("div",{className:"h-6",children:e?o($e,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),Sn=d((({className:e,label:t,value:n="",placeholder:l,error:i,errors:s,onChange:d=bn,onBlur:m,isTextarea:u,type:p,isInteger:g=!1,maxLength:x,disabled:f=!1})=>{const[b,{setFalse:y,setTrue:v}]=an(),N=xn(y),w=r((e=>{!b&&v(),x?e.length<=x&&d(e):d(e)}),[b,d]);return a((()=>{g&&n&&d(Cn(n))}),[n]),c("div",{className:h("shrink-0 w-full",e),ref:N,onBlur:y,onFocus:v,children:[o("div",{children:o(Nn,{disabled:f,type:p||"text","aria-label":t,label:fn({label:t,errors:s}),valid:Boolean(!i),value:n,onChange:w,onBlur:m,isTextarea:u,placeholder:In(l,s,t)})}),kn(i)]})})),Cn=(e="")=>e.replace(/[^\d]+/g,""),In=(e,t,n)=>t&&!n?`${e}*`:e,Tn=e=>e?.text||e?.key||"",Bn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Mn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:r})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:Bn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:Tn(e)}),o(K,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:r,className:h("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));function Pn({isOpen:e,options:t,value:n,query:l,onChange:i,onClose:c,iconVersion:d}){const m=he(pe.emitter,"popup"),h=r((()=>{m.close(),c&&c()}),[c]),u=r((e=>{h(),i&&i(e)}),[h,i]),p=s(null),g=xn(h);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:r,left:i,width:s,height:c}=a.getBoundingClientRect();m.open({popup:o(Mn,{popupRef:g,options:t,value:n,query:l,onChange:u,iconVersion:d}),top:r+window.scrollY+c,left:i,width:s})}),[e,t,n,l,u]),p}const Vn=d((({className:e,label:t,options:n=[],value:a,valid:i=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,disabled:u=!1,iconVersion:p="black",onChange:g})=>{const[x,{setFalse:f,setTrue:b}]=an(),[y,v]=l(""),N=Dn(u,n.length),w=x&&!N,k=r((()=>{N||b()}),[N]),S=r((()=>{v(""),f()}),[]),C=Pn({isOpen:x,options:n,value:a,query:y,onChange:g,onClose:S,iconVersion:p});return c("div",{className:h("space-y-xs",e),children:[vn(t),c("div",{className:h("relative",w?"z-20":"z-10"),ref:C,children:[c("div",{className:h("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",zn(s,i,N)),onClick:w?S:k,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:Tn(a)||d}),Rn(w,p)]}),m&&w?o("div",{className:h("absolute top-0 w-full z-20"),children:o(Nn,{type:"text",value:y,autoFocus:!0,disabled:N,onChange:v})}):null]})]})})),Rn=(e,t)=>o(K,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),zn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Dn=(e,t)=>e||0===t,_n=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Vn,{...a,valid:!n,label:fn({label:t,errors:l})}),kn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],jn=d((({field:e,input:t})=>o(_n,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),Ln=(e="")=>Boolean("trade"===e||"all"===e),An=e=>null!=e,On=new Map,En=(e,t=On)=>n=>{const l=Un(n),a=t.get(l);if(l&&An(a))return a;const r=e(...n);return l&&An(r)&&t.set(l,Promise.resolve(r)),r},Fn=e=>Boolean(e?.every((e=>Array.isArray(e)?Fn(e):!e||"string"==typeof e))),Un=e=>Fn(e)?e.toString():"",Wn=e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]);function Hn(e,t,{fallback:n,cache:r}={}){const s=i((()=>Yn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(An))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await En(t,r)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,r,s]);const h=n&&Wn(s)&&n[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Yn(e){return Array.isArray(e)?e:e instanceof Function?Yn(e()):[e]}const Xn=`${Yt}/branches`,Kn=[];const qn=async e=>await Rt(e,{method:"GET"})||Kn;function Gn(e=!1){const{data:t}=Hn(`${Yt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,zt);return Array.isArray(t)?t:[]}const Zn=(e="")=>"ULTRASERVICE"===e,Jn=d((({field:e,input:t,params:n})=>{const l=Zn(n?.typeForm),r=e("region"),i=r?.value?.key,s=r?.value?.text,c=l?Gn(l)?.find((e=>e?.region===s))?.branches:function(e){const{data:t}=Hn(e?`${Xn}?regionCode=${e}`:null,qn);return t||Kn}(i)?.filter((e=>e?.address));return a((()=>{""!==r?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[r?.value]),o(_n,{label:"Отделение",placeholder:"Выберите отделение",options:(c||[]).map((({address:e=""})=>({key:e,text:e}))),...e(t?.name??""),isSearch:!0})})),Qn=(e,{normalize:t,format:n})=>{const{value:a,onFocus:i,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=r((e=>{d(!0),i&&i(e)}),[]),h=r((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:h}},el=(e,t,n)=>Math.max(t,Math.min(e,n));function tl(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function nl({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:r,onChange:i}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:h("w-2 h-2 rounded-full",s<=t||r?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:r,onChange:t=>{const n=tl(t.target?.value),l=e.length?e[n]:n;i&&i(l||0)}})})]})}const ll=1,al=100,rl=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:i=(a.length?0:ll),max:s=(a.length?a.length-1:al),step:d=1,value:m=a[0]||i,disabled:u=!1,onChange:p}=e,g=Qn(e,{normalize:(e=0)=>a.length?il(a)(e):el(e,i,s),format:Ke()}),x=r((e=>{p&&p(tl(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:h("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",yn,"disabled:border-gray disabled:bg-main-divider"),disabled:u,onChange:x,...g}),nl({list:a,min:i,max:s,step:d,disabled:u,value:m,onChange:p})]}),sl(l)]})})),il=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),sl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),ol=["От 1 000 ₽","До 1 000 000 000 ₽"],cl=d((({field:e,input:t})=>o(rl,{title:"Сумма, ₽",items:ol,min:1e3,max:1e9,...e(t?.name??"")}))),dl=d((({field:e,input:t})=>o(Sn,{label:"Годовая выручка, ₽",...e(t?.name??"")}))),ml="client",hl=[{key:ml,text:"Клиент"},{key:"representative",text:"Представитель клиента"}],ul=d((({field:e,input:t})=>o(_n,{label:"Тип обратившегося",...t,options:hl,...e("applierType")}))),pl=d((({field:e,input:t})=>o(Sn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e(t?.name??"")}))),gl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:r,max:i,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>n)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=xl(t,e),c=fl(t,r,i);h.push(o("td",{children:o("div",{className:bl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},xl=(e,t)=>t&&e.toDateString()===t.toDateString(),fl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),bl=(e=!1,t=!1)=>h("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),yl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],vl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:r=bn})=>{const{firstDayOfWeek:s,totalDays:d}=i((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:yl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:gl({firstDayOfWeek:s,today:e,totalDays:d,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:r})})]})})),Nl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"];const wl=e=>"_"===e,kl=e=>/\d/.test(e),Sl=e=>wl(e)||kl(e),Cl=1940,Il={name:"CalendarIcon",iconVersion:"black",width:"24",height:"24"},Tl=d((({setSelectedMonth:e,setSelectedYear:t,className:n,value:r,disabled:i,onChange:d,onClick:m})=>{const u=s(null),[p,g]=l(r||"");return a((()=>{g(r||"")}),[r]),a((()=>{Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d})}),[p]),c("div",{onClick:()=>{null!==u.current&&u.current.focus(),m?.()},className:h("relative",n),children:[o("input",{ref:u,className:"h-full w-full px-m text-l text-black focus-visible:outline-none",value:p,type:"text",onChange:e=>{const t=e.target?.value;"string"==typeof t&&t?.length<11&&g(function(e,t){const n=e.replace(/\D/g,"");if(""===n||n.length===t.length)return e;const l=[...t],a=l.findIndex(wl),r=l.map(((e,t)=>Sl(e)?l.slice(0,t).filter(Sl).length:-1)),i=l.map(((e,t)=>kl(e)?e:n.charAt(r[t])||e)),s=r.indexOf(n.length-1)+1;return i.slice(0,Math.max(a,s)).join("")}(t,"__.__.____"))},onBlur:()=>{Bl(p)?Ml({inputValue:p,setSelectedMonth:e,setSelectedYear:t,onChange:d}):g(r||"")},disabled:i}),i?null:o(K,{className:"mr-s",...Il})]})})),Bl=e=>{const[t,n,l]=e.split(".");if((e=>Number(e)>=Cl&&Number(e)<=(new Date).getFullYear())(l)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(l),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;return Number(t)>0&&Number(t)<=a}return!1},Ml=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:l})=>{if(Bl(e)){const{day:a,month:r,year:i}=(e=>{const[t,n,l]=e.split(".");return{day:Number(t),month:Number(n)-1,year:Number(l)}})(e);t(r),n(i),l?.(new Date(i,r,a))}},Pl=({handleChangeVisibleCalendar:e,value:t,valid:n,onChange:l,setSelectedMonth:a,setSelectedYear:r,disabled:i=!1})=>o(Tl,{onChange:l,disabled:i,onClick:e,value:t&&Wt(t),setSelectedMonth:a,setSelectedYear:r,className:h("flex justify-between items-center h-14 border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error")}),Vl=Nl.map((e=>({key:e}))),Rl=Array.from({length:(new Date).getFullYear()-Cl+1},((e,t)=>Cl+t)).reverse().map((e=>({key:String(e)}))),zl=(e,t)=>{const n=new Date(e,t,1);let l=0;for(;n.getMonth()===t;)l++,n.setDate(n.getDate()+1);return l},Dl=({maxDateOfMonth:e,selectedYear:t,selectedMonth:n,value:l,onChange:a})=>{l&&a?.(new Date(t,n,Math.min(e,l.getDate())))},_l={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},$l={className:"min-w-32",iconVersion:"black",isBorder:!1},jl=d((({className:e="",label:t="",value:n,valid:i=!0,minDate:s,maxDate:d,disabled:m,onChange:u})=>{const[p,{setValue:g,setFalse:x}]=an(!1),[f,b]=l(n?.getMonth()||(new Date).getMonth()),[y,v]=l(n?.getFullYear()??(new Date).getFullYear()),N=r((e=>{u?.(e),x()}),[u]),{handlePrevMonth:w,handleNextMonth:k,handleSelectMonth:S,handleSelectYear:C,monthsOptions:I,yearsOptions:T,handleChangeVisibleCalendar:B,ref:M}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:i,onChange:s,value:o})=>{const c=xn(r((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:r((()=>e(!t)),[t]),handleNextMonth:r((()=>{n+1<=11?l(n+1):(l(0),a(i+1))}),[n]),handlePrevMonth:r((()=>{n-1>=0?l(n-1):(l(11),a(i-1))}),[n]),handleSelectMonth:r((({key:e})=>{l(Nl.indexOf(e));const t=zl(i,Nl.indexOf(e));Dl({maxDateOfMonth:t,selectedYear:i,selectedMonth:Nl.indexOf(e),value:o,onChange:s})}),[o]),handleSelectYear:r((({key:e})=>{a(Number(e)),o&&s?.(new Date(Number(e),n,o?.getDate()))}),[o]),monthsOptions:Vl,yearsOptions:Rl,ref:c}})({onYearSelect:v,onMonthSelect:b,onShowCalendar:g,selectedYear:y,selectedMonth:f,showCalendar:p,onChange:u,value:n}),P=((e,t)=>{const[n,r]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();r(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(M,370);return c("div",{className:h("space-y-xs",e),ref:M,children:[vn(t),c("div",{className:"relative",children:[Pl({handleChangeVisibleCalendar:B,value:n,valid:i,onChange:u,disabled:m,setSelectedMonth:b,setSelectedYear:v}),p&&!m?c("div",{className:h("absolute bg-white z-20 select-none",{"bottom-full":P}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:w,children:o(K,{..._l,className:"-rotate-90 cursor-pointer"})}),o(Vn,{onChange:S,value:{key:Nl[f]},options:I,...$l}),o(Vn,{onChange:C,value:{key:String(y)},options:T,...$l}),o("div",{className:"my-auto",onClick:k,children:o(K,{..._l,className:"rotate-90 cursor-pointer"})})]}),o(vl,{today:n,currentMonth:f,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),Ll=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:h("shrink-0 w-full",e),children:[o(jl,{label:fn({label:t,errors:l}),valid:Boolean(!n),...a}),kn(n)]}))),Al=d((({field:e,input:t})=>o(Ll,{label:t?.label||"Дата рождения",...e(t?.name??"")}))),Ol=d((({field:e,input:t})=>o(Sn,{label:"Количество объектов инкассации",isInteger:!0,...e(t?.name??"")}))),El=d((({field:e,input:t})=>o(Sn,{className:"col-span-2",...e(t?.name??""),placeholder:"Ваше сообщение",isTextarea:!0}))),Fl=d((({field:e,input:t})=>o(Ll,{label:"Желаемая дата встречи",...e(t?.name??"")}))),Ul=d((({field:e,input:t})=>o(Sn,{label:"Электронная почта",...e(t?.name??""),...t}))),Wl=[{key:"ULTRASERVICE",text:"Ультра"}],Hl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Yl=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Xl=d((({field:e,input:t})=>o(_n,{label:"Способ получения ответа",options:Yl,...e(t?.name??"")}))),Kl=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...e(t?.name??""),...t}))),ql=d((({field:e,input:t})=>o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??"")}))),Gl=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:r,...i})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:r.map((({d:e,fill:t,...n},l)=>{const a={...i,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Zl="appearance-none w-5 h-5 border-solid flex-none",Jl=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Ql=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:i})=>{const s=r((e=>{l||(e.preventDefault(),i&&i(!t))}),[i,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(Gl,{paths:Jl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:h("flex items-center relative group/box",ta(l)),onClick:s,children:[o("div",{className:h(Zl,"m-0",a?"rounded-full border-2":la(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:na(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,ea(n)]})})})),ea=e=>e?o("div",{className:"ml-s",children:o($e,{size:"text-l",font:"font-light",children:e})}):null,ta=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",na=(e=!1)=>e?"radio":"checkbox",la=(e=!1)=>h("rounded border",{"bg-primary-main":e}),aa=d((({className:e,text:t,value:n,key:l,disabled:a,error:r,onChange:i})=>c("div",{className:h("shrink-0",e),children:[o(Ql,{text:t,value:n,disabled:a,onChange:i},l),kn(r)]}))),ra=d((({field:e,input:t})=>o(aa,{...e(t?.name??""),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ia=`${Yt}/outservice`,sa=[];async function oa(){const e=await Rt(`${ia}/outserviceregions`);return e&&Array.isArray(e)?e:sa}const ca=d((({field:e,input:t})=>{const n=e("region"),l=n?.value?.key,{data:r}=Hn("outServiceRegions",oa),s=i((()=>r?.find((e=>e.code===l))?.localities?.map((e=>({key:e,text:e})))),[r,l]);return a((()=>{""!==l&&e?.(t?.name??"")?.onChange?.("")}),[l,t?.name??""]),o(_n,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:s,...e(t?.name??""),isSearch:!0})})),da=d((({field:e,input:t})=>o(Sn,{label:"Отчество (Обязательно, при наличии)",maxLength:60,...e(t?.name??""),...t}))),ma=d((({field:e,input:t})=>o(Sn,{label:"Имя",maxLength:60,...e(t?.name??""),...t}))),ha=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:h("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:h("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ua=d((({field:e,input:t})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу онлайн-кассу",...e(t?.name??"")}):null)),pa=d((({field:e,input:t})=>o(Sn,{...e(t?.name??""),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...t}))),ga=e=>"_"===e,xa=e=>/\d/.test(e),fa=e=>ga(e)||xa(e),ba=[..."+7 (___) ___-__-__"],ya=ba.findIndex(ga),va=ba.map(((e,t)=>fa(e)?ba.slice(0,t).filter(fa).length:-1));const Na=d((({children:e,onChange:t,...n})=>{const l=r((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=ba.map(((e,n)=>xa(e)?e:t.charAt(va[n])||e)),l=va.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(ya,l)):n).join("")}(e))),[t]),a=r((e=>{"+7 ("===e&&t&&t("")}),[]);return o(Nn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),wa=d((({className:e,label:t,error:n,...l})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Na,{"aria-label":t,label:fn({label:t,errors:l?.errors}),valid:Boolean(!n),placeholder:"+7 (___) ___-__-__",...l}),kn(n)]}))),ka=d((({field:e,input:t})=>o(wa,{label:"Телефон",...e(t?.name||"phone"),...t}))),Sa=d((({field:e})=>Ln(e("acquiringType")?.value?.key)?o(ha,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Ca=Ot((({field:e,input:t,source:n})=>o(_n,{placeholder:"Выберите продукт",label:"Продукт",options:Ia(n?.productList),...e(t?.name??"")}))),Ia=e=>(e??[]).map((e=>({key:e,value:e}))),Ta=`${Yt}/regions`,Ba=[];function Ma(e=Ta){const{data:t}=Hn(e,zt);return Array.isArray(t)?t:Ba}const Pa=`${Yt}/outservice/outserviceregions`,Va=d((({field:e,input:t,params:n})=>{var l;const a=Ma((l=n?.typeForm,"OUTSERVICE"===l?Pa:void 0));return o(_n,{label:t?.label||"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:i((()=>a?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[a]),...e(t?.name??"")})})),Ra=d((({field:e,input:t})=>{const n=Gn(!0),l=i((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(_n,{label:"Регион",placeholder:"Выберите регион",options:l,...e(t?.name??"")})})),za=d((({field:e,input:t})=>o(Sn,{label:"ФИО представителя",...t,...e("representativeName")}))),Da=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},_a=/^[\u0400-\u04FF\d\s]+$/u,$a=on((e=>null!=e&&""!==e)),ja="Некорректно заполненное поле",La=e=>$a(e??ja),Aa=e=>on((e=>e?.key&&""!==e?.key))(e??ja),Oa=e=>on((e=>"string"==typeof e&&e.length>1&&((e="")=>_a.test(e))(e)))(e??ja),Ea=e=>/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(e),Fa=e=>on(Ea)(e),Ua=on((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Wa={fullName:La(),addressBranch:Aa(),desiredMeetingDate:La(),product:La(),localities:La(),partnerComments:La(),collectionCount:La(),acquiringType:Aa(),serviceType:Aa(),annualRevenue:La(),feedbackMethod:Aa(),serviceDirection:Aa(),secondaryPhone:Fa("Укажите номер телефона"),region:Aa(),situationDescription:La(),sufferedFrom:La(),applierType:La(),surname:Oa("Укажите свою фамилию на кириллице"),name:Oa("Укажите своё имя на кириллице"),middleName:Oa("Укажите своё отчество на кириллице"),birthday:La("Укажите дату рождения"),phone:Fa("Укажите номер телефона"),email:(Ha="Укажите электронную почту",on((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(e)))(Ha)),inn:(e=>on((e=>"string"==typeof e&&(10===e.length||12===e.length)))(e))("Укажите ИНН"),comment:La(),typeForm:La(),consentToReceiveMaterials:Ua,consentDataProcessing:Ua};var Ha;const Ya=(e={})=>({name:t})=>Boolean(e[t??""]),Xa=e=>t=>!t?.condition||t.condition.values.find((n=>{const l=e?.[t?.condition?.name??""];return n===(l?.key??l)})),Ka=d((({field:e})=>{const t=e("secondaryPhone");return o(wa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Da(t,Wa.secondaryPhone):t})})),qa=d((({field:e,input:t})=>o(_n,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Hl,...e(t?.name??"")}))),Ga=d((({field:e,input:t})=>o(Sn,{label:"Описание ситуации",...t,...e("situationDescription")}))),Za=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],Ja=d((({field:e,input:t})=>o(_n,{label:"Пострадал в",...t,options:Za,...e("sufferedFrom")}))),Qa=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,...e(t?.name??""),...t}))),er=["От 1 мес","До 15 лет"],tr=d((({field:e})=>o(rl,{title:"Срок, месяцев",items:er,min:1,max:180,...e("term")}))),nr=d((({field:e,input:t})=>o(_n,{label:"Тип обслуживания",options:Wl,...e(t?.name??"")}))),lr={horizontal:"@lg:flex-row",vertical:""},ar=d((({label:e,items:t,value:n,className:l,disabled:a=!1,orientation:r="horizontal",onChange:i})=>c("div",{className:"grid gap-xs whitespace-nowrap",children:[e?o("div",{role:"radiogroup","aria-label":e,children:o($e,{color:"text-secondary-text",font:"font-light",children:e})}):null,o("div",{className:h("flex flex-col gap-s",lr[r],l),role:"radiogroup","aria-label":"Группа кнопок",children:t?.map((({id:e,text:t})=>o(Ql,{isRadio:!0,text:t,value:n===e,onChange:()=>i?.(e),disabled:a},String(e))))})]}))),rr=[{id:"currencyControl",text:"Валютный контроль"},{id:"documentOperations",text:"Документарные операции"},{id:"conversionTransactions",text:"Конверсионные операции"},{id:"otherIssues",text:"Иные вопросы ВЭД"}],ir=d((({field:e,input:t})=>{const n=r((t=>{"currencyControl"!==t&&(e("inn").onChange?.(""),e("region").onChange?.(""))}),[]);return o("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:o(ar,{className:"whitespace-normal",orientation:"horizontal",items:rr,...e(t?.name??"",{onChange:n})})})})),sr=d((({field:e,input:t})=>o(Ql,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...e(t?.name??"")})));const or={$ref:"/wcms-resources/outservice-productlist.json"},cr={fullName:Kl,addressBranch:Jn,desiredMeetingDate:Fl,product:e=>o(Ca,{...e,source:or}),localities:ca,isClient:ra,partnerComments:pa,collectionCount:Ol,acquiringType:jn,onlineCheckout:ua,posTerminal:Sa,serviceType:nr,term:tr,amount:cl,annualRevenue:dl,vedTypes:ir,feedbackMethod:Xl,serviceDirection:qa,bankEmpolee:pl,secondaryPhone:Ka,applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>Zn(e?.params?.typeForm)?o(Ra,{...e}):o(Va,{...e}),consentToReceiveMaterials:sr,sufferedFrom:Ja,situationDescription:Ga,representativeName:za,applierType:ul,surname:Qa,name:ma,middleName:da,birthday:Al,phone:ka,email:Ul,inn:ql,comment:El},dr=(e,t,n={})=>(l,a)=>{const r={...cr,...n}[String(l.name)];return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:l,field:e})&&r?o("div",{children:o(r,{field:e,input:l,params:t})},a):null},mr=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o($e,{size:"text-h6",children:e})}):null,hr={primary:h("text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:h("text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},ur=h("group/btn-embedded","bg-transparent border border-transparent outline-none"),pr=h("bg-main-gray text-main-disabled cursor-not-allowed"),gr=d((({className:e,type:t="button",version:n="primary",shape:l="default",embedded:a,disabled:s,role:c,ariaLabel:d,data:m,dataTheme:u,children:p,onClick:g=bn})=>{const x=r("tab"!==c?me(g):g,[c,g]),f=i((()=>be(m)),[m]),b="round"===l;return o("button",{className:h("font-sans flex items-center gap-xs",{[hr[n]]:!s&&!a,[ur]:a,[pr]:s},a?"justify-between":"justify-center",a||b?"p-0":"px-9 py-4",{"rounded-md":"default"===l,"rounded-full":b},e),type:t,role:c,"aria-label":d,disabled:s,"aria-disabled":s?"true":void 0,"data-theme":u,...f,onClick:x,children:p})})),xr=d((({className:e,onClose:t})=>o("button",{className:h("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(K,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),fr=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>c("div",{className:h("relative bg-white pt-0 p-lg",e),role:"dialog",title:"Диалог",onClick:a,children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(xr,{className:"absolute top-0 right-0",onClose:l}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]}))),br=d((({ok:e,typeForm:t,onClose:n})=>{const l="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(fr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:n,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:e?"ResponseOKIcon":"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:e?"Ваша заявка отправлена":"Не удалось отправить заявку",description:e?l:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(gr,{type:"button",onClick:n,children:"Хорошо"})]})})})),yr=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:r,annualRevenue:i,serviceType:s,vedTypes:o,region:c,inn:d,sufferedFrom:m,situationDescription:h,applierType:u,...p}=e,g=t||i?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:r,annualRevenue:i}=e;return t?`Вид эквайринга=${t?.text||""}${Ln(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${r}/Срок=${a}/Выручка=${i}`})(e):null,x={...p,...kr(o),...wr(c),...d&&{inn:d},...g?{partnerComments:g}:{},...s?{typeForm:s}:{},...Nr(m?.text,h),...vr(u)};return Object.fromEntries(Object.entries(x)?.map((([e,t])=>[e,t?.key||t])))},vr=e=>e?.key?{isClient:e?.key===ml}:{},Nr=(e,t)=>e||t?{comment:`${e||""};${t||""}`}:{},wr=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},kr=e=>e?{vedTypes:Object.fromEntries(rr.map((({id:t})=>[t,t===e])))}:{},Sr={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Wl[0],feedbackMethod:Yl[0],serviceDirection:Hl[0],vedTypes:rr[0].id,birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,addressRetail:{key:"",text:""}},Cr=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"vedTypes"===e?.name&&e?.defaultValue||Sr[e.name||""]]))),typeForm:{key:t,text:""}}),Ir=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0,size:l="big"})=>o("div",{className:h("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:h("inline-block","animate-spin rounded-full","border-solid border-current","border-r-transparent","small"===l?"border-4 h-8 w-8":"border-8 h-28 w-28",e),role:"status"})}))),Tr=d((({isLoading:e,disabled:t,children:n,className:l,...a})=>c(gr,{type:"submit",className:h("relative",l),disabled:e||t,...a,children:[e?o(Ir,{blur:!0,size:"small"}):null,n]}))),Br={primary:hr.primary,secondary:hr.secondary,white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",gray:hr.secondary,transparent:"","":""},Mr=d((e=>{const t=xe(),{className:n,href:l,target:a,text:r,aboveText:i,version:s="link",rel:c,ariaLabel:d,data:m,children:u,onClick:p}=t(e),g="link"!==s;return o("a",{className:h("group/btn inline-flex items-center h-fit","font-sans no-underline select-none","border border-transparent focus:border-primary-text focus:border","cursor-pointer",{[Br[s]]:Boolean(s),[i?"px-9 py-2.5":"px-9 py-4"]:g,"rounded-md":g},n),href:l,target:a,rel:c,"aria-label":d??`Ссылка на ${r}`,role:l?"link":"button",onClick:p,...be(m),children:u??Pr(r,i)})})),Pr=(e,t)=>e||t?c("div",{className:"whitespace-pre",children:[t?o("div",{className:"font-light text-left text-xs",children:t}):null,o("div",{className:h("text-left",{"text-s -mt-3xs":Boolean(t)}),children:e})]}):null,Vr=d((({text:e,link:t})=>c(w,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o($e,{children:e}):null,t?o(Mr,{...t,ariaLabel:"условия передачи данных",children:t.text}):null]}))),Rr=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Ql,{...e}),o(Vr,{link:t})]}),kn(Da(e,Ua).error)]}):o(Vr,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),o(Tr,{className:"w-full @xl:w-auto",children:n?.text?n.text:"Отправить заявку"})]}),zr={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:r,birthday:i,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=`${Yt}${g?"/lead":"/sendcorporatelead"}`,f={typeForm:n,...qt(l,g),...Gt(r,g),...Xt(a),...Kt(s,"desiredMeetingDate"),...g?Kt(i):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Zt(d)},...p};try{const e=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(f)});return e?.ok?await e.json():null}catch(e){return null}}},Dr=d((({className:e,title:t,typeForm:n="",sections:l=[],button:a,link:s,endpoint:d,additionalParams:m,isContacts:u,data:p,...g})=>{const x=i((()=>l?.flatMap((e=>e?.inputs))||[]),[l]),f=i((()=>Cr(x,n)),[x,n]),b=i((()=>((e,t={})=>{const n=e.filter((e=>Boolean(e?.required&&e?.name))),l={...Wa,...t},a=n.some((e=>e.condition?.values)),r=Object.fromEntries(n.filter(Ya(l)).map((({name:e})=>[e,l[e??""]])));return e=>a?Object.fromEntries(n.filter(Ya(l)).filter(Xa(e)).map((({name:e})=>[e,l[e??""]]))):r})(x)),[x]),y=pn(br),v=ln(),w=r((async(e,t)=>{const l=yr({...e,...m}),a=Boolean(await zr.send(l,"lead"===d));y.open({ok:a,typeForm:n}),a&&Jt({aspectsAttributes:p,aspects:v,ev:t})}),[n]),[,{field:k,onSubmit:S}]=hn(f,{resetOnSubmit:!0,formValidator:b,onSubmit:w}),C=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return c(un,{className:h("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[l.map(((e,t)=>{return c("div",{className:h((l=e.columns,2===l?"@xl:grid-cols-2":""),"grid gap-x-m"),children:[mr(e.title),(e?.inputs||[])?.map(dr(k,{typeForm:n}))]},`section-${t}`);var l})),Rr(C?k("consentDataProcessing"):void 0,s,a)]}),u?c("div",{className:"space-y-m",children:[o(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),_r=d((({title:e,description:t})=>{const n=Te();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ae,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),$r=e=>e%2!=0,jr=d((({className:e,children:t})=>o("span",{className:h("inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main",e),children:t}))),Lr=d((({isUnfolded:e,...t})=>o(K,{name:e?"ArrowUpIcon":"ArrowDownIcon",size:"small",iconVersion:"",...t}))),Ar=d((({className:e,isUnfolded:t,short:n,label:l=(t?"Скрыть":"Развернуть"),embedded:a,...r})=>c(gr,{className:h({"w-full":!n},e),embedded:a,shape:n?"default":"square",role:"tab","aria-label":"Кнопка сворачивающейся секции",...r,children:[o(jr,{children:l}),o(Lr,{isUnfolded:t,iconVersion:a?"color":""})]}))),Or=d((({className:e,role:t="tablist",children:n})=>o("div",{className:h(e),role:t,children:n})));const Er=d((({className:e,isUnfolded:t,children:n})=>{const l=s(null),r=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:h("transition-max-h duration-300 overflow-hidden",{"max-h-0":Boolean(l.current||!t)}),role:"tabpanel","aria-label":"Сворачивающаяся секция",children:o("div",{className:e,ref:r,children:n})})})),Fr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",Ur=d((({topItemsCount:e=0,label:t,block:n,blocksToRender:l=[],...a})=>{const[r,i]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]],[s,{toggle:d}]=an(!1);return c("div",{className:h("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:h(Fr),children:[M(r,{...a.options,parent:n}),$r(r.length)?o(Ft,{className:"col-span-6",...a}):null]}),c(Or,{children:[c(Er,{className:h(Fr),isUnfolded:s,children:[M(i,{...a.options,parent:n}),$r(i.length)?o(Ft,{className:"col-span-6",...a}):null]}),o(Ar,{className:h("text-h4",{hidden:e<1}),label:t,isUnfolded:s,disabled:!i?.length,dataTheme:a.options?.page?.colorPalette,onClick:d})]})]})})),Wr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Hr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),Yr=10;function Xr(e,{sensitivity:t,rootRef:n}={}){const l=s(null),r=i((()=>({threshold:Kr(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,r);return t.observe(l.current),()=>{t.disconnect()}}),[e,r]),l}function Kr(e=0){const t=Math.round(e*Yr);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const qr=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:a,children:i,onIntersection:s})=>{const c=Xr(r((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:c,role:"listitem",children:i})})),Gr=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Zr=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:i=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:u,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:n},b=s([]),y=r(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),x&&x(Qr(n))}),[g,x]),v=a>0?i*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Jr(c,v):{},...N?Hr(u):{},gap:`${i}px`};return o("div",{className:h("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(qr,{className:h(m,a?Gr[a-1]:"",{"h-full":N},t),style:w?Jr(c/4):{},activeIndex:l,idx:n,observerOptions:f,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Jr=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ei={"horizontal-list":"w-6","vertical-list":"h-6"},ti=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:h("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?ei[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),ni=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,r=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",i=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",r),children:[o("div",{className:i,children:n?.title}),o("div",{className:h("text-secondary-text font-light",s),children:n?.description})]},String(l))},li=e=>e,ai=(e=li)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ri=ai(),ii=(e=li)=>ai((t=>-e(t))),si=ii(),oi=e=>t=>e.scrollWidth/t,ci=e=>(t,n)=>{e.scrollBy({left:n*oi(e)(t),behavior:"smooth"})},di=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,i]=l([]),o=r((e=>{i((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[ii()(a),ai()(a)]:[-1,-1],m=c>0,h=d<e-1,u=r((()=>{var t;n.current&&(m?ci(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=r((()=>{n.current&&(h?ci(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=r(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},mi={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},hi=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:i,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=Te(),[u,p]=di({itemCount:s.length}),g=ui(Boolean(s?.length));a((()=>{s?.length&&t>=0&&u?.current&&p.scrollTo(t,g)}),[t]);const x=r((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Zr,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(ni({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",mi[l],i?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":i,children:Array.from({length:n}).fill(null).map(ti({activeIndex:t,onClick:x,listType:l}))}):null})),ui=(e=!1)=>({behavior:e?"auto":"smooth"}),pi=d((({className:e,name:t,...n})=>o(gr,{className:h("w-12 h-12 min-w-12 min-h-12",e),shape:"round",...n,children:o(K,{name:t,iconVersion:"",size:"small"})}))),gi=d((e=>o(pi,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),xi=d((e=>o(pi,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),fi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",bi=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:r,canScrollRight:i,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?yi(t):null,r?o(gi,{className:h(vi(a),m?"left-1":"left-0"),onClick:s}):null,i?o(xi,{className:h(vi(a),m?"right-1":"right-0"),onClick:d}):null]})})),yi=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(fi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(fi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),vi=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Ni=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:r="horizontal-list",snapAlign:i,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:u,showDots:p,children:g,onVisibleIndicesChange:x,navButtons:f})=>{const b=Array.isArray(g)?g.length:0,[y,v]=di({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===r?"relative h-full":""),children:[o(Zr,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:r,snapAlign:i,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(bi,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(hi,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:r,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),wi=({blocksToRender:e,...t})=>o(Ni,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Wr(!0)),children:T(e,t)},String(n))})}),ki=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Si(n,t),o(Ur,{...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Si(n,t),wi({...l,blocksToRender:t})]});default:return null}})),Si=(e,t)=>e&&!t.length?o(_r,{...e}):null,Ci=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Ii=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(ha,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Ti=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Ci(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Bi(l)).filter(Boolean))]}),n?o("div",{children:o(gr,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Bi=e=>([t,n])=>{const l=n?.type;return"array"===l?Mi(t,e)(n):null},Mi=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o($e,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Ii,{items:l,multiple:!n?.single,...t(e)})]},e)},Pi=e=>e;function Vi(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Ri=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,zi=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Ri(t[e])||Ri(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Ri(t[e])||Ri(n[e])||Di(t[e])<=Di(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Ri(t[e])||Ri(n[e])||Di(t[e]?.min)>=Di(n[e]?.min)&&Di(t[e]?.min)<=Di(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Ri(t[e])||Ri(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Ri(t[e])||Ri(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Di=e=>Number(e||0),_i=(e,{block:t,page:n,normalize:l=Pi})=>{const a=t?.blocks||[],[r,s]=hn(e),o=i((()=>Vi(a,a.map((e=>jt(e.content,n?.fallback))))),[a,n?.fallback]),c=r===e?a:((e,t)=>(n=Pi)=>e?.filter((([,e])=>zi(t,n(e)||{}))).map((([e])=>e)))(o,r)(l);return[r,{blocksToRender:c,blocksWithProps:o},s]},$i={},ji={},Li=Ot((({className:e,filtrationSchema:t=$i,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:r},{field:i,reset:s}]=_i(ji,{block:a.block,page:a.options?.page}),d=o(Vn,{className:"w-64",label:n?.title,options:Ai(n),...i("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ai(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Ti,{filtrationSchema:t,field:i,reset:s,children:c("div",{children:[d,o("div",{children:o(gr,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(ki,{blocksToRender:r,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ai=e=>Vi(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Oi=(e=!1)=>e?"text-left":"text-center",Ei={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Fi=d((({className:e,iconBgVersion:t="primary",size:n,icon:l,...a})=>{const r=`${n?.width??44}px`;return l?o("div",{className:h("rounded-icon object-fit flex justify-center items-center",Ei[t],e),style:{width:r,height:r},role:"figure",children:o(K,{name:l,width:"54%",...a})}):null})),Ui=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Te();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:Oi(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Wi)}):null]})})),Wi=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:r},i)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(Fi,{className:"shrink-0",iconBgVersion:r,...l}):null,l?.src?o(ae,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(N,{headingType:"h6",children:e}),o($e,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(i)),Hi=e=>({icon:t,title:n,description:l},a)=>c("div",{className:h("flex flex-col gap-1","items-center",{"justify-center":!l&&!n}),children:[n?o($e,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ae,{image:t,height:"180",className:"w-auto mx-auto"}):null,l?o($e,{size:"text-h6",font:"font-normal",align:e,children:l}):null]},String(a)),Yi=(e,t,n)=>o("div",{className:`grid gap-2xs ${Xi(t)}`,children:e.map(Hi(n))}),Xi=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ki=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:r,...i})=>c(g,{className:h("space-y-3xl",n),defaultPadding:"p-6xl",...i,children:[o(S,{defaultPadding:"",title:r,description:a,headlineVersion:"M"}),e?.length?Yi(e,l,t):null]}))),qi={start:"justify-start",center:"justify-center",end:"justify-end"},Gi=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",qi[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:We(e)})})),Zi=d((({className:e,title:t,children:n,...l})=>c(g,{className:h("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(N,{className:"text-center",title:t}):null,n]}))),Ji="flex flex-col justify-between lg:flex-row gap-x-4xl gap-y-7 lg:gap-y-4xl",Qi="flex flex-col lg:w-1/2 gap-2xl",es="flex flex-col gap-y-xl min-w-52",ts=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o($e,{size:"text-h3",children:"number"==typeof e?[l,Ke(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),ns=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o($e,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(ts,{value:n,...a}):o($e,{size:"text-h3",children:"-"})]}))),ls=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,as=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:r,color:i="text-secondary-text"})=>c("div",{children:[o($e,{size:"text-l",font:"font-light",color:i,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ke(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&r?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),rs=d((({title:e="Ставка"})=>c("div",{className:"space-y-s min-w-96",children:[o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(K,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),is=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,color:a="text-secondary-text",children:r,...i})=>t?c("div",{className:"flex flex-col",children:[o("div",{className:"hidden lg:block min-w-96",children:o(as,{title:e,rate:t,unit:n,fractionDigits:l,color:a,...i})}),o(ns,{className:"lg:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:a,...i}),r]}):o(rs,{title:e,...i}),ss=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(rl,{items:e?[`От ${Ke(1)(l.min||0)} ${n}`,`До ${Ke(1)(l.max||0)} ${n}`]:[],step:t,...l}),os={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},cs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ds=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,r]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=os.prefMonthsNum,prefTravelBonusRate:r=os.prefTravelBonusRate,prefRestBonusRate:i=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(r*t)+Math.round(i*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||cs,n,l);return{...t,...e,monthBonus:a,yearBonus:r}},ms=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...r})=>{const[i,{field:s}]=hn({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:u,maxSumOther:p,monthBonus:g,yearBonus:x}=ds(i,n);return o(Zi,{className:e,title:t,...r,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),ss({title:"Сумма покупок в остальных категориях, ₽",min:u,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?is({title:"Баллов за месяц",rate:g,fractionDigits:0,unit:"",color:"text-primary-text"}):null}),c("div",{className:es,children:[x>=0?o(ns,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,We(l,{isVertical:!0}),ls(a)]})]})})})),hs=Math.round(29.5),us=(e,t=0)=>e?.sum?e.sum:t,ps=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,gs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,xs=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:r,...i})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o($e,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o($e,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(ar,{orientation:l,items:e,value:e[a?0:1].id,onChange:t=>r&&r(t===e[0].id),...i})]}),fs=e=>xs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),bs=" (c капитализацией)",ys=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:r=!1})=>c("div",{className:es,children:[o(ns,{title:`Доход в конце срока${r?bs:""}`,value:e,postfix:n,prefix:"+"}),o(ns,{title:`Сумма в конце срока${r?bs:""}`,value:t,postfix:n}),We(l,{isVertical:!0}),a?.map(ls)]}),vs=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Ns([e,t],l),Ns=([e,t],n=[])=>({[e]:n.length?si(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ri(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ws=(e,[t,n],l)=>e>=l[t]&&e<=l[n],ks={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ss={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Cs=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:r,isMonthlyInterestPayment:i}=e,s=r||a,o=n<90||n>730,c=function(e){const t=e?.rateType?ks[e?.rateType]:"",{data:n}=Hn(t?`${Yt}/depositrates/${t}`:null,zt);return Array.isArray(n)?n:[]}(t),d=c?.find((e=>i===e.isMonthlyInterestPayment&&Is(s,e)&&ws(l,["minSum","maxSum"],e)&&ws(n,["minDays","maxDays"],e)))||Ss,{rate:m}=d,h=Ts(m,e),u=l+h,p=c||[Ss];return{...d,...Ns(["minSum","maxSum"],p),...Ns(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},Is=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ts=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Bs=Ot((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:r,defaultParams:i,rateParams:s,...d})=>{const[m,{field:u}]=hn({moneyValue:us(i,1e5),daysValue:ps(i,60),isReplenished:Boolean(i?.isReplenished),isPartialWithdrawal:Boolean(i?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(i?.isMonthlyInterestPayment)}),p=Cs(m,s),{income:g,finalSum:x,rate:f,depositeName:b}=p;return o(Zi,{className:e,title:t,...d,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...u("moneyValue"),value:p.moneyValue}),(y={title:"Срок, дней",min:p.minDays,max:p.maxDays,...u("daysValue"),value:p.daysValue},o(rl,{items:[`От ${gs(y.min||0)}`,`До ${gs(y.max||0)}`],step:1,...y})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Ms(p,u),fs({title:"Выплата процентов",orientation:"vertical",...u("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),is({rate:f,depositeName:b,isShowDepositeName:r}),ys({income:g,finalSum:x,buttons:n,footnotes:[l,a]})]})});var y})),Ms=(e,t)=>c("div",{className:"space-y-s",children:[o($e,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ql,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ql,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ps=e=>Rs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],e),Vs=(e=[],t=!1)=>Rs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Rs=(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]},zs=({min:e=0,max:t=0,availableMonths:n,...l})=>o(rl,{items:[`От ${Ds(e)}`,`До ${Ds(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Ds=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,_s=e=>xs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),$s=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(el(t?.[a],n.minMonths,n.maxMonths))},js=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:r}=t;if(0===e)return 0;if(n){const t=e/1200;return r?(l+r)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},Ls={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},As=e=>Os({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Os({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Os({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Os({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Os=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Es=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,r=t?.rateRows||[Ls],i=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>As({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=vs(["minSum","maxSum"],i,r),{minMonths:c,maxMonths:d}=vs(["minMonths","maxMonths"],i,r),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>As({row:e,userInputParams:t,paramsViewSettings:n})&&ws(l,["minSum","maxSum"],e)&&ws(a,["minMonths","maxMonths"],e)))||Ls)({rateRows:r,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:h}=m,u=js(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},Fs=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Us={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Ws=Ot((({className:e,title:t,calcSource:n,buttons:l,footnote:r,paramsViewSettings:i,defaultParams:s,onChange:d,...m})=>{const u=Ps(n?.rateRows),[p,{field:g}]=hn({moneyValue:us(s,2e5),monthsValue:ps(s,hs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=Es(p,n,i),f=_s({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(el(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(el(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!Fs(s)&&u&&$s({field:g,defParams:u,calcParams:x,map:Us,monthsValue:"minMonths"})}),[n,s]),o(Zi,{className:e,title:t,...m,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),zs({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),Hs({...x,...i},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка от",value:u?.rate,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),We(l,{isVertical:!0}),ls(r)]})]})})})),Hs=(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]}),Ys=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,r]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,r)]):n++}return t},Xs={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,r=t?.[0]?Zs(t[0].minMonths,t[0].maxMonths):0,i=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Gs({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Gs({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Gs({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:i}),Gs({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,ws(l,["minSum","maxSum"],t),ws(a||r,["minMonths","maxMonths"],t)].every(Boolean)))||Xs,{rate:h}=m,u=qs(h,e),p=l+u,g=t||[Xs];return{...m,...Ns(["minSum","maxSum"],g),...Ns(["minMonths","maxMonths"],g),availableMonths:Ys(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:r,income:u,finalSum:p}},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)},Gs=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Zs=(e,t)=>e+Math.round((t-e)/2),Js=(e="rub")=>"rub"===e,Qs=(e,t)=>{const{minMonths:n,maxMonths:l}=Ns(["minMonths","maxMonths"],lo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:el(a,n,l)}},eo=(e,t)=>{const{minSum:n,maxSum:l}=Ns(["minSum","maxSum"],lo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:el(a,n,l)}},to=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),no=e=>{const t=Js(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},lo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},ao=(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]}),ro(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]}),ro(e.isShowNewClient),e.isShowNewClient?o(Ql,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},ro=(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"},so={text:"₽",key:"rub"},oo=Ot((({className:e,title:t,calcSource:n,buttons:l=[],footnote:i="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:u}=n??{},p=u?.map((e=>e.currency))??[so],g=r((e=>t=>e?{...t,...no(t),...eo(t,e),...Qs(t,e),...to(t,e)}:t)(u),[u]),[x,{field:f}]=hn({moneyValue:us(d,2e4),monthsValue:ps(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:so},{normalizer:g}),b=f?.("currency")?.value??so,y=f?.("isNewClient")?.value,v=lo(u,b),N=Ks(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,I=r((()=>{$s({field:f,defParams:Vs(v,y),calcParams:N,monthsValue:"minMonths",map:io})}),[f,u]);a((()=>{!Fs(d)&&v&&I()}),[d,u]);const T=w===Vs(v,y)?.rate;return o(Zi,{className:e,title:t,...m,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[c("div",{className:"flex gap-m",children:[ss({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...f("moneyValue"),value:N.moneyValue,postfix:b?.text,step:co(b?.key)}),u&&u?.length>1?o(_n,{label:"Валюта",options:p,...f("currency")}):null]}),zs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),ao({...N,...s},f)]}),is({rate:w,children:ho(I,T)}),ys({income:k,finalSum:S,buttons:[...l,mo(n?.buttons,C)],footnotes:[i],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),co=(e="")=>Js(e)?1e3:100,mo=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},ho=(e,t=!1)=>t?null:o(gr,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),uo=e=>po({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&po({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),po=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],go={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},xo=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i}=e,s=t?.rateRows||[go],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>uo({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=vs(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=vs(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i})=>e?.find((e=>uo({row:e,userInputParams:t,paramsViewSettings:n})&&ws(l+i,["minSum","maxSum"],e)&&ws(r,["minSumOld","maxSumOld"],e)&&ws(i,["minSumExtra","maxSumExtra"],e)&&ws(a,["minMonths","maxMonths"],e)))||go)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i}),{rate:p}=u,g=js(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:l,monthsValue:a,oldMonthlyPayment:r,moneyExtra:i,monthlyPayment:g,benefit:x}},fo=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:r,...s})=>{const[d,{field:m}]=hn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),u=xo(d,n,r),p=i((()=>Ps(n?.rateRows)?.rate),[n?.rateRows]),g=_s({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...m("isAnnuity")});return o(Zi,{className:e,title:t,...s,children:c("section",{className:h(Ji,e),children:[c("div",{className:Qi,children:[ss({title:"Остаток долга в других банках, ₽ ",step:500,min:u.minSum,max:u.maxSum-u.maxSumExtra,...m("moneyValue"),value:u.moneyValue}),ss({title:"Ежемесячный платёж в других банках, ₽",step:500,min:u.minSumOld,max:u.maxSumOld,...m("oldMonthlyPayment"),value:u.oldMonthlyPayment}),zs({title:"Новый срок кредита, месяцев",min:u.minMonths,max:u.maxMonths,...m("monthsValue"),value:u.monthsValue}),bo({...u,...r},m),u.isExtraMoney?ss({title:"Дополнительная сумма, ₽ ",step:500,min:u.minSumExtra,max:u.maxSumExtra,...m("moneyExtra"),value:u.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:g})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка от",value:p,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:u.monthlyPayment,postfix:"₽"}),u.benefit>0?o(ns,{title:"Выгода в месяц",value:u.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:g}),We(l,{isVertical:!0}),ls(a)]})]})})})),bo=(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})]}),yo=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:i=0,...s}=e,c=Qn(e,{normalize:(e=a)=>n&&l?String(el(Number(vo(e)),n,l)):vo(e),format:Ke(i)}),d=r((e=>t&&t(vo(e))),[t]);return o(Nn,{onChange:d,...s,...c})})),vo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),No=d((e=>o(yo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o($e,{size:"text-xl",font:"font-light",children:"₽"})})})));function wo(e,t){for(const[n,l]of e.entries())null!=l?t.setItem(n,l):t.removeItem(n)}function ko(e,t){return wo(e,t),wo(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class So{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 Co{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 Io={};function To(e,t=Io){const n=s(null),o=function(){const[,e]=l(0);return r((()=>e((e=>(e+1)%65536))),[])}();return a((()=>e.bus.watch((e=>{n.current?.has(String(e.type))&&o()}))),[e,o]),i((()=>new Proxy(t,{get:(t,l)=>(n.current||=new Set,n.current.add(l),e.getItem(l)),has:(t,l)=>(n.current||=new Set,n.current.add(l),e.hasItem(l)),set:(t,n,l)=>(e.setItem(n,l),!0),deleteProperty:(t,n)=>(e.removeItem(n),!0)})),[e])}const Bo=new Co;function Mo(){return To(Bo)}ko(Bo,new So(globalThis?.sessionStorage));const Po={private:"p2p/registerP2P",business:"b2c/registerB2C"},Vo=({onClose:e,errorCode:t,errorMessage:n})=>{const l=t?`Код ошибки - ${t}`:"Пожалуйста, повторите позднее";return o(fr,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto",onClose:e,children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"},width:"136",height:"136"}),o(S,{className:"w-full",title:"Ошибка перевода",description:l,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Ro=e=>{const t=pn(Vo),n=Mo(),l=Qt(),a="private"===e?"p2p":"b2c";return r((async({amount:r})=>{const i=await(async(e,t)=>{const n=Qt(),l={amount:String(t),currency:"643",returnUrl:`${n.origin}/p2p/success`,failUrl:`${n.origin}/p2p/failed`,language:"ru"},a=`${Yt}/payment/${Po[e]}`;try{const e=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(l)});return e.ok?await e.json():null}catch(e){return null}})(e,r);(e=>Boolean(e?.formUrl)&&Boolean(e?.orderId))(i)&&(n.transaction={orderId:i.orderId,type:a,url:l.href},l.assign(`${a}/?formUrl=${encodeURIComponent(i.formUrl)}`)),(e=>Boolean(e?.errorMessage)&&0!==e?.errorCode)(i)&&t.open({errorCode:i.errorCode,errorMessage:i.errorMessage})}),[e])},zo={amount:1500},Do=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:r="private",...i})=>{const[s,{setValue:d}]=an(!1),m=Ro(r),[{amount:u},{field:p,onSubmit:x}]=hn(zo,{onSubmit:m});return a((()=>{d(u<=0)}),[u]),c(g,{className:h("flex flex-col items-center",e),defaultPadding:"p-6xl",...i,children:[t?o(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:x,children:[o(No,{valid:!s,label:n,max:3e5,min:1,...p("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:u}),l?.text?o(Tr,{className:"w-full mt-lg",disabled:s,children:l.text}):null]})]})})),_o=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(K,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),$o="relative h-full",jo={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Lo=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},r=a?.some(Eo),i=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...l,renderProps:(n,l,a)=>c("div",{className:Ao(n,{someCardsHighlighted:r}),children:[T(n,l,{className:Oo(n,{someCardsHighlighted:r,showBorder:!e,cardSize:t}),...i,blockIndex:a}),Eo(n)?_o({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Ao=(e,{someCardsHighlighted:t})=>h($o,t&&(Eo(e)?"pt-3xl":"pt-3xl sm:pt-16")),Oo=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h($o,"min-w-80",jo[l],t&&(Eo(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wr(n),n&&"h-full"),Eo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Fo=Ot((({className:e,visibleItemCount:t=1,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:r="normal",isNavButtons:i=!1,...s})=>o(g,{className:h(e),defaultPadding:"p-6xl",...s,children:o(Ni,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:i?Uo(s?.block?.blocks):[],hasBlur:!0,children:Lo({noCardBorder:n,cardSize:r,isNavButtons:i,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Uo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Wo="z-10 border border-solid w-full h-full",Ho=h(Wo,"absolute hidden @xl:block border-transparent"),Yo=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(Ho,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Ho,"top-6 right-8 bg-green")}),o("div",{className:h(Ho,"top-3 right-4 bg-green-light")}),c("div",{className:h(Wo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),We([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Xo={black:"bg-black",white:"bg-white"},Ko=d((({className:e="",title:t,description:n,image:l,price:a,button:r,colors:i=[],align:s="text-left",padding:d,...m})=>o(g,{className:h("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Pe,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:We([r],{buttonClassName:"w-full self-end"}),children:[i?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o($e,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),i.map(qo)]}):null,a?c($e,{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 ${Xo[e]}`},String(t)),Go=d((({icon:e,...t})=>{const n=xe(),{text:l,href:a,target:r,onClick:i}=n(t);return l?o("div",{className:h("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:r,onClick:i,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ae,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),Zo=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...r})=>o(g,{defaultPadding:"p-5xl",className:h("overflow-hidden",e),...r,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(S,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Jo(l):null]})}))),Jo=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(Go,{...e},String(t))))}),Qo=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),ec=d((({className:e="",href:t,target:n,onClick:l,data:a,children:r})=>{const i=xe()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:h("block",e),...t?i:{},role:t?"link":"none",...be(a),children:r})})),tc=[{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"}}],nc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:r="white",children:i})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:i}=(e=>tc.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ue(l)?l:i,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??r}})),u=h("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},lc(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:ac(s??!1,a??!1,n),buttonClassName:u})}),i?o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:i}):null]})})),lc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",ac=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),rc=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:r,isDotted:i,__html:s,socialMedia:d=[],target:m,title:u,align:p="text-left",benefits:x,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(ec,{href:a,target:m,className:"h-full",data:Qo(v),children:c(Pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...tt(Ue(r)?o(ae,{image:r}):null,f),buttons:d.length?o(nc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:x}),s?o(De,{__html:s,isDotted:i,itemSize:"list-s"}):null,ic(l,p)]})})}))),ic=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,sc=new ue,oc=(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))},cc=d((({className:e="",title:t,align:n="text-center",icon:s,button:d,visibleCellsCount:m=1,cardCells:u=[],options:p,data:x,...f})=>{const b=i((()=>u.map(oc)),[u]),[y,v]=i((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[w,k]=l(!1);a((()=>sc.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&k(e.isUnfolded)}))),[p?.parent]);const S=r((()=>{sc.fire("fold",{type:"fold",isUnfolded:!w,parent:p?.parent})}),[w,p?.parent]);return c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[o(ae,{className:"self-center",image:s}),t?o(N,{className:h("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(ke,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Or,{children:[c("div",{children:[y,o(Er,{isUnfolded:w,children:v})]}),u.length>=m?o(Ar,{className:"mt-m",label:w?"Скрыть":"Подробнее о тарифе",isUnfolded:w,embedded:!0,data:x,onClick:S}):null]}):o("div",{children:y})]})})),dc=d((({className:e,contacts:t,info:n,version:l="secondary",...a})=>c(g,{className:h("flex",e),defaultPadding:"p-6xl",version:l,...a,children:[n?.length?mc(n):null,t?.length?mc(t):null]}))),mc=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>hc({column:e,i:t})))}),hc=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:l},a)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:h({"mt-xl":Boolean(l?.text)}),children:We([l])})]},String(a))))},`col-${String(t)}`):null,uc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,pc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),gc=1e9,xc={sum:{min:1e4,max:gc},period:3},fc=Ot((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...r})=>{const[,{blocksToRender:i,blocksWithProps:s},{field:d,reset:m}]=_i(xc,{block:r.block,page:r.options?.page,normalize:e=>({...e,period:bc(e)})}),u=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=yc(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...r,children:[o(Ti,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(No,{label:l?.title,min:500,max:gc,...d("sum",{parse:e=>({min:Number(e),max:gc}),format:({min:e})=>String(e)})}),o(rl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(ki,{blocksToRender:i,...r})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),bc=e=>Dt((e?.paramsSource?.rateRows||[]).filter(uc).flatMap((e=>pc(e.minMonths,e.maxMonths)))),yc=e=>Dt(e.flatMap((e=>e||[])).filter(uc).flatMap((e=>pc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],vc=[{key:"10"},{key:"50"},{key:"100"}],Nc=({itemCount:e,onItemCountChange:t})=>{const n=r((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(Vn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:vc,iconVersion:"black"})]})},wc="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",kc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,r=t+1;return r===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:r},String(t)):1!==r&&r!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(r,n,a)?o("div",{onClick:()=>l(r),className:wc,"aria-label":`Страница ${r}`,children:r},String(t)):null},Sc={width:"24",height:"24"},Cc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=i((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=r((()=>{e>1&&t(e-1)}),[e]),s=r((()=>{e<n&&t(e+1)}),[e,n]),d=r((()=>t(1)),[]),m=r((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(K,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Ic(1===e),...Sc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:wc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(kc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:wc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(K,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Ic(e===n),...Sc})})]})},Ic=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Tc=({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(Cc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Nc,{itemCount:l,onItemCountChange:a}):null]}),Bc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:i="Поиск по сайту"})=>{const s=r((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:h("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ae,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:h("h-14 w-full px-10 text-l text-black box-border rounded-md",yn),value:t,type:"text",name:"search-bar-input",placeholder:i,autoFocus:n,onChange:s,onFocus:a})]})})),Mc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Bc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(jl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(gr,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Pc=d((({title:e,timestamp:t,publicId:n})=>{const l=xe(),{href:a}=l({href:`${Yt}/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[o(Fi,{className:"shrink-0",icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o($e,{size:"text-m","font-weight":"font-light",children:Wt(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)})),Vc=`${Yt}/depository`,Rc={startDate:void 0,endDate:void 0,query:""},zc=Ot((({className:e,...t})=>{const[n,a]=l(0),[i,s]=l(10),[d,{field:m,reset:u}]=hn(Rc),{totalPages:p=0,items:x=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const r=l?Wt(l,!0):"",i=a?Wt(a,!0):"",s=new URLSearchParams(Vc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",r),s.set("timestampEnd",i);const o=`?${s.toString()}`,{data:c}=Hn(Vc+o,zt);return{items:c?.content,totalPages:c?.totalPages}})({size:i,page:n,...d}),f=r((e=>a(e-1)),[]),b=r((e=>{i!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:h(e,"container p-6xl"),...t,children:[o(Mc,{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(Pc,{...e},String(e.publicId)))):o(_r,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Tc,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:i,onItemCountChange:b})]})]})})),Dc=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,_c=d((({className:e="",title:t,description:n,error:l,button:a,...r})=>c(g,{className:h("flex flex-col justify-center items-center",e),defaultPadding:h("p-6xl"),version:"transparent",...r,children:[o("div",{className:"flex justify-center",children:Dc(l)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ke,{version:a?.version,text:a?.text,...a}):null]}))),$c=new Co;function jc(e){return To($c,e)}ko($c,new So(globalThis?.localStorage));const Lc=`${Yt}/region`;function Ac(e="Москва"){return jc().location??{name:e}}function Oc(e="Москва"){const t=jc(),n=r((async()=>{if(!t.location){const n=await Rt(Lc);t.location=n??{name:e}}}),[t,e]);return Hn(Lc,n),t}var Ec;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Ec||(Ec={}));const Fc=new Intl.NumberFormat("ru",{style:"currency",currency:Ec.RUB}),Uc=e=>e?Fc.format(e):"",Wc="text-m font-light text-secondary-text ",Hc=`${Wc} text-left`,Yc=`${Wc} pl-5xl text-center`,Xc=`${Wc} pl-5xl text-right`,Kc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},qc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Hc,children:o($e,{size:"text-m",children:"Валюта"})}),o("th",{className:Yc,children:o($e,{size:"text-m",children:"Купить"})}),o("th",{className:Xc,children:o($e,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Gc)})]}))),Gc=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:Kc[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:Uc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o($e,{size:"text-h6",children:Uc(e?.buyExchangeRate)})})]},t)},Zc={icon:"GpsIcon"},Jc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Fi,{...Zc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Qc=(e,t,n)=>{const l=Number(ed(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)},ed=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function td(e){if(!e)throw new Error("Value should be fulfilled");return e}const nd=e=>t=>{const[,n]=td(e.find((([e])=>e(t))));return n(t)},ld=e=>nd(e.map((([e,t])=>[e,()=>t])));ld.if=e=>new ad(void 0,e);class ad{parent;predicate;unit;get entry(){return[td(this.predicate),td(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new ad(this,e)}then(e){return new ad(this.parent,this.predicate,e)}else(e){return nd([...rd(this),[()=>!0,e]])}}const rd=e=>[...e?.parent?rd(e.parent):[],e.entry],id=e=>ld([[e=>e.value!==Ec.RUB&&e.oppositeValue!==Ec.RUB,()=>e.handleConvert(e.value,Ec.RUB)],[e=>e.value===Ec.RUB&&e.oppositeValue===Ec.RUB,()=>e.handleConvert(e.value,Ec.USD)],[e=>e.value===Ec.RUB&&e.oppositeValue===Ec.RUB,()=>e.handleConvert(e.value,Ec.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function sd(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:r,setSelected:i}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(Nn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:r}),s.length?o(Vn,{className:"absolute right-0",isBorder:!1,onChange:e=>i(e.key),options:s,value:d}):null]})}const od=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[i,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ec.RUB,selectBuy:n?.[0]?.currency?.currency||Ec.USD}),d=r((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[sd({placeholder:"Хочу продать",rates:n,selected:i.selectSell,setSelected:cd(i,d,n),value:i.inputSell,setValue:e=>md(d,n)(e,i.selectSell,i.selectBuy)}),sd({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:dd(i,d,t),value:i.inputBuy,setValue:e=>hd(d,t)(e,i.selectBuy,i.selectSell)})]}):null,a?.text?o(ke,{text:a.text,version:a?.version,...a}):null]})})),cd=(e,t,n)=>l=>{t({selectSell:l}),id({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{md(t,n)(e.inputSell,l,a)}})},dd=(e,t,n)=>l=>{t({selectBuy:l}),id({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>hd(t,n)(e.inputBuy,l,a)})},md=(e,t)=>(n,l,a)=>{e({inputSell:ed(n),selectBuy:a});const r=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;r&&e({inputBuy:String(Qc(n,r,l===Ec.RUB)||"")})},hd=(e,t)=>(n,l,a)=>{e({inputBuy:ed(n),selectSell:a});const r=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;r&&e({inputSell:String(Qc(n,r,l===Ec.RUB)||"")})},ud=`${Yt}/exchangerates`;const pd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Hn(ud+`?regionCode=${t}`,zt);return n||{}}(Ac()),r=gd(a?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:Ec.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Ec.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Pe,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(qc,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Jc,{address:a?.address})]}),o(od,{className:"grow w-1/2",currencyRatesBuy:i,currencyRatesSell:s,button:n})]})})})})),gd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],xd=d((({className:e="",items:t})=>{const n=xe();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(fd(n))})})),fd=e=>({dataFooter:t,...n},l)=>{const{text:a,href:r,target:i,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:r,target:i||"_self",onClick:s,...be(t),children:a||null})},String(l)):null},bd=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),yd=["all","footer"],vd=d((({className:e,navigationItems:t})=>{const n=xe();return o("div",{role:"menu",className:h("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(bd(yd)).map(n).map(Nd)})})),Nd=(e,t)=>{const{text:n,items:l=[],href:a,target:r="_self",onClick:i,dataFooter:s}=e,d=l.filter(bd(yd));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:r,onClick:i,...be(s),children:n}),d?o(xd,{items:d}):null]},String(t))},wd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(kd)}):null)),kd=(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(Sd)})]},String(t)),Sd=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Cd(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Cd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Id(t)}`,children:o($e,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Id=e=>e.replaceAll(/\D/g,""),Td=d((({className:e="",index:t,text:n,...l})=>{const a=xe(),{href:r,target:i,onClick:s}=a(l);return o("a",{className:h("text-secondary-text",e),href:r,target:i,onClick:s,children:n||`Документ ${t}`})})),Bd=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(Td,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Md="w-full lg:w-52",Pd={width:"118",height:"24"},Vd={"bg-white":"color",transparent:"white"},Rd={"bg-white":"text-primary-main",transparent:"text-white"},zd=(e,t,n)=>o(ae,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Vd[e]},className:Rd[e],width:n?.width,height:n?.height}),Dd={"bg-white":"text-primary-text",transparent:"text-white"},_d=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:r="bg-white",showTitle:i=!0,data:s})=>c("a",{className:h("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...be(s),children:[zd(r,n?.image,Pd),i?l??o("div",{className:"ml-s",children:o($e,{font:"font-medium",color:Dd[r],size:"",children:n?.title??"Россельхозбанк"})}):null]})));function $d(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const jd=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let r=0;for(let i=0;i<e.length;i++){const s=Math.max(0,i-n),o=Math.min(i+n,t.length-1);for(let n=s;n<=o;n++)l[i]||a[n]||e[i]!==t[n]||(r++,l[i]=!0,a[n]=!0)}return{m:r,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const r=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let r=0,i=0;r<e.length;r++){if(!n[r])continue;let s=i;for(;s<t.length;s++)if(l[s]){i=s+1;break}e[r]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),i=(n/e.length+n/t.length+(n-r/2)/n)/3,s=i>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return i+s*(1-i)};const Ld=(e,t)=>(n,l)=>{for(const[a,r]of l)n.set(a,e(n.get(a)||t,r));return n},Ad=(e=[])=>e.reduce(((e,t)=>e+t),0),Od=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Ed=e=>t=>e.map((([e,n])=>[jd(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Ud(t,e))).reduce(Ld(Math.max,0),new Map),Fd=e=>t=>{return Vi(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Od(t||"");return n.length?Ad(e.map((e=>ri(n.map(jd(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},Ud=(e,t)=>new Map(e.map((e=>[e,t]))),Wd=({basePathList:e,initialQuery:t=""})=>{const[n,r]=l(t||"");a((()=>{null!=t&&r(t)}),[t]);const{data:i}=Hn(e?.length?e:null,Hd),[s,o]=l(null);return $d((()=>{i&&o(i.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=Od(e);if(!a.length)return[];const r=Object.entries(l),i=[...a.map(Ed(r)).reduce(Ld(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Fd(a)(i)})(n)))}),[i,n]),[s,{value:n,onChange:r}]},Hd=async(...e)=>(await Promise.allSettled(e.map((e=>Rt(L(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Yd=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const l=i((()=>t?.map((e=>e.href||"/"))),[t]),[a,r]=Wd({basePathList:l,initialQuery:e}),s=i((()=>Xd(t)(a)),[t,a]);return o(fr,{head:o(Bc,{autoFocus:!0,...r}),onClose:n,children:o(vd,{navigationItems:s})})})),Xd=e=>t=>e?.length&&t?.length?Vi(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:L("/",t)})))}))):[],Kd=d((({className:e,search:t,...n})=>{const[a,i]=l(""),s=r((()=>i("")),[]),d=pn(Yd,n),m=r((e=>{i(e),qd(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:h("relative",e),role:"search",children:[o(Bc,{value:a,placeholder:t?.placeholder,onChange:m}),o(xr,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),qd=e=>e&&e.length>=3,Gd=(e,t)=>{const{logo:n}=e??{},{dataHeader:l,dataFooter:a,...r}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(_d,{className:Md,logo:r,data:a,showTitle:!1}),o(Kd,{className:"grow",navigationItems:t,...e})]})},Zd=d((({className:e="",index:t,...n})=>{const l=xe(),{href:a,target:r,text:i,onClick:s}=l(n);return o("a",{className:h("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:r,onClick:s,children:i||`Документ ${t}`})})),Jd=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(Zd,{index:t,...e},String(t))))}):null]}))),Qd=Ot((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:r,relatedEnterprises:i,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:u,license:p,otherLinks:x=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[Gd(a,l),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(vd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h(Md,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(wd,{items:s}),u?o(ke,{className:"w-full",version:"primary",...u}):null,d.map(((e,t)=>o(nc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),x.map(((e,t)=>o(Mr,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(Bd,{title:m,links:i}),o(Jd,{links:r,license:p})]})})),em=d((({className:e="",title:t,description:n,calendar:l,...a})=>c(g,{className:h("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),l?tm(l):null]}))),tm=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>nm(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:lm(e)}),c("div",{className:"text-s",children:[o($e,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o($e,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},nm=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),lm=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ae,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),am=Ot((({className:e,title:t,button:n,regionSource:a,data:r,...i})=>{const[s,d]=l({key:""}),m=a?.regions??[],u=m?.find((e=>e.name===s.key))?.href;return o(g,{className:e,defaultPadding:"p-6xl",...i,children:c("div",{className:"container space-y-m",children:[t?o(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(_n,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(Mr,{className:h("w-full @xl:w-auto"),href:u,target:"_blank",version:n?.version??"primary",data:Qo(r,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})}));function rm(e=[]){const t=V(),n=Array.from(e.entries()).filter((([,e])=>im(t)(e)));return n.find((([,e])=>im(t,!0)(e)))??n[n.length-1]??[]}const im=(e,t=!1)=>({href:n})=>{if(!n)return!1;const l=j(sm(e)(n));return t?l===j(n):l.startsWith(j(n))},sm=e=>t=>{const n=J(Z.SITE_URL);return D(t)?e.href:L(n,e.pathname)},om=d((({className:e="",items:t,activeItem:n,ariaLabel:l="Меню"})=>{const[i,{setFalse:d,toggle:m}]=an(!1),u=xn(d),p=s(null),g=r((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),l=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:l.left>e.left&&(a>l.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[i]);return gn(globalThis,"resize",(()=>g({isOpened:i,buttonRef:u,menuRef:p}))),a((()=>{g({isOpened:i,buttonRef:u,menuRef:p})}),[i]),c("div",{className:h(i?"rounded-md shadow-blue-gray":"",e),ref:u,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":l,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:h("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!i}),"aria-hidden":!i,children:dm(t,n)})]})})),cm=d((({isActive:e,...t})=>{const n=xe(),{text:l,href:a,target:r,onClick:i}=n(t);return o("a",{className:h("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:a,target:r,onClick:i,role:"link",...be(t?.data),children:l})})),dm=(e,t)=>e?.map(((e,n)=>o(cm,{isActive:e===t,...e},e?.text??String(n)))),mm={default:"w-6 h-6",large:"w-12 h-12"},hm=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:l=!1,disabled:a,ariaLabel:r="Меню второго уровня",image:i,data:s,onClick:c,version:d})=>o("button",{className:h("group/btn border-0 flex shrink-0 items-center",l?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":l&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${mm[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":r,onClick:c,...be(s),children:o(ae,{image:i,className:h("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),um=e=>globalThis[e],pm=(e,t,n=!1)=>{const l=document.getElementById(t);if(l){const t=um(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(um(e))}))}))}return new Promise(((l,a)=>{const r=document.createElement("script");r.src=t,r.async=!0,r.id=t,n&&(r.type="module"),r.addEventListener("load",(()=>{l(um(e))})),r.addEventListener("error",(e=>{a(e)})),document.head.appendChild(r)}))};const gm="chatbot",xm="text-page__btn-chat",fm="webchat-js-container:webchat_rshb",bm={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:"/webchat"},ym=e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const t=bm[e??""];return async n=>{if(t)if("personal"!==e){((e="")=>{const t=document.createElement("link");t.href=e,t.rel="stylesheet",document.head.appendChild(t)})(`${t}/bundle.css`);const e=await pm(gm,`${t}/bundle.js`,!0);e?.render&&e.render(fm,!0)}else{const e=n.target;e?.classList.contains(xm)||e?.classList.add(xm);document.getElementById(fm)||pm(gm,t)}}},vm=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:l="Чат",version:a})=>{const r=ym(e);return o(hm,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:l,onClick:r,buttonSize:"large",isGrayBg:!0,version:a})})),Nm=d((({className:e="",active:t,dataItemName:n,children:l,data:a,...r})=>{const i=xe(),{href:s,target:d,text:m,onClick:u}=i(r);return c("a",{className:h("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:u,...be(a),children:[o("span",{className:wm(t),children:m||l}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),wm=(e=!1)=>h("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),km=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const i=Xr(r((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:i,className:l,role:"menuitem",children:o(Nm,{...a,children:n})})})),Sm={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"},Cm=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",Sm["transparent"===e?"transparent":"default"]),...l,children:a}):null})),Im=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:r})=>{const d="transparent"===t?"white":"black",[,m]=rm(e),[h,u]=l(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=i((()=>e.map(((e,t)=>e=>{u(e?Tm(t):Bm(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(km,{className:h-1<t?"invisible":"",active:e===m,observerOptions:x,onVisibilityChange:f[t],data:e.dataHeader,...e},String(t))))}),p.length?o(om,{items:p,activeItem:m,ariaLabel:a}):null,z.CHAT_BOT?o(vm,{version:t,iconVersion:d,chat:z.CHAT_BOT,ariaLabel:r}):null,o(Cm,{version:t,...n})]})})),Tm=e=>t=>Math.max(t,e+1),Bm=e=>t=>Math.min(t,e),Mm=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(Pm,{...e},String(t))))})]}):null,Pm=d((({icon:e,...t})=>{const n=xe(),{text:l,target:a,href:r,onClick:i}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ae,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:r,target:a,onClick:i,children:o($e,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),Vm=(e,t)=>n=>n.name?o(ec,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Qo(e,n.name),children:o($e,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Rm=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"})]}))),zm=d((({defaultLocation:e})=>{const t=Ac(e),n=xe(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(ec,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),Dm=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=Oc(t?.default),[s,d]=l(""),m=Ma(),h=i((()=>$m(m).sort(((e,t)=>e.name.localeCompare(t.name)))),[m]),u=i((()=>((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(h,_m)),[h]),p=r((e=>{a.location=e,n?.()}),[a,n]);return c(fr,{className:"pb-20",head:c("div",{children:[o($e,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),o(zm,{defaultLocation:t?.default}),o(Rm,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:h.filter((({name:e})=>e&&jd(e.toLowerCase())(s.toLowerCase())>=.8)).map(Vm(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(Vm(x,g))]},e)))}),Mm(e)]});var g,x})),_m=e=>e.name?.charAt(0)??"",$m=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),jm=d((({className:e="",active:t,flat:n,children:l,data:a,...r})=>{const i=xe(),{href:s,target:c,text:d,onClick:m}=i(r);return o("a",{className:h(Lm(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...be(a),children:o("span",{suppressHydrationWarning:!0,className:Am(t,n),children:d||l})})})),Lm=(e=!1,t=!1)=>h("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),Am=(e=!1,t=!1)=>h("font-sans text-s font-light",e?"text-primary-main":h(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Om=d((({className:e,version:t,...n})=>{const l="transparent"===t?"white":"black",a=Ac(n?.branches?.default),i=pn(Yd,n),s=pn(Dm,n),d=r((()=>i.open({})),[i]),m=r((()=>s.open({})),[s]);return c("div",{className:h("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(jm,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:Qo(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o(jm,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(hm,{image:{icon:"LoupeIcon",iconVersion:l},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Em=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const i=Xr(r((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:i,className:l,role:"menuitem",children:o(jm,{...a,children:n})})})),Fm=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:r,search:d,bgColor:m,logo:h})=>{const[u,p]=l(e.length),g=e.slice(u),x=s(null),f={rootRef:x},b=i((()=>e.map(((e,t)=>e=>{p(e?Um(t):Wm(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=h??{};return c("div",{className:"flex items-center justify-between",children:[o(_d,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:x,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(Em,{className:u-1<n?"invisible":"",active:e===t,observerOptions:f,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(om,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Om,{version:a,className:"ml-auto",search:d,navigationItems:e,...r})]})})),Um=e=>t=>Math.max(t,e+1),Wm=e=>t=>Math.min(t,e),Hm={"bg-white":"primary",transparent:"transparent"},Ym=["all","header"],Xm=Ot((({className:e,bgColor:t="bg-white",logo:n={},version:l=Hm[t],portal:a,header:r={},...i})=>{const{common:s,navigation:d}=qm(i?.options?.page),{navigationItems:m}=d,{logo:u={}}=s,[,p]=rm(m),{internetBankButton:x}=a||{},f=n.image?.icon||n.image?.src||n?.title?n:u;return o(g,{tag:"header",className:h("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...i,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Fm,{activeTopItem:p,navigationItems:m?.filter(bd(Ym)),version:l,headerData:{...r,...d},search:s.search,bgColor:t,logo:f})}),o("div",{className:h("mt-s h-px bg-main-divider",Km(l))}),p?.items?.length&&o(Im,{subItems:p?.items?.filter(bd(Ym)),version:l,internetBankButton:x})]})})})),Km=e=>"transparent"===e?"opacity-30":"",qm=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Gm=(e=!1)=>e?{}:{padding:"p-0"},Zm={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Jm=Ot((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:l=!0,version:a="transparent",isTheme:r=!1,isCardBorder:i,...s})=>o(g,{className:h("relative","grid grid-cols-12",Zm[n],e),padding:t,version:a,isTheme:r,...s,children:P({...s,extraProps:{...Gm(l),className:Wr(i)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),Qm=d((e=>{const{className:t,align:n,image:l,...a}=e,r=n?h("flex",qi[n]):"";return o(g,{className:h(r,t),defaultPadding:"p-0",...a,children:o(ae,{image:l})})})),eh=(e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[i,s]=l(t),o=r((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=r((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&i<n-a:i<n-1,m=i>0;return[i,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]},th=({className:e,btnClass:t,canDec:n,canInc:l,dec:a,inc:r})=>n||l?c("div",{children:[n?o(gi,{className:h("absolute z-40",t[0],e),onClick:a}):null,l?o(xi,{className:h("absolute z-40",t[1],e),onClick:r}):null]}):null,nh=d((({className:e="",cards:t=[],button:n})=>{const[a,i]=l(0),s=r((e=>i(e)),[]),d=t.length,[m,h]=eh({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?lh({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,th({...h,btnClass:["left-12","right-12"],className:"top-16"}),u?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(ke,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function lh({activeIndex:e,cards:t,selectedCardIndex:n,onClick:l}){const a=460*e,r=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${r}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:l}){return c("button",{type:"button",onClick:l,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ae,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?ah("страховая сумма",e.sum):null,e?.fee?ah("страховой взнос",e.fee):null]}),rh(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>l(t)})))})})}function ah(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c($e,{size:"text-h6",children:[Ke(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o($e,{size:"text-l",color:"text-secondary-text",children:e})})]})}function rh(e){return e?o(ae,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const ih=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...i})=>{const[s,d]=l(0),m=r((e=>d(e)),[]);return c(g,{className:h("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...i,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:l}){return o("button",{type:"button",onClick:l,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:sh({insuranceTabs:n,button:a})})]})})),sh=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(nh,{button:t,cards:e},String(n)))):null};const oh={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},ch={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},dh=d((e=>{const{className:t="",__html:n,isDotted:l,investmentZeroColumn:a,investmentColumns:r,...i}=e,s=r?[...r]:[];return a&&s.unshift(a),o(g,{className:t,defaultPadding:"p-4xl",...i,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Ci(o("div",{className:"w-px h-4 bg-gray"}))(s.map(mh)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(ph)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(De,{__html:n,isDotted:l,itemSize:"list-s"})}):null]})})})),mh=(e,t,n)=>{const l=1===t,a=t===n.length-1,r=e.cells?.reverse()||[];return o("div",{className:`${hh(l,a,e.cells)}`,children:r.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:r.map(uh)}):null},`column_${t}`)},hh=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),uh=(e,t)=>{const n=e.cellSize||"XS",l=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${ch[n]} ${oh[l]} ${"XS"===n?"px-s":"px-5xl"}`,children:o($e,{align:"text-center",children:e.text})},`cell_${t}`):null},ph=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,gh=["байт","Кб","Мб","Гб","Тб","Пб"],xh=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:r,fileSize:i})=>{const s=i&&a?",":"",d=i??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...be(r),children:[e,t?c($e,{size:"text-l",font:"font-light",children:[t," ",fh(d,m),o($e,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),fh=(e,t)=>e||t?o("span",{children:", "}):"",bh=(e,t)=>(n,l)=>{const a=W(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),r="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${gh[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,i="Attachment"===n?.docType?vh(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(xh,{text:n?.text,target:n?.target,href:a,fileFormat:i,fileSize:r,icon:yh(t),data:n?.data}),o(De,{__html:n?.__html})]},String(l))},yh=e=>e?o(ae,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,vh=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},Nh=d((({href:e,__html:t,target:n,onClose:l})=>c(fr,{className:"my-6xl min-h-fit w-fit mx-auto",onClose:l,children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(Mr,{href:e,target:n,version:"primary",ariaLabel:"Ссылка на согласие",onClick:l,children:"Я согласен"}),o(gr,{type:"button",version:"secondary",onClick:l,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),wh=d((({text:e,href:t,target:n,__html:l,icon:a})=>{const{open:i}=pn(Nh),s=r((()=>i({__html:l,href:t,target:n})),[l,t,n]);return e?c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[yh(a),o($e,{font:"font-light",children:e})]}):null})),kh={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Sh=Ot((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===i?"@md:grid-cols-2":"grid-cols-1",kh[i]),role:"list",children:a.map(Ch(d,r))}):null]})})),Ch=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Ih(t)(n,l):bh(e,t)(n,l)},Ih=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(wh,{...l,icon:e,href:Th(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},Th=e=>"href"in e,Bh=Ot((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:r,__html:i,headingType:s,qr:d,additionalDescription:m="",title:u="Мобильное приложение",version:p="primary",...x})=>{const f="secondary"===p?"p-m min-w-32":"min-w-24",b=r?.src?o(ae,{className:"hidden lg:block",image:r}):null;return o(g,{className:h("min-h-80",e),padding:"p-0",version:p,...x,children:c(Pe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:We(l,{className:"flex-wrap"}),children:[a?o($e,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[i?o(De,{__html:i,itemSize:"list-m"}):null,o($e,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:h("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(ae,{className:"w-fit",image:d})}):null,r?.src?o(ae,{className:"lg:hidden",image:r}):null]})]})})})),Mh=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Ph=(e=[],t={})=>e.filter((({content:e={}})=>zi(t,e))).length,Vh=(e,t)=>e===t;const Rh=(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)))}(Vh,((e=Vh)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))())),zh=[],Dh={},_h={primary:"bg-white/30",secondary:"bg-main-divider"},$h={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},jh=d((({count:e,version:t="secondary"})=>{const n=Te(),l=n?"bg-main-divider":_h[t],a=$h[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})})})),Lh=({text:e,description:t,icon:n,isActive:l,type:a})=>{const r=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:h("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ae,{className:h("h-6 w-6 min-w-6 min-h-6",r.icon),image:{...n,iconVersion:n?.iconVersion??r.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?r.text:r.oldText,children:e}),o("div",{className:"animated"===a?r.desc:r.oldDesc,children:t})]})]})},Ah={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Oh={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Eh={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Fh={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Uh=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const r=e,{text:i,description:s,icon:d,count:m,tabName:u,...p}=t;return o(r,{className:h("h-12","block flex-1","cursor-pointer",Ah[l],n?Fh[l]:Eh[l]),"aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Oh[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${i}`,children:[Lh({text:i,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(jh,{count:m,version:Mh(n,l)})}):null]})})})),Wh=d((e=>o(e?.item?.href?Hh:Yh,{...e}))),Hh=d((e=>{const t=xe(),n=r((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Uh,{...e,tag:"a",item:a,onClick:l})})),Yh=d((({item:e={},onClick:t,...n})=>{const l=r((()=>{t&&t(e)}),[t,e]);return o(Uh,{item:e,onClick:l,...n})})),Xh=(e,t,n)=>(l,a)=>o(Wh,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Kh=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(Xh(l,a,t))}))),qh={categories:[],extraOptions:[],propertyType:[],stage:[]},Gh=Ot((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=_i(qh,{block:a.block,page:a.options?.page}),x=r(((e=qh)=>p(e)),[]),f=(({hotFilters:e=zh,filtrationState:t=Dh,blocks:n=zh,onFiltrationStateChange:l})=>{const a=i((()=>Math.max(0,e.findIndex((e=>Rh(e.filter,t))))),[e,t]),s=i((()=>e.map((t=>({text:t.text,count:Ph(n,t.filter),version:Mh(t===e[a])})))),[e,n,a]),o=r((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:x});return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Kh,{...f}),o(Ti,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(ki,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Zh=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Jh=d((({children:e})=>Zh?e:null)),Qh="/icons/MapMarkerClusterIcon.svg",eu="/icons/MapMarkerClusterYellowIcon.svg";function tu({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),r=nu("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=nu("workplaces",e,a),i=lu(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=lu(n.filter((e=>"offices"===e.type)),"offices",e);r.add(s),l.add(i),t.geoObjects.add(l),t.geoObjects.add(r)}else{const l=lu(n,"offices",e);r.add(l),t.geoObjects.add(r)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const nu=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Qh:eu,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),lu=(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?Qh:eu,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),au={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},ru={...au,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},iu=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(ru).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(K,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),su=()=>function(e,t,n=!0){const[r,i]=l(void 0);return a((()=>{let l=!0;return pm(e,t).then((e=>{l&&i(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),i(void 0)}}}),[e,t,n]),r}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),ou={...au,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},cu=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(ou).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(K,{name:n,width:"20",height:"16"})})})),du=[55.753995,37.614069],mu=d((({points:e,className:t="",zoom:n=5,isLoad:l,selectedAddress:r})=>{const i=s(null),d=s(null),m=su();if(a((()=>{i.current?tu({yandexMaps:m,map:i.current,points:e,isLoad:l}):m?.ready((()=>{i.current||(i.current=new m.Map(d.current,{center:hu(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),tu({yandexMaps:m,map:i.current,points:e,isLoad:l})})),i.current&&r&&m?.geocode(r).then((e=>{const t=e.geoObjects.get(0).geometry.getCoordinates();i.current.setCenter(t),i.current.setZoom(18)}))}),[m,e,n,l,r]),!m)return null;const u="z-10";return c("div",{ref:d,className:h("relative","w-full",t),children:[l?o(Ir,{}):null,c("div",{className:h("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",u),children:[o(cu,{yandexMaps:i}),o(cu,{yandexMaps:i,direction:"out"})]}),iu(i,m,h("right-2 top-80",u))]})})),hu=e=>{const t=[pu(uu(e,0)),pu(uu(e,1))];return t.every((e=>e))?t:du},uu=(e,t)=>e.map((e=>e.coords?.[t])),pu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,gu={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},xu={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},fu={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)},bu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",yu=d((({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const r=l?5:6,i=(e||[]).map((e=>o(Ql,{text:a[e],...t(e)},e))),[s,d]=r>0?[i.slice(0,r),i.slice(r)]:[i,[]],[m,{toggle:h}]=an(!1);return o("div",{children:e?.length?o("div",{children:c(Or,{children:[c("div",{children:[o("div",{className:bu,children:s}),o(Er,{className:bu,isUnfolded:m,children:d})]}),c("div",{className:"flex space-x-lg",children:[l?o(Ar,{label:m?"Меньше фильтров":"Больше фильтров",isUnfolded:m,embedded:!0,short:!0,onClick:h}):null,c(gr,{embedded:!0,onClick:n,children:[o(jr,{children:"Очистить фильтр"}),o(K,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),vu=(e,t,n)=>{const l=Mh("all"===t),a=Mh("business"===t),r=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?i(l):l;return n(t),a},i=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(gr,{"data-id":"all",onClick:t=>r(t,"all",e),version:l,children:"Для физических лиц"}),o(gr,{"data-id":"business",onClick:t=>r(t,"business",e),version:a,children:"Для юридических лиц"})]})},Nu=({__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,wu=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o($e,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),ku=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>fu[t](e)))))},Su=()=>{},Cu=()=>{},Iu=e=>"all"===e?"block":"hidden",Tu=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:r=Cu,renderRemoteWorkplaceCard:s=Cu,getBalloon:d=Cu,getBalloonRemoteWorkplaces:m=Cu,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=hn(gu),{filteredItems:y,points:v,filteredRemoteWorkplaces:N,lengthItems:w}=(({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:l=Su,getBalloonRemoteWorkplaces:a=Su})=>{const[r,s,o,c]=i((()=>{const r=ku(e,n),i=ku(t,n),s=[...r.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:l(e)}))),...i.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:a({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[r,s,i,r.length+i?.length]}),[e,t,n,l,a]);return{filteredItems:r,points:s,filteredRemoteWorkplaces:o,lengthItems:c}})({data:t,remoteWorkplaces:a,filtrationState:x,getBalloon:d,getBalloonRemoteWorkplaces:m}),[k,S]=l("all");return c("div",{className:h("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[wu(p,w),u?Nu(u):null,g&&vu(t,k,S),o("div",{className:h("pb-3xl",Iu(k)),children:o(yu,{filters:Bu([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:xu})})]}),o("div",{className:"h-[600px]",children:o(Jh,{children:o(mu,{points:v,isLoad:n,className:"h-full"})})})]}),c(Jh,{children:[y.map(r),N.map(s)]})]})})),Bu=e=>Object.keys(gu).filter((t=>e.filter((e=>fu[t](e))).length)),Mu=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",Pu={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"}},Vu=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",Pu[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:Pu[n].text,children:t})]}))),Ru=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const r=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[r.length,n,t].every((e=>!e))?null:zu({textItems:r,subText:t,children:n,isPhone:l,...a})})),zu=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:r,children:i,isPhone:s=!1})=>c("div",{className:h("flex gap-2xs flex-col h-full max-w-[300px]",r),children:[e?o($e,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,i||Du(n,s),a?o($e,{color:l,size:"text-m",children:a}):null]}),Du=(e,t)=>e.filter(Boolean).map(((e,n)=>o($e,{size:"text-l",children:t?o("a",{href:`tel:${_u(e)}`,children:e.trim()}):e.trim()},String(n)))),_u=e=>e.replace(/\D/g,""),$u=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}))),ju=d((({children:e})=>{const[t,{toggle:n}]=an(!1);return c("div",{children:[o("div",{className:"hidden sm:block",children:e}),c(Or,{className:"block sm:hidden",children:[o(Er,{isUnfolded:t,children:e}),o(Ar,{className:"my-m mr-m border-b border-solid border-main-divider",label:t?"Скрыть":"Подробнее",isUnfolded:t,embedded:!0,onClick:n})]})]})})),Lu=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:r="",atmAccess:i="",workTime:s},d)=>{const m=[{label:"Устройство",value:Mu(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(i)?"Общедоступный":""},{label:"Регистрационный номер",value:r}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:Mu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Vu,{color:"green",children:Mu(s)})})]}),o(ju,{children:o($u,{className:"flex-wrap",children:m?.map(((e,t)=>o(Ru,{...e},String(t))))})})]},String(d))},Au=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Mu(t)} №${n}`,body:e.toUpperCase()}),Ou=[];const Eu=async e=>{const t=await Rt(e,{method:"GET"});return Array.isArray(t)?t:Ou},Fu={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Uu={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)},Wu=d((({descriptionData:e,className:t})=>{const n=Ac(),l=n?.code??"000",{data:a,isLoad:r}=function(e){const{data:t,error:n}=Hn(`${Yt}/atms?regionCode=${e}`,Eu);return{data:t||Ou,isLoad:!t&&!n}}(l);return o(Tu,{className:t,filterItems:Hu,data:a,isLoad:r,initFilterState:Fu,renderCard:Lu,getBalloon:Au,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Hu=(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=>Uu[t](e))),n=!l.length||l.some((t=>Uu[t](e)));return t&&n}))},Yu=e=>{const t=Ku(e);return o(Ru,{label:"Режим работы",value:t,className:"max-w-none"})},Xu=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Ku=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[Xu({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Xu({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},qu=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Gu=e=>qu.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??"")}}))),Zu=e=>{if(!e)return null;const t=Ju(e);return c($u,{className:"border-none",children:[o(Ru,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Qu)})}),o(Ru,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]})},Ju=e=>{const t=qu.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},Qu=({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)),ep=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Ru,{label:"Валюта",value:e.currency}):null,t?o(Ru,{label:"Купить",value:String(t)}):null,n?o(Ru,{label:"Продать",value:String(n)}):null]},String(l)),tp=(new Date).getDay(),np=e=>{const[t]=e?.slice(tp-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:r}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Vu,{color:"green",children:a}):null,n&&r?o(Vu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Vu,{color:"red",children:"Выходной"})},lp=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",ap=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},r)=>o(Ru,{label:e,value:t&&n?n:"",subText:lp({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(r)),rp=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,ip=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,sp=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,op=(e,t)=>{if(!e.workSchedule)return null;const n=Gu(e.workSchedule);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e.address})]}):null]}),np(n)]}),o(ju,{children:cp(e)})]},String(t))},cp=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:r,workSchedule:i,exchangeRate:s})=>{const d=Gu(i),m=i?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c($u,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Ru,{label:"Факс",value:t,isPhone:!0}),o(Ru,{label:"Телефон филиала",value:e,isPhone:!0}),o(Ru,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Ru,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Ru,{label:"Для консультаций по валютному контролю",value:r,isPhone:!0}),o(Ru,{label:"Контакт-центр",value:a,isPhone:!0})]}),i?.isMatchesPattern?o($u,{children:o(Ru,{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(ap)})})}):c($u,{children:[o(Ru,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Qu)})}),Yu(d)]}),i?.businessScheduleVisibleTag?Zu(i?.businessScheduleDescription):null,s?.currencies?.length?o($u,{className:"flex-wrap",children:s?.currencies?.map(ep)}):null]})},dp=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const r=`${t} ${(e=>{const t=Gu(e),n=e?Ku(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?rp(n):sp(n,l):ip(n):""})(n)}`;return{header:l,body:r}},mp=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o($e,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e})]}):null]})}),o(ju,{children:hp(t)})]},String(n)):null,hp=e=>c("div",{children:[c($u,{className:"flex",children:[o(Ru,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Ru,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание банковских карт"})}),o(Ru,{label:"Операции для физических лиц",children:o($e,{children:"Инвестиционное и накопительное страхование"})}),o(Ru,{label:"Операции для физических лиц",children:o($e,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Ru,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]}),up=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),pp={branches:[],remoteWorkplaces:[]};const gp=async e=>await Rt(e,{method:"GET"})||pp,xp=d((({className:e})=>{const t=Ac(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=Hn(`${Yt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,gp);return{data:t||pp,isLoad:!t&&!n}}(n);return o(Tu,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:op,renderRemoteWorkplaceCard:mp,getBalloon:dp,getBalloonRemoteWorkplaces:up,title:`Офисы филиала ${t?.name}`})})),fp=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(xp,{}):o(Wu,{descriptionData:e})})})),bp=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),yp="hidden sm:flex absolute z-40 top-10",vp=Ot((({className:e="",padding:t,slides:n=[],...a})=>{const[r,i]=l(0),[s,d]=di({itemCount:n?.length||0});return c(g,{className:h("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*r}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(et,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Zr,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(Np({activeSlideIndex:r,onClick:i}))}),d.canScrollLeft?o(gi,{className:h("left-6",yp),onClick:d.scrollLeft}):null,d.canScrollRight?o(xi,{className:h("right-6",yp),onClick:d.scrollRight}):null]})]})})),Np=({activeSlideIndex:e,onClick:t})=>({nav:n},l)=>{const a=l===e,r=a?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",i=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",r),children:[o("div",{className:i,children:n?.title}),o("div",{className:s,children:n?.description})]},String(l))},wp=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:r,richVersion:i,icon:s,title:d,version:m="primary",...u})=>c(g,{className:h("box-border text-left space-y-s",a),version:m,...u,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ue(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ae,{image:s})}):null,d?o(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[r?kp({__html:r,richVersion:i}):null,Sp({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Sp({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Sp({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?We([l]):null]})]}))),kp=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),Sp=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(K,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o($e,{size:"text-xl",color:l,children:t})]})]}):null,Cp=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(De,{__html:t,richVersion:n})})})),Ip=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Tp=Ot((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,foldButtonVersion:l="default",label:a,version:r,role:i,...s})=>{const d=Te(),[m,{toggle:u}]=an(t),p=o(Er,{className:h("gap-lg",Ip(d)),isUnfolded:m,children:P({...s,extraProps:{className:"w-full",padding:"p-0"}})}),x="accordion"===l,f=o(Ar,{className:h(x?"text-h6 my-lg":"text-h4"),label:a,isUnfolded:m,embedded:x,onClick:u});return o(g,{className:h("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:i,...s,children:c(Or,{children:[n?f:p,n?p:f]})})}),{childrenTypes:{exclude:["RollupItem"]}}),Bp=d((({name:e,text:t,value:n,checked:l,onChange:a,className:r})=>o("div",{className:r,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:h(yn.split(" ").filter((e=>"rounded"!==e)),Zl,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o($e,{color:"text-primary-text",children:t}):null]})}))),Mp=d((({className:e=""})=>{const[t,n]=l("option2"),a=r((e=>n(e)),[]);return c("div",{className:h("order-4",e),role:"radiogroup",children:[o(Bp,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Bp,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Pp=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(Vn,{options:s,label:i,placeholder:a||l,onChange:e=>r(e.key),value:c})})),Vp=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:r})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Pp,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Pp,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Rp=["От 1 дня","До 365 дней"],zp=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o($e,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(rl,{min:1,max:365,value:e,items:Rp,onChange:t})]}))),Dp=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:r})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Pp,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Pp,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),_p=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Vp,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:$p(m)}),o(zp,{days:a,setDays:e=>m({days:e})}),o(Dp,{caseVolumes:d,selectedCaseVolume:r,onSelectedCaseVolume:jp(m),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Mp,{}),o(gr,{className:"order-6",version:"primary",onClick:h,children:"Офисы на карте"})]})]}))),$p=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},jp=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Lp=d((({days:e,tariffs:t=[]})=>{const n=Op(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:[Ap("Аренда за",e),Ap("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(K,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),Ap=(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})]}),Op=(e,t)=>{const n=Ep(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Ep=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},Fp=(e,t)=>e.find((e=>e.branchCode===t)),Up=d((e=>{const{regions:t,data:n,branches:l,onChange:r,onClick:i}=e;a((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,r]);const s=Fp(l,n.selectedBranch),d=Wp(s?.safeBoxCaseVolumes),m=Hp(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=Yp(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(_p,{...n,regions:t,onClick:i,branches:l,caseVolumes:d,safeBoxCases:m,onChange:r}),o(Lp,{days:n.days,tariffs:h})]})})),Wp=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Hp=(e,t)=>e?.find((e=>e.volume===t)),Yp=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Xp=`${Yt}/safeboxes`,Kp=[];const qp=async e=>await Rt(e,{method:"GET"})||Kp,Gp=d((({title:e,footnote:t,className:n="",...a})=>{const[i,s]=l(!1),d=r((()=>s((e=>!e))),[]),[m,h]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Ma(),p=Zp(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`${Xp}?regionCode=${e}`:null,qp);return t||Kp}(p),f=r((e=>h((t=>({...t,...e})))),[h]),b=(y=Fp(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Up,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&i?o(mu,{points:b,className:"h-[640px]"}):null]})})),Zp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Jp=e=>e<4?"w-72":"w-52",Qp={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"},eg=d((({buttons:e,className:t="",description:n,showLines:l=!0,steps:a=[],stepVersion:r="gray",title:i,version:s="primary",...d})=>{const m=a.length>3,u=Qp,p=(e=>e?"":"opacity-0")(l),x=Te();return c(g,{className:h("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:i,description:n,isEmbedded:!0,className:"w-full",align:Oi(x)}),a?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:h("flex items-center",m?"px-16":"px-24"),children:Ci(o("div",{className:h("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(tg(u,m,r)))}),o("div",{className:h("flex justify-between",m?"gap-x-s":"gap-x-20"),children:a.map((f={styleMap:u,version:s},(e,t,n)=>{const{styleMap:l,version:a}=f,{label:r,description:i,button:s,isDotted:d}=e;return c("div",{className:h("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Jp(n.length)),children:[c("div",{className:"space-y-xs",children:[r?o($e,{size:"text-h6",align:"text-center",children:r}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[i?o("div",{className:l.description,children:i}):null,o(De,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(ke,{className:"box-border py-s w-full mt-auto",version:a,...s,children:s?.text}):null]},String(t))}))})]}):null,We(e)]});var f})),tg=(e,t,n)=>({icon:l},a)=>{const r="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${ng(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Ue(l)?o(ae,{image:{...l,iconVersion:l?.iconVersion||r},width:"48",height:"48"}):o("span",{className:h("text-h4","transparent"===n?e.iconText:(i=n,"secondary"===i?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var i},ng=e=>e?"h-16 w-16":"h-24 w-24",lg=d((()=>o("div",{className:"hidden",role:"none"}))),ag="hidden sm:flex absolute z-40",rg={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},ig=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:r="default"})=>{const[i,s]=di({itemCount:t?.length||0});return a((()=>sg(i.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Zr,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:rg[r].item,gap:rg[r].gap,children:t.map(Xh(n,l,r))}),s.canScrollLeft?o(gi,{className:h("left-6",ag,rg[r].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(xi,{className:h("right-6",ag,rg[r].buttonTop),onClick:s.scrollRight}):null]})})),sg=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},og={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},cg=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(og[t].wrapper,e),children:o(ig,{className:og[t].component,tabsType:t,...n})}):null,dg=Ot((({className:e="",tabs:t=[],block:n,tabsType:i,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=mg(n??{}),p=V(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(pg(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=ug(f[y],y),S=r((e=>{const t=f.indexOf(e),n=f[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(u,e?.tabName??String(t)):n.delete(u),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[f]);return c(g,{className:h({"sticky top-1 z-20":d&&x},e),defaultPadding:"p-0",block:n,...m,children:[cg({className:h({"pb-1":n?.slots&&"default"===i,"sticky top-1 z-20":d&&!x}),items:hg(t,f),activeItem:N,tabsType:i,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(ug)?.filter(Boolean)||[]}),mg=({__id:e,anchor:t})=>t??e??"tabs",hg=(e,t)=>t?.length?t:e,ug=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",pg=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),gg={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},xg=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:gg[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),fg=d((({className:e="",isOpen:t,onClick:n})=>o(Ar,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),bg={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(fg,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},yg=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:r,setTableInner:i,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{r===o&&s||m(!0)}),[s,o]);return vg({cell:e,cellProps:{rowIdx:n,cellIdx:r,fieldIdx:t,displayTable:e=>{m(!1),c(r),i(e)},isVisible:d}})})),vg=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in bg))return null;return o(bg[n],{...t,...l})},Ng=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(yg,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:r,setOpenTableInnerIdx:i},String(s)))):null}))),wg=(e,t)=>140*Ad(e.slice(0,t).map((e=>e?.cols?.length??1))),kg=(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,Sg=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,l]=eh({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...l]=e,r=h("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o($e,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:r,style:{transform:`translateX(-${wg(l,a)}px)`},children:l?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o($e,{size:"text-xl",children:e.data}):null,e?.cols?kg(e.cols,a):null]},`row${t}`)))})})]},String(t))})),th({...l,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),Cg=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(Sg,{rows:t.rowsData})})})]},l)}))}))),Ig=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Tg=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:Ig(t===n),children:e||t+1})},e)))}):null,t?o(ke,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(K,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Bg=Ot((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[i,s]=l(0),d=r((e=>s(e)),[]),m=a?.[i]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Tg,{currencies:h,activeTabIndex:i,setActiveTabIndex:d,linkToPDF:t}),o(Cg,{activeTabIndex:i,items:m}),o(fg,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o($e,{size:"text-h6",children:"Данных нет"}),o(fg,{onClick:n,isOpen:!0})]})})),Mg=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(Bg,{...t,onClick:n})}):null]}))),Pg=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...i})=>{const[s,d]=l(void 0),m=r((e=>d(e)),[]),[u,p]=l(void 0),g=r((e=>p(e)),[]);return c(Mg,{onHideContentClick:()=>d(void 0),tableInner:s,...i,children:[o("div",{className:h("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ae,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o($e,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(xg,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Ng,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...i},String(t))))}):null]})})),Vg=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,th({...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]})})),Rg=d((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:r=0,...i})=>{const s=a?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[u,p]=eh({itemCount:m,visibleItemCount:2}),x=(d||[]).map(((e,t)=>o(Pg,{row:e,activeIndex:u,rowIdx:t,...i},String(t)))),[f,b]=r>0?[x.slice(0,-r),x.slice(-r)]:[x,[]],[y,{toggle:v}]=an(!1);return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...i,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:r>0?c(Or,{children:[c(Vg,{controls:p,children:[f,o(Er,{isUnfolded:y,children:b})]}),o(Ar,{className:"text-h4",isUnfolded:y,onClick:v})]}):o(Vg,{controls:p,children:x})})]})})),zg=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:r,...i})=>c(g,{className:h("flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10",e),...i,children:["small"===l?Dg():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?_g(n):null,a?o(De,{richVersion:r,__html:a}):null]})]}))),Dg=()=>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"}),_g=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),$g=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]}))),jg=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o($g,{prefix:t,unit:n,suffix:l})})})),Lg=Ot((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:r=!1,isCardBorder:i=!1,image:s,...c})=>{const d=V();return o(g,{className:h("relative flex flex-col",Zm[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:r,...c,children:P({...c,extraProps:{className:h("w-full",Wr(i)),...Gm(l)}})})}),{childrenTypes:[]}),Ag=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Og=d((({className:e,title:t,url:n,previewImg:l,...a})=>{const r=V();return c(g,{className:e,defaultPadding:Ag(e),...a,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:W(r)(l?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:W(r)(n)})}):null]})})),Eg={AdTile:Ft,ApplicationForm:Dr,BankAccountFiltration:Li,BenefitsBlock:Ui,BonusBenefitsBlock:Ki,ButtonsBlock:Gi,CalculatorBonus:ms,CalculatorBusinessDeposit:Bs,CalculatorCredit:Ws,CalculatorDeposit:oo,CalculatorRefinancing:fo,CardTransfer:Do,Carousel:Fo,CarouselCard:Yo,CarouselCatalogCard:Ko,CarouselLinks:Zo,CarouselRecommendationCard:rc,CarouselTariffsCard:cc,ContactsBlock:dc,DepositFiltration:fc,Depository:zc,ErrorBlock:_c,ExchangeRateTile:pd,Footer:Qd,GracePeriod:em,GrantSupport:am,Header:Xm,Headline:S,HorizontalLayout:Jm,ImgBlock:Qm,InsuranceAmountBlock:ih,InvestmentInfo:dh,LinkDocs:Sh,MobileAppTile:Bh,MortgageFiltration:Gh,OfficesAtmsMap:fp,Placeholder:bp,ProductBlock:Et,ProductGallery:vp,RepresentativeOfficeInfo:wp,RichTextBlock:Cp,RollupItem:Tp,SafeDepositRental:Gp,StepsBlock:eg,StickyBottomMenu:lg,TabsLayout:dg,TariffsTable:Rg,TextBlock:zg,UnitBlock:jg,VerticalLayout:Lg,Video:Og},Fg=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))})),Ug="cookie",Wg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=an();$d((()=>{globalThis.localStorage?.getItem(Ug)||n()}),[],3e3);const a=r((()=>{globalThis.localStorage?.setItem(Ug,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(De,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(xr,{className:"bg-main-gray rounded-md w-11 h-11",onClose:a})})]})}):null}));function Hg(e){const t=r((({key:t})=>{"Escape"===t&&e()}),[e]);gn(globalThis.document,"keydown",t)}function Yg(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 Xg=()=>{const[e,{push:t,pop:n,clear:a}]=function(e=[]){const[t,n]=l(e),a=r((e=>n((t=>[...t,e]))),[]),i=r((()=>n((e=>e.slice(0,-1)))),[]),s=r((e=>n((t=>t.filter((t=>t!==e))))),[]),o=r((()=>n([])),[]);return[t,{setList:n,push:a,pop:i,remove:s,clear:o}]}();return Yg(pe.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},Kg=d((()=>{const[e,{close:t}]=Xg(),n=Boolean(e.length);return Hg(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})),qg=d((()=>{const[e,t]=l(null),n=r((()=>{t(null)}),[]);return Yg(pe.observable,"popup",{open:t,close:n}),Hg(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})),Gg="header",Zg="footer",Jg="sticky-footer",Qg={},ex=d((({className:e,data:t=Qg,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:r,fallback:i,...s}=t,d=Lt(s,i);Fg(),Oc();const m={key:"",page:{slots:a,blocks:r,fallback:i,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:h("@container relative",t.style,e),children:[a?.[Gg]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.[Gg],{...m,slotName:Gg})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.[Zg],{...m,slotName:Zg})]})]}),a?.[Jg]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.[Jg],{...m,slotName:Jg})}):null,o(Kg,{}),o(qg,{}),o(Wg,{__html:d?.cookieContent?.__html})]})}));Object.assign(ex,{childrenTypes:[],slots:()=>[Gg,Zg,Jg]});e.Blocks=Eg,e.ContentPage=ex,e.handlerDecorator=me,e.joinList=Ci,e.locationNavigator=Qt,e.packageVersion="0.14.773",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),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={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},N=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>o(n,{role:"heading",className:h("font-sans m-0",v[t],e),children:l||a}))),w=d((({children:e,...t})=>o("p",{className:h("font-sans",Object.values(t)),children:e}))),k={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},S=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const u=k[n],p={marginTop:u.descriptionStyle};return c(g,{className:h({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(N,{className:h("whitespace-pre-wrap",i),...u?.title,as:r||u?.title.as,title:l}):null,a?o(w,{size:u.descriptionSize,font:u.descriptionWeight,align:i,...p,children:a}):null]})})),C=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function T(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=C,blocksRegistry:r={},ancestors:s=I}=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 B=[],M=(e,{key:t,ancestors:n=B,slotName:l=null,extraProps:a,renderProps:i=T,...r})=>{const s=a?(e,t)=>T(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||B,[r.parent,l]]:n},a)))};function P({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const R=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return R.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),D=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!D(e)&&(!t||"_self"===t)),$=e=>Boolean(e?.startsWith("#")),L=e=>(e??"").replace(/\?.*/,"").replace(/\/$/,""),j=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),A=e=>t=>Boolean(e&&t&&e.startsWith(t)&&("/"===t||e===t||"/"===e[t.length]));var O=Object.freeze({__proto__:null,isURL:D,isLocalURL:_,isHash:$,withoutQuery:L,joinPath:j,hasPrefix:A});const E="/api/",F=`${E}v1/storage`,U=[z.CDN,E],W=e=>(t,n)=>{if(H(t))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${F}/${t}/attachment`;const l=t?.startsWith("/");return j(A(t)(n)?"":n,l?"/":(a=e.pathname,a?.split("/").slice(0,-1).join("/")),t);var a},H=e=>!e||D(e)||$(e)||U.some(A(e)),Y={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},X={small:"16",medium:"24",large:"48",xl:"78"},K=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",size:r,width:s=r&&X[r],height:d=s})=>{const m=V(),u="normal"===i?`${n}.svg`:`sprites.svg#${n}`,p=W(m)(j(z.CDN,"/icons/",u));return"normal"===i?o("img",{className:e,style:q(e,d),src:p,alt:l,title:a,"aria-hidden":"true",width:s,height:d}):o(G,{className:e,children:c("svg",{className:h(Y[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})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Z=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function J(e=""){try{return new URL(e).pathname}catch(e){return""}}const Q=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":J(Z.SITE_URL);return t&&!D(t)?W(e)(t,n):t},ee=(e,t)=>e?.media&&t?.media?e.media-t.media:0,te=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(ee).map((({src:e,format:n,media:a},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(K,{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=V(),{closeAll:t}=ge();return n=>{const l=W(e)(n.href);return{...n,href:l,"aria-label":n.text,onClick:me((a=>{n.onClick?.(a);const 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(false);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(!0),()=>{e?.removeEventListener("change",n)}}),[]),e},Be={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Me=(e,{className:t,imageAlign:n})=>e?o("div",{className:h("shrink-1/2 justify-self-center",n&&Be[n],t),children:e}):null,Pe=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:u,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=Te(),v=V(),N=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(P({...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(w,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,$e=d((({children:e,...t})=>o("span",{className:h("font-sans",Object.values(t)),children:e}))),Le=(e,t)=>e?o($e,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,je=(e,t)=>["label"in e?Le(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:je(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(je)}):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:Xe({...a,iconVersion:c}),appendRight:Xe({...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},Xe=e=>Ue(e)&&o(ae,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ke=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),qe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(Ge)}):null)),Ge=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o($e,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ke(2)(t)," ",n||"₽"]}):null]},String(l)),Ze=d((({className:e,tags:t})=>t?.length?o("div",{className:h("flex flex-wrap gap-xs",e),role:"list",children:t.map(Je)}):null)),Je=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o($e,{size:"text-m",font:"font-light",children:e})},String(t)),Qe={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},et=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion: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:C,children:I,...T})=>{const B=y?.src?o(ae,{image:y}):null,M=o(S,{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:C,...T,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:P}):null,u?o(De,{richVersion:p,__html:u,isDotted:m,itemSize:Qe[i]}):null,I,x?.length?o(qe,{priceList:x}):null,nt(f)]})})})),tt=(e,t)=>t?{rightImage:e}:{leftImage:e},nt=e=>e?.length?o(Ze,{tags:e}):null;class lt{_;constructor(e){this._=e}of(e){return new this.constructor(e instanceof lt?e._:e)}filter(e){return this.from(this.entries().filter(e))}map(e){return this.from(this.entries().map(e))}flatMap(e){return this.from(this.entries().flatMap(e))}reduce(e,t){return this.entries().reduce(e.bind(this),t)}}const at=()=>!0,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"],Lt=(e,t)=>Mt(e,(e=>t?.[e])),jt=(e,t)=>{const n=Vt(e),[i,r]=l({});return a((()=>{At(n).then(r)}),[n.join()]),n.length?Lt(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=jt((({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 Xt=e=>e?{phone:Ht(e)}:{},Kt=(e,t="birthday")=>e?{[t]:Wt(e)}:{},qt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Gt=(e,t=!0)=>({[t?"email":"mail"]:e}),Zt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Ht(e)}:{},Jt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e??[])t[l??""]?.(n,a)};function Qt(){return Qt._impl()}Qt._impl=()=>({assign:(e,t)=>{globalThis.open(e,t||"_self")},get origin(){return globalThis.location.origin},get href(){return globalThis.location.href}}),Qt.setup=e=>{Qt._impl=e};const en="rshb-query-params";function tn(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(en)||"";return e&&globalThis.sessionStorage?.setItem(en,e),e}const nn=e=>{const t=e.target?.closest("a"),n=Qt();if(D(t?.href)&&!t?.href?.startsWith(n.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=tn();if(!D(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;l&&n.assign(l,t?.target)}};function ln(){return ln._impl()}function an(e=!1){const[t,n]=l(e),a=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(N,{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(K,{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(K,{className:h("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),zn=(e,t,n)=>h(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Dn=(e,t)=>e||0===t,_n=d((({className:e="",label:t,error:n,errors:l,...a})=>c("div",{className:e,children:[o(Vn,{...a,valid:!n,label:fn({label:t,errors:l})}),kn(n)]}))),$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Ln=d((({field:e,input:t})=>o(_n,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...e(t?.name??"")}))),jn=(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 Xn=`${Yt}/branches`,Kn=[];const qn=async e=>await Rt(e,{method:"GET"})||Kn;function Gn(e=!1){const{data:t}=Hn(`${Yt}${e?"/premiumBranchesByRegions":"/branchesByRegions"}`,zt);return Array.isArray(t)?t:[]}const Zn=(e="")=>"ULTRASERVICE"===e,Jn=d((({field:e,input:t,params:n})=>{const l=Zn(n?.typeForm),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?`${Xn}?regionCode=${e}`:null,qn);return t||Kn}(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:Ke()}),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(K,{className:"mr-s",...Il})]})})),Bl=e=>{const[t,n,l]=e.split(".");if((e=>Number(e)>=Cl&&Number(e)<=(new Date).getFullYear())(l)&&(e=>Number(e)>0&&Number(e)<13)(n)){const e=new Date(Number(l),Number(n)-1,1);let a=0;for(;e.getMonth()===Number(n)-1;)e.setDate(e.getDate()+1),a++;return Number(t)>0&&Number(t)<=a}return!1},Ml=({inputValue:e,setSelectedMonth:t,setSelectedYear:n,onChange:l})=>{if(Bl(e)){const{day:a,month: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},Ll=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(K,{..._l,className:"-rotate-90 cursor-pointer"})}),o(Vn,{onChange:S,value:{key:Nl[f]},options:I,...$l}),o(Vn,{onChange:C,value:{key:String(y)},options:T,...$l}),o("div",{className:"my-auto",onClick:k,children:o(K,{..._l,className:"rotate-90 cursor-pointer"})})]}),o(vl,{today:n,currentMonth:f,currentYear:y,min:s,max:d,onDateSelect:N})]}):null]})]})})),jl=d((({className:e,label:t,error:n,errors:l,...a})=>c("div",{className:h("shrink-0 w-full",e),children:[o(Ll,{label:fn({label:t,errors:l}),valid:Boolean(!n),...a}),kn(n)]}))),Al=d((({field:e,input:t})=>o(jl,{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(jl,{label:"Желаемая дата встречи",...e(t?.name??"")}))),Ul=d((({field:e,input:t})=>o(Sn,{label:"Электронная почта",...e(t?.name??""),...t}))),Wl=[{key:"ULTRASERVICE",text:"Ультра"}],Hl=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],Yl=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Xl=d((({field:e,input:t})=>o(_n,{label:"Способ получения ответа",options:Yl,...e(t?.name??"")}))),Kl=d((({field:e,input:t})=>o(Sn,{label:"ФИО",...e(t?.name??""),...t}))),ql=d((({field:e,input:t})=>o(Sn,{label:"ИНН",isInteger:!0,maxLength:12,...t,...e(t?.name??"")}))),Gl=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths: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})=>jn(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})=>jn(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)),La="Некорректно заполненное поле",ja=e=>$a(e??La),Aa=e=>on((e=>e?.key&&""!==e?.key))(e??La),Oa=e=>on((e=>"string"==typeof e&&e.length>1&&((e="")=>_a.test(e))(e)))(e??La),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:ja(),addressBranch:Aa(),desiredMeetingDate:ja(),product:ja(),localities:ja(),partnerComments:ja(),collectionCount:ja(),acquiringType:Aa(),serviceType:Aa(),annualRevenue:ja(),feedbackMethod:Aa(),serviceDirection:Aa(),secondaryPhone:Fa("Укажите номер телефона"),region:Aa(),situationDescription:ja(),sufferedFrom:ja(),applierType:ja(),surname:Oa("Укажите свою фамилию на кириллице"),name:Oa("Укажите своё имя на кириллице"),middleName:Oa("Укажите своё отчество на кириллице"),birthday:ja("Укажите дату рождения"),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:ja(),typeForm:ja(),consentToReceiveMaterials:Ua,consentDataProcessing:Ua};var Ha;const Ya=(e={})=>({name:t})=>Boolean(e[t??""]),Xa=e=>t=>!t?.condition||t.condition.values.find((n=>{const l=e?.[t?.condition?.name??""];return n===(l?.key??l)})),Ka=d((({field:e})=>{const t=e("secondaryPhone");return o(wa,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?Da(t,Wa.secondaryPhone):t})})),qa=d((({field:e,input:t})=>o(_n,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Hl,...e(t?.name??"")}))),Ga=d((({field:e,input:t})=>o(Sn,{label:"Описание ситуации",...t,...e("situationDescription")}))),Za=[{key:"blg",text:"Белгородской области"},{key:"brnsk",text:"Брянской области"},{key:"krsk",text:"Курской области"},{key:"chs",text:"От стихийного бедствия ЧС"}],Ja=d((({field:e,input:t})=>o(_n,{label:"Пострадал в",...t,options:Za,...e("sufferedFrom")}))),Qa=d((({field:e,input:t})=>o(Sn,{label:"Фамилия",maxLength:60,...e(t?.name??""),...t}))),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:Kl,addressBranch:Jn,desiredMeetingDate:Fl,product:e=>o(Ca,{...e,source:oi}),localities:ca,isClient:ia,partnerComments:pa,collectionCount:Ol,acquiringType:Ln,onlineCheckout:ua,posTerminal:Sa,serviceType:ni,term:ti,amount:cl,annualRevenue:dl,vedTypes:ri,feedbackMethod:Xl,serviceDirection:qa,bankEmpolee:pl,secondaryPhone:Ka,applicationDate:e=>o(Sn,{label:"Дата и время обращения в Банк",...e}),region:e=>Zn(e?.params?.typeForm)?o(Ra,{...e}):o(Va,{...e}),consentToReceiveMaterials:si,sufferedFrom:Ja,situationDescription:Ga,representativeName:za,applierType:ul,surname:Qa,name:ma,middleName:da,birthday:Al,phone:ka,email:Ul,inn:ql,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(K,{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(S,{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||""}${jn(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(w,{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,...qt(l,g),...Gt(i,g),...Xt(a),...Kt(s,"desiredMeetingDate"),...g?Kt(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(Xa(e)).map((({name:e})=>[e,l[e??""]]))):i})(x)),[x]),y=pn(bi),v=ln(),w=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:w}),C=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return c(un,{className:h("container space-y-m",e),title:t,...g,children:[c("form",{onSubmit:S,children:[l.map(((e,t)=>{return c("div",{className:h((l=e.columns,2===l?"@xl:grid-cols-2":""),"grid gap-x-m"),children:[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(N,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ae,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ae,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),_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(S,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),$i=e=>e%2!=0,Li=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}))),ji=d((({isUnfolded:e,...t})=>o(K,{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(Li,{children:l}),o(ji,{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:[M(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:[M(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 Xi(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}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:a,children:r,onIntersection:s})=>{const c=Xi(i((e=>{e.length&&s&&s(n||0,e[e.length-1])}),[s,n]),a);return o("div",{className:h("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:c,role:"listitem",children:r})})),Gi=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Zi=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(Qi(n))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Ji(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?Gi[a-1]:"",{"h-full":N},t),style:w?Ji(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})),Ji=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Qi=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),er={"horizontal-list":"w-6","vertical-list":"h-6"},tr=({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?er[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),nr=({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))},lr=e=>e,ar=(e=lr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),ir=ar(),rr=(e=lr)=>ar((t=>-e(t))),sr=rr(),or=e=>t=>e.scrollWidth/t,cr=e=>(t,n)=>{e.scrollBy({left:n*or(e)(t),behavior:"smooth"})},dr=({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?[rr()(a),ar()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;n.current&&(m?cr(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(h?cr(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}]},mr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},hr=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]=dr({itemCount:s.length}),g=ur(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(Zi,{containerRef:u,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(nr({activeIndex:t,onClick:x}))}):n?o("div",{className:h("flex gap-xs",mr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(tr({activeIndex:t,onClick:x,listType:l}))}):null})),ur=(e=!1)=>({behavior:e?"auto":"smooth"}),pr=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(K,{name:t,iconVersion:"",size:"small"})}))),gr=d((e=>o(pr,{name:"ArrowLeftIcon",version:"secondary",ariaLabel:"Пролистать влево",...e}))),xr=d((e=>o(pr,{name:"ArrowRightIcon",version:"secondary",ariaLabel:"Пролистать вправо",...e}))),fr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",br=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?yr(t):null,i?o(gr,{className:h(vr(a),m?"left-1":"left-0"),onClick:s}):null,r?o(xr,{className:h(vr(a),m?"right-1":"right-0"),onClick:d}):null]})})),yr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:h(fr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:h(fr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),vr=(e=!1)=>h("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Nr=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]=dr({itemCount:b,onVisibleIndicesChange:x}),[N]=v.visibleIndicesRange;return c("div",{className:h(e,"vertical-list"===i?"relative h-full":""),children:[o(Zi,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(br,{className:h(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:u,isBottom:Boolean(f?.length)}),o(hr,{className:h(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:f,containerRef:y,containerScroll:v})]})})),wr=({blocksToRender:e,...t})=>o(Nr,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:h("relative min-w-80",Wi(!0)),children:T(e,t)},String(n))})}),kr=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Sr(n,t),o(Ui,{...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Sr(n,t),wr({...l,blocksToRender:t})]});default:return null}})),Sr=(e,t)=>e&&!t.length?o(_i,{...e}):null,Cr=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Ir=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))))),Tr=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,Cr(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Br(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]}))),Br=e=>([t,n])=>{const l=n?.type;return"array"===l?Mr(t,e)(n):null},Mr=(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(Ir,{items:l,multiple:!n?.single,...t(e)})]},e)},Pr=e=>e;function Vr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Rr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,zr=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Rr(t[e])||Rr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Rr(t[e])||Rr(n[e])||Dr(t[e])<=Dr(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Rr(t[e])||Rr(n[e])||Dr(t[e]?.min)>=Dr(n[e]?.min)&&Dr(t[e]?.min)<=Dr(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Rr(t[e])||Rr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Rr(t[e])||Rr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),Dr=e=>Number(e||0),_r=(e,{block:t,page:n,normalize:l=Pr})=>{const a=t?.blocks||[],[i,s]=hn(e),o=r((()=>Vr(a,a.map((e=>Lt(e.content,n?.fallback))))),[a,n?.fallback]),c=i===e?a:((e,t)=>(n=Pr)=>e?.filter((([,e])=>zr(t,n(e)||{}))).map((([e])=>e)))(o,i)(l);return[i,{blocksToRender:c,blocksWithProps:o},s]},$r={},Lr={},jr=Ot((({className:e,filtrationSchema:t=$r,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=_r(Lr,{block:a.block,page:a.options?.page}),d=o(Vn,{className:"w-64",label:n?.title,options:Ar(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>Ar(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:h(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Tr,{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(kr,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),Ar=e=>Vr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),Or=(e=!1)=>e?"text-left":"text-center",Er={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Fr=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",Er[t],e),style:{width:i,height:i},role:"figure",children:o(K,{name:l,width:"54%",...a})}):null})),Ur=d((({className:e="",title:t,benefitList:n,...l})=>{const a=Te();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(N,{headingType:"h3",as:"h2",className:Or(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(Wr)}):null]})})),Wr=({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(Fr,{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(N,{headingType:"h6",children:e}),o($e,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(De,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Hr=e=>({icon:t,title:n,description:l},a)=>c("div",{className:h("flex flex-col gap-1","items-center",{"justify-center":!l&&!n}),children:[n?o($e,{size:"text-h6",font:"font-normal",align:e,children:n}):null,t?o(ae,{image:t,height:"180",className:"w-auto mx-auto"}):null,l?o($e,{size:"text-h6",font:"font-normal",align:e,children:l}):null]},String(a)),Yr=(e,t,n)=>o("div",{className:`grid gap-2xs ${Xr(t)}`,children:e.map(Hr(n))}),Xr=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Kr=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(S,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Yr(e,l,t):null]}))),qr={start:"justify-start",center:"justify-center",end:"justify-end"},Gr=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&h("flex",qr[n]);return o(g,{className:h("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:We(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(N,{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($e,{size:"text-h3",children:"number"==typeof e?[l,Ke(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),ns=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:h("flex justify-between @xl:flex-col",e),children:[t?o($e,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(ts,{value:n,...a}):o($e,{size:"text-h3",children:"-"})]}))),ls=(e,t)=>e?o(w,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,as=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName: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:Ke(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($e,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(K,{className:"w-10 h-auto lg:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Процентная ставка не найдена, выберите другие параметры"})})]}))),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(il,{items:e?[`От ${Ke(1)(l.min||0)} ${n}`,`До ${Ke(1)(l.max||0)} ${n}`]:[],step:t,...l}),os={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},cs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ds=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,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=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}=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,We(l,{isVertical:!0}),ls(a)]})]})})})),hs=Math.round(29.5),us=(e,t=0)=>e?.sum?e.sum:t,ps=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,gs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,xs=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange: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})]}),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}),We(l,{isVertical:!0}),a?.map(ls)]}),vs=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:Ns([e,t],l),Ns=([e,t],n=[])=>({[e]:n.length?sr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?ir(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}=Hn(t?`${Yt}/depositrates/${t}`:null,zt);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=Ot((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:u}]=hn({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(il,{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($e,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Ql,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Ql,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ps=e=>Rs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],e),Vs=(e=[],t=!1)=>Rs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Rs=(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]},zs=({min:e=0,max:t=0,availableMonths:n,...l})=>o(il,{items:[`От ${Ds(e)}`,`До ${Ds(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),Ds=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,_s=e=>xs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),$s=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(el(t?.[a],n.minMonths,n.maxMonths))},Ls=(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},As=e=>Os({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Os({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Os({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Os({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Os=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Es=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[js],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>As({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=>As({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=Ls(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:u}},Fs=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),Us={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},Ws=Ot((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,onChange:d,...m})=>{const u=Ps(n?.rateRows),[p,{field:g}]=hn({moneyValue:us(s,2e5),monthsValue:ps(s,hs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)},{onChange:d}),x=Es(p,n,r),f=_s({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(el(p.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(el(p.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!Fs(s)&&u&&$s({field:g,defParams:u,calcParams:x,map:Us,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:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),zs({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),Hs({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка от",value:u?.rate,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),We(l,{isVertical:!0}),ls(i)]})]})})})),Hs=(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]}),Ys=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},Xs={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]?Zs(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=>[Gs({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Gs({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Gs({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Gs({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)))||Xs,{rate:h}=m,u=qs(h,e),p=l+u,g=t||[Xs];return{...m,...Ns(["minSum","maxSum"],g),...Ns(["minMonths","maxMonths"],g),availableMonths:Ys(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)},Gs=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Zs=(e,t)=>e+Math.round((t-e)/2),Js=(e="rub")=>"rub"===e,Qs=(e,t)=>{const{minMonths:n,maxMonths:l}=Ns(["minMonths","maxMonths"],lo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:el(a,n,l)}},eo=(e,t)=>{const{minSum:n,maxSum:l}=Ns(["minSum","maxSum"],lo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:el(a,n,l)}},to=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),no=e=>{const t=Js(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},lo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},ao=(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]}),io(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]}),io(e.isShowNewClient),e.isShowNewClient?o(Ql,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},io=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,ro={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},so={text:"₽",key:"rub"},oo=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))??[so],g=i((e=>t=>e?{...t,...no(t),...eo(t,e),...Qs(t,e),...to(t,e)}:t)(u),[u]),[x,{field:f}]=hn({moneyValue:us(d,2e4),monthsValue:ps(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:so},{normalizer:g}),b=f?.("currency")?.value??so,y=f?.("isNewClient")?.value,v=lo(u,b),N=Ks(x,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,I=i((()=>{$s({field:f,defParams:Vs(v,y),calcParams:N,monthsValue:"minMonths",map:ro})}),[f,u]);a((()=>{!Fs(d)&&v&&I()}),[d,u]);const T=w===Vs(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:co(b?.key)}),u&&u?.length>1?o(_n,{label:"Валюта",options:p,...f("currency")}):null]}),zs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...f("monthsValue"),value:N.monthsValue}),ao({...N,...s},f)]}),rs({rate:w,children:ho(I,T)}),ys({income:k,finalSum:S,buttons:[...l,mo(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:f("isMonthlyInterestPayment").value})]})})})),co=(e="")=>Js(e)?1e3:100,mo=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},ho=(e,t=!1)=>t?null:o(gi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),uo=e=>po({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&po({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),po=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],go={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},xo=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[go],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>uo({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=>uo({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)))||go)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=Ls(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}},fo=Ot((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...s})=>{const[d,{field:m}]=hn({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),u=xo(d,n,i),p=r((()=>Ps(n?.rateRows)?.rate),[n?.rateRows]),g=_s({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...m("isAnnuity")});return o(Zr,{className:e,title:t,...s,children:c("section",{className:h(Jr,e),children:[c("div",{className:Qr,children:[ss({title:"Остаток долга в других банках, ₽ ",step:500,min:u.minSum,max:u.maxSum-u.maxSumExtra,...m("moneyValue"),value:u.moneyValue}),ss({title:"Ежемесячный платёж в других банках, ₽",step:500,min:u.minSumOld,max:u.maxSumOld,...m("oldMonthlyPayment"),value:u.oldMonthlyPayment}),zs({title:"Новый срок кредита, месяцев",min:u.minMonths,max:u.maxMonths,...m("monthsValue"),value:u.monthsValue}),bo({...u,...i},m),u.isExtraMoney?ss({title:"Дополнительная сумма, ₽ ",step:500,min:u.minSumExtra,max:u.maxSumExtra,...m("moneyExtra"),value:u.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:g})]}),c("div",{className:h(es,"@4xl:w-1/2"),children:[o(ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(ns,{title:"Ставка от",value:p,fractionDigits:2,postfix:"%"}),o(ns,{title:"Ежемесячный платёж",value:u.monthlyPayment,postfix:"₽"}),u.benefit>0?o(ns,{title:"Выгода в месяц",value:u.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:g}),We(l,{isVertical:!0}),ls(a)]})]})})})),bo=(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})]}),yo=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(vo(e)),n,l)):vo(e),format:Ke(r)}),d=i((e=>t&&t(vo(e))),[t]);return o(Nn,{onChange:d,...s,...c})})),vo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),No=d((e=>o(yo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o($e,{size:"text-xl",font:"font-light",children:"₽"})})})));function wo(e,t){for(const[n,l]of e.entries())null!=l?t.setItem(n,l):t.removeItem(n)}function ko(e,t){return wo(e,t),wo(t,e),e.bus.watch((({type:e,event:n})=>{null!=n?t.setItem(e,n):t.removeItem(e)}))}class So{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 Co{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 Io={};function To(e,t=Io){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 Bo=new Co;function Mo(){return To(Bo)}ko(Bo,new So(globalThis?.sessionStorage));const Po={private:"p2p/registerP2P",business:"b2c/registerB2C"},Vo=({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(S,{className:"w-full",title:"Ошибка перевода",description:l,headlineVersion:"XS",isEmbedded:!0}),n?c("div",{className:"bg-secondary-dark rounded-xl px-4 pt-4 pb-8 grid gap-4 grid-cols-12",children:[c("div",{className:"col-span-8",children:[" ",n]}),o("div",{className:"col-span-4",children:o(ae,{image:{icon:"ResponseFailIcon",iconVersion:"normal"}})})]}):null]})})},Ro=e=>{const t=pn(Vo),n=Mo(),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/${Po[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])},zo={amount:1500},Do=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:l,formType:i="private",...r})=>{const[s,{setValue:d}]=an(!1),m=Ro(i),[{amount:u},{field:p,onSubmit:x}]=hn(zo,{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(N,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",onSubmit:x,children:[o(No,{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]})]})})),_o=({className:e,text:t="ХИТ"}={})=>c("div",{className:h("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(K,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(w,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),$o="relative h-full",Lo={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(Eo),r=n?{defaultPadding:"p-6xl pb-m"}:{};return P({...l,renderProps:(n,l,a)=>c("div",{className:Ao(n,{someCardsHighlighted:i}),children:[T(n,l,{className:Oo(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Eo(n)?_o({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Ao=(e,{someCardsHighlighted:t})=>h($o,t&&(Eo(e)?"pt-3xl":"pt-3xl sm:pt-16")),Oo=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>h($o,"min-w-80",Lo[l],t&&(Eo(e)?"pt-3xl sm:pt-16":"pt-3xl"),Wi(n),n&&"h-full"),Eo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Fo=Ot((({className:e,visibleItemCount:t=1,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(Nr,{className:h("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Uo(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"}})}),Uo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],Wo="z-10 border border-solid w-full h-full",Ho=h(Wo,"absolute hidden @xl:block border-transparent"),Yo=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(Ho,"top-9 right-12 bg-green-dark")}),o("div",{className:h(Ho,"top-6 right-8 bg-green")}),o("div",{className:h(Ho,"top-3 right-4 bg-green-light")}),c("div",{className:h(Wo,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(S,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),We([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Xo={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(Pe,{className:"h-full",padding:d,title:o(S,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ae,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:We([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(qo)]}):null,a?c($e,{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 ${Xo[e]}`},String(t)),Go=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})),Zo=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(S,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(S,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Jo(l):null]})}))),Jo=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(Go,{...e},String(t))))}),Qo=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),ec=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})})),tc=[{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"}}],nc=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=>tc.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},lc(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:ac(s??!1,a??!1,n),buttonClassName:u})}),r?o($e,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),lc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",ac=(e,t,n=!1)=>h(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),ic=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=true,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:h("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(ec,{href:a,target:m,className:"h-full",data:Qo(v),children:c(Pe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(S,{title:u,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...tt(Ue(i)?o(ae,{image:i}):null,f),buttons:d.length?o(nc,{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,rc(l,p)]})})}))),rc=(e,t)=>e?o(w,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,sc=new ue,oc=(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))},cc=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(oc)),[u]),[y,v]=r((()=>m>0?[b.slice(0,m),b.slice(m)]:[b,[]]),[m,b]),[w,k]=l(!1);a((()=>sc.subscribe("fold",(e=>{e&&p?.parent&&e.parent===p?.parent&&k(e.isUnfolded)}))),[p?.parent]);const S=i((()=>{sc.fire("fold",{type:"fold",isUnfolded:!w,parent:p?.parent})}),[w,p?.parent]);return c(g,{className:h("flex flex-col",e),defaultPadding:"p-2xl",...f,children:[o(ae,{className:"self-center",image:s}),t?o(N,{className:h("pt-xs",n),headingType:"h5",title:t}):null,d?.text?o(ke,{className:"w-full mt-m mb-lg",...d}):null,v.length?c(Oi,{children:[c("div",{children:[y,o(Ei,{isUnfolded:w,children:v})]}),u.length>=m?o(Ai,{className:"mt-m",label:w?"Скрыть":"Подробнее о тарифе",isUnfolded:w,embedded:!0,data:x,onClick:S}):null]}):o("div",{children:y})]})})),dc=d((({className:e,contacts:t,info:n,version:l="secondary",...a})=>c(g,{className:h("flex",e),defaultPadding:"p-6xl",version:l,...a,children:[n?.length?mc(n):null,t?.length?mc(t):null]}))),mc=e=>o("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>hc({column:e,i:t})))}),hc=({column:e,i:t})=>e?o("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:l},a)=>c("div",{children:[o(S,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),n?o("div",{className:"mt-xs opacity-80",children:o(w,{size:"text-m",font:"font-light",children:n})}):null,o("div",{className:h({"mt-xl":Boolean(l?.text)}),children:We([l])})]},String(a))))},`col-${String(t)}`):null,uc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,pc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),gc=1e9,xc={sum:{min:1e4,max:gc},period:3},fc=Ot((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=_r(xc,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:bc(e)})}),u=s.map((([,e])=>e?.paramsSource?.rows?.[0]?.rates)),p=yc(u);return c(g,{className:h("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Tr,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(No,{label:l?.title,min:500,max:gc,...d("sum",{parse:e=>({min:Number(e),max:gc}),format:({min:e})=>String(e)})}),o(il,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(kr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),bc=e=>Dt((e?.paramsSource?.rateRows||[]).filter(uc).flatMap((e=>pc(e.minMonths,e.maxMonths)))),yc=e=>Dt(e.flatMap((e=>e||[])).filter(uc).flatMap((e=>pc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],vc=[{key:"10"},{key:"50"},{key:"100"}],Nc=({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:vc,iconVersion:"black"})]})},wc="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",kc=(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:wc,"aria-label":`Страница ${i}`,children:i},String(t)):null},Sc={width:"24",height:"24"},Cc=({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(K,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Ic(1===e),...Sc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:wc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(kc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:wc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(K,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Ic(e===n),...Sc})})]})},Ic=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Tc=({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(Cc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Nc,{itemCount:l,onItemCountChange:a}):null]}),Bc=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})]})})),Mc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Bc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Ll,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Ll,{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:"Очистить"})})]}))),Pc=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(Fr,{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)})),Vc=`${Yt}/depository`,Rc={startDate:void 0,endDate:void 0,query:""},zc=Ot((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:u}]=hn(Rc),{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(Vc);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(Vc+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(Mc,{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(Pc,{...e},String(e.publicId)))):o(_i,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Tc,{currentPage:n+1,onPageChange:f,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),Dc=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,_c=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:Dc(l)}),o(S,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(ke,{version:a?.version,text:a?.text,...a}):null]}))),$c=new Co;function Lc(e){return To($c,e)}ko($c,new So(globalThis?.localStorage));const jc=`${Yt}/region`;function Ac(e="Москва"){return Lc().location??{name:e}}function Oc(e="Москва"){const t=Lc(),n=i((async()=>{if(!t.location){const n=await Rt(jc);t.location=n??{name:e}}}),[t,e]);return Hn(jc,n),t}var Ec;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Ec||(Ec={}));const Fc=new Intl.NumberFormat("ru",{style:"currency",currency:Ec.RUB}),Uc=e=>e?Fc.format(e):"",Wc="text-m font-light text-secondary-text ",Hc=`${Wc} text-left`,Yc=`${Wc} pl-5xl text-center`,Xc=`${Wc} pl-5xl text-right`,Kc={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},qc=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:h("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Hc,children:o($e,{size:"text-m",children:"Валюта"})}),o("th",{className:Yc,children:o($e,{size:"text-m",children:"Купить"})}),o("th",{className:Xc,children:o($e,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Gc)})]}))),Gc=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:Kc[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:Uc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o($e,{size:"text-h6",children:Uc(e?.buyExchangeRate)})})]},t)},Zc={icon:"GpsIcon"},Jc=d((({className:e="",address:t})=>c("div",{className:h("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(Fr,{...Zc,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(w,{size:"text-l",color:"text-primary-main",children:t}):null,o(w,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Qc=(e,t,n)=>{const l=Number(ed(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)},ed=e=>e.replace(/[^\d.,]/g,"").replace(",",".");function td(e){if(!e)throw new Error("Value should be fulfilled");return e}const nd=e=>t=>{const[,n]=td(e.find((([e])=>e(t))));return n(t)},ld=e=>nd(e.map((([e,t])=>[e,()=>t])));ld.if=e=>new ad(void 0,e);class ad{parent;predicate;unit;get entry(){return[td(this.predicate),td(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new ad(this,e)}then(e){return new ad(this.parent,this.predicate,e)}else(e){return nd([...id(this),[()=>!0,e]])}}const id=e=>[...e?.parent?id(e.parent):[],e.entry],rd=e=>ld([[e=>e.value!==Ec.RUB&&e.oppositeValue!==Ec.RUB,()=>e.handleConvert(e.value,Ec.RUB)],[e=>e.value===Ec.RUB&&e.oppositeValue===Ec.RUB,()=>e.handleConvert(e.value,Ec.USD)],[e=>e.value===Ec.RUB&&e.oppositeValue===Ec.RUB,()=>e.handleConvert(e.value,Ec.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function sd(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 od=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ec.RUB,selectBuy:n?.[0]?.currency?.currency||Ec.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:[sd({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:cd(r,d,n),value:r.inputSell,setValue:e=>md(d,n)(e,r.selectSell,r.selectBuy)}),sd({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:dd(r,d,t),value:r.inputBuy,setValue:e=>hd(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(ke,{text:a.text,version:a?.version,...a}):null]})})),cd=(e,t,n)=>l=>{t({selectSell:l}),rd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{md(t,n)(e.inputSell,l,a)}})},dd=(e,t,n)=>l=>{t({selectBuy:l}),rd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>hd(t,n)(e.inputBuy,l,a)})},md=(e,t)=>(n,l,a)=>{e({inputSell:ed(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(Qc(n,i,l===Ec.RUB)||"")})},hd=(e,t)=>(n,l,a)=>{e({inputBuy:ed(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(Qc(n,i,l===Ec.RUB)||"")})},ud=`${Yt}/exchangerates`;const pd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const a=function(e){const t=e?.code||"000",{data:n}=Hn(ud+`?regionCode=${t}`,zt);return n||{}}(Ac()),i=gd(a?.exchangeRate?.currencies),r=i.filter((e=>e.buyExchangeRate));r.unshift({currency:{currency:Ec.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Ec.RUB}}),o(g,{className:h("box-border min-h-80",e),...l,children:o(Pe,{className:"h-full",title:o(N,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[i?o(qc,{className:"mb-xl",exchangeCurrencyItems:i}):null,o(Jc,{address:a?.address})]}),o(od,{className:"grow w-1/2",currencyRatesBuy:r,currencyRatesSell:s,button:n})]})})})})),gd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],xd=d((({className:e="",items:t})=>{const n=xe();return o("ul",{className:h("flex flex-col gap-s w-full",e),children:t?.map(fd(n))})})),fd=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},bd=e=>t=>!t.displayArea||e.includes(t.displayArea.toLowerCase()),yd=["all","footer"],vd=d((({className:e,navigationItems:t})=>{const n=xe();return o("div",{role:"menu",className:h("w-full flex items-start justify-between flex-col md:flex-row gap-y-m lg:order-2",e),children:t?.filter(bd(yd)).map(n).map(Nd)})})),Nd=(e,t)=>{const{text:n,items:l=[],href:a,target:i="_self",onClick:r,dataFooter:s}=e,d=l.filter(bd(yd));return c("div",{role:"menuitem",className:"flex flex-col gap-s w-full @md:w-1/4",children:[o("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i,onClick:r,...be(s),children:n}),d?o(xd,{items:d}):null]},String(t))},wd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:h("space-y-m",e),children:t.map(kd)}):null)),kd=(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(Sd)})]},String(t)),Sd=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Cd(e.type,e.text)}),o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Cd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Id(t)}`,children:o($e,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(w,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Id=e=>e.replaceAll(/\D/g,""),Td=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}`})})),Bd=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(Td,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Md="w-full lg:w-52",Pd={width:"118",height:"24"},Vd={"bg-white":"color",transparent:"white"},Rd={"bg-white":"text-primary-main",transparent:"text-white"},zd=(e,t,n)=>o(ae,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Vd[e]},className:Rd[e],width:n?.width,height:n?.height}),Dd={"bg-white":"text-primary-text",transparent:"text-white"},_d=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:[zd(i,n?.image,Pd),r?l??o("div",{className:"ml-s",children:o($e,{font:"font-medium",color:Dd[i],size:"",children:n?.title??"Россельхозбанк"})}):null]})));function $d(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}const Ld=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 jd=(e,t)=>(n,l)=>{for(const[a,i]of l)n.set(a,e(n.get(a)||t,i));return n},Ad=(e=[])=>e.reduce(((e,t)=>e+t),0),Od=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Ed=e=>t=>e.map((([e,n])=>[Ld(t)(e),n])).filter((([e])=>e>=.8)).map((([e,t])=>Ud(t,e))).reduce(jd(Math.max,0),new Map),Fd=e=>t=>{return Vr(t,t.map((({title:e})=>e)).map((e=>t=>{const n=Od(t||"");return n.length?Ad(e.map((e=>ir(n.map(Ld(e)))))):0})(e))).sort((e=>(t,n)=>-e(t,n))((n=([,e])=>e,(e,t)=>n(e)-n(t)))).map((([e])=>e));var n},Ud=(e,t)=>new Map(e.map((e=>[e,t]))),Wd=({basePathList:e,initialQuery:t=""})=>{const[n,i]=l(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=Hn(e?.length?e:null,Hd),[s,o]=l(null);return $d((()=>{r&&o(r.map((e=>t=>{const{corpus:n,dictionary:l}=t||{};if(!(e&&n?.length&&l&&Object.keys(l).length))return[];const a=Od(e);if(!a.length)return[];const i=Object.entries(l),r=[...a.map(Ed(i)).reduce(jd(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>n[e]));return Fd(a)(r)})(n)))}),[r,n]),[s,{value:n,onChange:i}]},Hd=async(...e)=>(await Promise.allSettled(e.map((e=>Rt(j(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Yd=d((({initialQuery:e,navigationItems:t,onClose:n})=>{const l=r((()=>t?.map((e=>e.href||"/"))),[t]),[a,i]=Wd({basePathList:l,initialQuery:e}),s=r((()=>Xd(t)(a)),[t,a]);return o(fi,{head:o(Bc,{autoFocus:!0,...i}),onClose:n,children:o(vd,{navigationItems:s})})})),Xd=e=>t=>e?.length&&t?.length?Vr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:j("/",t)})))}))):[],Kd=d((({className:e,search:t,...n})=>{const[a,r]=l(""),s=i((()=>r("")),[]),d=pn(Yd,n),m=i((e=>{r(e),qd(e)&&d.open({initialQuery:e,onClose:s})}),[s,d]);return c("div",{className:h("relative",e),role:"search",children:[o(Bc,{value:a,placeholder:t?.placeholder,onChange:m}),o(xi,{className:"absolute top-0 right-0 sm:hidden",onClose:s})]})})),qd=e=>e&&e.length>=3,Gd=(e,t)=>{const{logo:n}=e??{},{dataHeader:l,dataFooter:a,...i}=n??{};return c("div",{className:"flex items-stretch gap-3xl",children:[o(_d,{className:Md,logo:i,data:a,showTitle:!1}),o(Kd,{className:"grow",navigationItems:t,...e})]})},Zd=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}`})})),Jd=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(Zd,{index:t,...e},String(t))))}):null]}))),Qd=Ot((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{},a=n.options?.page?.common??{},{documents:i,relatedEnterprises:r,contacts:s,mediaLinks:d=[],horizontalNavigationTitle:m,feedbackButton:u,license:p,otherLinks:x=[]}=t??{};return c(g,{tag:"footer",className:h("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[Gd(a,l),c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(vd,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:h(Md,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(wd,{items:s}),u?o(ke,{className:"w-full",version:"primary",...u}):null,d.map(((e,t)=>o(nc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),x.map(((e,t)=>o(Mi,{className:"text-s font-light",...e},`${e.href}_${t}`)))]})]}),o(Bd,{title:m,links:r}),o(Jd,{links:i,license:p})]})})),em=d((({className:e="",title:t,description:n,calendar:l,...a})=>c(g,{className:h("space-y-m",e),defaultPadding:"p-6xl",...a,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0}),l?tm(l):null]}))),tm=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),n=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return c("div",{className:"w-full flex flex-col justify-center gap-s",children:[o("div",{className:"flex w-full text-h6 text-center",children:n.map((e=>nm(e,t)))}),o("div",{className:"flex gap-s w-full",children:n.map(((e,t)=>c("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[o("div",{className:"flex gap-s",children:lm(e)}),c("div",{className:"text-s",children:[o($e,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",o($e,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},nm=(e,t)=>e.month?.map(((e,n)=>o("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${n}`))),lm=e=>e.month?.map((e=>e.image?.src?o("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:o(ae,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),am=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(N,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(_n,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,u?o("div",{className:"text-center",children:o(Mi,{className:h("w-full @xl:w-auto"),href:u,target:"_blank",version:n?.version??"primary",data:Qo(i,s?.key),children:n?.text?n.text:"Перейти"})}):null]})})}));function im(e=[]){const t=V(),n=Array.from(e.entries()).filter((([,e])=>rm(t)(e)));return n.find((([,e])=>rm(t,!0)(e)))??n[n.length-1]??[]}const rm=(e,t=!1)=>({href:n})=>{if(!n)return!1;const l=L(sm(e)(n));return t?l===L(n):l.startsWith(L(n))},sm=e=>t=>{const n=J(Z.SITE_URL);return D(t)?e.href:j(n,e.pathname)},om=d((({className:e="",items:t,activeItem:n,ariaLabel:l="Меню"})=>{const[r,{setFalse:d,toggle:m}]=an(!1),u=xn(d),p=s(null),g=i((({isOpened:e,buttonRef:t,menuRef:n})=>{if(e&&t.current&&n.current){const e=n.current.getBoundingClientRect(),l=t.current.getBoundingClientRect(),a=globalThis.innerWidth-e.width;e.right>=globalThis.innerWidth?n.current.style.left=`${a}px`:l.left>e.left&&(a>l.left?n.current.style.left="":n.current.style.left=`${a}px`)}}),[r]);return gn(globalThis,"resize",(()=>g({isOpened:r,buttonRef:u,menuRef:p}))),a((()=>{g({isOpened:r,buttonRef:u,menuRef:p})}),[r]),c("div",{className:h(r?"rounded-md shadow-blue-gray":"",e),ref:u,role:"navigation",children:[o("button",{type:"button",className:"group/btn flex justify-between items-center h-6","aria-label":l,onClick:m,role:"button","aria-labelledby":"labeldiv",children:Array(3).fill(null).map(((e,t)=>o("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),o("div",{ref:p,className:h("absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56 z-40",{hidden:!r}),"aria-hidden":!r,children:dm(t,n)})]})})),cm=d((({isActive:e,...t})=>{const n=xe(),{text:l,href:a,target:i,onClick:r}=n(t);return o("a",{className:h("text-l font-light pb-m hover:text-primary-main",{"text-primary-main":e}),href:a,target:i,onClick:r,role:"link",...be(t?.data),children:l})})),dm=(e,t)=>e?.map(((e,n)=>o(cm,{isActive:e===t,...e},e?.text??String(n)))),mm={default:"w-6 h-6",large:"w-12 h-12"},hm=d((({className:e,isRounded:t,buttonSize:n="default",isGrayBg:l=!1,disabled:a,ariaLabel:i="Меню второго уровня",image:r,data:s,onClick:c,version:d,isLoading:m})=>o("button",{className:h("group/btn border-0 flex shrink-0 items-center",l?"p-s rounded-full":"p-0 bg-inherit","transparent"===d?"backdrop-opacity-30 bg-white/30":l&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${mm[n]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:c,...be(s),children:m?o("div",{className:"w-full h-full rounded-full border-4 border-r-transparent animate-spin text-primary-main"}):o(ae,{image:r,className:h("h-full",{"bg-main-divider/20 rounded-full":t}),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),um=e=>globalThis[e],pm=(e,t,n=!1)=>{const l=globalThis.document.getElementById(t);if(l){const t=um(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(um(e))}))}))}return new Promise(((l,a)=>{const i=globalThis.document.createElement("script");i.src=t,i.async=!0,i.id=t,n&&(i.type="module"),i.addEventListener("load",(()=>{l(um(e))})),i.addEventListener("error",(e=>{a(e)})),globalThis.document.head.appendChild(i)}))};const gm="chatbot",xm="text-page__btn-chat",fm="webchat-js-container:webchat_rshb",bm={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:"/webchat"},ym=async(e,t)=>{const n=e.target;n?.classList.contains(xm)||n?.classList.add(xm);globalThis.document.getElementById(fm)||await pm(gm,t)},vm=async e=>{const t=await pm(gm,`${e}/bundle.js`,!0);((e="")=>{if(!globalThis.document.getElementById(e)){const t=globalThis.document.createElement("link");t.href=e,t.id=e,t.rel="stylesheet",globalThis.document.head.appendChild(t)}})(`${e}/bundle.css`);globalThis.document.getElementById(fm)?t?.chatOpen?.():(Nm(),t?.render?.(fm,!0))},Nm=()=>{const e=globalThis.document.createElement("div");e.id=fm,e.style.position="fixed",e.style.right="0",e.style.bottom="0",globalThis.document.body.appendChild(e)},wm=d((({chat:e="personal",iconVersion:t,className:n,ariaLabel:r="Чат",version:s})=>{const{load:c,isLoading:d}=(e=>{const[t,n]=l(!1);a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]);const r=bm[e??""];return{load:i((t=>{r&&(n(!0),"business"===e?vm(r).finally((()=>n(!1))):ym(t,r).finally((()=>n(!1))))}),[r,e]),isLoading:t}})(e);return o(hm,{className:n,image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:r,onClick:c,buttonSize:"large",isGrayBg:!0,version:s,isLoading:d})})),km=d((({className:e="",active:t,dataItemName:n,children:l,data:a,...i})=>{const r=xe(),{href:s,target:d,text:m,onClick:u}=r(i);return c("a",{className:h("relative inline-block bg-transparent text-center no-underline",e),href:s,target:d,"data-item-name":n,onClick:u,...be(a),children:[o("span",{className:Sm(t),children:m||l}),t?o("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-white"}):null]})})),Sm=(e=!1)=>h("font-sans text-l lg:font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Cm=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=Xi(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(km,{...a,children:n})})})),Im={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"},Tm=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",Im["transparent"===e?"transparent":"default"]),...l,children:a}):null})),Bm=d((({subItems:e=[],version:t,internetBankButton:n,dropdownMenuAriaLabel:a,chatBotAriaLabel:i})=>{const d="transparent"===t?"white":"black",[,m]=im(e),[h,u]=l(e.length),p=e.slice(h),g=s(null),x={rootRef:g},f=r((()=>e.map(((e,t)=>e=>{u(e?Mm(t):Pm(t))}))),[e]);return c("nav",{className:"mt-s flex gap-s items-center justify-between",children:[o("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-lg",role:"menu",children:e.map(((e,t)=>o(Cm,{className:h-1<t?"invisible":"",active:e===m,observerOptions:x,onVisibilityChange:f[t],data:e.dataHeader,...e},String(t))))}),p.length?o(om,{items:p,activeItem:m,ariaLabel:a}):null,z.CHAT_BOT?o(wm,{version:t,iconVersion:d,chat:z.CHAT_BOT,ariaLabel:i}):null,o(Tm,{version:t,...n})]})})),Mm=e=>t=>Math.max(t,e+1),Pm=e=>t=>Math.min(t,e),Vm=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(Rm,{...e},String(t))))})]}):null,Rm=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]})})),zm=(e,t)=>n=>n.name?o(ec,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:Qo(e,n.name),children:o($e,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,Dm=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"})]}))),_m=d((({defaultLocation:e})=>{const t=Ac(e),n=xe(),{href:l}=n({href:`/branches/${t.slug}`});return t?o("div",{className:"mb-s",children:c(w,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(ec,{href:l,className:"inline mx-2xs text-primary-main",children:t.name})]})}):null})),$m=d((({foreignOffices:e,branches:t,onClose:n})=>{const a=Oc(t?.default),[s,d]=l(""),m=Ma(),h=r((()=>jm(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,Lm)),[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(_m,{defaultLocation:t?.default}),o(Dm,{onSearch:d,searchTerm:s})]}),onClose:n,children:[s&&s.length>=3?o("div",{children:h.filter((({name:e})=>e&&Ld(e.toLowerCase())(s.toLowerCase())>=.8)).map(zm(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(zm(x,g))]},e)))}),Vm(e)]});var g,x})),Lm=e=>e.name?.charAt(0)??"",jm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()??""}))),Am=d((({className:e="",active:t,flat:n,children:l,data:a,...i})=>{const r=xe(),{href:s,target:c,text:d,onClick:m}=r(i);return o("a",{className:h(Om(t,n),e),href:s,target:c,onClick:m,rel:"noopener noreferrer","aria-label":`Ссылка на ${d}`,...be(a),children:o("span",{suppressHydrationWarning:!0,className:Em(t,n),children:d||l})})})),Om=(e=!1,t=!1)=>h("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",{"px-m py-xs":!t}),Em=(e=!1,t=!1)=>h("font-sans text-s font-light",e?"text-primary-main":h(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Fm=d((({className:e,version:t,...n})=>{const l="transparent"===t?"white":"black",a=Ac(n?.branches?.default),r=pn(Yd,n),s=pn($m,n),d=i((()=>r.open({})),[r]),m=i((()=>s.open({})),[s]);return c("div",{className:h("flex items-center ml-5 md:max-w-[300px] xl:max-w-full gap-lg",e),role:"navigation",children:[n?.branches?.visible?o(Am,{className:"whitespace-nowrap text-ellipsis overflow-hidden",flat:!0,href:"#",text:a?.name,data:Qo(n?.branches?.dataClick,a?.name??""),onClick:m}):null,n?.officesAtms?.href?o(Am,{className:"whitespace-nowrap",flat:!0,...n.officesAtms}):null,o(hm,{image:{icon:"LoupeIcon",iconVersion:l},ariaLabel:n?.search?.ariaLabel??"Поиск",onClick:d,data:n?.search?.data})]})})),Um=d((({observerOptions:e,onVisibilityChange:t,children:n,className:l,...a})=>{const r=Xi(i((e=>{if(!e.length||!t)return;const n=e[e.length-1];t(n.isIntersecting)}),[t]),e);return o("span",{ref:r,className:l,role:"menuitem",children:o(Am,{...a,children:n})})})),Wm=d((({navigationItems:e=[],activeTopItem:t,dropdownMenuAriaLabel:n,version:a,headerData:i,search:d,bgColor:m,logo:h})=>{const[u,p]=l(e.length),g=e.slice(u),x=s(null),f={rootRef:x},b=r((()=>e.map(((e,t)=>e=>{p(e?Hm(t):Ym(t))}))),[e]),{dataFooter:y,dataHeader:v,...N}=h??{};return c("div",{className:"flex items-center justify-between",children:[o(_d,{className:"mr-3xl",bgColor:m,logo:N,data:v,showTitle:!1}),o("div",{ref:x,className:"overflow-hidden min-w-[160px] pb-xs mt-xs",role:"menu",children:e.map(((e,n)=>o(Um,{className:u-1<n?"invisible":"",active:e===t,observerOptions:f,onVisibilityChange:b[n],data:e.dataHeader,...e},String(n))))}),g.length?o(om,{className:"mx-xs",items:g,activeItem:t,ariaLabel:n}):null,o(Fm,{version:a,className:"ml-auto",search:d,navigationItems:e,...i})]})})),Hm=e=>t=>Math.max(t,e+1),Ym=e=>t=>Math.min(t,e),Xm={"bg-white":"primary",transparent:"transparent"},Km=["all","header"],qm=Ot((({className:e,bgColor:t="bg-white",logo:n={},version:l=Xm[t],portal:a,header:i={},...r})=>{const{common:s,navigation:d}=Zm(r?.options?.page),{navigationItems:m}=d,{logo:u={}}=s,[,p]=im(m),{internetBankButton:x}=a||{},f=n.image?.icon||n.image?.src||n?.title?n:u;return o(g,{tag:"header",className:h("pt-m px-20",p?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...r,children:c("div",{className:"container",children:[o("div",{className:"whitespace-nowrap",children:o(Wm,{activeTopItem:p,navigationItems:m?.filter(bd(Km)),version:l,headerData:{...i,...d},search:s.search,bgColor:t,logo:f})}),o("div",{className:h("mt-s h-px bg-main-divider",Gm(l))}),p?.items?.length&&o(Bm,{subItems:p?.items?.filter(bd(Km)),version:l,internetBankButton:x})]})})})),Gm=e=>"transparent"===e?"opacity-30":"",Zm=e=>({navigation:e?.navigation??{},common:e?.common??{}}),Jm=(e=!1)=>e?{}:{padding:"p-0"},Qm={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},eh=Ot((({className:e="",padding:t="p-0",gap:n="XS",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r,...s})=>o(g,{className:h("relative","grid grid-cols-12",Qm[n],e),padding:t,version:a,isTheme:i,...s,children:P({...s,extraProps:{...Jm(l),className:Wi(r)}})})),{childrenTypes:{exclude:["HorizontalLayout"]}}),th=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?h("flex",qr[n]):"";return o(g,{className:h(i,t),defaultPadding:"p-0",...a,children:o(ae,{image:l})})})),nh=(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}]},lh=({className:e,btnClass:t,canDec:n,canInc:l,dec:a,inc:i})=>n||l?c("div",{children:[n?o(gr,{className:h("absolute z-40",t[0],e),onClick:a}):null,l?o(xr,{className:h("absolute z-40",t[1],e),onClick:i}):null]}):null,ah=d((({className:e="",cards:t=[],button:n})=>{const[a,r]=l(0),s=i((e=>r(e)),[]),d=t.length,[m,h]=nh({itemCount:d,visibleItemCount:2}),{canDec:u,canInc:p}=h,g=t[m]?.href;return c("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[c("div",{className:"relative overflow-hidden","aria-label":"Страховые программы",children:[d?ih({activeIndex:m,cards:t,selectedCardIndex:a,onClick:s}):null,lh({...h,btnClass:["left-12","right-12"],className:"top-16"}),u?o("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,p?o("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),o(ke,{className:"w-60 text-center",version:"primary",...n,href:g})]})}));function ih({activeIndex:e,cards:t,selectedCardIndex:n,onClick:l}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return o("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:o("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:n,onClick:l}){return c("button",{type:"button",onClick:l,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(n?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?o(ae,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,c("div",{className:"flex gap-s",children:[e?.sum?rh("страховая сумма",e.sum):null,e?.fee?rh("страховой взнос",e.fee):null]}),sh(n)]},String(t))}({slide:e,i:t,isActive:Boolean(t===n),onClick:()=>l(t)})))})})}function rh(e,t){return c("div",{className:"flex flex-col text-left whitespace-pre",children:[c($e,{size:"text-h6",children:[Ke(2)(t)," ₽"]}),o("div",{className:"mt-2xs",children:o($e,{size:"text-l",color:"text-secondary-text",children:e})})]})}function sh(e){return e?o(ae,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const oh=d((({className:e="",title:t,insuranceTabs:n=[],button:a,...r})=>{const[s,d]=l(0),m=i((e=>d(e)),[]);return c(g,{className:h("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?o(N,{className:"text-center",title:t,headingType:"h3"}):null,n?.length>1?o("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:n.map(((e,t)=>function({title:e,i:t,isActive:n,onClick:l}){return o("button",{type:"button",onClick:l,"aria-label":`Кнопка ${e}`,className:"box-border px-m py-s text-m font-light "+(n?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>m(t)})))}):null,o("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:ch({insuranceTabs:n,button:a})})]})})),ch=({insuranceTabs:e,button:t})=>{const n=e?.map((e=>e.cards));return n?.length?n.map(((e,n)=>o(ah,{button:t,cards:e},String(n)))):null};const dh={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},mh={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},hh=d((e=>{const{className:t="",__html:n,isDotted:l,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),o(g,{className:t,defaultPadding:"p-4xl",...r,children:c("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?c("div",{children:[c("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Cr(o("div",{className:"w-px h-4 bg-gray"}))(s.map(uh)),o("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),o("div",{className:"border-t border-gray -mt-xs mx-3xl"}),o("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(xh)})]}):null,n?o("div",{className:"max-w-2xl font-light text-base",children:o(De,{__html:n,isDotted:l,itemSize:"list-s"})}):null]})})})),uh=(e,t,n)=>{const l=1===t,a=t===n.length-1,i=e.cells?.reverse()||[];return o("div",{className:`${ph(l,a,e.cells)}`,children:i.length?o("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-1.5 min-w-72":""),children:i.map(gh)}):null},`column_${t}`)},ph=(e,t,n=[])=>[n.length?"flex-1":"flex-0",!n.length||e||t?"":"pl-s",n.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),gh=(e,t)=>{const n=e.cellSize||"XS",l=e.cellColor||"green";return e.text?o("div",{className:`flex-1 flex items-center justify-center relative py-xs ${mh[n]} ${dh[l]} ${"XS"===n?"px-s":"px-5xl"}`,children:o($e,{align:"text-center",children:e.text})},`cell_${t}`):null},xh=(e,t)=>e?.title?o("div",{className:"flex-1 max-w-44 text-center px-xs last:pr-4xl last:max-w-52",children:e.title},`title_${t}`):null,fh=["байт","Кб","Мб","Гб","Тб","Пб"],bh=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," ",yh(d,m),o($e,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),yh=(e,t)=>e||t?o("span",{children:", "}):"",vh=(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))} ${fh[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?wh(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(bh,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:Nh(t),data:n?.data}),o(De,{__html:n?.__html})]},String(l))},Nh=e=>e?o(ae,{className:"min-w-6 min-h-6",image:e,width:"24",height:"24"}):null,wh=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},kh=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:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]}))),Sh=d((({text:e,href:t,target:n,__html:l,icon:a})=>{const{open:r}=pn(kh),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:[Nh(a),o($e,{font:"font-light",children:e})]}):null})),Ch={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Ih=Ot((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:h("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(S,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:h("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Ch[r]),role:"list",children:a.map(Th(d,i))}):null]})})),Th=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?Bh(t)(n,l):vh(e,t)(n,l)},Bh=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(Sh,{...l,icon:e,href:Mh(t)?t?.href:t?.attachment?.src}),o(De,{__html:t?.__html})]},String(n)):null},Mh=e=>"href"in e,Ph=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(N,{headingType:s,title:u,className:h("whitespace-pre-wrap",n)}),rightImage:b,buttons:We(l,{className:"flex-wrap"}),children:[a?o($e,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:h("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[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]})]})})})),Vh=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Rh=(e=[],t={})=>e.filter((({content:e={}})=>zr(t,e))).length,zh=(e,t)=>e===t;const Dh=(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)))}(zh,((e=zh)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))())),_h=[],$h={},Lh={primary:"bg-white/30",secondary:"bg-main-divider"},jh={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Ah=d((({count:e,version:t="secondary"})=>{const n=Te(),l=n?"bg-main-divider":Lh[t],a=jh[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})})})),Oh=({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})]})]})},Eh={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Fh={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Uh={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Wh={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Hh=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",Eh[l],n?Wh[l]:Uh[l]),"aria-label":"Список табов",onClick:a,...p,children:c("div",{className:h("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Fh[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Oh({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(Ah,{count:m,version:Vh(n,l)})}):null]})})})),Yh=d((e=>o(e?.item?.href?Xh:Kh,{...e}))),Xh=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(Hh,{...e,tag:"a",item:a,onClick:l})})),Kh=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Hh,{item:e,onClick:l,...n})})),qh=(e,t,n)=>(l,a)=>o(Yh,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Gh=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(qh(l,a,t))}))),Zh={categories:[],extraOptions:[],propertyType:[],stage:[]},Jh=Ot((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:u,update:p}]=_r(Zh,{block:a.block,page:a.options?.page}),x=i(((e=Zh)=>p(e)),[]),f=(({hotFilters:e=_h,filtrationState:t=$h,blocks:n=_h,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Dh(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Rh(n,t.filter),version:Vh(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(Gh,{...f}),o(Tr,{filtrationSchema:n,resetButton:l,field:m,reset:u}),o(kr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Qh=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),eu=d((({children:e})=>Qh?e:null)),tu="/icons/MapMarkerClusterIcon.svg",nu="/icons/MapMarkerClusterYellowIcon.svg";function lu({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=au("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=au("workplaces",e,a),r=iu(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=iu(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=iu(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 au=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?tu:nu,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),iu=(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?tu:nu,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),ru={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},su={...ru,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},ou=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(su).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(K,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),cu=()=>function(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return pm(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=globalThis.document.getElementById(t);e&&globalThis.document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1),du={...ru,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},mu=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(du).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(K,{name:n,width:"20",height:"16"})})})),hu=[55.753995,37.614069],uu=d((({points:e,className:t="",zoom:n=5,isLoad:l,selectedAddress:i})=>{const r=s(null),d=s(null),m=cu();if(a((()=>{r.current?lu({yandexMaps:m,map:r.current,points:e,isLoad:l}):m?.ready((()=>{r.current||(r.current=new m.Map(d.current,{center:pu(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),lu({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(mu,{yandexMaps:r}),o(mu,{yandexMaps:r,direction:"out"})]}),ou(r,m,h("right-2 top-80",u))]})})),pu=e=>{const t=[xu(gu(e,0)),xu(gu(e,1))];return t.every((e=>e))?t:hu},gu=(e,t)=>e.map((e=>e.coords?.[t])),xu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,fu={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},bu={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},yu={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)},vu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Nu=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:vu,children:s}),o(Ei,{className:vu,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(Li,{children:"Очистить фильтр"}),o(K,{name:"CloseIcon",size:"small"})]})]})]})}):null})})),wu=(e,t,n)=>{const l=Vh("all"===t),a=Vh("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:"Для юридических лиц"})]})},ku=({__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,Su=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(N,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o($e,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Cu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>yu[t](e)))))},Iu=()=>{},Tu=()=>{},Bu=e=>"all"===e?"block":"hidden",Mu=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Tu,renderRemoteWorkplaceCard:s=Tu,getBalloon:d=Tu,getBalloonRemoteWorkplaces:m=Tu,descriptionData:u,title:p})=>{const g=p?.includes("Офис"),[x,{field:f,reset:b}]=hn(fu),{filteredItems:y,points:v,filteredRemoteWorkplaces:N,lengthItems:w}=(({data:e,remoteWorkplaces:t=[],filtrationState:n={},getBalloon:l=Iu,getBalloonRemoteWorkplaces:a=Iu})=>{const[i,s,o,c]=r((()=>{const i=Cu(e,n),r=Cu(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:[Su(p,w),u?ku(u):null,g&&wu(t,k,S),o("div",{className:h("pb-3xl",Bu(k)),children:o(Nu,{filters:Pu([...t,...a]),field:{field:f,reset:b},onlyOffice:g,labels:bu})})]}),o("div",{className:"h-[600px]",children:o(eu,{children:o(uu,{points:v,isLoad:n,className:"h-full"})})})]}),c(eu,{children:[y.map(i),N.map(s)]})]})})),Pu=e=>Object.keys(fu).filter((t=>e.filter((e=>yu[t](e))).length)),Vu=e=>e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:"",Ru={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"}},zu=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",Ru[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:Ru[n].text,children:t})]}))),Du=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:_u({textItems:i,subText:t,children:n,isPhone:l,...a})})),_u=({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||$u(n,s),a?o($e,{color:l,size:"text-m",children:a}):null]}),$u=(e,t)=>e.filter(Boolean).map(((e,n)=>o($e,{size:"text-l",children:t?o("a",{href:`tel:${Lu(e)}`,children:e.trim()}):e.trim()},String(n)))),Lu=e=>e.replace(/\D/g,""),ju=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}))),Au=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})]})]})})),Ou=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Vu(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:Vu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(zu,{color:"green",children:Vu(s)})})]}),o(Au,{children:o(ju,{className:"flex-wrap",children:m?.map(((e,t)=>o(Du,{...e},String(t))))})})]},String(d))},Eu=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Vu(t)} №${n}`,body:e.toUpperCase()}),Fu=[];const Uu=async e=>{const t=await Rt(e,{method:"GET"});return Array.isArray(t)?t:Fu},Wu={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Hu={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)},Yu=d((({descriptionData:e,className:t})=>{const n=Ac(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Hn(`${Yt}/atms?regionCode=${e}`,Uu);return{data:t||Fu,isLoad:!t&&!n}}(l);return o(Mu,{className:t,filterItems:Xu,data:a,isLoad:i,initFilterState:Wu,renderCard:Ou,getBalloon:Eu,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Xu=(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=>Hu[t](e))),n=!l.length||l.some((t=>Hu[t](e)));return t&&n}))},Ku=e=>{const t=Gu(e);return o(Du,{label:"Режим работы",value:t,className:"max-w-none"})},qu=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Gu=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[qu({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),qu({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},Zu=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ju=e=>Zu.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Qu=e=>{if(!e)return null;const t=ep(e);return c(ju,{className:"border-none",children:[o(Du,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(tp)})}),o(Du,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]})},ep=e=>{const t=Zu.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},tp=({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)),np=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Du,{label:"Валюта",value:e.currency}):null,t?o(Du,{label:"Купить",value:String(t)}):null,n?o(Du,{label:"Продать",value:String(n)}):null]},String(l)),lp=(new Date).getDay(),ap=e=>{const[t]=e?.slice(lp-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(zu,{color:"green",children:a}):null,n&&i?o(zu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(zu,{color:"red",children:"Выходной"})},ip=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",rp=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Du,{label:e,value:t&&n?n:"",subText:ip({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),sp=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,op=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,cp=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,dp=(e,t)=>{if(!e.workSchedule)return null;const n=Ju(e.workSchedule);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o($e,{size:"text-h4",children:e.name}),e.address?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e.address})]}):null]}),ap(n)]}),o(Au,{children:mp(e)})]},String(t))},mp=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Ju(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(ju,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Du,{label:"Факс",value:t,isPhone:!0}),o(Du,{label:"Телефон филиала",value:e,isPhone:!0}),o(Du,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Du,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Du,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Du,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(ju,{children:o(Du,{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(rp)})})}):c(ju,{children:[o(Du,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(tp)})}),Ku(d)]}),r?.businessScheduleVisibleTag?Qu(r?.businessScheduleDescription):null,s?.currencies?.length?o(ju,{className:"flex-wrap",children:s?.currencies?.map(np)}):null]})},hp=({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=Ju(e),n=e?Gu(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?sp(n):cp(n,l):op(n):""})(n)}`;return{header:l,body:i}},up=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o($e,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(K,{name:"GeolocationIcon",width:"24",height:"24"}),o($e,{size:"text-l",children:e})]}):null]})}),o(Au,{children:pp(t)})]},String(n)):null,pp=e=>c("div",{children:[c(ju,{className:"flex",children:[o(Du,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Du,{label:"Операции для физических лиц",children:o($e,{children:"Оформление и обслуживание банковских карт"})}),o(Du,{label:"Операции для физических лиц",children:o($e,{children:"Инвестиционное и накопительное страхование"})}),o(Du,{label:"Операции для физических лиц",children:o($e,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Du,{label:"Режим работы",className:"max-w-none",children:o($e,{children:e})})]}),gp=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),xp={branches:[],remoteWorkplaces:[]};const fp=async e=>await Rt(e,{method:"GET"})||xp,bp=d((({className:e})=>{const t=Ac(),n=t?.code??"000",{data:l,isLoad:a}=function(e="000"){const{data:t,error:n}=Hn(`${Yt}/branchesAndRemoteWorkplaces?regionCode=${encodeURIComponent(e)}`,fp);return{data:t||xp,isLoad:!t&&!n}}(n);return o(Mu,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:dp,renderRemoteWorkplaceCard:up,getBalloon:hp,getBalloonRemoteWorkplaces:gp,title:`Офисы филиала ${t?.name}`})})),yp=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(bp,{}):o(Yu,{descriptionData:e})})})),vp=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:h("box-border",e),...l,children:[o(S,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(x,{})]}))),Np="hidden sm:flex absolute z-40 top-10",wp=Ot((({className:e="",padding:t,slides:n=[],...a})=>{const[i,r]=l(0),[s,d]=dr({itemCount:n?.length||0});return c(g,{className:h("box-border overflow-hidden",e),defaultPadding:"pt-6xl",padding:t,...a,children:[o("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:n.map((({productBlock:e},t)=>o("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:o(et,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),c("div",{className:"relative pr-xs mt-m -mb-m flex gap-xs box-border",children:[o(Zi,{containerRef:s,snapAlign:"snap-start",onVisibleIndicesChange:d.handleVisibleIndicesChange,itemClassName:"h-40 flex items-stretch w-screen",gap:8,children:n.map(kp({activeSlideIndex:i,onClick:r}))}),d.canScrollLeft?o(gr,{className:h("left-6",Np),onClick:d.scrollLeft}):null,d.canScrollRight?o(xr,{className:h("right-6",Np),onClick:d.scrollRight}):null]})]})})),kp=({activeSlideIndex:e,onClick:t})=>({nav:n},l)=>{const a=l===e,i=a?"min-w-[370px] mt-s h-28 bg-white shadow-dark-blue border-none p-6":"min-w-72 mt-lg h-24 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:h("relative overflow-hidden grow","ml-xs px-xl","box-border basis-0 border","border-gray group-data-secondary:border-white/50","text-left whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:s,children:n?.description})]},String(l))},Sp=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(N,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Cp({__html:i,richVersion:r}):null,Ip({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Ip({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),Ip({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?We([l]):null]})]}))),Cp=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{...e,itemSize:"list-s"})}),Ip=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(K,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o($e,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o($e,{size:"text-xl",color:l,children:t})]})]}):null,Tp=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(De,{__html:t,richVersion:n})})})),Bp=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Mp=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",Bp(d)),isUnfolded:m,children:P({...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"]}}),Pp=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]})}))),Vp=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(Pp,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Pp,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Rp=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})})),zp=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(Rp,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Rp,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Dp=["От 1 дня","До 365 дней"],_p=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:Dp,onChange:t})]}))),$p=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(Rp,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Rp,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Lp=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(zp,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:jp(m)}),o(_p,{days:a,setDays:e=>m({days:e})}),o($p,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Ap(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(Vp,{}),o(gi,{className:"order-6",version:"primary",onClick:h,children:"Офисы на карте"})]})]}))),jp=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Ap=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Op=d((({days:e,tariffs:t=[]})=>{const n=Fp(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:[Ep("Аренда за",e),Ep("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(w,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(K,{className:"@xl:h-60",name:"PackA4Icon"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(w,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),Ep=(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})]}),Fp=(e,t)=>{const n=Up(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Up=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},Wp=(e,t)=>e.find((e=>e.branchCode===t)),Hp=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Wp(l,n.selectedBranch),d=Yp(s?.safeBoxCaseVolumes),m=Xp(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,h=Kp(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Lp,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Op,{days:n.days,tariffs:h})]})})),Yp=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Xp=(e,t)=>e?.find((e=>e.volume===t)),Kp=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,qp=`${Yt}/safeboxes`,Gp=[];const Zp=async e=>await Rt(e,{method:"GET"})||Gp,Jp=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=Qp(m.selectedRegion,u),x=function(e){const{data:t}=Hn(e?`${qp}?regionCode=${e}`:null,Zp);return t||Gp}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=Wp(x,m.selectedBranch)||x,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(N,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Hp,{regions:u,branches:x,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(w,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(uu,{points:b,className:"h-[640px]"}):null]})})),Qp=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,eg=e=>e<4?"w-72":"w-52",tg={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"},ng=d((({buttons:e,className:t="",description:n,showLines:l=!0,steps:a=[],stepVersion:i="gray",title:r,version:s="primary",...d})=>{const m=a.length>3,u=tg,p=(e=>e?"":"opacity-0")(l),x=Te();return c(g,{className:h("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:s,...d,children:[o(S,{headlineVersion:"S",title:r,description:n,isEmbedded:!0,className:"w-full",align:Or(x)}),a?.length?c("div",{className:"box-border space-y-lg flex flex-col justify-center",children:[o("div",{className:h("flex items-center",m?"px-16":"px-24"),children:Cr(o("div",{className:h("h-0.5 w-full bg-secondary-light flex-1",p)}))(a.map(lg(u,m,i)))}),o("div",{className:h("flex justify-between",m?"gap-x-s":"gap-x-20"),children:a.map((f={styleMap:u,version:s},(e,t,n)=>{const{styleMap:l,version:a}=f,{label:i,description:r,button:s,isDotted:d}=e;return c("div",{className:h("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",eg(n.length)),children:[c("div",{className:"space-y-xs",children:[i?o($e,{size:"text-h6",align:"text-center",children:i}):null,c("div",{className:"flex flex-col items-center gap-3xs",children:[r?o("div",{className:l.description,children:r}):null,o(De,{__html:e.__html,itemSize:"list-s",isDotted:d})]})]}),s?.text?o(ke,{className:"box-border py-s w-full mt-auto",version:a,...s,children:s?.text}):null]},String(t))}))})]}):null,We(e)]});var f})),lg=(e,t,n)=>({icon:l},a)=>{const i="secondary"===n?"white":"color";return o(g,{defaultPadding:"",className:`${ag(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:n,children:Ue(l)?o(ae,{image:{...l,iconVersion:l?.iconVersion||i},width:"48",height:"48"}):o("span",{className:h("text-h4","transparent"===n?e.iconText:(r=n,"secondary"===r?"group-data-primary:text-white":"text-secondary-text")),children:a+1})},String(a));var r},ag=e=>e?"h-16 w-16":"h-24 w-24",ig=d((()=>o("div",{className:"hidden",role:"none"}))),rg="hidden sm:flex absolute z-40",sg={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},og=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=dr({itemCount:t?.length||0});return a((()=>cg(r.current,t,n)),[]),c("div",{className:h("relative overflow-x-auto no-scrollbar",e),children:[o(Zi,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:sg[i].item,gap:sg[i].gap,children:t.map(qh(n,l,i))}),s.canScrollLeft?o(gr,{className:h("left-6",rg,sg[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(xr,{className:h("right-6",rg,sg[i].buttonTop),onClick:s.scrollRight}):null]})})),cg=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},dg={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},mg=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:h(dg[t].wrapper,e),children:o(og,{className:dg[t].component,tabsType:t,...n})}):null,hg=Ot((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const u=ug(n??{}),p=V(),x=t.every((e=>"link"===e?.type)),f=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(xg(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=gg(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:[mg({className:h({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!x}),items:pg(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])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(gg)?.filter(Boolean)||[]}),ug=({__id:e,anchor:t})=>t??e??"tabs",pg=(e,t)=>t?.length?t:e,gg=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",xg=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),fg={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},bg=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:fg[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),yg=d((({className:e="",isOpen:t,onClick:n})=>o(Ai,{className:e,label:t?"Скрыть":"Показать",isUnfolded:t,version:"secondary",short:!0,onClick:n}))),vg={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(yg,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Ng=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 wg({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),wg=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in vg))return null;return o(vg[n],{...t,...l})},kg=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(Ng,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Sg=(e,t)=>140*Ad(e.slice(0,t).map((e=>e?.cols?.length??1))),Cg=(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,Ig=d((({rows:e})=>{const t=e?.[0]?.length??0,[n,l]=nh({itemCount:t,visibleItemCount:5});return c("div",{children:[e?.map((a=n,(e,t)=>{if(!e?.length)return null;const[n,...l]=e,i=h("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[n?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o($e,{size:"text-xl",font:"font-light",children:n.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Sg(l,a)}px)`},children:l?.map(((e,t)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o($e,{size:"text-xl",children:e.data}):null,e?.cols?Cg(e.cols,a):null]},`row${t}`)))})})]},String(t))})),lh({...l,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),Tg=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(Ig,{rows:t.rowsData})})})]},l)}))}))),Bg=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Mg=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:Bg(t===n),children:e||t+1})},e)))}):null,t?o(ke,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:o(K,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),Pg=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(Mg,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Tg,{activeTabIndex:r,items:m}),o(yg,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o($e,{size:"text-h6",children:"Данных нет"}),o(yg,{onClick:n,isOpen:!0})]})})),Vg=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(Pg,{...t,onClick:n})}):null]}))),Rg=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(Vg,{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(bg,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(kg,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:u,setOpenTableInnerIdx:g,...r},String(t))))}):null]})})),zg=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,lh({...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]})})),Dg=d((({className:e="",title:t,description:n,rowHeaders:l,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],d=l?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),m=s.length,[u,p]=nh({itemCount:m,visibleItemCount:2}),x=(d||[]).map(((e,t)=>o(Rg,{row:e,activeIndex:u,rowIdx:t,...r},String(t)))),[f,b]=i>0?[x.slice(0,-i),x.slice(-i)]:[x,[]],[y,{toggle:v}]=an(!1);return c(g,{className:h("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[o(S,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:i>0?c(Oi,{children:[c(zg,{controls:p,children:[f,o(Ei,{isUnfolded:y,children:b})]}),o(Ai,{className:"text-h4",isUnfolded:y,onClick:v})]}):o(zg,{controls:p,children:x})})]})})),_g=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?$g():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?Lg(n):null,a?o(De,{richVersion:i,__html:a}):null]})]}))),$g=()=>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"}),Lg=e=>o(w,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),jg=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]}))),Ag=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(jg,{prefix:t,unit:n,suffix:l})})})),Og=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=V();return o(g,{className:h("relative flex flex-col",Qm[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${Q(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:P({...c,extraProps:{className:h("w-full",Wi(r)),...Jm(l)}})})}),{childrenTypes:[]}),Eg=e=>(e=>{const t="col-span-",n=e?.split(/\s+/).find((e=>e.startsWith(t)));return n?parseInt(n.substring(9),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Fg=d((({className:e,title:t,url:n,previewImg:l,...a})=>{const i=V();return c(g,{className:e,defaultPadding:Eg(e),...a,children:[o(S,{title:t,headlineVersion:"M"}),n?o("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:W(i)(l?.src),style:{maxHeight:524},controls:!0,children:o("source",{src:W(i)(n)})}):null]})})),Ug={AdTile:Ft,ApplicationForm:Di,BankAccountFiltration:jr,BenefitsBlock:Ur,BonusBenefitsBlock:Kr,ButtonsBlock:Gr,CalculatorBonus:ms,CalculatorBusinessDeposit:Bs,CalculatorCredit:Ws,CalculatorDeposit:oo,CalculatorRefinancing:fo,CardTransfer:Do,Carousel:Fo,CarouselCard:Yo,CarouselCatalogCard:Ko,CarouselLinks:Zo,CarouselRecommendationCard:ic,CarouselTariffsCard:cc,ContactsBlock:dc,DepositFiltration:fc,Depository:zc,ErrorBlock:_c,ExchangeRateTile:pd,Footer:Qd,GracePeriod:em,GrantSupport:am,Header:qm,Headline:S,HorizontalLayout:eh,ImgBlock:th,InsuranceAmountBlock:oh,InvestmentInfo:hh,LinkDocs:Ih,MobileAppTile:Ph,MortgageFiltration:Jh,OfficesAtmsMap:yp,Placeholder:vp,ProductBlock:Et,ProductGallery:wp,RepresentativeOfficeInfo:Sp,RichTextBlock:Tp,RollupItem:Mp,SafeDepositRental:Jp,StepsBlock:ng,StickyBottomMenu:ig,TabsLayout:hg,TariffsTable:Dg,TextBlock:_g,UnitBlock:Ag,VerticalLayout:Og,Video:Fg},Wg=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))})),Hg="cookie",Yg=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=an();$d((()=>{globalThis.localStorage?.getItem(Hg)||n()}),[],3e3);const a=i((()=>{globalThis.localStorage?.setItem(Hg,"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:a})})]})}):null}));function Xg(e){const t=i((({key:t})=>{"Escape"===t&&e()}),[e]);gn(globalThis.document,"keydown",t)}function Kg(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 qg=()=>{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 Kg(pe.observable,"dialog",{open:t,close:n,closeAll:a}),[e,{close:n,closeAll:a}]},Gg=d((()=>{const[e,{close:t}]=qg(),n=Boolean(e.length);return Xg(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})),Zg=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);return Kg(pe.observable,"popup",{open:t,close:n}),Xg(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})),Jg="header",Qg="footer",ex="sticky-footer",tx={},nx=d((({className:e,data:t=tx,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=jt(s,r);Wg(),Oc();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?.[Jg]?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.[Jg],{...m,slotName:Jg})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[P({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.[Qg],{...m,slotName:Qg})]})]}),a?.[ex]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.[ex],{...m,slotName:ex})}):null,o(Gg,{}),o(Zg,{}),o(Yg,{__html:d?.cookieContent?.__html})]})}));Object.assign(nx,{childrenTypes:[],slots:()=>[Jg,Qg,ex]});e.Blocks=Ug,e.ContentPage=nx,e.handlerDecorator=me,e.joinList=Cr,e.locationNavigator=Qt,e.packageVersion="0.14.775",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));