@redneckz/wildless-cms-uni-blocks 0.14.430 → 0.14.431

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 (123) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +93 -33
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  5. package/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  6. package/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  7. package/bundle/ui-kit/Calculator/renderRate.d.ts +3 -1
  8. package/dist/components/CalculatorDeposit/CalculatorDeposit.js +31 -26
  9. package/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  10. package/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  11. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  12. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  13. package/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  14. package/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  15. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js +45 -0
  16. package/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  17. package/dist/components/CalculatorDeposit/renderDepositResult.js +1 -1
  18. package/dist/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  19. package/dist/ui-kit/Calculator/CalculatorStyle.js +3 -3
  20. package/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  21. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  22. package/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  23. package/dist/ui-kit/Calculator/renderRate.d.ts +3 -1
  24. package/dist/ui-kit/Calculator/renderRate.js +1 -1
  25. package/dist/ui-kit/Calculator/renderRate.js.map +1 -1
  26. package/lib/common.css +1 -1
  27. package/lib/components/CalculatorDeposit/CalculatorDeposit.fixture.d.ts +1 -0
  28. package/lib/components/CalculatorDeposit/CalculatorDeposit.js +30 -25
  29. package/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  30. package/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  31. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  32. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  33. package/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  34. package/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +4 -0
  35. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js +42 -0
  36. package/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  37. package/lib/components/CalculatorDeposit/renderDepositResult.js +1 -1
  38. package/lib/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  39. package/lib/ui-kit/Calculator/CalculatorStyle.js +3 -3
  40. package/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  41. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  42. package/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  43. package/lib/ui-kit/Calculator/renderRate.d.ts +3 -1
  44. package/lib/ui-kit/Calculator/renderRate.js +1 -1
  45. package/lib/ui-kit/Calculator/renderRate.js.map +1 -1
  46. package/mobile/bundle/bundle.umd.js +93 -33
  47. package/mobile/bundle/bundle.umd.min.js +1 -1
  48. package/mobile/bundle/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  49. package/mobile/bundle/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  50. package/mobile/bundle/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  51. package/mobile/bundle/ui-kit/Calculator/renderRate.d.ts +3 -1
  52. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js +31 -26
  53. package/mobile/dist/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  54. package/mobile/dist/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  55. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  56. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  57. package/mobile/dist/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  58. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  59. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js +45 -0
  60. package/mobile/dist/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  61. package/mobile/dist/components/CalculatorDeposit/renderDepositResult.js +1 -1
  62. package/mobile/dist/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  63. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +3 -3
  64. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  65. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  66. package/mobile/dist/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  67. package/mobile/dist/ui-kit/Calculator/renderRate.d.ts +3 -1
  68. package/mobile/dist/ui-kit/Calculator/renderRate.js +1 -1
  69. package/mobile/dist/ui-kit/Calculator/renderRate.js.map +1 -1
  70. package/mobile/lib/common.css +1 -1
  71. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js +30 -25
  72. package/mobile/lib/components/CalculatorDeposit/CalculatorDeposit.js.map +1 -1
  73. package/mobile/lib/components/CalculatorDeposit/CalculatorDepositContent.d.ts +10 -0
  74. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.d.ts +5 -0
  75. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js +19 -2
  76. package/mobile/lib/components/CalculatorDeposit/getDepositCalculatorParams.js.map +1 -1
  77. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.d.ts +5 -0
  78. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js +42 -0
  79. package/mobile/lib/components/CalculatorDeposit/renderDepositParamsForm.js.map +1 -0
  80. package/mobile/lib/components/CalculatorDeposit/renderDepositResult.js +1 -1
  81. package/mobile/lib/components/CalculatorDeposit/renderDepositResult.js.map +1 -1
  82. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +3 -3
  83. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  84. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js +1 -2
  85. package/mobile/lib/ui-kit/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  86. package/mobile/lib/ui-kit/Calculator/renderRate.d.ts +3 -1
  87. package/mobile/lib/ui-kit/Calculator/renderRate.js +1 -1
  88. package/mobile/lib/ui-kit/Calculator/renderRate.js.map +1 -1
  89. package/mobile/src/components/CalculatorDeposit/CalculatorDeposit.tsx +45 -41
  90. package/mobile/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -0
  91. package/mobile/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +23 -0
  92. package/mobile/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +59 -0
  93. package/mobile/src/components/CalculatorDeposit/renderDepositResult.tsx +1 -1
  94. package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +3 -3
  95. package/mobile/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -3
  96. package/mobile/src/ui-kit/Calculator/renderRate.tsx +5 -1
  97. package/package.json +1 -1
  98. package/src/components/CalculatorDeposit/CalculatorDeposit.fixture.tsx +20 -0
  99. package/src/components/CalculatorDeposit/CalculatorDeposit.tsx +45 -41
  100. package/src/components/CalculatorDeposit/CalculatorDepositContent.ts +10 -0
  101. package/src/components/CalculatorDeposit/getDepositCalculatorParams.ts +23 -0
  102. package/src/components/CalculatorDeposit/renderDepositParamsForm.tsx +59 -0
  103. package/src/components/CalculatorDeposit/renderDepositResult.tsx +1 -1
  104. package/src/ui-kit/Calculator/CalculatorStyle.tsx +3 -3
  105. package/src/ui-kit/Calculator/renderBinaryRadioButtonGroup.tsx +2 -3
  106. package/src/ui-kit/Calculator/renderRate.tsx +5 -1
  107. package/tailwind.config.cjs +1 -1
  108. package/bundle/ui-kit/Breadcrumb.d.ts +0 -6
  109. package/dist/ui-kit/Breadcrumb.d.ts +0 -6
  110. package/dist/ui-kit/Breadcrumb.js +0 -11
  111. package/dist/ui-kit/Breadcrumb.js.map +0 -1
  112. package/lib/ui-kit/Breadcrumb.d.ts +0 -6
  113. package/lib/ui-kit/Breadcrumb.js +0 -9
  114. package/lib/ui-kit/Breadcrumb.js.map +0 -1
  115. package/mobile/bundle/ui-kit/Breadcrumb.d.ts +0 -6
  116. package/mobile/dist/ui-kit/Breadcrumb.d.ts +0 -6
  117. package/mobile/dist/ui-kit/Breadcrumb.js +0 -11
  118. package/mobile/dist/ui-kit/Breadcrumb.js.map +0 -1
  119. package/mobile/lib/ui-kit/Breadcrumb.d.ts +0 -6
  120. package/mobile/lib/ui-kit/Breadcrumb.js +0 -9
  121. package/mobile/lib/ui-kit/Breadcrumb.js.map +0 -1
  122. package/mobile/src/ui-kit/Breadcrumb.tsx +0 -21
  123. package/src/ui-kit/Breadcrumb.tsx +0 -21
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};const h=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function u(){return u._impl()}u._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={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","":""},x=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.subscribe("tab",(e=>{"group"!==e.type||e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const N=t&&l;return o(f,{className:p("@container font-sans",N?"group":"",g[t],y?"hidden":"",r||i,e),...N?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:b(t)}))),b=(e=3)=>v(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),v=(e,t)=>[e].concat(t>0?v(e/1.618,t-1):[]),N={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},w={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},k=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=N[l]||"h3";return o(i,{role:"heading",className:p("font-sans m-0",w[t],e),children:n||a})})),S=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),C={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"}},T=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(k,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(S,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),I=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),B=[];function M(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=I,blocksRegistry:r={},ancestors:s=B}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const R=[],P=(e,{key:t,ancestors:l=R,slotName:n=null,extraProps:a,renderProps:i=M,...r})=>{const s=a?(e,t)=>M(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||R,[r.parent,n]]:l},a)))};function V({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?P(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const z=["CDN","BASE_PATH"],D=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return z.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(l):l}}),A=e=>Boolean(e?.includes(":")),j=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),_=e=>Boolean(e?.startsWith("#")),E=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),$=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var O=Object.freeze({__proto__:null,isURL:A,isLocalURL:j,isHash:_,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:E,hasPrefix:$});const L="/api/",F=`${L}v1/storage`,U=e=>(t,l)=>{if([!t,A(t),_(t),[D.CDN,L].some((e=>$(t,e)))].some(Boolean))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 n=t?.startsWith("/");return E($(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},H={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},W=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=U(d)(E(D.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:q(e,s)}):o(G,{className:e,children:c("svg",{className:p(K(r),H[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),q=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},K=e=>e?"":"w-full h-full",G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Y=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{const[,t]=new URL(e).pathname.split("/");return`/${t}`}catch(e){return""}}const J=e=>t=>{const l=t?.startsWith("/wcms-resources")?"":X(Y.SITE_URL);return t&&!A(t)?U(e)(t,l):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:l=""})=>{const n=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:l,media:a},i)=>o("source",{srcSet:J(n)(e),type:te(l),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(n)(t.src)},l):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:p("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}),te=e=>e?`image/${String(e)}`:void 0,le=d((({className:e="",image:t,imageClassName:l="",...n})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...n}):o(Q,{className:e,imageClassName:l,image:t}):null)),ne={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","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={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","":""},oe=({className:e,rounded:t,version:l})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ne[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=()=>({open:(e,t={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),de=e=>de._impl(e);function me(){const e=X(Y.SITE_URL),t=u(),{closeAll:l}=ce();return e=>{const l=U(t)(e.href);return{...e,href:l,"aria-label":e.text,onClick:de(n({...e,href:l}))}};function n({href:n,target:a,onClick:i}){return r=>{i&&i(r);const s=!$(n,e||"/");n&&!s&&j(n,a)&&(l(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(n,e)))}}}de._impl=e=>e,de.setup=e=>{de._impl=e};const he=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ue=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ge(e)?"hidden lg:block":"";return c("div",{className:p(pe(e),"flex gap-xs"),children:[n?o("div",{className:p(r,se[i]),children:n}):null,ge(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:p(r,se[i]),children:a}):null]})})),pe=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return p("group/btn items-center justify-center",ge(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ge=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),xe=({className:e,rounded:t,version:l})=>["inline-block",re,l?ie[l]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=me()({onClick:r,href:n,...a}),c=t??o(ue,{...s});return o(e?ye:be,{...s,children:c})})),be=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...he(d),children:m}))),ye=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:n,version:l}),children:a})));function ve({version:e,handleClick:t,text:l="Вернуться назад",alwaysVisible:n=!1}){if(!l)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:p(n?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:p(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(le,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(fe,{version:"link",className:"group-data-secondary:text-white",text:l,ariaLabel:l,onClick:t,type:"button"})]})}const Ne={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},we=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a,insetTitle:r,buttons:s,leftImage:o,rightImage:d,imageAlign:m,isImageAlwaysOnRight:h=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=u(),v=i((()=>{y.back()}),[]),N=b.options?.page?.sitemap?.backwardButton;return c("div",{className:Se(n,l,e),children:[x?ve({version:t,handleClick:v,text:N}):null,ke(a),c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Me(o,{imageAlign:m,className:"mx-auto"}),c("div",{className:p("grid gap-3xl",d?"@xl:grid-cols-2 auto-cols-fr":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,f]}),Be(V({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:p("@xl:justify-self-end @xl:col-start-2",s?Ce(h):"",Te(h),Re(g)),imageAlign:m}),Ie(s)]})]})]})})),ke=e=>e?o("div",{className:"relative h-full",children:e}):null,Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Ce=e=>e?"row-span-2":"@xl:row-span-2",Te=e=>e?"col-start-2 self-center":"",Ie=e=>e?o("div",{className:"self-end",children:e}):null,Be=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Me=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&Ne[l],t),children:e}):null,Re=e=>e?"hidden @xl:block":"",Pe=(e=[])=>e.reduce(((e,t)=>e+t),0),Ve=(e=[])=>e?.length?Pe(e)/e.length:0,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:p("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(le,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((e=>{const{__html:t,richVersion:l=""}=e;return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ae=(e,t)=>e?o(S,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,je=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),_e=(e,t)=>e?o(je,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ee=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(De,{...e},`rte-${t}`):["label"in e?_e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null],$e=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?ze(l.icon,t):null,o("div",{children:Ee(l)})]}))),Oe=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Le=e=>{return((t=e.map(Oe))?.length?Math.sqrt(Math.abs(Ve(t.map((e=>e**2)))-Ve(t)**2)):0)>16;var t},Fe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ue=e=>!e.some(Fe),He=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Le(l)||Ue(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o($e,{benefitsVersion:t,...e},String(l))))}):null)),We=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ee)}):null)),qe=d((({isTabularBenefits:e,...t})=>o(e?We:He,{...t}))),Ke=e=>Boolean(e?.src||e?.icon),Ge=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Ye(l))}):null,Ye=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Xe(a,r),d=Xe(i,r);return n||a?.icon?o(fe,{className:p("basis-full @lg:basis-auto",e),appendLeft:Je({...a,iconVersion:c}),appendRight:Je({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Xe=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Je=e=>Ke(e)?o(le,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ze=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),Qe={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},et=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Qe[n];return l?.length?o("section",{className:p("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Ze,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),tt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),lt=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(nt)}):null)),nt=({label:e,amount:t},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(je,{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:[tt(2)(t)," ₽"]}):null]},String(l)),at=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(it)}):null)),it=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(je,{size:"text-m",font:"font-light",children:e})},String(t)),rt={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},st=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:C,...I})=>{const B=y?.src?o(le,{image:y}):null,M=o(T,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(we,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ot(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ge(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(qe,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(De,{__html:h}):null,p?.length?o(et,{items:p,isDotted:g,listItemSize:rt[i]}):null,C,x?.length?o(lt,{priceList:x}):null,ct(f)]})})})),ot=(e,t)=>t?{rightImage:e}:{leftImage:e},ct=e=>e?.length?o(at,{tags:e}):null,dt=e=>Boolean(e&&Array.isArray(e)),mt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ht=(e,t)=>{return l=e,Boolean(mt(l)&&"string"==typeof l.$ref)?t.ref(e):mt(e)?t.record(e):dt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ut=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(pt,e),pt=(e,t)=>e&&t?mt(e)?e[t]:dt(e)?e[parseInt(t,10)]:e:e,gt=(e,t)=>ht(e,{ref:({$ref:e,...l})=>gt(e?ut(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:gt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>gt(e,t)))}),xt=(e,t,l=[])=>{ht(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)xt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)xt(e[n],t,[...l,n])}})};async function ft(e,t){try{return e?await bt(e,t):null}catch(e){console.error(e)}return null}const bt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),yt=e=>[...new Set(e)],vt={},Nt=["/portal-resources"],wt=(e,t)=>gt(e,(e=>t?.[e])),kt=(e,t)=>{const l=(e=>{const t=[];return xt(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(yt(e).filter((e=>!Nt.some((t=>e.startsWith(t))))).map((async e=>[e,vt[e]||=await bt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?wt(e,{...t,...i}):e};function St(e,t={}){const l=d((t=>{const l=kt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const Ct=St((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(st,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Tt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>It(0,t?.length)),[t]),n=t?.[l];return n?o(Ct,{suppressHydrationWarning:!0,...n,...e}):o(x,{...e,children:o(f,{})})})),It=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Bt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Mt=e=>e?.replace(/[^+\d]/g,"");const Rt=e=>e?{phone:Mt(e)}:{},Pt=e=>e?{birthday:Bt(e)}:{},Vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),zt=(e,t=!0)=>({[t?"email":"mail"]:e}),Dt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Mt(e)}:{},At=({aspectsAttributes:e,aspects:t,ev:l})=>{for(const{aspectName:n,params:a}of e)t[n??""]?.(l,a)},jt="rshb-query-params";function _t(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(jt)||"";return e&&globalThis.sessionStorage?.setItem(jt,e),e}function Et(e){if(!e)throw new Error("Value should be fulfilled");return e}const $t=e=>t=>{const[,l]=Et(e.find((([e])=>e(t))));return l(t)},Ot=e=>$t(e.map((([e,t])=>[e,()=>t])));Ot.if=e=>new Lt(void 0,e);class Lt{parent;predicate;unit;get entry(){return[Et(this.predicate),Et(this.unit)]}constructor(e,t,l){this.parent=e,this.predicate=t,this.unit=l}if(e){return new Lt(this,e)}then(e){return new Lt(this.parent,this.predicate,e)}else(e){return $t([...Ft(this),[()=>!0,e]])}}const Ft=e=>[...e?.parent?Ft(e.parent):[],e.entry],Ut=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=_t();if(!A(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Ht(t?.target)?.(l)}}},Ht=Ot([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Wt(){return Wt._impl()}Wt._impl=()=>({forwardQuery:Ut}),Wt.setup=e=>{Wt._impl=e};const qt=e=>e,Kt=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=qt,format:n=qt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Gt=d((e=>{const{className:t,title:l,children:n,...a}=e;return o(x,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(k,{headingType:"h3",title:l,className:"@xl:text-center"}):null,n]})})}));function Yt({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Xt={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"},Jt={primary:p("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:p("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")},Zt=d((({children:e,...t})=>{const l=e=>({...e,onClick:de(Yt(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:p("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":p(Xt[a],Jt[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),Qt=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(le,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),el=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=ce(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Qt,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),tl=d((function({responseType:e}){const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon",{close:n}=ce(),a=i((()=>{n()}),[]);return o(el,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(le,{image:{icon:l,iconVersion:"normal"},width:"156",height:"156"}),o(T,{className:"w-full",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",description:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Zt,{type:"button",onClick:a,children:"Хорошо"})]})})})),ll=e=>t=>l=>e(l)?[]:[t],nl=e=>o("div",{className:"h-6",children:e?o(je,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),al=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),il="appearance-none w-5 h-5 border-solid cursor-pointer flex-none",rl=[{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"}],sl=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(al,{paths:rl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:p(il,"m-0",a?"rounded-full border-2":cl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ol(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(je,{size:"text-l",font:"font-light",children:l})}):null]})})})),ol=(e=!1)=>e?"radio":"checkbox",cl=(e=!1)=>p("rounded border",e?"bg-primary-main":""),dl=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(sl,{text:t,value:l,disabled:a,onChange:r},n),nl(i)]})));function ml(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const hl=e=>e?o(je,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,ul="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",pl=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=gl(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[hl(d),N?o("textarea",{className:p("block resize-y min-h-24",S,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",S,C,T),ref:w,id:l,name:n||l,placeholder:m,value:h,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),gl=e=>e?ul:"border-error",xl=e=>e?.text||e?.key||"";function fl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function bl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return fl(globalThis.document,"click",l),t}const yl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:yl(t,n).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===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:xl(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Nl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=bl(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(vl,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const wl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=ml(),[y,v]=n(""),N=g||0===l.length,w=x&&!N,k=i((()=>{v(""),f()}),[]),S=Nl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[hl(t),c("div",{className:p("relative",w?"z-20":"z-10"),ref:S,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Sl(s,r,N)),onClick:w?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:xl(a)||d}),kl(w,h)]}),m&&w?o("div",{className:p("absolute top-0 w-full z-20"),children:o(pl,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),kl=(e,t)=>o(W,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Sl=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Cl=()=>{},Tl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=Il(t,e),c=Bl(t,i,r);h.push(o("td",{children:o("div",{className:Ml(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},Il=(e,t)=>t&&e.toDateString()===t.toDateString(),Bl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Ml=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Rl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Pl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Cl})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Rl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Tl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Vl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],zl=Vl.map((e=>({key:e}))),Dl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Al={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},jl={className:"min-w-32",iconVersion:"black",isBorder:!1},_l=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=ml(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=bl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Vl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:zl,yearsOptions:Dl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:C,children:[hl(t),c("div",{className:"relative",children:[El(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(W,{...Al,className:"-rotate-90 cursor-pointer"})}),o(wl,{onChange:v,value:{key:Vl[u]},options:w,...jl}),o(wl,{onChange:N,value:{key:String(x)},options:k,...jl}),o("div",{className:"my-auto",onClick:y,children:o(W,{...Al,className:"rotate-90 cursor-pointer"})})]}),o(Pl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),El=(e,t,l)=>c("div",{onClick:e,className:p("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(S,{children:t&&Bt(t)}),o(W,{...Al,name:"CalendarIcon"})]}),$l=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(_l,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),nl(l)]}))),Ol=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(pl,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),nl(a)]}))),Ll=e=>"_"===e,Fl=e=>/\d/.test(e),Ul=e=>Ll(e)||Fl(e),Hl=[..."+7 (___) ___-__-__"],Wl=Hl.findIndex(Ll),ql=Hl.map(((e,t)=>Ul(e)?Hl.slice(0,t).filter(Ul).length:-1));const Kl=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Hl.map(((e,l)=>Fl(e)?e:t.charAt(ql[l])||e)),n=ql.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Wl,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(pl,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Gl=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(Kl,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),nl(n)]}))),Yl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(wl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),nl(l)]}))),Xl="Некорректно заполненное поле",Jl=ll((e=>null!=e&&""!==e))(Xl),Zl=ll((e=>e?.key&&""!==e?.key))(Xl),Ql=ll((e=>"string"==typeof e&&e.length>1))(Xl),en=ll((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Xl),tn=(ln=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,ll((e=>"string"==typeof e&&ln.test(e))))(Xl);var ln;const nn=ll((e=>"boolean"==typeof e&&e))("Согласие обязательно"),an={typeForm:Jl,surname:Ql,name:Ql,region:Zl,addressBranch:Zl,phone:tn,secondaryPhone:tn,birthday:Jl,email:Jl,fullName:Ql,inn:en,partnerComments:Jl,collectionCount:Jl,comment:Jl,acquiringType:Zl,feedbackType:Zl,feedbackMethod:Zl,serviceType:Zl,serviceDirection:Zl,consentDataProcessing:nn,annualRevenue:Jl},rn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,an?.[e]])))},sn=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},on=(e,t,l=!1)=>l?sn(e,t):e,cn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],dn=d((({field:e,input:t})=>o(Yl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:cn,...on(e("acquiringType"),an.acquiringType,t?.required)}))),mn=(e="")=>Boolean("trade"===e||"all"===e),hn=e=>null!=e,un=new Map,pn=e=>Boolean(e?.every((e=>Array.isArray(e)?pn(e):!e||"string"==typeof e))),gn=e=>pn(e)?e.toString():"";function xn(e,t,{fallback:l,cache:i}={}){const s=r((()=>fn(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(hn))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=un)=>l=>{const n=gn(l),a=t.get(n);if(n&&hn(a))return a;const i=e(...l);return n&&hn(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function fn(e){return Array.isArray(e)?e:e instanceof Function?fn(e()):[e]}const bn=[];const yn=async e=>await ft(e,{method:"GET"})||bn;function vn(){const{data:e}=xn("/api/v1/branchesByRegions",bt);return Array.isArray(e)?e:[]}const Nn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?vn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=xn(e?`/api/v1/branches?regionCode=${e}`:null,yn);return t||bn}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(Yl,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...on(e("addressBranch"),an.addressBranch,t?.required),isSearch:!0})})),wn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},kn=(e,t,l)=>Math.max(t,Math.min(e,l));function Sn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Cn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:p("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onChange:t=>{const l=Sn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Tn=1,In=100,Bn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Tn),max:s=(a.length?a.length-1:In),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=wn(e,{normalize:(e=0)=>a.length?Mn(a)(e):kn(e,r,s),format:tt()}),x=i((e=>{u&&u(Sn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",ul,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:x,...g}),Cn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),Rn(n)]})})),Mn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Rn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Pn=["От 1 000 ₽","До 1 000 000 000 ₽"],Vn=d((({field:e})=>o(Bn,{title:"Сумма, ₽",items:Pn,min:1e3,max:1e9,...e("amount")}))),zn=d((({field:e,input:t})=>o(Ol,{className:"col-span-2",...on(e("comment"),an.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Dn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],An=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],jn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],_n=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],En=d((({field:e})=>o(Yl,{label:"Способ получения ответа",options:_n,...sn(e("feedbackMethod"),an.feedbackMethod)}))),$n=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(An[0])}),[t?.value]),o(Yl,{label:"Тема",placeholder:"Выберите тему",options:jn,...sn(t,an.feedbackType)})})),On=d((({field:e})=>o(dl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ln=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:p("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:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Fn=d((({field:e})=>mn(e("acquiringType")?.value?.key)?o(Ln,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Un=d((({field:e})=>{const t=e("secondaryPhone");return o(Gl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?sn(t,an.secondaryPhone):t})})),Hn=d((({field:e})=>mn(e("acquiringType")?.value?.key)?o(Ln,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function Wn(){const{data:e}=xn("/api/v1/regions",bt);return Array.isArray(e)?e:[]}const qn=d((({field:e,input:t})=>{const l=Wn();return o(Yl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...on(e("region"),an.region,t?.required)})})),Kn=d((({field:e,input:t})=>{const l=vn(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Yl,{label:"Регион",placeholder:"Выберите регион",options:n,...on(e("region"),an.region,t?.required)})})),Gn=d((({field:e})=>o(Yl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:An,...sn(e("serviceDirection"),an.serviceDirection)}))),Yn=["От 1 мес","До 15 лет"],Xn=d((({field:e})=>o(Bn,{title:"Срок, месяцев",items:Yn,min:1,max:180,...e("term")}))),Jn=d((({field:e})=>o(Yl,{label:"Тип обслуживания",options:Dn,...sn(e("serviceType"),an.serviceType)}))),Zn=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:p(ul,il,"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:l,name:e,checked:n,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(je,{color:"text-primary-text",children:t}):null]})}))),Qn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],ea=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Zn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Zn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Zn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Zn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),ta=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Ol,{label:"Фамилия",...on(e("surname"),an.surname,a)}),name:o(Ol,{label:"Имя",...on(e("name"),an.name,a),...i}),middleName:o(Ol,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(Gl,{label:"Телефон",...on(e("phone"),an.phone,a)}),email:o(Ol,{label:"Электронная почта",...on(e("email"),an.email,a)}),fullName:o(Ol,{label:"ФИО",...on(e("fullName"),an.fullName,a),...i}),inn:o(Ol,{label:"ИНН",type:"number",...on(e("inn"),an.inn,a)}),comment:o(zn,{field:e,input:l}),region:r?o(Kn,{field:e}):o(qn,{field:e,input:l}),addressBranch:o(Nn,{field:e,input:l,isPremium:r}),birthday:o($l,{label:"Дата рождения",...on(e("birthday"),an.birthday,a)}),isClient:o(On,{field:e}),consentToReceiveMaterials:o(dl,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Ol,{...on(e("partnerComments"),an.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(Ol,{label:"Количество объектов инкассации",type:"number",...on(e("collectionCount"),an.collectionCount,a)}),acquiringType:o(dn,{field:e,input:l}),onlineCheckout:o(Fn,{field:e}),posTerminal:o(Hn,{field:e}),serviceType:o(Jn,{field:e}),term:o(Xn,{field:e}),amount:o(Vn,{field:e}),annualRevenue:o(Ol,{label:"Годовая выручка, ₽",...on(e("annualRevenue"),an.annualRevenue,a)}),vedTypes:o(ea,{field:e}),feedbackType:o($n,{field:e}),feedbackMethod:o(En,{field:e}),serviceDirection:o(Gn,{field:e}),bankEmpolee:o(Ol,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Ol,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Un,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const la=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${mn(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...aa(c),...na(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},na=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},aa=e=>e?{vedTypes:Object.fromEntries(Qn.map((t=>[t,t===e])))}:{},ia={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:cn[0],serviceType:Dn[0],feedbackType:jn[0],feedbackMethod:_n[0],serviceDirection:An[0],vedTypes:Qn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},ra=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ia[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=Dn[1]),{...l,typeForm:{key:t,text:""}}},sa=d((({text:e,link:t})=>c(S,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(je,{children:e}):null,t?o(fe,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(je,{children:t.text})}):null]}))),oa=(e,t)=>o(Zt,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ca=(e,t,l)=>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(sl,{...e}),o(sa,{link:t})]}),nl(sn(e,nn).error)]}):o(sa,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),oa(l)]}),da={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...Vt(n,g),...zt(i,g),...Rt(a),...g?Pt(r):{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Dt(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}}},ma=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:u,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=ra(f,l),[y,v]=n(""),N=i((async(e,t)=>{const l=ga(f,e),n=(a=rn(l),e=>e&&Object.entries(a).flatMap((([t,l])=>l(e[t])))||[]);var a;if(n(e)?.length)return"Fail";const i=la({...e,...h}),r=await da.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(tl,{...e}),l),close:l}})({responseType:r}).open()}if("OK"===r&&g){const e=Wt();At({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:w,onSubmit:S,reset:C}]=Kt(b,{onSubmit:N}),T=pa(f)?.name;return a((()=>{"OK"===y&&C()}),[y]),c(Gt,{className:p("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:p(ua(e.columns),"grid gap-x-m"),children:[ha(e.title),(e?.inputs||[])?.map(ta(w,l))]},`section-${t}`))),ca(T?w("consentDataProcessing"):void 0,d,s)]}),u?c("div",{className:"space-y-m",children:[o(k,{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(le,{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(le,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ha=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(je,{size:"text-h6",children:e})}):null,ua=e=>2===e?"@xl:grid-cols-2":"",pa=e=>e?.find((e=>"consentDataProcessing"===e?.name)),ga=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),xa="text-left",fa=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(le,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(T,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:xa,className:"space-y-s"})]}))),ba=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",ya=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function va(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const Na=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:va(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,role:"listitem",children:d})})),wa=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],ka=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(Ca(l))}),[g,x]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Sa(c,v):{},...N?ya(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(Na,{className:p(m,a?wa[a-1]:"",N?"h-full":"",t),style:w?Sa(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),Sa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ca=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ta={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Ia={"horizontal-list":"w-6","vertical-list":"h-6"},Ba=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",Ta[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Ia[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Ma=d((({className:e,disabled:t,...l})=>o(fe,{rounded:!0,className:p("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(le,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Ra=d((e=>o(Ma,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Pa=d((e=>o(Ma,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Va="absolute top-[calc(50%-24px)] z-40",za="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Da=d((({className:e,scroll:t,hasBlur:l,arrowsPadded:n})=>{const{canScrollLeft:a,canScrollRight:i,scrollLeft:r,scrollRight:s}=t;return c("div",{className:p(e),children:[l?Aa(t):null,a?o(Ra,{className:p(Va,n?"left-1":"left-0"),onClick:r}):null,i?o(Pa,{className:p(Va,n?"right-1":"right-0"),onClick:s}):null]})})),Aa=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(za,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(za,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ja=e=>e,_a=(e=ja)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ea=_a(),$a=(e=ja)=>_a((t=>-e(t))),Oa=$a(),La=e=>t=>e.scrollWidth/t,Fa=e=>(t,l)=>{e.scrollBy({left:l*La(e)(t),behavior:"smooth"})},Ua=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[$a()(a),_a()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Fa(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Fa(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Ha=d((({className:e,version:t,gap:l=14,padding:n=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:u,children:g,onVisibleIndicesChange:x})=>{const f=Array.isArray(g)?g.length:0,[b,y]=Ua({itemCount:f,onVisibleIndicesChange:x}),[v]=y.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===i?"relative h-full":""),children:[o(ka,{containerRef:b,activeIndex:v,visibleItemCount:a,gap:l,padding:n,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:g}),o(Da,{className:p(!d&&"hidden lg:block"),scroll:y,hasBlur:m,arrowsPadded:h}),o(Ba,{className:p(!u&&"lg:hidden"),containerRef:b,activeIndex:v,dotCount:f,listType:i,version:t})]})})),Wa=({blocksToRender:e,...t})=>o(Ha,{visibleItemCount:0,gap:0,showArrows:!0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:p("relative min-w-80",ba(!0)),children:M(e,t)},String(l))})}),qa=e=>e%2!=0,Ka=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ga=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(Ka,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(je,{size:"text-h4",children:t}),iconNode:l?o(le,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Ya=({isUnfolded:e,onToggle:t})=>o(Ga,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Xa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ja=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),Za=["ArrowDownIcon","ArrowUpIcon"],Qa="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ei=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:p("space-y-2xs",n.length?"":"hidden"),children:[c("div",{className:p(Qa),children:[P(i,{...a.options,parent:l}),qa(i.length)?o(Tt,{className:"col-span-6",...a}):null]}),o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Ja,{className:p(Qa),isUnfolded:e,children:[P(r,{...a.options,parent:l}),qa(r.length)?o(Tt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Ga,{className:p(e<1?"hidden":""),disabled:!r?.length,label:t,icon:Za[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},ti=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[li(l,t),ei({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[li(l,t),Wa({...n,blocksToRender:t})]});default:return null}})),li=(e,t)=>e&&!t.length?o(fa,{...e}):null,ni=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),ai=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(Ln,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ii=d((({children:e,filtrationSchema:t,resetButton:l,field:n,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,ni(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(ri(n)).filter(Boolean))]}),l?o("div",{children:o(Zt,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),ri=e=>([t,l])=>{const n=l?.type;return"array"===n?si(t,e)(l):null},si=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(je,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(ai,{items:n,multiple:!l?.single,...t(e)})]},e)};function oi(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const ci=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,di=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ci(t[e])||ci(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ci(t[e])||ci(l[e])||mi(t[e])<=mi(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ci(t[e])||ci(l[e])||mi(t[e]?.min)>=mi(l[e]?.min)&&mi(t[e]?.min)<=mi(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ci(t[e])||ci(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ci(t[e])||ci(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),mi=e=>Number(e||0),hi=(e,{block:t,page:l,normalize:n=qt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=Kt(e),d=r((()=>oi(a,a.map((e=>wt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=qt)=>e?.filter((([,e])=>di(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},ui={},pi={},gi=St((({className:e,filtrationSchema:t=ui,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=hi(pi,{block:a.block,page:a.options?.page}),d=o(wl,{className:"w-64",label:l?.title,options:xi(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>xi(l).find((t=>t.key===e))||{key:""}})});return c(x,{className:p(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ii,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Zt,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(ti,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),xi=e=>oi(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),fi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},bi=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:p("rounded-icon object-fit flex justify-center items-center",fi[l],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),yi=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(k,{headingType:"h3",as:"h2",className:xa,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(vi)}):null]}))),vi=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(bi,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(le,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(k,{headingType:"h6",children:e}),o(je,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(et,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Ni=(e,t,l)=>{return o(Ha,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:p("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(je,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(le,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(je,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},wi=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(T,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Ni(e,0,t):null]}))),ki={start:"justify-start",center:"justify-center",end:"justify-end"},Si=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",ki[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ge(e)})})),Ci=d((({className:e,title:t,children:l,...n})=>c(x,{className:p("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(k,{className:"text-center",title:t}):null,l]}))),Ti="flex flex-col justify-between @4xl:flex-row gap-x-m gap-y-7 @xl:gap-y-4xl",Ii="flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",Bi="flex flex-col gap-y-xl @xl:w-96",Mi=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r,color:s="text-secondary-text"})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(je,{size:"text-l",font:"font-light",color:s,children:t}):null,o("div",l?{children:o(je,{size:"text-h3",children:[i,tt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(je,{size:"text-h3",children:"-"})})]}))),Ri=(e,t)=>e?o(S,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Pi=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(je,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:tt(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Vi=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(S,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(S,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),zi=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",...r})=>a&&0===t?o(Vi,{title:e,...r}):c("div",{children:[o("div",{className:"hidden @xl:block",children:o(Pi,{title:e,rate:t,unit:l,fractionDigits:n,color:i,...r})}),o("div",{className:"@xl:hidden",children:o(Mi,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,color:i,...r})})]});function Di({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${tt(2)(l.min||0)} ₽`,`До ${tt(2)(l.max||0)} ₽`];return o(Bn,{items:e?n:[],step:t,...l})}const Ai={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ji={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},_i=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=Ai.prefMonthsNum,prefTravelBonusRate:i=Ai.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||ji,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Ei=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...i})=>{const[r,{field:s}]=Kt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:u,monthBonus:g,yearBonus:x}=_i(r,l);return o(Ci,{className:e,title:t,...i,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Di({title:"Сумма покупок в остальных категориях, ₽",min:h,max:u,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?zi({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Bi,children:[x>=0?o(Mi,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Ge(n,{isVertical:!0}),Ri(a)]})]})})})),$i=Math.round(29.5),Oi=(e,t=0)=>e?.sum?e.sum:t,Li=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Fi=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ui={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Hi=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${Ui[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(sl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Wi=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"space-y-s",children:[t?o("div",{className:"hidden @5xl:block",children:o(je,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(je,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Hi,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:p("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),qi=e=>Wi({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Ki=({income:e,finalSum:t,buttons:l,footnotes:n=[]})=>c("div",{className:Bi,children:[o(Mi,{title:"Доход в конце срока",value:e,postfix:"₽",prefix:"+"}),o(Mi,{title:"Сумма в конце срока",value:t,postfix:"₽"}),Ge(l,{isVertical:!0}),n?.map(Ri)]}),Gi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Yi([e,t],n),Yi=([e,t],l=[])=>({[e]:l.length?Oa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ea(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Xi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Ji={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Zi={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Qi=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?Ji[e?.rateType]:"",{data:l}=xn(t?`/api/v1/depositrates/${t}`:null,bt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...Zi,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&er(s,e)&&Xi(n,["minSum","maxSum"],e)&&Xi(l,["minDays","maxDays"],e)))||Zi,{rate:m}=d,h=tr(m,e),u=n+h,p=c||[Zi];return{...d,...Yi(["minSum","maxSum"],p),...Yi(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},er=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,tr=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},lr=St((({className:e="",title:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=Kt({moneyValue:Oi(r,1e5),daysValue:Li(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),u=Qi(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=u;return o(Ci,{className:e,title:t,...d,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Сумма, ₽",min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),(v={title:"Срок, дней",min:u.minDays,max:u.maxDays,...h("daysValue"),value:u.daysValue},o(Bn,{items:[`От ${Fi(v.min||0)}`,`До ${Fi(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[nr(u,h),qi({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),zi({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Ki({income:g,finalSum:x,buttons:l,footnotes:[n,a]})]})});var v})),nr=(e,t)=>c("div",{className:"space-y-s",children:[o(je,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(sl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(sl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),ar=(e,t)=>{if(!t?.length)return;const l=t?.reduce(((t,l)=>e[0](l.rate,t[0].rate)?[l]:l.rate===t[0].rate?[...t,l]:t),[t[0]]);return l.length>1?l.reduce(((t,l)=>e[1](l,t)?l:t),l[0]):l[0]},ir=({min:e=0,max:t=0,availableMonths:l,...n})=>o(Bn,{items:[`От ${rr(e)}`,`До ${rr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),rr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,sr=e=>Wi({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),or=({field:e,defParams:t,calcParams:l,map:n,monthsValue:a="maxMonths"})=>{Object.entries(n).forEach((([l,n])=>{e?.(l)?.onChange?.(t?.[n])})),e?.("monthsValue")?.onChange?.(kn(t?.[a],l.minMonths,l.maxMonths))},cr=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},dr={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},mr=e=>hr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&hr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&hr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&hr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),hr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],ur=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[dr],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>mr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=Gi(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Gi(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>mr({row:e,userInputParams:t,paramsViewSettings:l})&&Xi(n,["minSum","maxSum"],e)&&Xi(a,["minMonths","maxMonths"],e)))||dr)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=cr(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},pr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),gr={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},xr=St((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=l?.rateRows,ar([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[u,{field:g}]=Kt({moneyValue:Oi(s,2e5),monthsValue:Li(s,$i),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=ur(u,l,r),f=sr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(kn(u.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(kn(u.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!pr(s)&&m&&or({field:g,defParams:m,calcParams:x,map:gr,monthsValue:"minMonths"})}),[l,s]),o(Ci,{className:e,title:t,...d,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),ir({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),fr({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),zi({rate:x.rate}),c("div",{className:Bi,children:[o(Mi,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Ge(n,{isVertical:!0}),Ri(i)]})]})})})),fr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(sl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(sl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(sl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(sl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),br=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},yr={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},vr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?kr(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=t?.rateRows?.find((t=>wr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&wr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&Xi(n,["minSum","maxSum"],t)&&Xi(a||i,["minMonths","maxMonths"],t)))||yr,{rate:c}=o,d=Nr(c,e),m=n+d,h=t?.rateRows||[yr];return{...o,...Yi(["minSum","maxSum"],h),...Yi(["minMonths","maxMonths"],h),availableMonths:br(h.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:i,income:d,finalSum:m}},Nr=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},wr=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],kr=(e,t)=>e+Math.round((t-e)/2),Sr={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",moneyValue:"minSum"},Cr=St((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=l?.rateRows,ar([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],h));var h;const[u,{field:g}]=Kt({moneyValue:Oi(s,2e4),monthsValue:Li(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration)}),x=vr(u,l,r),{defaultMonth:f,rate:b,income:y,finalSum:v}=x,{onChange:N}=g("monthsValue"),{onChange:w}=g("moneyValue");return a((()=>{!u.monthsValue&&N&&N(f)}),[f]),a((()=>{w&&w(kn(u.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{!pr(s)&&m&&or({field:g,defParams:m,calcParams:x,monthsValue:"minMonths",map:Sr})}),[l,s]),o(Ci,{className:e,title:t,...d,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Сумма, ₽",min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),ir({title:"Срок, месяцев",min:x.minMonths,max:x.maxMonths,availableMonths:x.availableMonths,...g("monthsValue"),value:x.monthsValue}),Tr({...x,...r},g)]}),zi({rate:b}),Ki({income:y,finalSum:v,buttons:n,footnotes:[i]})]})})})),Tr=(e,t)=>{return c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?qi({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},Wi({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Ir=e=>Br({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Br({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Br=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Mr={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Rr=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Mr],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ir({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Gi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Gi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Ir({row:e,userInputParams:t,paramsViewSettings:l})&&Xi(n+r,["minSum","maxSum"],e)&&Xi(i,["minSumOld","maxSumOld"],e)&&Xi(r,["minSumExtra","maxSumExtra"],e)&&Xi(a,["minMonths","maxMonths"],e)))||Mr)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=cr(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},Pr=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=Kt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Rr(s,l,i),h=sr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ci,{className:e,title:t,...r,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Di({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),ir({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Vr({...m,...i},d),m.isExtraMoney?Di({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),zi({rate:m.rate,fractionDigits:1}),c("div",{className:Bi,children:[o(Mi,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Mi,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Ge(n,{isVertical:!0}),Ri(a)]})]})})})),Vr=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(sl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(sl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(sl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),zr=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=wn(e,{normalize:(e=a)=>l&&n?String(kn(Number(Dr(e)),l,n)):Dr(e),format:tt(r)}),d=i((e=>t&&t(Dr(e))),[t]);return o(pl,{onChange:d,...s,...c})})),Dr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Ar=d((e=>o(zr,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(je,{size:"text-xl",font:"font-light",children:"₽"})})}))),jr={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},_r={amount:1500},Er=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=Kt(_r),[h,u]=n(!1);return a((()=>{u(d<=0)}),[d]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(k,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:jr[r],children:[o(Ar,{valid:!h,label:l,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Zt,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),$r=({className:e,text:t="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(S,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Or="relative h-full",Lr={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Fr=({noCardBorder:e,cardSize:t="normal",...l})=>{const{blocks:n}=l.block||{},a=n?.some(Wr);return V({...l,renderProps:(l,n,i)=>c("div",{className:Ur(l,{someCardsHighlighted:a}),children:[M(l,n,{className:Hr(l,{someCardsHighlighted:a,showBorder:!e,cardSize:t}),blockIndex:i}),Wr(l)?$r({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Ur=(e,{someCardsHighlighted:t})=>p(Or,t&&(Wr(e)?"pt-3xl":"pt-3xl sm:pt-16")),Hr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(Or,"min-w-80",Lr[n],t&&(Wr(e)?"pt-3xl sm:pt-16":"pt-3xl"),ba(l),l&&"h-full"),Wr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,qr=St((({className:e,visibleItemCount:t=0,noCardBorder:l,arrowsPadded:n=!0,isGap:a=!0,cardSize:i="normal",...r})=>o(x,{className:p(e),defaultPadding:"p-6xl",...r,children:o(Ha,{className:p("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:n,hasBlur:!0,children:Fr({noCardBorder:l,cardSize:i,...r})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Kr="z-10 border border-solid w-full h-full",Gr=p(Kr,"absolute hidden @xl:block border-transparent"),Yr=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(Gr,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Gr,"top-6 right-8 bg-green")}),o("div",{className:p(Gr,"top-3 right-4 bg-green-light")}),c("div",{className:p(Kr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(T,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ge([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Xr={black:"bg-black",white:"bg-white"},Jr=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(we,{className:"h-full",padding:d,title:o(T,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(le,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ge([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(je,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Zr)]}):null,a?c(je,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Zr=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Xr[e]}`},String(t)),Qr=d((({icon:e,...t})=>{const l=me(),{text:n,href:a,target:i,onClick:r}=l(t);return n?o("div",{className:p("h-32 rounded-lg bg-white text-secondary-text flex items-center justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-4 break-words max-w-[150px]",children:[e?o(le,{className:p(""),image:{...e,iconVersion:e?.iconVersion},width:"50",height:"50",alt:n}):null,o("div",{className:"text-primary-text text-center text-sm whitespace-wrap min-h-8",children:n})]})})}):null})),es=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-4xl justify-between",children:[c("div",{className:"flex-1",children:[o(T,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(T,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?ts(n):null]})}))),ts=e=>o("div",{className:p("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-4"),children:e.map(((e,t)=>o(Qr,{...e},String(t))))}),ls=d((({className:e="",href:t,target:l,onClick:n,data:a,children:i})=>{const r=me()({href:t,target:l,onClick:n});return o(t?"a":"div",{className:p("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),ns=[{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"}}],as=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>ns.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Ke(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",is(a));return c("div",{className:p("flex flex-col gap-m xl:gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Ge(m,{className:rs(s??!1,a??!1,l),buttonClassName:h})}),r?o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),is=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",rs=(e,t,l=!1)=>p(e||t?"basis-full":"",!t||l&&e?"":"flex-nowrap"),ss=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(ls,{href:a,target:m,className:"h-full",children:c(we,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(T,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ot(Ke(i)?o(le,{image:i}):null,f),buttons:d.length?o(as,{media:d,stretched:!0,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(qe,{benefits:g}),o(et,{items:r,isDotted:s,listItemSize:"S"}),os(n,u)]})})}))),os=(e,t)=>e?o(S,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,cs=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(je,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(je,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ge(a)}):null]},String(t))},ds=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...g})=>{const f=d.map(cs),[b,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[v,N]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&N(e.isUnfolded)}))),[m?.parent]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...g,children:[Ke(i)?o("div",{className:"self-center",children:o(le,{image:i})}):null,t?o(k,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(fe,{className:"w-full mt-m mb-lg",...r}):null,y.length?o(Xa,{renderFoldableSection:()=>c("div",{children:[b,o(Ja,{isUnfolded:v,children:y})]}),renderFoldButton:d.length>1?ms(v,m?.parent,u):null}):o("div",{children:b})]})})),ms=(e,t,l)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?he(l):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),hs=(e=!1)=>e?"text-white":"",us=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),ps=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("th",{className:"space-y-4 flex flex-col items-start",children:[e?o(le,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(le,{image:t})}),l?o(k,{headingType:"h4",className:hs(a),title:l}):null,n?o("div",{className:us(a),children:n}):null]}))),gs=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:p("h-full","border-main-divider border-b"),children:e?e.map(bs(l,t)):null})}))),xs=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),fs=(e=!1)=>""+(e?"text-white":""),bs=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(S,{size:"text-s",color:xs(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(S,{size:"text-s",align:"text-right",color:fs(e),children:l})}):null,n?o("div",{className:"text-right",children:o(S,{size:"text-s",color:xs(e),children:n})}):null]})]},String(a)),ys=d((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return o("tr",{className:"mb-m",children:c("td",{className:p("border border-gray rounded-md p-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),children:[o(ps,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(gs,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(fe,{href:e.link.href,target:e.link?.target,version:s,ariaLabel:"Подробнее",className:"text-s font-medium mt-m p-s",children:e.link.text}):null,vs({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),vs=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("td",{className:"pt-lg",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(je,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),Ns=d((e=>{const{className:t,title:l}=e;return c("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?o(k,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(ws,{...e})})]})})),ws=d((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[c,d]=n(Array.from({length:e.length}).fill(!a)),m=i((e=>{const t=(t,l)=>l===e?!t:t;d((e=>e.map(t)))}),[]),h=i((()=>d((e=>Array.from({length:e.length}).fill(!1)))),[]),u=e?.map((({data:e,header:n},i)=>{return o(ys,{visibleRowLength:a,showRow:c[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>m(i),...s},String(i));var r}));return o("tbody","horizontal"===r?{children:o(Ha,{onVisibleIndicesChange:h,children:u})}:{children:u})})),ks=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Ss=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),Cs=1e9,Ts={sum:{min:1e4,max:Cs},period:3},Is=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=hi(Ts,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Bs(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Ms(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(ii,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Ar,{label:n?.title,min:500,max:Cs,...d("sum",{parse:e=>({min:Number(e),max:Cs}),format:({min:e})=>String(e)})}),o(Bn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(ti,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Bs=e=>yt((e?.paramsSource?.rateRows||[]).filter(ks).flatMap((e=>Ss(e.minMonths,e.maxMonths)))),Ms=e=>yt(e.flatMap((e=>e||[])).filter(ks).flatMap((e=>Ss(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Rs=e=>"Image"===e?.contentType&&e?.image?o(le,{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,Ps=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Rs(n)}),o(T,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(fe,{version:a?.version,text:a?.text,...a}):null]}))),Vs="location";function zs(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(h,"location",As()??{name:e}),r=i((e=>{js(e),l(e)}),[]),{data:s}=xn(Ds()?null:"/api/v1/region",bt);return a((()=>{s&&!Ds()&&l(s)}),[s]),[t??{name:e},r]}const Ds=()=>Boolean(globalThis.localStorage?.getItem(Vs)),As=()=>{try{const e=globalThis.localStorage?.getItem(Vs);return e&&JSON.parse(e)}catch(e){return null}},js=e=>{try{globalThis.localStorage?.setItem(Vs,JSON.stringify(e))}catch(e){}};var _s;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(_s||(_s={}));const Es=new Intl.NumberFormat("ru",{style:"currency",currency:_s.RUB}),$s=e=>e?Es.format(e):"",Os="text-m font-light text-secondary-text ",Ls=`${Os} text-left`,Fs=`${Os} pl-5xl text-center`,Us=`${Os} pl-5xl text-right`,Hs={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},Ws=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:p("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Ls,children:o(je,{size:"text-m",children:"Валюта"})}),o("th",{className:Fs,children:o(je,{size:"text-m",children:"Купить"})}),o("th",{className:Us,children:o(je,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(qs)})]}))),qs=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(le,{image:{icon:Hs[t]},width:"24",height:"24"}):null,o(je,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(je,{size:"text-h6",children:$s(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(je,{size:"text-h6",children:$s(e?.buyExchangeRate)})})]},t)},Ks={icon:"GpsIcon"},Gs=d((({className:e="",address:t})=>c("div",{className:p("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(bi,{...Ks,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(S,{size:"text-l",color:"text-primary-main",children:t}):null,o(S,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Ys=(e,t,l)=>{const n=Number(Xs(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Xs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Js=e=>Ot([[e=>e.value!==_s.RUB&&e.oppositeValue!==_s.RUB,()=>e.handleConvert(e.value,_s.RUB)],[e=>e.value===_s.RUB&&e.oppositeValue===_s.RUB,()=>e.handleConvert(e.value,_s.USD)],[e=>e.value===_s.RUB&&e.oppositeValue===_s.RUB,()=>e.handleConvert(e.value,_s.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function Zs(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(pl,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(wl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Qs=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||_s.RUB,selectBuy:l?.[0]?.currency?.currency||_s.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[Zs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:eo(r,d,l),value:r.inputSell,setValue:e=>lo(d,l)(e,r.selectSell,r.selectBuy)}),Zs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:to(r,d,t),value:r.inputBuy,setValue:e=>no(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(fe,{text:a.text,version:a?.version,...a}):null]})})),eo=(e,t,l)=>n=>{t({selectSell:n}),Js({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{lo(t,l)(e.inputSell,n,a)}})},to=(e,t,l)=>n=>{t({selectBuy:n}),Js({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>no(t,l)(e.inputBuy,n,a)})},lo=(e,t)=>(l,n,a)=>{e({inputSell:Xs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(Ys(l,i,n===_s.RUB)||"")})},no=(e,t)=>(l,n,a)=>{e({inputBuy:Xs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(Ys(l,i,n===_s.RUB)||"")})};const ao=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=zs(),i=function(e){const t=e?.code||"000",{data:l}=xn(`/api/v1/exchangerates?regionCode=${t}`,bt);return l||{}}(a),r=io(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:_s.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:_s.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(we,{className:"h-full",title:o(k,{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(Ws,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Gs,{address:i?.address})]}),r.length&&s.length&&d.length?o(Qs,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),io=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],ro=d((({className:e="",items:t})=>{const l=me();return o("ul",{className:p("flex flex-col gap-s w-full",e),children:t?.map(so(l))})})),so=e=>({dataFooter:t,...l},n)=>{const{text:a,href:i,target:r,onClick:s}=e(l);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,...he(t),children:a||null})},String(n)):null},oo=(e,t)=>o(bi,{...e,iconBgVersion:t,className:"shrink-0"}),co=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(Ka,{tag:"button",className:p("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[oo(a,t),e?o(je,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(W,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),mo=St((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Xa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ja,{className:p("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:V({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>ho({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),ho=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?o(co,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Ga,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},uo=d((({topItems:e})=>o("div",{className:"w-full",role:"menu",children:po(e)}))),po=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(mo,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(ro,{items:e.items}):null},String(t)))),go=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:p("space-y-m",e),children:t.map(xo)}):null)),xo=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(je,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(fo)})]},String(t)),fo=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:bo(e.type,e.text)}),o(S,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),bo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${yo(t)}`,children:o(je,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(S,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},yo=e=>e.replaceAll(/\D/g,""),vo=d((({className:e="",index:t,text:l,...n})=>{const a=me(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),No=d((({className:e="",title:t,links:l})=>o("div",{className:e,children:l?.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(je,{size:"text-l",font:"font-normal",children:t})}),l.map(((e,t)=>o(vo,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),wo=d((({className:e="",index:t,...l})=>{const n=me(),{href:a,target:i,text:r,onClick:s}=n(l);return o("a",{className:p("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}`})})),ko=d((({className:e="",links:t,license:l})=>c("div",{className:p("@container space-y-lg",e),children:[l?o("div",{children:o(je,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${l}`})}):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(wo,{index:t,...e},String(t))))}):null]}))),So="w-full lg:w-52",Co=St((({className:e,footer:t,...l})=>{const n=l.options?.page?.sitemap??{},{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:u=[]}=t??{};return c(x,{tag:"footer",className:p("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...l,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(uo,{...n}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:p(So,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(go,{items:r}),m?o(fe,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(as,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),u.map(((e,t)=>o(fe,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(No,{title:d,links:i}),o(ko,{links:a,license:h})]})})),To=(e,t)=>e?.map((({aspectName:e,params:l})=>({aspectName:e,params:"mindboxEvent"===e?{...l,eventJson:t}:l}))),Io=St((({className:e,title:t,button:l,regionSource:a,data:i,...r})=>{const[s,d]=n({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:l?.version||"primary"}),u=m?.find((e=>e.name===s.key))?.href,g=l?.text?l.text:"Перейти";return o(x,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(k,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Yl,{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(fe,{href:u,target:"_blank",className:p("p-m w-full @xl:w-auto",h),data:To(i,s?.key),children:g})}):null]})})})),Bo={width:"34",height:"34"},Mo={"bg-white":"color",transparent:"white"},Ro={"bg-white":"text-primary-main",transparent:"text-white"},Po=(e,t,l)=>o(le,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Mo[e]},className:Ro[e],width:l?.width,height:l?.height}),Vo={"bg-white":"text-primary-text",transparent:"text-white"},zo=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:l?.href??t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...he(s),children:[Po(i,l?.image,Bo),r?n??o("div",{className:"ml-s",children:o(je,{font:"font-medium",color:Vo[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),Do={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},Ao=d((({version:e,...t})=>{const l=t?.mobileText;return l?o(fe,{className:p("py-s font-light whitespace-nowrap",Do["transparent"===e?"transparent":"default"]),...t,children:l}):null})),jo=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankButton:n,version:a,backwardButton:r})=>{const s=u(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...p}=t??{},g=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[l||d?o("div",{children:o(zo,{className:"my-2xs",bgColor:e,logo:p,data:h})}):_o(g,r),o(Ao,{version:a,...n})]})})),_o=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":t,children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,Eo={"bg-white":"primary",transparent:"transparent"},$o=St((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=Eo[e],portal:n,logo:a={},...i})=>{const{logo:r={},backwardButton:s}=i.options?.page?.sitemap??{},{internetBankButton:c}=n||{},d=a.image?.icon||a.image?.src?a:r;return o(x,{tag:"header",defaultPadding:"",version:l,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(jo,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:l,backwardButton:s,...i})})})})),Oo=(e=!1)=>e?{}:{padding:"p-0"},Lo={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Fo=St((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=u();return o(x,{className:p("relative flex flex-col",Lo[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:V({...c,extraProps:{className:p("w-full",ba(r)),...Oo(n)}})})}),{childrenTypes:[]}),Uo=St((e=>o(Fo,{...e})),{childrenTypes:[]}),Ho=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",ki[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(le,{image:n})})})),Wo=["байт","Кб","Мб","Гб","Тб","Пб"],qo=d((({icon:e,text:t,href:l,target:n,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:l,target:n,...he(i),children:[e,t?c(je,{size:"text-l",font:"font-light",children:[t," ",Ko(d,m),o(je,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),Ko=(e,t)=>e||t?o("span",{children:", "}):"",Go=(e,t)=>(l,n)=>{const a=U(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Wo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Xo(a):l?.fileFormat;return c("div",{role:"listitem",children:[o(qo,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:Yo(t),data:l?.data}),o(De,{__html:l?.__html})]},String(n))},Yo=e=>e?o(le,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Xo=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},Jo=d((({href:e,__html:t,target:l})=>{const{close:n}=ce(),a=u(),r=U(a)(e),s=i((()=>{n()}),[]);return c(el,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(fe,{text:"Я согласен",version:"primary",target:l,href:r,onClick:s}),o(Zt,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),Zo=d((({text:e,href:t,target:l,__html:n})=>{if(!e&&!n)return null;const a=(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(Jo,{...e}),l),close:l}})({__html:n,href:t,target:l}),r=i((()=>a.open()),[a]);return o("button",{className:"text-primary-main",onClick:r,children:e})})),Qo={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},ec=St((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(T,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Qo[r]),role:"list",children:a.map(tc(d,i))}):null]})})),tc=(e,t)=>(l,n)=>{const a=l?.docType;return""===a?null:"reportSource"in l&&l?.reportSource?.__html?lc(l,n):Go(e,t)(l,n)},lc=({text:e,reportSource:t,href:l,target:n,__html:a},i)=>t?.__html&&e?c("div",{role:"listitem",children:[o(Zo,{text:e,href:l,target:n,__html:t?.__html}),o(De,{__html:a})]},String(i)):null,nc=St((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(le,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(we,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(k,{headingType:s,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Ge(n,{className:"flex-wrap"}),children:[a?o(je,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(et,{items:r,listItemSize:"M"}),o(je,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(le,{className:"w-fit",image:d})}):null,i?.src?o(le,{className:"lg:hidden",image:i}):null]})]})})})),ac=(e,t)=>e&&"underlined"!==t?"primary":"secondary",ic=(e=[],t={})=>e.filter((({content:e={}})=>di(t,e))).length,rc=(e,t)=>e===t;const sc=(oc=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(rc,((e=rc)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>oc(l,t[e])))));var oc;const cc=[],dc={},mc={primary:"bg-white/30",secondary:"bg-main-divider"},hc={primary:"text-white",secondary:"text-secondary-text"},uc=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",mc[t]),role:"status",children:o(je,{size:"text-xs",color:hc[t],children:e})}))),pc=({text:e,description:t,icon:l,isActive:n,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"}))(n);return c("div",{className:p("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,role:"tab",children:[l?o(le,{className:p("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...l,iconVersion:l?.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})]})]})},gc={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},xc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},fc={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},bc={default:"sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},yc=d((({tag:e="div",item:t={},isActive:l=!1,type:n="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,...h}=t;return o(i,{className:p("h-12","block flex-1","cursor-pointer",gc[n],l?bc[n]:fc[n]),role:"tablist",onClick:a,...h,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?xc[n]:"text-secondary-text hover:text-primary-main"),children:[pc({text:r,description:s,icon:d,isActive:l,type:n}),Number.isInteger(m)?o("div",{className:"ml-xs",children:o(uc,{count:m,version:ac(l,n)})}):null]})})})),vc=d((e=>o(e?.item?.href?Nc:wc,{...e}))),Nc=d((e=>{const t=me(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(yc,{...e,tag:"a",item:a,onClick:n})})),wc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(yc,{item:e,onClick:n,...l})})),kc=(e,t,l)=>(n,a)=>o(vc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Sc=d((({className:e,tabsType:t="default",items:l=[],activeItem:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel",children:l.map(kc(n,a,t))}))),Cc={categories:[],extraOptions:[],propertyType:[],stage:[]},Tc=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=hi(Cc,{block:a.block,page:a.options?.page}),g=i(((e=Cc)=>u(e)),[]),f=(({hotFilters:e=cc,filtrationState:t=dc,blocks:l=cc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>sc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:ic(l,t.filter),version:ac(t===e[a])})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Sc,{...f}),o(ii,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(ti,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Ic=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Bc=d((({children:e})=>Ic?e:null)),Mc="/icons/MapMarkerClusterIcon.svg",Rc="/icons/MapMarkerClusterYellowIcon.svg";function Pc({yandexMaps:e,map:t,points:l}){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=Vc("offices",e,n);if(l.length&&l.every((e=>"type"in e))){const i=Vc("workplaces",e,n),r=zc(l.filter((e=>"workplaces"===e.type)),"workplaces",e),s=zc(l.filter((e=>"offices"===e.type)),"offices",e);a.add(s),i.add(r),t.geoObjects.add(i),t.geoObjects.add(a)}else{const n=zc(l,"offices",e);a.add(n),t.geoObjects.add(a)}t.setBounds(e.util.bounds.fromPoints(l.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Vc=(e,t,l)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Mc:Rc,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),zc=(e,t,l)=>e.map((({coords:e,content:n})=>new l.Placemark(e,{balloonContentHeader:n?.header,balloonContentBody:n?.body,balloonContentFooter:n?.footer,hintContent:n?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Mc:Rc,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Dc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Ac={...Dc,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},jc=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Ac).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),_c=e=>globalThis[e];function Ec(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return((e,t)=>{const l=document.getElementById(t);if(l){const t=_c(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t(_c(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l(_c(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}const $c={...Dc,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Oc=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values($c).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:l,width:"20",height:"16"})})})),Lc=[55.753995,37.614069],Fc=d((({points:e,className:t="",zoom:l=5})=>{const n=s(null),i=Ec("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${D.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{n?.current?i&&(Pc({yandexMaps:i,map:n.current,points:e}),e?.length||n.current.setCenter(Lc)):i?.ready((()=>{n.current||(n.current=new i.Map("map",{center:e?Uc(e):Lc,zoom:l,controls:[],suppressMapOpenBlock:!0}),Pc({yandexMaps:i,map:n.current,points:e}))}))}),[i,e,l]),!i)return null;const r="z-10";return c("div",{id:"map",className:p("relative","w-full",t),children:[c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",r),children:[o(Oc,{yandexMaps:n}),o(Oc,{yandexMaps:n,direction:"out"})]}),jc(n,i,p("right-2 top-80",r))]})})),Uc=e=>[Wc(Hc(e,0)),Wc(Hc(e,1))],Hc=(e,t)=>e.map((e=>e.coords[t])),Wc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,qc=({__html:e,list:t})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(le,{image:e.image}):null,e?.text?o(je,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Kc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Gc="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Yc=(e,{field:t,reset:l},n)=>{const a=n?5:6,i=(e||[]).map((e=>o(sl,{text:Kc[e],...t(e)},e))),[r,s]=a>0?[i.slice(0,a),i.slice(a)]:[i,[]];return o("div",{children:e?.length?o("div",{children:o(Xa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Gc,children:r}),o(Ja,{className:Gc,isUnfolded:e,children:s})]}),renderFoldButton:Xc(l,n)})}):null})},Xc=(e,t)=>({isUnfolded:l,onToggle:n})=>c("div",{className:"flex space-x-lg",children:[t?o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(l)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(l)],onClick:n}):null,o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(W,{name:"CloseIcon",width:"16",height:"16"})})]}),Jc=()=>{},Zc=()=>[],Qc=e=>"all"===e?"block":"hidden",ed=d((({className:e,data:t=[],remoteWorkplaces:l=[],renderCard:a=Jc,renderRemoteWorkplaceCard:i=Jc,filterItems:s=Zc,getBalloon:d=Jc,getBalloonRemoteWorkplaces:m=Jc,initFilterState:h={},descriptionData:u,title:g})=>{const x=g?.includes("Офис"),[f,{field:b,reset:y}]=Kt(h),[v,N,w,S]=r((()=>{const e=s(t,f),n=s(l,f),a=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,a,n,e.length+n?.length]}),[t,l,f]),[C,T]=n("all");return c("div",{className:p("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(k,{headingType:"h2",children:[o("span",{suppressHydrationWarning:!0,children:g}),S?o(je,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${S})`})}):null]})}),u?qc(u):null,x&&td(t,C,T),o("div",{className:p("pb-2xl",Qc(C)),children:Yc(Object.keys(h),{field:b,reset:y},x)})]}),o("div",{className:"h-[600px]",children:o(Bc,{children:o(Fc,{points:N,className:"h-full"})})})]}),c(Bc,{children:[v.map(a),w.map(i)]})]})})),td=(e,t,l)=>{const n=ac("all"===t),a=ac("business"===t),i=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Zt,{"data-id":"all",onClick:t=>i(t,"all",e),version:n,children:"Для физических лиц"}),o(Zt,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},ld={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"}},nd=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",ld[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(le,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(je,{size:"text-m",color:ld[l].text,children:t})]}))),ad=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:id({textItems:a,subText:t,children:l,...n})})),id=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(je,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(je,{size:"text-l",children:e.trim()},String(t)))),a?o(je,{color:n,size:"text-m",children:a}):null]}),rd=d((({className:e,children:t})=>o("div",{className:p("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}))),sd=["ArrowDownIcon","ArrowUpIcon"],od=["Подробнее","Скрыть"],cd=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:od[Number(e)]}),o(W,{className:"text-primary-text",name:sd[Number(e)],width:"16",height:"16"})]}),dd=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:ud(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(je,{size:"text-h4",children:ud(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(nd,{color:"green",children:ud(s)})})]}),o("div",{className:"hidden sm:block",children:o(rd,{className:"flex-wrap",children:m?.map(hd)})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:o(rd,{className:"flex-wrap",children:m?.map(hd)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>cd({isUnfolded:e,onToggle:t})})]},String(d))},md=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${ud(t)} №${l}`,body:e.toUpperCase()}),hd=(e,t)=>o(ad,{...e},String(t)),ud=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",pd=[];const gd=async e=>{const t=await ft(e,{method:"GET"});return Array.isArray(t)?t:pd},xd={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},fd={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)},bd=d((({data:e,className:t})=>{const[l]=zs(),n=function(e){const{data:t=pd}=xn(`/api/v1/atms?regionCode=${e}`,gd);return t}(l?.code??"000");return o(ed,{className:t,filterItems:yd,data:n,initFilterState:xd,renderCard:dd,getBalloon:md,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),yd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>fd[t](e))),l=!n.length||n.some((t=>fd[t](e)));return t&&l}))},vd=e=>{const t=wd(e);return o(ad,{label:"Режим работы",value:t,className:"max-w-none"})},Nd=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",wd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Nd({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Nd({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},kd=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Sd=e=>kd.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Cd=e=>{if(!e)return null;const t=Td(e);return c(rd,{className:"border-none",children:[o(ad,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Id)})}),o(ad,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]})},Td=e=>{const t=kd.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Id=({short:e,status:t},l)=>o("div",{className:p("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(je,{size:"text-xs",children:e})},String(l)),Bd=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(ad,{label:"Валюта",value:e.currency}):null,t?o(ad,{label:"Купить",value:String(t)}):null,l?o(ad,{label:"Продать",value:String(l)}):null]},String(n)),Md=(new Date).getDay(),Rd=e=>{const[t]=e?.slice(Md-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(nd,{color:"green",children:a}):null,l&&i?o(nd,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(nd,{color:"red",children:"Выходной"})},Pd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Vd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(ad,{label:e,value:t&&l?l:"",subText:Pd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),zd=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Dd=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,Ad=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,jd=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=Sd(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(je,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),Rd(u)]}),o("div",{className:"hidden sm:block",children:_d({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:_d({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>cd({isUnfolded:e,onToggle:t})})]},String(h))},_d=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Sd(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(rd,{className:"flex-wrap",children:[o(ad,{label:"Факс",value:t}),o(ad,{label:"Телефон филиала",value:e}),o(ad,{label:"Для обращений юридических лиц",value:l}),o(ad,{label:"Обслуживание физических лиц",value:n}),o(ad,{label:"Для консультаций по валютному контролю",value:i}),o(ad,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(rd,{children:o(ad,{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(Vd)})})}):c(rd,{children:[o(ad,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Id)})}),vd(d)]}),r?.businessScheduleVisibleTag?Cd(r?.businessScheduleDescription):null,s?.currencies?.length?o(rd,{className:"flex-wrap",children:s?.currencies?.map(Bd)}):null]})},Ed=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Sd(e),l=e?wd(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?zd(l):Ad(l,n):Dd(l):null})(l)}`;return{header:n,body:i}},$d=({address:e,workScheduleDescription:t},l)=>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(je,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Od({workScheduleDescription:t})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:Od({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>cd({isUnfolded:e,onToggle:t})})]},String(l)):null,Od=({workScheduleDescription:e})=>c("div",{children:[c(rd,{className:"flex",children:[o(ad,{label:"Операции для физических лиц",children:o(je,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(ad,{label:"Операции для физических лиц",children:o(je,{children:"Оформление и обслуживание банковских карт"})}),o(ad,{label:"Операции для физических лиц",children:o(je,{children:"Инвестиционное и накопительное страхование"})}),o(ad,{label:"Операции для физических лиц",children:o(je,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(ad,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]}),Ld=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Fd={branches:[],remoteWorkplaces:[]};const Ud=async e=>await ft(e,{method:"GET"})||Fd,Hd={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},Wd={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)},qd=d((({className:e})=>{const[t]=zs(),l=function(e){const{data:t=Fd}=xn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Ud);return t}(t?.code??"000");return o(ed,{className:e,filterItems:Kd,data:l?.branches,remoteWorkplaces:l?.remoteWorkplaces,initFilterState:Hd,renderCard:jd,renderRemoteWorkplaceCard:$d,getBalloon:Ed,getBalloonRemoteWorkplaces:Ld,title:`Офисы филиала ${t?.name}`})})),Kd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Wd[t](e)))))},Gd=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(qd,{}):o(bd,{data:e})})})),Yd=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(T,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Xd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Ha,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(st,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Jd=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ke(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(le,{image:r})}):null,s?o(k,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?Zd(i):null,Qd({label:"Адрес",data:e,iconName:"GeolocationIcon"}),Qd({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),Qd({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ge([n]):null]})]}))),Zd=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{__html:e})}),Qd=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(je,{size:"text-xl",color:n,children:t})]})]}):null,em=d((e=>{const{__html:t,richVersion:l="",...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(De,{__html:t,richVersion:l})})})),tm=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Zn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Zn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),lm=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(wl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),nm=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(lm,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(lm,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),am=["От 1 дня","До 365 дней"],im=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(je,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Bn,{min:1,max:365,value:e,items:am,onChange:t})]}))),rm=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(lm,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(lm,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),sm=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(nm,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:om(m)}),o(im,{days:a,setDays:e=>m({days:e})}),o(rm,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:cm(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(je,{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(tm,{}),o(fe,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),om=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},cm=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},dm=d((({days:e,tariffs:t=[]})=>{const l=hm(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[mm("Аренда за",e),mm("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(S,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(le,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(S,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),mm=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(je,{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})]}),hm=(e,t)=>{const l=um(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},um=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},pm=(e,t)=>e.find((e=>e.branchCode===t)),gm=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=pm(n,l.selectedBranch),d=xm(s?.safeBoxCaseVolumes),m=fm(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=bm(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(sm,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(dm,{days:l.days,tariffs:h})]})})),xm=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],fm=(e,t)=>e?.find((e=>e.volume===t)),bm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,ym=[];const vm=async e=>await ft(e,{method:"GET"})||ym,Nm=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Wn(),p=wm(m.selectedRegion,u),g=function(e){const{data:t}=xn(e?`/api/v1/safeboxes?regionCode=${e}`:null,vm);return t||ym}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=pm(g,m.selectedBranch)||g,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(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(k,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(gm,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(S,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Fc,{points:b,className:"h-[640px]"}):null]})})),wm=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function km(e){throw new Error(e)}const Sm={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Cm={normal:"",small:"min-h-6xl"},Tm={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"},Im=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(x,{className:p("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(T,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"box-border",children:o("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Bm(i,r))})}):null,Ge(a,{isVertical:!0})]}))),Bm=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Mm(e,t)(l,n);case"rte":return o(De,{__html:l.__html});default:km(l)}},Mm=(e,t)=>(l,n)=>o("div",{className:"contents",children:c("div",{className:"flex flex-row items-center relative",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Rm(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",Cm[e]),children:[l.label?o(S,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",Tm.description),children:l.description}):null]})]})},String(n)),Rm=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Sm[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(x,{className:p(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:o("span",{className:"flex max-w-full max-h-full items-center justify-center",children:Ke(l?.icon)?o(le,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:Pm(e),height:Pm(e)}):o("span",{className:p("text-h4","transparent"===t?Tm.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},Pm=e=>"normal"===e?"38":"24",Vm=d((({isActive:e,item:t,onClick:l})=>c("div",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),zm=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=ce(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white p-0 rounded-xl",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Qt,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),Dm=({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(zm,{onClick:e=>e.stopPropagation(),onClose:l,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center px-xl",children:o(k,{as:"h4",title:c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];const Am=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:km(e)}}))),[c,d]),l},jm=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const _m=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(je,{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(Em,{...e},String(t))))})]}):null,Em=d((({icon:e,...t})=>{const l=me(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(le,{image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),$m=(e,t)=>l=>l.name?o(ls,{href:`/branches/${l.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(l),data:To(e,l.name),children:o(je,{size:"text-l",font:"font-light",children:l.name})},String(l.id)):null,Om=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:p(ul,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Lm=d((({foreignOffices:e,branches:t})=>{const[l,a]=zs(t?.default),r=me(),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=Um(Wn()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(h,Fm),{close:p}=ce(),g=i((e=>{a(e),p()}),[]);return c(el,{className:"pb-20",head:c("div",{children:[o(je,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(S,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(ls,{href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(Om,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&jm(e.toLowerCase())(d.toLowerCase())>=.8)).map($m(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(je,{size:"text-h6",children:e})}),t.map($m(f,x))]},e)))}),_m(e)]});var x,f})),Fm=e=>e.name?.charAt(0)||"",Um=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Hm=d((({menuRef:e,menuItem:t,locationDialogProps:l,closeAll:n})=>{const i=(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(Lm,{...e}),l),close:l}})(l||{}),[{name:r}]=zs(),s=e?.current?.getBoundingClientRect(),c=X(Y.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&n(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(zm,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center px-xl",children:o(k,{as:"h4",title:t?.title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),Wm="burgerMenuDialog",qm=({menuRef:e,centralMenuItem:t,closeAll:l,openDialog:n,locationDialogProps:a})=>{const i=Am(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(Wm,i);return[r,{toggle:()=>{r?l():n(o(Hm,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:l}),{id:Wm})}}]},Km=[],Gm=St((({sticky:e,...t})=>{const{menuItems:l=Km}=e??{},a=l.find((e=>"Меню"===e.title)),r=l.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=n(-1),[g,f]=n(""),{open:b,closeAll:y}=ce(),v=i((()=>{p(-1),f(""),y()}),[y]),N=bl(v),w=s(null),[k,{toggle:S}]=qm({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.options?.page?.sitemap}),[{openBottomMenuItemDialog:C}]=Dm({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(x,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Ym(I,"left",{activeIndex:u,currentItemPosition:g})),o(Vm,{item:a,isActive:k,onClick:e=>T(e)}),h.map(Ym(I,"right",{activeIndex:u,currentItemPosition:g}))]})})})),Ym=(e,t,l)=>(n,a,i)=>o(Vm,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:r=>{i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t||r.stopPropagation(),e(a,t)}},n.title||String(a)),Xm="hidden sm:flex absolute z-40",Jm={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},Zm=d((({className:e,items:t=[],activeItem:l,onChange:n,tabsType:i="default"})=>{const[r,s]=Ua({itemCount:t?.length||0});return a((()=>Qm(r.current,t,l)),[]),c("div",{className:p("relative overflow-x-auto no-scrollbar",e),children:[o(ka,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Jm[i].item,gap:Jm[i].gap,children:t.map(kc(l,n,i))}),s.canScrollLeft?o(Ra,{className:p("left-6",Xm,Jm[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Pa,{className:p("right-6",Xm,Jm[i].buttonTop),onClick:s.scrollRight}):null]})})),Qm=(e,t,l)=>{const n=t.findIndex((e=>e===l));e&&n>0&&e.scrollTo({left:e?.children[n]?.offsetLeft,behavior:"smooth"})},eh=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(Sc,{...t});case"scrollable":return o("div",{className:"flex",children:o(Zm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},th="tab",lh=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map(ah)),[l]),[f,b]=n(0);a((()=>{if(!l||!l[0])return;const e=d.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===d.query.tab))||0,t=l[e]||l[0];b(e),nh(t)}),[m]),a((()=>{const e=l[f];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,f]);const y=i((e=>{const t=g.indexOf(e),n=l[t];b(t),nh(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(th,e.name):t.delete(th),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,g]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:eh({items:g,activeItem:g[f],tabsMode:s,onChange:y})})})),nh=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},ah=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,ih={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},rh=({tabsType:e="animated",...t})=>e?o("div",{className:ih[e].wrapper,children:o(Zm,{className:ih[e].component,tabsType:e,...t})}):null,sh=St((({className:e="",tabs:t=[],block:l,tabsType:r,showCounter:s=!1,...d})=>{const m=l?.__id?`tabs-${l.__id}`:"tabs",h=u(),g=s?t.map((e=>({...e,count:l?.slots?.[e?.text??""]?.length??0}))):t,{isReady:f}=h,[b,y]=n(ch(g,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(m))),v=g[b],N=g.findIndex((e=>Boolean(e.selected)));a((()=>{const e=h.query[m]?g.findIndex(((e,t)=>"group"===e.type&&String(t)===h.query[m])):N;y(-1===e?0:e)}),[f,N,m]);const w=oh(g[b],b),k=i((e=>{const t=g.indexOf(e),l=g[t];y(t),"group"===l.type&&((e,t)=>{const l=new URLSearchParams(h.query);e.text?l.set(m,String(t)):l.delete(m),h.replace(`${h.pathname}?${l}`,"",{scroll:!1})})(e,t)}),[g]);return c(x,{className:p(e),defaultPadding:"p-0",...d,children:[rh({items:g,activeItem:v,tabsType:r,onChange:k}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(l?.slots??{}).map((([e,t])=>P(t,{...d?.options,slotName:w,parent:l,extraProps:{className:e===w?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.filter((e=>"group"===e.type)).map(oh)||[],childrenTypes:{exclude:["TabsLayout"]}}),oh=(e,t)=>e?.text||`Слот №${t}`,ch=(e,t)=>t?Number(t):e.reduce(((e,t,l)=>t.selected?l:e),0),dh={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},mh=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:dh[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),hh=d((({className:e="",isOpen:t,onClick:l})=>o(fe,{className:e,appendRight:o(le,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),uh={Buttons:({buttons:e})=>Ge(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(le,{image:e}):null,List:({isDotted:e,...t})=>o(et,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(je,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(je,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(hh,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},ph=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return gh({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),gh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in uh))return null;return o(uh[l],{...t,...n})},xh=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(ph,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),fh=(e,t)=>140*Pe(e.slice(0,t).map((e=>e?.cols?.length??1))),bh=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(je,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,yh=d((({rows:e})=>{return o(ka,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=p("flex duration-1000 text-center",0!==l?"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(je,{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(-${fh(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(je,{size:"text-xl",children:e.data}):null,e?.cols?bh(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),vh=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(je,{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(yh,{rows:t.rowsData})})})]},n)}))}))),Nh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),wh=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(je,{size:"text-xl",font:"font-light",color:Nh(t===l),children:e||t+1})},e)))}):null,t?o(fe,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function kh(e){const t=await fetch(e);return await t.json()}const Sh=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=xn(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),kh);return t||{}}(e),[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(wh,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(vh,{activeTabIndex:r,items:m}),o(hh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(je,{size:"text-h6",children:"Данных нет"}),o(hh,{onClick:l,isOpen:!0})]})})),Ch=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@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(Sh,{...t,onClick:l})}):null]}))),Th=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),g=i((e=>u(e)),[]);return c(Ch,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(le,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(mh,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(xh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Ih({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Ma,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Ma,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Bh=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,Ih({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Mh=d((({className:e="",title:t,description:l,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),u=m.length,[g,f]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:u,visibleItemCount:2}),b=(h||[]).map(((e,t)=>o(Th,{row:e,activeIndex:g,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(T,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:s>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Bh,{controls:f,children:[y,o(Ja,{isUnfolded:e,children:v})]}),renderFoldButton:Ya}):o(Bh,{controls:f,children:b})})]})})),Rh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?Ph():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(je,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Vh(l):null,a?o(De,{__html:a}):null]})]}))),Ph=()=>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"}),Vh=e=>o(S,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),zh=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(je,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(je,{size:"text-h2",children:l})}):null]}))),Dh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(zh,{prefix:t,unit:l,suffix:n})})})),Ah={AdTile:Tt,ApplicationForm:ma,BankAccountFiltration:gi,BenefitsBlock:yi,BonusBenefitsBlock:wi,ButtonsBlock:Si,CalculatorBonus:Ei,CalculatorBusinessDeposit:lr,CalculatorCredit:xr,CalculatorDeposit:Cr,CalculatorRefinancing:Pr,CardTransfer:Er,Carousel:qr,CarouselCard:Yr,CarouselCatalogCard:Jr,CarouselLinks:es,CarouselRecommendationCard:ss,CarouselTariffsCard:ds,ComparisonTable:Ns,DepositFiltration:Is,ErrorBlock:Ps,ExchangeRateTile:ao,Footer:Co,GrantSupport:Io,Header:$o,Headline:T,HorizontalLayout:Uo,ImgBlock:Ho,LinkDocs:ec,MobileAppTile:nc,MortgageFiltration:Tc,OfficesAtmsMap:Gd,Placeholder:Yd,ProductBlock:Ct,ProductGallery:Xd,RepresentativeOfficeInfo:Jd,RichTextBlock:em,RollupItem:mo,SafeDepositRental:Nm,StepsBlock:Im,StickyBottomMenu:Gm,Tabs:lh,TabsLayout:sh,TariffsTable:Mh,TextBlock:Rh,UnitBlock:Dh,VerticalLayout:Fo},jh=de((()=>{a((()=>{_t()}),[]);const e=Wt();fl(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");At({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const _h="cookie",Eh=d((({__html:e})=>{const[t,{setTrue:l,setFalse:n}]=ml();!function(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(_h)||l()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(_h,"true"),n()}),[]);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-24 flex justify-end",children:o(Qt,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),$h=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Am({onCloseAll:e,onClose:t}),{close:n}=ce(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return fl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Oh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:km(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return fl(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Lh="header",Fh="footer",Uh="sticky-footer",Hh={},Wh=d((({className:e,data:t=Hh,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=kt(s,r);jh();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.header,{...m,slotName:Lh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[V({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.footer,{...m,slotName:Fh})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.["sticky-footer"],{...m,slotName:Uh})}):null,o($h,{}),o(Oh,{}),o(Eh,{__html:d?.cookieContent?.__html})]})}));Object.assign(Wh,{childrenTypes:[],slots:()=>[Lh,Fh,Uh]});e.Blocks=Ah,e.ContentPage=Wh,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=de,e.joinList=ni,e.packageVersion="0.14.429",e.projectSettings=D,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=u,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t};const h=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}};function u(){return u._impl()}u._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),u.setup=e=>{u._impl=e};const p=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),g={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","":""},x=d((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:c="section",role:d,children:m,style:x})=>{const f=c,b=u(),[y,v]=n(!1);a((()=>h.subscribe("tab",(e=>{"group"!==e.type||e.groupName&&e.groupName!==s?.labelGroup||v(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s,b]);const w=t&&l;return o(f,{className:p("@container font-sans",w?"group":"",g[t],y?"hidden":"",r||i,e),...w?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:d,style:x,children:m})})),f=d((({className:e,size:t})=>o("figure",{className:p("m-0 mt-xl min-w-[80%]",e),children:b(t)}))),b=(e=3)=>v(100,e).map((e=>Math.floor(e))).map(y),y=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),v=(e,t)=>[e].concat(t>0?v(e/1.618,t-1):[]),w={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},k=d((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>{const i=w[l]||"h3";return o(i,{role:"heading",className:p("font-sans m-0",N[t],e),children:n||a})})),S=d((({children:e,...t})=>o("p",{className:p("font-sans",Object.values(t)),children:e}))),C={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"}},T=d((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=C[l],u={marginTop:h.descriptionStyle};return c(x,{className:p(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[n?o(k,{className:p("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:n}):null,a?o(S,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...u,children:a}):null]})})),I=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),B=[];function M(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=I,blocksRegistry:r={},ancestors:s=B}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:p(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return d?o(d,{className:i,block:e,options:t,...r,...n},a):null}},a)}const R=[],P=(e,{key:t,ancestors:l=R,slotName:n=null,extraProps:a,renderProps:i=M,...r})=>{const s=a?(e,t)=>M(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||R,[r.parent,n]]:l},a)))};function V({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?P(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const z=["CDN","BASE_PATH"],D=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const l=e._[t]||e[t];return z.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(l):l}}),A=e=>Boolean(e?.includes(":")),j=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),_=e=>Boolean(e?.startsWith("#")),E=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),$=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var O=Object.freeze({__proto__:null,isURL:A,isLocalURL:j,isHash:_,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:E,hasPrefix:$});const L="/api/",F=`${L}v1/storage`,U=e=>(t,l)=>{if([!t,A(t),_(t),[D.CDN,L].some((e=>$(t,e)))].some(Boolean))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 n=t?.startsWith("/");return E($(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},W={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},H=d((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const d=u(),m="normal"===i?`${l}.svg`:`sprites.svg#${l}`,h=U(d)(E(D.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:K(e,s)}):o(G,{className:e,children:c("svg",{className:p(q(r),W[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,n?o("desc",{children:n}):null,o("use",{href:h,xlinkHref:h})]})})})),K=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},q=e=>e?"":"w-full h-full",G=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),Y=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function X(e=""){try{const[,t]=new URL(e).pathname.split("/");return`/${t}`}catch(e){return""}}const J=e=>t=>{const l=t?.startsWith("/wcms-resources")?"":X(Y.SITE_URL);return t&&!A(t)?U(e)(t,l):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:l=""})=>{const n=u();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:l,media:a},i)=>o("source",{srcSet:J(n)(e),type:te(l),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(n)(t.src)},l):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:p("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}),te=e=>e?`image/${String(e)}`:void 0,le=d((({className:e="",image:t,imageClassName:l="",...n})=>t?.src||t?.icon?t.icon?o(H,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...n}):o(Q,{className:e,imageClassName:l,image:t}):null)),ne={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","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={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","":""},oe=({className:e,rounded:t,version:l})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?ne[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ce=()=>({open:(e,t={})=>h.fire("dialog",{type:"open",dialog:e,...t}),close:()=>h.fire("dialog",{type:"close"}),closeAll:()=>h.fire("dialog",{type:"close",all:!0})}),de=e=>de._impl(e);function me(){const e=X(Y.SITE_URL),t=u(),{closeAll:l}=ce();return e=>{const l=U(t)(e.href);return{...e,href:l,"aria-label":e.text,onClick:de(n({...e,href:l}))}};function n({href:n,target:a,onClick:i}){return r=>{i&&i(r);const s=!$(n,e||"/");n&&!s&&j(n,a)&&(l(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(n,e)))}}}de._impl=e=>e,de.setup=e=>{de._impl=e};const he=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},ue=d((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ge(e)?"hidden lg:block":"";return c("div",{className:p(pe(e),"flex gap-xs"),children:[n?o("div",{className:p(r,se[i]),children:n}):null,ge(e)?c("div",{className:"whitespace-pre",children:[l?o("div",{className:"text-xs font-light text-left",children:l}):null,o("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:p(r,se[i]),children:a}):null]})})),pe=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const a=""+(l?"py-2.5 px-9":"py-4 px-9");return p("group/btn items-center justify-center",ge(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ge=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),xe=({className:e,rounded:t,version:l})=>["inline-block",re,l?ie[l]:"",t?"rounded-full":"rounded-md",e].join(" "),fe=d((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault(),l.stopPropagation();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=me()({onClick:r,href:n,...a}),c=t??o(ue,{...s});return o(e?ye:be,{...s,children:c})})),be=d((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,type:c,...he(d),children:m}))),ye=d((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:n,version:l}),children:a})));function ve({version:e,handleClick:t,text:l="Вернуться назад",alwaysVisible:n=!1}){if(!l)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:p(n?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:p(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(le,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(fe,{version:"link",className:"group-data-secondary:text-white",text:l,ariaLabel:l,onClick:t,type:"button"})]})}const we={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Ne=d((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a,insetTitle:r,buttons:s,leftImage:o,rightImage:d,imageAlign:m,isImageAlwaysOnRight:h=!1,isImageSecondary:g=!1,backwardButton:x,children:f,...b})=>{const y=u(),v=i((()=>{y.back()}),[]),w=b.options?.page?.sitemap?.backwardButton;return c("div",{className:Se(n,l,e),children:[x?ve({version:t,handleClick:v,text:w}):null,ke(a),c("div",{className:p("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[Me(o,{imageAlign:m,className:"mx-auto"}),c("div",{className:p("grid gap-3xl",d?"@xl:grid-cols-2 auto-cols-fr":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[r,f]}),Be(V({...b,extraProps:{className:"@container-normal"}})),Me(d,{className:p("@xl:justify-self-end @xl:col-start-2",s?Ce(h):"",Te(h),Re(g)),imageAlign:m}),Ie(s)]})]})]})})),ke=e=>e?o("div",{className:"relative h-full",children:e}):null,Se=(e="",t="",l="")=>p("relative flex flex-col gap-3xl overflow-hidden",e||t,l),Ce=e=>e?"row-span-2":"@xl:row-span-2",Te=e=>e?"col-start-2 self-center":"",Ie=e=>e?o("div",{className:"self-end",children:e}):null,Be=e=>e&&e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Me=(e,{className:t,imageAlign:l})=>e?o("div",{className:p("shrink-1/2 justify-self-center",l&&we[l],t),children:e}):null,Re=e=>e?"hidden @xl:block":"",Pe=(e=[])=>e.reduce(((e,t)=>e+t),0),Ve=(e=[])=>e?.length?Pe(e)/e.length:0,ze=(e,t="normal")=>e?.icon||e?.src?o("div",{className:p("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(le,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,De=d((e=>{const{__html:t,richVersion:l=""}=e;return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:p(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ae=(e,t)=>e?o(S,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,je=d((({children:e,...t})=>o("span",{className:p("font-sans",Object.values(t)),children:e}))),_e=(e,t)=>e?o(je,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Ee=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?o(De,{...e},`rte-${t}`):["label"in e?_e(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Ae(e.description,t)},String(t)):null],$e=d((({className:e,benefitsVersion:t,...l})=>c("div",{className:p("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in l?ze(l.icon,t):null,o("div",{children:Ee(l)})]}))),Oe=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Le=e=>{return((t=e.map(Oe))?.length?Math.sqrt(Math.abs(Ve(t.map((e=>e**2)))-Ve(t)**2)):0)>16;var t},Fe=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ue=e=>!e.some(Fe),We=d((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?o("div",{className:p("flex gap-x-m gap-y-s",Le(l)||Ue(l)?"flex-col":"flex-wrap",e),role:"list",children:l.map(((e,l)=>o($e,{benefitsVersion:t,...e},String(l))))}):null)),He=d((({className:e,benefits:t})=>t?.length?o("div",{className:p("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(Ee)}):null)),Ke=d((({isTabularBenefits:e,...t})=>o(e?He:We,{...t}))),qe=e=>Boolean(e?.src||e?.icon),Ge=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:p("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),role:"group",children:e.map(Ye(l))}):null,Ye=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},c=Xe(a,r),d=Xe(i,r);return n||a?.icon?o(fe,{className:p("basis-full @lg:basis-auto",e),appendLeft:Je({...a,iconVersion:c}),appendRight:Je({...i,iconVersion:d}),version:r,text:n,...s},l?String(l):""):null},Xe=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Je=e=>qe(e)?o(le,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ze=d((({className:e,isDotted:t,dotClassName:l,children:n})=>c("div",{className:p("font-sans flex",e),role:"listitem",children:[t?o("div",{className:"shrink-0",children:o("div",{className:p("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,o("span",{children:n})]}))),Qe={S:{textSize:"text-l font-light",indentStyle:"ml-xs",dotStyle:"w-1 h-1 mr-xs"},M:{textSize:"text-h6",indentStyle:"ml-s",dotStyle:"w-1.5 h-1.5 mr-s"},L:{textSize:"text-h5",indentStyle:"ml-m",dotStyle:"w-1.5 h-1.5 mr-m"}},et=d((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Qe[n];return l?.length?o("section",{className:p("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>o(Ze,{isDotted:t,dotClassName:p(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),tt=(e=0,{fixed:t}={})=>(l=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(l)||0),lt=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(nt)}):null)),nt=({label:e,amount:t},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(je,{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:[tt(2)(t)," ₽"]}):null]},String(l)),at=d((({className:e,tags:t})=>t?.length?o("div",{className:p("flex flex-wrap gap-xs",e),role:"list",children:t.map(it)}):null)),it=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(je,{size:"text-m",font:"font-light",children:e})},String(t)),rt={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},st=d((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,benefits:m,__html:h,isFullWidthTitle:u,items:p,isDotted:g=!0,priceList:x=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:w=!0,isImageAlwaysOnRight:N,isImageSecondary:k=!1}={},backwardButton:S,children:C,...I})=>{const B=y?.src?o(le,{image:y}):null,M=o(T,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),R=m?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return o(Ne,{className:e,padding:t,defaultPadding:l,...u?{title:M}:{insetTitle:M},...ot(B,w),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:N,buttons:Ge(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[R?.length?o(Ke,{benefitsVersion:s,isTabularBenefits:d,benefits:R}):null,h?o(De,{__html:h}):null,p?.length?o(et,{items:p,isDotted:g,listItemSize:rt[i]}):null,C,x?.length?o(lt,{priceList:x}):null,ct(f)]})})})),ot=(e,t)=>t?{rightImage:e}:{leftImage:e},ct=e=>e?.length?o(at,{tags:e}):null,dt=e=>Boolean(e&&Array.isArray(e)),mt=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),ht=(e,t)=>{return l=e,Boolean(mt(l)&&"string"==typeof l.$ref)?t.ref(e):mt(e)?t.record(e):dt(e)?t.array(e):t.scalar?t.scalar(e):e;var l},ut=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(pt,e),pt=(e,t)=>e&&t?mt(e)?e[t]:dt(e)?e[parseInt(t,10)]:e:e,gt=(e,t)=>ht(e,{ref:({$ref:e,...l})=>gt(e?ut(t(e),e):l,t),record:e=>Object.entries(e).map((([e,l])=>({[e]:gt(l,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>gt(e,t)))}),xt=(e,t,l=[])=>{ht(e,{ref:e=>t(e.$ref,l),record:e=>{for(const n in e)xt(e[n],t,[...l,n])},array:e=>{for(let n=0;n<e.length;n++)xt(e[n],t,[...l,n])}})};async function ft(e,t){try{return e?await bt(e,t):null}catch(e){console.error(e)}return null}const bt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),yt=e=>[...new Set(e)],vt={},wt=["/portal-resources"],Nt=(e,t)=>gt(e,(e=>t?.[e])),kt=(e,t)=>{const l=(e=>{const t=[];return xt(e,(e=>t.push(e))),t})(e),[i,r]=n({});return a((()=>{l.length&&(async e=>Object.fromEntries((await Promise.allSettled(yt(e).filter((e=>!wt.some((t=>e.startsWith(t))))).map((async e=>[e,vt[e]||=await bt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(l).then(r)}),[l.join()]),l.length?Nt(e,{...t,...i}):e};function St(e,t={}){const l=d((t=>{const l=kt((({block:e,options:t,className:l,defaultPadding:n,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...l})}));return Object.assign(l,t),l}const Ct=St((({className:e,padding:t,...l})=>o(x,{className:p("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(st,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),Tt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},l=r((()=>It(0,t?.length)),[t]),n=t?.[l];return n?o(Ct,{suppressHydrationWarning:!0,...n,...e}):o(x,{...e,children:o(f,{})})})),It=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),Bt=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Mt=e=>e?.replace(/[^+\d]/g,"");const Rt=e=>e?{phone:Mt(e)}:{},Pt=e=>e?{birthday:Bt(e)}:{},Vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),zt=(e,t=!0)=>({[t?"email":"mail"]:e}),Dt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:Mt(e)}:{},At=({aspectsAttributes:e,aspects:t,ev:l})=>{for(const{aspectName:n,params:a}of e)t[n??""]?.(l,a)},jt="rshb-query-params";function _t(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(jt)||"";return e&&globalThis.sessionStorage?.setItem(jt,e),e}function Et(e){if(!e)throw new Error("Value should be fulfilled");return e}const $t=e=>t=>{const[,l]=Et(e.find((([e])=>e(t))));return l(t)},Ot=e=>$t(e.map((([e,t])=>[e,()=>t])));Ot.if=e=>new Lt(void 0,e);class Lt{parent;predicate;unit;get entry(){return[Et(this.predicate),Et(this.unit)]}constructor(e,t,l){this.parent=e,this.predicate=t,this.unit=l}if(e){return new Lt(this,e)}then(e){return new Lt(this.parent,this.predicate,e)}else(e){return $t([...Ft(this),[()=>!0,e]])}}const Ft=e=>[...e?.parent?Ft(e.parent):[],e.entry],Ut=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const l=(e=>{const t=_t();if(!A(e)||!t)return e;const l=new URL(e);for(const[e,n]of new URLSearchParams(t))l.searchParams.set(e,n);return l.toString()})(t?.href)||t?.href;if(l){Wt(t?.target)?.(l)}}},Wt=Ot([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Ht(){return Ht._impl()}Ht._impl=()=>({forwardQuery:Ut}),Ht.setup=e=>{Ht._impl=e};const Kt=e=>e,qt=(e,{resetOnSubmit:t,onSubmit:l}={})=>{const[a,r]=n(e),[o,c]=n(!1),[d,m]=n({}),h=s({}),u=i(((e,t)=>{const{parse:l=Kt,format:n=Kt}=t||{};return h.current||(h.current={}),h.current[e]||=t=>{r((n=>({...n,[e]:l(t)}))),m((t=>({...t,[e]:!0})))},{value:n(a[e]),isDirty:o||d[e],onChange:h.current[e]}}),[a,o,d]),p=i((e=>{r(e),m(e)}),[]),g=i((()=>{r(e),c(!1),m({})}),[e]),x=i((e=>{e.preventDefault(),t?g():c(!0),l&&l(a,e)}),[l,a]);return[a,{isDirty:o||Object.values(d).some(Boolean),field:u,update:p,reset:g,onSubmit:x}]},Gt=d((e=>{const{className:t,title:l,children:n,...a}=e;return o(x,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[l?o(k,{headingType:"h3",title:l,className:"@xl:text-center"}):null,n]})})}));function Yt({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Xt={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"},Jt={primary:p("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:p("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")},Zt=d((({children:e,...t})=>{const l=e=>({...e,onClick:de(Yt(e))}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=l(t);return o("button",{className:p("font-sans px-9 py-4","flex justify-center items-center gap-xs",i?"text-white bg-primary-active":"",r?"bg-main-gray text-main-disabled cursor-not-allowed":"",i||r?"":p(Xt[a],Jt[a]),c?"rounded-md":"",n),type:s,role:d,onClick:m,children:e})})),Qt=d((({className:e,onClose:t})=>o("button",{className:p("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(le,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),el=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=ce(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(Qt,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),tl=d((function({responseType:e}){const t="OK"===e,l=t?"ResponseOKIcon":"ResponseFailIcon",{close:n}=ce(),a=i((()=>{n()}),[]);return o(el,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(le,{image:{icon:l,iconVersion:"normal"},width:"156",height:"156"}),o(T,{className:"w-full",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",description:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(Zt,{type:"button",onClick:a,children:"Хорошо"})]})})})),ll=e=>t=>l=>e(l)?[]:[t],nl=e=>o("div",{className:"h-6",children:e?o(je,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),al=d((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),il="appearance-none w-5 h-5 border-solid cursor-pointer flex-none",rl=[{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"}],sl=d((({className:e,value:t,text:l,disabled:n,isRadio:a,onChange:r})=>{const s=i((e=>{n||(e.preventDefault(),r&&r(!t))}),[r,n,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(al,{paths:rl,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[o("div",{className:p(il,"m-0",a?"rounded-full border-2":cl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:ol(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?d:null,l?o("div",{className:"ml-s",children:o(je,{size:"text-l",font:"font-light",children:l})}):null]})})})),ol=(e=!1)=>e?"radio":"checkbox",cl=(e=!1)=>p("rounded border",e?"bg-primary-main":""),dl=d((({className:e,text:t,value:l,key:n,disabled:a,error:i,onChange:r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(sl,{text:t,value:l,disabled:a,onChange:r},n),nl(i)]})));function ml(e=!1){const[t,l]=n(e),a=i((()=>l(!0)),[]),r=i((()=>l(!1)),[]),s=i((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:a,setFalse:r,toggle:s}]}const hl=e=>e?o(je,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,ul="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",pl=d((({key:e,className:t="",id:l,name:n,type:r="text",label:d,placeholder:m,value:h="",valid:u=!0,children:g,onChange:x,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:w=!1})=>{const N=s(null),k=i((e=>{x&&x(e.target?.value||"")}),[x]);a((()=>{v&&N.current?.focus()}),[v,N]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=gl(u);return c("div",{className:p("relative",t),children:[c("label",{className:"space-y-xs",children:[hl(d),w?o("textarea",{className:p("block resize-y min-h-24",S,T),id:p("textarea",l),name:n||l,placeholder:m,value:h,onChange:k,onFocus:f,onBlur:b},e):o("input",{type:r,className:p("h-14",S,C,T),ref:N,id:l,name:n||l,placeholder:m,value:h,onChange:k,onFocus:f,onBlur:b,pattern:y},e)]}),g]})})),gl=e=>e?ul:"border-error",xl=e=>e?.text||e?.key||"";function fl(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function bl(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return fl(globalThis.document,"click",l),t}const yl=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,vl=d((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:yl(t,n).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===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:xl(e)}),o(H,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:p("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function wl({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:c,iconVersion:d}){const m={open:(e,t)=>h.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>h.fire("popup",{type:"update",popup:e,...t}),close:()=>h.fire("popup",{type:"close"})},u=i((()=>{m.close(),c&&c()}),[c]),p=i((e=>{u(),r&&r(e)}),[u,r]),g=s(null),x=bl(u);return a((()=>{if(!e||!g.current)return;const a=g.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(vl,{popupRef:x,options:t,value:l,query:n,onChange:p,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,l,n,p]),g}const Nl=d((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:d="",isSearch:m=!1,iconVersion:h="black",onChange:u,disabled:g})=>{const[x,{setFalse:f,setTrue:b}]=ml(),[y,v]=n(""),w=g||0===l.length,N=x&&!w,k=i((()=>{v(""),f()}),[]),S=wl({isOpen:x,options:l,value:a,query:y,onChange:u,onClose:k,iconVersion:h});return c("div",{className:p("space-y-xs",e),children:[hl(t),c("div",{className:p("relative",N?"z-20":"z-10"),ref:S,children:[c("div",{className:p("h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Sl(s,r,w)),onClick:N?k:b,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:xl(a)||d}),kl(N,h)]}),m&&N?o("div",{className:p("absolute top-0 w-full z-20"),children:o(pl,{type:"text",autoFocus:!0,value:y,onChange:v})}):null]})]})})),kl=(e,t)=>o(H,{className:p("absolute right-3 flex self-center",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Sl=(e,t,l)=>p(e?"border rounded-md ":"",e&&!l?"hover:border-primary-hover":"",l?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),Cl=()=>{},Tl=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const h=[];for(let c=0;c<7;c++)if(0===m&&c<t)h.push(o("td",{},`empty-${c}`));else if(d>l)h.push(o("td",{},`empty-${c}`));else{const t=new Date(a,n,d),l=Il(t,e),c=Bl(t,i,r);h.push(o("td",{children:o("div",{className:Ml(l,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:h},`row-${m}`))}return c},Il=(e,t)=>t&&e.toDateString()===t.toDateString(),Bl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Ml=(e,t)=>p("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Rl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Pl=d((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Cl})=>{const d=i((e=>s(e)),[]),{firstDayOfWeek:m,totalDays:h}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Rl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:Tl({firstDayOfWeek:m,today:e,totalDays:h,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:d})})]})})),Vl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],zl=Vl.map((e=>({key:e}))),Dl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Al={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},jl={className:"min-w-32",iconVersion:"black",isBorder:!1},_l=d((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=ml(!1),[u,g]=n(l?.getMonth()||(new Date).getMonth()),[x,f]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:w,monthsOptions:N,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=bl(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{l+1<=11?n(l+1):(n(0),a(r+1))}),[l]),handlePrevMonth:i((()=>{l-1>=0?n(l-1):(n(11),a(r-1))}),[l]),handleSelectMonth:i((({key:e})=>n(Vl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:zl,yearsOptions:Dl,ref:s}})({onYearSelect:f,onMonthSelect:g,onShowCalendar:h,selectedYear:x,selectedMonth:u,showCalendar:m});return c("div",{className:p("space-y-xs",e),ref:C,children:[hl(t),c("div",{className:"relative",children:[El(S,l,a),m?c("div",{className:"absolute bg-white z-20 select-none",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(H,{...Al,className:"-rotate-90 cursor-pointer"})}),o(Nl,{onChange:v,value:{key:Vl[u]},options:N,...jl}),o(Nl,{onChange:w,value:{key:String(x)},options:k,...jl}),o("div",{className:"my-auto",onClick:y,children:o(H,{...Al,className:"rotate-90 cursor-pointer"})})]}),o(Pl,{today:l,currentMonth:u,currentYear:x,onDateSelect:d,min:r,max:s})]}):null]})]})})),El=(e,t,l)=>c("div",{onClick:e,className:p("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[o(S,{children:t&&Bt(t)}),o(H,{...Al,name:"CalendarIcon"})]}),$l=d((({className:e,label:t,error:l,...n})=>c("div",{className:p("shrink-0 w-full",e),children:[o(_l,{label:t&&n?.errors?`${t}*`:t,valid:Boolean(!l),...n}),nl(l)]}))),Ol=d((({className:e,label:t,value:l="",placeholder:n,error:a,onChange:i,onBlur:r,isTextarea:s,type:d,...m})=>c("div",{className:p("shrink-0 w-full",e),children:[o(pl,{type:d||"text","aria-label":t,label:t&&m?.errors?`${t}*`:t,valid:Boolean(!a),value:l,onChange:i,onBlur:r,isTextarea:s,placeholder:m?.errors&&!t?`${n}*`:n}),nl(a)]}))),Ll=e=>"_"===e,Fl=e=>/\d/.test(e),Ul=e=>Ll(e)||Fl(e),Wl=[..."+7 (___) ___-__-__"],Hl=Wl.findIndex(Ll),Kl=Wl.map(((e,t)=>Ul(e)?Wl.slice(0,t).filter(Ul).length:-1));const ql=d((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Wl.map(((e,l)=>Fl(e)?e:t.charAt(Kl[l])||e)),n=Kl.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Hl,n)):l).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&(t&&t(""))}),[]);return o(pl,{...l,onChange:n,onFocus:e=>n(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Gl=d((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i,...r})=>c("div",{className:p("shrink-0 w-full",e),children:[o(ql,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),nl(n)]}))),Yl=d((({className:e="",label:t,error:l,...n})=>c("div",{className:e,children:[o(Nl,{...n,valid:!l,label:n?.errors?`${t}*`:t}),nl(l)]}))),Xl="Некорректно заполненное поле",Jl=ll((e=>null!=e&&""!==e))(Xl),Zl=ll((e=>e?.key&&""!==e?.key))(Xl),Ql=ll((e=>"string"==typeof e&&e.length>1))(Xl),en=ll((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Xl),tn=(ln=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,ll((e=>"string"==typeof e&&ln.test(e))))(Xl);var ln;const nn=ll((e=>"boolean"==typeof e&&e))("Согласие обязательно"),an={typeForm:Jl,surname:Ql,name:Ql,region:Zl,addressBranch:Zl,phone:tn,secondaryPhone:tn,birthday:Jl,email:Jl,fullName:Ql,inn:en,partnerComments:Jl,collectionCount:Jl,comment:Jl,acquiringType:Zl,feedbackType:Zl,feedbackMethod:Zl,serviceType:Zl,serviceDirection:Zl,consentDataProcessing:nn,annualRevenue:Jl},rn=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,an?.[e]])))},sn=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},on=(e,t,l=!1)=>l?sn(e,t):e,cn=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],dn=d((({field:e,input:t})=>o(Yl,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:cn,...on(e("acquiringType"),an.acquiringType,t?.required)}))),mn=(e="")=>Boolean("trade"===e||"all"===e),hn=e=>null!=e,un=new Map,pn=e=>Boolean(e?.every((e=>Array.isArray(e)?pn(e):!e||"string"==typeof e))),gn=e=>pn(e)?e.toString():"";function xn(e,t,{fallback:l,cache:i}={}){const s=r((()=>fn(e)),[e]),[o,c]=n(void 0),[d,m]=n(void 0);a((()=>{if(!s.some(hn))return;let e=!1;const l=(t,l)=>{e||(c(t),m(l))};return(async()=>{try{l(await((e,t=un)=>l=>{const n=gn(l),a=t.get(n);if(n&&hn(a))return a;const i=e(...l);return n&&hn(i)&&t.set(n,Promise.resolve(i)),i})(t,i)(s))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const h=l&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&l[s[0]];return{data:!o&&h?h:o,error:d,mutate:()=>Promise.resolve(void 0)}}function fn(e){return Array.isArray(e)?e:e instanceof Function?fn(e()):[e]}const bn=[];const yn=async e=>await ft(e,{method:"GET"})||bn;function vn(){const{data:e}=xn("/api/v1/branchesByRegions",bt);return Array.isArray(e)?e:[]}const wn=d((({field:e,input:t,isPremium:l=!1})=>{const n=e("region"),i=n?.value?.key,r=n?.value?.text,s=l?vn()?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=xn(e?`/api/v1/branches?regionCode=${e}`:null,yn);return t||bn}(i)?.filter((e=>e?.address));return a((()=>{""!==n?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[n?.value]),o(Yl,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...on(e("addressBranch"),an.addressBranch,t?.required),isSearch:!0})})),Nn=(e,{normalize:t,format:l})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=n(!1),m=i((e=>{d(!0),r&&r(e)}),[]),h=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!l?a:l(a),onFocus:m,onBlur:h}},kn=(e,t,l)=>Math.max(t,Math.min(e,l));function Sn(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function Cn({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:p("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:l,step:n,value:s,disabled:i,onChange:t=>{const l=Sn(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const Tn=1,In=100,Bn=d((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:Tn),max:s=(a.length?a.length-1:In),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:u}=e,g=Nn(e,{normalize:(e=0)=>a.length?Mn(a)(e):kn(e,r,s),format:tt()}),x=i((e=>{u&&u(Sn(e.target?.value))}),[u]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[l?o(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,o("input",{className:p("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",ul,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:x,...g}),Cn({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:u})]}),Rn(n)]})})),Mn=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Rn=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Pn=["От 1 000 ₽","До 1 000 000 000 ₽"],Vn=d((({field:e})=>o(Bn,{title:"Сумма, ₽",items:Pn,min:1e3,max:1e9,...e("amount")}))),zn=d((({field:e,input:t})=>o(Ol,{className:"col-span-2",...on(e("comment"),an.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),Dn=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],An=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],jn=[{text:"Задать вопрос по продуктам и услугам",key:"FEEDBACK"},{text:"Качество обслуживания",key:"FEEDBACK_QS"}],_n=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],En=d((({field:e})=>o(Yl,{label:"Способ получения ответа",options:_n,...sn(e("feedbackMethod"),an.feedbackMethod)}))),$n=d((({field:e})=>{const t=e("feedbackType");return a((()=>{"FEEDBACK"===t?.value?.key&&e("serviceDirection")?.onChange?.(An[0])}),[t?.value]),o(Yl,{label:"Тема",placeholder:"Выберите тему",options:jn,...sn(t,an.feedbackType)})})),On=d((({field:e})=>o(dl,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),Ln=d((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>c("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[o("div",{className:p("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:p("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),Fn=d((({field:e})=>mn(e("acquiringType")?.value?.key)?o(Ln,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Un=d((({field:e})=>{const t=e("secondaryPhone");return o(Gl,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?sn(t,an.secondaryPhone):t})})),Wn=d((({field:e})=>mn(e("acquiringType")?.value?.key)?o(Ln,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null));function Hn(){const{data:e}=xn("/api/v1/regions",bt);return Array.isArray(e)?e:[]}const Kn=d((({field:e,input:t})=>{const l=Hn();return o(Yl,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...on(e("region"),an.region,t?.required)})})),qn=d((({field:e,input:t})=>{const l=vn(),n=r((()=>l?.map((({region:e})=>({key:e,text:e})))),[l]);return o(Yl,{label:"Регион",placeholder:"Выберите регион",options:n,...on(e("region"),an.region,t?.required)})})),Gn=d((({field:e})=>o(Yl,{label:"Направление обслуживания",placeholder:"Выберите направление",options:An,...sn(e("serviceDirection"),an.serviceDirection)}))),Yn=["От 1 мес","До 15 лет"],Xn=d((({field:e})=>o(Bn,{title:"Срок, месяцев",items:Yn,min:1,max:180,...e("term")}))),Jn=d((({field:e})=>o(Yl,{label:"Тип обслуживания",options:Dn,...sn(e("serviceType"),an.serviceType)}))),Zn=d((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:p(ul,il,"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:l,name:e,checked:n,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(je,{color:"text-primary-text",children:t}):null]})}))),Qn=["currencyControl","documentOperations","conversionTransactions","otherIssues"],ea=d((({field:e})=>{const{value:t,onChange:l}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(Zn,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:l}),o(Zn,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:l}),o(Zn,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:l}),o(Zn,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:l})]})})),ta=(e,t)=>(l,n)=>{const{required:a,...i}=l,r="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,s={surname:o(Ol,{label:"Фамилия",...on(e("surname"),an.surname,a)}),name:o(Ol,{label:"Имя",...on(e("name"),an.name,a),...i}),middleName:o(Ol,{label:"Отчество (Обязательно, при наличии)",...e("middleName")}),phone:o(Gl,{label:"Телефон",...on(e("phone"),an.phone,a)}),email:o(Ol,{label:"Электронная почта",...on(e("email"),an.email,a)}),fullName:o(Ol,{label:"ФИО",...on(e("fullName"),an.fullName,a),...i}),inn:o(Ol,{label:"ИНН",type:"number",...on(e("inn"),an.inn,a)}),comment:o(zn,{field:e,input:l}),region:r?o(qn,{field:e}):o(Kn,{field:e,input:l}),addressBranch:o(wn,{field:e,input:l,isPremium:r}),birthday:o($l,{label:"Дата рождения",...on(e("birthday"),an.birthday,a)}),isClient:o(On,{field:e}),consentToReceiveMaterials:o(dl,{...e("consentToReceiveMaterials"),text:"Согласен на получение информационных и аналитических материалов по электронной почте"}),partnerComments:o(Ol,{...on(e("partnerComments"),an.partnerComments,a),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...i}),collectionCount:o(Ol,{label:"Количество объектов инкассации",type:"number",...on(e("collectionCount"),an.collectionCount,a)}),acquiringType:o(dn,{field:e,input:l}),onlineCheckout:o(Fn,{field:e}),posTerminal:o(Wn,{field:e}),serviceType:o(Jn,{field:e}),term:o(Xn,{field:e}),amount:o(Vn,{field:e}),annualRevenue:o(Ol,{label:"Годовая выручка, ₽",...on(e("annualRevenue"),an.annualRevenue,a)}),vedTypes:o(ea,{field:e}),feedbackType:o($n,{field:e}),feedbackMethod:o(En,{field:e}),serviceDirection:o(Gn,{field:e}),bankEmpolee:o(Ol,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}),applicationDate:o(Ol,{label:"Дата и время обращения в Банк",...e("applicationDate")}),secondaryPhone:o(Un,{field:e})};return function({input:e,field:t}){const{condition:l}=e,{value:n}=t(l?.name||"");return!l||l?.values?.find((e=>e===(n?.key??n)))}({input:l,field:e})?o("div",{children:s[l?.name]},String(n)):null};const la=e=>{const{acquiringType:t,onlineCheckout:l,posTerminal:n,amount:a,term:i,annualRevenue:r,serviceType:s,feedbackType:o,vedTypes:c,region:d,...m}=e,h=t||r?(e=>{const{acquiringType:t,onlineCheckout:l=!1,posTerminal:n=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${mn(t?.key)?`/Онлайн касса=${l}/POS-терминал=${n}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...m,...aa(c),...na(d),...h?{partnerComments:h}:{},...s?{typeForm:s}:{},...o?{typeForm:o}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},na=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},aa=e=>e?{vedTypes:Object.fromEntries(Qn.map((t=>[t,t===e])))}:{},ia={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e3,acquiringType:cn[0],serviceType:Dn[0],feedbackType:jn[0],feedbackMethod:_n[0],serviceDirection:An[0],vedTypes:Qn[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},ra=(e,t="")=>{const l=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||ia[e.name]])));return l?.serviceType&&"PREMIUMSERVICE"===t&&(l.serviceType=Dn[1]),{...l,typeForm:{key:t,text:""}}},sa=d((({text:e,link:t})=>c(S,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(je,{children:e}):null,t?o(fe,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(je,{children:t.text})}):null]}))),oa=(e,t)=>o(Zt,{className:p("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ca=(e,t,l)=>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(sl,{...e}),o(sa,{link:t})]}),nl(sn(e,nn).error)]}):o(sa,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),oa(l)]}),da={send:async function(e,t=!1){const{typeForm:l,region:n,phone:a="",email:i,birthday:r,inn:s,fullName:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:h,serviceDirection:u,...p}=e,g=t&&"Юридическое лицо / ИП"!==u,x=g?"/api/v1/lead":"/api/v1/sendcorporatelead",f={typeForm:l,...Vt(n,g),...zt(i,g),...Rt(a),...g?Pt(r):{inn:s,fullName:o},..."FEEDBACK"===l?{}:{addressBranch:c,bankEmpolee:m,applicationDate:h,...Dt(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}}},ma=d((({className:e,title:t,typeForm:l="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:u,data:g,...x})=>{const f=r?.flatMap((e=>e?.inputs))||[],b=ra(f,l),[y,v]=n(""),w=i((async(e,t)=>{const l=ga(f,e),n=(a=rn(l),e=>e&&Object.entries(a).flatMap((([t,l])=>l(e[t])))||[]);var a;if(n(e)?.length)return"Fail";const i=la({...e,...h}),r=await da.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(tl,{...e}),l),close:l}})({responseType:r}).open()}if("OK"===r&&g){const e=Ht();At({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:N,onSubmit:S,reset:C}]=qt(b,{onSubmit:w}),T=pa(f)?.name;return a((()=>{"OK"===y&&C()}),[y]),c(Gt,{className:p("container space-y-m",e),title:t,...x,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:p(ua(e.columns),"grid gap-x-m"),children:[ha(e.title),(e?.inputs||[])?.map(ta(N,l))]},`section-${t}`))),ca(T?N("consentDataProcessing"):void 0,d,s)]}),u?c("div",{className:"space-y-m",children:[o(k,{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(le,{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(le,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),ha=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(je,{size:"text-h6",children:e})}):null,ua=e=>2===e?"@xl:grid-cols-2":"",pa=e=>e?.find((e=>"consentDataProcessing"===e?.name)),ga=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((l=>{const n=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):l===(n?.key??n)})))),xa="text-left",fa=d((({title:e,description:t})=>c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(le,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(T,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:xa,className:"space-y-s"})]}))),ba=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",ya=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function va(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const wa=d((({className:e,style:t,idx:l,activeIndex:n,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:va(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}(i((e=>{e.length&&m&&m(l||0,e[e.length-1])}),[m,l]),c);return o("div",{className:p("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(l===n),ref:h,role:"listitem",children:d})})),Na=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],ka=d((({className:e,itemClassName:t,containerRef:l,activeIndex:n,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:u,onVisibleItemsChange:g,onVisibleIndicesChange:x})=>{const f={sensitivity:1,rootRef:l},b=s([]),y=i(((e,t)=>{const l=[...b.current||[]];l[e]=t,b.current=l,g&&g(l),x&&x(Ca(l))}),[g,x]),v=a>0?r*Number(a)-1:0,w="vertical-list"===d,N="horizontal-list"===d,k={...N?Sa(c,v):{},...w?ya(h):{},gap:`${r}px`};return o("div",{className:p("box-border overflow-auto no-scrollbar",d,e),style:k,ref:l,role:"list",children:(S=(e,l)=>o(wa,{className:p(m,a?Na[a-1]:"",w?"h-full":"",t),style:N?Sa(c/4):{},activeIndex:n,idx:l,observerOptions:f,onIntersection:y,children:e},String(l)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(u)});var S})),Sa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ca=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Ta={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Ia={"horizontal-list":"w-6","vertical-list":"h-6"},Ba=d((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?o("div",{className:p("flex gap-xs",Ta[a],i?"group":"",e),"data-ver":i,children:Array.from({length:n}).fill(null).map(((e,n)=>o("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?Ia[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(e=>{e!==l&&t?.current&&t.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Ma=d((({className:e,disabled:t,...l})=>o(fe,{rounded:!0,className:p("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:o(le,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Ra=d((e=>o(Ma,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Pa=d((e=>o(Ma,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Va="absolute top-[calc(50%-24px)] z-40",za="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Da=d((({className:e,scroll:t,hasBlur:l,arrowsPadded:n})=>{const{canScrollLeft:a,canScrollRight:i,scrollLeft:r,scrollRight:s}=t;return c("div",{className:p(e),children:[l?Aa(t):null,a?o(Ra,{className:p(Va,n?"left-1":"left-0"),onClick:r}):null,i?o(Pa,{className:p(Va,n?"right-1":"right-0"),onClick:s}):null]})})),Aa=e=>c("div",{children:[e.canScrollLeft?o("div",{className:p(za,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:p(za,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),ja=e=>e,_a=(e=ja)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),Ea=_a(),$a=(e=ja)=>_a((t=>-e(t))),Oa=$a(),La=e=>t=>e.scrollWidth/t,Fa=e=>(t,l)=>{e.scrollBy({left:l*La(e)(t),behavior:"smooth"})},Ua=({itemCount:e,onVisibleIndicesChange:t})=>{const l=s(null),[a,r]=n([]),o=i((e=>{r((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),t&&t(e)}),[e]),[c,d]=a.length?[$a()(a),_a()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?Fa(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?Fa(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{l?.current&&l.current.children[e]?.scrollIntoView(t)}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Wa=d((({className:e,version:t,gap:l=14,padding:n=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:u,children:g,onVisibleIndicesChange:x})=>{const f=Array.isArray(g)?g.length:0,[b,y]=Ua({itemCount:f,onVisibleIndicesChange:x}),[v]=y.visibleIndicesRange;return c("div",{className:p(e,"vertical-list"===i?"relative h-full":""),children:[o(ka,{containerRef:b,activeIndex:v,visibleItemCount:a,gap:l,padding:n,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:y.handleVisibleIndicesChange,children:g}),o(Da,{className:p(!d&&"hidden lg:block"),scroll:y,hasBlur:m,arrowsPadded:h}),o(Ba,{className:p(!u&&"lg:hidden"),containerRef:b,activeIndex:v,dotCount:f,listType:i,version:t})]})})),Ha=({blocksToRender:e,...t})=>o(Wa,{visibleItemCount:0,gap:0,showArrows:!0,arrowsPadded:!0,children:P(e,{...t.options,parent:t.block,renderProps:(e,t,l)=>o("div",{className:p("relative min-w-80",ba(!0)),children:M(e,t)},String(l))})}),Ka=e=>e%2!=0,qa=d((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,role:r,...s})=>c(l,{tag:l,className:p("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Ga=d((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>o(qa,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",role:"button",className:p("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(je,{size:"text-h4",children:t}),iconNode:l?o(le,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Ya=({isUnfolded:e,onToggle:t})=>o(Ga,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Xa=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),h=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[h,m]}:{className:e,role:"group",children:[m,h]})}));const Ja=d((({className:e="",isUnfolded:t,children:l})=>{const n=s(null),i=function(e,t){const l=s(null);return a((()=>{const t=l?.current;if(!t)return;const n=new ResizeObserver((l=>{e(t,l[0])}));return n.observe(t),()=>{n.disconnect()}}),[e,...t]),l}((e=>{n.current&&(n.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:l})})})),Za=["ArrowDownIcon","ArrowUpIcon"],Qa="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ei=({topItemsCount:e=0,label:t="",block:l,blocksToRender:n=[],...a})=>{const[i,r]=e>0?[n.slice(0,e),n.slice(e)]:[n,[]];return c("div",{className:p("space-y-2xs",n.length?"":"hidden"),children:[c("div",{className:p(Qa),children:[P(i,{...a.options,parent:l}),Ka(i.length)?o(Tt,{className:"col-span-6",...a}):null]}),o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Ja,{className:p(Qa),isUnfolded:e,children:[P(r,{...a.options,parent:l}),Ka(r.length)?o(Tt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:l,onToggle:n})=>o(Ga,{className:p(e<1?"hidden":""),disabled:!r?.length,label:t,icon:Za[Number(l)],dataTheme:a.options?.page?.colorPalette,onClick:n})})]})},ti=d((({blocksSection:e,blocksToRender:t=[],notFound:l,...n})=>{switch(e?.view){case"grid":return c("div",{children:[li(l,t),ei({...e,...n,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[li(l,t),Ha({...n,blocksToRender:t})]});default:return null}})),li=(e,t)=>e&&!t.length?o(fa,{...e}):null,ni=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),ai=d((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>o(Ln,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(!t)return;const a=e?.includes(l);t(n?a?(e||[]).filter((e=>e!==l)):[...e||[],l]:a?[]:[l])})(l.value),type:n?"checkbox":"radio"},l.value))))),ii=d((({children:e,filtrationSchema:t,resetButton:l,field:n,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,ni(o("div",{className:"h-full w-px bg-gray"}))(Object.entries(t).map(ri(n)).filter(Boolean))]}),l?o("div",{children:o(Zt,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:l?.text})}):null]}))),ri=e=>([t,l])=>{const n=l?.type;return"array"===n?si(t,e)(l):null},si=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[l?.title?o("div",{className:"mb-m",children:o(je,{size:"text-m",font:"font-medium",color:"text-primary-text",children:l.title})}):null,o(ai,{items:n,multiple:!l?.single,...t(e)})]},e)};function oi(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const ci=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,di=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>ci(t[e])||ci(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>ci(t[e])||ci(l[e])||mi(t[e])<=mi(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>ci(t[e])||ci(l[e])||mi(t[e]?.min)>=mi(l[e]?.min)&&mi(t[e]?.min)<=mi(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>ci(t[e])||ci(l[e])||t[e]?.every((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>ci(t[e])||ci(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),mi=e=>Number(e||0),hi=(e,{block:t,page:l,normalize:n=Kt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=qt(e),d=r((()=>oi(a,a.map((e=>Nt(e.content,l?.fallback))))),[a,l?.fallback]),m=i===e?a:((e,t)=>(l=Kt)=>e?.filter((([,e])=>di(t,l(e)||{}))).map((([e])=>e)))(d,i)(n);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},ui={},pi={},gi=St((({className:e,filtrationSchema:t=ui,consumerField:l={},resetButton:n,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=hi(pi,{block:a.block,page:a.options?.page}),d=o(Nl,{className:"w-64",label:l?.title,options:xi(l),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>xi(l).find((t=>t.key===e))||{key:""}})});return c(x,{className:p(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(ii,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(Zt,{type:"reset",className:"mt-lg w-64",onClick:s,version:n?.version,children:n?.text})})]})}),o(ti,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),xi=e=>oi(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),fi={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},bi=d((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:p("rounded-icon object-fit flex justify-center items-center",fi[l],e),children:o(H,{...i,width:"54%",height:"54%",name:a})}):null})),yi=d((({className:e="",title:t,benefitList:l,...n})=>c(x,{className:e,defaultPadding:"p-6xl",...n,children:[t?o(k,{headingType:"h3",as:"h2",className:xa,title:t}):null,l?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(vi)}):null]}))),vi=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?o(bi,{className:"shrink-0",defaultIconSize:56,iconBgVersion:a||"",...n}):null,n?.src?o(le,{className:"shrink-0",image:n}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(k,{headingType:"h6",children:e}),o(je,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),o(et,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),wi=(e,t,l)=>{return o(Wa,{children:e.map((n=l,({icon:e,title:t,description:l},a)=>c("div",{className:p("flex flex-col gap-1","justify-between p-m h-full border border-gray",l||t?"":"justify-center"),children:[t?o(je,{size:"text-h6",font:"font-normal",align:n,children:t}):null,e?o(le,{image:e,height:"180",className:"w-auto mx-auto"}):null,l?o(je,{size:"text-h6",font:"font-normal",align:n,children:l}):null]},String(a))))});var n},Ni=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>c(x,{className:p("space-y-3xl",l),defaultPadding:"p-6xl",...r,children:[o(T,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?wi(e,0,t):null]}))),ki={start:"justify-start",center:"justify-center",end:"justify-end"},Si=d((({buttons:e,className:t="",align:l,...n})=>{const a=l?p("flex",ki[l]):"";return o(x,{className:p("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:Ge(e)})})),Ci=d((({className:e,title:t,children:l,...n})=>c(x,{className:p("space-y-xl",e),defaultPadding:"p-4xl",...n,children:[t?o(k,{className:"text-center",title:t}):null,l]}))),Ti="flex flex-col justify-between @4xl:flex-row gap-x-s gap-y-7 @xl:gap-y-4xl",Ii="flex flex-col lg:max-w-80 gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",Bi="flex flex-col gap-y-xl",Mi=d((({className:e,title:t,value:l,fractionDigits:n,fixed:a,prefix:i,postfix:r,color:s="text-secondary-text"})=>c("div",{className:p("flex justify-between @xl:flex-col",e),children:[t?o(je,{size:"text-l",font:"font-light",color:s,children:t}):null,o("div",l?{children:o(je,{size:"text-h3",children:[i,tt(n,{fixed:a})(l),r].filter(Boolean).join(" ")})}:{children:o(je,{size:"text-h3",children:"-"})})]}))),Ri=(e,t)=>e?o(S,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,Pi=d((({rate:e=0,title:t="Ставка",unit:l,fractionDigits:n=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(je,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex justify-start gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:tt(n,{fixed:!0})(e)}),l?o("span",{className:"text-7xl",children:l}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Vi=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s",children:[o(je,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(H,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(S,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(S,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),zi=({title:e="Ставка",rate:t=0,unit:l="%",fractionDigits:n=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Vi,{title:e,...s}):c("div",{children:[o("div",{className:"hidden @xl:block min-w-96",children:o(Pi,{title:e,rate:t,unit:l,fractionDigits:n,color:i,...s})}),o("div",{className:"@xl:hidden",children:o(Mi,{title:e,value:t,postfix:l,fractionDigits:n,fixed:!0,color:i,...s})}),r]});function Di({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${tt(2)(l.min||0)} ₽`,`До ${tt(2)(l.max||0)} ₽`];return o(Bn,{items:e?n:[],step:t,...l})}const Ai={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ji={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},_i=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,[a,i]=((e,t,l)=>{const{maxBonus:n=5e3,prefMonthsNum:a=Ai.prefMonthsNum,prefTravelBonusRate:i=Ai.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*l),n);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*l),n)*(12-a)]})(t||ji,l,n);return{...t,...e,monthBonus:a,yearBonus:i}},Ei=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,...i})=>{const[r,{field:s}]=qt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:u,monthBonus:g,yearBonus:x}=_i(r,l);return o(Ci,{className:e,title:t,...i,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Di({title:"Сумма покупок в остальных категориях, ₽",min:h,max:u,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?zi({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Bi,children:[x>=0?o(Mi,{title:"Баллов за год",value:x,color:"text-primary-text"}):null,Ge(n,{isVertical:!0}),Ri(a)]})]})})})),$i=Math.round(29.5),Oi=(e,t=0)=>e?.sum?e.sum:t,Li=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Fi=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ui={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Wi=d((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>o("div",{className:p(`flex ${Ui[a]}`,l),role:"radiogroup",children:e?.map((({id:e,text:l})=>o(sl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),Hi=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",children:o(je,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?o("div",{className:"@5xl:hidden",children:o(je,{color:"text-secondary-text",font:"font-light",children:l})}):null,o(Wi,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:i,onChange:t=>r&&r(t===e[0].id)})]}),Ki=e=>Hi({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),qi=({income:e,finalSum:t,buttons:l=[],footnotes:n=[]})=>c("div",{className:Bi,children:[o(Mi,{title:"Доход в конце срока",value:e,postfix:"₽",prefix:"+"}),o(Mi,{title:"Сумма в конце срока",value:t,postfix:"₽"}),Ge(l,{isVertical:!0}),n?.map(Ri)]}),Gi=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:Yi([e,t],n),Yi=([e,t],l=[])=>({[e]:l.length?Oa(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?Ea(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Xi=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Ji={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Zi={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Qi=(e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=l<90||l>730,c=function(e){const t=e?.rateType?Ji[e?.rateType]:"",{data:l}=xn(t?`/api/v1/depositrates/${t}`:null,bt);return Array.isArray(l)?l:[]}(t);if(l<=30)return{...Zi,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&er(s,e)&&Xi(n,["minSum","maxSum"],e)&&Xi(l,["minDays","maxDays"],e)))||Zi,{rate:m}=d,h=tr(m,e),u=n+h,p=c||[Zi];return{...d,...Yi(["minSum","maxSum"],p),...Yi(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:h,finalSum:u}},er=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,tr=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,daysValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a/30)-n):Math.round(n*e*a/365/100)},lr=St((({className:e="",title:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=qt({moneyValue:Oi(r,1e5),daysValue:Li(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),u=Qi(m,s),{income:g,finalSum:x,rate:f,isUnavailableByTerm:b,depositeName:y}=u;return o(Ci,{className:e,title:t,...d,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Сумма, ₽",min:u.minSum,max:u.maxSum,...h("moneyValue"),value:u.moneyValue}),(v={title:"Срок, дней",min:u.minDays,max:u.maxDays,...h("daysValue"),value:u.daysValue},o(Bn,{items:[`От ${Fi(v.min||0)}`,`До ${Fi(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[nr(u,h),Ki({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),zi({rate:f,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),qi({income:g,finalSum:x,buttons:l,footnotes:[n,a]})]})});var v})),nr=(e,t)=>c("div",{className:"space-y-s",children:[o(je,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(sl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(sl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),ar=(e,t)=>{if(!t?.length)return;const l=t?.reduce(((t,l)=>e[0](l.rate,t[0].rate)?[l]:l.rate===t[0].rate?[...t,l]:t),[t[0]]);return l.length>1?l.reduce(((t,l)=>e[1](l,t)?l:t),l[0]):l[0]},ir=({min:e=0,max:t=0,availableMonths:l,...n})=>o(Bn,{items:[`От ${rr(e)}`,`До ${rr(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),rr=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,sr=e=>Hi({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),or=({field:e,defParams:t,calcParams:l,map:n,monthsValue:a="maxMonths"})=>{Object.entries(n).forEach((([l,n])=>{e?.(l)?.onChange?.(t?.[n])})),e?.("monthsValue")?.onChange?.(kn(t?.[a],l.minMonths,l.maxMonths))},cr=(e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(l){const t=e/1200;return i?(n+i)*(t+t/(Math.pow(1+t,a)-1)):n*(t+t/(Math.pow(1+t,a)-1))}return Math.round(n/a)+n*(e/1200)},dr={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},mr=e=>hr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&hr({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&hr({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&hr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),hr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],ur=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows||[dr],r=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>mr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:s,maxSum:o}=Gi(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Gi(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>mr({row:e,userInputParams:t,paramsViewSettings:l})&&Xi(n,["minSum","maxSum"],e)&&Xi(a,["minMonths","maxMonths"],e)))||dr)({rateRows:i,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:h}=m,u=cr(h,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:n,monthsValue:a,monthlyPayment:u}},pr=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),gr={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},xr=St((({className:e,title:t,calcSource:l,buttons:n,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=l?.rateRows,ar([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[u,{field:g}]=qt({moneyValue:Oi(s,2e5),monthsValue:Li(s,$i),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),x=ur(u,l,r),f=sr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(kn(u.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]),a((()=>{y&&y(kn(u.monthsValue,x.minMonths,x.maxMonths))}),[x.minMonths,x.maxMonths]),a((()=>{!pr(s)&&m&&or({field:g,defParams:m,calcParams:x,map:gr,monthsValue:"minMonths"})}),[l,s]),o(Ci,{className:e,title:t,...d,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Сумма кредита, ₽",step:500,min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),ir({title:"Срок кредита, месяцев",min:x.minMonths,max:x.maxMonths,...g("monthsValue"),value:x.monthsValue}),fr({...x,...r},g),o("div",{className:"sm:hidden",children:f})]}),zi({rate:x.rate}),c("div",{className:Bi,children:[o(Mi,{title:"Ежемесячный платёж",value:x.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:f}),Ge(n,{isVertical:!0}),Ri(i)]})]})})})),fr=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(sl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(sl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(sl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(sl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),br=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,n]=t[l-1],[a,i]=t[l];n>=a?t.splice(l-1,2,[e,Math.max(n,i)]):l++}return t},yr={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},vr=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=t?.rateRows?.[0]?kr(t.rateRows[0].minMonths,t.rateRows[0].maxMonths):0,r=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=!l?.isShowReplenish,c=!l?.isShowWithdrawn,d=t?.rateRows?.find((t=>Nr({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o})&&Nr({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c})&&Nr({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r})&&Nr({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&Xi(n,["minSum","maxSum"],t)&&Xi(a||i,["minMonths","maxMonths"],t)))||yr,{rate:m}=d,h=wr(m,e),u=n+h,p=t?.rateRows||[yr];return{...d,...Yi(["minSum","maxSum"],p),...Yi(["minMonths","maxMonths"],p),availableMonths:br(p.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:i,income:h,finalSum:u}},wr=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:a}=t;return l?Math.round(n*Math.pow((1200+e)/1200,a)-n):Math.round(n*e*30*a/365/100)},Nr=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],kr=(e,t)=>e+Math.round((t-e)/2),Sr=(e,t)=>{return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?Hi({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}]}):null,e.isShowWithdrawn?Hi({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}]}):null]}),o("div",{className:"border-b border-main-divider w-full"}),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Ki({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Hi({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]})]});var l},Cr={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Tr=St((({className:e,title:t,calcSource:l,buttons:n=[],footnote:i="",paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=l?.rateRows,ar([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],h));var h;const[u,{field:g}]=qt({moneyValue:Oi(s,2e4),monthsValue:Li(s),isMonthlyInterestPayment:Boolean(s?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(s?.isRemoteRegistration),isReplenish:!1,isWithdrawn:Boolean(s?.isWithdrawn??!1)}),x=vr(u,l,r),{defaultMonth:f,rate:b,income:y,finalSum:v,type:w=""}=x,{onChange:N}=g("monthsValue"),{onChange:k}=g("moneyValue");a((()=>{!u.monthsValue&&N&&N(f)}),[f]),a((()=>{k&&k(kn(u.moneyValue,x.minSum,x.maxSum))}),[x.minSum,x.maxSum]);const S=()=>or({field:g,defParams:m,calcParams:x,monthsValue:"minMonths",map:Cr});a((()=>{!pr(s)&&m&&S()}),[l,s]);const C=b===m?.rate;return o(Ci,{className:e,title:t,...d,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Сумма, ₽",min:x.minSum,max:x.maxSum,...g("moneyValue"),value:x.moneyValue}),ir({title:"Срок, месяцев",min:x.minMonths,max:x.maxMonths,availableMonths:x.availableMonths,...g("monthsValue"),value:x.monthsValue}),Sr({...x,...r},g)]}),zi({rate:b,children:Br(S,C)}),qi({income:y,finalSum:v,buttons:[...n,Ir(l?.buttons,w)],footnotes:[i]})]})})})),Ir=(e=[],t="")=>{const{type:l,...n}=e.find((e=>e.type===t))??{};return n},Br=(e,t=!1)=>t?null:o(Zt,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Mr=e=>Rr({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Rr({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Rr=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Pr={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Vr=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Pr],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Mr({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Gi(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Gi(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Mr({row:e,userInputParams:t,paramsViewSettings:l})&&Xi(n+r,["minSum","maxSum"],e)&&Xi(i,["minSumOld","maxSumOld"],e)&&Xi(r,["minSumExtra","maxSumExtra"],e)&&Xi(a,["minMonths","maxMonths"],e)))||Pr)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=u,g=cr(p,e),x=e.oldMonthlyPayment-g;return{...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:x}},zr=St((({className:e="",title:t,calcSource:l,buttons:n,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=qt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Vr(s,l,i),h=sr({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ci,{className:e,title:t,...r,children:c("section",{className:p(Ti,e),children:[c("div",{className:Ii,children:[Di({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Di({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),ir({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Dr({...m,...i},d),m.isExtraMoney?Di({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),zi({rate:m.rate,fractionDigits:1}),c("div",{className:Bi,children:[o(Mi,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Mi,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Ge(n,{isVertical:!0}),Ri(a)]})]})})})),Dr=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(sl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(sl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(sl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ar=d((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=Nn(e,{normalize:(e=a)=>l&&n?String(kn(Number(jr(e)),l,n)):jr(e),format:tt(r)}),d=i((e=>t&&t(jr(e))),[t]);return o(pl,{onChange:d,...s,...c})})),jr=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),_r=d((e=>o(Ar,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(je,{size:"text-xl",font:"font-light",children:"₽"})})}))),Er={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},$r={amount:1500},Or=d((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=qt($r),[h,u]=n(!1);return a((()=>{u(d<=0)}),[d]),c(x,{className:p("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(k,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Er[r],children:[o(_r,{valid:!h,label:l,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(Zt,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),Lr=({className:e,text:t="ХИТ"}={})=>c("div",{className:p("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(H,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(S,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Fr="relative h-full",Ur={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Wr=({noCardBorder:e,cardSize:t="normal",...l})=>{const{blocks:n}=l.block||{},a=n?.some(qr);return V({...l,renderProps:(l,n,i)=>c("div",{className:Hr(l,{someCardsHighlighted:a}),children:[M(l,n,{className:Kr(l,{someCardsHighlighted:a,showBorder:!e,cardSize:t}),blockIndex:i}),qr(l)?Lr({className:"absolute top-0 -right-4 z-40"}):null]},String(i))})},Hr=(e,{someCardsHighlighted:t})=>p(Fr,t&&(qr(e)?"pt-3xl":"pt-3xl sm:pt-16")),Kr=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>p(Fr,"min-w-80",Ur[n],t&&(qr(e)?"pt-3xl sm:pt-16":"pt-3xl"),ba(l),l&&"h-full"),qr=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Gr=St((({className:e,visibleItemCount:t=0,noCardBorder:l,arrowsPadded:n=!0,isGap:a=!0,cardSize:i="normal",...r})=>o(x,{className:p(e),defaultPadding:"p-6xl",...r,children:o(Wa,{className:p("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:n,hasBlur:!0,children:Wr({noCardBorder:l,cardSize:i,...r})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Yr="z-10 border border-solid w-full h-full",Xr=p(Yr,"absolute hidden @xl:block border-transparent"),Jr=d((({className:e,title:t,description:l,button:n,...a})=>o(x,{className:p("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:p(Xr,"top-9 right-12 bg-green-dark")}),o("div",{className:p(Xr,"top-6 right-8 bg-green")}),o("div",{className:p(Xr,"top-3 right-4 bg-green-light")}),c("div",{className:p(Yr,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(T,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ge([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Zr={black:"bg-black",white:"bg-white"},Qr=d((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(x,{className:p("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ne,{className:"h-full",padding:d,title:o(T,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?o(le,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:Ge([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(je,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(es)]}):null,a?c(je,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),es=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Zr[e]}`},String(t)),ts=d((({icon:e,...t})=>{const l=me(),{text:n,href:a,target:i,onClick:r}=l(t);return n?o("div",{className:p("h-32 rounded-lg bg-white text-secondary-text flex items-center justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-4 break-words max-w-[150px]",children:[e?o(le,{className:p(""),image:{...e,iconVersion:e?.iconVersion},width:"50",height:"50",alt:n}):null,o("div",{className:"text-primary-text text-center text-sm whitespace-wrap min-h-8",children:n})]})})}):null})),ls=d((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>o(x,{defaultPadding:"p-5xl",className:p("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-4xl justify-between",children:[c("div",{className:"flex-1",children:[o(T,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),o(T,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?ns(n):null]})}))),ns=e=>o("div",{className:p("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-4"),children:e.map(((e,t)=>o(ts,{...e},String(t))))}),as=d((({className:e="",href:t,target:l,onClick:n,data:a,children:i})=>{const r=me()({href:t,target:l,onClick:n});return o(t?"a":"div",{className:p("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),is=[{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"}}],rs=d((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=n(),m=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>is.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=qe(n)?n:r,c=l?{text:a}:{text:""};return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:"color"},version:e?.version??i}})),h=p("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",ss(a));return c("div",{className:p("flex flex-col gap-m xl:gap-xs",e),children:[o("div",{className:"flex gap-xs",children:Ge(m,{className:os(s??!1,a??!1,l),buttonClassName:h})}),r?o(je,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),ss=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",os=(e,t,l=!1)=>p(e||t?"basis-full":"",!t||l&&e?"":"flex-nowrap"),cs=d((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:d=[],target:m,title:h,align:u="text-left",benefits:g,imageOptions:{directionRight:f=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},...v})=>o(x,{className:p("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...v,children:o(as,{href:a,target:m,className:"h-full",children:c(Ne,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(T,{title:h,description:l,headlineVersion:"XS",isEmbedded:!0,align:u}),...ot(qe(i)?o(le,{image:i}):null,f),buttons:d.length?o(rs,{media:d,stretched:!0,showButtonText:!0,version:v?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Ke,{benefits:g}),o(et,{items:r,isDotted:s,listItemSize:"S"}),ds(n,u)]})})}))),ds=(e,t)=>e?o(S,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,ms=(e,t)=>{const{title:l,description:n,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[l?o("div",{className:"opacity-80",children:o(je,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?o("div",{className:"mt-2xs",children:o(je,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?o("div",{className:"text-primary-main",children:Ge(a)}):null]},String(t))},hs=d((({className:e="",title:t,align:l="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:u,...g})=>{const f=d.map(ms),[b,y]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[v,w]=n(!1);return a((()=>h.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&w(e.isUnfolded)}))),[m?.parent]),c(x,{className:p("flex flex-col",e),defaultPadding:"p-2xl",...g,children:[qe(i)?o("div",{className:"self-center",children:o(le,{image:i})}):null,t?o(k,{className:p("pt-xs",l),headingType:"h5",title:t}):null,r?.text?o(fe,{className:"w-full mt-m mb-lg",...r}):null,y.length?o(Xa,{renderFoldableSection:()=>c("div",{children:[b,o(Ja,{isUnfolded:v,children:y})]}),renderFoldButton:d.length>1?us(v,m?.parent,u):null}):o("div",{children:b})]})})),us=(e,t,l)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==t&&h.fire("fold",{type:"fold",isUnfolded:!e,parent:t})},type:"button",...e?he(l):{},children:[o("div",{children:e?"Скрыть":"Подробнее о тарифе"}),o(H,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),ps=(e=!1)=>e?"text-white":"",gs=(e=!1)=>"text-s mb-m "+(e?"text-white":"text-secondary-text/80"),xs=d((({icon:e,image:t,title:l,subtitle:n,isFillGradient:a})=>c("th",{className:"space-y-4 flex flex-col items-start",children:[e?o(le,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}):null,t?.src&&o("div",{children:o(le,{image:t})}),l?o(k,{headingType:"h4",className:ps(a),title:l}):null,n?o("div",{className:gs(a),children:n}):null]}))),fs=d((({cell:e,rowHeader:t,isFillGradient:l=!1})=>o("div",{className:"box-border flex flex-col",role:"cell",children:o("div",{className:p("h-full","border-main-divider border-b"),children:e?e.map(vs(l,t)):null})}))),bs=(e=!1)=>""+(e?"text-white/80":"text-secondary-text"),ys=(e=!1)=>""+(e?"text-white":""),vs=(e,t)=>({label:l,description:n},a)=>c("div",{className:"flex justify-between text-s py-s",children:[o(S,{size:"text-s",color:bs(e),children:t}),c("div",{className:"basis-1/2",children:[l?o("div",{className:"text-right",children:o(S,{size:"text-s",align:"text-right",color:ys(e),children:l})}):null,n?o("div",{className:"text-right",children:o(S,{size:"text-s",color:bs(e),children:n})}):null]})]},String(a)),ws=d((({header:e,columnData:t,visibleRowLength:l=0,isFillGradient:n,showRow:a,onToggleColumn:i})=>{const r=t?.slice(0,a?t.length:l),s=n?"secondary":"primary";return o("tr",{className:"mb-m",children:c("td",{className:p("border border-gray rounded-md p-m",n?"bg-gradient-to-r from-main-gradient-start to-main-gradient-end":""),children:[o(xs,{...e,isFillGradient:n}),r?.length?r.map((({rowHeader:e,cell:t},l)=>o(fs,{cell:t,rowHeader:e,isFillGradient:n},String(l)))):null,a&&e?.link?o(fe,{href:e.link.href,target:e.link?.target,version:s,ariaLabel:"Подробнее",className:"text-s font-medium mt-m p-s",children:e.link.text}):null,Ns({onToggleColumn:i,isFillGradient:n,showRow:a})]})})})),Ns=({onToggleColumn:e,isFillGradient:t,showRow:l})=>o("td",{className:"pt-lg",children:o("a",{role:"link",onClick:e,className:"cursor-pointer "+(t?"text-white/80":"text-primary-main"),children:o(je,{size:"text-s",font:"font-medium",children:l?"Скрыть":"Показать описание"})})}),ks=d((e=>{const{className:t,title:l}=e;return c("section",{className:`bg-white font-sans p-6xl overflow-hidden text-primary-text relative space-y-lg ${t||""}`,children:[l?o(k,{headingType:"h3",className:"font-medium text-center",title:l}):null,o("table",{className:"border-separate",children:o(Ss,{...e})})]})})),Ss=d((({columns:e=[],rowHeaders:t,isColoredFirstColumn:l,visibleRowLength:a,orientation:r,...s})=>{const[c,d]=n(Array.from({length:e.length}).fill(!a)),m=i((e=>{const t=(t,l)=>l===e?!t:t;d((e=>e.map(t)))}),[]),h=i((()=>d((e=>Array.from({length:e.length}).fill(!1)))),[]),u=e?.map((({data:e,header:n},i)=>{return o(ws,{visibleRowLength:a,showRow:c[i],header:n,columnData:(r=e,r?.map(((e,l)=>({cell:e,rowHeader:t?.[l]?.title})))),isFillGradient:0===i&&l,onToggleColumn:()=>m(i),...s},String(i));var r}));return o("tbody","horizontal"===r?{children:o(Wa,{onVisibleIndicesChange:h,children:u})}:{children:u})})),Cs=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Ts=(e,t)=>Array.from({length:t-e+1},((t,l)=>e+l)),Is=1e9,Bs={sum:{min:1e4,max:Is},period:3},Ms=St((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=hi(Bs,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Rs(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),u=Ps(h);return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(ii,{filtrationSchema:t,resetButton:l,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(_r,{label:n?.title,min:500,max:Is,...d("sum",{parse:e=>({min:Number(e),max:Is}),format:({min:e})=>String(e)})}),o(Bn,{title:a?.title,items:["От 3 мес","До 5 лет"],list:u,...d("period")})]})}),o(ti,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Rs=e=>yt((e?.paramsSource?.rateRows||[]).filter(Cs).flatMap((e=>Ts(e.minMonths,e.maxMonths)))),Ps=e=>yt(e.flatMap((e=>e||[])).filter(Cs).flatMap((e=>Ts(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Vs=e=>"Image"===e?.contentType&&e?.image?o(le,{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,zs=d((({className:e="",title:t,description:l,error:n,button:a,...i})=>c(x,{className:p("flex flex-col justify-center items-center",e),defaultPadding:p("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:Vs(n)}),o(T,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(fe,{version:a?.version,text:a?.text,...a}):null]}))),Ds="location";function As(e="Москва"){const[t,l]=((e,t,l)=>{const[r,s]=n(l||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((l=>e.fire(t,l)),[e,t])]})(h,"location",_s()??{name:e}),r=i((e=>{Es(e),l(e)}),[]),{data:s}=xn(js()?null:"/api/v1/region",bt);return a((()=>{s&&!js()&&l(s)}),[s]),[t??{name:e},r]}const js=()=>Boolean(globalThis.localStorage?.getItem(Ds)),_s=()=>{try{const e=globalThis.localStorage?.getItem(Ds);return e&&JSON.parse(e)}catch(e){return null}},Es=e=>{try{globalThis.localStorage?.setItem(Ds,JSON.stringify(e))}catch(e){}};var $s;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}($s||($s={}));const Os=new Intl.NumberFormat("ru",{style:"currency",currency:$s.RUB}),Ls=e=>e?Os.format(e):"",Fs="text-m font-light text-secondary-text ",Us=`${Fs} text-left`,Ws=`${Fs} pl-5xl text-center`,Hs=`${Fs} pl-5xl text-right`,Ks={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},qs=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:p("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Us,children:o(je,{size:"text-m",children:"Валюта"})}),o("th",{className:Ws,children:o(je,{size:"text-m",children:"Купить"})}),o("th",{className:Hs,children:o(je,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(Gs)})]}))),Gs=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(le,{image:{icon:Ks[t]},width:"24",height:"24"}):null,o(je,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(je,{size:"text-h6",children:Ls(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(je,{size:"text-h6",children:Ls(e?.buyExchangeRate)})})]},t)},Ys={icon:"GpsIcon"},Xs=d((({className:e="",address:t})=>c("div",{className:p("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(bi,{...Ys,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(S,{size:"text-l",color:"text-primary-main",children:t}):null,o(S,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),Js=(e,t,l)=>{const n=Number(Zs(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Zs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Qs=e=>Ot([[e=>e.value!==$s.RUB&&e.oppositeValue!==$s.RUB,()=>e.handleConvert(e.value,$s.RUB)],[e=>e.value===$s.RUB&&e.oppositeValue===$s.RUB,()=>e.handleConvert(e.value,$s.USD)],[e=>e.value===$s.RUB&&e.oppositeValue===$s.RUB,()=>e.handleConvert(e.value,$s.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function eo(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:n,text:n};return c("div",{className:"relative flex",children:[o(pl,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(Nl,{isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const to=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||$s.RUB,selectBuy:l?.[0]?.currency?.currency||$s.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[eo({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:lo(r,d,l),value:r.inputSell,setValue:e=>ao(d,l)(e,r.selectSell,r.selectBuy)}),eo({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:no(r,d,t),value:r.inputBuy,setValue:e=>io(d,t)(e,r.selectBuy,r.selectSell)}),a?.text?o(fe,{text:a.text,version:a?.version,...a}):null]})})),lo=(e,t,l)=>n=>{t({selectSell:n}),Qs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{ao(t,l)(e.inputSell,n,a)}})},no=(e,t,l)=>n=>{t({selectBuy:n}),Qs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>io(t,l)(e.inputBuy,n,a)})},ao=(e,t)=>(l,n,a)=>{e({inputSell:Zs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputBuy:String(Js(l,i,n===$s.RUB)||"")})},io=(e,t)=>(l,n,a)=>{e({inputBuy:Zs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputSell:String(Js(l,i,n===$s.RUB)||"")})};const ro=d((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=As(),i=function(e){const t=e?.code||"000",{data:l}=xn(`/api/v1/exchangerates?regionCode=${t}`,bt);return l||{}}(a),r=so(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:$s.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:$s.RUB}}),o(x,{className:p("box-border min-h-80",e),...n,children:o(Ne,{className:"h-full",title:o(k,{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(qs,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(Xs,{address:i?.address})]}),r.length&&s.length&&d.length?o(to,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:l}):null]})})})})),so=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],oo=d((({className:e="",items:t})=>{const l=me();return o("ul",{className:p("flex flex-col gap-s w-full",e),children:t?.map(co(l))})})),co=e=>({dataFooter:t,...l},n)=>{const{text:a,href:i,target:r,onClick:s}=e(l);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,...he(t),children:a||null})},String(n)):null},mo=(e,t)=>o(bi,{...e,iconBgVersion:t,className:"shrink-0"}),ho=d((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>o(qa,{tag:"button",className:p("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[mo(a,t),e?o(je,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?o(H,{name:l,iconVersion:"black",width:"24",height:"24"}):null}))),uo=St((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>o(x,{className:p("w-full","",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(Xa,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ja,{className:p("gap-lg","flex flex-wrap group-last:last:pb-0"),isUnfolded:e,children:V({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>po({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})),{childrenTypes:{exclude:["RollupItem"]}}),po=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=((e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon")(a);return"accordion"===e?o(ho,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):o(Ga,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},go=d((({topItems:e})=>o("div",{className:"w-full",role:"menu",children:xo(e)}))),xo=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(uo,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(oo,{items:e.items}):null},String(t)))),fo=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:p("space-y-m",e),children:t.map(bo)}):null)),bo=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(je,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(yo)})]},String(t)),yo=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:vo(e.type,e.text)}),o(S,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),vo=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${wo(t)}`,children:o(je,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(S,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},wo=e=>e.replaceAll(/\D/g,""),No=d((({className:e="",index:t,text:l,...n})=>{const a=me(),{href:i,target:r,onClick:s}=a(n);return o("a",{className:p("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),ko=d((({className:e="",title:t,links:l})=>o("div",{className:e,children:l?.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(je,{size:"text-l",font:"font-normal",children:t})}),l.map(((e,t)=>o(No,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),So=d((({className:e="",index:t,...l})=>{const n=me(),{href:a,target:i,text:r,onClick:s}=n(l);return o("a",{className:p("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}`})})),Co=d((({className:e="",links:t,license:l})=>c("div",{className:p("@container space-y-lg",e),children:[l?o("div",{children:o(je,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${l}`})}):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(So,{index:t,...e},String(t))))}):null]}))),To="w-full lg:w-52",Io=St((({className:e,footer:t,...l})=>{const n=l.options?.page?.sitemap??{},{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:u=[]}=t??{};return c(x,{tag:"footer",className:p("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...l,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(go,{...n}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:p(To,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(fo,{items:r}),m?o(fe,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(rs,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),u.map(((e,t)=>o(fe,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(ko,{title:d,links:i}),o(Co,{links:a,license:h})]})})),Bo=(e,t)=>e?.map((({aspectName:e,params:l})=>({aspectName:e,params:"mindboxEvent"===e?{...l,eventJson:t}:l}))),Mo=St((({className:e,title:t,button:l,regionSource:a,data:i,...r})=>{const[s,d]=n({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:l?.version||"primary"}),u=m?.find((e=>e.name===s.key))?.href,g=l?.text?l.text:"Перейти";return o(x,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(k,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(Yl,{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(fe,{href:u,target:"_blank",className:p("p-m w-full @xl:w-auto",h),data:Bo(i,s?.key),children:g})}):null]})})})),Ro={width:"34",height:"34"},Po={"bg-white":"color",transparent:"white"},Vo={"bg-white":"text-primary-main",transparent:"text-white"},zo=(e,t,l)=>o(le,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Po[e]},className:Vo[e],width:l?.width,height:l?.height}),Do={"bg-white":"text-primary-text",transparent:"text-white"},Ao=d((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:p("inline-flex items-center font-sans no-underline",e),href:l?.href??t,target:a?"_blank":"_self","aria-label":l?.title??"Россельхозбанк",...he(s),children:[zo(i,l?.image,Ro),r?n??o("div",{className:"ml-s",children:o(je,{font:"font-medium",color:Do[i],size:"text-s",children:l?.title??"Россельхозбанк"})}):null]}))),jo={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},_o=d((({version:e,...t})=>{const l=t?.mobileText;return l?o(fe,{className:p("py-s font-light whitespace-nowrap",jo["transparent"===e?"transparent":"default"]),...t,children:l}):null})),Eo=d((({bgColor:e,logo:t,alwaysShowLogo:l,internetBankButton:n,version:a,backwardButton:r})=>{const s=u(),d="/"===s.pathname,{dataFooter:m,dataHeader:h,...p}=t??{},g=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[l||d?o("div",{children:o(Ao,{className:"my-2xs",bgColor:e,logo:p,data:h})}):$o(g,r),o(_o,{version:a,...n})]})})),$o=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":t,children:[o(H,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,Oo={"bg-white":"primary",transparent:"transparent"},Lo=St((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:l=Oo[e],portal:n,logo:a={},...i})=>{const{logo:r={},backwardButton:s}=i.options?.page?.sitemap??{},{internetBankButton:c}=n||{},d=a.image?.icon||a.image?.src?a:r;return o(x,{tag:"header",defaultPadding:"",version:l,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Eo,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:l,backwardButton:s,...i})})})})),Fo=(e=!1)=>e?{}:{padding:"p-0"},Uo={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Wo=St((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=u();return o(x,{className:p("relative flex flex-col",Uo[l],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:V({...c,extraProps:{className:p("w-full",ba(r)),...Fo(n)}})})}),{childrenTypes:[]}),Ho=St((e=>o(Wo,{...e})),{childrenTypes:[]}),Ko=d((e=>{const{className:t,align:l,image:n,...a}=e,i=l?p("flex",ki[l]):"";return o(x,{className:p(i,t),defaultPadding:"p-0",...a,children:o(le,{image:n})})})),qo=["байт","Кб","Мб","Гб","Тб","Пб"],Go=d((({icon:e,text:t,href:l,target:n,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:l,target:n,...he(i),children:[e,t?c(je,{size:"text-l",font:"font-light",children:[t," ",Yo(d,m),o(je,{color:"text-secondary-text",children:l&&`${d+s+m}`})]}):null]})})),Yo=(e,t)=>e||t?o("span",{children:", "}):"",Xo=(e,t)=>(l,n)=>{const a=U(e)("Attachment"===l?.docType?l?.attachment?.src:l?.href),i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${qo[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"===l?.docType?Zo(a):l?.fileFormat;return c("div",{role:"listitem",children:[o(Go,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:Jo(t),data:l?.data}),o(De,{__html:l?.__html})]},String(n))},Jo=e=>e?o(le,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,Zo=e=>{if(!e)return"";const t=e.lastIndexOf("."),l=new RegExp(/\/(.*)/),n=-1!==t?e.substring(t+1):"";return n.includes("/")?n.replace(l,""):n},Qo=d((({href:e,__html:t,target:l})=>{const{close:n}=ce(),a=u(),r=U(a)(e),s=i((()=>{n()}),[]);return c(el,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(De,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(fe,{text:"Я согласен",version:"primary",target:l,href:r,onClick:s}),o(Zt,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),ec=d((({text:e,href:t,target:l,__html:n})=>{if(!e&&!n)return null;const a=(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(Qo,{...e}),l),close:l}})({__html:n,href:t,target:l}),r=i((()=>a.open()),[a]);return o("button",{className:"text-primary-main",onClick:r,children:e})})),tc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},lc=St((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=u();return c(x,{className:p("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(T,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:p("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",tc[r]),role:"list",children:a.map(nc(d,i))}):null]})})),nc=(e,t)=>(l,n)=>{const a=l?.docType;return""===a?null:"reportSource"in l&&l?.reportSource?.__html?ac(l,n):Xo(e,t)(l,n)},ac=({text:e,reportSource:t,href:l,target:n,__html:a},i)=>t?.__html&&e?c("div",{role:"listitem",children:[o(ec,{text:e,href:l,target:n,__html:t?.__html}),o(De,{__html:a})]},String(i)):null,ic=St((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:u="primary",...g})=>{const f="secondary"===u?"p-m min-w-32":"min-w-24",b=i?.src?o(le,{className:"hidden lg:block",image:i}):null;return o(x,{className:p("min-h-80",e),padding:"p-0",version:u,...g,children:c(Ne,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(k,{headingType:s,title:h,className:p("whitespace-pre-wrap",l)}),rightImage:b,buttons:Ge(n,{className:"flex-wrap"}),children:[a?o(je,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:p("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[o(et,{items:r,listItemSize:"M"}),o(je,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:p("flex justify-center bg-white rounded-md @xl:-order-1",f),children:o(le,{className:"w-fit",image:d})}):null,i?.src?o(le,{className:"lg:hidden",image:i}):null]})]})})})),rc=(e,t)=>e&&"underlined"!==t?"primary":"secondary",sc=(e=[],t={})=>e.filter((({content:e={}})=>di(t,e))).length,oc=(e,t)=>e===t;const cc=(dc=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(oc,((e=oc)=>(t,l)=>t===l||Boolean(t&&l&&t.length===l.length&&t.every(((t,n)=>e(t,l[n])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,l])=>dc(l,t[e])))));var dc;const mc=[],hc={},uc={primary:"bg-white/30",secondary:"bg-main-divider"},pc={primary:"text-white",secondary:"text-secondary-text"},gc=d((({count:e,version:t="secondary"})=>o("div",{className:p("w-6 h-6 rounded-full flex items-center justify-center",uc[t]),role:"status",children:o(je,{size:"text-xs",color:pc[t],children:e})}))),xc=({text:e,description:t,icon:l,isActive:n,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"}))(n);return c("div",{className:p("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,role:"tab",children:[l?o(le,{className:p("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...l,iconVersion:l?.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})]})]})},fc={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},bc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},yc={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},vc={default:"sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},wc=d((({tag:e="div",item:t={},isActive:l=!1,type:n="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,...h}=t;return o(i,{className:p("h-12","block flex-1","cursor-pointer",fc[n],l?vc[n]:yc[n]),role:"tablist",onClick:a,...h,children:c("div",{className:p("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?bc[n]:"text-secondary-text hover:text-primary-main"),children:[xc({text:r,description:s,icon:d,isActive:l,type:n}),Number.isInteger(m)?o("div",{className:"ml-xs",children:o(gc,{count:m,version:rc(l,n)})}):null]})})})),Nc=d((e=>o(e?.item?.href?kc:Sc,{...e}))),kc=d((e=>{const t=me(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return o(wc,{...e,tag:"a",item:a,onClick:n})})),Sc=d((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return o(wc,{item:e,onClick:n,...l})})),Cc=(e,t,l)=>(n,a)=>o(Nc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Tc=d((({className:e,tabsType:t="default",items:l=[],activeItem:n,onChange:a})=>o("div",{className:p("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel",children:l.map(Cc(n,a,t))}))),Ic={categories:[],extraOptions:[],propertyType:[],stage:[]},Bc=St((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:u}]=hi(Ic,{block:a.block,page:a.options?.page}),g=i(((e=Ic)=>u(e)),[]),f=(({hotFilters:e=mc,filtrationState:t=hc,blocks:l=mc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>cc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:sc(l,t.filter),version:rc(t===e[a])})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:g});return c(x,{className:p("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Tc,{...f}),o(ii,{filtrationSchema:l,resetButton:n,field:m,reset:h}),o(ti,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Mc=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Rc=d((({children:e})=>Mc?e:null)),Pc="/icons/MapMarkerClusterIcon.svg",Vc="/icons/MapMarkerClusterYellowIcon.svg";function zc({yandexMaps:e,map:t,points:l}){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=Dc("offices",e,n);if(l.length&&l.every((e=>"type"in e))){const i=Dc("workplaces",e,n),r=Ac(l.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Ac(l.filter((e=>"offices"===e.type)),"offices",e);a.add(s),i.add(r),t.geoObjects.add(i),t.geoObjects.add(a)}else{const n=Ac(l,"offices",e);a.add(n),t.geoObjects.add(a)}t.setBounds(e.util.bounds.fromPoints(l.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Dc=(e,t,l)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Pc:Vc,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:l,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Ac=(e,t,l)=>e.map((({coords:e,content:n})=>new l.Placemark(e,{balloonContentHeader:n?.header,balloonContentBody:n?.body,balloonContentFooter:n?.footer,hintContent:n?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Pc:Vc,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),jc={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},_c={...jc,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Ec=(e,t,l)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(_c).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(H,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),$c=e=>globalThis[e];function Oc(e,t,l=!0){const[i,r]=n(void 0);return a((()=>{let n=!0;return((e,t)=>{const l=document.getElementById(t);if(l){const t=$c(e);return t?Promise.resolve(t):new Promise((t=>{l.addEventListener("load",(()=>{t($c(e))}))}))}return new Promise(((l,n)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{l($c(e))})),a.addEventListener("error",(e=>{n(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{n&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(n=!1,l){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,l]),i}const Lc={...jc,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Fc=d((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Lc).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(H,{name:l,width:"20",height:"16"})})})),Uc=[55.753995,37.614069],Wc=d((({points:e,className:t="",zoom:l=5})=>{const n=s(null),i=Oc("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${D.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{n?.current?i&&(zc({yandexMaps:i,map:n.current,points:e}),e?.length||n.current.setCenter(Uc)):i?.ready((()=>{n.current||(n.current=new i.Map("map",{center:e?Hc(e):Uc,zoom:l,controls:[],suppressMapOpenBlock:!0}),zc({yandexMaps:i,map:n.current,points:e}))}))}),[i,e,l]),!i)return null;const r="z-10";return c("div",{id:"map",className:p("relative","w-full",t),children:[c("div",{className:p("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",r),children:[o(Fc,{yandexMaps:n}),o(Fc,{yandexMaps:n,direction:"out"})]}),Ec(n,i,p("right-2 top-80",r))]})})),Hc=e=>[qc(Kc(e,0)),qc(Kc(e,1))],Kc=(e,t)=>e.map((e=>e.coords[t])),qc=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,Gc=({__html:e,list:t})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(De,{__html:e})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(le,{image:e.image}):null,e?.text?o(je,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Yc={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},Xc="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",Jc=(e,{field:t,reset:l},n)=>{const a=n?5:6,i=(e||[]).map((e=>o(sl,{text:Yc[e],...t(e)},e))),[r,s]=a>0?[i.slice(0,a),i.slice(a)]:[i,[]];return o("div",{children:e?.length?o("div",{children:o(Xa,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:Xc,children:r}),o(Ja,{className:Xc,isUnfolded:e,children:s})]}),renderFoldButton:Zc(l,n)})}):null})},Zc=(e,t)=>({isUnfolded:l,onToggle:n})=>c("div",{className:"flex space-x-lg",children:[t?o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(H,{name:["ArrowDownIcon","ArrowUpIcon"][Number(l)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(l)],onClick:n}):null,o(fe,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,text:"Очистить фильтр",appendRight:o(H,{name:"CloseIcon",width:"16",height:"16"})})]}),Qc=()=>{},ed=()=>[],td=e=>"all"===e?"block":"hidden",ld=d((({className:e,data:t=[],remoteWorkplaces:l=[],renderCard:a=Qc,renderRemoteWorkplaceCard:i=Qc,filterItems:s=ed,getBalloon:d=Qc,getBalloonRemoteWorkplaces:m=Qc,initFilterState:h={},descriptionData:u,title:g})=>{const x=g?.includes("Офис"),[f,{field:b,reset:y}]=qt(h),[v,w,N,S]=r((()=>{const e=s(t,f),n=s(l,f),a=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,a,n,e.length+n?.length]}),[t,l,f]),[C,T]=n("all");return c("div",{className:p("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-6xl pb-0",children:[o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(k,{headingType:"h2",children:[o("span",{suppressHydrationWarning:!0,children:g}),S?o(je,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${S})`})}):null]})}),u?Gc(u):null,x&&nd(t,C,T),o("div",{className:p("pb-2xl",td(C)),children:Jc(Object.keys(h),{field:b,reset:y},x)})]}),o("div",{className:"h-[600px]",children:o(Rc,{children:o(Wc,{points:w,className:"h-full"})})})]}),c(Rc,{children:[v.map(a),N.map(i)]})]})})),nd=(e,t,l)=>{const n=rc("all"===t),a=rc("business"===t),i=(e,t,n)=>(e.currentTarget===e.target&&"business"===t&&n.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription)),l(t),n);return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(Zt,{"data-id":"all",onClick:t=>i(t,"all",e),version:n,children:"Для физических лиц"}),o(Zt,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},ad={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"}},id=d((({className:e,children:t,color:l="gray"})=>c("div",{className:p("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",ad[l].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(le,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(je,{size:"text-m",color:ad[l].text,children:t})]}))),rd=d((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:sd({textItems:a,subText:t,children:l,...n})})),sd=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>c("div",{className:p("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(je,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>o(je,{size:"text-l",children:e.trim()},String(t)))),a?o(je,{color:n,size:"text-m",children:a}):null]}),od=d((({className:e,children:t})=>o("div",{className:p("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}))),cd=["ArrowDownIcon","ArrowUpIcon"],dd=["Подробнее","Скрыть"],md=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:dd[Number(e)]}),o(H,{className:"text-primary-text",name:cd[Number(e)],width:"16",height:"16"})]}),hd=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:gd(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(je,{size:"text-h4",children:gd(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(id,{color:"green",children:gd(s)})})]}),o("div",{className:"hidden sm:block",children:o(od,{className:"flex-wrap",children:m?.map(pd)})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:o(od,{className:"flex-wrap",children:m?.map(pd)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>md({isUnfolded:e,onToggle:t})})]},String(d))},ud=({address:e="",terminalType:t,atmCode:l=""})=>({header:`${gd(t)} №${l}`,body:e.toUpperCase()}),pd=(e,t)=>o(rd,{...e},String(t)),gd=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",xd=[];const fd=async e=>{const t=await ft(e,{method:"GET"});return Array.isArray(t)?t:xd},bd={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},yd={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)},vd=d((({data:e,className:t})=>{const[l]=As(),n=function(e){const{data:t=xd}=xn(`/api/v1/atms?regionCode=${e}`,fd);return t}(l?.code??"000");return o(ld,{className:t,filterItems:wd,data:n,initFilterState:bd,renderCard:hd,getBalloon:ud,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),wd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e])),n=l.filter((e=>e.startsWith("terminalType"))),a=l.filter((e=>!n.includes(e)));return e.filter((e=>{const t=a.every((t=>yd[t](e))),l=!n.length||n.some((t=>yd[t](e)));return t&&l}))},Nd=e=>{const t=Sd(e);return o(rd,{label:"Режим работы",value:t,className:"max-w-none"})},kd=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Sd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[kd({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),kd({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean)},Cd=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Td=e=>Cd.map((([t,l,n])=>({key:t,title:n,short:l,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Id=e=>{if(!e)return null;const t=Bd(e);return c(od,{className:"border-none",children:[o(rd,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Md)})}),o(rd,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]})},Bd=e=>{const t=Cd.map((([,e])=>({short:e,status:!0}))),l=e.split("/")??[],n=l[l.length-1]?.toLowerCase();return n?.includes("выходной")?t.map((e=>({...e,status:!n?.includes(e.short.toLowerCase())}))):t},Md=({short:e,status:t},l)=>o("div",{className:p("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(je,{size:"text-xs",children:e})},String(l)),Rd=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(rd,{label:"Валюта",value:e.currency}):null,t?o(rd,{label:"Купить",value:String(t)}):null,l?o(rd,{label:"Продать",value:String(l)}):null]},String(n)),Pd=(new Date).getDay(),Vd=e=>{const[t]=e?.slice(Pd-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(id,{color:"green",children:a}):null,l&&i?o(id,{color:"yellow",children:`перерыв: ${l}`}):null]}):o(id,{color:"red",children:"Выходной"})},zd=({lunchHour:e,hasLunch:t=!1,status:l=!1})=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Dd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>o(rd,{label:e,value:t&&l?l:"",subText:zd({lunchHour:n,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Ad=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,jd=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,_d=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,Ed=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},h)=>{if(!d)return null;const u=Td(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(je,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:t})]}):null]}),Vd(u)]}),o("div",{className:"hidden sm:block",children:$d({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:$d({phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>md({isUnfolded:e,onToggle:t})})]},String(h))},$d=({phone:e,fax:t,phoneBusiness:l,phoneNatural:n,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Td(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(od,{className:"flex-wrap",children:[o(rd,{label:"Факс",value:t}),o(rd,{label:"Телефон филиала",value:e}),o(rd,{label:"Для обращений юридических лиц",value:l}),o(rd,{label:"Обслуживание физических лиц",value:n}),o(rd,{label:"Для консультаций по валютному контролю",value:i}),o(rd,{label:"Контакт-центр",value:a})]}),r?.isMatchesPattern?o(od,{children:o(rd,{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(Dd)})})}):c(od,{children:[o(rd,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Md)})}),Nd(d)]}),r?.businessScheduleVisibleTag?Id(r?.businessScheduleDescription):null,s?.currencies?.length?o(od,{className:"flex-wrap",children:s?.currencies?.map(Rd)}):null]})},Od=({name:e="",address:t="",workSchedule:l})=>{const n=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Td(e),l=e?Sd(t):"",n=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Ad(l):_d(l,n):jd(l):null})(l)}`;return{header:n,body:i}},Ld=({address:e,workScheduleDescription:t},l)=>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(je,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(H,{name:"GeolocationIcon",width:"24",height:"24"}),o(je,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:Fd({workScheduleDescription:t})}),o(Xa,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ja,{isUnfolded:e,children:Fd({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>md({isUnfolded:e,onToggle:t})})]},String(l)):null,Fd=({workScheduleDescription:e})=>c("div",{children:[c(od,{className:"flex",children:[o(rd,{label:"Операции для физических лиц",children:o(je,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(rd,{label:"Операции для физических лиц",children:o(je,{children:"Оформление и обслуживание банковских карт"})}),o(rd,{label:"Операции для физических лиц",children:o(je,{children:"Инвестиционное и накопительное страхование"})}),o(rd,{label:"Операции для физических лиц",children:o(je,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(rd,{label:"Режим работы",className:"max-w-none",children:o(je,{children:e})})]}),Ud=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),Wd={branches:[],remoteWorkplaces:[]};const Hd=async e=>await ft(e,{method:"GET"})||Wd,Kd={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},qd={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)},Gd=d((({className:e})=>{const[t]=As(),l=function(e){const{data:t=Wd}=xn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,Hd);return t}(t?.code??"000");return o(ld,{className:e,filterItems:Yd,data:l?.branches,remoteWorkplaces:l?.remoteWorkplaces,initFilterState:Kd,renderCard:Ed,renderRemoteWorkplaceCard:Ld,getBalloon:Od,getBalloonRemoteWorkplaces:Ud,title:`Офисы филиала ${t?.name}`})})),Yd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>qd[t](e)))))},Xd=d((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return o(x,{version:"transparent",className:p(t),defaultPadding:"p-0",...l,children:"offices"===n?o(Gd,{}):o(vd,{data:e})})})),Jd=d((({className:e,title:t,description:l="Блок в разработке...",...n})=>c(x,{className:p("box-border",e),...n,children:[o(T,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),Zd=d((({className:e,padding:t,slides:l=[],...n})=>o(x,{className:p("overflow-hidden relative",e),padding:t,...n,children:o(Wa,{gap:0,padding:0,children:l.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(st,{className:"px-5 h-full",headlineVersion:"L",...e,...n})},String(t))))})}))),Qd=d((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:d="primary",...m})=>c(x,{className:p("box-border text-left space-y-s",a),version:d,...m,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[qe(r)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(le,{image:r})}):null,s?o(k,{headingType:"h3",as:"h3",title:s}):null]}),c("div",{className:"w-full space-y-m",children:[i?em(i):null,tm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),tm({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),tm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?Ge([n]):null]})]}))),em=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(De,{__html:e})}),tm=({label:e,data:t,iconName:l,dataColor:n=""})=>t?c("div",{className:"flex gap-s",children:[o(H,{iconVersion:"black",name:l,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(je,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(je,{size:"text-xl",color:n,children:t})]})]}):null,lm=d((e=>{const{__html:t,richVersion:l="",...n}=e;return o(x,{defaultPadding:"p-0",...n,children:o(De,{__html:t,richVersion:l})})})),nm=d((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return c("div",{className:p("order-4",e),role:"radiogroup",children:[o(Zn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(Zn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),am=d((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),c=s.find((e=>e.key===n));return o(Nl,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:c})})),im=d((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(am,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(am,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),rm=["От 1 дня","До 365 дней"],sm=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(je,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(Bn,{min:1,max:365,value:e,items:rm,onChange:t})]}))),om=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(am,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(am,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),cm=d((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:h})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(im,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:dm(m)}),o(sm,{days:a,setDays:e=>m({days:e})}),o(om,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:mm(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(je,{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(nm,{}),o(fe,{text:"Офисы на карте",version:"primary",onClick:h,className:"order-6"})]})]}))),dm=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},mm=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},hm=d((({days:e,tariffs:t=[]})=>{const l=pm(e,t),n="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[um("Аренда за",e),um("Цена",l+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(S,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(le,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(S,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),um=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(je,{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})]}),pm=(e,t)=>{const l=gm(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},gm=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},xm=(e,t)=>e.find((e=>e.branchCode===t)),fm=d((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=xm(n,l.selectedBranch),d=bm(s?.safeBoxCaseVolumes),m=ym(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,h=vm(m,l.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(cm,{...l,regions:t,onClick:r,branches:n,caseVolumes:d,safeBoxCases:m,onChange:i}),o(hm,{days:l.days,tariffs:h})]})})),bm=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],ym=(e,t)=>e?.find((e=>e.volume===t)),vm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,wm=[];const Nm=async e=>await ft(e,{method:"GET"})||wm,km=d((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),d=i((()=>s((e=>!e))),[]),[m,h]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=Hn(),p=Sm(m.selectedRegion,u),g=function(e){const{data:t}=xn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Nm);return t||wm}(p),f=i((e=>h((t=>({...t,...e})))),[h]),b=(y=xm(g,m.selectedBranch)||g,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(x,{className:l,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(k,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(fm,{regions:u,branches:g,data:{...m,selectedRegion:p},onClick:d,onChange:f}),t?o(S,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(Wc,{points:b,className:"h-[640px]"}):null]})})),Sm=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function Cm(e){throw new Error(e)}const Tm={normal:{icon:"h-11 w-11",image:"h-14 w-14"},small:{icon:"h-12 w-12",image:"h-14 w-14"}},Im={normal:"",small:"min-h-6xl"},Bm={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"},Mm=d((({className:e="",title:t,description:l,steps:n,buttons:a,size:i="normal",stepVersion:r="gray",version:s="primary",...d})=>c(x,{className:p("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:s,...d,children:[o(T,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),n?.length?o("div",{className:"box-border",children:o("div",{className:"flex flex-col gap-6xl justify-between",children:n.map(Rm(i,r))})}):null,Ge(a,{isVertical:!0})]}))),Rm=(e,t)=>(l,n)=>{const{type:a}=l;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Pm(e,t)(l,n);case"rte":return o(De,{__html:l.__html});default:Cm(l)}},Pm=(e,t)=>(l,n)=>o("div",{className:"contents",children:c("div",{className:"flex flex-row items-center relative",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Vm(e,t)(l,n)}),c("div",{className:p("flex flex-col justify-center h-fit",Im[e]),children:[l.label?o(S,{size:"text-l",align:"text-left",children:l.label}):null,l.description?o("div",{className:p("text-s font-light text-left",Bm.description),children:l.description}):null]})]})},String(n)),Vm=(e,t)=>(l,n)=>{const a="secondary"===t?"white":"color",i=Boolean(l?.icon?.src),r=Tm[e][i?"image":"icon"],s=i?"transparent"===t:t;return o(x,{className:p(r,"z-10 mr-s flex justify-center content-center rounded-md"),defaultPadding:"",version:s,children:o("span",{className:"flex max-w-full max-h-full items-center justify-center",children:qe(l?.icon)?o(le,{image:{...l.icon,iconVersion:l.icon?.iconVersion||a},imageClassName:"max-w-full max-h-full",width:zm(e),height:zm(e)}):o("span",{className:p("text-h4","transparent"===t?Bm.iconText:(c=t,"secondary"===c?"group-data-primary:text-white":"text-secondary-text")),children:n+1})})});var c},zm=e=>"normal"===e?"38":"24",Dm=d((({isActive:e,item:t,onClick:l})=>c("div",{className:p(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:l,children:[o(H,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),Am=d((({className:e,head:t,children:l,onClose:n,onClick:a})=>{const{close:r}=ce(),s=i((()=>{r(),n&&n()}),[n]);return c("div",{onClick:a,className:p("relative min-h-full bg-white p-0 rounded-xl",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(Qt,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:l})]})})),jm=({menuRef:e,dialogRef:t,closeDialog:l,openDialog:n,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();n(o(Am,{onClick:e=>e.stopPropagation(),onClose:l,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center px-xl",children:o(k,{as:"h4",title:c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];const _m=({onCloseAll:e,onClose:t}={})=>{const[l,{push:r,pop:s,clear:o}]=function(e=[]){const[t,l]=n(e),a=i((e=>l((t=>[...t,e]))),[]),r=i((()=>l((e=>e.slice(0,-1)))),[]),s=i((e=>l((t=>t.filter((t=>t!==e))))),[]),o=i((()=>l([])),[]);return[t,{setList:l,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(l),o()}),[l,e]),d=i((()=>{t&&t(l[l.length-1]),s()}),[l,t]);return a((()=>h.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Cm(e)}}))),[c,d]),l},Em=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:n,s2Matches:a}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),n=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-l),o=Math.min(r+l,t.length-1);for(let l=s;l<=o;l++)n[r]||a[l]||e[r]!==t[l]||(i++,n[r]=!0,a[l]=!0)}return{m:i,s1Matches:n,s2Matches:a}}(e,t);if(0===l)return 0;const i=function(e,t,{s1Matches:l,s2Matches:n}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!l[i])continue;let s=r;for(;s<t.length;s++)if(n[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:n,s2Matches:a}),r=(l/e.length+l/t.length+(l-i/2)/l)/3,s=r>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return r+s*(1-r)};const $m=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(je,{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(Om,{...e},String(t))))})]}):null,Om=d((({icon:e,...t})=>{const l=me(),{text:n,target:a,href:i,onClick:r}=l(t);return c("div",{className:"flex gap-s items-center",children:[e?o(le,{image:e}):null,n?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(je,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Lm=(e,t)=>l=>l.name?o(as,{href:`/branches/${l.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(l),data:Bo(e,l.name),children:o(je,{size:"text-l",font:"font-light",children:l.name})},String(l.id)):null,Fm=d((({className:e,searchTerm:t,onSearch:l})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:p(ul,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Um=d((({foreignOffices:e,branches:t})=>{const[l,a]=As(t?.default),r=me(),{href:s}=r({href:`/branches/${l.slug}`}),[d,m]=n(""),h=Hm(Hn()).sort(((e,t)=>e.name.localeCompare(t.name))),u=((e,t)=>{const l=new Map;for(const n of e){const e=t(n),a=l.get(e)||[];l.set(e,[...a,n])}return l})(h,Wm),{close:p}=ce(),g=i((e=>{a(e),p()}),[]);return c(el,{className:"pb-20",head:c("div",{children:[o(je,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?o("div",{className:"mb-s",children:c(S,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(as,{href:s,className:"inline mx-2xs text-primary-main",children:l.name})]})}):null,o(Fm,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:h.filter((({name:e})=>e&&Em(e.toLowerCase())(d.toLowerCase())>=.8)).map(Lm(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(u.entries()).map((x=g,f=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(je,{size:"text-h6",children:e})}),t.map(Lm(f,x))]},e)))}),$m(e)]});var x,f})),Wm=e=>e.name?.charAt(0)||"",Hm=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Km=d((({menuRef:e,menuItem:t,locationDialogProps:l,closeAll:n})=>{const i=(e=>{const{open:t,close:l}=ce();return{open:(l={})=>t(o(Um,{...e}),l),close:l}})(l||{}),[{name:r}]=As(),s=e?.current?.getBoundingClientRect(),c=X(Y.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&n(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(Am,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center px-xl",children:o(k,{as:"h4",title:t?.title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),qm="burgerMenuDialog",Gm=({menuRef:e,centralMenuItem:t,closeAll:l,openDialog:n,locationDialogProps:a})=>{const i=_m(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(qm,i);return[r,{toggle:()=>{r?l():n(o(Km,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:l}),{id:qm})}}]},Ym=[],Xm=St((({sticky:e,...t})=>{const{menuItems:l=Ym}=e??{},a=l.find((e=>"Меню"===e.title)),r=l.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),h=r.slice(d),[u,p]=n(-1),[g,f]=n(""),{open:b,closeAll:y}=ce(),v=i((()=>{p(-1),f(""),y()}),[y]),w=bl(v),N=s(null),[k,{toggle:S}]=Gm({menuRef:N,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.options?.page?.sitemap}),[{openBottomMenuItemDialog:C}]=jm({menuRef:N,dialogRef:w,closeDialog:v,openDialog:b,leftItems:m,rightItems:h}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{f(t),p(e),y(),C(e,t)}),[y,C]);return o(x,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:N,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(Jm(I,"left",{activeIndex:u,currentItemPosition:g})),o(Dm,{item:a,isActive:k,onClick:e=>T(e)}),h.map(Jm(I,"right",{activeIndex:u,currentItemPosition:g}))]})})})),Jm=(e,t,l)=>(n,a,i)=>o(Dm,{item:n,isActive:i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t,onClick:r=>{i[l.activeIndex]?.title===n?.title&&l.currentItemPosition===t||r.stopPropagation(),e(a,t)}},n.title||String(a)),Zm="hidden sm:flex absolute z-40",Qm={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},eh=d((({className:e,items:t=[],activeItem:l,onChange:n,tabsType:i="default"})=>{const[r,s]=Ua({itemCount:t?.length||0});return a((()=>th(r.current,t,l)),[]),c("div",{className:p("relative overflow-x-auto no-scrollbar",e),children:[o(ka,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:Qm[i].item,gap:Qm[i].gap,children:t.map(Cc(l,n,i))}),s.canScrollLeft?o(Ra,{className:p("left-6",Zm,Qm[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Pa,{className:p("right-6",Zm,Qm[i].buttonTop),onClick:s.scrollRight}):null]})})),th=(e,t,l)=>{const n=t.findIndex((e=>e===l));e&&n>0&&e.scrollTo({left:e?.children[n]?.offsetLeft,behavior:"smooth"})},lh=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return o(Tc,{...t});case"scrollable":return o("div",{className:"flex",children:o(eh,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},nh="tab",ah=d((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...c})=>{const d=u(),{isReady:m}=d,g=r((()=>l.map(rh)),[l]),[f,b]=n(0);a((()=>{if(!l||!l[0])return;const e=d.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===d.query.tab))||0,t=l[e]||l[0];b(e),ih(t)}),[m]),a((()=>{const e=l[f];"group"===e?.type&&h.subject("tab",{type:e.type,label:e.ref,groupName:e.name})}),[l,f]);const y=i((e=>{const t=g.indexOf(e),n=l[t];b(t),ih(n),"group"===n.type&&(e=>{const t=new URLSearchParams(d.query);e.name?t.set(nh,e.name):t.delete(nh),d.replace(`${d.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,g]);return o(x,{className:p(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...c,children:lh({items:g,activeItem:g[f],tabsMode:s,onChange:y})})})),ih=e=>{"group"===e.type&&h.fire("tab",{type:e.type,label:e.ref,groupName:e.name}),"link"===e.type&&h.fire("tab",{type:e.type,label:e.href})},rh=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,sh={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},oh=({tabsType:e="animated",...t})=>e?o("div",{className:sh[e].wrapper,children:o(eh,{className:sh[e].component,tabsType:e,...t})}):null,ch=St((({className:e="",tabs:t=[],block:l,tabsType:r,showCounter:s=!1,...d})=>{const m=l?.__id?`tabs-${l.__id}`:"tabs",h=u(),g=s?t.map((e=>({...e,count:l?.slots?.[e?.text??""]?.length??0}))):t,{isReady:f}=h,[b,y]=n(mh(g,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(m))),v=g[b],w=g.findIndex((e=>Boolean(e.selected)));a((()=>{const e=h.query[m]?g.findIndex(((e,t)=>"group"===e.type&&String(t)===h.query[m])):w;y(-1===e?0:e)}),[f,w,m]);const N=dh(g[b],b),k=i((e=>{const t=g.indexOf(e),l=g[t];y(t),"group"===l.type&&((e,t)=>{const l=new URLSearchParams(h.query);e.text?l.set(m,String(t)):l.delete(m),h.replace(`${h.pathname}?${l}`,"",{scroll:!1})})(e,t)}),[g]);return c(x,{className:p(e),defaultPadding:"p-0",...d,children:[oh({items:g,activeItem:v,tabsType:r,onChange:k}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(l?.slots??{}).map((([e,t])=>P(t,{...d?.options,slotName:N,parent:l,extraProps:{className:e===N?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.filter((e=>"group"===e.type)).map(dh)||[],childrenTypes:{exclude:["TabsLayout"]}}),dh=(e,t)=>e?.text||`Слот №${t}`,mh=(e,t)=>t?Number(t):e.reduce(((e,t,l)=>t.selected?l:e),0),hh={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},uh=d((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:hh[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),ph=d((({className:e="",isOpen:t,onClick:l})=>o(fe,{className:e,appendRight:o(le,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),gh={Buttons:({buttons:e})=>Ge(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(le,{image:e}):null,List:({isDotted:e,...t})=>o(et,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(je,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(je,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?o(ph,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},xh=d((({cell:e,fieldIdx:t,rowIdx:l,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=n(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return fh({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),fh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in gh))return null;return o(gh[l],{...t,...n})},bh=d((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(xh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),yh=(e,t)=>140*Pe(e.slice(0,t).map((e=>e?.cols?.length??1))),vh=(e,t)=>e?.length>0?o("div",{className:p("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(je,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,wh=d((({rows:e})=>{return o(ka,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,l)=>{if(!e?.length)return null;const[n,...a]=e,i=p("flex duration-1000 text-center",0!==l?"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(je,{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(-${yh(a,t)}px)`},children:a?.map(((e,l)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(je,{size:"text-xl",children:e.data}):null,e?.cols?vh(e.cols,t):null]},`row${l}`)))})})]},String(l))}))})});var t})),Nh=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(je,{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(wh,{rows:t.rowsData})})})]},n)}))}))),kh=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Sh=d((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:p("rounded-md px-4 py-3 cursor-pointer",t===l?"bg-primary-main":""),onClick:()=>n(t),children:o(je,{size:"text-xl",font:"font-light",color:kh(t===l),children:e||t+1})},e)))}):null,t?o(fe,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(H,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function Ch(e){const t=await fetch(e);return await t.json()}const Th=d((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=xn(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Ch);return t||{}}(e),[r,s]=n(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],h=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Sh,{currencies:h,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Nh,{activeTabIndex:r,items:m}),o(ph,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(je,{size:"text-h6",children:"Данных нет"}),o(ph,{onClick:l,isOpen:!0})]})})),Ih=d((({children:e,tableInner:t,onHideContentClick:l})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:p("@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(Th,{...t,onClick:l})}):null]}))),Bh=d((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,d]=n(void 0),m=i((e=>d(e)),[]),[h,u]=n(void 0),g=i((e=>u(e)),[]);return c(Ih,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:p("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(le,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(je,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(uh,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(bh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Mh({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?c("div",{children:[l?o(Ma,{className:p("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?o(Ma,{className:p("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Rh=d((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return c("div",{role:"table",children:[c("div",{className:"relative space-y-xs",children:[e,Mh({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Ph=d((({className:e="",title:t,description:l,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),u=m.length,[g,f]=((e,t=0)=>{const{itemCount:l,visibleItemCount:a}=e,[r,s]=n(t),o=i((()=>s((e=>Math.min(e+1,l-1)))),[l]),c=i((()=>s((e=>Math.max(e-1,0)))),[l]),d=a?l>a&&r<l-a:r<l-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:u,visibleItemCount:2}),b=(h||[]).map(((e,t)=>o(Bh,{row:e,activeIndex:g,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(x,{className:p("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(T,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m",children:s>0?o(Xa,{renderFoldableSection:({isUnfolded:e})=>c(Rh,{controls:f,children:[y,o(Ja,{isUnfolded:e,children:v})]}),renderFoldButton:Ya}):o(Rh,{controls:f,children:b})})]})})),Vh=d((({className:e="",title:t,description:l,iconVersion:n,__html:a,...i})=>c(x,{className:p("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...i,children:["small"===n?zh():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(je,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?Dh(l):null,a?o(De,{__html:a}):null]})]}))),zh=()=>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"}),Dh=e=>o(S,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Ah=d((({prefix:e,unit:t,suffix:l})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(je,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,l?o("div",{className:"gradient-color-text",children:o(je,{size:"text-h2",children:l})}):null]}))),jh=d((e=>{const{prefix:t,unit:l,suffix:n,...a}=e;return o(x,{defaultPadding:"p-0",...a,children:o(Ah,{prefix:t,unit:l,suffix:n})})})),_h={AdTile:Tt,ApplicationForm:ma,BankAccountFiltration:gi,BenefitsBlock:yi,BonusBenefitsBlock:Ni,ButtonsBlock:Si,CalculatorBonus:Ei,CalculatorBusinessDeposit:lr,CalculatorCredit:xr,CalculatorDeposit:Tr,CalculatorRefinancing:zr,CardTransfer:Or,Carousel:Gr,CarouselCard:Jr,CarouselCatalogCard:Qr,CarouselLinks:ls,CarouselRecommendationCard:cs,CarouselTariffsCard:hs,ComparisonTable:ks,DepositFiltration:Ms,ErrorBlock:zs,ExchangeRateTile:ro,Footer:Io,GrantSupport:Mo,Header:Lo,Headline:T,HorizontalLayout:Ho,ImgBlock:Ko,LinkDocs:lc,MobileAppTile:ic,MortgageFiltration:Bc,OfficesAtmsMap:Xd,Placeholder:Jd,ProductBlock:Ct,ProductGallery:Zd,RepresentativeOfficeInfo:Qd,RichTextBlock:lm,RollupItem:uo,SafeDepositRental:km,StepsBlock:Mm,StickyBottomMenu:Xm,Tabs:ah,TabsLayout:ch,TariffsTable:Ph,TextBlock:Vh,UnitBlock:jh,VerticalLayout:Wo},Eh=de((()=>{a((()=>{_t()}),[]);const e=Ht();fl(globalThis,"click",(e=>t=>{const l=t.target?.closest("[data-aspects]");try{const n=JSON.parse(l?.dataset?.aspects??"[]");At({aspectsAttributes:n,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const $h="cookie",Oh=d((({__html:e})=>{const[t,{setTrue:l,setFalse:n}]=ml();!function(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem($h)||l()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem($h,"true"),n()}),[]);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-24 flex justify-end",children:o(Qt,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Lh=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=_m({onCloseAll:e,onClose:t}),{close:n}=ce(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return fl(globalThis.document,"keydown",r),a((()=>{l.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[l]),l.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>o("div",{className:p("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Fh=d((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>h.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Cm(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return fl(globalThis.document,"keydown",r),e?o("div",{className:p("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Uh="header",Wh="footer",Hh="sticky-footer",Kh={},qh=d((({className:e,data:t=Kh,blocksRegistry:l,blockDecorator:n})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=kt(s,r);Eh();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:l,blockDecorator:n,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:p("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:P(a?.header,{...m,slotName:Uh})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[V({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),P(a?.footer,{...m,slotName:Wh})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:P(a?.["sticky-footer"],{...m,slotName:Hh})}):null,o(Lh,{}),o(Fh,{}),o(Oh,{__html:d?.cookieContent?.__html})]})}));Object.assign(qh,{childrenTypes:[],slots:()=>[Uh,Wh,Hh]});e.Blocks=_h,e.ContentPage=qh,e.DaDataAPI=function(e=""){return{getFetcherAddress:async function(){if(!("geolocation"in navigator))return null;try{const t=await(async()=>new Promise((e=>navigator.geolocation.getCurrentPosition((({coords:t})=>e(t))))))(),l=await fetch(`${e}/geolocate`,{method:"POST",mode:"cors",body:JSON.stringify({lat:t.latitude,lon:t.longitude,count:1})});return(await l.json())?.suggestions?.[0]?.data?.city}catch(e){return console.error(e),null}}}},e.handlerDecorator=de,e.joinList=ni,e.packageVersion="0.14.430",e.projectSettings=D,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=O,e.useRouter=u,Object.defineProperty(e,"__esModule",{value:!0})}));