@redneckz/wildless-cms-uni-blocks 0.14.76 → 0.14.78

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 (134) hide show
  1. package/bin/migration-scripts/0.14.68.js +1 -1
  2. package/bundle/bundle.umd.js +27 -97
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/dist/components/BonusBenefitsBlock/renderBonusBenefit.js +1 -1
  5. package/dist/components/BonusBenefitsBlock/renderBonusBenefit.js.map +1 -1
  6. package/dist/components/ContentPage/ContentPage.js +0 -2
  7. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  8. package/dist/ui-kit/BlockWrapper.js +1 -3
  9. package/dist/ui-kit/BlockWrapper.js.map +1 -1
  10. package/lib/components/BonusBenefitsBlock/renderBonusBenefit.js +1 -1
  11. package/lib/components/BonusBenefitsBlock/renderBonusBenefit.js.map +1 -1
  12. package/lib/components/ContentPage/ContentPage.js +0 -2
  13. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  14. package/lib/ui-kit/BlockWrapper.js +1 -3
  15. package/lib/ui-kit/BlockWrapper.js.map +1 -1
  16. package/mobile/bundle/bundle.umd.js +27 -97
  17. package/mobile/bundle/bundle.umd.min.js +1 -1
  18. package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefit.js +1 -1
  19. package/mobile/dist/components/BonusBenefitsBlock/renderBonusBenefit.js.map +1 -1
  20. package/mobile/dist/components/ContentPage/ContentPage.js +0 -2
  21. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  22. package/mobile/dist/ui-kit/BlockWrapper.js +1 -3
  23. package/mobile/dist/ui-kit/BlockWrapper.js.map +1 -1
  24. package/mobile/lib/common.css +1 -1
  25. package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefit.js +1 -1
  26. package/mobile/lib/components/BonusBenefitsBlock/renderBonusBenefit.js.map +1 -1
  27. package/mobile/lib/components/ContentPage/ContentPage.js +0 -2
  28. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  29. package/mobile/lib/ui-kit/BlockWrapper.js +1 -3
  30. package/mobile/lib/ui-kit/BlockWrapper.js.map +1 -1
  31. package/mobile/src/components/BonusBenefitsBlock/renderBonusBenefit.tsx +1 -1
  32. package/mobile/src/components/ContentPage/ContentPage.tsx +0 -3
  33. package/mobile/src/ui-kit/BlockWrapper.tsx +2 -4
  34. package/package.json +1 -1
  35. package/src/components/BenefitsBlock/BenefitsBlock.fixture.tsx +3 -3
  36. package/src/components/BonusBenefitsBlock/renderBonusBenefit.tsx +1 -1
  37. package/src/components/ContentPage/ContentPage.tsx +0 -3
  38. package/src/ui-kit/BlockWrapper.tsx +2 -4
  39. package/bundle/services/BlockRouter/BlockIntersection.d.ts +0 -2
  40. package/bundle/services/BlockRouter/BlockRouter.d.ts +0 -2
  41. package/bundle/services/BlockRouter/blockRouterEventBus.d.ts +0 -11
  42. package/bundle/services/BlockRouter/findActiveBlock.d.ts +0 -3
  43. package/bundle/services/BlockRouter/useBlockIntersectionObserver.d.ts +0 -4
  44. package/bundle/services/BlockRouter/useBlockRouterProvider.d.ts +0 -1
  45. package/dist/services/BlockRouter/BlockIntersection.d.ts +0 -2
  46. package/dist/services/BlockRouter/BlockIntersection.js +0 -2
  47. package/dist/services/BlockRouter/BlockIntersection.js.map +0 -1
  48. package/dist/services/BlockRouter/BlockRouter.d.ts +0 -2
  49. package/dist/services/BlockRouter/BlockRouter.js +0 -11
  50. package/dist/services/BlockRouter/BlockRouter.js.map +0 -1
  51. package/dist/services/BlockRouter/blockRouterEventBus.d.ts +0 -11
  52. package/dist/services/BlockRouter/blockRouterEventBus.js +0 -5
  53. package/dist/services/BlockRouter/blockRouterEventBus.js.map +0 -1
  54. package/dist/services/BlockRouter/findActiveBlock.d.ts +0 -3
  55. package/dist/services/BlockRouter/findActiveBlock.js +0 -15
  56. package/dist/services/BlockRouter/findActiveBlock.js.map +0 -1
  57. package/dist/services/BlockRouter/useBlockIntersectionObserver.d.ts +0 -4
  58. package/dist/services/BlockRouter/useBlockIntersectionObserver.js +0 -17
  59. package/dist/services/BlockRouter/useBlockIntersectionObserver.js.map +0 -1
  60. package/dist/services/BlockRouter/useBlockRouterProvider.d.ts +0 -1
  61. package/dist/services/BlockRouter/useBlockRouterProvider.js +0 -28
  62. package/dist/services/BlockRouter/useBlockRouterProvider.js.map +0 -1
  63. package/lib/services/BlockRouter/BlockIntersection.d.ts +0 -2
  64. package/lib/services/BlockRouter/BlockIntersection.js +0 -2
  65. package/lib/services/BlockRouter/BlockIntersection.js.map +0 -1
  66. package/lib/services/BlockRouter/BlockRouter.d.ts +0 -2
  67. package/lib/services/BlockRouter/BlockRouter.js +0 -8
  68. package/lib/services/BlockRouter/BlockRouter.js.map +0 -1
  69. package/lib/services/BlockRouter/blockRouterEventBus.d.ts +0 -11
  70. package/lib/services/BlockRouter/blockRouterEventBus.js +0 -3
  71. package/lib/services/BlockRouter/blockRouterEventBus.js.map +0 -1
  72. package/lib/services/BlockRouter/findActiveBlock.d.ts +0 -3
  73. package/lib/services/BlockRouter/findActiveBlock.js +0 -12
  74. package/lib/services/BlockRouter/findActiveBlock.js.map +0 -1
  75. package/lib/services/BlockRouter/useBlockIntersectionObserver.d.ts +0 -4
  76. package/lib/services/BlockRouter/useBlockIntersectionObserver.js +0 -14
  77. package/lib/services/BlockRouter/useBlockIntersectionObserver.js.map +0 -1
  78. package/lib/services/BlockRouter/useBlockRouterProvider.d.ts +0 -1
  79. package/lib/services/BlockRouter/useBlockRouterProvider.js +0 -25
  80. package/lib/services/BlockRouter/useBlockRouterProvider.js.map +0 -1
  81. package/mobile/bundle/services/BlockRouter/BlockIntersection.d.ts +0 -2
  82. package/mobile/bundle/services/BlockRouter/BlockRouter.d.ts +0 -2
  83. package/mobile/bundle/services/BlockRouter/blockRouterEventBus.d.ts +0 -11
  84. package/mobile/bundle/services/BlockRouter/findActiveBlock.d.ts +0 -3
  85. package/mobile/bundle/services/BlockRouter/useBlockIntersectionObserver.d.ts +0 -4
  86. package/mobile/bundle/services/BlockRouter/useBlockRouterProvider.d.ts +0 -1
  87. package/mobile/dist/services/BlockRouter/BlockIntersection.d.ts +0 -2
  88. package/mobile/dist/services/BlockRouter/BlockIntersection.js +0 -2
  89. package/mobile/dist/services/BlockRouter/BlockIntersection.js.map +0 -1
  90. package/mobile/dist/services/BlockRouter/BlockRouter.d.ts +0 -2
  91. package/mobile/dist/services/BlockRouter/BlockRouter.js +0 -11
  92. package/mobile/dist/services/BlockRouter/BlockRouter.js.map +0 -1
  93. package/mobile/dist/services/BlockRouter/blockRouterEventBus.d.ts +0 -11
  94. package/mobile/dist/services/BlockRouter/blockRouterEventBus.js +0 -5
  95. package/mobile/dist/services/BlockRouter/blockRouterEventBus.js.map +0 -1
  96. package/mobile/dist/services/BlockRouter/findActiveBlock.d.ts +0 -3
  97. package/mobile/dist/services/BlockRouter/findActiveBlock.js +0 -15
  98. package/mobile/dist/services/BlockRouter/findActiveBlock.js.map +0 -1
  99. package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.d.ts +0 -4
  100. package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.js +0 -17
  101. package/mobile/dist/services/BlockRouter/useBlockIntersectionObserver.js.map +0 -1
  102. package/mobile/dist/services/BlockRouter/useBlockRouterProvider.d.ts +0 -1
  103. package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js +0 -28
  104. package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js.map +0 -1
  105. package/mobile/lib/services/BlockRouter/BlockIntersection.d.ts +0 -2
  106. package/mobile/lib/services/BlockRouter/BlockIntersection.js +0 -2
  107. package/mobile/lib/services/BlockRouter/BlockIntersection.js.map +0 -1
  108. package/mobile/lib/services/BlockRouter/BlockRouter.d.ts +0 -2
  109. package/mobile/lib/services/BlockRouter/BlockRouter.js +0 -8
  110. package/mobile/lib/services/BlockRouter/BlockRouter.js.map +0 -1
  111. package/mobile/lib/services/BlockRouter/blockRouterEventBus.d.ts +0 -11
  112. package/mobile/lib/services/BlockRouter/blockRouterEventBus.js +0 -3
  113. package/mobile/lib/services/BlockRouter/blockRouterEventBus.js.map +0 -1
  114. package/mobile/lib/services/BlockRouter/findActiveBlock.d.ts +0 -3
  115. package/mobile/lib/services/BlockRouter/findActiveBlock.js +0 -12
  116. package/mobile/lib/services/BlockRouter/findActiveBlock.js.map +0 -1
  117. package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.d.ts +0 -4
  118. package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.js +0 -14
  119. package/mobile/lib/services/BlockRouter/useBlockIntersectionObserver.js.map +0 -1
  120. package/mobile/lib/services/BlockRouter/useBlockRouterProvider.d.ts +0 -1
  121. package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js +0 -25
  122. package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js.map +0 -1
  123. package/mobile/src/services/BlockRouter/BlockIntersection.ts +0 -3
  124. package/mobile/src/services/BlockRouter/BlockRouter.ts +0 -11
  125. package/mobile/src/services/BlockRouter/blockRouterEventBus.ts +0 -13
  126. package/mobile/src/services/BlockRouter/findActiveBlock.ts +0 -20
  127. package/mobile/src/services/BlockRouter/useBlockIntersectionObserver.ts +0 -20
  128. package/mobile/src/services/BlockRouter/useBlockRouterProvider.ts +0 -37
  129. package/src/services/BlockRouter/BlockIntersection.ts +0 -3
  130. package/src/services/BlockRouter/BlockRouter.ts +0 -11
  131. package/src/services/BlockRouter/blockRouterEventBus.ts +0 -13
  132. package/src/services/BlockRouter/findActiveBlock.ts +0 -20
  133. package/src/services/BlockRouter/useBlockIntersectionObserver.ts +0 -20
  134. package/src/services/BlockRouter/useBlockRouterProvider.ts +0 -37
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=x((({children:e})=>f?e:null));class y{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}}const v=new y;function N(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:w(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function w(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const k=new y;const C=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),S={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","":""},I=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:r="p-xl",padding:s,block:o,tag:c="section",role:d,children:m})=>{const h=c,p=function(e){return N(i((t=>{if(!e||!t?.length)return;const l=t[t.length-1];k.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(o),[x,g]=n(!1);a((()=>v.subscribe("tab",(e=>{g(Boolean(e.label&&o?.labels?.length&&!o.labels.includes(e.label)))}))),[o]);const f=t&&l;return u(h,{className:C("@container font-sans",f?"group":"",S[t],x?"hidden":"",s||r,e),...f?{"data-ver":t}:{},...o?.anchor?{id:o.anchor,ref:p}:{},role:d,children:m})})),T={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},B=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>u(l,{className:C("font-sans m-0",T[t],e),children:n||a}))),M=x((({children:e,...t})=>u("p",{className:C("font-sans",Object.values(t)),children:e}))),P={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"}},R=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=P[l],m={marginTop:d.descriptionStyle};return p(I,{className:C(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(B,{className:C("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(M,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})}));function z(){return z._impl()}z._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),z.setup=e=>{z._impl=e};const V=e=>Boolean(e?.includes(":")),A=(e,t)=>Boolean(e&&!V(e)&&(!t||"_self"===t)),D=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),j=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var _=Object.freeze({__proto__:null,isURL:V,isLocalURL:A,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:D,joinPath:j});const L=e=>(t,l=d.BASE_PATH)=>{if(!t||V(t)||$(t,d.CDN))return t;const n=t.startsWith("/");return j($(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},$=(e,t)=>t&&e&&e.startsWith(t),O={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},E=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=z(),c="normal"===i?`${l}.svg`:`sprites.svg#${l}`,m=L(o)(j(d.CDN,"/icons/",c));return"normal"===i?u("img",{className:e,src:m,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:F(e,s)}):u(H,{className:e,children:p("svg",{className:C(U(r),O[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:m,xlinkHref:m})]})})})),F=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},U=e=>e?"":"w-full h-full",H=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),W=(e,t)=>e?.media&&t?.media?e.media-t.media:0,X=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=z();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(W).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:Y(a,n)(e),type:G(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?K({...t,src:Y(a,n)(t.src)},l):null]})})),K=(e,t="")=>u("img",{src:e.src,className:C("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}),Y=(e,t)=>l=>l&&!V(l)?L(e)(j(t,l)):l,G=e=>e?`image/${String(e)}`:void 0,q=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(E,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(X,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),J={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},Z="bg-main-divider text-main-disabled",Q={primary:Z,secondary:Z,white:Z,link:"",transparent:"",gray:Z,"":""},ee="text-center font-sans select-none",te={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","":""},le=({className:e,rounded:t,version:l})=>[ee,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?J[l]:"",t?"rounded-full":"rounded-md",e].join(" "),ne=()=>({open:(e,t={})=>v.fire("dialog",{type:"open",dialog:e,...t}),close:()=>v.fire("dialog",{type:"close"}),closeAll:()=>v.fire("dialog",{type:"close",all:!0})}),ae=(e,t)=>ae._impl(e,t);function ie(e={}){const{isRemote:t,basePath:l}=e,n=z(),{closeAll:a}=ne();return e=>({...e,href:t&&!l?e.href:L(n)(e.href,l),"aria-label":e.text,onClick:ae(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&A(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}ae._impl=e=>e,ae.setup=e=>{ae._impl=e};const re=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=oe(e)?"hidden lg:block":"";return p("div",{className:C(se(e),"flex gap-xs"),children:[n?u("div",{className:C(r,te[i]),children:n}):null,oe(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:C(r,te[i]),children:a}):null]})})),se=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 C("group/btn items-center justify-center",oe(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},oe=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ce=({className:e,rounded:t,version:l})=>["inline-block",ee,l?Q[l]:"",t?"rounded-full":"rounded-md",e].join(" "),de=x((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=ie()({onClick:r,href:n,...a}),o=t??u(re,{...s});return u(e?he:me,{...s,children:o})})),me=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:le({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),he=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ce({className:e,rounded:n,version:l}),children:a})));function ue(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:le({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(q,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(de,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const pe={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},xe=x((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:x,children:g})=>{const f=z(),b=i((e=>{e?.preventDefault(),f.back()}),[]);return p("div",{className:ge(n,l,e),children:[x?ue(t,b):null,a?u("div",{className:"relative",children:a}):null,p("div",{className:C("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[ve(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:C("grid gap-3xl",c?"@xl:grid-cols-2":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,g]}),ve(c,{className:C("@xl:justify-self-end @xl:col-start-2",s?fe(m):"",be(m),Ne(h)),imageAlign:d}),ye(s)]})]})]})})),ge=(e="",t="",l="")=>C("relative flex flex-col gap-3xl overflow-hidden",e||t,l),fe=e=>e?"row-span-2":"@xl:row-span-2",be=e=>e?"col-start-2 self-center":"",ye=e=>e?u("div",{className:"self-end",children:e}):null,ve=(e,{className:t,imageAlign:l})=>e?u("div",{className:C("shrink-1/2 justify-self-center mt-auto @xl:mt-0",l&&pe[l],t),children:e}):null,Ne=e=>e?"hidden @xl:block":"",we=(e=[])=>e.reduce(((e,t)=>e+t),0),ke=(e=[])=>e?.length?we(e)/e.length:0,Ce=(e,t="normal")=>e?u("div",{className:C("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(q,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Se=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:C(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),Ie=(e,t)=>e?u(M,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Te=x((({children:e,...t})=>u("span",{className:C("font-sans",Object.values(t)),children:e}))),Be=(e,t)=>e?u(Te,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Me=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Se,{...e},`rte-${t}`):["label"in e?Be(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:Ie(e.description,t)},String(t)):null],Pe=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:C("flex gap-m min-w-56 items-center",e),children:["icon"in l?Ce(l.icon,t):null,u("div",{children:Me(l)})]}))),Re=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),ze=e=>{return((t=e.map(Re))?.length?Math.sqrt(Math.abs(ke(t.map((e=>e**2)))-ke(t)**2)):0)>16;var t},Ve=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Ae=e=>!e.some(Ve),De=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:C("flex gap-x-m gap-y-s",ze(l)||Ae(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Pe,{benefitsVersion:t,...e},String(l))))}):null)),je=x((({className:e,benefits:t})=>t?.length?u("div",{className:C("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Me)}):null)),_e=x((({isTabularBenefits:e,...t})=>u(e?je:De,{...t}))),Le=e=>Boolean(e?.src||e?.icon),$e=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:C("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(Oe(l))}):null,Oe=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=Ee(a,r),c=Ee(i,r);return n||a?.icon?u(de,{className:C("basis-full @lg:basis-auto",e),appendLeft:Fe({...a,iconVersion:o}),appendRight:Fe({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},Ee=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Fe=e=>Le(e)?u(q,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,Ue=x((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:C("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:C("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),He={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"}},We=x((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=He[n];return l?.length?u("section",{className:C("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>u(Ue,{isDotted:t,dotClassName:C(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),Xe=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0),Ke=x((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(Ye)}):null)),Ye=({label:e,amount:t})=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",children:[u(Te,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Xe(2)(t)," ₽"]}):null]}),Ge=x((({className:e,tags:t})=>t?.length?u("div",{className:C("flex flex-wrap gap-xs",e),role:"list",children:t.map(qe)}):null)),qe=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(Te,{size:"text-m",font:"font-light",children:e})},String(t)),Je={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},Ze=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,priceList:g=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:S,...I})=>{const T=y?.src?u(q,{image:y}):null,B=u(R,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(xe,{className:e,padding:t,defaultPadding:l,...m?{title:B}:{insetTitle:B},...Qe(T,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:$e(b),backwardButton:C,...I,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?u(_e,{benefitsVersion:s,isTabularBenefits:o,benefits:M}):null,d?u(Se,{__html:d}):null,h?.length?u(We,{items:h,isDotted:x,listItemSize:Je[i]}):null,S,g?.length?u(Ke,{priceList:g}):null,et(f)]})})})),Qe=(e,t)=>t?{rightImage:e}:{leftImage:e},et=e=>e?.length?u(Ge,{tags:e}):null,tt=x((({className:e,padding:t,...l})=>u(I,{className:C("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:u(Ze,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})}))),lt=e=>null!=e,nt=new Map;function at(e,t,{fallback:l,cache:i}={}){const s=r((()=>it(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{if(!s.some(lt))return;let e=!1;const l=(t,l)=>{e||(d(t),h(l))};return(async()=>{try{l(await(o?((e,t=nt)=>l=>{const n=t.get(l);if(lt(n))return n;const a=e(l);return lt(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s)))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0)}}function it(e){return Array.isArray(e)?e:e instanceof Function?it(e()):[e]}async function rt(e,t){try{return e?await st(e,t):null}catch(e){console.error(e)}return null}async function st(e,t){return(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json()}const ot={},ct="wcms-resources";function dt(e,t={}){const{fallback:l=ot,folderName:n=ct,setBasePath:a=!1}=t,i=j("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=at(e?i:null,st,{fallback:l});return r||ot}const mt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ht=x((e=>{const t=((e="reklamnaya-plitka")=>{const t=dt(e),l=r((()=>mt(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(tt,{...t,...e})}):null}));const ut=e=>e,pt=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=ut,format:i=ut}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),x=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:x}]},xt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],gt=e=>!e?.length,ft=e=>t=>l=>e(l)?[]:[t],bt=[];function yt(){const{data:e}=at("/api/v1/regions",st);return e||bt}const vt=x((({text:e,link:t})=>p(M,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(Te,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(de,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:u(Te,{children:t.text})}):null]}))),Nt=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},wt=x((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:x,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:v=!1})=>{const N=s(null),w=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{v&&N.current?.focus()}),[v,N]);const k=x?"pr-3xl":"",S=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:C("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:N,className:C("w-full h-14 border rounded-md text-primary-text outline-none p-m",k,S,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:w,onFocus:f,onBlur:b,pattern:y},e)]}),x]})})),kt=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(wt,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Ct=e=>"_"===e,St=e=>/\d/.test(e),It=e=>Ct(e)||St(e),Tt=[..."+7 (___) ___-__-__"],Bt=Tt.findIndex(Ct),Mt=Tt.map(((e,t)=>It(e)?Tt.slice(0,t).filter(It).length:-1));const Pt=x((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=Tt.map(((e,l)=>St(e)?e:t.charAt(Mt[l])||e)),n=Mt.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Bt,n)):l).join("")}(e))),[t]);return u(wt,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Rt=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(Pt,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),zt="Некорректно заполненное поле",Vt=ft((e=>null!=e&&""!==e))(zt),At=ft((e=>"string"==typeof e&&e.length>1))(zt),Dt=ft((e=>"string"==typeof e&&(10===e.length||12===e.length)))(zt),jt=(_t=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,ft((e=>"string"==typeof e&&_t.test(e))))(zt);var _t;const Lt=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(kt,{className:"shrink-0 w-full",label:"Наименование организации",...Nt(e("fullName"),Vt)}),u(kt,{className:"shrink-0 w-full",label:"Контактное лицо",...Nt(e("name"),At)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(kt,{className:"shrink-0 w-full",label:"ИНН",...Nt(e("inn"),Dt)}),u(Rt,{className:"shrink-0 w-full",label:"Телефон",...Nt(e("phone"),jt)})]})]}),$t=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function Ot(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 Et=e=>e?.text||e?.key||"";function Ft(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function Ut(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Ft(globalThis.document,"click",l),t}const Ht=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Wt=x((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Ht(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:Et(e)}),u(E,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:C("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Xt({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>v.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>v.fire("popup",{type:"update",popup:e,...t}),close:()=>v.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),x=Ut(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(Wt,{popupRef:x,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const Kt=x((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=Ot(),[f,b]=n(""),y=i((()=>{b(""),x()}),[]),v=Xt({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[Yt(t),p("div",{className:C("relative",h?"z-20":"z-10"),ref:v,children:[p("div",{className:C("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",qt(s,r)),onClick:h?y:g,children:[u("p",{className:"p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:Et(a)||o}),Gt(h,d)]}),c&&h?u("div",{className:C("absolute top-0 w-full z-20"),children:u(wt,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),Yt=e=>e?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Gt=(e,t)=>u(E,{className:C("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),qt=(e,t)=>C(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Jt=x((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Kt,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Zt=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg ",children:[u("div",{className:"@xl:w-1/2",children:u(Jt,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$t.map((({name:e=""})=>({key:e,text:e}))),...Nt(t("acquiringType"),Vt)})}),u("div",{className:"@xl:w-1/2",children:u(Jt,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...Nt(t("region"),Vt)})})]}),Qt=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:C("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:C("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),el=e=>p("div",{children:[u(Qt,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Qt,{text:"Хочу купить POS-терминал",...e("posTerminal")})]});function tl({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const ll={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"},nl={primary:C("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:C("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")},al=x((({children:e,...t})=>{const l=e=>({...e,onClick:ae(tl(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:o=!0,role:c,onClick:d}=l(t);return u("button",{className:C("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?"":C(ll[a],nl[a]),o?"rounded-md":"",n),type:s,role:c,onClick:d,children:e})})),il=(e,t)=>u(al,{className:C("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),rl={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},sl=xt({acquiringType:Vt,region:Vt,fullName:Vt,inn:Dt,name:At,phone:jt}),ol=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;gt(sl(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=pt(rl,a),o=yt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(B,{headingType:"h6",title:"Вид эквайринга и регион",className:"@xl:text-center"}),Zt({regions:o,field:r}),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),Lt(r),el(r),il(t),u(vt,{link:l})]})})),cl=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(kt,{className:"shrink-0 w-full",label:"Контактное лицо",...Nt(e("name"),At)}),u(kt,{className:"shrink-0 w-full",label:"ИНН",...Nt(e("inn"),Dt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Rt,{className:"shrink-0 w-full",label:"Телефон",...Nt(e("phone"),jt)}),u(kt,{className:"shrink-0 w-full",label:"Электронная почта",...Nt(e("mail"),Vt)})]})]}),dl=({regions:e,field:t})=>u(Jt,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...Nt(t("region"),Vt)}),ml={name:"",phone:"",inn:"",mail:""},hl=xt({region:Vt,name:At,phone:jt,inn:Dt,mail:Vt}),ul=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;gt(hl(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=pt(ml,a),o=yt();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[dl({regions:o,field:r}),cl(r),il(t),u(vt,{link:l})]})})),pl=[];const xl=async e=>await rt(e,{method:"GET"})||pl,gl=["От 1 000 ₽","До 1 000 000 000 ₽"],fl=["От 1 мес","До 15 лет"],bl=e=>p("div",{className:"pb-2xs border-b border-b-main-divider @xl:flex @xl:justify-between @xl:gap-lg @xl:border-none @xl:pb-0",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(kt,{className:"shrink-0 w-full",label:"Наименование организации",...Nt(e("fullName"),Vt)}),u(kt,{className:"shrink-0 w-full",label:"ИНН",...Nt(e("inn"),Dt)}),u(Rt,{className:"shrink-0 w-full",label:"Телефон",...Nt(e("phone"),jt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(kt,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...Nt(e("annualRevenue"),Vt)}),u(kt,{className:"shrink-0 w-full",label:"Контактное лицо",...Nt(e("name"),At)}),u(kt,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),yl=(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}},vl=(e,t,l)=>Math.max(t,Math.min(e,l));function Nl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function wl({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:C("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=Nl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const kl=1,Cl=100,Sl=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:kl),max:s=(a.length?a.length-1:Cl),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=yl(e,{normalize:(e=0)=>a.length?Il(a)(e):vl(e,r,s),format:Xe()}),x=i((e=>{m&&m(Nl(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(Te,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:C("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),wl({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),Tl(n)]})})),Il=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),Tl=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Bl=e=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg",children:[p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Te,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(Sl,{items:gl,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(Te,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(Sl,{items:fl,min:1,max:180,...e("term")})]})]}),Ml=({regions:e,branches:t,field:l})=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0",children:[u("div",{className:"@xl:w-1/2",children:u(Jt,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...Nt(l("region"),Vt)})}),u("div",{className:"@xl:w-1/2",children:u(Jt,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...Nt(l("department"),Vt)})})]}),Pl={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},Rl=xt({fullName:Vt,annualRevenue:Vt,inn:Dt,name:At,phone:jt,region:Vt,department:Vt}),zl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;gt(Rl(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=pt(Pl,n),o=yt(),c=function(e){const{data:t}=at(e?`/api/v1/branches?regionCode=${e}`:null,xl);return t||pl}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(B,{headingType:"h6",title:"Параметры",className:"@xl:text-center"}),Bl(r),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),bl(r),u(B,{headingType:"h6",title:"Офис банка",className:"@xl:text-center"}),Ml({regions:o,branches:c,field:r}),il(e),u(vt,{link:t})]})})),Vl={name:"",phone:""},Al=xt({name:At,phone:jt}),Dl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{name:t,phone:n}=e;gt(Al(e))&&l({typeForm:"dpst",name:t,phone:n.replace(/[^+\d]/g,"")})}),[l]),[,{field:a,...r}]=pt(Vl,n);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(B,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"@xl:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(kt,{className:"shrink-0 w-full",label:"Имя",...Nt(a("name"),At)}),u(Rt,{className:"shrink-0 w-full",label:"Телефон",...Nt(a("phone"),jt)})]}),p("div",{className:"flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(vt,{link:t})}),il(e)]})]})})),jl=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=dt(l||"regions-grant-support"),[i,r]=n({key:""}),s=le({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s @xl:space-y-lg",children:[a?u(Jt,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(de,{href:o,target:"_blank",className:C("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),_l=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Ll=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],$l=x((({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]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(_l,{paths:Ll,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:C("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":Ol(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(Te,{size:"text-l",font:"font-light",children:l})}):null]})})})),Ol=e=>C("rounded border",e?"bg-primary-main":""),El=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Fl=()=>{},Ul=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=Hl(t,e),o=Wl(t,i,r);m.push(u("td",{children:u("div",{className:Xl(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},Hl=(e,t)=>t&&e.toDateString()===t.toDateString(),Wl=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Xl=(e,t)=>C("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Kl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Yl=x((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Fl})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Kl.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:Ul({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Gl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],ql=Gl.map((e=>({key:e}))),Jl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Zl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ql={className:"min-w-32",iconVersion:"black",isBorder:!1},en=x((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=Ot(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[x,g]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:v,monthsOptions:N,yearsOptions:w,handleChangeVisibleCalendar:k,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=Ut(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(Gl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:ql,yearsOptions:Jl,ref:s}})({onYearSelect:g,onMonthSelect:h,onShowCalendar:d,selectedYear:x,selectedMonth:m,showCalendar:c});return p("div",{className:C(e,"relative"),ref:S,children:[u(Te,{size:"text-m","font-weight":"font-light",children:t}),tn(k,l,a),c?p("div",{className:"absolute bg-white z-10 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(E,{...Zl,className:"-rotate-90 cursor-pointer"})}),u(Kt,{onChange:y,value:{key:Gl[m]},options:N,...Ql}),u(Kt,{onChange:v,value:{key:String(x)},options:w,...Ql}),u("div",{className:"my-auto",onClick:b,children:u(E,{...Zl,className:"rotate-90 cursor-pointer"})})]}),u(Yl,{today:l,currentMonth:m,currentYear:x,onDateSelect:o,min:r,max:s})]}):null]})})),tn=(e,t,l)=>p("div",{onClick:e,className:C("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(M,{children:t&&El(t)}),u(E,{...Zl,name:"CalendarIcon"})]}),ln=x((({className:e,label:t,value:l,error:n,onChange:a})=>p("div",{className:e,children:[t?u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:t})}):null,u(en,{value:l,onChange:a,valid:Boolean(!n)}),u("div",{className:"h-2",children:n?u(Te,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),nn=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(kt,{className:"shrink-0 w-full",label:"Фамилия",...Nt(e("surname"),At)}),u(kt,{className:"shrink-0 w-full",label:"Отчество",...Nt(e("middleName"),At)}),u(Rt,{className:"shrink-0 w-full",label:"Телефон",...Nt(e("phone"),jt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(kt,{className:"shrink-0 w-full",label:"Имя",...Nt(e("name"),At)}),u(ln,{className:"shrink-0 w-full",label:"Дата рождения",...Nt(e("date"),Vt)}),u(kt,{className:"shrink-0 w-full",label:"Электронная почта",...Nt(e("mail"),Vt)})]})]}),an={surname:"",name:"",middleName:"",phone:"",mail:"",date:void 0,consentDataProcessing:!0},rn=xt({surname:At,name:At,middleName:At,phone:jt,mail:Vt,date:Vt}),sn=x((e=>{const{button:t,link:l,product:n,onSubmit:a}=e,r=i((e=>{const{surname:t,name:l,middleName:i,phone:r,mail:s,date:o,consentDataProcessing:c}=e;gt(rn(e))&&a({typeForm:"dpst",surname:t,name:l,middleName:i,mail:s,consentDataProcessing:c,phone:r.replace(/[^+\d]/g,""),date:o?.toISOString().slice(0,10)||"",product:n||""},!0)}),[a]),[,{field:s,...o}]=pt(an,r);return p("form",{className:"container space-y-s",onSubmit:o.onSubmit,children:[nn(s),p("div",{className:"@xl:flex justify-between items-center",children:[p("div",{className:"@xl:mb-0 mb-2 flex items-center gap-3",children:[u($l,{...Nt(s("consentDataProcessing"),Vt)}),u(vt,{text:"Согласен с ",link:l})]}),il(t)]})]})})),on=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(Te,{color:"text-primary-text",children:t}):null]})}))),cn=e=>{const{value:t,onChange:l}=e("vedTypes");return u("div",{className:"space-y-m",children:p("div",{className:"@xl:flex @xl:items-center @xl:gap-xl",children:[u(on,{className:"mb-xs",name:"vedTypes",text:"Валютный котроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(on,{className:"mb-xs",name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(on,{className:"mb-xs",name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(on,{className:"mb-xs",name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},dn=(e,t)=>{const l="currencyControl"===e("vedTypes").value;return p("div",{children:[l?u(Jt,{className:"mb-s",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...Nt(e("region"),Vt)}):null,p("div",{className:"@xl:grid @xl:grid-cols-2 @xl:gap-x-lg",children:[l?u(kt,{className:"w-full mb-s",label:"ИНН",...Nt(e("inn"),Dt)}):null,u(kt,{className:"w-full mb-s",label:"Наименование организации",...Nt(e("fullName"),Vt)}),u(kt,{className:"w-full mb-s",label:"ФИО",...Nt(e("name"),At)}),u(Rt,{className:"w-full mb-s",label:"Телефон",...Nt(e("phone"),jt)}),l?null:u(kt,{className:"w-full mb-s",label:"Электронная почта",...Nt(e("mail"),Vt)})]})]})},mn=e=>{const t=e("text");return p("label",{htmlFor:"textarea",children:[u("div",{className:"mb-xs",children:u(Te,{size:"text-m",font:"font-light",children:"Обращение"})}),u("textarea",{id:"textarea",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:C("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},hn={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},un={fullName:Vt,name:At,phone:jt},pn=xt({...un,mail:Vt}),xn=xt({...un,inn:Dt,region:Vt}),gn=e=>"currencyControl"===e,fn=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),bn={ApplicationFormBusinessCard:ul,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:fn(o),PartnerComments:c,...gn(o)?{inn:r,region:s?.text||""}:{mail:i}};gt((e=>gn(e)?xn:pn)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=pt(hn,a),o=yt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[cn(r),u(B,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),dn(r,o),mn(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg @xl:items-center @xl:flex-row @xl:pb-4xl",children:[il(t),u(vt,{link:l})]}),u(B,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(q,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(q,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Dl,ApplicationFormCredit:zl,ApplicationFormAcquiring:ol,ApplicationFormGrantSupport:jl,ApplicationFormIndividuals:sn},yn=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(q,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(B,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),vn={send:async function(e,t){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},Nn=x((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t)=>{const l=await vn.send(e,t)?"OK":"Fail";return s(l),l}),[]);return u(I,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(B,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?wn(l,o):null,r?u(yn,{responseType:r}):null]})})})),wn=(e,t)=>{const l=e?.formType;if(!l||!(l in bn))return null;return u(bn[l],{...e,onSubmit:t})},kn="text-center",Cn={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Sn=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:C("rounded-icon object-fit flex justify-center items-center",Cn[l],e),children:u(E,{...i,width:"54%",height:"54%",name:a})}):null})),In=x((({className:e="",title:t,benefitList:l,...n})=>p(I,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(B,{headingType:"h3",as:"h2",className:kn,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(Tn)}):null]}))),Tn=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(Sn,{className:"shrink-0",defaultIconSize:44,iconBgVersion:a||"",...n}):null,n?.src?u(q,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(B,{headingType:"h6",children:e}),u(Te,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(We,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Bn=x((({className:e="",title:t,description:l,bonusItems:n=[],align:a=kn,...i})=>u(I,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(R,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(R,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:$e(e?.buttons)}),e.bonusItemContent?.bonusType?Mn(e.bonusItemContent):null]})]},String(t)))):null})]})}))),Mn=e=>"count"===e.bonusType?Pn(e):Rn(e),Pn=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(Te,{size:"text-h2",children:e.bonusName})}):null]}),Rn=e=>e.image?u(q,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,zn=e=>({icon:t,title:l,description:n},a)=>p("div",{className:C("flex flex-col gap-1","items-center",n||l?"":"justify-center"),children:[l?u(Te,{size:"text-h6",font:"font-normal",align:e,children:l}):null,t?u(q,{image:t,height:"180",className:"w-auto"}):null,n?u(Te,{size:"text-h6",font:"font-normal",align:e,children:n}):null]},String(a)),Vn=(e,t,l)=>u("div",{className:`grid gap-2xs ${An(t)}`,children:e.map(zn(l))}),An=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Dn=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(I,{className:l,defaultPadding:"p-6xl",...r,children:[u(R,{title:i,description:a,headlineVersion:"M"}),e?.length?Vn(e,n,t):null]}))),jn={start:"justify-start",center:"justify-center",end:"justify-end"},_n=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?C("flex",jn[l]):"";return u(I,{className:C("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:$e(e)})})),Ln=(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}]},$n=x((({className:e,disabled:t,...l})=>u(de,{rounded:!0,className:C("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(q,{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"})}))),On=x((e=>u($n,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),En=x((e=>u($n,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function Fn({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u($n,{className:`absolute z-40 ${a[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u($n,{className:`absolute z-40 rotate-180 ${a[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const Un=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:C("flex justify-between @xl:flex-col",a),children:[e?u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(Te,{size:"text-h3",children:[n," ",Xe(2)(Math.round(t))," ",l]})}:{children:u(Te,{size:"text-h3",children:"-"})})]}))),Hn=1e4,Wn=5e6,Xn=Math.round(23.5),Kn={minSum:Hn,maxSum:Wn,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Yn={minSum:Hn,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Gn={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},qn={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Jn={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Zn=e=>e?u(M,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Qn=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,fractionDigits:i=2})=>p("div",{children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:n}):null]})]}))),ea=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(E,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(M,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(M,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),ta=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,title:a,unit:i})=>u(Qn,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,unit:i,title:a}),la=({rate:e,title:t,unit:l})=>u(Un,{title:t,value:e,postfix:l}),na=({isUnknownRateShown:e=!0,isUnavailableByTerm:t=!1,title:l="Ставка",unit:n="%",rate:a=0,...i})=>e&&0===a?u(ea,{isUnavailableByTerm:t,title:l}):p("div",{children:[u("div",{className:"hidden @xl:block",children:ta({title:l,unit:n,rate:a,...i})}),u("div",{className:"@xl:hidden",children:la({title:l,unit:n,rate:a,...i})})]});function aa({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Xe(2)(l.min||0)} ₽`,`До ${Xe(2)(l.max||0)} ₽`];return u(Sl,{items:e?n:[],step:t,...l})}function ia(e){const{data:t}=at(`/wcms-resources/${e}.json`,st);return t}const ra=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=ia(t||"bonus-calculator-data")||Gn,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},sa=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=pt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=ra(a,t);return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[aa({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),aa({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?na({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-4xl @xl:w-96",children:[m>=0?u(Un,{title:"Баллов за год",value:m}):null,$e(l,{isVertical:!0}),Zn(n)]})]})})),oa=(e,t=0)=>e?.sum&&e.sum>=Hn&&e.sum<=Wn?e.sum:t,ca=(e,t=0)=>e?.period&&e.period>=13&&e.period<=60?e.period:t,da=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,ma={horizontal:"gap-5xl",vertical:"flex-col gap-s"},ha=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:C(`flex ${ma[a]}`,l),children:e?.map((({id:e,text:l})=>u($l,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),ua=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(Te,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(Te,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(ha,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:C("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),pa=e=>ua({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),xa=e=>e,ga=(e=xa)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),fa=ga(),ba=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},ya=(e=xa)=>ga((t=>-e(t))),va=ya(),Na=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:wa([e,t],n),wa=([e,t],l=[])=>({[e]:l.length?va(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?fa(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ka=(e,[t,l],n)=>e>=n[t]&&e<=n[l],Ca=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Sa=(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)},Ia=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=pt({moneyValue:oa(r,1e5),daysValue:ca(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=ia(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Jn,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&Ca(o,e)&&ka(n,["minSum","maxSum"],e)&&ka(l,["minDays","maxDays"],e)))||Jn,{rate:m}=d,h=Sa(m,e),u=n+h,p=s?.rateRows||[Jn];return{...d,...wa(["minSum","maxSum"],p),...wa(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:x,depositeName:g}=c;return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[aa({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(Sl,{items:[`От ${da(f.min||0)}`,`До ${da(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[Ta(c,o),pa({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider md:hidden"}),na({rate:h,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:x}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[Ba(m,d),$e(l,{isVertical:!0}),Zn(n),Zn(a)]})]});var f})),Ta=(e,t)=>p("div",{className:"space-y-s",children:[u(Te,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u($l,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u($l,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ba=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u(Un,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u(Un,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Ma=({min:e=0,max:t=0,availableMonths:l,...n})=>u(Sl,{items:[`От ${Pa(e)}`,`До ${Pa(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Pa=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ra=e=>ua({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),za=e=>Va({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Va({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Va({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Va({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Va=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Aa=(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)},Da=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ia(t||"credit-calculator-data"),s=i?.rateRows||[Kn],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>za({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=Na(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=Na(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>za({row:e,userInputParams:t,paramsViewSettings:l})&&ka(n,["minSum","maxSum"],e)&&ka(a,["minMonths","maxMonths"],e)))||Kn)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Aa(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},ja=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=pt({moneyValue:oa(i,2e5),monthsValue:ca(i,Xn),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=Da(r,t,a),c=Ra({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[aa({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Ma({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),_a({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),na({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Un,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),$e(l,{isVertical:!0}),Zn(n)]})]})})),_a=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u($l,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u($l,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u($l,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u($l,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),La=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ia(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?Ea(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>Oa({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&Oa({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&ka(n,["minSum","maxSum"],t)&&ka(a||r,["minMonths","maxMonths"],t)))||qn,{rate:d}=c,m=$a(d,e),h=n+m,u=i?.rateRows||[qn];return{...c,...wa(["minSum","maxSum"],u),...wa(["minMonths","maxMonths"],u),availableMonths:ba(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},$a=(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)},Oa=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],Ea=(e,t)=>e+Math.round((t-e)/2),Fa=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=pt({moneyValue:oa(r,2e4),monthsValue:ca(r,0),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=La(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:x}=c,{onChange:g}=o("monthsValue");return a((()=>{g&&g(d)}),[d]),p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[aa({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),Ma({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),Ua({...c,...i},o)]}),u("div",{className:"border-b border-main-divider md:hidden"}),na({rate:m}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u(Un,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u(Un,{title:"Сумма в конце срока",value:x,postfix:"₽"}),$e(l,{isVertical:!0}),Zn(n)]})]})})),Ua=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?pa({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},ua({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Ha=e=>Wa({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Wa({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Wa=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Xa=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=ia(t||"refinancing-calculator-data"),c=o?.rateRows||[Yn],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ha({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=Na(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=Na(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Ha({row:e,userInputParams:t,paramsViewSettings:l})&&ka(n+r,["minSum","maxSum"],e)&&ka(i,["minSumOld","maxSumOld"],e)&&ka(r,["minSumExtra","maxSumExtra"],e)&&ka(a,["minMonths","maxMonths"],e)))||Yn)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Aa(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Ka=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=pt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Xa(i,t,a),o=Ra({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return p("section",{className:C("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[aa({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),aa({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Ma({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Ya({...s,...a},r),s.isExtraMoney?aa({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),na({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0",children:[u(Un,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u(Un,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block",children:o}),$e(l,{isVertical:!0}),Zn(n)]})]})})),Ya=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u($l,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u($l,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u($l,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Ga={CreditCalculatorForm:ja,DepositCalculatorForm:Fa,BusinessDepositCalculatorForm:Ia,BonusCalculatorForm:sa,RefinancingCalculatorForm:Ka},qa=(e,t)=>{const l=e?.calcType;if(!l||!(l in Ga))return null;const n=Ga[l];return u("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:p("div",{className:"box-border p-4xl w-full space-y-xl",children:[e?.title?u(B,{className:"text-center",title:e.title}):null,u(n,{...e})]})},String(t))},Ja=x((({className:e="",tabAlign:t,calculatorTabs:l=[],...a})=>{const r=l.map((e=>e.nav||{})),s=l.map((({calculatorBlock:e})=>e||{})),[o,c]=n(0),d=i((e=>c(e)),[]),[m,h]=Ln({itemCount:l?.length,visibleItemCount:3});return p(I,{className:C("box-border overflow-hidden relative",e),defaultPadding:"p-0",...a,children:[p("div",{className:"bg-white",children:[r.length>1?Za({activeIndex:m,tabsNav:r,tabAlign:t,slideIndexShift:o,onClick:d}):null,Fn({...h,btnClass:["left-3","right-3"],className:"top-10"})]}),u("div",{className:"flex",style:{transform:`translateX(-${o}00%)`},role:"list",children:s?.length?s.map(qa):null})]})}));function Za({activeIndex:e,tabsNav:t,tabAlign:l,slideIndexShift:n,onClick:a}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-32 pt-4xl box-border duration-1000",children:u("div",{className:C("w-full flex flex-nowrap items-end gap-xs",l?jn[l]:""),children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const a=l?"w-96 p-m border-none bg-primary-main text-white":"w-96 p-s ease-in duration-300 bg-white text-primary-text",i=l?"text-xl mb-xs":"text-l mb-2xs",r=l?"text-l font-light text-white":"text-m font-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:n,"aria-label":e?.title,className:C("box-border relative border border-gray cursor-pointer text-left border-b-0 flex space-x-m min-h-20",a),children:[u(q,{className:C("h-6 w-6 min-w-6 min-h-6",s),image:{...e?.icon,iconVersion:o??c},width:"24",height:"24"}),p("div",{className:"border-0",children:[u("div",{className:i,children:e?.title}),u("div",{className:r,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const Qa=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=yl(e,{normalize:(e=a)=>l&&n?String(vl(Number(ei(e)),l,n)):ei(e),format:Xe(r)}),c=i((e=>t&&t(ei(e))),[t]);return u(wt,{onChange:c,...s,...o})})),ei=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),ti=x((e=>u(Qa,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(Te,{size:"text-xl",font:"font-light",children:"₽"})})}))),li={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},ni={amount:1500},ai=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=pt(ni),[m,h]=n(!1);return a((()=>{h(c<=0)}),[c]),p(I,{className:C("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(B,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:li[s],children:[u(ti,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u(al,{className:"w-full mt-lg",type:"submit",disabled:m,children:r.text}):null]})]})})),ii=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),ri=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=N(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),si=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],oi=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),f=i(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(di(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,v="horizontal-list"===o,N={...v?ci(r,b):{},...y?ii(d):{},gap:`${a}px`};return u("div",{className:C("box-border overflow-auto no-scrollbar",o,e),style:N,ref:t,children:(w=(e,t)=>u(ri,{className:C(c,n?si[n-1]:"",y?"h-full":""),style:v?ci(r/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(w):w(e,0))(m)});var w})),ci=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),di=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),mi={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},hi={"horizontal-list":"w-6","vertical-list":"h-6"},ui=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:C("flex gap-xs",mi[a],i?"group":"",e),"data-ver":i,children:new Array(n).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?hi[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)),pi=e=>t=>e.scrollWidth/t,xi=e=>(t,l)=>{e.scrollBy({left:l*pi(e)(t),behavior:"smooth"})},gi=({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?[ya()(a),ga()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?xi(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?xi(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},fi="absolute top-[calc(50%-24px)] z-40",bi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",yi=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,x=a?t<l-1:c,g=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[vi(e),h?u(On,{className:C(fi,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u(En,{className:C(fi,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),vi=e=>p("div",{children:[e.canScrollLeft?u("div",{className:C(bi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:C(bi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Ni=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),wi=[];function ki(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=Ni,blocksRegistry:r={},ancestors:s=wi}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:C(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const Ci=[],Si=(e,{key:t,ancestors:l=Ci,slotName:n=null,extraProps:a,renderProps:i=ki,...r})=>{const s=a?(e,t)=>ki(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||Ci,[r.parent,n]]:l},a)))};function Ii({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?Si(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Ti=e=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Bi=({className:e,text:t="ХИТ"}={})=>p("div",{className:C("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(E,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(M,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Mi="relative h-full",Pi={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Ri=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(Ai);return Ii({...n,renderProps:(n,a,r)=>p("div",{className:zi(n,{someCardsHighlighted:i}),children:[ki(n,a,{className:Vi(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),Ai(n)?Bi({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},zi=(e,{someCardsHighlighted:t})=>C(Mi,t&&(Ai(e)?"pt-3xl":"pt-3xl sm:pt-16")),Vi=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>C(Mi,"min-w-80",Pi[n],t&&(Ai(e)?"pt-3xl sm:pt-16":"pt-3xl"),Ti(l),l&&"h-full"),Ai=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Di=x((({className:e,itemCount:t,visibleItemCount:l=1,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=Ln({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=gi({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(I,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:C(a?"flex justify-center":"","relative max-w-full"),children:[u(oi,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Ri({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(yi,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(ui,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));Di.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard","RichTextBlock","ProductBlock"],Di.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const ji=x((({className:e,title:t,description:l,blockIndex:n=0,isActive:a,...i})=>u(I,{className:C("relative flex h-[485px]",a?"w-[440px] z-10":"w-[340px]",e),defaultPadding:"p-0",...i,children:u("div",{className:C("basis-full self-center",_i(n)),children:a?u(R,{headlineVersion:"M",title:t,description:l,padding:"p-3xl",align:"text-left",className:"h-96 text-white shadow-dark-blue"}):u("div",{className:"h-[300px] flex justify-center items-center font-mohave text-title-large",children:u("span",{className:Li(n),children:t})})})}))),_i=e=>["bg-primary-main","bg-green-light","bg-yellow-light"][e%3],Li=e=>["gradient-color-text-on-green","gradient-color-text-on-yellow","gradient-color-text-on-yellow"][e%3],$i="z-10 border border-solid w-full h-full",Oi=C($i,"absolute hidden @xl:block border-transparent"),Ei=x((({className:e,title:t,description:l,button:n,...a})=>u(I,{className:C("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:C(Oi,"top-9 right-12 bg-green-dark")}),u("div",{className:C(Oi,"top-6 right-8 bg-green")}),u("div",{className:C(Oi,"top-3 right-4 bg-green-light")}),p("div",{className:C($i,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(R,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),$e([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Fi={black:"bg-black",white:"bg-white"},Ui=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(I,{className:C("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(xe,{className:"h-full",padding:o,title:u(R,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(q,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:$e([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(Te,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Hi)]}):null,a?p(Te,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Hi=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Fi[e]}`},String(t)),Wi={1:"grid-cols-1",2:"grid-cols-2"},Xi=x((({className:e,padding:t,additionalDescription:l,cardsList:n=[],columnsMode:a=1,description:i,image:r,title:s,...o})=>u(I,{className:C("text-left",e),padding:"p-0",...o,children:p(xe,{className:"h-full",defaultPadding:"p-xl",padding:t,title:s?u(B,{headingType:"h4",as:"h3",className:"mb-m z-10",title:s}):null,rightImage:r?.src?u(q,{image:r}):null,children:[p("div",{className:"flex justify-between mb-m",children:[i?u("div",{className:"w-1/3",children:u(Te,{size:"text-h6",children:i})}):null,l?u(Te,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:l}):null]}),n.length?u("ul",{className:C("list-none m-0 p-0 grid gap-xs",Wi[a]),children:Ki(n)}):null]})}))),Ki=e=>e.map(((e,t)=>p("li",{children:[e?.parameter?u("div",{className:"inline pr-xs",children:u(Te,{size:"text-h6",children:e.parameter})}):null,e?.parameterDescription?u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(t)))),Yi="hidden xl:block absolute w-full h-full border border-white",Gi=x((({className:e="",...t})=>{const l=ie(),{text:n,href:a,target:i,onClick:r}=l(t);return n?u("div",{className:C("flex relative group/link pl-s pb-s min-w-[16rem] xl:min-w-[20rem]",e),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:C("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10"),role:"link",href:a,target:i,onClick:r,children:[u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:n}),u(q,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:C(Yi,"-bottom-1.5 -left-1.5")}),u("div",{className:C(Yi,"-bottom-3 -left-3")})]})}):null})),qi=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(I,{className:C("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u(R,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(R,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Ji(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Ji=(e,t="")=>{const l=Math.ceil(e.length/10);return u(Di,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:new Array(l).fill(null).map(((t,l)=>u("div",{className:C("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(10*l,10*(l+1)).map(((e,t)=>u(Gi,{...e},String(t))))},String(l))))})},Zi=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=ie({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:C("block",e),...t?i:{},children:a})})),Qi=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],er=x((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Qi.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),c=Le(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=C("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:C("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:$e(c,{className:C(a||s?"basis-full":""),buttonClassName:d})}),r?u(Te,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),tr=x((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:g=true,isImageSecondary:f=!1}={},...b})=>u(I,{className:C("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(Zi,{href:a,target:c,className:"h-full",children:p(xe,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(R,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...Qe(Le(i)?u(q,{image:i}):null,x),buttons:o.length?u(er,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:g,isImageSecondary:f,imageAlign:"center",children:[u(_e,{benefits:h}),u(We,{items:r,isDotted:s,listItemSize:"S"}),lr(n,m)]})})}))),lr=(e,t)=>e?u(M,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,nr=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const ar=x((({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 u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),ir=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(Te,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(Te,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:$e(a)}):null]},String(t))},rr=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(ir),o=s.slice(0,1),c=s.slice(1);return p(I,{className:C("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[Le(n)?u("div",{className:"self-center",children:u(q,{image:n})}):null,t?u(B,{className:C("pt-xs",l),headingType:"h5",title:t}):null,a?u(de,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(nr,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(ar,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?sr:null}):null]})})),sr=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(E,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),or="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",cr="border-gray border-solid border",dr="border-main-divider border-b",mr="w-52",hr=x((({icon:e,image:t,title:l,link:n})=>p("div",{className:C("w-80 box-border flex flex-col gap-m items-center rounded-t-md border-b-0 p-2xl",cr,or),role:"columnheader",children:[e&&!t?.src&&u(q,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}),t?.src&&u(q,{image:t}),l?u(B,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&u("div",{className:"mt-auto w-full",children:u(de,{href:n.href,target:n.target||"",className:"w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"text-xs font-light font-medium py-s",children:n.text})})})]}))),ur={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},pr=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:ur[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),xr=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex gap-xl",children:e})}))),gr=x((({colHeaders:e,activeIndex:t})=>p(xr,{children:[u("div",{className:mr,role:"columnheader"}),u(pr,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(hr,{...e},String(t))))})]}))),fr=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>{const a=C("w-80 box-border flex flex-col",cr,l?"border-t-0 rounded-b-md":"border-y-0",n?or:""),i=C("mx-2xl h-full",dr,n&&t?"border-t":"",l?"border-b-0":"border-solid");return u("div",{className:a,role:"cell",children:u("div",{className:i,children:e?e.map(((e,t)=>vr(e,t,n))):null})})})),br=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),yr=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),vr=({label:e,description:t},l,n)=>p("div",{className:"first:pt-2xl pt-xl last:pb-2xl",children:[e?u("h4",{className:br(n),children:e}):null,t?u("div",{className:yr(n),children:t}):null]},String(l)),Nr=(e=!1)=>C("text-s py-2xl",dr,mr,e?"border-b-0":"border-solid"),wr=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:i})=>p(xr,{children:[e?.title?u("div",{className:Nr(i),children:e.title}):null,t?.length?u(pr,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(fr,{cell:e,isFirstRow:a,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),kr=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return p("div",{className:"relative",children:[e.map(((e,n,{length:a})=>u(wr,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?Fn({...n,btnClass:["top-28","top-12"],className:"right-7",isDisabled:!0}):null]})})),Cr=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const i=e?.map((({header:e})=>e||{})),r=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:r.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=Ln({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[i?.length?u(gr,{colHeaders:i,activeIndex:o}):null,s?.length?u(kr,{rowData:s,isColoredFirstColumn:a,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Sr=x((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:r=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!r),m=i((()=>d((e=>!e))),[]);return p(I,{className:C("overflow-hidden relative",e),defaultPadding:"p-6xl",...o,children:[u(B,{headingType:"h2",className:"text-center mb-4xl mx-auto",title:t}),u(Cr,{columns:a,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:r}),r?Ir({isShowAllRow:c,onClick:m}):null]})})),Ir=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-6xl",children:p("div",{className:"flex gap-m w-full",children:[u("div",{className:mr}),u("button",{onClick:t,className:"py-xs flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u(Te,{size:"text-xs",font:"font-medium",children:e?"Скрыть":"Показать все параметры"})})]})}),Tr=x((({className:e,contacts:t,info:l,version:n="secondary",...a})=>p(I,{className:C("flex",e),defaultPadding:"p-6xl",version:n,...a,children:[l?.length?Br(l):null,t?.length?Br(t):null]}))),Br=e=>u("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Mr({column:e,index:t})))}),Mr=({column:e,index:t})=>e?u("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>p("div",{children:[u(R,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),l?u("div",{className:"mt-xs opacity-80",children:u(M,{size:"text-m",font:"font-light",children:l})}):null,n?.href?u(de,{className:"mt-xl",...n}):null]},String(a))))},`col-${String(t)}`):null,Pr=e=>e%2!=0,Rr=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:C("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),zr=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(Rr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:C("py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u("span",{className:"text-h4 pr-s",children:t}),iconNode:l?u(q,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Vr=({isUnfolded:e,onToggle:t})=>u(zr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Ar=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(q,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(R,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:kn})]}))),Dr=["ArrowDownIcon","ArrowUpIcon"],jr="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",_r=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:C(t.length?"hidden":"block"),children:a?u(Ar,{...a}):null}),p("div",{className:C("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:C(jr),children:[Si(r,{...i.options,parent:n}),Pr(r.length)?u(ht,{className:"col-span-6"}):null]}),u(nr,{renderFoldableSection:({isUnfolded:e})=>p(ar,{className:C(jr),isUnfolded:e,children:[Si(s,{...i.options,parent:n}),Pr(s.length)?u(ht,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(zr,{className:C(l<1?"hidden":""),disabled:!s?.length,label:e,icon:Dr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),Lr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,$r=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>Lr(t[e])||Lr(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>Lr(t[e])||Lr(l[e])||Or(t[e])<=Or(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>Lr(t[e])||Lr(l[e])||Or(t[e]?.min)>=Or(l[e]?.min)&&Or(t[e]?.min)<=Or(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>Lr(t[e])||Lr(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>Lr(t[e])||Lr(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),Or=e=>Number(e||0),Er=(e,t)=>(l=ut)=>e&&e.filter((e=>$r(t,l(e.content||{})))),Fr=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Qt,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),Ur=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Hr(e))]}),n?u("div",{children:u(al,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),Hr=e=>([t,l])=>{const n=l?.type;return"array"===n?Wr(t,e)(l):null},Wr=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(Fr,{items:n,multiple:!0,...t(e)})]},e)},Xr=(e,t)=>e[t?.sourceBook]?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e));async function Kr(...e){const t=e.map((e=>rt(e)));return Promise.all(t)}function Yr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Gr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function qr(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(Gr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=at(t,Kr);return{source:Object.fromEntries(Yr(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const Jr=1e9,Zr={sum:{min:1e4,max:Jr},period:3},Qr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=qr(i.block?.blocks),[o,{field:c,reset:d}]=pt(Zr),m=Er(i.block?.blocks,o)((e=>({...e,period:Xr(r,e||{})||[]}))),h=p("div",{children:[u(ti,{label:n?.title,min:500,max:Jr,...c("sum",{parse:e=>({min:Number(e),max:Jr}),format:({min:e})=>String(e)})}),u(Sl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(I,{className:C("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Ur({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(_r,{blocksToRender:m,...i})]})})),es={type:"string",title:"Адрес справочника"};Qr.childrenTypes=["ProductTile"],Qr.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:es});const ts=[{key:"10"},{key:"50"},{key:"100"}],ls=({itemCount:e,onItemCountChange:t})=>{const l=i((({key:e})=>t(Number(e))),[]);return p("div",{className:"flex items-center gap-s",children:[u("span",{children:"Показать по"}),u(Kt,{className:"min-w-20",onChange:l,value:{key:String(e)},options:ts,iconVersion:"black"})]})},ns="py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white",as=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?u("div",{"aria-current":"true",className:"py-m px-lg bg-green-light text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-2||e<=t+2&&e>t||((e,t,l)=>t<=3&&e<=t+3||t>=l-1&&e>=l-4)(e,t,l))(i,l,a)?u("div",{onClick:()=>n(i),className:ns,"aria-label":`Страница ${i}`,children:i},String(t)):null},is={width:"24",height:"24"},rs=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=r((()=>new Array(l).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<l-1&&t(e+1)}),[e,l]),o=i((()=>t(1)),[]),c=i((()=>t(l)),[l]);return p("div",{className:"flex gap-m items-center",children:[u("div",{onClick:a,children:u(E,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ss(1===e),...is})}),p("div",{className:"flex gap-xs",children:[e>1?u("div",{onClick:o,className:ns,"aria-label":"Страница 1",children:"1"}):null,e>4?u("div",{className:"py-m px-s",children:"..."}):null,n.map(as),e<l-3?u("div",{className:"py-m px-s",children:"..."}):null,e<l?u("div",{onClick:c,className:ns,"aria-label":`Страница ${l}}`,children:l}):null]}),u("div",{onClick:s,children:u(E,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:ss(e===l),...is})})]})},ss=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",os=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>p("div",{className:"mt-3xl flex justify-between items-center select-none",role:"navigation","aria-label":"Пагинация",children:[u(rs,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?u(ls,{itemCount:n,onItemCountChange:a}):null]}),cs=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:C("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(q,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:C("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),ds=x((({field:e,onClearFilter:t,filtrationState:l})=>p("div",{className:"grid grid-cols-12 mb-3xl space-x-xl",children:[u(cs,{className:"col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),u(en,{className:"col-span-3",label:"Период от",maxDate:l.endDate,...e("startDate")}),u(en,{className:"col-span-3",label:"Период до",minDate:l.startDate,...e("endDate")}),u("div",{className:"col-span-2 mt-auto",children:u(al,{className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),ms=({title:e,timestamp:t,publicId:l})=>{const n=ie({basePath:"/"}),{href:a}=n({href:`/api/v1/depository/${l}/file`});return p("div",{className:"grid grid-cols-12 py-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:t?u(Te,{size:"text-m","font-weight":"font-light",children:El(t)}):null}),u("div",{className:"col-span-10 text-h6 hover:text-primary-active",children:u("a",{href:a,download:!0,"aria-label":"Скачать",children:e})})]},l)},hs="/api/v1/depository",us={startDate:void 0,endDate:void 0,query:""},ps=x((({className:e,...t})=>{const[l,a]=n(0),[r,s]=n(10),[o,{field:c,reset:d}]=pt(us),{totalPages:m=0,items:h=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?El(n,!0):"",r=a?El(a,!0):"",s=new URLSearchParams(hs);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=at(hs+o,st);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:l,...o}),x=i((e=>a(e-1)),[]),g=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return p(I,{className:C(e,"container p-6xl"),...t,children:[u(ds,{filtrationState:o,field:c,onClearFilter:d}),p("div",{className:"flex flex-col",children:[p("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:u(Te,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),u("span",{className:"col-span-10",children:u(Te,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),h.length?h.map((e=>u(ms,{...e},String(e.publicId)))):u(Ar,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),u(os,{currentPage:l+1,onPageChange:x,totalPages:m,itemCount:r,onItemCountChange:g})]})]})})),xs=e=>"Image"===e?.contentType&&e?.image?u(q,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,gs=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(I,{className:C("flex flex-col justify-center items-center",e),defaultPadding:C("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:xs(n)}),u(R,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(de,{version:a?.version,text:a?.text,...a}):null]}))),fs="location";function bs(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])]})(v,"location",vs()??{name:e}),r=i((e=>{Ns(e),l(e)}),[]),{data:s}=at("/api/v1/region",st);return a((()=>{s&&!ys()&&l(s)}),[s]),[t??{name:e},r]}const ys=()=>Boolean(globalThis.localStorage?.getItem(fs)),vs=()=>{try{const e=globalThis.localStorage?.getItem(fs);return e&&JSON.parse(e)}catch(e){return null}},Ns=e=>{try{globalThis.localStorage?.setItem(fs,JSON.stringify(e))}catch(e){}};var ws;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(ws||(ws={}));const ks=new Intl.NumberFormat("ru",{style:"currency",currency:ws.RUB}),Cs=e=>e?ks.format(e):"",Ss="text-left text-m font-light text-secondary-text",Is=`${Ss} pl-5xl`,Ts={USD:"DollarIcon",EUR:"EuroIcon"},Bs=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Ss,children:u(Te,{size:"text-m",children:"Валюта"})}),u("th",{className:Is,children:u(Te,{size:"text-m",children:"Купить"})}),u("th",{className:Is,children:u(Te,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Ms)})]}))),Ms=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(q,{image:{icon:Ts[t]},width:"24",height:"24"}):null,u(Te,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(Te,{size:"text-h6",children:Cs(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(Te,{size:"text-h6",children:Cs(e?.buyExchangeRate)})})]},t)},Ps={icon:"GpsIcon"},Rs=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Sn,{...Ps,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),zs=(e,t,l)=>{const n=Number(Vs(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)},Vs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),As=e=>{return(t=[[e=>e.value!==ws.RUB&&e.oppositeValue!==ws.RUB,()=>e.handleConvert(e.value,ws.RUB)],[e=>e.value===ws.RUB&&e.oppositeValue===ws.RUB,()=>e.handleConvert(e.value,ws.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Ds(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(wt,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Kt,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const js=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||ws.RUB,selectBuy:l?.[0]?.currency?.currency||ws.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Ds({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:_s(r,o,l),value:r.inputSell,setValue:e=>$s(o,l)(e,r.selectSell,r.selectBuy)}),Ds({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Ls(r,o,t),value:r.inputBuy,setValue:e=>Os(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(de,{text:a.text,version:a?.version,...a}):null]})})),_s=(e,t,l)=>n=>{t({selectSell:n}),As({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{$s(t,l)(e.inputSell,n,a)}})},Ls=(e,t,l)=>n=>{t({selectBuy:n}),As({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Os(t,l)(e.inputBuy,n,a)})},$s=(e,t)=>(l,n,a)=>{e({inputSell:Vs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(zs(l,i,n===ws.RUB)||"")})},Os=(e,t)=>(l,n,a)=>{e({inputBuy:Vs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(zs(l,i,n===ws.RUB)||"")})};const Es=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=bs(),i=function(e){const t=e?.code||"000",{data:l}=at(`/api/v1/exchangerates?regionCode=${t}`,st);return l||{}}(a),r=Fs(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:ws.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:ws.RUB}}),u(I,{className:C("box-border min-h-80",e),...n,children:u(xe,{className:"h-full",title:u(B,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Bs,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(Rs,{address:i?.address})]}),r.length&&s.length&&o.length?u(js,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),Fs=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Us=e=>dt(d.SITEMAP||"sitemap",{fallback:e}),Hs={width:"40",height:"45"},Ws={"bg-white":"color",transparent:"white"},Xs={"bg-white":"text-primary-main",transparent:"text-white"},Ks=(e,t,l)=>u(q,t?.src?{image:t,className:Xs[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Ws[e]},className:Xs[e],width:l?.width,height:l?.height}),Ys={"bg-white":"text-primary-text",transparent:"text-white"},Gs=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:C("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Ks(i,l?.image,Hs),r?n??u("div",{className:"ml-s",children:u(Te,{font:"font-medium",color:Ys[i],size:"",children:l?.title||"Россельхозбанк"})}):null]}))),qs=x((({className:e,onClose:t})=>u("button",{className:C("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(q,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function Js(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const Zs=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=new Array(e.length),a=new Array(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 Qs=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},eo=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),to=e=>t=>e.map((([e,l])=>[Zs(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>no(t,e))).reduce(Qs(Math.max,0),new Map),lo=e=>t=>{return Yr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=eo(t||"");return l.length?we(e.map((e=>fa(l.map(Zs(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},no=(e,t)=>new Map(e.map((e=>[e,t]))),ao=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=at(e?.length?e:null,io),[s,o]=n(null);return Js((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=eo(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(to(i)).reduce(Qs(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return lo(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},io=async(...e)=>(await Promise.allSettled(e.map((e=>rt(j(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),ro=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=ne(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:C("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(qs,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),so=x((({className:e,topItems:t})=>{const l=ie({isRemote:!0});return u("div",{className:C("flex items-start justify-between",e),children:t?.map(l).map(co)})})),oo=["all","footer"],co=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||oo.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(mo,{...e,basePath:o(a),index:t},String(t))))]},String(t))},mo=x((({text:e,index:t,basePath:l,...n})=>{const a=ie({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:C("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),ho=x((({initialQuery:e})=>{const{topItems:t}=Us(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=ao({basePathList:l,initialQuery:e}),s=r((()=>uo(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(ro,{head:u(cs,{autoFocus:!0,...i}),children:u(so,{topItems:s})})})),uo=e=>t=>e?.length&&t?.length?Yr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:j("/",t)})))}))):[];const po=()=>{const{open:e,close:t}=ne();return{open:(t={},l={})=>e(u(ho,{...t}),l),close:t}},xo=x((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=po(),s=i((e=>{l(e),go(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:C("relative",e),children:[u(cs,{value:t,onChange:s}),u(qs,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),go=e=>e&&e.length>=3,fo=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},bo=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(yo):null,u(de,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),yo=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(Te,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(vo)})]},String(t)),vo=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:No(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),No=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${wo(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},wo=e=>e.replaceAll(/\D/g,""),ko=x((({className:e="",index:t,text:l,...n})=>{const a=ie(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:C("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),Co=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(ko,{index:t,className:"text-l font-light max-w-[292px]",...e},String(t))))}):null}))),So=x((({className:e="",index:t,...l})=>{const n=ie({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Io=x((({className:e="",links:t})=>p("div",{className:C("@container",e),children:[u("div",{className:"pt-lg",children:u(Te,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(So,{index:t,...e},String(t))))}):null]}))),To="w-52",Bo=x((({className:e,...t})=>{const{topItems:l,logo:n}=Us(t.options?.page?.fallback),{documents:a,relatedEnterprises:i,contacts:r,socialMedia:s,mobileApps:o}=dt(d.FOOTER||"footer",{fallback:t.options?.page?.fallback});return p(I,{tag:"footer",className:e,...t,children:[p("div",{className:"flex items-stretch gap-3xl pb-3xl ",children:[u(Gs,{className:To,logo:n}),u(xo,{className:"grow"})]}),p("div",{className:"flex items-stretch gap-6xl",children:[p("div",{className:C(To,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[u(bo,{items:r}),u(er,{media:s,children:"Соцсети"}),u(er,{media:o,showButtonText:!1,children:"Мобильное приложение"}),u(de,{version:"link",href:"https://old.rshb.ru",className:"!text-left text-s font-light",onClick:fo,children:"Вернуться на прежнюю версию сайта"})]}),u(so,{className:"flex-grow",topItems:l})]}),u(Co,{className:"mt-xl",links:i}),u(Io,{links:a})]})})),Mo=x((({className:e="",title:t,description:l,calendar:n,...a})=>p(I,{className:C("space-y-m",e),defaultPadding:"p-6xl",...a,children:[u(R,{title:t,description:l,headlineVersion:"M",isEmbedded:!0}),n?Po(n):null]}))),Po=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return p("div",{className:"w-full flex flex-col justify-center gap-s",children:[u("div",{className:"flex w-full text-h6 text-center",children:l.map((e=>Ro(e,t)))}),u("div",{className:"flex gap-s w-full",children:l.map(((e,t)=>p("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex gap-s",children:zo(e)}),p("div",{className:"text-s",children:[u(Te,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",u(Te,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Ro=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),zo=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:u(q,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Vo=e=>({href:t})=>!!t&&D(V(t)?e.href:e.pathname).startsWith(D(t));function Ao(e=[]){const t=z(),l=e.findIndex((e=>Vo(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const Do=x((({className:e="",active:t,flat:l,children:n,...a})=>{const i=ie({isRemote:!0}),{href:r,target:s,text:o,onClick:c}=i(a);return u("a",{className:C(jo(t,l),e),href:r,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:_o(t,l),children:o||n})})})),jo=(e=!1,t=!1)=>C("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-m py-xs"),_o=(e=!1,t=!1)=>C("font-sans text-s font-light",e?"text-primary-main":C(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover");const Lo=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u($o,{...e},String(t))))})]}):null,$o=x((({icon:e,...t})=>{const l=ie(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(q,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(Te,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Oo=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(Te,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),Eo=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Fo=x((()=>{const{defaultLocation:e,foreignOffices:t}=Us(),[l,a]=bs(e),[r,s]=n(""),o=Ho(function(){const{data:e}=at("/api/v1/regions",st);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((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})(o,Uo),{close:d}=ne(),m=i((e=>{a(e),d()}),[]);return p(ro,{className:"pb-20",head:p("div",{children:[u(Te,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(Te,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(Te,{color:"text-primary-main",children:l.name})})]}):null,u(Eo,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&Zs(e.toLowerCase())(r.toLowerCase())>=.8)).map(Oo(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(Te,{size:"text-h6",children:e})}),t.map(Oo(h))]},e)))}),Lo(t)]});var h})),Uo=e=>e.name?.charAt(0)||"",Ho=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Wo={default:"w-6 h-6",large:"w-12 h-12"},Xo=x((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:i,image:r,onClick:s})=>u("button",{className:C("group/btn border-0 flex shrink-0 items-center",n?"p-s rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Wo[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:s,children:u(q,{image:r,className:C("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Ko=x((({className:e,version:t,officesLink:l,defaultLocation:n})=>{const a="transparent"===t?"white":"black",[r]=bs(n),s=po(),o=i((()=>s.open()),[]),c=(()=>{const{open:e,close:t}=ne();return{open:(t={})=>e(u(Fo,{}),t),close:t}})(),d=i((()=>c.open()),[]);return p("div",{className:C("flex items-center gap-lg",e),children:[u(Do,{flat:!0,href:"#",text:r?.name,onClick:d}),l?u(Do,{flat:!0,href:l,text:"Офисы и банкоматы"}):null,u(Xo,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:"Поиск",onClick:o})]})})),Yo=x((({className:e="",items:t,activeItem:l})=>{const a=ie(),[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),c=Ut(i((()=>s(!1)),[]));return p("div",{className:C(r?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[u("button",{className:"group/btn flex justify-between items-center h-6","aria-label":""+(r?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>u("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),u("div",{className:C("absolute flex flex-col rounded-md bg-white p-xl pb-xs",r?"":"hidden"),"aria-hidden":!r,children:t?.map(((e,t)=>{const{text:n,...i}=e,{href:r,target:s,onClick:o}=a(i);return u("a",{className:C("text-l font-light pb-m hover:text-primary-main",e===l?"text-primary-main":""),href:r,target:s,onClick:o,children:n},r||String(t))}))})]})})),Go=e=>globalThis[e];function qo(e,t){const[l,r]=n(),s=i((()=>r(Go(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Go(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const Jo={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Zo=x((e=>{const[t,{setTrue:l}]=Ot();return t?u(Qo,{...e}):ec({...e,onClick:l})})),Qo=x((({chat:e="personal",...t})=>((e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),qo("chatbot",Jo[e])})(e),ec(t)))),ec=({className:e,iconVersion:t,onClick:l})=>u(Xo,{className:C("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l,buttonSize:"large",isGrayBg:!0}),tc=x((({className:e="",active:t,dataItemName:l,children:n,...a})=>{const i=ie(),{href:r,target:s,text:o,onClick:c}=i(a);return p("a",{className:C("relative inline-block bg-transparent text-center no-underline",e),href:r,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:lc(t),children:o||n}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),lc=(e=!1)=>C("font-sans text-l font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),nc=x((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const r=N(i((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:r,className:n,children:u(tc,{...a,children:l})})})),ac={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},ic=x((({version:e,internetBankUrl:t})=>t?u(de,{href:t,ariaLabel:"Интернет-банк",target:"_blank",className:C("py-s ml-s text-l font-light whitespace-nowrap hover:text-primary-main",ac["transparent"===e?"transparent":"default"]),children:"Интернет-банк"}):null)),rc=["all","header"],sc=x((({subItems:e=[],version:t,internetBankUrl:l})=>{const a="transparent"===t?"white":"black",i=z(),o=r((()=>e.filter((e=>!e.displayArea||rc.includes(e.displayArea.toLowerCase())))),[e]),c=(e=>(t=[])=>{const l=t?.filter(Vo(e));return l?.length?ga((e=>e.href?.length||0))(l):void 0})(i)(e),[m,h]=n(o.length),x=o.slice(m),g=s(null),f={rootRef:g},b=r((()=>o.map(((e,t)=>e=>{h(e?oc(t):cc(t))}))),[o]);return p("nav",{className:"relative mt-s flex items-center justify-between",children:[u("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl",children:o.map(((e,t)=>u(nc,{className:m-1<t?"invisible":"",active:e===c,observerOptions:f,onVisibilityChange:b[t],...e},String(t))))}),x.length?u(Yo,{className:"relative w-auto z-40",items:x,activeItem:c}):null,p("div",{className:"flex",children:[d.CHAT_BOT?u(Zo,{className:"ml-4xl",iconVersion:a,chat:d.CHAT_BOT}):null,u(ic,{version:t,internetBankUrl:l})]})]})})),oc=e=>t=>Math.max(t,e+1),cc=e=>t=>Math.min(t,e),dc={"bg-white":"primary",transparent:"transparent"},mc=x((({className:e,bgColor:t="bg-white",version:l=dc[t],...n})=>{const{topItems:a,logo:i,officesLink:r,defaultLocation:s}=Us(n.options?.page?.fallback),[,o]=Ao(a),{internetBankUrl:c}=dt(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(I,{tag:"header",className:C("pt-3xl px-20",o?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...n,children:p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(Gs,{className:"mr-3xl",bgColor:t,logo:i}),a?.map(((e,t)=>u(Do,{active:e===o,...e},String(t)))),u(Ko,{version:l,className:"ml-auto",officesLink:r,defaultLocation:s})]}),u("div",{className:C("mt-xl h-px bg-main-divider","transparent"===l?"opacity-30":"")}),o?.items?.length?u(sc,{subItems:o.items,version:l,internetBankUrl:c}):null]})})})),hc={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},uc=x((({className:e="",padding:t="p-0",gap:l="XS",version:n="transparent",isTheme:a=!1,isCardBorder:i,...r})=>u(I,{className:C("relative","grid grid-cols-12",hc[l],e),padding:t,version:n,isTheme:a,...r,children:Ii({...r,extraProps:{className:Ti(i)}})})));uc.childrenTypes={exclude:["HorizontalLayout"]};const pc=x((e=>{const{className:t,image:l,...n}=e;return u(I,{className:t,defaultPadding:"p-0",...n,children:u(q,{image:l})})})),xc=x((({className:e="",cards:t=[],button:l})=>{const[a,r]=n(0),s=i((e=>r(e)),[]),o=t.length,[c,d]=Ln({itemCount:o,visibleItemCount:2}),{canDec:m,canInc:h}=d,x=t[c]?.href;return p("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[p("div",{className:"relative overflow-hidden",children:[o?gc({activeIndex:c,cards:t,selectedCardIndex:a,onClick:s}):null,Fn({...d,btnClass:["left-12","right-12"],className:"top-16"}),m?u("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),u(de,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function gc({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:u("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return p("button",{type:"button",onClick:n,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u(q,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-s",children:[e?.sum?fc("страховая сумма",e.sum):null,e?.fee?fc("страховой взнос",e.fee):null]}),bc(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function fc(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p(Te,{size:"text-h6",children:[Xe(2)(t)," ₽"]}),u("div",{className:"mt-2xs",children:u(Te,{size:"text-l",color:"text-secondary-text",children:e})})]})}function bc(e){return e?u(q,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const yc=x((({className:e="",title:t,insuranceTabs:l=[],button:a,...r})=>{const[s,o]=n(0),c=i((e=>o(e)),[]);return p(I,{className:C("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?u(B,{className:"text-center",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return u("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-m py-s text-m font-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))}):null,u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:vc({insuranceTabs:l,button:a})})]})})),vc=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(xc,{button:t,cards:e},String(l)))):null};const Nc=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),wc={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},kc={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},Cc=x((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),u(I,{className:t,defaultPadding:"p-4xl",...r,children:p("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[Nc(u("div",{className:"w-px h-4 bg-gray"}))(s.map(Sc)),u("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-xs mx-3xl"}),u("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Bc)})]}):null,l?.length?u(We,{className:"max-w-[657px]",items:l,isDotted:n,listItemSize:"M"}):null]})})})),Sc=(e,t,l)=>{const n=1===t,a=t===l.length-1;return u("div",{className:`${Ic(n,a,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-2xs min-w-72":""),children:e.cells.reverse().map(Tc)}):null},`column_${t}`)},Ic=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-s",l.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Tc=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-xs ${kc[l]} ${wc[n]} ${"XS"===l?"px-s":"px-5xl"}`,children:u(Te,{align:"text-center",children:e.text})},`cell_${t}`):null},Bc=(e,t)=>e?.title?u("div",{className:"flex-1 max-w-[180px] text-center px-xs last:pr-3xl",children:e.title},`title_${t}`):null,Mc=["байт","Кб","Мб","Гб","Тб","Пб"],Pc=x((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=a||i?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(Te,{size:"text-l",font:"font-light",children:[t,u(Te,{color:"text-secondary-text",children:l&&`${s} ${r} ${o}`})]}):null]})})),Rc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},zc=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=z();return p(I,{className:C("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(R,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:C("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Rc[r]),role:"list",children:a.map(Vc(o,i))}):null]})})),Vc=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?L(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Mc[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"!==l?.docType?l?.fileFormat:"";return u("div",{role:"listitem",children:u(Pc,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(q,{className:"min-w-6 min-h-6",image:t,width:"24",height:"24"}):null})},String(n))},Ac=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",x=i?.src?u(q,{className:"hidden lg:block",image:i}):null;return u(I,{className:C("min-h-80",e),padding:"p-0",version:d,...m,children:p(xe,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(B,{headingType:"h3",title:c,className:C("whitespace-pre-wrap",l)}),rightImage:x,buttons:$e(n,{className:"flex-wrap"}),children:[a?u(Te,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:C("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(We,{items:r,listItemSize:"M"}),u(Te,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:C("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(q,{className:"w-fit",image:s})}):null,i?.src?u(q,{className:"lg:hidden",image:i}):null]})]})})})),Dc={primary:"bg-white/30",secondary:"bg-main-divider"},jc={primary:"text-white",secondary:"text-secondary-text"},_c=x((({count:e,version:t="secondary"})=>u("div",{className:C("w-6 h-6 rounded-full flex items-center justify-center",Dc[t]),children:u(Te,{size:"text-xs",color:jc[t],children:e})}))),Lc=(e=[],t={})=>e.filter((({content:e={}})=>$r(t,e))).length,$c=(e,t)=>e===t;const Oc=(Ec=function(...e){return(t,l)=>e.some((e=>e(t,l)))}($c,((e=$c)=>(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])=>Ec(l,t[e])))));var Ec;const Fc=[],Uc={},Hc={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Wc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Xc={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Kc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Yc=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:C("h-12","block flex-1","cursor-pointer",Hc[n],l?Kc[n]:Xc[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:C("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Wc[n]:"text-secondary-text hover:text-primary-main"),children:[u(Te,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Gc=x((e=>u(e?.item?.href?qc:Jc,{...e}))),qc=x((e=>{const t=ie(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Yc,{...e,tag:"a",item:a,onClick:n})})),Jc=x((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Yc,{item:e,onClick:n,...l})})),Zc=(e,t,l)=>(n,a)=>u(Gc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Qc=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:C("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(Zc(n,a,t))}))),ed={categories:[],extraOptions:[],propertyType:[],stage:[]},td=x((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=pt(ed),m=Er(a.block?.blocks,s)(),h=i(((e=ed)=>d(e)),[]),x=(({hotFilters:e=Fc,filtrationState:t=Uc,blocks:l=Fc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Oc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(_c,{version:t===e[a]?"primary":"secondary",count:Lc(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(I,{className:C("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(Qc,{...x}),Ur({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(_r,{blocksToRender:m,...a})]})}));function ld(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}td.childrenTypes=["ProductTile"],td.childSchema=e=>e?.filtrationSchema||{};const nd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},ad=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(nd).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),id={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},rd=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(id).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(E,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),sd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},od=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(sd).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(E,{name:l,width:"20",height:"16"})})})),cd={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},dd=[55.753995,37.614069],md=x((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=qo("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[o,c]=n(),m=e?hd(e):dd;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:m,zoom:l,controls:[],suppressMapOpenBlock:!0}),ld(r,i.current,e))})),i.current&&r&&(ld(r,i.current,e),e?.length||i.current.setCenter(dd))}),[r,i,e,m,l]),!r)return null;const h=o?"z-[100000]":"z-10";return p("div",{id:"map",className:C(!o&&"relative","w-full",t),children:[u("div",{className:C("absolute flex left-2 top-4 w-1/2",h),children:ad(m)}),u("div",{className:C(Object.values(cd),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(E,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:C("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[u(od,{yandexMaps:i}),u(od,{yandexMaps:i,direction:"out"})]}),rd(i.current,r,C("right-2 top-80",h))]})})),hd=e=>[pd(ud(e,0)),pd(ud(e,1))],ud=(e,t)=>e.map((e=>e[t])),pd=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,xd={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},gd=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-wrap gap-3xl pb-2xl",children:e.map((e=>u($l,{text:xd[e],...t(e)},e)))}):null,u(de,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(E,{name:"CloseIcon",width:"16",height:"16"})})]}),fd=()=>null,bd=()=>[],yd=x((({className:e,data:t=[],renderCard:l=fd,filterItems:n=bd,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=pt(a),d=n(t,s),m=d.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length)),h=d.length;return p("div",{className:C("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"pt-6xl px-6xl",children:[p("div",{className:"flex gap-xs pb-2xl",children:[u(B,{headingType:"h2",children:r}),h?u(Te,{size:"text-h2",color:"text-secondary-text",children:`(${h})`}):null]}),i?vd(i):null,gd(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(md,{points:m,className:"h-full"})})})]}),d.map(l)]})})),vd=({description:e,list:t})=>e||t?.length?p("div",{className:"p-xl mb-2xl border border-gray rounded-md",children:[e?u(M,{size:"text-l",font:"font-light",children:e}):null,t?.length?u("div",{className:"flex gap-2xl flex-wrap pt-xs",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(q,{image:e.image}):null,e?.text?u(Te,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,Nd={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"}},wd=x((({className:e,children:t,color:l="gray"})=>u("div",{className:C("p-s border border-gray rounded-md flex items-center",Nd[l].border,e),children:u(Te,{size:"text-m",color:Nd[l].text,children:t})}))),kd=x((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:Cd({textItems:a,subText:t,children:l,...n})})),Cd=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:C("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(Te,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(Te,{size:"text-l",children:e.trim()},String(t)))),a?u(Te,{color:n,size:"text-m",children:a}):null]}),Sd=x((({className:e,children:t})=>u("div",{className:C("flex border-t border-solid border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Id=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Bd(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Te,{size:"text-h4",children:Bd(e)}),u(wd,{color:"green",children:Bd(s)})]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(E,{name:"GeolocationIcon",width:"24",height:"24"}),u(Te,{size:"text-l",children:t})]}):null,u(Sd,{className:"flex-wrap",children:c?.map(Td)})]},String(o))},Td=(e,t)=>u(kd,{...e},String(t)),Bd=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Md=[];const Pd=async e=>await rt(e,{method:"GET"})||Md,Rd={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},zd={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Vd=x((({data:e,className:t})=>{const[l]=bs(),n=function(e){const{data:t=Md}=at(`/api/v1/atms?regionCode=${e}`,Pd);return t}(l?.code??"000");return u(yd,{className:t,filterItems:Ad,data:n,initFilterState:Rd,renderCard:Id,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),Ad=(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=>zd[t](e))),l=!n.length||n.some((t=>zd[t](e)));return t&&l}))},Dd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[jd({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),jd({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(kd,{label:"Режим работы",value:a,className:"max-w-none"})},jd=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",_d=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Ld=e=>_d.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??"")}}))),$d=e=>{if(!e)return null;const t=Od(e);return p(Sd,{className:"border-none",children:[u(kd,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map(Ed)})}),u(kd,{label:"Режим работы",className:"max-w-none",children:u(Te,{children:e})})]})},Od=e=>{const t=_d.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},Ed=({short:e,status:t},l)=>u("div",{className:C("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:u(Te,{size:"text-xs",children:e})},String(l)),Fd=(new Date).getDay(),Ud=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=Ld(o),h=o?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(Te,{size:"text-h4",children:e}),Wd(m)]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(E,{name:"GeolocationIcon",width:"24",height:"24"}),u(Te,{size:"text-l",children:t})]}):null,p(Sd,{className:"flex-wrap",children:[u(kd,{label:"Факс",value:n}),u(kd,{label:"Телефон филиала",value:l}),u(kd,{label:"Для обращений юридических лиц",value:a}),u(kd,{label:"Обслуживание физических лиц",value:i}),u(kd,{label:"Для консультаций по валютному контролю",value:s}),u(kd,{label:"Контакт-центр",value:r})]}),o.isMatchesPattern?u(Sd,{children:u(kd,{label:h,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:m?.map(Xd)})})}):p(Sd,{children:[u(kd,{label:h,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:m?.map(Ed)})}),Dd(m)]}),o?.businessScheduleVisibleTag?$d(o?.businessScheduleDescription):null,c?.currencies?.length?u(Sd,{className:"flex-wrap",children:c?.currencies?.map(Hd)}):null]},String(d))},Hd=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(kd,{label:"Валюта",value:e.currency}):null,t?u(kd,{label:"Купить",value:String(t)}):null,l?u(kd,{label:"Продать",value:String(l)}):null]},String(n)),Wd=e=>{const[t]=e?.slice(Fd-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(wd,{color:"green",children:a}):null,l&&i?u(wd,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(wd,{color:"red",children:"Выходной"})},Xd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(kd,{label:e,value:t&&l?l:"",subText:Kd(n,a,t),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Kd=(e,t=!1,l=!1)=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Yd=[];const Gd=async e=>await rt(e,{method:"GET"})||Yd,qd={workingSaturday:!1},Jd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},Zd=x((({className:e})=>{const[t]=bs(),l=function(e){const{data:t=Yd}=at(`/api/v1/branches?regionCode=${e}`,Gd);return t}(t?.code??"000");return u(yd,{className:e,filterItems:Qd,data:l,initFilterState:qd,renderCard:Ud,title:`Офисы филиала ${t?.name}`})})),Qd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Jd[t](e)))))},em=x((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(I,{version:"transparent",className:C(t),defaultPadding:"p-0",...l,children:"offices"===n?u(Zd,{}):u(Vd,{data:e})})})),tm=x((({text:e,size:t,align:l,font:n,children:a,...i})=>u(I,{defaultPadding:"p-0",...i,children:u(M,{size:t,align:l,font:n,children:e||a})}))),lm=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(I,{className:C("box-border",e),...n,children:[u(R,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:nm()})]}))),nm=(e=3)=>im(100,e).map((e=>Math.floor(e))).map(am),am=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),im=(e,t)=>[e].concat(t>0?im(e/1.618,t-1):[]),rm=x((({className:e="",padding:t,slides:l=[],...a})=>{const[i,r]=n(0);return p(I,{className:C("box-border overflow-hidden",e),defaultPadding:"py-6xl",padding:t,...a,children:[u("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:l.map((({productBlock:e},t)=>u("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:u(Ze,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),u("div",{className:"h-28 px-xs mt-m -mb-m flex gap-xs box-border",children:l.map(sm({activeSlideIndex:i,onClick:r}))})]})})),sm=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:py-xl backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return p("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:C("relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50",i),children:[u("div",{className:r,children:l?.title}),u("div",{className:s,children:l?.description})]},String(n))},om=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(I,{className:C("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[Le(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(q,{image:r})}):null,s?u(B,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?cm(i):null,dm({label:"Адрес",data:e,iconName:"GeolocationIcon"}),dm({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),dm({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?$e([n]):null]})]}))),cm=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Se,{__html:e})}),dm=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(E,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(Te,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(Te,{size:"text-xl",color:n,children:t})]})]}):null,mm=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(I,{defaultPadding:"p-0",...n,children:u(Se,{__html:t,richVersion:l})})})),hm=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(Rr,{tag:"button",className:C("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?u(Te,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(E,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),um=x((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(I,{className:C("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(nr,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(ar,{className:C("gap-lg","grid grid-cols-12 [&>*]:pb-m"),isUnfolded:e,children:Ii({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>pm({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));um.childrenTypes={exclude:["RollupItem"]};const pm=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=(e=>e?"MinusIcon":"PlusIcon")(a);return"accordion"===e?u(hm,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(zr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},xm=x((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:C("order-4",e),children:[u(on,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(on,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),gm=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Kt,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),fm=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(gm,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(gm,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),bm=["От 1 дня","До 365 дней"],ym=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(Te,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(Sl,{min:1,max:365,value:e,items:bm,onChange:t})]}))),vm=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(gm,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(gm,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Nm=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(fm,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:wm(c)}),u(ym,{days:a,setDays:e=>c({days:e})}),u(vm,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:km(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(xm,{}),u(de,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),wm=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},km=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Cm=x((({days:e,tariffs:t=[]})=>{const l=Im(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Sm("Аренда за",e),Sm("Цена",l+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(M,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),p("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[u(q,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(M,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),Sm=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(Te,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Im=(e,t)=>{const l=Tm(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Tm=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},Bm=(e,t)=>e.find((e=>e.branchCode===t)),Mm=x((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Bm(n,l.selectedBranch),o=Pm(s?.safeBoxCaseVolumes),c=Rm(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=zm(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(Nm,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(Cm,{days:l.days,tariffs:d})]})})),Pm=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Rm=(e,t)=>e?.find((e=>e.volume===t)),zm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Vm=[];const Am=async e=>await rt(e,{method:"GET"})||Vm,Dm=x((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=yt(),h=jm(c.selectedRegion,m),x=function(e){const{data:t}=at(e?`/api/v1/safeboxes?regionCode=${e}`:null,Am);return t||Vm}(h),g=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Bm(x,c.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(I,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(B,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Mm,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u(M,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(md,{points:f,className:"h-[640px]"}):null]})})),jm=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,_m=({styleMap:e,isMainButton:t,version:l})=>(n,a,i)=>{const{label:r,description:s,button:o,items:c,isDotted:d}=n;return p("div",{className:C("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",Lm(i.length)),children:[p("div",{className:"space-y-xs",children:[r?u(Te,{size:"text-h6",align:"text-center",children:r}):null,p("div",{className:"flex flex-col items-center gap-3xs",children:[s?u("div",{className:e.description,children:s}):null,u(We,{className:e.description,items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(de,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...o,children:o?.text}):null]},String(a))},Lm=e=>e<5?"w-72":"w-52",$m={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"},Om=x((({buttons:e,className:t="",description:l,showLines:n=!0,size:a="normal",steps:i=[],stepVersion:r="gray",title:s,version:o="primary",...c})=>{const d=i.length>3,m=$m,h=(e=>e?"":"opacity-0")(n),x=(e=>e<5?"px-24":"px-16")(i.length),g=Boolean(e?.every((e=>e?.text)));return p(I,{className:C("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:o,...c,children:[u(R,{headlineVersion:"S",title:s,description:l,isEmbedded:!0,className:"w-full",align:kn}),i?.length?p("div",{className:"box-border space-y-lg",children:[u("div",{className:C("flex items-center",x),children:Nc(u("div",{className:C("h-0.5 w-full bg-secondary-light flex-1",h)}))(i.map(Em(m,a,r)))}),u("div",{className:C("flex justify-between",d?"gap-x-s":"gap-x-20"),children:i.map((f={styleMap:m,isMainButton:g,version:o},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return _m(f)(e,t,l);case"rte":return u("div",{className:C("text-center",Lm(l.length)),children:u(Se,{__html:e.__html})},String(t));default:return null}}))})]}):null,$e(e)]});var f})),Em=(e,t,l)=>({icon:n},a)=>{const i="secondary"===l?"white":"color";return u(I,{defaultPadding:"",className:`${Fm(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:l,children:Le(n)?u(q,{image:{...n,iconVersion:n?.iconVersion||i},width:"48",height:"48"}):u("span",{className:C("text-h4","transparent"===l?e.iconText:Um(l)),children:a+1})},String(a))},Fm=e=>"normal"===e?"h-24 w-24":"h-16 w-16",Um=e=>"secondary"===e?"group-data-primary:text-white":"text-secondary-text",Hm=x((()=>u("div",{}))),Wm=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=false,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=gi({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:C(e,"vertical-list"===o?"relative h-full":""),children:[u(oi,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(ui,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Xm=x((({listType:e,showDots:t,options:l,version:n,...a})=>u(I,{version:n,defaultPadding:"p-0",...a,children:u(Wm,{listType:e,showDots:t,version:n,children:Ii({...a,options:l})})})));Xm.childrenTypes={exclude:["SwipeListControlBlock"]};const Km="hidden sm:flex absolute z-40 top-0",Ym=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=gi({itemCount:t?.length||0});return p("div",{className:C("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(oi,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(Zc(l,n,a))}),r.canScrollLeft?u(On,{className:C("left-6",Km),onClick:r.scrollLeft}):null,r.canScrollRight?u(En,{className:C("right-6",Km),onClick:r.scrollRight}):null]})})),Gm=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Qc,{...t});case"centered":return u("div",{className:"flex",children:u(Qc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Ym,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},qm="tab",Jm=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=z(),{isReady:d}=c,m=r((()=>l.map(Qm)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),Zm(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&v.subject("tab",{type:e.type,label:e.ref})}),[l,h]);const x=i((e=>{const t=m.indexOf(e),n=l[t];p(t),Zm(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(qm,e.name):t.delete(qm),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(I,{className:C(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Gm({items:m,value:m[h],tabsMode:s,onChange:x})})})),Zm=e=>{"group"===e.type&&v.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&v.fire("tab",{type:e.type,label:e.href})},Qm=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,eh=x((({className:e="",isOpen:t,onClick:l})=>u(de,{className:e,appendRight:u(q,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),th={Buttons:({buttons:e})=>$e(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(q,{image:e}):null,List:({isDotted:e,...t})=>u(We,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:e}):null,t?u("div",{children:u(Te,{size:"text-s",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(eh,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},lh=x((({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 nh({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),nh=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in th))return null;return u(th[l],{...t,...n})},ah=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(lh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),ih=(e,t)=>140*we(e.slice(0,t).map((e=>e?.cols?.length??1))),rh=(e,t)=>e?.length>0?u("div",{className:C("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 text-h6 mx-lg",children:e},String(t))))}):null,sh=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=Ln({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map((a=l,(e,t)=>{if(!e?.length)return null;const[l,...n]=e,i=C("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?u("div",{className:"text-xl font-light w-56 min-w-56 py-lg",children:l.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${ih(n,a)}px)`},children:n?.map(((e,t)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u("div",{className:"text-xl font-light",children:e.data}):null,e?.cols?rh(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Fn({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),oh=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(Te,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(sh,{rows:t.rowsData})})})]},n)}))}))),ch=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl font-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(de,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:u(E,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function dh(e){const t=await fetch(e);return await t.json()}const mh=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=at(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),dh);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(ch,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(oh,{activeTabIndex:r,items:c}),u(eh,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(eh,{onClick:l,isOpen:!0})]})})),hh=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:C("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(mh,{...t,onClick:l})}):null]}))),uh=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(hh,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:C("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center text-primary-text",role:"cell",children:[e?.icon?u(q,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?u(Te,{size:"text-m",font:"font-light",children:e?.title}):null]})}),t?.length?u(pr,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(ah,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})})),ph=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,Fn({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),xh=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Ln({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(uh,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(I,{className:C("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(R,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(nr,{renderFoldableSection:({isUnfolded:e})=>p(ph,{controls:m,children:[x,u(ar,{isUnfolded:e,children:g})]}),renderFoldButton:Vr}):u(ph,{controls:m,children:h})})]})})),gh=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(I,{className:C("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?fh():null,"big"===n?bh(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(Te,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?yh(l):null,r?.length?vh(r,!0):null,i?u(Se,{__html:i}):null]})]}))),fh=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),bh=e=>e?.src?u(q,{className:"h-fit flex-shrink-0",image:e}):null,yh=e=>u(M,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),vh=(e,t)=>u("ul",{className:C("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(Te,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),Nh=x((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,...s})=>u(I,{className:C("relative flex flex-col",hc[l],e),padding:t,version:a,isTheme:i,...s,children:Ii({...s,extraProps:{className:C("w-full",Ti(r)),padding:n?"":"p-0"}})})));Nh.childrenTypes=[];const wh=e=>(e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",kh=x((({className:e,title:t,url:l,previewImg:n,...a})=>{const i=z();return p(I,{className:e,defaultPadding:wh(e),...a,children:[u(R,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:L(i)(n?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:L(i)(l)})}):null]})})),Ch={AdTile:ht,ApplicationForm:Nn,BenefitsBlock:In,Bonus:Bn,BonusBenefitsBlock:Dn,ButtonsBlock:_n,Calculator:Ja,CardTransfer:ai,Carousel:Di,CarouselBankHistoryCard:ji,CarouselCard:Ei,CarouselCatalogCard:Ui,CarouselInvestmentCard:Xi,CarouselLinks:qi,CarouselRecommendationCard:tr,CarouselTariffsCard:rr,ComparisonTable:Sr,ContactsBlock:Tr,DepositFiltration:Qr,Depository:ps,ErrorBlock:gs,ExchangeRateTile:Es,Footer:Bo,GracePeriod:Mo,Header:mc,Headline:R,HorizontalLayout:uc,ImgBlock:pc,InsuranceAmountBlock:yc,InvestmentInfo:Cc,LinkDocs:zc,MobileAppTile:Ac,MortgageFiltration:td,OfficesAtmsMap:em,ParagraphBlock:tm,Placeholder:lm,ProductBlock:tt,ProductGallery:rm,RepresentativeOfficeInfo:om,RichTextBlock:mm,RollupItem:um,SafeDepositRental:Dm,StepsBlock:Om,StickyBottomMenu:Hm,SwipeListControlBlock:Xm,Tabs:Jm,TariffsTable:xh,TextBlock:gh,VerticalLayout:Nh,Video:kh};const Sh=["Header","Footer"],Ih=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Th(e=globalThis){const t=s(new Map);a((()=>k.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),a((()=>{const l=((e,t=600)=>{let l;const n=(...a)=>{n.dispose(),l=setTimeout((()=>{e(...a)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{!function(e){const t=`#${l=e?.anchor,l?.replace("#","")||""}`;var l;globalThis.location?.hash!==t&&globalThis.history?.replaceState(globalThis.history?.state,"",t)}(globalThis.scrollY>3*globalThis.innerHeight/4?function(e){const t=e.filter((([e])=>!Sh.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?ya(Ih)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Bh="cookie",Mh=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=Ot();Js((()=>{globalThis.localStorage?.getItem(Bh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Bh,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(M,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(Zi,{isRemote:!0,className:Ph(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(Zi,{isRemote:!0,className:Ph(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(qs,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Ph=e=>C("inline mx-2xs",e?"text-green-dark":"");function Rh(e){throw new Error(e)}const zh=({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((()=>v.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Rh(e)}}))),[c,d]),l},Vh=x((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=zh({onCloseAll:e,onClose:t}),{close:n}=ne(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Ft(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?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:C("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Ah=x((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>v.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Rh(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Ft(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Dh=h();const jh=x((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:_h()}))),_h=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Lh("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),Lh("M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z")]}),Lh=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),$h=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Dh.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Dh.like(e))}),[e]),dislike:i((async()=>{l(await Dh.dislike(e))}),[e])}}(z().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(jh,{onClick:ae(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(jh,{onClick:ae(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Oh=x((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return Th(),p("div",{"data-theme":s,children:[p("section",{className:C("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:Si(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[Ii({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),Si(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u($h,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Hm,{}),u(Vh,{}),u(Ah,{}),u(Mh,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Oh.childrenTypes=[],Oh.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=Ch,e.ContentPage=Oh,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.LikeAPI=h,e.handlerDecorator=ae,e.joinList=Nc,e.packageVersion="0.14.75",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=_,e.useRouter=z,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),a=l("useEffect"),i=l("useCallback"),r=l("useMemo"),s=l("useRef");const o=e=>e&&!e.endsWith("/")?`${e}/`:e,c={PROD_BRANCH:"master"},d=new class{_=c;setup(e){this._=e}get TEST_BRANCH(){return this._.TEST_BRANCH}get RC_BRANCH(){return this._.RC_BRANCH}get PROD_BRANCH(){return this._.PROD_BRANCH||c.PROD_BRANCH}get FORCED_DRAFT_FLOW(){return this._.FORCED_DRAFT_FLOW}get ASSIST_PROJECT_ID(){return this._.ASSIST_PROJECT_ID}get SITEMAP(){return this._.SITEMAP}get STICKY_MOBILE_MENU(){return this._.STICKY_MOBILE_MENU}get FOOTER(){return this._.FOOTER}get PORTAL_DATA(){return this._.PORTAL_DATA}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return o(this._.CDN)}get BASE_PATH(){return o(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},m="likesToken";function h(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(m)||"");if(e?.token)return e}catch(e){}try{const e=await fetch("/assist/v1/public/auth",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({prefix:"guest"})}),{token:t,name:l}=await e.json();return globalThis.localStorage?.setItem(m,JSON.stringify({token:t,name:l})),{token:t,name:l}}catch(e){return console.error(e),{}}}return{getLikeCount:async function(...t){if(!t.length)return[];const{token:l}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${d.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:a}=await e.json();return a||0}catch(e){return console.error(e),0}}}}const u=(...e)=>globalThis._uni._jsx(...e),p=(...e)=>globalThis._uni._jsxs(...e),x=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:g(e)),t._tmpl},g=e=>{function t(t,l){const{children:n,...a}=t||{},i=l?.slots?.default,r=n||i&&i();return e(Object.assign(a,r&&{children:r}),l)}return t.inheritAttrs=!1,t},f=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),b=x((({children:e})=>f?e:null));const y=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},v=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),N={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","":""},w=x((({className:e,version:t="primary",isTheme:l=!0,defaultPadding:i="p-xl",padding:r,block:s,tag:o="section",role:c,children:d})=>{const m=o,[h,p]=n(!1);a((()=>y.subscribe("tab",(e=>{p(Boolean(e.label&&s?.labels?.length&&!s.labels.includes(e.label)))}))),[s]);const x=t&&l;return u(m,{className:v("@container font-sans",x?"group":"",N[t],h?"hidden":"",r||i,e),...x?{"data-ver":t}:{},...s?.anchor?{id:s.anchor}:{},role:c,children:d})})),k={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},C=x((({className:e="",headingType:t="h3",as:l="h3",title:n,children:a})=>u(l,{className:v("font-sans m-0",k[t],e),children:n||a}))),S=x((({children:e,...t})=>u("p",{className:v("font-sans",Object.values(t)),children:e}))),I={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=x((({className:e,version:t="",headlineVersion:l="XL",title:n,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:o=!1,...c})=>{const d=I[l],m={marginTop:d.descriptionStyle};return p(w,{className:v(s?"@container-normal":"",e),defaultPadding:s?"":"p-6xl",version:t,isTheme:o,...c,children:[n?u(C,{className:v("whitespace-pre-wrap",i),...d?.title,as:r||d?.title.as,title:n}):null,a?u(S,{size:d.descriptionSize,font:d.descriptionWeight,align:i,...m,children:a}):null]})}));function B(){return B._impl()}B._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),B.setup=e=>{B._impl=e};const M=e=>Boolean(e?.includes(":")),P=(e,t)=>Boolean(e&&!M(e)&&(!t||"_self"===t)),R=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),z=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var V=Object.freeze({__proto__:null,isURL:M,isLocalURL:P,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:R,joinPath:z});const A=e=>(t,l=d.BASE_PATH)=>{if(!t||M(t)||D(t,d.CDN))return t;const n=t.startsWith("/");return z(D(t,l)?"":l,n?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},D=(e,t)=>t&&e&&e.startsWith(t),j={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},_=x((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:a=n,iconVersion:i="color",width:r,height:s})=>{const o=B(),c="normal"===i?`${l}.svg`:`sprites.svg#${l}`,m=A(o)(z(d.CDN,"/icons/",c));return"normal"===i?u("img",{className:e,src:m,alt:n,title:a,"aria-hidden":"true",width:r,height:s,style:L(e,s)}):u(O,{className:e,children:p("svg",{className:v($(r),j[i],"white"===i?"invert":"",t),width:r,height:s,"aria-hidden":"true",children:[a?u("title",{children:a}):null,n?u("desc",{children:n}):null,u("use",{href:m,xlinkHref:m})]})})})),L=(e,t)=>{return e?.includes("h-")?{}:{height:(l=t,l&&!/\D/.test(l)?`${t}px`:t),width:"auto"};var l},$=e=>e?"":"w-full h-full",O=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),E=(e,t)=>e?.media&&t?.media?e.media-t.media:0,F=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n})=>{const a=B();return p("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(E).map((({src:e,format:l,media:i},r)=>u("source",{srcSet:H(a,n)(e),type:W(l),media:i?`(max-width: ${i}px)`:"",width:t?.size?.width,height:t?.size?.height},`${r}_${e}`))):null,t?.src?U({...t,src:H(a,n)(t.src)},l):null]})})),U=(e,t="")=>u("img",{src:e.src,className:v("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}),H=(e,t)=>l=>l&&!M(l)?A(e)(z(t,l)):l,W=e=>e?`image/${String(e)}`:void 0,X=x((({className:e="",image:t,imageClassName:l="",pathPrefix:n,...a})=>t?.src||t?.icon?t.icon?u(_,{className:e,imageClassName:l,iconVersion:t?.iconVersion,name:t.icon,...a}):u(F,{className:e,imageClassName:l,image:t,pathPrefix:n}):null)),K={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","":""},Y="bg-main-divider text-main-disabled",G={primary:Y,secondary:Y,white:Y,link:"",transparent:"",gray:Y,"":""},q="text-center font-sans select-none",J={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","":""},Z=({className:e,rounded:t,version:l})=>[q,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",l?K[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Q=()=>({open:(e,t={})=>y.fire("dialog",{type:"open",dialog:e,...t}),close:()=>y.fire("dialog",{type:"close"}),closeAll:()=>y.fire("dialog",{type:"close",all:!0})}),ee=(e,t)=>ee._impl(e,t);function te(e={}){const{isRemote:t,basePath:l}=e,n=B(),{closeAll:a}=Q();return e=>({...e,href:t&&!l?e.href:A(n)(e.href,l),"aria-label":e.text,onClick:ee(i(e),e)});function i({href:e,target:l,onClick:i}){return r=>{i&&i(r),e&&!t&&P(e,l)&&(a(),r?.preventDefault(),n.push(e))}}}ee._impl=e=>e,ee.setup=e=>{ee._impl=e};const le=x((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:a,version:i="primary"}=e,r=ae(e)?"hidden lg:block":"";return p("div",{className:v(ne(e),"flex gap-xs"),children:[n?u("div",{className:v(r,J[i]),children:n}):null,ae(e)?p("div",{className:"whitespace-pre",children:[l?u("div",{className:"text-xs font-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?u("div",{className:v(r,J[i]),children:a}):null]})})),ne=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 v("group/btn items-center justify-center",ae(e)?a:"h-12 w-12 m-auto",n?"rounded-full":"")},ae=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ie=({className:e,rounded:t,version:l})=>["inline-block",q,l?G[l]:"",t?"rounded-full":"rounded-md",e].join(" "),re=x((({disabled:e,children:t,method:l="LINK",href:n,...a})=>{const r=(({method:e,href:t})=>i((l=>{if("POST"!==e||!t)return;l.preventDefault();const{origin:n,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[n,a].join(""));for(const[e,t]of i.entries()){const l=document.createElement("input");l.setAttribute("type","hidden"),l.setAttribute("name",e),l.setAttribute("value",t),r.appendChild(l)}document.body.appendChild(r),r.submit()}),[]))({method:l,href:n}),s=te()({onClick:r,href:n,...a}),o=t??u(le,{...s});return u(e?oe:se,{...s,children:o})})),se=x((({className:e="",href:t,rel:l,target:n,ariaLabel:a,version:i,rounded:r,onClick:s,children:o})=>u("a",{className:Z({className:e,version:i,rounded:r}),href:t,rel:l,target:n,"aria-label":a,role:t?"link":"button",onClick:s,children:o}))),oe=x((({className:e,ariaLabel:t,version:l,rounded:n,children:a})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ie({className:e,rounded:n,version:l}),children:a})));function ce(e,t){const l="primary"===e?"white":"black",n="Вернуться назад";return p("div",{className:"hidden sm:flex items-center gap-s",children:[u("div",{className:Z({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",version:e,rounded:!0}),onClick:t,children:u(X,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:l}})}),u(re,{version:"link",className:"group-data-secondary:text-white/80",text:n,ariaLabel:n,onClick:t})]})}const de={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},me=x((({className:e,version:t="primary",defaultPadding:l,padding:n="",title:a="",insetTitle:r="",buttons:s,leftImage:o,rightImage:c,imageAlign:d,isImageAlwaysOnRight:m=!1,isImageSecondary:h=!1,backwardButton:x,children:g})=>{const f=B(),b=i((e=>{e?.preventDefault(),f.back()}),[]);return p("div",{className:he(n,l,e),children:[x?ce(t,b):null,a?u("div",{className:"relative",children:a}):null,p("div",{className:v("grow relative flex flex-col @xl:flex-row gap-3xl w-full",o?"self-start @xl:w-auto":""),children:[ge(o,{imageAlign:d,className:"mx-auto"}),p("div",{className:v("grid gap-3xl",c?"@xl:grid-cols-2":"",o?"":"grow","h-full","auto-rows-[max-content_1fr]"),children:[p("div",{className:"grow space-y-lg min-w-fit",children:[r,g]}),ge(c,{className:v("@xl:justify-self-end @xl:col-start-2",s?ue(m):"",pe(m),fe(h)),imageAlign:d}),xe(s)]})]})]})})),he=(e="",t="",l="")=>v("relative flex flex-col gap-3xl overflow-hidden",e||t,l),ue=e=>e?"row-span-2":"@xl:row-span-2",pe=e=>e?"col-start-2 self-center":"",xe=e=>e?u("div",{className:"self-end",children:e}):null,ge=(e,{className:t,imageAlign:l})=>e?u("div",{className:v("shrink-1/2 justify-self-center mt-auto @xl:mt-0",l&&de[l],t),children:e}):null,fe=e=>e?"hidden @xl:block":"",be=(e=[])=>e.reduce(((e,t)=>e+t),0),ye=(e=[])=>e?.length?be(e)/e.length:0,ve=(e,t="normal")=>e?u("div",{className:v("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:u(X,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Ne=x((e=>{const{__html:t="",richVersion:l=""}=e;return t.replace(/<\/?[^>]+\/?>/g,"").trim()?u("div",{"data-component":"rich-text-container",children:u("div",{className:v(l,"md-container"),dangerouslySetInnerHTML:{__html:t}})}):null})),we=(e,t)=>e?u(S,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,ke=x((({children:e,...t})=>u("span",{className:v("font-sans",Object.values(t)),children:e}))),Ce=(e,t)=>e?u(ke,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,Se=(e,t)=>"rte"===e.type&&"__html"in e&&e.__html?u(Ne,{...e},`rte-${t}`):["label"in e?Ce(e.label,t):null,"description"in e?u("span",{className:e.descriptionClassName,children:we(e.description,t)},String(t)):null],Ie=x((({className:e,benefitsVersion:t,...l})=>p("div",{className:v("flex gap-m min-w-56 items-center",e),children:["icon"in l?ve(l.icon,t):null,u("div",{children:Se(l)})]}))),Te=e=>"rte"===e.type?e?.__html?.length||0:Math.max(e?.label?.length||0,e?.description?.length||0),Be=e=>{return((t=e.map(Te))?.length?Math.sqrt(Math.abs(ye(t.map((e=>e**2)))-ye(t)**2)):0)>16;var t},Me=e=>e&&"icon"in e&&e.icon&&(e.icon.icon||e.icon.src),Pe=e=>!e.some(Me),Re=x((({className:e,benefitsVersion:t="normal",benefits:l})=>l?.length?u("div",{className:v("flex gap-x-m gap-y-s",Be(l)||Pe(l)?"flex-col":"flex-wrap",e),children:l.map(((e,l)=>u(Ie,{benefitsVersion:t,...e},String(l))))}):null)),ze=x((({className:e,benefits:t})=>t?.length?u("div",{className:v("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),children:t.flatMap(Se)}):null)),Ve=x((({isTabularBenefits:e,...t})=>u(e?ze:Re,{...t}))),Ae=e=>Boolean(e?.src||e?.icon),De=(e,{className:t,buttonClassName:l,isVertical:n}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?u("div",{className:v("flex",n?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m",t),children:e.map(je(l))}):null,je=(e="")=>(t,l)=>{const{text:n,icon:a,iconRight:i,version:r,...s}=t||{},o=_e(a,r),c=_e(i,r);return n||a?.icon?u(re,{className:v("basis-full @lg:basis-auto",e),appendLeft:Le({...a,iconVersion:o}),appendRight:Le({...i,iconVersion:c}),version:r,text:n,...s},l?String(l):""):null},_e=(e,t="secondary")=>{const l="secondary"===t?"color":"white";return e?.iconVersion?e?.iconVersion:l},Le=e=>Ae(e)?u(X,{image:e,width:String(e?.size?.width||24),height:String(24)}):null,$e=x((({className:e,isDotted:t,dotClassName:l,children:n})=>p("div",{className:v("font-sans flex",e),role:"listitem",children:[t?u("div",{className:"shrink-0",children:u("div",{className:v("align-middle inline-block rounded-full group-data-secondary:bg-white",l)})}):null,u("span",{children:n})]}))),Oe={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"}},Ee=x((({className:e,isDotted:t=!0,items:l=[],listItemSize:n="M",dotClassName:a=""})=>{const i=Oe[n];return l?.length?u("section",{className:v("flex flex-col gap-xs text-left text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text",i.textSize,e),role:"list",children:l.map(((e,l)=>u($e,{isDotted:t,dotClassName:v(a||"bg-primary-text",i.dotStyle),children:e},String(l))))}):null})),Fe=(e=0)=>(t=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:e}).format(Number(t)||0),Ue=x((({priceList:e})=>e?.length?u("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",children:e.map(He)}):null)),He=({label:e,amount:t})=>p("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",children:[u(ke,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?p("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Fe(2)(t)," ₽"]}):null]}),We=x((({className:e,tags:t})=>t?.length?u("div",{className:v("flex flex-wrap gap-xs",e),role:"list",children:t.map(Xe)}):null)),Xe=(e,t)=>u("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:u(ke,{size:"text-m",font:"font-light",children:e})},String(t)),Ke={XXL:"L",XL:"L",L:"M",M:"M",S:"S",XS:"S"},Ye=x((({className:e,padding:t,defaultPadding:l,title:n,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:o,benefits:c,__html:d,isFullWidthTitle:m,items:h,isDotted:x=!0,priceList:g=[],tags:f=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:C,children:S,...I})=>{const B=y?.src?u(X,{image:y}):null,M=u(T,{title:n,description:a,headlineVersion:i,align:r,isEmbedded:!0}),P=c?.filter((e=>"rte"===e?.type||"label"in e||"description"in e));return u(me,{className:e,padding:t,defaultPadding:l,...m?{title:M}:{insetTitle:M},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:De(b),backwardButton:C,...I,children:p("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[P?.length?u(Ve,{benefitsVersion:s,isTabularBenefits:o,benefits:P}):null,d?u(Ne,{__html:d}):null,h?.length?u(Ee,{items:h,isDotted:x,listItemSize:Ke[i]}):null,S,g?.length?u(Ue,{priceList:g}):null,qe(f)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},qe=e=>e?.length?u(We,{tags:e}):null,Je=x((({className:e,padding:t,...l})=>u(w,{className:v("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:u(Ye,{defaultPadding:"p-6xl",padding:t,className:"grow h-full",...l})}))),Ze=e=>null!=e,Qe=new Map;function et(e,t,{fallback:l,cache:i}={}){const s=r((()=>tt(e)),[e]),[o]=(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)?s:[],[c,d]=n(void 0),[m,h]=n(void 0);a((()=>{if(!s.some(Ze))return;let e=!1;const l=(t,l)=>{e||(d(t),h(l))};return(async()=>{try{l(await(o?((e,t=Qe)=>l=>{const n=t.get(l);if(Ze(n))return n;const a=e(l);return Ze(a)?t.set(l,Promise.resolve(a)):t.delete(l),a})(t,i)(o):t(...s)))}catch(e){l(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=l&&o&&l[o];return{data:!c&&u?u:c,error:m,mutate:()=>Promise.resolve(void 0)}}function tt(e){return Array.isArray(e)?e:e instanceof Function?tt(e()):[e]}async function lt(e,t){try{return e?await nt(e,t):null}catch(e){console.error(e)}return null}async function nt(e,t){return(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json()}const at={},it="wcms-resources";function rt(e,t={}){const{fallback:l=at,folderName:n=it,setBasePath:a=!1}=t,i=z("/",a?d.BASE_PATH:"",n,`${e}.json`),{data:r}=et(e?i:null,nt,{fallback:l});return r||at}const st=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ot=x((e=>{const t=((e="reklamnaya-plitka")=>{const t=rt(e),l=r((()=>st(0,t?.items?.length)),[t]);return t?.items?.[l]})(e.options?.page?.adSourceBook);return t?u(b,{children:u(Je,{...t,...e})}):null}));const ct=e=>e,dt=(e,t)=>{const[l,a]=n(e),[r,o]=n(!1),[c,d]=n({}),m=s({}),h=i(((e,t)=>{const{parse:n=ct,format:i=ct}=t||{};return m.current||(m.current={}),m.current[e]||=t=>{a((l=>({...l,[e]:n(t)}))),d((t=>({...t,[e]:!0})))},{value:i(l[e]),isDirty:r||c[e],onChange:m.current[e]}}),[l,r,c]),u=i((e=>{a(e),d(e)}),[]),p=i((()=>{a(e),o(!1),d({})}),[e]),x=i((e=>{e.preventDefault(),o(!0),t&&t(l)}),[t,l]);return[l,{isDirty:r||Object.values(c).some(Boolean),field:h,update:u,reset:p,onSubmit:x}]},mt=e=>t=>t&&Object.entries(e).flatMap((([e,l])=>l(t[e])))||[],ht=e=>!e?.length,ut=e=>t=>l=>e(l)?[]:[t],pt=[];function xt(){const{data:e}=et("/api/v1/regions",nt);return e||pt}const gt=x((({text:e,link:t})=>p(S,{size:"text-s",font:"font-light",color:"text-secondary-text",children:[u(ke,{children:e||"Нажимая кнопку, вы подтверждаете согласие с "}),t?u(re,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"text-primary-main",children:u(ke,{children:t.text})}):null]}))),ft=(e,t)=>{const{value:l,isDirty:n}=e,a=n?t(l):[];return{...e,errors:a,error:a[0]}},bt=x((({key:e,className:t="",inputClassName:l="",id:n,name:r,type:o="text",label:c,placeholder:d,value:m="",valid:h=!0,children:x,onChange:g,onFocus:f,onBlur:b,pattern:y,autoFocus:N=!1})=>{const w=s(null),k=i((e=>{g&&g(e.target?.value||"")}),[g]);a((()=>{N&&w.current?.focus()}),[N,w]);const C=x?"pr-3xl":"",S=h?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:v("relative",t),children:[p("label",{children:[c?u("div",{className:"mb-xs",children:u(ke,{size:"text-m",font:"font-light",children:c})}):null,u("input",{ref:w,className:v("w-full h-14 border rounded-md text-primary-text outline-none p-m",C,S,l),id:n,name:r||n,placeholder:d,type:o,value:m,onInput:k,onFocus:f,onBlur:b,pattern:y},e)]}),x]})})),yt=x((({className:e,label:t,value:l="",error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(bt,{type:"text","aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i}),u("div",{className:"h-2",children:n?u(ke,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),vt=e=>"_"===e,Nt=e=>/\d/.test(e),wt=e=>vt(e)||Nt(e),kt=[..."+7 (___) ___-__-__"],Ct=kt.findIndex(vt),St=kt.map(((e,t)=>wt(e)?kt.slice(0,t).filter(wt).length:-1));const It=x((({children:e,onChange:t,...l})=>{const n=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),l=kt.map(((e,l)=>Nt(e)?e:t.charAt(St[l])||e)),n=St.indexOf(t.length-1)+1;return(n?l.slice(0,Math.max(Ct,n)):l).join("")}(e))),[t]);return u(bt,{onChange:n,onFocus:e=>n(e?.target?.value||""),...l,children:e})})),Tt=x((({className:e,label:t,value:l,error:n,onChange:a,onBlur:i})=>p("div",{className:e,children:[u(It,{"aria-label":t,label:t,valid:Boolean(!n),value:l,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),u("div",{className:"h-2",children:n?u(ke,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Bt="Некорректно заполненное поле",Mt=ut((e=>null!=e&&""!==e))(Bt),Pt=ut((e=>"string"==typeof e&&e.length>1))(Bt),Rt=ut((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Bt),zt=(Vt=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,ut((e=>"string"==typeof e&&Vt.test(e))))(Bt);var Vt;const At=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(yt,{className:"shrink-0 w-full",label:"Наименование организации",...ft(e("fullName"),Mt)}),u(yt,{className:"shrink-0 w-full",label:"Контактное лицо",...ft(e("name"),Pt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(yt,{className:"shrink-0 w-full",label:"ИНН",...ft(e("inn"),Rt)}),u(Tt,{className:"shrink-0 w-full",label:"Телефон",...ft(e("phone"),zt)})]})]}),Dt=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}];function jt(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 _t=e=>e?.text||e?.key||"";function Lt(e,t,l,n){a((()=>{if(e&&l)return e.addEventListener(t,l,n),()=>{e.removeEventListener(t,l,n)}}),[e,t,l])}function $t(e){const t=s(null),l=i((l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()}),[e]);return Lt(globalThis.document,"click",l),t}const Ot=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,Et=x((({popupRef:e,options:t,value:l,query:n,onChange:a,iconVersion:i})=>t?.length?u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md",role:"listbox",ref:e,children:Ot(t,n).map((e=>p("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"option","aria-selected":e.key===l?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[u("span",{className:"min-h-6",children:_t(e)}),u(_,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:v("absolute right-4 pt-3xs",e.key===l?.key?"":"hidden")})]},e.key)))}):null));function Ft({isOpen:e,options:t,value:l,query:n,onChange:r,onClose:o,iconVersion:c}){const d={open:(e,t)=>y.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>y.fire("popup",{type:"update",popup:e,...t}),close:()=>y.fire("popup",{type:"close"})},m=i((()=>{d.close(),o&&o()}),[o]),h=i((e=>{m(),r&&r(e)}),[m,r]),p=s(null),x=$t(m);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:o}=a.getBoundingClientRect();d.update(u(Et,{popupRef:x,options:t,value:l,query:n,onChange:h,iconVersion:c}),{top:i+window.scrollY+o,left:r,width:s})}),[e,t,l,n,h]),p}const Ut=x((({className:e,label:t,options:l=[],value:a,valid:r=!0,isBorder:s=!0,placeholder:o="",isSearch:c=!1,iconVersion:d,onChange:m})=>{const[h,{setFalse:x,setTrue:g}]=jt(),[f,b]=n(""),y=i((()=>{b(""),x()}),[]),N=Ft({isOpen:h,options:l,value:a,query:f,onChange:m,onClose:y,iconVersion:d});return p("div",{className:e,children:[Ht(t),p("div",{className:v("relative",h?"z-20":"z-10"),ref:N,children:[p("div",{className:v("h-14 text-l flex justify-between items-center text-primary-text cursor-pointer relative z-10",Xt(s,r)),onClick:h?y:g,children:[u("p",{className:"p-m pr-3xl flex items-center overflow-hidden text-ellipsis whitespace-nowrap",children:_t(a)||o}),Wt(h,d)]}),c&&h?u("div",{className:v("absolute top-0 w-full z-20"),children:u(bt,{type:"text",autoFocus:!0,value:f,onChange:b})}):null]})]})})),Ht=e=>e?u("div",{className:"mb-xs",children:u(ke,{size:"text-m",color:"text-primary-text",font:"font-light",children:e})}):null,Wt=(e,t)=>u(_,{className:v("absolute right-3",e?"":"rotate-180"),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Xt=(e,t)=>v(e?"border rounded-md hover:border-primary-hover":"",t?" border-gray":"border-error"),Kt=x((({className:e="",error:t,...l})=>p("div",{className:e,children:[u(Ut,{...l,valid:!t}),u("div",{className:"h-2",children:t?u(ke,{size:"text-xs",font:"font-light",color:"text-error",children:t}):null})]}))),Yt=({regions:e,field:t})=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg ",children:[u("div",{className:"@xl:w-1/2",children:u(Kt,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:Dt.map((({name:e=""})=>({key:e,text:e}))),...ft(t("acquiringType"),Mt)})}),u("div",{className:"@xl:w-1/2",children:u(Kt,{label:"Адрес",placeholder:"Выберите адрес",options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ft(t("region"),Mt)})})]}),Gt=x((({value:e=!1,text:t,type:l="checkbox",onChange:n})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>n&&n(!e),children:[u("div",{className:v("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:v("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?u(ke,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),qt=e=>p("div",{children:[u(Gt,{text:"Хочу купить онлайн-кассу",...e("onlineCheckout")}),u(Gt,{text:"Хочу купить POS-терминал",...e("posTerminal")})]});function Jt({disabled:e,onClick:t}){return l=>{!e&&t&&t(l)}}const Zt={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"},Qt={primary:v("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:v("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")},el=x((({children:e,...t})=>{const l=e=>({...e,onClick:ee(Jt(e),e)}),{className:n,version:a="primary",active:i,disabled:r,type:s="button",rounded:o=!0,role:c,onClick:d}=l(t);return u("button",{className:v("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?"":v(Zt[a],Qt[a]),o?"rounded-md":"",n),type:s,role:c,onClick:d,children:e})})),tl=(e,t)=>u(el,{className:v("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),ll={acquiringType:{key:"Торговый эквайринг"},fullName:"",inn:"",name:"",phone:"",onlineCheckout:!1,posTerminal:!1},nl=mt({acquiringType:Mt,region:Mt,fullName:Mt,inn:Rt,name:Pt,phone:zt}),al=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{acquiringType:t,region:l,fullName:a,inn:i,name:r,phone:s,onlineCheckout:o,posTerminal:c}=e;ht(nl(e))&&n({typeForm:"acqr",region:l?.text||"",partnerComments:`Вид эквайринга=${t?.key||""}/Онлайн касса=${o}/POS-терминал=${c}`,fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=dt(ll,a),o=xt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(C,{headingType:"h6",title:"Вид эквайринга и регион",className:"@xl:text-center"}),Yt({regions:o,field:r}),u(C,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),At(r),qt(r),tl(t),u(gt,{link:l})]})})),il=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(yt,{className:"shrink-0 w-full",label:"Контактное лицо",...ft(e("name"),Pt)}),u(yt,{className:"shrink-0 w-full",label:"ИНН",...ft(e("inn"),Rt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(Tt,{className:"shrink-0 w-full",label:"Телефон",...ft(e("phone"),zt)}),u(yt,{className:"shrink-0 w-full",label:"Электронная почта",...ft(e("mail"),Mt)})]})]}),rl=({regions:e,field:t})=>u(Kt,{className:"w-full",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ft(t("region"),Mt)}),sl={name:"",phone:"",inn:"",mail:""},ol=mt({region:Mt,name:Pt,phone:zt,inn:Rt,mail:Mt}),cl=x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{region:t,name:l,phone:a,inn:i,mail:r}=e;ht(ol(e))&&n({typeForm:"bcrd",region:t?.text||"",name:l,inn:i,mail:r,phone:a.replace(/[^+\d]/g,"")})}),[n]),[,{field:r,...s}]=dt(sl,a),o=xt();return p("form",{className:"container space-y-s",onSubmit:s.onSubmit,children:[rl({regions:o,field:r}),il(r),tl(t),u(gt,{link:l})]})})),dl=[];const ml=async e=>await lt(e,{method:"GET"})||dl,hl=["От 1 000 ₽","До 1 000 000 000 ₽"],ul=["От 1 мес","До 15 лет"],pl=e=>p("div",{className:"pb-2xs border-b border-b-main-divider @xl:flex @xl:justify-between @xl:gap-lg @xl:border-none @xl:pb-0",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(yt,{className:"shrink-0 w-full",label:"Наименование организации",...ft(e("fullName"),Mt)}),u(yt,{className:"shrink-0 w-full",label:"ИНН",...ft(e("inn"),Rt)}),u(Tt,{className:"shrink-0 w-full",label:"Телефон",...ft(e("phone"),zt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(yt,{className:"shrink-0 w-full",label:"Годовая выручка, ₽",...ft(e("annualRevenue"),Mt)}),u(yt,{className:"shrink-0 w-full",label:"Контактное лицо",...ft(e("name"),Pt)}),u(yt,{className:"shrink-0 w-full",label:"Электронная почта",...e("mail")})]})]}),xl=(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}},gl=(e,t,l)=>Math.max(t,Math.min(e,l));function fl(e){const t=(e||"").replace(/\D/g,""),l=parseInt(t,10);return Number.isNaN(l)?0:l}function bl({list:e=[],min:t,max:l,step:n,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,o={backgroundSize:`${(100*(s>t?s-t:0)/(l-t)).toFixed(2)}% 100%`};return p("div",{children:[e.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>u("div",{className:v("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:o,type:"range",min:t,max:l,step:n,value:s,disabled:i,onInput:t=>{const l=fl(t.target?.value),n=e.length?e[l]:l;r&&r(n||0)}})})]})}const yl=1,vl=100,Nl=x((e=>{const{className:t,title:l,items:n=[],list:a=[],min:r=(a.length?0:yl),max:s=(a.length?a.length-1:vl),step:o=1,value:c=a[0]||r,disabled:d=!1,onChange:m}=e,h=xl(e,{normalize:(e=0)=>a.length?wl(a)(e):gl(e,r,s),format:Fe()}),x=i((e=>{m&&m(fl(e.target?.value))}),[m]);return p("div",{className:t,children:[p("label",{className:"block relative",children:[l?u(ke,{size:"text-m",font:"font-light",color:"text-primary-text",children:l}):null,u("input",{className:v("mt-xs font-sans text-h3 w-full h-14","border border-solid border-gray rounded-md outline-none","pl-m box-border","text-primary-text hover:border-primary-hover focus:border-primary-text","disabled:border-gray disabled:bg-main-divider"),disabled:d,onInput:x,...h}),bl({list:a,min:r,max:s,step:o,disabled:d,value:c,onChange:m})]}),kl(n)]})})),wl=e=>t=>e.reduce(((e,l)=>Math.abs(l-t)<Math.abs(e-t)?l:e)),kl=e=>u("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>u(ke,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),Cl=e=>p("div",{className:"border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg",children:[p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(ke,{size:"text-m",font:"font-light",children:"Сумма, ₽"})}),u(Nl,{items:hl,min:1e3,max:1e9,...e("amount")})]}),p("div",{className:"@xl:w-1/2",children:[u("label",{children:u(ke,{size:"text-m",font:"font-light",children:"Срок, месяцев"})}),u(Nl,{items:ul,min:1,max:180,...e("term")})]})]}),Sl=({regions:e,branches:t,field:l})=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0",children:[u("div",{className:"@xl:w-1/2",children:u(Kt,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:e.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ft(l("region"),Mt)})}),u("div",{className:"@xl:w-1/2",children:u(Kt,{label:"Адрес",placeholder:"Выберите адрес",options:t.map((({branchCode:e="",address:t=""})=>({key:e,text:t}))),...ft(l("department"),Mt)})})]}),Il={amount:1e3,term:12,fullName:"",inn:"",name:"",phone:"",mail:"",annualRevenue:""},Tl=mt({fullName:Mt,annualRevenue:Mt,inn:Rt,name:Pt,phone:zt,region:Mt,department:Mt}),Bl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{amount:t,term:n,fullName:a,inn:i,name:r,phone:s,mail:o,region:c,department:d,annualRevenue:m}=e;ht(Tl(e))&&l({typeForm:"cred",fullName:a,inn:i,name:r,phone:s.replace(/[^+\d]/g,""),mail:o,region:c?.text||"",department:d?.text||"",partnerComments:`Сумма=${t}/Срок=${n}/Выручка=${m}`})}),[l]),[a,{field:r,...s}]=dt(Il,n),o=xt(),c=function(e){const{data:t}=et(e?`/api/v1/branches?regionCode=${e}`:null,ml);return t||dl}(a.region?.key).filter((e=>e?.address));return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[u(C,{headingType:"h6",title:"Параметры",className:"@xl:text-center"}),Cl(r),u(C,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),pl(r),u(C,{headingType:"h6",title:"Офис банка",className:"@xl:text-center"}),Sl({regions:o,branches:c,field:r}),tl(e),u(gt,{link:t})]})})),Ml={name:"",phone:""},Pl=mt({name:Pt,phone:zt}),Rl=x((({button:e,link:t,onSubmit:l})=>{const n=i((e=>{const{name:t,phone:n}=e;ht(Pl(e))&&l({typeForm:"dpst",name:t,phone:n.replace(/[^+\d]/g,"")})}),[l]),[,{field:a,...r}]=dt(Ml,n);return p("form",{className:"container",onSubmit:r.onSubmit,children:[u(C,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"@xl:text-center mb-m"}),p("div",{className:"max-w-[560px] m-auto space-y-s",children:[u(yt,{className:"shrink-0 w-full",label:"Имя",...ft(a("name"),Pt)}),u(Tt,{className:"shrink-0 w-full",label:"Телефон",...ft(a("phone"),zt)})]}),p("div",{className:"flex justify-between flex-col-reverse @xl:items-center @xl:flex-row max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(gt,{link:t})}),tl(e)]})]})})),zl=x((e=>{const{button:t,sourceBookDir:l}=e,{regions:a}=rt(l||"regions-grant-support"),[i,r]=n({key:""}),s=Z({className:"text-white",version:t?.version}),o=a?.find((e=>e.name===i.key))?.href;return p("div",{className:"container space-y-s @xl:space-y-lg",children:[a?u(Kt,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:a.map((({name:e=""})=>({key:e,text:e}))),value:i,onChange:r}):null,o?u("div",{className:"text-center",children:u(re,{href:o,target:"_blank",className:v("p-m w-full @xl:w-auto",s),children:t?.text?t.text:"Перейти"})}):null]})})),Vl=x((({className:e,viewBox:t,fill:l="none",width:n,height:a,paths:i,...r})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:a,children:i.map((({d:e,fill:t,...l},n)=>{const a={...r,...l};return u("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},n)}))}))),Al=[{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"}],Dl=x((({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]),o=a?u("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):u(Vl,{paths:Al,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",onClick:s,children:[u("div",{className:v("appearance-none w-5 h-5 border-solid cursor-pointer m-0",a?"rounded-full border-2":jl(t),t?"border-primary-main":"border-gray",n?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:"checkbox","aria-checked":Boolean(t),"aria-disabled":Boolean(n)}),t?o:null,l?u("div",{className:"ml-s",children:u(ke,{size:"text-l",font:"font-light",children:l})}):null]})})})),jl=e=>v("rounded border",e?"bg-primary-main":""),_l=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const l=String(e.getDate()).padStart(2,"0"),n=String(e.getMonth()+1).padStart(2,"0"),a=t?String(e.getFullYear()):String(e.getFullYear()).slice(-2);return t?`${a}-${n}-${l}`:`${l}.${n}.${a}`}},Ll=()=>{},$l=({today:e,firstDayOfWeek:t,totalDays:l,currentMonth:n,currentYear:a,min:i,max:r,onDateClick:s})=>{const o=[];let c=1;for(let d=0;d<6;d++){const m=[];for(let o=0;o<7;o++)if(0===d&&o<t)m.push(u("td",{},`empty-${o}`));else if(c>l)m.push(u("td",{},`empty-${o}`));else{const t=new Date(a,n,c),l=Ol(t,e),o=El(t,i,r);m.push(u("td",{children:u("div",{className:Fl(l,o),onClick:()=>!o&&s(t),children:c})},`day-${c}`)),c++}o.push(u("tr",{children:m},`row-${d}`))}return o},Ol=(e,t)=>t&&e.toDateString()===t.toDateString(),El=(e,t,l)=>t&&e.getTime()<t.getTime()||l&&e.getTime()>l.getTime(),Fl=(e,t)=>v("p-s text-center rounded-md border",e?"":"border-transparent hover:bg-gray",t?"text-gray hover:bg-transparent":"cursor-pointer"),Ul=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Hl=x((({today:e,currentMonth:t,currentYear:l,min:n,max:a,onDateSelect:s=Ll})=>{const o=i((e=>s(e)),[]),{firstDayOfWeek:c,totalDays:d}=r((()=>({firstDayOfWeek:new Date(l,t,1).getDay()-1,totalDays:new Date(l,t+1,0).getDate()})),[l,t]);return p("table",{className:"mx-auto",children:[u("thead",{className:"text-gray font-light",children:u("tr",{children:Ul.map(((e,t)=>u("th",{className:"p-s",children:e},String(t))))})}),u("tbody",{children:$l({firstDayOfWeek:c,today:e,totalDays:d,currentYear:l,currentMonth:t,min:n,max:a,onDateClick:o})})]})})),Wl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Xl=Wl.map((e=>({key:e}))),Kl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Yl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Gl={className:"min-w-32",iconVersion:"black",isBorder:!1},ql=x((({className:e="",label:t="",value:l,valid:a=!0,minDate:r,maxDate:s,onChange:o})=>{const[c,{setValue:d}]=jt(!1),[m,h]=n(l?.getMonth()||(new Date).getMonth()),[x,g]=n(l?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:f,handleNextMonth:b,handleSelectMonth:y,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:C,ref:S}=(({onShowCalendar:e,showCalendar:t,selectedMonth:l,onMonthSelect:n,onYearSelect:a,selectedYear:r})=>{const s=$t(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(Wl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Xl,yearsOptions:Kl,ref:s}})({onYearSelect:g,onMonthSelect:h,onShowCalendar:d,selectedYear:x,selectedMonth:m,showCalendar:c});return p("div",{className:v(e,"relative"),ref:S,children:[u(ke,{size:"text-m","font-weight":"font-light",children:t}),Jl(C,l,a),c?p("div",{className:"absolute bg-white z-10 select-none",children:[p("div",{className:"flex gap-s",children:[u("div",{className:"my-auto",onClick:f,children:u(_,{...Yl,className:"-rotate-90 cursor-pointer"})}),u(Ut,{onChange:y,value:{key:Wl[m]},options:w,...Gl}),u(Ut,{onChange:N,value:{key:String(x)},options:k,...Gl}),u("div",{className:"my-auto",onClick:b,children:u(_,{...Yl,className:"rotate-90 cursor-pointer"})})]}),u(Hl,{today:l,currentMonth:m,currentYear:x,onDateSelect:o,min:r,max:s})]}):null]})})),Jl=(e,t,l)=>p("div",{onClick:e,className:v("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",l?"border-gray":"border-error"),children:[u(S,{children:t&&_l(t)}),u(_,{...Yl,name:"CalendarIcon"})]}),Zl=x((({className:e,label:t,value:l,error:n,onChange:a})=>p("div",{className:e,children:[t?u("div",{className:"mb-xs",children:u(ke,{size:"text-m",font:"font-light",children:t})}):null,u(ql,{value:l,onChange:a,valid:Boolean(!n)}),u("div",{className:"h-2",children:n?u(ke,{size:"text-xs",font:"font-light",color:"text-error",children:n}):null})]}))),Ql=e=>p("div",{className:"@xl:flex @xl:justify-between @xl:gap-lg",children:[p("div",{className:"@xl:w-1/2 space-y-s",children:[u(yt,{className:"shrink-0 w-full",label:"Фамилия",...ft(e("surname"),Pt)}),u(yt,{className:"shrink-0 w-full",label:"Отчество",...ft(e("middleName"),Pt)}),u(Tt,{className:"shrink-0 w-full",label:"Телефон",...ft(e("phone"),zt)})]}),p("div",{className:"@xl:w-1/2 space-y-s",children:[u(yt,{className:"shrink-0 w-full",label:"Имя",...ft(e("name"),Pt)}),u(Zl,{className:"shrink-0 w-full",label:"Дата рождения",...ft(e("date"),Mt)}),u(yt,{className:"shrink-0 w-full",label:"Электронная почта",...ft(e("mail"),Mt)})]})]}),en={surname:"",name:"",middleName:"",phone:"",mail:"",date:void 0,consentDataProcessing:!0},tn=mt({surname:Pt,name:Pt,middleName:Pt,phone:zt,mail:Mt,date:Mt}),ln=x((e=>{const{button:t,link:l,product:n,onSubmit:a}=e,r=i((e=>{const{surname:t,name:l,middleName:i,phone:r,mail:s,date:o,consentDataProcessing:c}=e;ht(tn(e))&&a({typeForm:"dpst",surname:t,name:l,middleName:i,mail:s,consentDataProcessing:c,phone:r.replace(/[^+\d]/g,""),date:o?.toISOString().slice(0,10)||"",product:n||""},!0)}),[a]),[,{field:s,...o}]=dt(en,r);return p("form",{className:"container space-y-s",onSubmit:o.onSubmit,children:[Ql(s),p("div",{className:"@xl:flex justify-between items-center",children:[p("div",{className:"@xl:mb-0 mb-2 flex items-center gap-3",children:[u(Dl,{...ft(s("consentDataProcessing"),Mt)}),u(gt,{text:"Согласен с ",link:l})]}),tl(t)]})]})})),nn=x((({name:e,text:t,value:l,checked:n,onChange:a,className:i})=>u("div",{className:i,children:p("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[u("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>a(e.target.value)}),t?u(ke,{color:"text-primary-text",children:t}):null]})}))),an=e=>{const{value:t,onChange:l}=e("vedTypes");return u("div",{className:"space-y-m",children:p("div",{className:"@xl:flex @xl:items-center @xl:gap-xl",children:[u(nn,{className:"mb-xs",name:"vedTypes",text:"Валютный котроль",value:"currencyControl",checked:"currencyControl"===t,onChange:e=>l&&l(e)}),u(nn,{className:"mb-xs",name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:e=>l&&l(e)}),u(nn,{className:"mb-xs",name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:e=>l&&l(e)}),u(nn,{className:"mb-xs",name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:e=>l&&l(e)})]})})},rn=(e,t)=>{const l="currencyControl"===e("vedTypes").value;return p("div",{children:[l?u(Kt,{className:"mb-s",label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:t.map((({code:e="",name:t=""})=>({key:e,text:t}))),...ft(e("region"),Mt)}):null,p("div",{className:"@xl:grid @xl:grid-cols-2 @xl:gap-x-lg",children:[l?u(yt,{className:"w-full mb-s",label:"ИНН",...ft(e("inn"),Rt)}):null,u(yt,{className:"w-full mb-s",label:"Наименование организации",...ft(e("fullName"),Mt)}),u(yt,{className:"w-full mb-s",label:"ФИО",...ft(e("name"),Pt)}),u(Tt,{className:"w-full mb-s",label:"Телефон",...ft(e("phone"),zt)}),l?null:u(yt,{className:"w-full mb-s",label:"Электронная почта",...ft(e("mail"),Mt)})]})]})},sn=e=>{const t=e("text");return p("label",{htmlFor:"textarea",children:[u("div",{className:"mb-xs",children:u(ke,{size:"text-m",font:"font-light",children:"Обращение"})}),u("textarea",{id:"textarea",placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:v("block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray","hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text"),value:t.value,onInput:e=>t.onChange&&t.onChange(e.target?.value||"")})]})},on={fullName:"",name:"",phone:"",inn:"",vedTypes:"currencyControl",text:""},cn={fullName:Mt,name:Pt,phone:zt},dn=mt({...cn,mail:Mt}),mn=mt({...cn,inn:Rt,region:Mt}),hn=e=>"currencyControl"===e,un=e=>({currencyControl:"currencyControl"===e,documentOperations:"documentOperations"===e,conversionTransactions:"conversionTransactions"===e,otherIssues:"otherIssues"===e}),pn={ApplicationFormBusinessCard:cl,ApplicationFormWed:x((e=>{const{button:t,link:l,onSubmit:n}=e,a=i((e=>{const{fullName:t,name:l,phone:a,mail:i,inn:r,region:s,vedTypes:o,text:c}=e,d={typeForm:"KVED",fullName:t,name:l,phone:a.replace(/[^+\d]/g,""),text:c,vedTypes:un(o),PartnerComments:c,...hn(o)?{inn:r,region:s?.text||""}:{mail:i}};ht((e=>hn(e)?mn:dn)(o)(e))&&n(d)}),[n]),[,{field:r,...s}]=dt(on,a),o=xt();return p("form",{className:"container space-y-m",onSubmit:s.onSubmit,children:[an(r),u(C,{headingType:"h6",title:"Данные организации",className:"@xl:text-center"}),rn(r,o),sn(r),p("div",{className:"flex flex-col gap-m border-b border-main-divider pb-lg @xl:items-center @xl:flex-row @xl:pb-4xl",children:[tl(t),u(gt,{link:l})]}),u(C,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),p("div",{className:"flex gap-xl",children:[p("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(X,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(X,{image:{icon:"MailIcon"},width:"24",height:"24"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),ApplicationFormDeposit:Rl,ApplicationFormCredit:Bl,ApplicationFormAcquiring:al,ApplicationFormGrantSupport:zl,ApplicationFormIndividuals:ln},xn=x((({responseType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center p-lg rounded-md space-x-m ${t?"bg-ok":"bg-fail"}`,children:[u(X,t?{image:{icon:"ResponseOKIcon"},width:"42",height:"42"}:{image:{icon:"ResponseFailIcon"},width:"37",height:"34"}),p("div",{children:[u(C,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-2xs"}),u(ke,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),gn={send:async function(e,t){const l=t?"/api/v1/lead":"/api/v1/sendcorporatelead";try{const t=await fetch(l,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return t?.ok?await t.json():null}catch(e){return null}}},fn=x((e=>{const{className:t,formBlock:l,...a}=e,[r,s]=n(""),o=i((async(e,t)=>{const l=await gn.send(e,t)?"OK":"Fail";return s(l),l}),[]);return u(w,{className:t,defaultPadding:"p-6xl",...a,children:p("div",{className:"container max-w-[978px] space-y-lg",children:[l?.title?u(C,{headingType:"h3",title:l.title,className:"@xl:text-center"}):null,l?bn(l,o):null,r?u(xn,{responseType:r}):null]})})})),bn=(e,t)=>{const l=e?.formType;if(!l||!(l in pn))return null;return u(pn[l],{...e,onSubmit:t})},yn="text-center",vn={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},Nn=x((({className:e,defaultIconSize:t=44,iconBgVersion:l="primary",size:n,icon:a,...i})=>{const r=String(n?.width||t);return a?u("div",{style:{width:`${r}px`,height:`${r}px`},className:v("rounded-icon object-fit flex justify-center items-center",vn[l],e),children:u(_,{...i,width:"54%",height:"54%",name:a})}):null})),wn=x((({className:e="",title:t,benefitList:l,...n})=>p(w,{className:e,defaultPadding:"p-6xl",...n,children:[t?u(C,{headingType:"h3",as:"h2",className:yn,title:t}):null,l?.length?u("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:l.map(kn)}):null]}))),kn=({label:e,description:t,items:l,icon:n,iconBgVersion:a,isDotted:i=!1},r)=>p("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[n?.icon?u(Nn,{className:"shrink-0",defaultIconSize:44,iconBgVersion:a||"",...n}):null,n?.src?u(X,{className:"shrink-0",image:n}):null,e?p("div",{className:"@sm:h-full space-y-xs",children:[u(C,{headingType:"h6",children:e}),u(ke,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),u(Ee,{dotClassName:"bg-secondary-text",listItemSize:"S",items:l,isDotted:i})]}):null]},String(r)),Cn=x((({className:e="",title:t,description:l,bonusItems:n=[],align:a=yn,...i})=>u(w,{className:e,defaultPadding:"p-6xl",...i,children:p("div",{className:"container",children:[u(T,{className:"mb-xl",isEmbedded:!0,title:t,description:l,headlineVersion:"M",align:a}),u("div",{className:"flex flex-wrap gap-3xl gap-x-m w-full",children:n.length>0?n.map(((e,t)=>p("div",{className:"w-full @xl:w-[48%] sm:space-y-xs flex flex-col grow p-xl sm:p-m border border-gray",children:[u("div",{className:"grow",children:u(T,{title:e?.title,description:e?.description,headlineVersion:"S",isEmbedded:!0,align:"text-left"})}),p("div",{className:"flex justify-center sm:justify-between sm:items-end",children:[u("div",{className:"hidden sm:block",children:De(e?.buttons)}),e.bonusItemContent?.bonusType?Sn(e.bonusItemContent):null]})]},String(t)))):null})]})}))),Sn=e=>"count"===e.bonusType?In(e):Tn(e),In=e=>p("div",{className:"w-full pt-default @xl:mt-s @xl:mb-4 flex justify-center sm:justify-end items-end",children:[e.bonusCount?u("div",{className:"shrink-0 -mb-6 @xl:-mb-4",children:u("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.bonusCount})}):null,e.bonusName?u("div",{className:"shrink-0 gradient-color-text",children:u(ke,{size:"text-h2",children:e.bonusName})}):null]}),Tn=e=>e.image?u(X,{className:"min-w-12 p-xs rounded-icon shrink-0",image:e.image}):null,Bn=e=>({icon:t,title:l,description:n},a)=>p("div",{className:v("flex flex-col gap-1","items-center",n||l?"":"justify-center"),children:[l?u(ke,{size:"text-h6",font:"font-normal",align:e,children:l}):null,t?u(X,{image:t,height:"180",className:"w-auto mx-auto"}):null,n?u(ke,{size:"text-h6",font:"font-normal",align:e,children:n}):null]},String(a)),Mn=(e,t,l)=>u("div",{className:`grid gap-2xs ${Pn(t)}`,children:e.map(Bn(l))}),Pn=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Rn=x((({bonusBenefits:e,cardTextAlign:t="text-center",className:l="",columnsCount:n="4",subtitle:a,title:i,...r})=>p(w,{className:l,defaultPadding:"p-6xl",...r,children:[u(T,{title:i,description:a,headlineVersion:"M"}),e?.length?Mn(e,n,t):null]}))),zn={start:"justify-start",center:"justify-center",end:"justify-end"},Vn=x((({buttons:e,className:t="",align:l,...n})=>{const a=l?v("flex",zn[l]):"";return u(w,{className:v("!bg-transparent",a,t),defaultPadding:"p-0",...n,children:De(e)})})),An=(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}]},Dn=x((({className:e,disabled:t,...l})=>u(re,{rounded:!0,className:v("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e||""),disabled:t,...l,children:u(X,{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"})}))),jn=x((e=>u(Dn,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),_n=x((e=>u(Dn,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function Ln({dec:e,inc:t,canDec:l,canInc:n,btnClass:a,className:i=""}){return l||n?p("div",{children:[l?u(Dn,{className:`absolute z-40 ${a[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?u(Dn,{className:`absolute z-40 rotate-180 ${a[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const $n=x((({title:e,value:t,postfix:l="",prefix:n,className:a=""})=>p("div",{className:v("flex justify-between @xl:flex-col",a),children:[e?u(ke,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(ke,{size:"text-h3",children:[n," ",Fe(2)(Math.round(t))," ",l]})}:{children:u(ke,{size:"text-h3",children:"-"})})]}))),On=1e4,En=5e6,Fn=Math.round(23.5),Un={minSum:On,maxSum:En,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},Hn={minSum:On,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Wn={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Xn={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Kn={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Yn=e=>e?u(S,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e}):null,Gn=x((({rate:e,title:t="Ставка",unit:l,depositeName:n,isShowDepositeName:a,fractionDigits:i=2})=>p("div",{children:[u(ke,{size:"text-l",font:"font-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start gradient-color-text",children:[u("span",{className:"font-mohave text-title-huge pr-xl -mt-m tracking-[-15px]",children:String(e.toFixed(i)).replace(".",",")}),l?u("span",{className:"text-7xl",children:l}):null]}),n&&a?u("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:n}):null]})]}))),qn=x((({title:e="Ставка",isUnavailableByTerm:t=!1})=>p("div",{className:"space-y-s",children:[u(ke,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u(_,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),u("div",{className:"w-64",children:t?p(S,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):u(S,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Jn=({rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,title:a,unit:i})=>u(Gn,{rate:e,depositeName:t,fractionDigits:l,isShowDepositeName:n,unit:i,title:a}),Zn=({rate:e,title:t,unit:l})=>u($n,{title:t,value:e,postfix:l}),Qn=({isUnknownRateShown:e=!0,isUnavailableByTerm:t=!1,title:l="Ставка",unit:n="%",rate:a=0,...i})=>e&&0===a?u(qn,{isUnavailableByTerm:t,title:l}):p("div",{children:[u("div",{className:"hidden @xl:block",children:Jn({title:l,unit:n,rate:a,...i})}),u("div",{className:"@xl:hidden",children:Zn({title:l,unit:n,rate:a,...i})})]});function ea({isShowItems:e=!0,step:t=1e3,...l}){const n=[`От ${Fe(2)(l.min||0)} ₽`,`До ${Fe(2)(l.max||0)} ₽`];return u(Nl,{items:e?n:[],step:t,...l})}function ta(e){const{data:t}=et(`/wcms-resources/${e}.json`,nt);return t}const la=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,a=ta(t||"bonus-calculator-data")||Wn,[i,r]=((e,t,l)=>{const{minSumTravel:n,minSumOther:a,maxBonus:i,prefMonthsNum:r,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===a)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*r+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-r)]})(a,l,n);return{...a,...e,monthBonus:i,yearBonus:r}},na=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n})=>{const[a,{field:i}]=dt({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:r,maxSumTravel:s,minSumOther:o,maxSumOther:c,monthBonus:d,yearBonus:m}=la(a,t);return p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-y-4xl",e),children:[p("div",{className:"flex flex-col @xl:max-w-md gap-2xl border-b border-b-main-divider @xl:border-none pb-3xl @xl:pb-0",children:[ea({title:"Сумма покупок в категории путешествия, ₽",min:r,max:s,step:500,isShowItems:!1,...i("travelExpenseValue")}),ea({title:"Сумма покупок в остальных категориях, ₽",min:o,max:c,step:500,isShowItems:!1,...i("restExpenseValue")})]}),d>=0?Qn({title:"Баллов за месяц",rate:d,fractionDigits:0,isUnknownRateShown:!1,unit:""}):null,p("div",{className:"flex flex-col gap-y-4xl @xl:w-96",children:[m>=0?u($n,{title:"Баллов за год",value:m}):null,De(l,{isVertical:!0}),Yn(n)]})]})})),aa=(e,t=0)=>e?.sum&&e.sum>=On&&e.sum<=En?e.sum:t,ia=(e,t=0)=>e?.period&&e.period>=13&&e.period<=60?e.period:t,ra=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,sa={horizontal:"gap-5xl",vertical:"flex-col gap-s"},oa=x((({items:e,checkedItem:t,className:l,onChange:n,orientation:a="horizontal"})=>u("div",{className:v(`flex ${sa[a]}`,l),children:e?.map((({id:e,text:l})=>u(Dl,{isRadio:!0,text:l,value:t===e,onChange:()=>n&&n(e)},String(e))))}))),ca=({items:e,title:t,mobileTitle:l=t,orientation:n="horizontal",value:a,radioGroupClassName:i,onChange:r})=>p("div",{className:"space-y-s",children:[t?u("div",{className:"hidden @5xl:block",children:u(ke,{color:"text-secondary-text",font:"font-light",children:t})}):null,l?u("div",{className:"@5xl:hidden",children:u(ke,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(oa,{orientation:n,items:e,checkedItem:e[a?0:1].id,className:v("flex-col sm:flex-row",i),onChange:t=>r&&r(t===e[0].id)})]}),da=e=>ca({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),ma=e=>e,ha=(e=ma)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),ua=ha(),pa=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},xa=(e=ma)=>ha((t=>-e(t))),ga=xa(),fa=([e,t],l,n=[])=>l&&l[e]&&l[t]?{[e]:l[e],[t]:l[t]}:ba([e,t],n),ba=([e,t],l=[])=>({[e]:l.length?ga(l.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:l.length?ua(l.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),ya=(e,[t,l],n)=>e>=n[t]&&e<=n[l],va=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Na=(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)},wa=x((({className:e="",rateParams:t,buttons:l,footnote:n,bottomFootnote:a,isShowDepositeName:i,defaultParams:r})=>{const[s,{field:o}]=dt({moneyValue:aa(r,1e5),daysValue:ia(r,90),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),c=((e,t)=>{const{daysValue:l,moneyValue:n,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=ta(t||"business-calculator-data"),o=i||a,c=l<90||l>730;if(l<=30)return{...Kn,...e,isDisabledOperatingDeposit:c,isUnavailableByTerm:!0};const d=s?.rateRows?.find((e=>r===e.isMonthlyInterestPayment&&va(o,e)&&ya(n,["minSum","maxSum"],e)&&ya(l,["minDays","maxDays"],e)))||Kn,{rate:m}=d,h=Na(m,e),u=n+h,p=s?.rateRows||[Kn];return{...d,...ba(["minSum","maxSum"],p),...ba(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:c,income:h,finalSum:u}})(s,t?.rateType&&t.sourceBookDir),{income:d,finalSum:m,rate:h,isUnavailableByTerm:x,depositeName:g}=c;return p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ea({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),(f={title:"Срок, дней",min:c.minDays,max:c.maxDays,...o("daysValue"),value:c.daysValue},u(Nl,{items:[`От ${ra(f.min||0)}`,`До ${ra(f.max||0)}`],step:1,...f})),p("div",{className:"flex flex-col sm:flex-row gap-y-4 gap-x-14",children:[ka(c,o),da({title:"Выплата процентов",orientation:"vertical",...o("isMonthlyInterestPayment"),radioGroupClassName:"sm:flex-col"})]})]}),u("div",{className:"border-b border-main-divider md:hidden"}),Qn({rate:h,depositeName:g,isShowDepositeName:i,isUnavailableByTerm:x}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[Ca(m,d),De(l,{isVertical:!0}),Yn(n),Yn(a)]})]});var f})),ka=(e,t)=>p("div",{className:"space-y-s",children:[u(ke,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),p("div",{className:"flex flex-col gap-y-xl sm:gap-y-s",children:[u(Dl,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),u(Dl,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Ca=(e,t)=>p("div",{className:"flex flex-col gap-2xl sm:gap-0",children:[u($n,{title:"Доход в конце срока",value:t,postfix:"₽",prefix:"+"}),u($n,{title:"Сумма в конце срока",value:e,postfix:"₽"})]}),Sa=({min:e=0,max:t=0,availableMonths:l,...n})=>u(Nl,{items:[`От ${Ia(e)}`,`До ${Ia(t)}`],step:1,...l?.length?{list:l}:{min:e,max:t},...n}),Ia=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,Ta=e=>ca({...e,radioGroupClassName:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),Ba=e=>Ma({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ma({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&Ma({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&Ma({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ma=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Pa=(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)},Ra=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ta(t||"credit-calculator-data"),s=i?.rateRows||[Un],o=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Ba({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:i?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:c,maxSum:d}=fa(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:h}=fa(["minMonths","maxMonths"],o,s),u=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a})=>e?.find((e=>Ba({row:e,userInputParams:t,paramsViewSettings:l})&&ya(n,["minSum","maxSum"],e)&&ya(a,["minMonths","maxMonths"],e)))||Un)({rateRows:s,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a}),{rate:p}=u,x=Pa(p,e);return r((()=>({...u,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:h,moneyValue:n,monthsValue:a,monthlyPayment:x})),[e,i])},za=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a,defaultParams:i})=>{const[r,{field:s}]=dt({moneyValue:aa(i,2e5),monthsValue:ia(i,Fn),isAnnuity:Boolean(i?.isAnnuity),isInsurance:Boolean(i?.isEnableInsurance),isSalaryClient:Boolean(i?.isEnableSalaryClient),isPensionClient:Boolean(i?.isEnablePensionClient),isStateEmployee:Boolean(i?.isEnableStateEmployee)}),o=Ra(r,t,a),c=Ta({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...s("isAnnuity")});return p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ea({title:"Сумма кредита, ₽",step:500,min:o.minSum,max:o.maxSum,...s("moneyValue"),value:o.moneyValue}),Sa({title:"Срок кредита, месяцев",min:o.minMonths,max:o.maxMonths,...s("monthsValue"),value:o.monthsValue}),Va({...o,...a},s),u("div",{className:"sm:hidden",children:c})]}),u("div",{className:"border-b border-main-divider md:hidden"}),Qn({rate:o.rate}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u($n,{title:"Ежемесячный платеж",value:o.monthlyPayment,postfix:"₽"}),u("div",{className:"hidden sm:block",children:c}),De(l,{isVertical:!0}),Yn(n)]})]})})),Va=(e,t)=>p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?u(Dl,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?u(Dl,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?u(Dl,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?u(Dl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),Aa=(e,t,l)=>{const{moneyValue:n,monthsValue:a}=e,i=ta(t||"deposit-calculator-data"),r=i?.rateRows?.[0]?_a(i.rateRows[0].minMonths,i.rateRows[0].maxMonths):1,s=!l?.isShowMonthlyInterestPayment,o=!l?.isShowRemoteRegistration,c=i?.rateRows?.find((t=>ja({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:s})&&ja({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:o})&&ya(n,["minSum","maxSum"],t)&&ya(a||r,["minMonths","maxMonths"],t)))||Xn,{rate:d}=c,m=Da(d,e),h=n+m,u=i?.rateRows||[Xn];return{...c,...ba(["minSum","maxSum"],u),...ba(["minMonths","maxMonths"],u),availableMonths:pa(u.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((n,a)=>t>=e?e+a*l:e-a*l)))(e,t))),...e,defaultMonth:r,income:m,finalSum:h}},Da=(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)},ja=({row:e,userInputParams:t,paramKey:l,isExclude:n})=>n||t[l]===e[l],_a=(e,t)=>e+Math.round((t-e)/2),La=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i,defaultParams:r})=>{const[s,{field:o}]=dt({moneyValue:aa(r,2e4),monthsValue:ia(r,0),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(r?.isRemoteRegistration)}),c=Aa(s,t,i),{defaultMonth:d,rate:m,income:h,finalSum:x}=c,{onChange:g}=o("monthsValue");return a((()=>{g&&g(d)}),[d]),p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ea({title:"Сумма, ₽",min:c.minSum,max:c.maxSum,...o("moneyValue"),value:c.moneyValue}),Sa({title:"Срок, месяцев",min:c.minMonths,max:c.maxMonths,availableMonths:c.availableMonths,...o("monthsValue"),value:c.monthsValue}),$a({...c,...i},o)]}),u("div",{className:"border-b border-main-divider md:hidden"}),Qn({rate:m}),p("div",{className:"flex flex-col gap-2xl sm:w-96",children:[u($n,{title:"Доход в конце срока",value:h,postfix:"₽",prefix:"+"}),u($n,{title:"Сумма в конце срока",value:x,postfix:"₽"}),De(l,{isVertical:!0}),Yn(n)]})]})})),$a=(e,t)=>{return p("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowMonthlyInterestPayment?da({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration},ca({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]});var l},Oa=e=>Ea({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Ea({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Ea=({row:e,userInputParams:t,paramsViewSettings:l,fieldKey:n,viewSettingFieldKey:a})=>!!l&&!l[a]||t[n]===e[n],Fa=(e,t,l)=>{const{moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}=e,o=ta(t||"refinancing-calculator-data"),c=o?.rateRows||[Hn],d=(({limitRows:e,userInputParams:t,paramsViewSettings:l})=>e?.find((e=>Oa({row:e,userInputParams:t,paramsViewSettings:l}))))({limitRows:o?.limitRows||[],userInputParams:e,paramsViewSettings:l}),{minSum:m,maxSum:h}=fa(["minSum","maxSum"],d,c),{minMonths:u,maxMonths:p}=fa(["minMonths","maxMonths"],d,c),x=(({rateRows:e=[],userInputParams:t,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Oa({row:e,userInputParams:t,paramsViewSettings:l})&&ya(n+r,["minSum","maxSum"],e)&&ya(i,["minSumOld","maxSumOld"],e)&&ya(r,["minSumExtra","maxSumExtra"],e)&&ya(a,["minMonths","maxMonths"],e)))||Hn)({rateRows:c,userInputParams:e,paramsViewSettings:l,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s}),{rate:g}=x,f=Pa(g,e),b=e.oldMonthlyPayment-f;return r((()=>({...x,...e,minSum:m,maxSum:h,minMonths:u,maxMonths:p,moneyValue:n,monthsValue:a,oldMonthlyPayment:i,moneyExtra:s,monthlyPayment:f,benefit:b})),[e,o])},Ua=x((({className:e,sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:a})=>{const[i,{field:r}]=dt({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),s=Fa(i,t,a),o=Ta({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...r("isAnnuity")});return p("section",{className:v("flex flex-col justify-between @5xl:flex-row gap-m",e),children:[p("div",{className:"flex flex-col gap-y-m sm:max-w-md gap-2xl",children:[ea({title:"Остаток долга в других банках, ₽ ",step:500,min:s.minSum,max:s.maxSum-s.maxSumExtra,...r("moneyValue"),value:s.moneyValue}),ea({title:"Ежемесячный платеж в других банках, ₽",step:500,min:s.minSumOld,max:s.maxSumOld,...r("oldMonthlyPayment"),value:s.oldMonthlyPayment}),Sa({title:"Новый срок кредита, месяцев",min:s.minMonths,max:s.maxMonths,...r("monthsValue"),value:s.monthsValue}),Ha({...s,...a},r),s.isExtraMoney?ea({title:"Дополнительная сумма, ₽ ",step:500,min:s.minSumExtra,max:s.maxSumExtra,...r("moneyExtra"),value:s.moneyExtra}):null,u("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:o})]}),Qn({rate:s.rate,fractionDigits:1}),p("div",{className:"flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0",children:[u($n,{title:"Ежемесячный платеж",value:s.monthlyPayment,postfix:"₽"}),s.benefit>0?u($n,{title:"Выгода в месяц",value:s.benefit,postfix:"₽"}):null,u("div",{className:"hidden sm:block",children:o}),De(l,{isVertical:!0}),Yn(n)]})]})})),Ha=(e,t)=>p("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?u(Dl,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?u(Dl,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,u(Dl,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Wa={CreditCalculatorForm:za,DepositCalculatorForm:La,BusinessDepositCalculatorForm:wa,BonusCalculatorForm:na,RefinancingCalculatorForm:Ua},Xa=(e,t)=>{const l=e?.calcType;if(!l||!(l in Wa))return null;const n=Wa[l];return u("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:p("div",{className:"box-border p-4xl w-full space-y-xl",children:[e?.title?u(C,{className:"text-center",title:e.title}):null,u(n,{...e})]})},String(t))},Ka=x((({className:e="",tabAlign:t,calculatorTabs:l=[],...a})=>{const r=l.map((e=>e.nav||{})),s=l.map((({calculatorBlock:e})=>e||{})),[o,c]=n(0),d=i((e=>c(e)),[]),[m,h]=An({itemCount:l?.length,visibleItemCount:3});return p(w,{className:v("box-border overflow-hidden relative",e),defaultPadding:"p-0",...a,children:[p("div",{className:"bg-white",children:[r.length>1?Ya({activeIndex:m,tabsNav:r,tabAlign:t,slideIndexShift:o,onClick:d}):null,Ln({...h,btnClass:["left-3","right-3"],className:"top-10"})]}),u("div",{className:"flex",style:{transform:`translateX(-${o}00%)`},role:"list",children:s?.length?s.map(Xa):null})]})}));function Ya({activeIndex:e,tabsNav:t,tabAlign:l,slideIndexShift:n,onClick:a}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-32 pt-4xl box-border duration-1000",children:u("div",{className:v("w-full flex flex-nowrap items-end gap-xs",l?zn[l]:""),children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const a=l?"w-96 p-m border-none bg-primary-main text-white":"w-96 p-s ease-in duration-300 bg-white text-primary-text",i=l?"text-xl mb-xs":"text-l mb-2xs",r=l?"text-l font-light text-white":"text-m font-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:n,"aria-label":e?.title,className:v("box-border relative border border-gray cursor-pointer text-left border-b-0 flex space-x-m min-h-20",a),children:[u(X,{className:v("h-6 w-6 min-w-6 min-h-6",s),image:{...e?.icon,iconVersion:o??c},width:"24",height:"24"}),p("div",{className:"border-0",children:[u("div",{className:i,children:e?.title}),u("div",{className:r,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===n),onClick:()=>a(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const Ga=x((e=>{const{onChange:t,min:l,max:n,defaultValue:a="0",fractionDigits:r=0,...s}=e,o=xl(e,{normalize:(e=a)=>l&&n?String(gl(Number(qa(e)),l,n)):qa(e),format:Fe(r)}),c=i((e=>t&&t(qa(e))),[t]);return u(bt,{onChange:c,...s,...o})})),qa=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Ja=x((e=>u(Ga,{...e,fractionDigits:2,children:u("div",{className:"absolute right-4 bottom-4",children:u(ke,{size:"text-xl",font:"font-light",children:"₽"})})}))),Za={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Qa={amount:1500},ei=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:i="1500",button:r,formType:s="private",...o})=>{const[{amount:c},{field:d}]=dt(Qa),[m,h]=n(!1);return a((()=>{h(c<=0)}),[c]),p(w,{className:v("flex flex-col items-center",e),defaultPadding:"p-6xl",...o,children:[t?u(C,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,p("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:Za[s],children:[u(Ja,{valid:!m,placeholder:i,label:l,...d("amount",{parse:Number,format:String})}),u("input",{type:"hidden",name:"amount",value:c}),r?.text?u(el,{className:"w-full mt-lg",type:"submit",disabled:m,children:r.text}):null]})]})})),ti=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function li(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=r((()=>({threshold:ni(t),root:l?.current})),[t,l?.current]);return a((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function ni(e=0){const t=Math.round(10*e);return new Array(t).fill(0).map(((e,l)=>Math.min(l/t)),1).concat(1)}const ai=x((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:a,children:r,onIntersection:s})=>{const o=li(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),a);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===n),ref:o,children:r})})),ii=["min-w-full","@lg:min-w-[50%]","@lg:min-w-[33.3%]","@lg:min-w-[25%]"],ri=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:a=0,padding:r=0,listType:o="horizontal-list",snapAlign:c="snap-center",minHeight:d,children:m,onVisibleItemsChange:h,onVisibleIndicesChange:p})=>{const x={sensitivity:1,rootRef:t},g=s([]),f=i(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(oi(l))}),[h,p]),b=n>0?a*Number(n)-1:0,y="vertical-list"===o,N="horizontal-list"===o,w={...N?si(r,b):{},...y?ti(d):{},gap:`${a}px`};return u("div",{className:v("box-border overflow-auto no-scrollbar",o,e),style:w,ref:t,children:(k=(e,t)=>u(ai,{className:v(c,n?ii[n-1]:"",y?"h-full":""),style:N?si(r/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:f,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(k):k(e,0))(m)});var k})),si=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),oi=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ci={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},di={"horizontal-list":"w-6","vertical-list":"h-6"},mi=x((({className:e="",containerRef:t,activeIndex:l,dotCount:n=0,listType:a="horizontal-list",version:i})=>n?u("div",{className:v("flex gap-xs",ci[a],i?"group":"",e),"data-ver":i,children:new Array(n).fill(null).map(((e,n)=>u("div",{className:`cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white group-data-transparent:bg-white ${n===l?di[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)),hi=e=>t=>e.scrollWidth/t,ui=e=>(t,l)=>{e.scrollBy({left:l*hi(e)(t),behavior:"smooth"})},pi=({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?[xa()(a),ha()(a)]:[-1,-1],m=c>0,h=d<e-1,u=i((()=>{var t;l.current&&(m?ui(l.current)(e,-1):(t=l.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{l.current&&(h?ui(l.current)(e,1):l.current.scrollTo({left:0,behavior:"smooth"}))}),[e,h]),x=i((e=>{l?.current&&l.current.children[e]?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}),[l]);return[l,{scrollLeft:u,scrollRight:p,scrollTo:x,canScrollLeft:m,canScrollRight:h,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},xi="absolute top-[calc(50%-24px)] z-40",gi="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",fi=x((({scroll:e,activeIndex:t,itemCount:l,arrowsPadded:n,hasEdgeBlocks:a,onScrollLeft:r,onScrollRight:s})=>{const{canScrollLeft:o,canScrollRight:c,scrollLeft:d,scrollRight:m}=e,h=a?t>0:o,x=a?t<l-1:c,g=i((()=>{a?(o&&t!==l-1&&d(),r()):d()}),[d,r,a,o,t,l]),f=i((()=>{a?(c&&0!==t&&m(),s()):m()}),[m,s,a,o,t,l]);return p("div",{className:"hidden @lg:block",children:[bi(e),h?u(jn,{className:v(xi,n?"left-1 @lg:left-8":"left-0"),onClick:g}):null,x?u(_n,{className:v(xi,n?"right-1 @lg:right-8":"right-0"),onClick:f}):null]})})),bi=e=>p("div",{children:[e.canScrollLeft?u("div",{className:v(gi,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?u("div",{className:v(gi,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),yi=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),vi=[];function Ni(e,t,{className:l,...n}={}){const{key:a,blockDecorator:i=yi,blocksRegistry:r={},ancestors:s=vi}=t,{type:o}=e;o&&o in r||console.warn(`No block with "${o}" is registered`);const c=o&&r[o];return i({blockClassName:v(e.style?.length?e.style:"col-span-12",l),block:e,ancestors:s,render:({block:l,blockClassName:i})=>{const{content:r}=l;return c?u(c,{className:i,block:e,options:t,...r,...n},a):null}},a)}const wi=[],ki=(e,{key:t,ancestors:l=wi,slotName:n=null,extraProps:a,renderProps:i=Ni,...r})=>{const s=a?(e,t)=>Ni(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...l||wi,[r.parent,n]]:l},a)))};function Ci({block:e,options:t,children:l,extraProps:n,renderProps:a}){return l||(e&&t?ki(e.blocks,{...t,parent:e,extraProps:n,renderProps:a}):null)}const Si=e=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Ii=({className:e,text:t="ХИТ"}={})=>p("div",{className:v("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[u(_,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),u(S,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ti="relative h-full",Bi={small:"sm:min-w-64",normal:"sm:min-w-96",big:"sm:min-w-[515px]"},Mi=({noCardBorder:e,activeIndex:t,cardSize:l="normal",...n})=>{const{blocks:a}=n.block||{},i=a?.some(zi);return Ci({...n,renderProps:(n,a,r)=>p("div",{className:Pi(n,{someCardsHighlighted:i}),children:[Ni(n,a,{className:Ri(n,{someCardsHighlighted:i,showBorder:!e,cardSize:l}),blockIndex:r,isActive:r===t}),zi(n)?Ii({className:"absolute top-0 -right-4 z-40"}):null]},String(r))})},Pi=(e,{someCardsHighlighted:t})=>v(Ti,t&&(zi(e)?"pt-3xl":"pt-3xl sm:pt-16")),Ri=(e,{someCardsHighlighted:t,showBorder:l,cardSize:n="normal"})=>v(Ti,"min-w-80",Bi[n],t&&(zi(e)?"pt-3xl sm:pt-16":"pt-3xl"),Si(l),l&&"h-full"),zi=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Vi=x((({className:e,itemCount:t,visibleItemCount:l=1,noCardBorder:n,isAlignCenter:a,arrowsPadded:i=!0,isGap:r=!0,cardSize:s="normal",...o})=>{const{blocks:c=[]}=o.block||{},d=t||c?.length,[m,{inc:h,dec:x}]=An({itemCount:d,visibleItemCount:l},Math.floor(l/2)),[g,f]=pi({itemCount:d}),[b]=f.visibleIndicesRange,y=c&&"CarouselBankHistoryCard"===c[0]?.type;return p(w,{className:e,defaultPadding:"p-6xl",...o,children:[p("div",{className:v(a?"flex justify-center":"","relative max-w-full"),children:[u(ri,{containerRef:g,visibleItemCount:l,snapAlign:"snap-start",gap:r?16:void 0,onVisibleIndicesChange:f.handleVisibleIndicesChange,children:Mi({noCardBorder:n,activeIndex:m,cardSize:s,...o})}),u(fi,{scroll:f,arrowsPadded:i,onScrollLeft:x,onScrollRight:h,hasEdgeBlocks:y,activeIndex:m,itemCount:d})]}),u(mi,{className:"@5xl:hidden",containerRef:g,activeIndex:b,dotCount:d,listType:"horizontal-list"})]})}));Vi.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard","RichTextBlock","ProductBlock"],Vi.childSchema=()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}});const Ai=x((({className:e,title:t,description:l,blockIndex:n=0,isActive:a,...i})=>u(w,{className:v("relative flex h-[485px]",a?"w-[440px] z-10":"w-[340px]",e),defaultPadding:"p-0",...i,children:u("div",{className:v("basis-full self-center",Di(n)),children:a?u(T,{headlineVersion:"M",title:t,description:l,padding:"p-3xl",align:"text-left",className:"h-96 text-white shadow-dark-blue"}):u("div",{className:"h-[300px] flex justify-center items-center font-mohave text-title-large",children:u("span",{className:ji(n),children:t})})})}))),Di=e=>["bg-primary-main","bg-green-light","bg-yellow-light"][e%3],ji=e=>["gradient-color-text-on-green","gradient-color-text-on-yellow","gradient-color-text-on-yellow"][e%3],_i="z-10 border border-solid w-full h-full",Li=v(_i,"absolute hidden @xl:block border-transparent"),$i=x((({className:e,title:t,description:l,button:n,...a})=>u(w,{className:v("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:p("div",{className:"relative h-full",children:[u("div",{className:v(Li,"top-9 right-12 bg-green-dark")}),u("div",{className:v(Li,"top-6 right-8 bg-green")}),u("div",{className:v(Li,"top-3 right-4 bg-green-light")}),p("div",{className:v(_i,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[u(T,{title:t,description:l,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),De([n],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),Oi={black:"bg-black",white:"bg-white"},Ei=x((({className:e="",title:t,description:l,image:n,price:a,button:i,colors:r=[],align:s="text-left",padding:o,...c})=>u(w,{className:v("flex flex-col justify-left",e),defaultPadding:"p-2xl",...c,children:p(me,{className:"h-full",padding:o,title:u(T,{title:t,description:l,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:n?.src?u(X,{className:"flex justify-center align-center mb-xl",image:n}):null,buttons:De([i],{buttonClassName:"w-full self-end"}),children:[r?.length?p("div",{className:"flex text-secondary-text mb-m",children:[u("div",{className:"mr-xs",children:u(ke,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(Fi)]}):null,a?p(ke,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),Fi=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${Oi[e]}`},String(t)),Ui={1:"grid-cols-1",2:"grid-cols-2"},Hi=x((({className:e,padding:t,additionalDescription:l,cardsList:n=[],columnsMode:a=1,description:i,image:r,title:s,...o})=>u(w,{className:v("text-left",e),padding:"p-0",...o,children:p(me,{className:"h-full",defaultPadding:"p-xl",padding:t,title:s?u(C,{headingType:"h4",as:"h3",className:"mb-m z-10",title:s}):null,rightImage:r?.src?u(X,{image:r}):null,children:[p("div",{className:"flex justify-between mb-m",children:[i?u("div",{className:"w-1/3",children:u(ke,{size:"text-h6",children:i})}):null,l?u(ke,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:l}):null]}),n.length?u("ul",{className:v("list-none m-0 p-0 grid gap-xs",Ui[a]),children:Wi(n)}):null]})}))),Wi=e=>e.map(((e,t)=>p("li",{children:[e?.parameter?u("div",{className:"inline pr-xs",children:u(ke,{size:"text-h6",children:e.parameter})}):null,e?.parameterDescription?u(ke,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(t)))),Xi="hidden xl:block absolute w-full h-full border border-white",Ki=x((({className:e="",...t})=>{const l=te(),{text:n,href:a,target:i,onClick:r}=l(t);return n?u("div",{className:v("flex relative group/link pl-s pb-s min-w-[16rem] xl:min-w-[20rem]",e),children:p("div",{className:"relative min-h-16 w-full",children:[p("a",{className:v("absolute border\n bg-white flex justify-between group-hover/link:text-primary-main","sm:rounded-md rounded-none w-full px-xl py-lg whitespace-nowrap z-10"),role:"link",href:a,target:i,onClick:r,children:[u(ke,{size:"text-l",font:"font-light",color:"text-primary-text",children:n}),u(X,{className:"group-hover/link:brightness-100 hidden xl:block ml-2xs",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main hidden xl:block",width:"24",height:"24"})]}),u("div",{className:v(Xi,"-bottom-1.5 -left-1.5")}),u("div",{className:v(Xi,"-bottom-3 -left-3")})]})}):null})),Yi=x((({className:e,additionalDescription:t,description:l,links:n,title:a,...i})=>u(w,{className:v("overflow-hidden",e),...i,children:p("div",{className:"flex flex-col @6xl:flex-row gap-m",children:[p("div",{children:[u(T,{isEmbedded:!0,title:a,description:l,as:"h1",align:"text-left"}),u(T,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),n?.length?Gi(n,"@6xl:min-w-[672px] p-0 justify-self-end"):null]})}))),Gi=(e,t="")=>{const l=Math.ceil(e.length/10);return u(Vi,{className:t,version:"secondary",itemCount:l,arrowsPadded:!1,padding:"p-0",children:new Array(l).fill(null).map(((t,l)=>u("div",{className:v("flex flex-wrap gap-2xs self-start xl:justify-center @5xl:grid @5xl:grid-cols-2"),children:e.slice(10*l,10*(l+1)).map(((e,t)=>u(Ki,{...e},String(t))))},String(l))))})},qi=x((({className:e="",href:t,target:l,isRemote:n=!1,children:a})=>{const i=te({isRemote:n})({href:t,target:l});return u(t?"a":"div",{className:v("block",e),...t?i:{},children:a})})),Ji=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}}],Zi=x((({className:e="",media:t,showButtonText:l,stretched:a,version:i="white",children:r})=>{const[s,o]=n(),c=t?.map((e=>{const{href:t,icon:n,text:a}=e,{iconMapped:r}=(e=>Ji.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),c=Ae(n)?n:r,d=l?{text:a}:{text:""};return!s&&a&&o(!0),{...e,...d,icon:{...c,iconVersion:"color"},version:e?.version??i}})),d=v("border border-solid hover:border-transparent group-data-primary:border-main-divider border-main-divider group-data-gray:border-green group/media",l&&s?"":"basis-auto",a?"flex-1 justify-center":"");return p("div",{className:v("flex flex-col gap-xs",e),children:[u("div",{className:"flex gap-xs",children:De(c,{className:v(a||s?"basis-full":""),buttonClassName:d})}),r?u(ke,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Qi=x((({className:e,padding:t,description:l,additionalDescription:n,href:a,icon:i,items:r=[],isDotted:s,socialMedia:o=[],target:c,title:d,align:m="text-left",benefits:h,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:g=true,isImageSecondary:f=!1}={},...b})=>u(w,{className:v("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...b,children:u(qi,{href:a,target:c,className:"h-full",children:p(me,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:u(T,{title:d,description:l,headlineVersion:"XS",isEmbedded:!0,align:m}),...Ge(Ae(i)?u(X,{image:i}):null,x),buttons:o.length?u(Zi,{media:o,showButtonText:!0,version:b?.version}):null,isImageAlwaysOnRight:g,isImageSecondary:f,imageAlign:"center",children:[u(Ve,{benefits:h}),u(Ee,{items:r,isDotted:s,listItemSize:"S"}),er(n,m)]})})}))),er=(e,t)=>e?u(S,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,tr=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=n(l),c=i((()=>{o((e=>!e))}),[]),d=a({isUnfolded:s,onToggle:c}),m=r?r({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})}));const lr=x((({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 u("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} `,children:u("div",{className:e,ref:i,children:l})})})),nr=(e,t)=>{const{title:l,description:n,buttons:a}=e;return p("div",{className:"py-lg border-b border-main-divider",children:[l?u("div",{className:"opacity-80",children:u(ke,{size:"text-m",color:"text-secondary-text",children:l})}):null,n?u("div",{className:"mt-2xs",children:u(ke,{size:"text-xl",color:"text-primary-text",children:n})}):null,a?.length?u("div",{className:"text-primary-main",children:De(a)}):null]},String(t))},ar=x((({className:e="",title:t,align:l="text-center",icon:n,button:a,cardCells:i=[],...r})=>{const s=i.map(nr),o=s.slice(0,1),c=s.slice(1);return p(w,{className:v("flex flex-col",e),defaultPadding:"p-2xl",...r,children:[Ae(n)?u("div",{className:"self-center",children:u(X,{image:n})}):null,t?u(C,{className:v("pt-xs",l),headingType:"h5",title:t}):null,a?u(re,{className:"w-full mt-m mb-lg",...a}):null,i.length?u(tr,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(lr,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?ir:null}):null]})})),ir=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(_,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),rr="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",sr="border-gray border-solid border",or="border-main-divider border-b",cr="w-52",dr=x((({icon:e,image:t,title:l,link:n})=>p("div",{className:v("w-80 box-border flex flex-col gap-m items-center rounded-t-md border-b-0 p-2xl",sr,rr),role:"columnheader",children:[e&&!t?.src&&u(X,{className:"h-16 w-16 min-w-16 min-h-16",image:e,width:"64",height:"64"}),t?.src&&u(X,{image:t}),l?u(C,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&u("div",{className:"mt-auto w-full",children:u(re,{href:n.href,target:n.target||"",className:"w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"text-xs font-light font-medium py-s",children:n.text})})})]}))),mr={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},hr=x((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:mr[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),ur=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex gap-xl",children:e})}))),pr=x((({colHeaders:e,activeIndex:t})=>p(ur,{children:[u("div",{className:cr,role:"columnheader"}),u(hr,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(dr,{...e},String(t))))})]}))),xr=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>{const a=v("w-80 box-border flex flex-col",sr,l?"border-t-0 rounded-b-md":"border-y-0",n?rr:""),i=v("mx-2xl h-full",or,n&&t?"border-t":"",l?"border-b-0":"border-solid");return u("div",{className:a,role:"cell",children:u("div",{className:i,children:e?e.map(((e,t)=>br(e,t,n))):null})})})),gr=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),fr=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),br=({label:e,description:t},l,n)=>p("div",{className:"first:pt-2xl pt-xl last:pb-2xl",children:[e?u("h4",{className:gr(n),children:e}):null,t?u("div",{className:fr(n),children:t}):null]},String(l)),yr=(e=!1)=>v("text-s py-2xl",or,cr,e?"border-b-0":"border-solid"),vr=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:a,isLastRow:i})=>p(ur,{children:[e?.title?u("div",{className:yr(i),children:e.title}):null,t?.length?u(hr,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(xr,{cell:e,isFirstRow:a,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),Nr=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:a}=n;return p("div",{className:"relative",children:[e.map(((e,n,{length:a})=>u(vr,{row:e,isFirstRow:0===n,isLastRow:n+1===a,activeIndex:l,isColoredFirstColumn:t},String(n)))),a?Ln({...n,btnClass:["top-28","top-12"],className:"right-7",isDisabled:!0}):null]})})),wr=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:a})=>{const i=e?.map((({header:e})=>e||{})),r=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:r.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=An({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[i?.length?u(pr,{colHeaders:i,activeIndex:o}):null,s?.length?u(Nr,{rowData:s,isColoredFirstColumn:a,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),kr=x((({className:e="",title:t,rowHeaders:l,columns:a,visibleRowLength:r=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!r),m=i((()=>d((e=>!e))),[]);return p(w,{className:v("overflow-hidden relative",e),defaultPadding:"p-6xl",...o,children:[u(C,{headingType:"h2",className:"text-center mb-4xl mx-auto",title:t}),u(wr,{columns:a,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:r}),r?Cr({isShowAllRow:c,onClick:m}):null]})})),Cr=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-6xl",children:p("div",{className:"flex gap-m w-full",children:[u("div",{className:cr}),u("button",{onClick:t,className:"py-xs flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u(ke,{size:"text-xs",font:"font-medium",children:e?"Скрыть":"Показать все параметры"})})]})}),Sr=x((({className:e,contacts:t,info:l,version:n="secondary",...a})=>p(w,{className:v("flex",e),defaultPadding:"p-6xl",version:n,...a,children:[l?.length?Ir(l):null,t?.length?Ir(t):null]}))),Ir=e=>u("div",{className:"flex gap-5xl grow basis-0",children:e.map(((e,t)=>Tr({column:e,index:t})))}),Tr=({column:e,index:t})=>e?u("div",{className:"flex flex-col gap-xl grow basis-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:n},a)=>p("div",{children:[u(T,{title:e,description:t,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),l?u("div",{className:"mt-xs opacity-80",children:u(S,{size:"text-m",font:"font-light",children:l})}):null,n?.href?u(re,{className:"mt-xl",...n}):null]},String(a))))},`col-${String(t)}`):null,Br=e=>e%2!=0,Mr=x((({textNode:e,iconNode:t,tag:l,onClick:n,justifyContent:a="between",className:i,...r})=>p(l,{tag:l,className:v("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:n,...r,children:[e?u("div",{children:e}):null,t?u("div",{children:t}):null]}))),Pr=x((({className:e="",label:t,icon:l,dataTheme:n="",disabled:a=!1,onClick:i})=>u(Mr,{tag:"button",onClick:i,disabled:a,"data-theme":n,justifyContent:"center",className:v("py-4 border border-transparent outline-none focus:border-primary-text",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:u("span",{className:"text-h4 pr-s",children:t}),iconNode:l?u(X,{image:{icon:l,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Rr=({isUnfolded:e,onToggle:t})=>u(Pr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),zr=x((({title:e,description:t})=>p("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[u(X,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),u(T,{title:e,description:t,headlineVersion:"S",isEmbedded:!0,align:yn})]}))),Vr=["ArrowDownIcon","ArrowUpIcon"],Ar="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs border-box",Dr=x((({label:e="",blocksToRender:t=[],topItemsCount:l=0,block:n,notFound:a,...i})=>{const[r,s]=l>0?[t.slice(0,l),t.slice(l)]:[t,[]];return p("div",{children:[u("div",{className:v(t.length?"hidden":"block"),children:a?u(zr,{...a}):null}),p("div",{className:v("space-y-2xs",t.length?"":"hidden"),children:[p("div",{className:v(Ar),children:[ki(r,{...i.options,parent:n}),Br(r.length)?u(ot,{className:"col-span-6"}):null]}),u(tr,{renderFoldableSection:({isUnfolded:e})=>p(lr,{className:v(Ar),isUnfolded:e,children:[ki(s,{...i.options,parent:n}),Br(s.length)?u(ot,{className:"col-span-6"}):null]}),renderFoldButton:({isUnfolded:t,onToggle:n})=>u(Pr,{className:v(l<1?"hidden":""),disabled:!s?.length,label:e,icon:Vr[Number(t)],dataTheme:i.options?.page?.colorPalette,onClick:n})})]})]})})),jr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,_r=(e,t)=>Object.entries(e).map((([l,n])=>"number"==typeof n?Array.isArray(t[l])?((e,t)=>l=>jr(t[e])||jr(l[e])||l[e]?.includes(t[e]))(l,e):((e,t)=>l=>jr(t[e])||jr(l[e])||Lr(t[e])<=Lr(l[e]))(l,e):"object"==typeof n&&"min"in n&&"max"in n?((e,t)=>l=>jr(t[e])||jr(l[e])||Lr(t[e]?.min)>=Lr(l[e]?.min)&&Lr(t[e]?.min)<=Lr(l[e]?.max))(l,e):Array.isArray(n)?((e,t)=>l=>jr(t[e])||jr(l[e])||t[e]?.some((t=>l[e]?.includes(t))))(l,e):((e,t)=>l=>jr(t[e])||jr(l[e])||t[e]===l[e])(l,e))).every((e=>e(t))),Lr=e=>Number(e||0),$r=(e,t)=>(l=ct)=>e&&e.filter((e=>_r(t,l(e.content||{})))),Or=x((({value:e,onChange:t,items:l=[],multiple:n})=>l.map((l=>u(Gt,{text:l?.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(t)if(n){const n=e?.includes(l);t(n?(e||[]).filter((e=>e!==l)):[...e||[],l])}else t(e===l?"":l)})(l.value),type:n?"checkbox":"radio"},l.value))))),Er=({field:e,reset:t,filtrationSchema:l,resetButton:n,children:a})=>p("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[p("div",{className:"flex flex-col @4xl:flex-row gap-5xl",children:[a,Object.entries(l).map(Fr(e))]}),n?u("div",{children:u(el,{className:"w-full @4xl:w-72 @4xl:ml-s",onClick:t,children:n?.text})}):null]}),Fr=e=>([t,l])=>{const n=l?.type;return"array"===n?Ur(t,e)(l):null},Ur=(e,t)=>l=>{const n=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-m",children:u(ke,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(Or,{items:n,multiple:!0,...t(e)})]},e)},Hr=(e,t)=>e[t?.sourceBook]?.rateRows.map((e=>e.minMonths)).filter((e=>void 0!==e));async function Wr(...e){const t=e.map((e=>lt(e)));return Promise.all(t)}function Xr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Kr=e=>Boolean(e&&e.content&&"string"==typeof e.content.sourceBook);function Yr(e){const{dirs:t=[],source:l=[]}=r((()=>{const t=(e=>e?.filter(Kr).map((({content:{sourceBook:e}})=>e)))(e);return{dirs:t?.map((e=>`/wcms-resources/${e}.json`)),source:t}}),[e]),{data:n=[]}=et(t,Wr);return{source:Object.fromEntries(Xr(l,n).filter((([,e])=>Boolean(e)))),months:(a=n.flatMap((e=>e?.rateRows||[])).filter((e=>"number"==typeof e.minMonths&&e.minMonths===e.maxMonths)).map((e=>e.minMonths)),[...new Set(a)]).sort(((e,t)=>e-t))||[]};var a}const Gr=1e9,qr={sum:{min:1e4,max:Gr},period:3},Jr=x((({className:e,filtrationSchema:t={},resetButton:l,sumInput:n,periodInput:a,...i})=>{const{source:r,months:s}=Yr(i.block?.blocks),[o,{field:c,reset:d}]=dt(qr),m=$r(i.block?.blocks,o)((e=>({...e,period:Hr(r,e||{})||[]}))),h=p("div",{children:[u(Ja,{label:n?.title,min:500,max:Gr,...c("sum",{parse:e=>({min:Number(e),max:Gr}),format:({min:e})=>String(e)})}),u(Nl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:s,...c("period")})]});return p(w,{className:v("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[Er({field:c,reset:d,filtrationSchema:t,resetButton:l,children:h}),u(Dr,{blocksToRender:m,...i})]})})),Zr={type:"string",title:"Адрес справочника"};Jr.childrenTypes=["ProductTile"],Jr.childSchema=e=>({...e?.filtrationSchema||{},sourceBook:Zr});const Qr=[{key:"10"},{key:"50"},{key:"100"}],es=({itemCount:e,onItemCountChange:t})=>{const l=i((({key:e})=>t(Number(e))),[]);return p("div",{className:"flex items-center gap-s",children:[u("span",{children:"Показать по"}),u(Ut,{className:"min-w-20",onChange:l,value:{key:String(e)},options:Qr,iconVersion:"black"})]})},ts="py-m px-lg rounded-md cursor-pointer hover:bg-green-more-dark hover:text-white",ls=(e,t)=>{const{currentPage:l,onPageChange:n,totalPages:a}=e,i=t+1;return i===l?u("div",{"aria-current":"true",className:"py-m px-lg bg-green-light text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,l)=>e<t&&e>=t-2||e<=t+2&&e>t||((e,t,l)=>t<=3&&e<=t+3||t>=l-1&&e>=l-4)(e,t,l))(i,l,a)?u("div",{onClick:()=>n(i),className:ts,"aria-label":`Страница ${i}`,children:i},String(t)):null},ns={width:"24",height:"24"},as=({currentPage:e,onPageChange:t,totalPages:l})=>{const n=r((()=>new Array(l).fill({currentPage:e,onPageChange:t,totalPages:l})),[l,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<l-1&&t(e+1)}),[e,l]),o=i((()=>t(1)),[]),c=i((()=>t(l)),[l]);return p("div",{className:"flex gap-m items-center",children:[u("div",{onClick:a,children:u(_,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:is(1===e),...ns})}),p("div",{className:"flex gap-xs",children:[e>1?u("div",{onClick:o,className:ts,"aria-label":"Страница 1",children:"1"}):null,e>4?u("div",{className:"py-m px-s",children:"..."}):null,n.map(ls),e<l-3?u("div",{className:"py-m px-s",children:"..."}):null,e<l?u("div",{onClick:c,className:ts,"aria-label":`Страница ${l}}`,children:l}):null]}),u("div",{onClick:s,children:u(_,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:is(e===l),...ns})})]})},is=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",rs=({currentPage:e,onPageChange:t,totalPages:l,itemCount:n,onItemCountChange:a})=>p("div",{className:"mt-3xl flex justify-between items-center select-none",role:"navigation","aria-label":"Пагинация",children:[u(as,{currentPage:e,onPageChange:t,totalPages:l}),n&&a?u(es,{itemCount:n,onItemCountChange:a}):null]}),ss=x((({className:e,value:t,autoFocus:l,onChange:n,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:v("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:u(X,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),u("input",{className:v("h-14 w-full px-10 text-l text-black outline-none box-border border border-solid rounded-md","border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text"),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:l,onChange:s,onFocus:a})]})})),os=x((({field:e,onClearFilter:t,filtrationState:l})=>p("div",{className:"grid grid-cols-12 mb-3xl space-x-xl",children:[u(ss,{className:"col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),u(ql,{className:"col-span-3",label:"Период от",maxDate:l.endDate,...e("startDate")}),u(ql,{className:"col-span-3",label:"Период до",minDate:l.startDate,...e("endDate")}),u("div",{className:"col-span-2 mt-auto",children:u(el,{className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),cs=({title:e,timestamp:t,publicId:l})=>{const n=te({basePath:"/"}),{href:a}=n({href:`/api/v1/depository/${l}/file`});return p("div",{className:"grid grid-cols-12 py-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:t?u(ke,{size:"text-m","font-weight":"font-light",children:_l(t)}):null}),u("div",{className:"col-span-10 text-h6 hover:text-primary-active",children:u("a",{href:a,download:!0,"aria-label":"Скачать",children:e})})]},l)},ds="/api/v1/depository",ms={startDate:void 0,endDate:void 0,query:""},hs=x((({className:e,...t})=>{const[l,a]=n(0),[r,s]=n(10),[o,{field:c,reset:d}]=dt(ms),{totalPages:m=0,items:h=[]}=(({size:e,page:t,query:l,startDate:n,endDate:a})=>{const i=n?_l(n,!0):"",r=a?_l(a,!0):"",s=new URLSearchParams(ds);s.set("page",String(t)),s.set("size",String(e)),s.set("query",l),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=et(ds+o,nt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:l,...o}),x=i((e=>a(e-1)),[]),g=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return p(w,{className:v(e,"container p-6xl"),...t,children:[u(os,{filtrationState:o,field:c,onClearFilter:d}),p("div",{className:"flex flex-col",children:[p("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[u("div",{className:"col-span-2",children:u(ke,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),u("span",{className:"col-span-10",children:u(ke,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),h.length?h.map((e=>u(cs,{...e},String(e.publicId)))):u(zr,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),u(rs,{currentPage:l+1,onPageChange:x,totalPages:m,itemCount:r,onItemCountChange:g})]})]})})),us=e=>"Image"===e?.contentType&&e?.image?u(X,{image:e.image}):"Code"===e?.contentType&&e.code?u("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,ps=x((({className:e="",title:t,description:l,error:n,button:a,...i})=>p(w,{className:v("flex flex-col justify-center items-center",e),defaultPadding:v("p-6xl"),version:"transparent",...i,children:[u("div",{className:"flex justify-center",children:us(n)}),u(T,{title:t,description:l,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?u(re,{version:a?.version,text:a?.text,...a}):null]}))),xs="location";function gs(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])]})(y,"location",bs()??{name:e}),r=i((e=>{ys(e),l(e)}),[]),{data:s}=et("/api/v1/region",nt);return a((()=>{s&&!fs()&&l(s)}),[s]),[t??{name:e},r]}const fs=()=>Boolean(globalThis.localStorage?.getItem(xs)),bs=()=>{try{const e=globalThis.localStorage?.getItem(xs);return e&&JSON.parse(e)}catch(e){return null}},ys=e=>{try{globalThis.localStorage?.setItem(xs,JSON.stringify(e))}catch(e){}};var vs;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(vs||(vs={}));const Ns=new Intl.NumberFormat("ru",{style:"currency",currency:vs.RUB}),ws=e=>e?Ns.format(e):"",ks="text-left text-m font-light text-secondary-text",Cs=`${ks} pl-5xl`,Ss={USD:"DollarIcon",EUR:"EuroIcon"},Is=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:ks,children:u(ke,{size:"text-m",children:"Валюта"})}),u("th",{className:Cs,children:u(ke,{size:"text-m",children:"Купить"})}),u("th",{className:Cs,children:u(ke,{size:"text-m",children:"Продать"})})]})}),u("tbody",{children:t.map(Ts)})]}))),Ts=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-2xs text-h6",children:[u("td",{className:"pt-m",children:p("div",{className:"flex items-center gap-xs",children:[t?u(X,{image:{icon:Ss[t]},width:"24",height:"24"}):null,u(ke,{size:"text-h6",children:t})]})}),u("td",{className:"pt-m pl-5xl",children:u(ke,{size:"text-h6",children:ws(e?.saleExchangeRate)})}),u("td",{className:"pt-m pl-5xl",children:u(ke,{size:"text-h6",children:ws(e?.buyExchangeRate)})})]},t)},Bs={icon:"GpsIcon"},Ms=x((({className:e="",address:t})=>p("div",{className:`flex gap-s ${e}`,children:[u(Nn,{...Bs,iconBgVersion:"primary"}),p("div",{className:"space-y-2xs",children:[t?u("p",{className:"text-primary-main text-l",children:t}):null,u("p",{className:"text-secondary-text text-m",children:"Курс указан для заданного офиса"})]})]}))),Ps=(e,t,l)=>{const n=Number(Rs(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)},Rs=e=>e.replace(/[^\d.,]/g,"").replace(",","."),zs=e=>{return(t=[[e=>e.value!==vs.RUB&&e.oppositeValue!==vs.RUB,()=>e.handleConvert(e.value,vs.RUB)],[e=>e.value===vs.RUB&&e.oppositeValue===vs.RUB,()=>e.handleConvert(e.value,vs.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Vs(e){const{placeholder:t,rates:l,selected:n,value:a,setValue:i,setSelected:r}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return p("div",{className:"relative flex",children:[u(bt,{className:"shrink-0 text-l w-full appearance-none -mr-24",placeholder:t,type:"text",value:a,onChange:i}),s.length?u(Ut,{isBorder:!1,onChange:e=>r(e.key),options:s,value:o}):null]})}const As=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:a})=>{const[r,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||vs.RUB,selectBuy:l?.[0]?.currency?.currency||vs.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-m pt-2xl ${e}`,children:[Vs({placeholder:"Хочу продать",rates:l,selected:r.selectSell,setSelected:Ds(r,o,l),value:r.inputSell,setValue:e=>_s(o,l)(e,r.selectSell,r.selectBuy)}),Vs({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:js(r,o,t),value:r.inputBuy,setValue:e=>Ls(o,t)(e,r.selectBuy,r.selectSell)}),a?.text?u(re,{text:a.text,version:a?.version,...a}):null]})})),Ds=(e,t,l)=>n=>{t({selectSell:n}),zs({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,a=e.selectBuy)=>{_s(t,l)(e.inputSell,n,a)}})},js=(e,t,l)=>n=>{t({selectBuy:n}),zs({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,a=e.selectSell)=>Ls(t,l)(e.inputBuy,n,a)})},_s=(e,t)=>(l,n,a)=>{e({inputSell:Rs(l),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Ps(l,i,n===vs.RUB)||"")})},Ls=(e,t)=>(l,n,a)=>{e({inputBuy:Rs(l),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Ps(l,i,n===vs.RUB)||"")})};const $s=x((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const[a]=gs(),i=function(e){const t=e?.code||"000",{data:l}=et(`/api/v1/exchangerates?regionCode=${t}`,nt);return l||{}}(a),r=Os(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:vs.RUB}});const o=r.filter((e=>e.saleExchangeRate));return o.push({currency:{currency:vs.RUB}}),u(w,{className:v("box-border min-h-80",e),...n,children:u(me,{className:"h-full",title:u(C,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:p("div",{className:"flex gap-6xl flex-wrap",children:[p("div",{children:[r?u(Is,{className:"mb-xl",exchangeCurrencyItems:r}):null,u(Ms,{address:i?.address})]}),r.length&&s.length&&o.length?u(As,{className:"grow",currencyRatesBuy:s,currencyRatesSell:o,button:l}):null]})})})})),Os=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],Es=e=>rt(d.SITEMAP||"sitemap",{fallback:e}),Fs={width:"40",height:"45"},Us={"bg-white":"color",transparent:"white"},Hs={"bg-white":"text-primary-main",transparent:"text-white"},Ws=(e,t,l)=>u(X,t?.src?{image:t,className:Hs[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/"}:{image:{icon:t?.icon||"LogoIcon",iconVersion:Us[e]},className:Hs[e],width:l?.width,height:l?.height}),Xs={"bg-white":"text-primary-text",transparent:"text-white"},Ks=x((({className:e,href:t="/",logo:l,children:n,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0})=>p("a",{className:v("inline-flex items-center font-sans no-underline",e),href:t,target:a?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Ws(i,l?.image,Fs),r?n??u("div",{className:"ml-s",children:u(ke,{font:"font-medium",color:Xs[i],size:"",children:l?.title||"Россельхозбанк"})}):null]}))),Ys=x((({className:e,onClose:t})=>u("button",{className:v("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(X,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function Gs(e,t,l=300){a((()=>{const t=globalThis.setTimeout(e,l);return()=>{globalThis.clearTimeout(t)}}),t)}const qs=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=new Array(e.length),a=new Array(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 Js=(e,t)=>(l,n)=>{for(const[a,i]of n)l.set(a,e(l.get(a)||t,i));return l},Zs=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),Qs=e=>t=>e.map((([e,l])=>[qs(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>to(t,e))).reduce(Js(Math.max,0),new Map),eo=e=>t=>{return Xr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Zs(t||"");return l.length?be(e.map((e=>ua(l.map(qs(e)))))):0})(e))).sort((n=([,e])=>e,l=(e,t)=>n(e)-n(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,n},to=(e,t)=>new Map(e.map((e=>[e,t]))),lo=({basePathList:e,initialQuery:t=""})=>{const[l,i]=n(t||"");a((()=>{null!=t&&i(t)}),[t]);const{data:r}=et(e?.length?e:null,no),[s,o]=n(null);return Gs((()=>{r&&o(r.map((e=>t=>{const{corpus:l,dictionary:n}=t||{};if(!(e&&l?.length&&n&&Object.keys(n).length))return[];const a=Zs(e);if(!a.length)return[];const i=Object.entries(n),r=[...a.map(Qs(i)).reduce(Js(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*a.length)).map((([e])=>l[e]));return eo(a)(r)})(l)))}),[r,l]),[s,{value:l,onChange:i}]},no=async(...e)=>(await Promise.allSettled(e.map((e=>lt(z(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),ao=x((({className:e,head:t,children:l,onClose:n})=>{const{close:a}=Q(),r=i((()=>{a(),n&&n()}),[n]);return p("div",{className:v("relative min-h-full bg-white pt-0 p-5",e),children:[p("div",{className:"sticky py-xl top-0 bg-white z-10",children:[u(Ys,{className:"absolute top-0 right-0",onClose:r}),u("div",{className:"container",children:t})]}),u("div",{className:"container pb-6xl",children:l})]})})),io=x((({className:e,topItems:t})=>{const l=te({isRemote:!0});return u("div",{className:v("flex items-start justify-between",e),children:t?.map(l).map(so)})})),ro=["all","footer"],so=(e,t)=>{const{text:l,items:n=[],href:a,target:i,onClick:r}=e,s=n.filter((e=>!e.displayArea||ro.includes(e.displayArea.toLowerCase())));return p("div",{className:"flex flex-col gap-s w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:a,target:i||"_self",onClick:r,children:l||`Раздел ${t}`}),s.map(((e,t)=>u(oo,{...e,basePath:o(a),index:t},String(t))))]},String(t))},oo=x((({text:e,index:t,basePath:l,...n})=>{const a=te({isRemote:!(!d.BASE_PATH||!l)&&!d.BASE_PATH.startsWith(l),basePath:l}),{href:i,target:r,onClick:s}=a(n);return u("a",{className:v("text-l font-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:i,target:r||"_self",onClick:s,children:e||`Раздел ${t}`})})),co=x((({initialQuery:e})=>{const{topItems:t}=Es(),l=r((()=>t?.map((e=>e.href||"/"))),[t]),[n,i]=lo({basePathList:l,initialQuery:e}),s=r((()=>mo(t)(n)),[t,n]);return a((()=>function(e){for(const t of e.filter((({items:e})=>e?.length)))console.group(t.text),console.table(t.items,["text","href"]),console.groupEnd()}(s)),[s]),u(ao,{head:u(ss,{autoFocus:!0,...i}),children:u(io,{topItems:s})})})),mo=e=>t=>e?.length&&t?.length?Xr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:z("/",t)})))}))):[];const ho=()=>{const{open:e,close:t}=Q();return{open:(t={},l={})=>e(u(co,{...t}),l),close:t}},uo=x((({className:e})=>{const[t,l]=n(""),a=i((()=>l("")),[]),{open:r}=ho(),s=i((e=>{l(e),po(e)&&r({initialQuery:e},{onClose:a})}),[a]);return p("div",{className:v("relative",e),children:[u(ss,{value:t,onChange:s}),u(Ys,{className:"absolute top-0 right-0 sm:hidden",onClose:a})]})})),po=e=>e&&e.length>=3,xo=()=>{const e=globalThis.document?.cookie.split(";")??[];for(const t of e){const[e]=t.split("=");globalThis.document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}},go=x((({className:e="",items:t})=>p("div",{className:e,children:[t?.length?t.map(fo):null,u(re,{version:"primary",className:"w-full",href:"https://old.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"})]}))),fo=(e,t)=>p("div",{className:"mb-m",children:[u("div",{className:"mb-m",children:u(ke,{size:"text-l",font:"font-medium",children:e?.title})}),u("div",{children:e.items?.map(bo)})]},String(t)),bo=(e,t)=>p("div",{className:"mb-m",children:[u("div",{children:yo(e.type,e.text)}),u("div",{className:"mt-2xs text-s font-light text-secondary-text",children:e.description})]},String(t)),yo=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${vo(t)}`,children:t});case"email":return u("a",{className:"text-xl font-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},vo=e=>e.replaceAll(/\D/g,""),No=x((({className:e="",index:t,text:l,...n})=>{const a=te(),{href:i,target:r,onClick:s}=a(n);return u("a",{className:v("text-secondary-text",e),href:i,target:r,onClick:s,children:l||`Документ ${t}`})})),wo=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-lg py-lg border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(No,{index:t,className:"text-l font-light max-w-[292px]",...e},String(t))))}):null}))),ko=x((({className:e="",index:t,...l})=>{const n=te({isRemote:!0}),{href:a,target:i,text:r,onClick:s}=n(l);return u("a",{className:`text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Co=x((({className:e="",links:t})=>p("div",{className:v("@container",e),children:[u("div",{className:"pt-lg",children:u(ke,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs pt-lg",children:t.map(((e,t)=>u(ko,{index:t,...e},String(t))))}):null]}))),So="w-52",Io=x((({className:e,...t})=>{const{topItems:l,logo:n}=Es(t.options?.page?.fallback),{documents:a,relatedEnterprises:i,contacts:r,socialMedia:s,mobileApps:o}=rt(d.FOOTER||"footer",{fallback:t.options?.page?.fallback});return p(w,{tag:"footer",className:e,...t,children:[p("div",{className:"flex items-stretch gap-3xl pb-3xl ",children:[u(Ks,{className:So,logo:n}),u(uo,{className:"grow"})]}),p("div",{className:"flex items-stretch gap-6xl",children:[p("div",{className:v(So,"flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[u(go,{items:r}),u(Zi,{media:s,children:"Соцсети"}),u(Zi,{media:o,showButtonText:!1,children:"Мобильное приложение"}),u(re,{version:"link",href:"https://old.rshb.ru",className:"!text-left text-s font-light",onClick:xo,children:"Вернуться на прежнюю версию сайта"})]}),u(io,{className:"flex-grow",topItems:l})]}),u(wo,{className:"mt-xl",links:i}),u(Co,{links:a})]})})),To=x((({className:e="",title:t,description:l,calendar:n,...a})=>p(w,{className:v("space-y-m",e),defaultPadding:"p-6xl",...a,children:[u(T,{title:t,description:l,headlineVersion:"M",isEmbedded:!0}),n?Bo(n):null]}))),Bo=e=>{const t=100/(e.reduce(((e,t)=>t?.month?.length?e+t.month.length:e),0)||1),l=e.filter((e=>e?.month?.length)).map((e=>({...e,flexBasis:`${e?.month?.length?e.month.length*t:""}%`})));return p("div",{className:"w-full flex flex-col justify-center gap-s",children:[u("div",{className:"flex w-full text-h6 text-center",children:l.map((e=>Mo(e,t)))}),u("div",{className:"flex gap-s w-full",children:l.map(((e,t)=>p("div",{className:"border-r border-main-divider last:border-r-0 space-y-s",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex gap-s",children:Po(e)}),p("div",{className:"text-s",children:[u(ke,{size:"text-s",font:"font-light",color:"text-primary-text",children:e.text})," ",u(ke,{size:"text-s",font:"font-light",color:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Mo=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Po=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-52 border-r pr-s border-main-divider last:border-r-0",children:u(X,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Ro=e=>({href:t})=>!!t&&R(M(t)?e.href:e.pathname).startsWith(R(t));function zo(e=[]){const t=B(),l=e.findIndex((e=>Ro(d.BASE_PATH?{pathname:d.BASE_PATH}:e))(t));return[l,e[l]]}const Vo=x((({className:e="",active:t,flat:l,children:n,...a})=>{const i=te({isRemote:!0}),{href:r,target:s,text:o,onClick:c}=i(a);return u("a",{className:v(Ao(t,l),e),href:r,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:Do(t,l),children:o||n})})})),Ao=(e=!1,t=!1)=>v("inline-block border border-solid bg-transparent text-center no-underline",e?"rounded-md border-primary-main group-data-transparent:border-white":"border-transparent",t?"":"px-m py-xs"),Do=(e=!1,t=!1)=>v("font-sans text-s font-light",e?"text-primary-main":v(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover");const jo=e=>e?.length?p("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[u("div",{className:"mb-m",children:u(ke,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>u(_o,{...e},String(t))))})]}):null,_o=x((({icon:e,...t})=>{const l=te(),{text:n,target:a,href:i,onClick:r}=l(t);return p("div",{className:"flex gap-s items-center",children:[e?u(X,{pathPrefix:"/wcms-resources/",image:e}):null,n?u("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:u(ke,{size:"text-l",font:"font-light",color:"text-primary-text",children:n})}):null]})})),Lo=e=>t=>u("div",{className:"mb-xs sm:mb-2xs",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:u(ke,{size:"text-l",font:"font-light",children:t.name||""})})},t.id),$o=x((({className:e,searchTerm:t,onSearch:l})=>p("form",{className:`font-sans relative ${e}`,children:[u("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:u("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),u("input",{id:"search-bar-input",className:"h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text",value:t,onChange:e=>l(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),Oo=x((()=>{const{defaultLocation:e,foreignOffices:t}=Es(),[l,a]=gs(e),[r,s]=n(""),o=Fo(function(){const{data:e}=et("/api/v1/regions",nt);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((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})(o,Eo),{close:d}=Q(),m=i((e=>{a(e),d()}),[]);return p(ao,{className:"pb-20",head:p("div",{children:[u(ke,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),l?p("div",{className:"mb-s",children:[u(ke,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{onClick:()=>a(l),children:u(ke,{color:"text-primary-main",children:l.name})})]}):null,u($o,{onSearch:s,searchTerm:r})]}),children:[r&&r.length>=3?u("div",{children:o.filter((({name:e})=>e&&qs(e.toLowerCase())(r.toLowerCase())>=.8)).map(Lo(m))}):u("div",{className:"columns-1 sm:columns-5",children:Array.from(c.entries()).map((h=m,([e,t])=>p("div",{className:"break-inside-avoid mb-2xl w-56",children:[u("div",{className:"mb-s",children:u(ke,{size:"text-h6",children:e})}),t.map(Lo(h))]},e)))}),jo(t)]});var h})),Eo=e=>e.name?.charAt(0)||"",Fo=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),Uo={default:"w-6 h-6",large:"w-12 h-12"},Ho=x((({className:e,isRounded:t,buttonSize:l="default",isGrayBg:n=!1,disabled:a,ariaLabel:i,image:r,onClick:s})=>u("button",{className:v("group/btn border-0 flex shrink-0 items-center",n?"p-s rounded-full":"p-0 bg-inherit",n&&!t?"bg-main-divider":"",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":`${Uo[l]} text-primary-text hover:text-primary-main`,"group-data-transparent:text-white",e),type:"button",disabled:a,"aria-label":i,onClick:s,children:u(X,{image:r,className:v("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0"})}))),Wo=x((({className:e,version:t,officesLink:l,defaultLocation:n})=>{const a="transparent"===t?"white":"black",[r]=gs(n),s=ho(),o=i((()=>s.open()),[]),c=(()=>{const{open:e,close:t}=Q();return{open:(t={})=>e(u(Oo,{}),t),close:t}})(),d=i((()=>c.open()),[]);return p("div",{className:v("flex items-center gap-lg",e),children:[u(Vo,{flat:!0,href:"#",text:r?.name,onClick:d}),l?u(Vo,{flat:!0,href:l,text:"Офисы и банкоматы"}):null,u(Ho,{image:{icon:"LoupeIcon",iconVersion:a},ariaLabel:"Поиск",onClick:o})]})})),Xo=x((({className:e="",items:t,activeItem:l})=>{const a=te(),[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),c=$t(i((()=>s(!1)),[]));return p("div",{className:v(r?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[u("button",{className:"group/btn flex justify-between items-center h-6","aria-label":""+(r?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>u("div",{className:"w-[3px] h-[3px] rounded mr-2xs bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),u("div",{className:v("absolute flex flex-col rounded-md bg-white p-xl pb-xs",r?"":"hidden"),"aria-hidden":!r,children:t?.map(((e,t)=>{const{text:n,...i}=e,{href:r,target:s,onClick:o}=a(i);return u("a",{className:v("text-l font-light pb-m hover:text-primary-main",e===l?"text-primary-main":""),href:r,target:s,onClick:o,children:n},r||String(t))}))})]})})),Ko=e=>globalThis[e];function Yo(e,t){const[l,r]=n(),s=i((()=>r(Ko(e))),[e]);return a((()=>{const l=document.getElementById(t);if(!l){const e=document.createElement("script");return e.src=t,e.async=!0,e.id=t,e.addEventListener("load",s),document.head.appendChild(e),()=>{document.head.removeChild(e),r(void 0)}}if(!Ko(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const Go={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},qo=x((e=>{const[t,{setTrue:l}]=jt();return t?u(Jo,{...e}):Zo({...e,onClick:l})})),Jo=x((({chat:e="personal",...t})=>((e=>{a((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),Yo("chatbot",Go[e])})(e),Zo(t)))),Zo=({className:e,iconVersion:t,onClick:l})=>u(Ho,{className:v("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l,buttonSize:"large",isGrayBg:!0}),Qo=x((({className:e="",active:t,dataItemName:l,children:n,...a})=>{const i=te(),{href:r,target:s,text:o,onClick:c}=i(a);return p("a",{className:v("relative inline-block bg-transparent text-center no-underline",e),href:r,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:ec(t),children:o||n}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),ec=(e=!1)=>v("font-sans text-l font-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),tc=x((({observerOptions:e,onVisibilityChange:t,children:l,className:n,...a})=>{const r=li(i((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:r,className:n,children:u(Qo,{...a,children:l})})})),lc={default:"px-lg bg-main-divider rounded hover:text-primary-main",transparent:"text-white hover:text-primary-hover"},nc=x((({version:e,internetBankUrl:t})=>t?u(re,{href:t,ariaLabel:"Интернет-банк",target:"_blank",className:v("py-s ml-s text-l font-light whitespace-nowrap hover:text-primary-main",lc["transparent"===e?"transparent":"default"]),children:"Интернет-банк"}):null)),ac=["all","header"],ic=x((({subItems:e=[],version:t,internetBankUrl:l})=>{const a="transparent"===t?"white":"black",i=B(),o=r((()=>e.filter((e=>!e.displayArea||ac.includes(e.displayArea.toLowerCase())))),[e]),c=(e=>(t=[])=>{const l=t?.filter(Ro(e));return l?.length?ha((e=>e.href?.length||0))(l):void 0})(i)(e),[m,h]=n(o.length),x=o.slice(m),g=s(null),f={rootRef:g},b=r((()=>o.map(((e,t)=>e=>{h(e?rc(t):sc(t))}))),[o]);return p("nav",{className:"relative mt-s flex items-center justify-between",children:[u("div",{ref:g,className:"overflow-hidden whitespace-nowrap pb-s mt-xs space-x-3xl",children:o.map(((e,t)=>u(tc,{className:m-1<t?"invisible":"",active:e===c,observerOptions:f,onVisibilityChange:b[t],...e},String(t))))}),x.length?u(Xo,{className:"relative w-auto z-40",items:x,activeItem:c}):null,p("div",{className:"flex",children:[d.CHAT_BOT?u(qo,{className:"ml-4xl",iconVersion:a,chat:d.CHAT_BOT}):null,u(nc,{version:t,internetBankUrl:l})]})]})})),rc=e=>t=>Math.max(t,e+1),sc=e=>t=>Math.min(t,e),oc={"bg-white":"primary",transparent:"transparent"},cc=x((({className:e,bgColor:t="bg-white",version:l=oc[t],...n})=>{const{topItems:a,logo:i,officesLink:r,defaultLocation:s}=Es(n.options?.page?.fallback),[,o]=zo(a),{internetBankUrl:c}=rt(d.PORTAL_DATA||"portal-data",{folderName:"portal-resources",setBasePath:!0});return u(w,{tag:"header",className:v("pt-3xl px-20",o?.items?.length?"pb-m":"pb-lg",e),defaultPadding:"",version:l,...n,children:p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(Ks,{className:"mr-3xl",bgColor:t,logo:i}),a?.map(((e,t)=>u(Vo,{active:e===o,...e},String(t)))),u(Wo,{version:l,className:"ml-auto",officesLink:r,defaultLocation:s})]}),u("div",{className:v("mt-xl h-px bg-main-divider","transparent"===l?"opacity-30":"")}),o?.items?.length?u(ic,{subItems:o.items,version:l,internetBankUrl:c}):null]})})})),dc={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},mc=x((({className:e="",padding:t="p-0",gap:l="XS",version:n="transparent",isTheme:a=!1,isCardBorder:i,...r})=>u(w,{className:v("relative","grid grid-cols-12",dc[l],e),padding:t,version:n,isTheme:a,...r,children:Ci({...r,extraProps:{className:Si(i)}})})));mc.childrenTypes={exclude:["HorizontalLayout"]};const hc=x((e=>{const{className:t,image:l,...n}=e;return u(w,{className:t,defaultPadding:"p-0",...n,children:u(X,{image:l})})})),uc=x((({className:e="",cards:t=[],button:l})=>{const[a,r]=n(0),s=i((e=>r(e)),[]),o=t.length,[c,d]=An({itemCount:o,visibleItemCount:2}),{canDec:m,canInc:h}=d,x=t[c]?.href;return p("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[p("div",{className:"relative overflow-hidden",children:[o?pc({activeIndex:c,cards:t,selectedCardIndex:a,onClick:s}):null,Ln({...d,btnClass:["left-12","right-12"],className:"top-16"}),m?u("div",{className:"absolute top-0 left-0 h-full w-32 bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-32 bg-opacity-to-white"}):null]}),u(re,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function pc({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const a=460*e,i=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${a}px)`},className:"duration-1000 px-6xl",children:u("div",{className:`w-full flex flex-nowrap gap-s pb-6xl ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return p("button",{type:"button",onClick:n,className:"p-3xl min-w-fit flex items-center gap-2xl bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u(X,{className:"p-lg rounded-full bg-secondary-light",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-s",children:[e?.sum?xc("страховая сумма",e.sum):null,e?.fee?xc("страховой взнос",e.fee):null]}),gc(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function xc(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p(ke,{size:"text-h6",children:[Fe(2)(t)," ₽"]}),u("div",{className:"mt-2xs",children:u(ke,{size:"text-l",color:"text-secondary-text",children:e})})]})}function gc(e){return e?u(X,{className:"h-6 w-6 min-w-6 min-h-6 absolute right-4 top-4",image:{icon:"DoneIcon"},width:"24",height:"24"}):null}const fc=x((({className:e="",title:t,insuranceTabs:l=[],button:a,...r})=>{const[s,o]=n(0),c=i((e=>o(e)),[]);return p(w,{className:v("box-border overflow-hidden relative px-0 space-y-2xl",e),defaultPadding:"p-6xl",...r,children:[t?u(C,{className:"text-center",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-xs bg-secondary-light w-fit mx-auto rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:n}){return u("button",{type:"button",onClick:n,"aria-label":e,className:"box-border px-m py-s text-m font-light "+(l?"bg-primary-main text-white rounded-md":"text-secondary-text"),children:e},String(t))}({title:e?.title,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))}):null,u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:bc({insuranceTabs:l,button:a})})]})})),bc=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(uc,{button:t,cards:e},String(l)))):null};const yc=e=>t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:`sep-${n}`},l):[l]),[]),vc={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Nc={XS:"h-10",S:"h-16",M:"h-24",L:"h-32",XL:"h-52"},wc=x((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:a,investmentColumns:i,...r}=e,s=i?[...i]:[];return a&&s.unshift(a),u(w,{className:t,defaultPadding:"p-4xl",...r,children:p("div",{className:"container text-m font-light space-y-4xl",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-3xl pr-lg text-white",children:[yc(u("div",{className:"w-px h-4 bg-gray"}))(s.map(kc)),u("div",{className:"absolute right-3xl w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-xs mx-3xl"}),u("div",{className:"flex justify-between text-primary-text mt-s -mx-5xl",children:s.map(Ic)})]}):null,l?.length?u(Ee,{className:"max-w-[657px]",items:l,isDotted:n,listItemSize:"M"}):null]})})})),kc=(e,t,l)=>{const n=1===t,a=t===l.length-1;return u("div",{className:`${Cc(n,a,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(a?"border-4 border-green-more-dark p-2xs min-w-72":""),children:e.cells.reverse().map(Sc)}):null},`column_${t}`)},Cc=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-s",l.length&&!t?"pr-s pb-3xl":"pb-xl"].join(" "),Sc=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-xs ${Nc[l]} ${vc[n]} ${"XS"===l?"px-s":"px-5xl"}`,children:u(ke,{align:"text-center",children:e.text})},`cell_${t}`):null},Ic=(e,t)=>e?.title?u("div",{className:"flex-1 max-w-[180px] text-center px-xs last:pr-3xl",children:e.title},`title_${t}`):null,Tc=["байт","Кб","Мб","Гб","Тб","Пб"],Bc=x((({icon:e,text:t,href:l,target:n,fileFormat:a,fileSize:i})=>{const r=a||i?",":"",s=i??"",o=a?String(a):"";return p("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",role:"link",href:l,target:n,children:[e,t?p(ke,{size:"text-l",font:"font-light",children:[t,u(ke,{color:"text-secondary-text",children:l&&`${s} ${r} ${o}`})]}):null]})})),Mc={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},Pc=x((({className:e="",title:t,description:l,align:n="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const o=B();return p(w,{className:v("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[u(T,{title:t,description:l,align:n,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?u("div",{className:v("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",Mc[r]),role:"list",children:a.map(Rc(o,i))}):null]})})),Rc=(e,t)=>(l,n)=>{if(""===l?.docType)return null;const a="Attachment"===l?.docType?A(e)(l?.attachment?.src):l?.href,i="Attachment"===l?.docType?((e,t=2)=>{if(0===e)return"";const l=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,l)).toFixed(t))} ${Tc[l]}`})(l?.attachment?.fileSize||0):l?.fileSize,r="Attachment"!==l?.docType?l?.fileFormat:"";return u("div",{role:"listitem",children:u(Bc,{text:l?.text,target:l?.target,href:a,fileFormat:r,fileSize:i,icon:t?u(X,{className:"min-w-6 min-h-6",image:t,width:"24",height:"24"}):null})},String(n))},zc=x((({className:e,padding:t,align:l="text-left",buttons:n=[],description:a,image:i,items:r,qr:s,additionalDescription:o="",title:c="Мобильное приложение",version:d="primary",...m})=>{const h="secondary"===d?"p-m min-w-32":"min-w-24",x=i?.src?u(X,{className:"hidden lg:block",image:i}):null;return u(w,{className:v("min-h-80",e),padding:"p-0",version:d,...m,children:p(me,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:u(C,{headingType:"h3",title:c,className:v("whitespace-pre-wrap",l)}),rightImage:x,buttons:De(n,{className:"flex-wrap"}),children:[a?u(ke,{size:"text-xl","font-weight":"font-light",children:a}):null,p("div",{className:v("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[u(Ee,{items:r,listItemSize:"M"}),u(ke,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:o}),s?.src?u("div",{className:v("flex justify-center bg-white rounded-md @xl:-order-1",h),children:u(X,{className:"w-fit",image:s})}):null,i?.src?u(X,{className:"lg:hidden",image:i}):null]})]})})})),Vc={primary:"bg-white/30",secondary:"bg-main-divider"},Ac={primary:"text-white",secondary:"text-secondary-text"},Dc=x((({count:e,version:t="secondary"})=>u("div",{className:v("w-6 h-6 rounded-full flex items-center justify-center",Vc[t]),children:u(ke,{size:"text-xs",color:Ac[t],children:e})}))),jc=(e=[],t={})=>e.filter((({content:e={}})=>_r(t,e))).length,_c=(e,t)=>e===t;const Lc=($c=function(...e){return(t,l)=>e.some((e=>e(t,l)))}(_c,((e=_c)=>(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])=>$c(l,t[e])))));var $c;const Oc=[],Ec={},Fc={default:"px-xs",underlined:"px-m",rounded:"px-lg rounded-md"},Uc={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",rounded:"text-white"},Hc={default:"bg-white",underlined:"bg-white",rounded:"bg-transparent"},Wc={default:"sm:bg-primary-main",underlined:"bg-white",rounded:"bg-primary-main"},Xc=x((({tag:e="div",item:t={},isActive:l,type:n="default",onClick:a})=>{const i=e,{text:r,appendRight:s,...o}=t;return u(i,{className:v("h-12","block flex-1","cursor-pointer",Fc[n],l?Wc[n]:Hc[n]),role:"tab","aria-selected":l,onClick:a,...o,children:p("div",{className:v("h-full","flex justify-center items-center","text-center whitespace-nowrap",l?Uc[n]:"text-secondary-text hover:text-primary-main"),children:[u(ke,{size:"text-m",children:r}),s?u("div",{className:"ml-xs",children:s}):null]})})})),Kc=x((e=>u(e?.item?.href?Yc:Gc,{...e}))),Yc=x((e=>{const t=te(),l=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:n,...a}=t({...e.item,onClick:l});return u(Xc,{...e,tag:"a",item:a,onClick:n})})),Gc=x((({item:e={},onClick:t,...l})=>{const n=i((()=>{t&&t(e)}),[t,e]);return u(Xc,{item:e,onClick:n,...l})})),qc=(e,t,l)=>(n,a)=>u(Kc,{isActive:n===e,onClick:t,type:l,item:n},String(a)),Jc=x((({className:e,tabsType:t="default",items:l=[],value:n,onChange:a})=>u("div",{className:v("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tablist",children:l.map(qc(n,a,t))}))),Zc={categories:[],extraOptions:[],propertyType:[],stage:[]},Qc=x((({className:e,hotFilters:t,filtrationSchema:l={},resetButton:n,...a})=>{const[s,{field:o,reset:c,update:d}]=dt(Zc),m=$r(a.block?.blocks,s)(),h=i(((e=Zc)=>d(e)),[]),x=(({hotFilters:e=Oc,filtrationState:t=Ec,blocks:l=Oc,onFiltrationStateChange:n})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Lc(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,appendRight:u(Dc,{version:t===e[a]?"primary":"secondary",count:jc(l,t.filter)})})))),[e,l,a]),o=i((t=>{n(e[s.indexOf(t)].filter)}),[e,s]);return{value:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:h});return p(w,{className:v("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[u(Jc,{...x}),Er({field:o,reset:c,filtrationSchema:l,resetButton:n}),u(Dr,{blocksToRender:m,...a})]})}));function ed(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),a=new e.Clusterer({clusterIcons:[{href:"/icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"/icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));a.add(i),t.geoObjects.add(a),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}Qc.childrenTypes=["ProductTile"],Qc.childSchema=e=>e?.filtrationSchema||{};const td={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"flex items-center justify-center",font:"text-center font-sans"},ld=e=>u("a",{className:`select-none cursor-pointer px-4xl h-12 bg-primary-main text-white ${Object.values(td).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),nd={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center",font:"text-center font-sans"},ad=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(nd).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(_,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),id={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center",font:"text-center font-sans text-l"},rd=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(id).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(_,{name:l,width:"20",height:"16"})})})),sd={border:"border border-transparent rounded-md ",position:"absolute flex items-center justify-center",size:"w-12 h-12",focus:"focus:border-primary-text focus:border",font:"text-center font-sans",active:"active:bg-primary-active",hover:"hover:bg-primary-hover",other:"select-none cursor-pointer"},od=[55.753995,37.614069],cd=x((({points:e,className:t="",zoom:l=5})=>{const i=s(null),r=Yo("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${d.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[o,c]=n(),m=e?dd(e):od;if(a((()=>{i?.current||r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:m,zoom:l,controls:[],suppressMapOpenBlock:!0}),ed(r,i.current,e))})),i.current&&r&&(ed(r,i.current,e),e?.length||i.current.setCenter(od))}),[r,i,e,m,l]),!r)return null;const h=o?"z-[100000]":"z-10";return p("div",{id:"map",className:v(!o&&"relative","w-full",t),children:[u("div",{className:v("absolute flex left-2 top-4 w-1/2",h),children:ld(m)}),u("div",{className:v(Object.values(sd),h,"right-2 top-4 bg-white"),onClick:()=>{const e=i.current.container;o?e.exitFullscreen():e.enterFullscreen(),c(e.isFullscreen())},children:u(_,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:v("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",h),children:[u(rd,{yandexMaps:i}),u(rd,{yandexMaps:i,direction:"out"})]}),ad(i.current,r,v("right-2 top-80",h))]})})),dd=e=>[hd(md(e,0)),hd(md(e,1))],md=(e,t)=>e.map((e=>e[t])),hd=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,ud={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных"},pd=(e,{field:t,reset:l})=>p("div",{className:"pb-2xl",children:[e?.length?u("div",{className:"flex flex-wrap gap-3xl pb-2xl",children:e.map((e=>u(Dl,{text:ud[e],...t(e)},e)))}):null,u(re,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:l,text:"Очистить фильтр",appendRight:u(_,{name:"CloseIcon",width:"16",height:"16"})})]}),xd=()=>null,gd=()=>[],fd=x((({className:e,data:t=[],renderCard:l=xd,filterItems:n=gd,initFilterState:a={},descriptionData:i,title:r})=>{const[s,{field:o,reset:c}]=dt(a),d=n(t,s),m=d.map((e=>[e.gpsLatitude,e.gpsLongitude].filter(Boolean))).filter((e=>e&&2===e.length)),h=d.length;return p("div",{className:v("space-y-1",e),children:[p("div",{className:"bg-white",children:[p("div",{className:"pt-6xl px-6xl",children:[p("div",{className:"flex gap-xs pb-2xl",children:[u(C,{headingType:"h2",children:r}),h?u(ke,{size:"text-h2",color:"text-secondary-text",children:`(${h})`}):null]}),i?bd(i):null,pd(Object.keys(a),{field:o,reset:c})]}),u("div",{className:"h-[600px]",children:u(b,{children:u(cd,{points:m,className:"h-full"})})})]}),d.map(l)]})})),bd=({description:e,list:t})=>e||t?.length?p("div",{className:"p-xl mb-2xl border border-gray rounded-md",children:[e?u(S,{size:"text-l",font:"font-light",children:e}):null,t?.length?u("div",{className:"flex gap-2xl flex-wrap pt-xs",children:t.map(((e,t)=>p("div",{className:"flex gap-xs items-center",children:[e?.image?u(X,{image:e.image}):null,e?.text?u(ke,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,yd={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"}},vd=x((({className:e,children:t,color:l="gray"})=>u("div",{className:v("p-s border border-gray rounded-md flex items-center",yd[l].border,e),children:u(ke,{size:"text-m",color:yd[l].text,children:t})}))),Nd=x((({value:e,subText:t,children:l,...n})=>{const a=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[a.length,l,t].every((e=>!e))?null:wd({textItems:a,subText:t,children:l,...n})})),wd=({label:e,labelSize:t="text-m",textItems:l,subColor:n,subText:a,className:i,children:r})=>p("div",{className:v("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?u(ke,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||l.filter(Boolean).map(((e,t)=>u(ke,{size:"text-l",children:e.trim()},String(t)))),a?u(ke,{color:n,size:"text-m",children:a}):null]}),kd=x((({className:e,children:t})=>u("div",{className:v("flex border-t border-solid border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Cd=({location:e,address:t,billAcceptorType:l,terminalType:n,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},o)=>{const c=[{label:"Устройство",value:Id(n)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===l?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(ke,{size:"text-h4",children:Id(e)}),u(vd,{color:"green",children:Id(s)})]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(_,{name:"GeolocationIcon",width:"24",height:"24"}),u(ke,{size:"text-l",children:t})]}):null,u(kd,{className:"flex-wrap",children:c?.map(Sd)})]},String(o))},Sd=(e,t)=>u(Nd,{...e},String(t)),Id=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Td=[];const Bd=async e=>await lt(e,{method:"GET"})||Td,Md={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1},Pd={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable)},Rd=x((({data:e,className:t})=>{const[l]=gs(),n=function(e){const{data:t=Td}=et(`/api/v1/atms?regionCode=${e}`,Bd);return t}(l?.code??"000");return u(fd,{className:t,filterItems:zd,data:n,initFilterState:Md,renderCard:Cd,title:`Банкоматы филиала ${l?.name}`,descriptionData:e})})),zd=(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=>Pd[t](e))),l=!n.length||n.some((t=>Pd[t](e)));return t&&l}))},Vd=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", "),a=[Ad({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:l?"":n}),Ad({workTime:l?.workTime,lunchHour:l?.lunchHour,daysOff:n},!0)].filter(Boolean);return u(Nd,{label:"Режим работы",value:a,className:"max-w-none"})},Ad=({workTime:e="",lunchHour:t="",daysOff:l=""},n=!1)=>e?[`${n?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",l?`не работает: ${l}`:""].filter(Boolean).join("; "):"",Dd=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],jd=e=>Dd.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??"")}}))),_d=e=>{if(!e)return null;const t=Ld(e);return p(kd,{className:"border-none",children:[u(Nd,{label:"Для юридических лиц",labelSize:"text-l",children:u("div",{className:"flex gap-1",children:t.map($d)})}),u(Nd,{label:"Режим работы",className:"max-w-none",children:u(ke,{children:e})})]})},Ld=e=>{const t=Dd.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},$d=({short:e,status:t},l)=>u("div",{className:v("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:u(ke,{size:"text-xs",children:e})},String(l)),Od=(new Date).getDay(),Ed=({name:e,address:t,phone:l,fax:n,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:o,exchangeRate:c},d)=>{if(!o)return null;const m=jd(o),h=o?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return p("div",{className:"bg-white col-span-12 p-3xl border-green border",children:[p("div",{className:"flex justify-between",children:[u(ke,{size:"text-h4",children:e}),Ud(m)]}),t?p("div",{className:"flex pb-xl pt-xs gap-2xs",children:[u(_,{name:"GeolocationIcon",width:"24",height:"24"}),u(ke,{size:"text-l",children:t})]}):null,p(kd,{className:"flex-wrap",children:[u(Nd,{label:"Факс",value:n}),u(Nd,{label:"Телефон филиала",value:l}),u(Nd,{label:"Для обращений юридических лиц",value:a}),u(Nd,{label:"Обслуживание физических лиц",value:i}),u(Nd,{label:"Для консультаций по валютному контролю",value:s}),u(Nd,{label:"Контакт-центр",value:r})]}),o.isMatchesPattern?u(kd,{children:u(Nd,{label:h,labelSize:"text-l",className:"w-full max-w-none",children:u("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:m?.map(Hd)})})}):p(kd,{children:[u(Nd,{label:h,labelSize:"text-l",children:u("div",{className:"flex gap-1",children:m?.map($d)})}),Vd(m)]}),o?.businessScheduleVisibleTag?_d(o?.businessScheduleDescription):null,c?.currencies?.length?u(kd,{className:"flex-wrap",children:c?.currencies?.map(Fd)}):null]},String(d))},Fd=({currency:e,buyExchangeRate:t,saleExchangeRate:l},n)=>p("div",{className:"flex gap-lg h-full",children:[e?.currency?u(Nd,{label:"Валюта",value:e.currency}):null,t?u(Nd,{label:"Купить",value:String(t)}):null,l?u(Nd,{label:"Продать",value:String(l)}):null]},String(n)),Ud=e=>{const[t]=e?.slice(Od-1)??[];if(!t)return null;const{lunchHour:l,status:n,workTime:a,hasLunch:i}=t;return n?p("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?u(vd,{color:"green",children:a}):null,l&&i?u(vd,{color:"yellow",children:`перерыв: ${l}`}):null]}):u(vd,{color:"red",children:"Выходной"})},Hd=({title:e,status:t,workTime:l,lunchHour:n,hasLunch:a},i)=>u(Nd,{label:e,value:t&&l?l:"",subText:Wd(n,a,t),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Wd=(e,t=!1,l=!1)=>l?e&&t?`Перерыв ${e}`:e:"Не работает",Xd=[];const Kd=async e=>await lt(e,{method:"GET"})||Xd,Yd={workingSaturday:!1},Gd={workingSaturday:e=>Boolean(e.workSchedule?.workingSaturday)},qd=x((({className:e})=>{const[t]=gs(),l=function(e){const{data:t=Xd}=et(`/api/v1/branches?regionCode=${e}`,Kd);return t}(t?.code??"000");return u(fd,{className:e,filterItems:Jd,data:l,initFilterState:Yd,renderCard:Ed,title:`Офисы филиала ${t?.name}`})})),Jd=(e,t)=>{const l=Object.keys(t).filter((e=>t[e]));return e.filter((e=>l.every((t=>Gd[t](e)))))},Zd=x((({data:e,className:t,...l})=>{const n=e?.dataType??"offices";return u(w,{version:"transparent",className:v(t),defaultPadding:"p-0",...l,children:"offices"===n?u(qd,{}):u(Rd,{data:e})})})),Qd=x((({text:e,size:t,align:l,font:n,children:a,...i})=>u(w,{defaultPadding:"p-0",...i,children:u(S,{size:t,align:l,font:n,children:e||a})}))),em=x((({className:e,title:t,description:l="Блок в разработке...",...n})=>p(w,{className:v("box-border",e),...n,children:[u(T,{className:"max-w-[600px]",title:t,description:l,headlineVersion:"L",align:"text-left",isEmbedded:!0}),u("figure",{className:"m-0 mt-xl min-w-[80%]",children:tm()})]}))),tm=(e=3)=>nm(100,e).map((e=>Math.floor(e))).map(lm),lm=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-light"},String(t)),nm=(e,t)=>[e].concat(t>0?nm(e/1.618,t-1):[]),am=x((({className:e="",padding:t,slides:l=[],...a})=>{const[i,r]=n(0);return p(w,{className:v("box-border overflow-hidden",e),defaultPadding:"py-6xl",padding:t,...a,children:[u("div",{className:"flex duration-1000",style:{transform:`translateX(-${100*i}%)`},role:"list",children:l.map((({productBlock:e},t)=>u("div",{className:"box-border grow-0 shrink-0 basis-full",role:"listitem",children:u(Ye,{className:"pl-6xl h-full",headlineVersion:"M",isFullWidthTitle:!1,...e,...a})},String(t))))}),u("div",{className:"h-28 px-xs mt-m -mb-m flex gap-xs box-border",children:l.map(im({activeSlideIndex:i,onClick:r}))})]})})),im=({activeSlideIndex:e,onClick:t})=>({nav:l},n)=>{const a=n===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:py-xl backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-secondary-text text-l font-light":"text-secondary-text text-m font-light group-data-secondary:text-white/80";return p("button",{type:"button",onClick:()=>t(n),"aria-label":l?.title,className:v("relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50",i),children:[u("div",{className:r,children:l?.title}),u("div",{className:s,children:l?.description})]},String(n))},rm=x((({address:e,email:t,telephone:l,button:n,className:a="",__html:i,icon:r,title:s,version:o="primary",...c})=>p(w,{className:v("box-border text-left space-y-s",a),version:o,...c,children:[p("div",{className:"w-full flex justify-between flex-row-reverse",children:[Ae(r)?u("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:u(X,{image:r})}):null,s?u(C,{headingType:"h3",as:"h3",title:s}):null]}),p("div",{className:"w-full space-y-m",children:[i?sm(i):null,om({label:"Адрес",data:e,iconName:"GeolocationIcon"}),om({label:"Телефон(факс)",data:l,iconName:"PhoneIcon"}),om({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),n?.text?De([n]):null]})]}))),sm=e=>u("div",{className:"border-b border-main-divider pb-lg",children:u(Ne,{__html:e})}),om=({label:e,data:t,iconName:l,dataColor:n=""})=>t?p("div",{className:"flex gap-s",children:[u(_,{iconVersion:"black",name:l,width:"24",height:"24"}),p("div",{className:"flex flex-col gap-2xs",children:[u(ke,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),u(ke,{size:"text-xl",color:n,children:t})]})]}):null,cm=x((e=>{const{__html:t,richVersion:l,...n}=e;return u(w,{defaultPadding:"p-0",...n,children:u(Ne,{__html:t,richVersion:l})})})),dm=x((({label:e,labelIconBgVersion:t,icon:l,onToggle:n,labelIcon:a})=>u(Mr,{tag:"button",className:v("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:n,textNode:p("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[null,e?u(ke,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:l?u(_,{name:l,iconVersion:"color",width:"24",height:"24"}):null}))),mm=x((({className:e="",isExpanded:t,isFoldButtonOnTop:l=!0,label:n="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,...o})=>u(w,{className:v("w-full","border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",...o,children:u(tr,{isFoldButtonOnTop:l,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>u(lr,{className:v("gap-lg","grid grid-cols-12 [&>*]:pb-m"),isUnfolded:e,children:Ci({...o,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>hm({foldButtonVersion:r,label:n,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t})})})));mm.childrenTypes={exclude:["RollupItem"]};const hm=({foldButtonVersion:e,label:t,labelIcon:l,labelIconBgVersion:n,isUnfolded:a,onToggle:i})=>{const r=t||(a?"Скрыть":"Развернуть"),s=(e=>e?"MinusIcon":"PlusIcon")(a);return"accordion"===e?u(dm,{label:r,labelIcon:l,labelIconBgVersion:n,icon:s,onToggle:i}):u(Pr,{label:r,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},um=x((({className:e=""})=>{const[t,l]=n("option2"),a=i((e=>l(e)),[]);return p("div",{className:v("order-4",e),children:[u(nn,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),u(nn,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),pm=x((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return u(Ut,{options:s,label:r,placeholder:a||n,onChange:e=>i(e.key),value:o})})),xm=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:a,onSelectedBranch:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(pm,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"flex-1 min-w-0",children:u(pm,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),gm=["От 1 дня","До 365 дней"],fm=x((({days:e,setDays:t})=>p("div",{className:"order-1",children:[u(ke,{size:"text-m",font:"font-light",children:"Срок аренды"}),u(Nl,{min:1,max:365,value:e,items:gm,onChange:t})]}))),bm=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:a,onSelectedBoxSize:i})=>p("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[u("div",{className:"flex-1 min-w-0",children:u(pm,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"flex-1 min-w-0",children:u(pm,{data:n,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),ym=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"contents @xl:block flex-1 space-y-xl",children:[u(xm,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:vm(c)}),u(fm,{days:a,setDays:e=>c({days:e})}),u(bm,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Nm(c),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("div",{className:"order-4",children:u(ke,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),p("div",{className:"contents @md:flex justify-between items-center gap-m",children:[u(um,{}),u(re,{text:"Офисы на карте",version:"primary",onClick:d,className:"order-6"})]})]}))),vm=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Nm=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},wm=x((({days:e,tariffs:t=[]})=>{const l=Cm(e,t),n="На рисунке изображена пачка листов\nформата А4";return p("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[p("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[km("Аренда за",e),km("Цена",l+" ₽")]}),u("div",{className:"@xl:hidden order-3 mb-xs",children:u(S,{size:"text-s",font:"font-light",color:"text-secondary-text",children:n})}),p("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[u(X,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),u("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:u(S,{size:"text-s",font:"font-light",color:"text-white",children:n})})]})]})})),km=(e,t)=>p("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[u(ke,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),u("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Cm=(e,t)=>{const l=Sm(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Sm=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},Im=(e,t)=>e.find((e=>e.branchCode===t)),Tm=x((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Im(n,l.selectedBranch),o=Bm(s?.safeBoxCaseVolumes),c=Mm(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Pm(c,l.selectedBoxSize);return p("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[u(ym,{...l,regions:t,onClick:r,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),u(wm,{days:l.days,tariffs:d})]})})),Bm=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Mm=(e,t)=>e?.find((e=>e.volume===t)),Pm=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Rm=[];const zm=async e=>await lt(e,{method:"GET"})||Rm,Vm=x((({title:e,footnote:t,className:l="",...a})=>{const[r,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=xt(),h=Am(c.selectedRegion,m),x=function(e){const{data:t}=et(e?`/api/v1/safeboxes?regionCode=${e}`:null,zm);return t||Rm}(h),g=i((e=>d((t=>({...t,...e})))),[d]),f=(b=Im(x,c.selectedBranch)||x,Array.isArray(b)?b.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):b?.gpsLatitude&&b?.gpsLongitude?[[b.gpsLatitude,b.gpsLongitude]]:[]);var b;return p(w,{className:l,defaultPadding:"",...a,children:[p("div",{className:"p-4xl space-y-xl",children:[e?u(C,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,u(Tm,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u(S,{size:"text-s",font:"font-light",children:t}):null]}),f.length&&r?u(cd,{points:f,className:"h-[640px]"}):null]})})),Am=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Dm=({styleMap:e,isMainButton:t,version:l})=>(n,a,i)=>{const{label:r,description:s,button:o,items:c,isDotted:d}=n;return p("div",{className:v("relative flex flex-col items-center text-center justify-between whitespace-pre-line overflow-hidden space-y-3xl",jm(i.length)),children:[p("div",{className:"space-y-xs",children:[r?u(ke,{size:"text-h6",align:"text-center",children:r}):null,p("div",{className:"flex flex-col items-center gap-3xs",children:[s?u("div",{className:e.description,children:s}):null,u(Ee,{className:e.description,items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(re,{className:"box-border py-s w-full max-w-60 mt-auto",version:l,...o,children:o?.text}):null]},String(a))},jm=e=>e<5?"w-72":"w-52",_m={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"},Lm=x((({buttons:e,className:t="",description:l,showLines:n=!0,size:a="normal",steps:i=[],stepVersion:r="gray",title:s,version:o="primary",...c})=>{const d=i.length>3,m=_m,h=(e=>e?"":"opacity-0")(n),x=(e=>e<5?"px-24":"px-16")(i.length),g=Boolean(e?.every((e=>e?.text)));return p(w,{className:v("box-border flex flex-col items-center overflow-hidden gap-y-3xl",t),defaultPadding:"p-6xl",version:o,...c,children:[u(T,{headlineVersion:"S",title:s,description:l,isEmbedded:!0,className:"w-full",align:yn}),i?.length?p("div",{className:"box-border space-y-lg",children:[u("div",{className:v("flex items-center",x),children:yc(u("div",{className:v("h-0.5 w-full bg-secondary-light flex-1",h)}))(i.map($m(m,a,r)))}),u("div",{className:v("flex justify-between",d?"gap-x-s":"gap-x-20"),children:i.map((f={styleMap:m,isMainButton:g,version:o},(e,t,l)=>{const{type:n}=e;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return Dm(f)(e,t,l);case"rte":return u("div",{className:v("text-center",jm(l.length)),children:u(Ne,{__html:e.__html})},String(t));default:return null}}))})]}):null,De(e)]});var f})),$m=(e,t,l)=>({icon:n},a)=>{const i="secondary"===l?"white":"color";return u(w,{defaultPadding:"",className:`${Om(t)} flex justify-center items-center text-center rounded-full box-border z-10`,version:l,children:Ae(n)?u(X,{image:{...n,iconVersion:n?.iconVersion||i},width:"48",height:"48"}):u("span",{className:v("text-h4","transparent"===l?e.iconText:Em(l)),children:a+1})},String(a))},Om=e=>"normal"===e?"h-24 w-24":"h-16 w-16",Em=e=>"secondary"===e?"group-data-primary:text-white":"text-secondary-text",Fm=x((()=>u("div",{}))),Um=x((({className:e,version:t,gap:l=14,padding:n=16,showDots:a=false,minHeight:i,children:r,onVisibleIndicesChange:s,listType:o="horizontal-list"})=>{const c=Array.isArray(r)?r.length:0,[d,m]=pi({itemCount:c,onVisibleIndicesChange:s}),[h]=m.visibleIndicesRange;return p("div",{className:v(e,"vertical-list"===o?"relative h-full":""),children:[u(ri,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:l,padding:n,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:o,minHeight:i,children:r}),a?u(mi,{containerRef:d,activeIndex:h,dotCount:c,listType:o,version:t}):null]})})),Hm=x((({listType:e,showDots:t,options:l,version:n,...a})=>u(w,{version:n,defaultPadding:"p-0",...a,children:u(Um,{listType:e,showDots:t,version:n,children:Ci({...a,options:l})})})));Hm.childrenTypes={exclude:["SwipeListControlBlock"]};const Wm="hidden sm:flex absolute z-40 top-0",Xm=x((({className:e,items:t=[],value:l,onChange:n,tabsType:a})=>{const[i,r]=pi({itemCount:t?.length||0});return p("div",{className:v("relative overflow-x-auto no-scrollbar",e),role:"tablist",children:[u(ri,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:r.handleVisibleIndicesChange,children:t.map(qc(l,n,a))}),r.canScrollLeft?u(jn,{className:v("left-6",Wm),onClick:r.scrollLeft}):null,r.canScrollRight?u(_n,{className:v("right-6",Wm),onClick:r.scrollRight}):null]})})),Km=({tabsMode:e,...t})=>{switch(e){case"wideScreen":return u(Jc,{...t});case"centered":return u("div",{className:"flex",children:u(Jc,{className:"m-auto p-xs rounded-md bg-main-gray",tabsType:"rounded",...t})});case"scrollable":return u("div",{className:"flex",children:u(Xm,{className:"m-auto",tabsType:"underlined",...t})});default:return null}},Ym="tab",Gm=x((({className:e="",isSticky:t,tabs:l=[],tabsMode:s,...o})=>{const c=B(),{isReady:d}=c,m=r((()=>l.map(Jm)),[l]),[h,p]=n(0);a((()=>{if(!l||!l[0])return;const e=c.query.tab&&l.findIndex((e=>"group"===e.type&&e.ref===c.query.tab))||0,t=l[e]||l[0];p(e),qm(t)}),[d]),a((()=>{const e=l[h];"group"===e?.type&&y.subject("tab",{type:e.type,label:e.ref})}),[l,h]);const x=i((e=>{const t=m.indexOf(e),n=l[t];p(t),qm(n),"group"===n.type&&(e=>{const t=new URLSearchParams(c.query);e.name?t.set(Ym,e.name):t.delete(Ym),c.replace(`${c.pathname}?${t}`,"",{scroll:!1})})(e)}),[l,m]);return u(w,{className:v(t?"sticky top-1 z-20":"",e),defaultPadding:"p-0",...o,children:Km({items:m,value:m[h],tabsMode:s,onChange:x})})})),qm=e=>{"group"===e.type&&y.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&y.fire("tab",{type:e.type,label:e.href})},Jm=e=>"group"===e?.type?{text:e.title,name:e.ref}:e,Zm=x((({className:e="",isOpen:t,onClick:l})=>u(re,{className:e,appendRight:u(X,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"20",height:"20"}),text:t?"Скрыть":"Показать",version:"gray",onClick:l}))),Qm={Buttons:({buttons:e})=>De(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?u(X,{image:e}):null,List:({isDotted:e,...t})=>u(Ee,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{className:"space-y-2xs",children:[e?u("div",{children:e}):null,t?u("div",{children:u(ke,{size:"text-s",color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:a})=>e?u(Zm,{isOpen:a,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null},eh=x((({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 th({cell:e,cellProps:{rowIdx:l,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),th=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in Qm))return null;return u(Qm[l],{...t,...n})},lh=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>u("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>u(eh,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),nh=(e,t)=>140*be(e.slice(0,t).map((e=>e?.cols?.length??1))),ah=(e,t)=>e?.length>0?u("div",{className:v("flex",0===t?"text-secondary-text":""),children:e.map(((e,t)=>u("div",{className:"w-20 text-h6 mx-lg",children:e},String(t))))}):null,ih=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=An({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map((a=l,(e,t)=>{if(!e?.length)return null;const[l,...n]=e,i=v("flex duration-1000 text-center",0!==t?"font-normal":"font-light");return p("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?u("div",{className:"text-xl font-light w-56 min-w-56 py-lg",children:l.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${nh(n,a)}px)`},children:n?.map(((e,t)=>p("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?u("div",{className:"text-xl font-light",children:e.data}):null,e?.cols?ah(e.cols,a):null]},`row${t}`)))})})]},String(t))})),Ln({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]});var a})),rh=x((({activeTabIndex:e,items:t})=>u("div",{children:t.map(((t,l)=>{const n=`activeTabIdx:${e}-tableIdx:${l}`;return p("div",{className:"w-full @container",children:[u("div",{className:"flex p-m bg-white @4xl:bg-gray text-center justify-center relative",children:u(ke,{size:"text-xl",font:"font-light",children:t.title})}),u("div",{className:"w-full pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:u("div",{className:"relative",children:u(ih,{rows:t.rowsData})})})]},n)}))}))),sh=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>p("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl font-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?u(re,{className:"text-primary-main",href:t,version:"secondary",target:"_blank",appendLeft:u(_,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]})));async function oh(e){const t=await fetch(e);return await t.json()}const ch=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:a}=function(e){const{data:t}=et(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),oh);return t||{}}(e),[r,s]=n(0),o=i((e=>s(e)),[]),c=a?.[r]?.items??[],d=a?.map((e=>e.currency??""));return p("div",a?{className:"bg-white z-10",children:[u(sh,{currencies:d,activeTabIndex:r,setActiveTabIndex:o,linkToPDF:t}),u(rh,{activeTabIndex:r,items:c}),u(Zm,{className:"mt-xl",onClick:l,isOpen:!0})]}:{className:"my-lg space-y-m text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(Zm,{onClick:l,isOpen:!0})]})})),dh=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:v("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(ch,{...t,onClick:l})}):null]}))),mh=x((({row:{header:e,data:t},activeIndex:l,rowIdx:a,...r})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,m]=n(void 0),h=i((e=>m(e)),[]);return p(dh,{onHideContentClick:()=>o(void 0),tableInner:s,...r,children:[u("div",{className:v("text-s","w-80 flex-shrink-0"),children:p("div",{className:"flex gap-m items-center text-primary-text",role:"cell",children:[e?.icon?u(X,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?u(ke,{size:"text-m",font:"font-light",children:e?.title}):null]})}),t?.length?u(hr,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(lh,{cells:e,rowIdx:a,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...r},String(t))))}):null]})})),hh=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative space-y-xs",children:[e,Ln({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),uh=x((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:a,hiddenRowsNum:i=0,...r})=>{const s=a?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=An({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(mh,{row:e,activeIndex:d,rowIdx:t,...r},String(t)))),[x,g]=i>0?[h.slice(0,-i),h.slice(-i)]:[h,[]];return p(w,{className:v("overflow-hidden relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...r,children:[u(T,{title:t,description:l,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),u("div",{className:"space-y-m",children:i>0?u(tr,{renderFoldableSection:({isUnfolded:e})=>p(hh,{controls:m,children:[x,u(lr,{isUnfolded:e,children:g})]}),renderFoldButton:Rr}):u(hh,{controls:m,children:h})})]})})),ph=x((({className:e="",title:t,description:l,iconVersion:n,image:a,__html:i,items:r=[],...s})=>p(w,{className:v("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...s,children:["small"===n?xh():null,"big"===n?gh(a):null,p("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?u(ke,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,l?fh(l):null,r?.length?bh(r,!0):null,i?u(Ne,{__html:i}):null]})]}))),xh=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),gh=e=>e?.src?u(X,{className:"h-fit flex-shrink-0",image:e}):null,fh=e=>u(S,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),bh=(e,t)=>u("ul",{className:v("text-secondary-text group-data-secondary:text-white/80",t?"list-disc pl-xl":""),children:e.map(((e,t)=>u("li",{children:u(ke,{size:"text-s",font:"font-light",children:e})},`listItem-${t}`)))}),yh=x((({className:e="",padding:t="p-0",gap:l="",isInnerPadding:n=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,...s})=>u(w,{className:v("relative flex flex-col",dc[l],e),padding:t,version:a,isTheme:i,...s,children:Ci({...s,extraProps:{className:v("w-full",Si(r)),padding:n?"":"p-0"}})})));yh.childrenTypes=[];const vh=e=>(e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12})(e)<10?"py-xl px-6xl":"py-6xl px-32",Nh=x((({className:e,title:t,url:l,previewImg:n,...a})=>{const i=B();return p(w,{className:e,defaultPadding:vh(e),...a,children:[u(T,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:A(i)(n?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:A(i)(l)})}):null]})})),wh={AdTile:ot,ApplicationForm:fn,BenefitsBlock:wn,Bonus:Cn,BonusBenefitsBlock:Rn,ButtonsBlock:Vn,Calculator:Ka,CardTransfer:ei,Carousel:Vi,CarouselBankHistoryCard:Ai,CarouselCard:$i,CarouselCatalogCard:Ei,CarouselInvestmentCard:Hi,CarouselLinks:Yi,CarouselRecommendationCard:Qi,CarouselTariffsCard:ar,ComparisonTable:kr,ContactsBlock:Sr,DepositFiltration:Jr,Depository:hs,ErrorBlock:ps,ExchangeRateTile:$s,Footer:Io,GracePeriod:To,Header:cc,Headline:T,HorizontalLayout:mc,ImgBlock:hc,InsuranceAmountBlock:fc,InvestmentInfo:wc,LinkDocs:Pc,MobileAppTile:zc,MortgageFiltration:Qc,OfficesAtmsMap:Zd,ParagraphBlock:Qd,Placeholder:em,ProductBlock:Je,ProductGallery:am,RepresentativeOfficeInfo:rm,RichTextBlock:cm,RollupItem:mm,SafeDepositRental:Vm,StepsBlock:Lm,StickyBottomMenu:Fm,SwipeListControlBlock:Hm,Tabs:Gm,TariffsTable:uh,TextBlock:ph,VerticalLayout:yh,Video:Nh},kh="cookie",Ch=x((({termLink:e,personalDataPolicyLink:t})=>{const[l,{setTrue:n,setFalse:a}]=jt();Gs((()=>{globalThis.localStorage?.getItem(kh)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(kh,"true"),a()}),[]);return l?u("div",{className:"container fixed left-0 right-0 bottom-0 z-50",children:p("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[u("div",{className:"sm:flex-1",children:p(S,{size:"text-s",font:"font-light",color:"text-primary-text",children:["АО «Россельхозбанк» использует",u(qi,{isRemote:!0,className:Sh(e?.href),...e,children:"cookie"}),"(файлы с данными о прошлых посещениях сайта) для персонализации сервисов и удобства пользователей. Вы можете запретить сохранение cookie в настройках своего браузера.",u(qi,{isRemote:!0,className:Sh(t?.href),...t,children:"Обработка Ваших персональных данных"}),"производится в соответствии с требованиями Федерального закона от 27.07.2006 № 152-Ф3 «О персональных данных»."]})}),u("div",{className:"ml-s sm:ml-0 w-24 flex justify-end",children:u(Ys,{className:"bg-main-gray rounded-md",onClose:r})})]})}):null})),Sh=e=>v("inline mx-2xs",e?"text-green-dark":"");function Ih(e){throw new Error(e)}const Th=({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((()=>y.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Ih(e)}}))),[c,d]),l},Bh=x((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),l=Th({onCloseAll:e,onClose:t}),{close:n}=Q(),r=i((({key:e})=>{"Escape"===e&&n()}),[]);return Lt(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?u("div",{className:"fixed inset-0 z-50",role:"dialog",children:l.map((({dialog:e,id:t},n)=>u("div",{className:v("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar",n===l.length-1?"":"hidden"),children:e},String(t||n))))}):null})),Mh=x((()=>{const[e,t]=n(null),l=i((()=>{t(null)}),[]);a((()=>y.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":l();break;default:Ih(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&l()}),[l]);return Lt(globalThis.document,"keydown",r),e?u("div",{className:"absolute z-50",style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Ph=h();const Rh=x((({className:e,onClick:t,ariaLabel:l})=>u("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:zh()}))),zh=()=>p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Vh("M21.48 11.95c.5-1.4-.4-2.6-1.9-2.6h-4c-.6 0-1.1-.5-1-1.2l.5-3.2c.2-.9-.4-1.9-1.3-2.2-.8-.3-1.8.1-2.2.7l-4.1 6.1M7.48 18.35l3.1 2.4c.4.4 1.3.6 1.9.6h3.8c1.2 0 2.5-.9 2.8-2.1l1.24-3.77"),Vh("M2.38 18.35v-9.8c0-1.4.6-1.9 2-1.9h1c1.4 0 2 .5 2 1.9v9.8c0 1.4-.6 1.9-2 1.9h-1c-1.4 0-2-.5-2-1.9Z")]}),Vh=e=>u("path",{stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",strokeMiterlimit:"10",d:e}),Ah=x((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return a((()=>{(async()=>{const[t]=await Ph.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await Ph.like(e))}),[e]),dislike:i((async()=>{l(await Ph.dislike(e))}),[e])}}(B().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-32 items-center justify-center gap-s p-xs font-sans ${e}`,children:[u(Rh,{onClick:ee(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Rh,{onClick:ee(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),Dh=x((({className:e,blocksRegistry:t,blockDecorator:l,data:n={}})=>{const{style:a,slots:i,likeControl:r,colorPalette:s="pc"}=n,o={key:"",page:n,blocksRegistry:t,blockDecorator:l,parent:n};return p("div",{"data-theme":s,children:[p("section",{className:v("@container relative",a,e),children:[i?.header?u("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:ki(i?.header,{...o,slotName:"header"})}):null,p("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[Ci({block:n,options:o,extraProps:{className:"scroll-mt-12"}}),ki(i?.footer,{...o,slotName:"footer"})]}),r?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(Ah,{className:"rounded-tl-3xl sticky bottom-0 pointer-events-auto"})}):null]}),u(Fm,{}),u(Bh,{}),u(Mh,{}),u(Ch,{termLink:{href:"/pd-policy#cookie",target:"_blank"},personalDataPolicyLink:{href:"/pd-policy",target:"_blank"}})]})}));Dh.childrenTypes=[],Dh.slots=()=>["header","footer","StickyBottomMenu"];e.Blocks=wh,e.ContentPage=Dh,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.LikeAPI=h,e.handlerDecorator=ee,e.joinList=yc,e.packageVersion="0.14.77",e.projectSettings=d,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=V,e.useRouter=B,Object.defineProperty(e,"__esModule",{value:!0})}));