@redneckz/wildless-cms-uni-blocks 0.9.13 → 0.9.14

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 (153) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +52 -42
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Carousel/Carousel.d.ts +1 -0
  5. package/bundle/components/Carousel/CarouselContent.d.ts +3 -3
  6. package/bundle/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
  7. package/bundle/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
  8. package/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
  9. package/bundle/ui-kit/RichText/RichTextProps.d.ts +5 -0
  10. package/dist/components/ApplicationForm/Footnote.js +1 -1
  11. package/dist/components/ApplicationForm/Footnote.js.map +1 -1
  12. package/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  13. package/dist/components/Blocks.js +2 -0
  14. package/dist/components/Blocks.js.map +1 -1
  15. package/dist/components/Carousel/Carousel.d.ts +1 -0
  16. package/dist/components/Carousel/Carousel.js +8 -4
  17. package/dist/components/Carousel/Carousel.js.map +1 -1
  18. package/dist/components/Carousel/CarouselContent.d.ts +3 -3
  19. package/dist/components/Carousel/CarouselScrollButtons.js +2 -2
  20. package/dist/components/CarouselLinks/CarouselLinks.js +2 -3
  21. package/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  22. package/dist/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
  23. package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +11 -0
  24. package/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
  25. package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
  26. package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
  27. package/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
  28. package/dist/components/Tabs/ScrollableTabs.js +1 -1
  29. package/dist/ui-kit/Button/renderArrows.js +1 -1
  30. package/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
  31. package/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  32. package/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
  33. package/dist/ui-kit/RichText/RichTextProps.d.ts +5 -0
  34. package/lib/common.css +1 -1
  35. package/lib/components/ApplicationForm/Footnote.js +1 -1
  36. package/lib/components/ApplicationForm/Footnote.js.map +1 -1
  37. package/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  38. package/lib/components/Blocks.js +2 -0
  39. package/lib/components/Blocks.js.map +1 -1
  40. package/lib/components/Carousel/Carousel.d.ts +1 -0
  41. package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
  42. package/lib/components/Carousel/Carousel.js +8 -4
  43. package/lib/components/Carousel/Carousel.js.map +1 -1
  44. package/lib/components/Carousel/CarouselContent.d.ts +3 -3
  45. package/lib/components/Carousel/CarouselScrollButtons.js +2 -2
  46. package/lib/components/CarouselLinks/CarouselLinks.js +2 -3
  47. package/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  48. package/lib/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
  49. package/lib/components/CarouselRichTextCard/CarouselRichTextCard.fixture.d.ts +7 -0
  50. package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +9 -0
  51. package/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
  52. package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
  53. package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
  54. package/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
  55. package/lib/components/Tabs/ScrollableTabs.js +1 -1
  56. package/lib/ui-kit/Button/renderArrows.js +1 -1
  57. package/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
  58. package/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  59. package/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
  60. package/lib/ui-kit/RichText/RichTextProps.d.ts +5 -0
  61. package/mobile/bundle/bundle.umd.js +1 -1
  62. package/mobile/bundle/bundle.umd.min.js +1 -1
  63. package/mobile/bundle/components/Carousel/Carousel.d.ts +1 -0
  64. package/mobile/bundle/components/Carousel/CarouselContent.d.ts +3 -3
  65. package/mobile/bundle/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
  66. package/mobile/bundle/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
  67. package/mobile/bundle/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
  68. package/mobile/bundle/ui-kit/RichText/RichTextProps.d.ts +5 -0
  69. package/mobile/dist/components/ApplicationForm/Footnote.js +1 -1
  70. package/mobile/dist/components/ApplicationForm/Footnote.js.map +1 -1
  71. package/mobile/dist/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  72. package/mobile/dist/components/Carousel/Carousel.d.ts +1 -0
  73. package/mobile/dist/components/Carousel/Carousel.js +8 -4
  74. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  75. package/mobile/dist/components/Carousel/CarouselContent.d.ts +3 -3
  76. package/mobile/dist/components/Carousel/CarouselScrollButtons.js +2 -2
  77. package/mobile/dist/components/CarouselLinks/CarouselLinks.js +2 -3
  78. package/mobile/dist/components/CarouselLinks/CarouselLinks.js.map +1 -1
  79. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
  80. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js +11 -0
  81. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
  82. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
  83. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
  84. package/mobile/dist/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
  85. package/mobile/dist/components/Tabs/ScrollableTabs.js +1 -1
  86. package/mobile/dist/ui-kit/Button/renderArrows.js +1 -1
  87. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js +4 -2
  88. package/mobile/dist/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  89. package/mobile/dist/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
  90. package/mobile/dist/ui-kit/RichText/RichTextProps.d.ts +5 -0
  91. package/mobile/lib/components/ApplicationForm/Footnote.js +1 -1
  92. package/mobile/lib/components/ApplicationForm/Footnote.js.map +1 -1
  93. package/mobile/lib/components/ApplicationForm/renderQuestionsInterested.js +1 -1
  94. package/mobile/lib/components/Carousel/Carousel.d.ts +1 -0
  95. package/mobile/lib/components/Carousel/Carousel.js +8 -4
  96. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  97. package/mobile/lib/components/Carousel/CarouselContent.d.ts +3 -3
  98. package/mobile/lib/components/Carousel/CarouselScrollButtons.js +2 -2
  99. package/mobile/lib/components/CarouselLinks/CarouselLinks.js +2 -3
  100. package/mobile/lib/components/CarouselLinks/CarouselLinks.js.map +1 -1
  101. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.d.ts +5 -0
  102. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js +9 -0
  103. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCard.js.map +1 -0
  104. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.d.ts +6 -0
  105. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js +2 -0
  106. package/mobile/lib/components/CarouselRichTextCard/CarouselRichTextCardContent.js.map +1 -0
  107. package/mobile/lib/components/Tabs/ScrollableTabs.js +1 -1
  108. package/mobile/lib/ui-kit/Button/renderArrows.js +1 -1
  109. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js +4 -2
  110. package/mobile/lib/ui-kit/LocationDialog/LocationDialog.js.map +1 -1
  111. package/mobile/lib/ui-kit/LocationDialog/LocationDialogProps.d.ts +1 -0
  112. package/mobile/lib/ui-kit/RichText/RichTextProps.d.ts +5 -0
  113. package/mobile/src/common.css +20 -0
  114. package/mobile/src/components/ApplicationForm/Footnote.tsx +1 -1
  115. package/mobile/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
  116. package/mobile/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -16
  117. package/mobile/src/components/Carousel/Carousel.tsx +21 -4
  118. package/mobile/src/components/Carousel/CarouselContent.ts +3 -3
  119. package/mobile/src/components/Carousel/CarouselScrollButtons.tsx +2 -2
  120. package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +9 -5
  121. package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.example.json +6 -0
  122. package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +21 -0
  123. package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCard.ui.json +7 -0
  124. package/mobile/src/components/CarouselRichTextCard/CarouselRichTextCardContent.ts +7 -0
  125. package/mobile/src/components/Tabs/ScrollableTabs.tsx +1 -1
  126. package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +0 -9
  127. package/mobile/src/ui-kit/Button/renderArrows.tsx +2 -2
  128. package/mobile/src/ui-kit/LocationDialog/LocationDialog.tsx +11 -3
  129. package/mobile/src/ui-kit/LocationDialog/LocationDialogProps.ts +1 -0
  130. package/mobile/src/ui-kit/RichText/RichTextProps.ts +5 -0
  131. package/package.json +1 -1
  132. package/src/common.css +20 -0
  133. package/src/components/ApplicationForm/Footnote.tsx +1 -1
  134. package/src/components/ApplicationForm/renderQuestionsInterested.tsx +1 -1
  135. package/src/components/Blocks.ts +2 -0
  136. package/src/components/BonusBenefitsBlock/BonusBenefitsBlock.example.json +16 -16
  137. package/src/components/Carousel/Carousel.fixture.tsx +17 -0
  138. package/src/components/Carousel/Carousel.tsx +21 -4
  139. package/src/components/Carousel/CarouselContent.ts +3 -3
  140. package/src/components/Carousel/CarouselScrollButtons.tsx +2 -2
  141. package/src/components/CarouselLinks/CarouselLinks.tsx +9 -5
  142. package/src/components/CarouselRichTextCard/CarouselRichTextCard.example.json +6 -0
  143. package/src/components/CarouselRichTextCard/CarouselRichTextCard.fixture.tsx +24 -0
  144. package/src/components/CarouselRichTextCard/CarouselRichTextCard.tsx +21 -0
  145. package/src/components/CarouselRichTextCard/CarouselRichTextCard.ui.json +7 -0
  146. package/src/components/CarouselRichTextCard/CarouselRichTextCardContent.ts +7 -0
  147. package/src/components/Tabs/ScrollableTabs.tsx +1 -1
  148. package/src/components/VerticalLayout/VerticalLayout.example.json +0 -9
  149. package/src/icons/IconName.ts +359 -5
  150. package/src/ui-kit/Button/renderArrows.tsx +2 -2
  151. package/src/ui-kit/LocationDialog/LocationDialog.tsx +11 -3
  152. package/src/ui-kit/LocationDialog/LocationDialogProps.ts +1 -0
  153. package/src/ui-kit/RichText/RichTextProps.ts +5 -0
@@ -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),a=l("useState"),n=l("useEffect"),r=l("useCallback"),i=l("useMemo"),s=l("useRef");const o={PROD_BRANCH:"master"},c=new class{_=o;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||o.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 FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return d(this._.CDN)}get BASE_PATH(){return d(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},d=e=>e&&!e.endsWith("/")?`${e}/`:e,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/${c.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:a}=await e.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:n}=await e.json();return n||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:n}=await e.json();return n||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:a,...n}=t||{},r=l?.slots?.default,i=a||r&&r();return e(Object.assign(n,i&&{children:i}),l)}return t.inheritAttrs=!1,t};class b{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 f=new b;function v(e,{sensitivity:t,rootRef:l}={}){const a=s(null),r=i((()=>({threshold:N(t),root:l?.current})),[t,l?.current]);return n((()=>{if(!a.current)return;const t=new IntersectionObserver(e,r);return t.observe(a.current),()=>{t.disconnect()}}),[e,r]),a}function N(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 y=new b;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),C={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=x((({className:e="",version:t="primary",isTheme:l=!0,block:i,tag:s="section",role:o,children:c})=>{const d=s,m=function(e){return v(r((t=>{if(!e||!t?.length)return;const l=t[t.length-1];y.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(i),[h,p]=a(!1);return n((()=>f.subscribe("tab",(e=>{p(Boolean(e.label&&i?.labels?.length&&!i.labels.includes(e.label)))}))),[i]),u(d,{className:w(S(Boolean(t&&l)),C[t],h?"hidden":"",e),...t&&l?{"data-ver":t}:{},...i?.anchor?{id:i.anchor,ref:m}:{},role:o,children:c})})),S=e=>e?"group":"",I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=x((({className:e="",headingType:t="h3",as:l="h3",title:a,children:n})=>u(l,{className:`font-sans m-0 ${I[t]} ${e}`,children:a||n}))),$=x((({className:e="",inputClassName:t="",id:l,name:a,type:n="text",label:i,value:s="",valid:o=!0,children:c,onChange:d,onBlur:m,...h})=>{const x=r((e=>{const t=e.target.validity.valid?e.target.value:s;d(t)}),[d]),g=r((e=>{if(!m)return;const t=e.target.validity.valid?e.target.value:s;m(t)}),[m]),b=c?"pr-8":"",f=o?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:`relative ${e}`,children:[i?u("label",{className:"block text-m-light mb-2",children:i}):null,u("input",{className:`w-full border rounded-md text-primary-text outline-none p-4 ${b} ${f} ${t}`,id:l,name:a||l,type:n,value:s,onChange:x,onBlur:g,...h}),c]})})),B=new Map;function R(e,t,{fallback:l}={}){const r=i((()=>M(e)),[e]),[s,o]=a(),[c,d]=a(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};n((()=>{if(!r.every((e=>null===e)))try{const e=t(...r);"then"in e?(e=>{e.then((e=>B.get(r)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...r]);const u=r[0],p=l&&"string"==typeof u&&l[u];return{data:!s&&p?p:s,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function M(e){return e?Array.isArray(e)?e:e instanceof Function?M(e()):[e]:[e]}async function V(e,t){try{return e?await j(e,t):null}catch(e){console.error(e)}return null}async function j(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}function _(){const{data:e}=R("/api/v1/regions",j);return e||[]}const L=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}],P=(e="")=>({open:t=>f.fire("dialog",{type:"open",id:e,message:t}),close:()=>f.fire("dialog",{type:"close"})}),z=e=>Boolean(e?.includes(":")),D=(e,t)=>Boolean(e&&!z(e)&&(!t||"_self"===t)),O=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),A=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var E=Object.freeze({__proto__:null,isURL:z,isLocalURL:D,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:O,joinPath:A});const F=e=>t=>{if(!t||z(t)||c.CDN&&t.startsWith(c.CDN))return t;const l=t.startsWith("/");return A(c.BASE_PATH,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},H=(e,t)=>H._impl(e,t);function U(){return U._impl()}function X(e=!1){const t=U(),{close:l}=P();return l=>({...l,href:e?l.href:F(t)(l.href),"aria-label":l.text,onClick:H(a(l),l)});function a({href:a,target:n,onClick:r}){return i=>{r&&r(i),a&&!e&&D(a,n)&&(l(),i?.preventDefault(),t.push(a))}}}H._impl=e=>e,H.setup=e=>{H._impl=e},U._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),U.setup=e=>{U._impl=e};const G={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:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},W="bg-main-divider text-main-disabled",K={primary:W,secondary:W,white:W,link:"",transparent:"",gray:W,"":""},J="text-center font-sans select-none",Y={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:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},q=x((e=>{const{text:t,aboveText:l,appendLeft:a,appendRight:n,version:r="primary"}=e;return p("div",{className:Z(e),children:[a?u("div",{className:Y[r],children:a}):null,Q(e)?p("div",{children:[l?u("div",{className:"text-xs-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,n?u("div",{className:Y[r],children:n}):null]})})),Z=e=>{const{version:t,aboveText:l,rounded:a}=e;if("link"===t)return"";const n="gap-2 "+(l?"py-2.5 px-7":"py-4 px-4");return["group/btn flex items-center justify-center",Q(e)?n:"h-12 w-12",a?"rounded-full":""].join(" ")},Q=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ee=({className:e,rounded:t,version:l})=>["inline-block",J,l?K[l]:"",t?"rounded-full":"rounded-md",e].join(" "),te=({className:e,rounded:t,version:l})=>[J,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",l?G[l]:"",t?"rounded-full":"rounded-md",e].join(" "),le=x((({disabled:e,children:t,...l})=>{const a=X()(l),n=t??u(q,{...a});return u(e?ne:ae,{...a,children:n})})),ae=x((({className:e="",href:t,rel:l,target:a,ariaLabel:n,version:r,rounded:i,onClick:s,children:o})=>u("a",{className:te({className:e,version:r,rounded:i}),href:t,rel:l,target:a,"aria-label":n,role:t?"link":"button",onClick:s,children:o}))),ne=x((({className:e,ariaLabel:t,version:l,rounded:a,children:n})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ee({className:e,rounded:a,version:l}),children:n}))),re=x((({children:e,...t})=>u("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),ie=x((({children:e,...t})=>u("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),se=x((({link:e})=>p(re,{size:"text-s-light",color:"text-secondary-text",children:[u(ie,{children:"Нажимая кнопку вы подтверждаете согласие с "}),e?u(le,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(ie,{children:e.text})}):null]}))),oe=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function ce(e){const t=s(null);return n((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}const de={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},me=x((({className:e="",imageClassName:t="",name:l="",alt:a=`Иконка ${l}`,title:n=a,iconVersion:r="color",asSVG:i,...s})=>{const o=U(),d=F(o)(A(c.CDN,"/icons",`${l}.svg`));return i&&"normal"!==r?u(ue,{className:e,children:p("svg",{className:w(he(s.width),de[r],"white"===r?"invert":"",t),...s,"aria-hidden":"true",children:[n?u("title",{children:n}):null,a?u("desc",{children:a}):null,u("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]})}):(e.includes("h-")||(s.style={height:`${s.height}px`}),u("img",{className:e,src:d,alt:a,title:n,"aria-hidden":"true",...s}))})),he=e=>e?"":"w-full h-full",ue=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),pe=x((({className:e="",isBorder:t=!0,label:l,options:i=[],value:s,onChange:o,placeholder:c=""})=>{const[d,m]=a(i[0]||{key:"",text:""}),[h,x]=a(!1),g=ce(r((()=>x(!1)),[]));return n((()=>{m(s||{key:"",text:""})}),[s]),p("div",{className:`${e}`,ref:g,children:[l?u("div",{className:"mb-2",children:u(ie,{size:"text-m",color:"text-primary-text",font:"font-light",children:l})}):null,p("div",{className:"relative "+(h?"z-20":"z-10"),children:[p("div",{className:`text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer\n ${be(t)}`,onClick:()=>x(!h),children:[u("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:d?.text||c}),u(me,{name:"ArrowUpIcon",width:"16",height:"16",className:"absolute right-3 "+(h?"":"rotate-180")})]}),i?.length?u("div",{className:`h-0 ${xe(h)}`,children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:i.map(ge((e=>{m(e),x(!1),o(e)}),h,(e=>Boolean(e.key===d.key))))})}):null]})]})})),xe=e=>e?"":"overflow-hidden",ge=(e,t,l)=>(a,n)=>p("div",{onClick:()=>{e(a)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[u("span",{className:"min-h-6",children:a.text}),u(me,{name:"DoneSimpleIcon",width:"16",height:"16",className:["absolute right-4 pt-0.5",l(a)&&t?"":"hidden"].join(" ")})]},String(n)),be=e=>e?"border border-gray rounded-md hover:border-primary-hover":"",fe=x((({data:e,fieldLabel:t,fieldValue:l,selected:a,placeholder:n="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===a));return u(pe,{options:s,label:i,placeholder:n||a,onChange:e=>r(e.key),value:o})})),ve=({acquiringType:e,regions:t,region:l,handleChange:a})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(fe,{data:L,fieldValue:"name",fieldLabel:"name",selected:e,setSelected:e=>a({acquiringType:e}),label:"Вид эквайринга",placeholder:"Выберите эквайринг"})}),u("div",{className:"w-1/2",children:u(fe,{data:t,fieldValue:"code",fieldLabel:"name",selected:l,setSelected:e=>a({region:e}),label:"Адрес",placeholder:"Выберите адрес"})})]}),Ne=x((({value:e=!1,text:t,type:l="checkbox",onChange:a})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-4",onClick:()=>a&&a(!e),children:[u("div",{className:"relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl "+(e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:"absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full "+(e?"left-[50%]":"left-[5%]")})}),u("div",{children:u(ie,{size:"text-m",font:"font-light",color:"text-primary-text",children:t})})]}))),ye=({"onlineСheckout":e,posTerminal:t,handleChange:l})=>p("div",{className:"mb-5",children:[u(Ne,{value:e,text:"Хочу купить онлайн-кассу",onChange:()=>l({"onlineСheckout":!e})}),u(Ne,{value:t,text:"Хочу купить POS-терминал",onChange:()=>l({posTerminal:!t})})]}),we=(e,t)=>{const l=te({className:"text-white",version:e?.version});return u("button",{type:"submit",className:`p-4 ${l} ${t}`,children:e?.text?e.text:"Отправить заявку"})},Ce=({setFormState:e})=>({handleChange:r((t=>e((e=>({...e,...t})))),[])}),ke=x((e=>{const{button:t,link:l,handleSubmit:r}=e,[i,s]=a({acquiringType:"",region:"",fullName:"",inn:"",name:"",phone:"","onlineСheckout":!1,posTerminal:!1}),{acquiringType:o,region:c,fullName:d,inn:m,name:h,phone:x,"onlineСheckout":g,posTerminal:b}=i,f=_(),{handleChange:v}=Ce({setFormState:s}),N=oe(c,f);n((()=>{s((e=>({...e,acquiringType:L?.length&&L[0]?.name?L[0].name:""})))}),[]);return p("form",{onSubmit:async e=>{e.preventDefault();const t=`Вид эквайринга=${o}/Онлайн касса=${g}/POS-терминал=${b}`;r&&await r({typeForm:"acqr",region:f.find((e=>e.code===N))?.name||"",partnerComments:t,fullName:d,inn:m,name:h,phone:x})},className:"container",children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"text-center mb-4"}),ve({acquiringType:o,regions:f,region:N,handleChange:v}),u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Se({fullName:d,inn:m,name:h,phone:x,handleChange:v}),ye({"onlineСheckout":g,posTerminal:b,handleChange:v}),we(t,"mb-4"),u(se,{link:l})]})})),Se=({fullName:e,inn:t,name:l,phone:a,handleChange:n})=>p("div",{className:"flex justify-between gap-5 mb-5",children:[p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>n({fullName:e})}),u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:l,onChange:e=>n({name:e})})]}),p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text",label:"ИНН","aria-label":"ИНН",value:t,onChange:e=>n({inn:e})}),u($,{className:"shrink-0 text-l w-full",type:"text",label:"Телефон","aria-label":"Телефон",value:a,onChange:e=>n({phone:e})})]})]}),Ie=x((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({region:"",name:"",phone:"",inn:"",mail:""}),{region:s,name:o,phone:c,inn:d,mail:m}=r,h=_(),{handleChange:x}=Ce({setFormState:i}),g=oe(s,h);return p("form",{onSubmit:async e=>{e.preventDefault(),n&&await n({typeForm:"bcrd",region:h.find((e=>e.code===g))?.name||"",name:o,phone:c,inn:d,mail:m})},className:"container",children:[$e({regions:h,region:g,handleChange:x}),Te({name:o,phone:c,inn:d,mail:m,handleChange:x}),we(t,"mb-4"),u(se,{link:l})]})})),Te=({name:e,phone:t,mail:l,inn:a,handleChange:n})=>p("div",{className:"flex justify-between gap-5",children:[p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:e,onChange:e=>n({name:e})}),u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"ИНН",label:"ИНН",value:a,onChange:e=>n({inn:e})})]}),p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Телефон",label:"Телефон",value:t,onChange:e=>n({phone:e})}),u($,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:l,onChange:e=>n({mail:e})})]})]}),$e=({regions:e,region:t,handleChange:l})=>u("div",{className:"flex justify-between gap-5 mb-5",children:u("div",{className:"w-full",children:u(fe,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:e=>l({region:e}),label:"Регион",placeholder:"Выберите регион"})})}),Be=[];const Re=async e=>await V(e,{method:"GET"})||Be,Me=["От 50 000 ₽","До 3 000 000 ₽"],Ve=["От 1 года","До 5 лет"],je=({regions:e,region:t,branches:l,department:a,handleChange:n})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(fe,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:e=>n({region:e}),label:"Регион",placeholder:"Выберите регион"})}),u("div",{className:"w-1/2",children:u(fe,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:e=>n({department:e}),label:"Адрес",placeholder:"Выберите адрес"})})]}),_e=e=>new Intl.NumberFormat("ru-RU",{}).format(e),Le=(e,t,l)=>Math.max(t,Math.min(e,l)),Pe=e=>e.split(/\s+/).join(""),ze=x((({className:e,title:t,items:l=[],min:a=1,max:n=100,step:r=1,value:i=a,disabled:s=!1,onChange:o})=>{const c=e=>{o&&o(Le(Number(Pe(e.target.value)),a,n))},d={backgroundSize:`${(100*(i-a)/(n-a)).toFixed(2)}% 100%`};return p("div",{className:e,children:[p("label",{className:"block relative",children:[t?u("span",{className:"text-m-light text-primary-text",children:t}):null,u("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md\n outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-text disabled:border-gray disabled:bg-main-divider",value:_e(i),disabled:s,onChange:c,onBlur:c}),u("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:a,max:n,step:r,value:i,disabled:s,onChange:c,style:d})})]}),De(l)]})}));function De(e){return u("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>u("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}const Oe=e=>p("div",{className:"w-1/2",children:[u("label",{children:u(ie,{size:"text-m-light",children:e.label})}),u(ze,{...e})]}),Ae=({amount:e,term:t,handleChange:l})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[Oe({label:"Сумма кредита, ₽",value:e,onChange:e=>l({amount:e}),min:5e4,max:3e6,items:Me}),Oe({label:"Срок кредита, месяцев",value:t,onChange:e=>l({term:e}),min:1,max:60,items:Ve})]}),Ee=({fullName:e,inn:t,name:l,phone:a,mail:n,annualRevenue:r,handleChange:i})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>i({fullName:e})}),u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"ИНН",label:"ИНН",value:t,onChange:e=>i({inn:e})}),u($,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Телефон",label:"Телефон",value:a,onChange:e=>i({phone:e})})]}),p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Годовая выручка, ₽",label:"Годовая выручка, ₽",value:r,onChange:e=>i({annualRevenue:e})}),u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:l,onChange:e=>i({name:e})}),u($,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:n,onChange:e=>i({mail:e})})]})]}),Fe=x((e=>{const{button:t,link:l,handleSubmit:r}=e,[i,s]=a({amount:5e4,term:1,fullName:"",inn:"",name:"",phone:"",mail:"",region:"",department:"",annualRevenue:""}),{amount:o,term:c,fullName:d,inn:m,name:h,phone:x,mail:g,region:b,department:f,annualRevenue:v}=i,N=_(),{handleChange:y}=Ce({setFormState:s}),w=oe(b,N),C=function(e){const{data:t}=R(e?`/api/v1/branches?regionCode=${e}`:null,Re);return t||Be}(w).filter((e=>e.address));n((()=>{y({department:""})}),[i.region,y]);return p("form",{onSubmit:async e=>{e.preventDefault();const t=`Сумма=${o}/Срок=${c}/Выручка=${v}`;r&&await r({typeForm:"cred",fullName:d,inn:m,name:h,phone:x,mail:g,region:N.find((e=>e.code===w))?.name||"",department:C.find((e=>e.branchCode===f))?.address||"",partnerComments:t})},className:"container",children:[u(T,{headingType:"h6",title:"Параметры кредита",className:"text-center mb-4"}),Ae({amount:o,term:c,handleChange:y}),u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Ee({fullName:d,inn:m,name:h,phone:x,mail:g,annualRevenue:v,handleChange:y}),u(T,{headingType:"h6",title:"Офис Банка",className:"text-center mb-4"}),je({regions:N,region:w,branches:C,department:f,handleChange:y}),we(t,"mb-4"),u(se,{link:l})]})})),He=x((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({name:"",phone:""}),{name:s,phone:o}=r,{handleChange:c}=Ce({setFormState:i});return p("form",{onSubmit:async e=>{e.preventDefault(),n&&await n({typeForm:"dpst",name:s,phone:o})},className:"container",children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"text-center mb-4"}),Ue({name:r.name,phone:r.phone,handleChange:c}),p("div",{className:"flex justify-between items-center max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(se,{link:l})}),we(t)]})]})})),Ue=({name:e,phone:t,handleChange:l})=>p("div",{className:"max-w-[560px] m-auto",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Имя",label:"Имя",value:e,onChange:e=>l({name:e})}),u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Телефон",label:"Телефон",value:t,onChange:e=>l({phone:e})})]}),Xe=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Ge=x((({className:e="",image:t,imageClassName:l="",isMobile:a=!1,pathPrefix:n})=>{const r=U();return p("picture",{className:`${a?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Xe).map((({src:e,format:l,media:a},i)=>u("source",{srcSet:Ke(r,n)(e),type:Je(l),media:a?`(max-width: ${a}px)`:"",...t.size},`${i}_${e}`))):null,t?.src?We({...t,src:Ke(r,n)(t.src)},l,a):null]})})),We=(e,t="",l=!1)=>{const a={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},n=e.title||"",r=e.alt||e.title,i=l?"m-auto":"m-0";return u("img",{src:e.src,className:`${i} ${t}`,alt:r,title:n,style:a,...e.size})},Ke=(e,t)=>l=>l&&!z(l)?F(e)(A(t,l)):l,Je=e=>e?`image/${String(e)}`:void 0,Ye=x((({className:e="",image:t,imageClassName:l="",isMobile:a,pathPrefix:n,...r})=>t?.src||t?.icon?t.icon?u(me,{className:e,imageClassName:l,iconVersion:t?.iconVersion||"normal",name:t.icon,...r}):u(Ge,{className:e,imageClassName:l,image:t,isMobile:a,pathPrefix:n}):null)),qe=x((({className:e,viewBox:t,fill:l="none",width:a,height:n,paths:r,...i})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:a,height:n,children:r.map((({d:e,fill:t,...l},a)=>u("path",{d:e,fill:t||"currentColor",...i,...l},a)))}))),Ze=[{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"}],Qe=x((({className:e,text:t,checked:l,disabled:a,isRadio:n,onChange:r})=>u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",children:[u("input",{className:w("peer appearance-none w-5 h-5 border-solid cursor-pointer checked:border-primary-main m-0",n?"rounded-full border-2":"rounded checked:bg-primary-main disabled:bg-main-disabled border",l?"border-black":"border-gray",a?"":"group-hover/box:border-primary-hover"),type:"checkbox",onChange:e=>r&&r(e.target.checked),checked:l,disabled:a}),n?u("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):u(qe,{paths:Ze,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?u("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})}))),et=({currencyControl:e,documentaryOperations:t,conversionOperations:l,text:a,handleChange:n})=>p("div",{className:"mb-6",children:[p("div",{className:"flex items-center mb-4 gap-6",children:[u(Qe,{text:"Валютный контроль",checked:e,onChange:e=>n({currencyControl:e})}),u(Qe,{text:"Документарные операции",checked:t,onChange:e=>n({documentaryOperations:e})}),u(Qe,{text:"Конверсионные операции",checked:l,onChange:e=>n({conversionOperations:e})})]}),u("textarea",{placeholder:"Укажите интересующий Вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:a,onChange:e=>n({text:e.target.value})})]}),tt=x((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""}),{fullName:s,name:o,phone:c,mail:d,currencyControl:m,documentaryOperations:h,conversionOperations:x,text:g}=r,{handleChange:b}=Ce({setFormState:i});return p("form",{onSubmit:async e=>{e.preventDefault();const t=`Валютный контроль=${m}/Документарные операции=${h}/Конверсионные операции=${x}/Доп инф=${g}`;n&&await n({typeForm:"kved",fullName:s,name:o,phone:c,mail:d,partnerComments:t})},className:"container",children:[u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),lt({fullName:s,name:o,phone:c,mail:d,handleChange:b}),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"text-center mb-4"}),et({currencyControl:m,documentaryOperations:h,conversionOperations:x,text:g,handleChange:b}),p("div",{className:"flex items-center pb-9 mb-9 border-b border-main-divider",children:[we(t,"mr-5"),u(se,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"text-center mb-4"}),p("div",{className:"flex",children:[p("a",{className:"flex items-center text-primary-text no-underline mr-6",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(Ye,{image:{icon:"PhoneIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Ye,{image:{icon:"MailIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),lt=({fullName:e,name:t,phone:l,mail:a,handleChange:n})=>p("div",{children:[p("div",{className:"flex justify-between gap-5 mb-5",children:[u("div",{className:"w-1/2",children:u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>n({fullName:e})})}),u("div",{className:"w-1/2",children:u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"ФИО",label:"ФИО",value:t,onChange:e=>n({name:e})})})]}),p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Телефон",label:"Телефон",value:l,onChange:e=>n({phone:e})})}),u("div",{className:"w-1/2",children:u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:a,onChange:e=>n({mail:e})})})]})]}),at=x((({responceType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center mt-5 p-5 rounded-md ${t?"bg-responce-ok":"bg-responce-fail"}`,children:[u(Ye,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42",className:"mr-4"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34",className:"mr-4"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-1"}),u(ie,{size:"text-l-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),nt={credit:e=>u(Fe,{...e}),acquiring:e=>u(ke,{...e}),"business-card":e=>u(Ie,{...e}),deposit:e=>u(He,{...e}),wed:e=>u(tt,{...e})},rt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},it=x((e=>{const{className:t="",title:l,typeForm:n="credit",button:i,link:s,...o}=e,[c,d]=a(""),m=r((async e=>{const t=await rt.send(e);return d(t?"OK":"Fail"),"OK"}),[]);return u(k,{className:`font-sans bg-white p-[50px] pb-9 ${t}`,...o,children:p("div",{className:"container max-w-[978px]",children:[l?u(T,{headingType:"h3",title:l,className:"text-center mb-8"}):null,nt[n]({button:i,link:s,handleSubmit:m}),c?u(at,{responceType:c}):null]})})})),st=x((({className:e="",title:t,benefitList:l,...a})=>p(k,{className:`p-12 flex flex-col items-center ${e}`,...a,children:[t?u(T,{headingType:"h3",as:"h2",className:"max-w-[47rem] text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(ot)}):null]}))),ot=(e,t)=>{const l=e.description;return p("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[e?.icon?.icon?u(Ye,{className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black",image:e.icon,asSVG:!0}):null,e?.icon?.src?u(Ye,{image:e.icon}):null,p("div",{className:"ml-5 h-full",children:[e?.label?u(T,{headingType:"h6",children:e.label}):null,ct(l)]})]},String(t))},ct=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-2 text-l-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?mt(e):dt(e)}):null},dt=e=>e?.name||null,mt=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},ht=(e,{className:t="",buttonClassName:l,isVertical:a}={})=>e?.length&&e.some((e=>e?.text))?u("div",{className:w("flex",a?"flex-col gap-2":"gap-4",t),children:e.map(ut(l))}):null,ut=(e="")=>(t,l)=>{const{text:a,icon:n,iconRight:r,version:i,...s}=t||{},o="secondary"===i?"color":"white";return a?u(le,{className:e,appendLeft:pt({...n,iconVersion:o}),appendRight:pt({...r,iconVersion:o}),version:i,text:a,...s},l?String(l):""):null},pt=e=>e?.icon||e?.src?u(Ye,{image:e,width:String(e?.size?.width||24),height:String(24),asSVG:!0}):null,xt={XXL:{wrapper:"gap-[18px]",title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5"},XL:{wrapper:"gap-4",title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light"},L:{wrapper:"gap-4",title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light"},M:{wrapper:"gap-3",title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light"},S:{wrapper:"gap-2",title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light"},XS:{wrapper:"gap-2",title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light"}},gt={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},bt=x((({className:e,title:t,description:l,headlineVersion:a="XL",align:n="text-center",as:r,isPadding:i=!0,isTheme:s=!1,version:o="",...c})=>{const d=xt[a];return p(k,{className:w("flex flex-col",i?"p-12":"",d.wrapper,e),version:o,isTheme:s,...c,children:[t?u(T,{className:w("whitespace-pre-wrap",n),...d?.title,as:r||d?.title.as,title:t}):null,l?u(re,{color:"group-data-secondary:text-white/80",size:d.descriptionSize,align:n,children:l}):null]})})),ft=x((e=>{const{className:t="",title:l,description:a,bonusItems:n,...r}=e;return u(k,{className:`p-12 pb-9 ${t}`,...r,children:p("div",{className:"container",children:[u(bt,{className:"!p-0",title:l,description:a,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full mt-9",children:n?.length?n.map(((e,t)=>u("div",{className:"flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0",children:p("div",{className:"flex justify-between w-full",children:[p("div",{className:"flex flex-col justify-between mr-4",children:[p("div",{children:[u("div",{className:"text-h4",children:e.title}),u("div",{className:"text-xl-light mt-2 max-w-[488px]",children:e.description})]}),ht(e?.buttons)]}),e.bonusItemContent?.bonusType?vt(e.bonusItemContent):null]})},String(t)))):null})]})})})),vt=e=>u("div",{children:"count"===e.bonusType?Nt(e):yt(e)}),Nt=e=>p("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?u("span",{className:"font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7",children:e.bonusCount}):null,e.bonusName?u("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),yt=e=>e.image?u(Ye,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,wt={left:"text-left",center:"text-center",right:"text-right"},Ct=x((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:a="4",subtitle:n,title:r,...i})=>p(k,{className:`font-sans text-primary-text bg-white p-12 flex flex-col text-center ${l}`,...i,children:[u(bt,{className:"!p-0 mb-8",title:r,description:n,headlineVersion:"M"}),e?.length?u("div",{className:`grid gap-1 ${wt[t]} ${St(a)}`,children:e.map(kt)}):null]}))),kt=({icon:e,title:t,description:l},a)=>p("div",{className:w("flex flex-col items-center text-h6",l||t?"":"justify-center"),children:[t?u("span",{children:t}):null,e?u(Ye,{image:e,height:"180",width:"auto",className:"w-auto"}):null,l?u("span",{children:l}):null]},String(a)),St=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},It=x((e=>{const{title:t,image:l,cardItems:a,button:n}=e;return p("div",{className:"border-gray border p-9 w-1/2",children:[l?p("div",{className:"flex justify-center",children:[l?.src?u(Ye,{className:"mb-5",image:l}):null,l?.icon?u(Ye,{image:l,asSVG:!0}):null]}):null,t?u(T,{headingType:"h4",title:t,className:"mb-6"}):null,a?.length?u("ul",{children:a.map(((e,t)=>Tt(e,String(t))))}):null,ht([n],{buttonClassName:"mt-6"})]})})),Tt=(e,t)=>{const{icon:l,text:a}=e;return p("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?u(Ye,{image:l,className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider",asSVG:!0}):null,l?.src?u(Ye,{image:l}):null,u("span",{className:"text-xl-light",children:a})]},t)},$t=x((({className:e="",title:t,cards:l,...a})=>p(k,{className:`p-12 pb-9 ${e}`,...a,children:[u(T,{headingType:"h3",title:t,className:"text-center mb-8"}),u("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>u(It,{...e},String(t)))):null})]}))),Bt=x((({button:e,className:t,...l})=>u(k,{className:w("!bg-transparent",t),...l,children:ht([e])}))),Rt=e=>{const{itemCount:t,visibleItemCount:l}=e,[n,i]=a(0),s=r((()=>i((e=>Math.min(e+1,t-1)))),[t]),o=r((()=>i((e=>Math.max(e-1,0)))),[t]),c=function({itemCount:e,visibleItemCount:t}){return Boolean(t&&e>t)}(e)&&n<t-(l||1),d=n>0;return[n,{inc:s,dec:o,canInc:c,canDec:d,isScrollAvailable:d||c}]};const Mt=x((({className:e,disabled:t,...l})=>u(le,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(Ye,{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",asSVG:!0})}))),Vt=x((e=>u(Mt,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),jt=x((e=>u(Mt,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function _t({dec:e,inc:t,canDec:l,canInc:a,btnClass:n,className:r=""}){return l||a?p("div",{children:[l?u(Mt,{className:`absolute z-50 ${n[0]} ${r}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,a?u(Mt,{className:`absolute z-50 rotate-180 ${n[1]} ${r}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const Lt=x((({title:e,value:t,postfix:l="",prefix:a,className:n=""})=>p("div",{className:w("mb-7",n),children:[e?u(ie,{size:"text-l-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(ie,{size:"text-h3",children:[a," ",_e(Math.round(t))," ",l]})}:{children:u(ie,{size:"text-h3",children:"-"})})]}))),Pt=5e6,zt=2485e3,Dt=Math.round(23.5),Ot={minSum:3e4,maxSum:Pt,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!0,isPensionClient:!1,isStateEmployee:!0,isInsurance:!0},At={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Et={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Ft={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Ht=x((({rate:e,title:t="Ставка",unit:l,depositeName:a,isShowDepositeName:n,rateBlockClassName:r})=>p("div",{children:[u(ie,{size:"text-l-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start",children:[u("span",{className:w("block gradient-color-text font-mohave text-title-huge pr-6 -mt-4",r),children:String(e.toFixed(2)).replace(".",",")}),l?u("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:l}):""]}),a&&n?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:a}):null]})]}))),Ut=e=>e?u(re,{size:"text-s-light",color:"text-secondary-text",children:e}):null,Xt=1e3;function Gt(e,t,l){const{moneyValue:a,minSum:n,maxSum:r,step:i=Xt,isShowItems:s=!0}=t,o=[`От ${_e(n)} ₽`,`До ${_e(r)} ₽`];return u(ze,{title:e,items:s?o:[],min:n,max:r,step:i,value:Le(a,n,r),onChange:l})}function Wt(e){const{data:t}=R(`/wcms-resources/${e}.json`,j);return t}const Kt=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:a}=e,n=Wt(t||"bonus-calculator-data")||At,[r,i]=((e,t,l)=>{const{minSumTravel:a,minSumOther:n,maxBonus:r,prefMonthsNum:i,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===a&&l===n)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),r);return[m,m*i+Math.min(Math.round(c*t)+Math.round(d*l),r)*(12-i)]})(n,l,a);return{...n,...e,monthBonus:r,yearBonus:i}},Jt=x((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[i,s]=a(6e3),o=r((e=>s(e)),[]),[c,d]=a(6e3),m=r((e=>d(e)),[]),h={travelExpenseValue:i,restExpenseValue:c},{minSumTravel:x,maxSumTravel:g,minSumOther:b,maxSumOther:f,monthBonus:v,yearBonus:N}=Kt(h,t);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Gt("Сумма покупок в категории путешествия, ₽",{minSum:x,maxSum:g,moneyValue:i,step:500,isShowItems:!1},o),Gt("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:b,maxSum:f,moneyValue:c,step:500,isShowItems:!1},m)]}),u("div",{children:v>=0?u(Ht,{title:"Баллов за месяц",rate:v,rateBlockClassName:"tracking-[-14px]"}):null}),p("div",{className:"w-full max-w-[350px]",children:[N>=0?u(Lt,{title:"Баллов за год",value:N}):null,ht(l,{className:"mt-7",isVertical:!0}),Ut(n)]})]})}));function Yt(e,t,l){const{minDays:a,maxDays:n,daysValue:r}=t,i=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`;return u(ze,{className:"mt-7",title:e,items:[`От ${i(a)}`,`До ${i(n)}`],min:a,max:n,step:1,value:Le(r,a,n),onChange:l})}const qt={horizontal:"gap-10",vertical:"flex-col gap-3"},Zt=x((({items:e,checkedItem:t,onChange:l,orientation:a="horizontal"})=>u("div",{className:`flex ${qt[a]}`,children:e?.map((({id:e,text:a})=>u(Qe,{isRadio:!0,text:a,checked:t===e,onChange:()=>l&&l(e)},String(e))))}))),Qt="everyMonth",el="atEndTerm",tl=[{id:Qt,text:"Ежемесячно"},{id:el,text:"В конце срока"}];function ll({isMonthlyInterestPayment:e,callback:t,title:l,orientation:a="horizontal"}){return p("div",{children:[l?u("div",{className:"mb-3",children:u(ie,{color:"text-secondary-text",font:"font-light",children:l})}):null,u("div",{children:u(Zt,{orientation:a,items:tl,checkedItem:e?Qt:el,onChange:e=>t&&t(e===Qt)})})]})}const al=x((({title:e="Ставка"})=>p("div",{children:[u(ie,{size:"text-l-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-1 pt-1 pl-5 pb-1.5",children:u(Ye,{image:{icon:"PercentIcon"},width:"90",height:"85",asSVG:!0})}),u("div",{className:"w-[250px] mt-3.5",children:p(re,{size:"text-xl-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),nl=e=>e,rl=(e=nl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),il=rl(),sl=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,a]=t[l-1],[n,r]=t[l];a>=n?t.splice(l-1,2,[e,Math.max(a,r)]):l++}return t},ol=(e=nl)=>rl((t=>-e(t))),cl=([e,t],l=[])=>({[e]:l.length?ol()(l.map((t=>t[e]))):0,[t]:l.length?rl()(l.map((e=>e[t]))):0}),dl=(e,[t,l],a)=>e>=a[t]&&e<=a[l],ml=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,hl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a,daysValue:n}=t;return l?Math.round(a*Math.pow((1200+e)/1200,n/30)-a):Math.round(a*e*n/365/100)},ul=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:i,isShowDepositeName:s})=>{const[o,c]=a(1e5),d=r((e=>c(e)),[]),[m,h]=a(90),x=r((e=>h(e)),[]),[g,b]=a(!1),f=r((e=>b(e)),[]),[v,N]=a(!1),y=r((e=>N(e)),[]),[w,C]=a(!1),k=r((e=>C(e)),[]),[S,I]=a(!1),T=r((e=>I(e)),[]),$=((e,t)=>{const{daysValue:l,moneyValue:a,isPartialWithdrawal:n,isReplenished:r,isSmallBusiness:i,isMonthlyInterestPayment:s}=e,o=Wt(t||"business-calculator-data"),c=r||n,d=l<90||l>730;if(l<=30)return{...Ft,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rows?.find((e=>s===e.isMonthlyInterestPayment&&i===e.isSmallBusiness&&ml(c,e)&&dl(a,["minSum","maxSum"],e)&&dl(l,["minDays","maxDays"],e)))||Ft,{rate:h}=m,u=hl(h,e),p=a+u,x=o?.rows||[Ft];return{...m,...cl(["minSum","maxSum"],x),...cl(["minDays","maxDays"],x),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})({moneyValue:o,daysValue:m,isReplenished:g,isPartialWithdrawal:v,isSmallBusiness:w,isMonthlyInterestPayment:S},t),{income:B,finalSum:R,rate:M,depositeName:V,isShowUnknownRate:j}=$;return p("section",{className:e,children:[p("div",{className:"flex justify-between",children:[p("div",{className:"w-[486px]",children:[Gt("Сумма вклада, ₽",$,d),Yt("Срок вклада, дни",$,x),p("div",{className:"mt-7 flex justify-between",children:[pl({...$,handleIsReplenished:f,handleIsPartialWithdrawal:y,handleIsSmallBusiness:k}),ll({isMonthlyInterestPayment:S,callback:T,title:"Выплата процентов",orientation:"vertical"})]})]}),j?u(al,{}):u(Ht,{rate:M,depositeName:V,isShowDepositeName:s,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(Lt,{title:"Доход по вкладу",value:B,postfix:"₽",prefix:"+"}),u(Lt,{title:"Сумма в конце срока",value:R,postfix:"₽"}),ht(l,{className:"mt-7",isVertical:!0}),u("div",{className:"mt-7",children:Ut(n)})]})]}),u("div",{className:"mt-5",children:Ut(i)})]})})),pl=({isDisabledOperatingDeposit:e,isReplenished:t,isPartialWithdrawal:l,isSmallBusiness:a,handleIsReplenished:n,handleIsPartialWithdrawal:r,handleIsSmallBusiness:i})=>p("div",{children:[u(Qe,{text:"Пополнение",disabled:e,checked:t,onChange:n}),u(Qe,{className:"mt-3",disabled:e,text:"Частичное снятие",checked:l,onChange:r}),u(Qe,{className:"mt-3",text:"Являюсь малым предприятием",checked:a,onChange:i})]}),xl=x((({className:e,title:t,items:l=[],list:a=[],value:n=a[0],disabled:r=!1,onChange:i})=>{const s=a.length-1,o=e=>{if(!i)return;const t=parseInt(e.target.value),l=a.reduce((function(e,l){return Math.abs(l-t)<Math.abs(e-t)?l:e}));i(Number(Pe(l.toString())))},c=a.findIndex((e=>e===n))||0,d={backgroundSize:`${(100*(c-0)/(s-0)).toFixed(2)}% 100%`};return p("div",{className:e,children:[p("label",{className:"block relative",children:[t?u("span",{className:"text-m-light text-primary-text",children:t}):null,u("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md\n outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-text disabled:border-gray disabled:bg-main-divider",value:_e(n),disabled:r,onChange:o,onBlur:o}),a.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-4",children:a.map(gl(c,r))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",type:"range",min:0,max:s,step:1,value:c,disabled:r,onChange:e=>{if(!i)return;const t=a.at(Le(parseInt(e.target.value),0,s))||0;i(Number(Pe(t.toString())))},style:d})})]}),bl(l)]})})),gl=(e,t)=>(l,a)=>u("span",{className:"w-2 h-2 rounded-full "+(e<=a||t?"bg-gray":"bg-primary-main")},String(a));function bl(e){return u("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>u("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}function fl(e,t,l){const{minMonths:a,maxMonths:n,monthsValue:r,availableMonths:i}=t,s=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return i?.length?u(xl,{className:"mt-7",title:e,items:[`От ${s(a)}`,`До ${s(n)}`],list:i,value:Le(r,a,n),onChange:l}):u(ze,{className:"mt-7",title:e,items:[`От ${s(a)}`,`До ${s(n)}`],min:a,max:n,step:1,value:Le(r,a,n),onChange:l})}const vl="annuity",Nl="differential",yl=[{id:vl,text:"Аннуитетный"},{id:Nl,text:"Дифференцированный"}];function wl({isAnnuity:e,callback:t,title:l,orientation:a="horizontal"}){return p("div",{children:[l?u("div",{className:"mb-3",children:u(ie,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(Zt,{orientation:a,items:yl,checkedItem:e?vl:Nl,onChange:e=>t&&t(e===vl)})]})}const Cl=(e,t,l)=>{const{moneyValue:a,monthsValue:n}=e,r=Wt(t||"credit-calculator-data"),i=!l?.isShowSalaryClient,s=!l?.isShowStateEmployee,o=!l?.isShowPensionClient,c=!l?.isShowInsurance,d=r?.rows?.find((t=>kl({row:t,userInputParams:e,paramKey:"isSalaryClient",isExclude:i})&&kl({row:t,userInputParams:e,paramKey:"isStateEmployee",isExclude:s})&&kl({row:t,userInputParams:e,paramKey:"isPensionClient",isExclude:o})&&kl({row:t,userInputParams:e,paramKey:"isInsurance",isExclude:c})&&dl(a,["minSum","maxSum"],t)&&dl(n,["minMonths","maxMonths"],t)))||Ot,{rate:m}=d,h=((e,t)=>{const{isAnnuity:l,moneyValue:a,monthsValue:n}=t;if(0===e)return 0;if(l){const t=e/1200;return a*(t+t/(Math.pow(1+t,n)-1))}return Math.round(a/n)+a*(e/1200)})(m,e),u=r?.rows||[Ot];return{...d,...cl(["minSum","maxSum"],u),...cl(["minMonths","maxMonths"],u),...e,monthlyPayment:h}},kl=({row:e,userInputParams:t,paramKey:l,isExclude:a})=>a||t[l]===e[l],Sl=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[s,o]=a(!1),[c,d]=a(!1),m=r((e=>d(e)),[]),[h,x]=a(!1),g=r((e=>x(e)),[]),[b,f]=a(!1),v=r((e=>f(e)),[]),[N,y]=a(!0),C=r((e=>y(e)),[]),[k,S]=a(zt),I=r((e=>S(e)),[]),[T,$]=a(Dt),B=r((e=>$(e)),[]),R=Cl({isAnnuity:s,isInsurance:N,isSalaryClient:c,isPensionClient:b,isStateEmployee:h,moneyValue:k,monthsValue:T},t,i);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Gt("Сумма кредита, ₽",{...R,step:500},I),fl("Срок кредита, месяцев",R,B),u("div",{className:"mt-7",children:Tl({...R,...i,handleIsSalaryClient:m,handleIsStateEmployee:g,handleIsPensionClient:v,handleIsInsurance:C})})]}),Il(R.rate),p("div",{className:"w-full max-w-[350px]",children:[u(Lt,{title:"Ежемесячный платеж",value:R.monthlyPayment,postfix:"₽"}),wl({isAnnuity:s,orientation:"vertical",callback:o}),ht(l,{className:"mt-7",isVertical:!0}),Ut(n)]})]})})),Il=e=>u(Ht,{title:"Ставка",rate:e,rateBlockClassName:"tracking-[-25px]",unit:"%"}),Tl=({isSalaryClient:e,isStateEmployee:t,isPensionClient:l,isInsurance:a,isShowSalaryClient:n,isShowStateEmployee:r,isShowPensionClient:i,isShowInsurance:s,handleIsSalaryClient:o,handleIsStateEmployee:c,handleIsPensionClient:d,handleIsInsurance:m})=>p("div",{children:[n?u(Qe,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:e,onChange:o}):null,r?u(Qe,{className:"mt-3",text:"Работаю в бюджетной организации",checked:t,onChange:c}):null,i?u(Qe,{className:"mt-3",text:"Получаю пенсию на карту Россельхозбанка",checked:l,onChange:d}):null,s?u(Qe,{className:"mt-3",text:"Комплексная страховая защита",checked:a,onChange:m}):null]}),$l="remote",Bl="office",Rl=[{id:Bl,text:"Офис Банка"},{id:$l,text:"Дистанционно"}];function Ml({isRemoteRegistration:e,callback:t,title:l,orientation:a="horizontal"}){return p("div",{children:[l?u("div",{className:"mb-3",children:u(ie,{color:"text-secondary-text",font:"font-light",children:l})}):null,u("div",{children:u(Zt,{orientation:a,items:Rl,checkedItem:e?$l:Bl,onChange:e=>t&&t(e===$l)})})]})}const Vl=(e,t,l)=>{const{moneyValue:a,monthsValue:n}=e,r=Wt(t||"deposit-calculator-data"),i=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=r?.rows?.find((t=>_l({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:i})&&_l({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&dl(a,["minSum","maxSum"],t)&&dl(n,["minMonths","maxMonths"],t)))||Et,{rate:c}=o,d=jl(c,e),m=a+d,h=r?.rows||[Et];return{...o,...cl(["minSum","maxSum"],h),...cl(["minMonths","maxMonths"],h),availableMonths:sl(h.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((a,n)=>t>=e?e+n*l:e-n*l)))(e,t))),...e,income:d,finalSum:m}},jl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a,monthsValue:n}=t;return l?Math.round(a*Math.pow((1200+e)/1200,n)-a):Math.round(a*e*30*n/365/100)},_l=({row:e,userInputParams:t,paramKey:l,isExclude:a})=>a||t[l]===e[l],Ll=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[s,o]=a(zt),c=r((e=>o(e)),[]),[d,m]=a(Dt),[h,x]=a(!1),g=r((e=>x(e)),[]),[b,f]=a(!1),v=r((e=>f(e)),[]),N={moneyValue:s,monthsValue:d,isMonthlyInterestPayment:h,isRemoteRegistration:b},y=r((e=>m(e)),[]),C=Vl(N,t,i),{income:k,finalSum:S,rate:I}=C;return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Gt("Сумма вклада, ₽",{...C},c),fl("Срок вклада, месяцев",{...C},y),u("div",{className:"mt-7",children:Pl({...C,...i,handleIsMonthlyInterestPayment:g,handleIsRemoteRegistration:v})})]}),u(Ht,{rate:I,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(Lt,{title:"Доход по вкладу",value:k,postfix:"₽",prefix:"+"}),u(Lt,{title:"Сумма в конце срока",value:S,postfix:"₽"}),ht(l,{className:"mt-7",isVertical:!0}),Ut(n)]})]})})),Pl=({isMonthlyInterestPayment:e,isRemoteRegistration:t,isShowMonthlyInterestPayment:l,isShowRemoteRegistration:a,handleIsMonthlyInterestPayment:n,handleIsRemoteRegistration:r})=>p("div",{className:"flex flex-col gap-y-7",children:[l?ll({isMonthlyInterestPayment:e,callback:n,title:"Выплата процентов"}):null,a?Ml({isRemoteRegistration:t,callback:r,title:"Оформление"}):null]}),zl={CreditCalculatorForm:Sl,DepositCalculatorForm:Ll,BusinessDepositCalculatorForm:ul,BonusCalculatorForm:Jt},Dl=(e,t)=>{const l=e?.calcType;if(!l||!(l in zl))return null;const a=zl[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-9 w-full",children:[e?.title?u(T,{className:"text-center mb-6",title:e.title}):null,u(a,{...e})]})},String(t))},Ol=x((({className:e="",calculatorTabs:t=[],...l})=>{const n=t.map((e=>e.nav||{})),i=t.map((({calculatorBlock:e})=>e||{})),[s,o]=a(0),c=r((e=>o(e)),[]),[d,m]=Rt({itemCount:t?.length,visibleItemCount:3});return p(k,{className:`box-border overflow-hidden relative w-100 ${e}`,...l,children:[p("div",{className:"bg-white",children:[n.length>1?Al({activeIndex:d,tabsNav:n,slideIndexShift:s,onClick:c}):null,_t({...m,btnClass:["left-3","right-3"],className:"top-8"})]}),u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(Dl):null})]})}));function Al({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:a}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:u("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:a}){const n=l?"h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white":"h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text",r=l?"text-xl mb-1.5":"text-l mb-[3px]",i=l?"text-l-light text-white":"text-m-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:a,"aria-label":e?.title,className:`box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${n}`,children:[u(Ye,{className:`h-6 w-6 min-w-6 min-h-6 mr-4 ${s}`,image:{...e?.icon,iconVersion:o??c},width:"24",height:"24",asSVG:!0}),p("div",{className:"border-0",children:[u("div",{className:`${r}`,children:e?.title}),u("div",{className:`${i}`,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>a(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const El=e=>(e.match(/\./g)||[]).length>1?e.slice(0,e.lastIndexOf(".")):e,Fl=e=>{const t=0===e.indexOf("0")&&2===e.length?e.replace("0","0."):e;return t.startsWith(".")?t.replace(".","0."):t},Hl=e=>String(e.replace(",",".").replace(/[^.\d]/g,"")),Ul=x((({className:e="",onChange:t,minValue:l=0,maxValue:a=3e5,...n})=>{const i=r((e=>{if(!t)return;const n=El(Fl(Hl(Pe(e))));const r=Xl(n,Le(Number(n),l,a));t(String(r))}),[t]),s=r((e=>{var l;t&&t((l=e,new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(Pe(l))).replace(",",".")))}),[t]);return u($,{className:e,inputClassName:"w-full",onChange:i,onBlur:s,...n,children:u("span",{className:"text-xl-light absolute right-4 bottom-4",children:"₽"})})})),Xl=(e,t)=>Number(e)===t?e:String(t),Gl=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:i,...s})=>{const[o,c]=a(""),d=r((e=>c(e)),[]),m=!Number(Pe(o)),h=m?ee({version:i?.version}):te({className:"text-white",version:i?.version}),x=X();return p(k,{className:`p-12 flex flex-col items-center ${e}`,...s,children:[t?u(T,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,p("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[u(Ul,{name:"amount",value:o,onChange:d,valid:""===o||!m,placeholder:n,label:l}),i?.text?u("button",{type:"submit",className:`w-full p-4 mt-6 ${h} `,disabled:m,...x(i),children:i.text}):null]})]})})),Wl=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),Kl=[];function Jl(e,t,{className:l,...a}={}){const{key:n,blockDecorator:r=Wl,blocksRegistry:i={},ancestors:s=Kl}=t,{type:o}=e;o&&o in i||console.warn(`No block with "${o}" is registered`);const c=o&&i[o];return r({blockClassName:w("scroll-mt-12",l,e.style||"col-span-12"),block:e,ancestors:s,render:({block:l,blockClassName:r})=>{const{content:i}=l;return c?u(c,{className:r,block:e,options:t,...i,...a},n):null}},n)}const Yl=[],ql=(e,{key:t,ancestors:l=Yl,slotName:a=null,renderProps:n=Jl,...r})=>(e||[]).map(((e,i)=>n(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...l||Yl,[r.parent,a]]:l})));function Zl({children:e,block:t,options:l,renderProps:a}){return e||(t&&l?ql(t.blocks,{...l,parent:t,renderProps:a}):null)}const Ql=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),ea=x((({className:e="",style:t,idx:l,activeIndex:a,observerOptions:n,children:i,onIntersection:s})=>{const o=v(r((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),n);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===a),ref:o,children:i})})),ta=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],la=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:a=0,gap:n=0,padding:i=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([]),b=r(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(na(l))}),[h,p]),f=a>0?n*Number(a)-1:0,v="vertical-list"===o,N="horizontal-list"===o,y={...N?aa(i,f):{},...v?Ql(d):{},gap:`${n}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:y,ref:t,children:(C=(e,t)=>u(ea,{className:w(c,a?ta[a-1]:"",v?"h-full":""),style:N?aa(i/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:b,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(m)});var C})),aa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),na=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ra=e=>t=>e.scrollWidth/t,ia=e=>(t,l)=>{e.scrollBy({left:l*ra(e)(t),behavior:"smooth"})},sa=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const n=s(null),[i,o]=a([]),c=r((e=>{o((t=>{return(l=t)===(a=e)||Boolean(l&&a&&l?.length===a?.length&&l.every(((e,t)=>e===a[t])))?t:e;var l,a})),l&&l(e)}),[e]),[d,m]=i.length?[ol()(i),rl()(i)]:[-1,-1],h=d>0,u=m<e-1,p=r((()=>{var l;n.current&&(t&&!h?(l=n.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):ia(n.current)(e,-1))}),[t,e,h]),x=r((()=>{n.current&&(t&&!u?n.current.scrollTo({left:0,behavior:"smooth"}):ia(n.current)(e,1))}),[e,t,u]);return[n,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},oa="absolute top-[calc(50%-24px)] z-50",ca="absolute top-0 bottom-0 z-50 w-[84px] pointer-events-none",da=x((({scroll:e,arrowsPadded:t,isBlur:l,onScrollLeft:a,onScrollRight:n,hasEdgeBlocks:i,activeIndex:s,itemCount:o})=>{const{canScrollLeft:c,canScrollRight:d,scrollLeft:m,scrollRight:h}=e,x=i?s>0:c,g=i?s<o-1:d,b=r((()=>{i?(c&&s!==o-1&&m(),a()):m()}),[m,a,i,c,s,o]),f=r((()=>{i?(d&&0!==s&&h(),n()):h()}),[h,n,i,c,s,o]);return p("div",{children:[ma(l,e),x?u(Vt,{className:w(oa,t?"left-8":"left-0"),onClick:b}):null,g?u(jt,{className:w(oa,t?"right-8":"right-0"),onClick:f}):null]})})),ma=(e,t)=>(t.canScrollLeft||t.canScrollRight)&&e?p("div",{children:[u("div",{className:w(ca,"left-0 bg-opacity-from-white")}),u("div",{className:w(ca,"right-0 bg-opacity-to-white")})]}):null,ha=x((({className:e="",itemCount:t,visibleItemCount:l,isBlur:n=!0,isCyclic:i=!1,arrowsPadded:s=!0,isPadding:o=!0,...c})=>{const{blocks:d}=c.block||{},m=t||d?.length||0,[h,x]=a(Math.floor((l||0)/2)),g=r((()=>x((e=>e+1))),[]),b=r((()=>x((e=>e-1))),[]),[f,v]=sa({itemCount:m,isCyclic:i}),N=d&&"CarouselBankHistoryCard"===d[0]?.type;return u(k,{className:w(ua(o),"group-data-secondary:bg-primary-main group-data-secondary:text-white",e),...c,children:p("div",{className:"relative max-w-full",children:[u(la,{containerRef:f,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:Zl({...c,renderProps:N?(e,t)=>Jl(e,t,{blocksLength:d?.length,activeIndex:h}):Jl})}),u(da,{scroll:v,isBlur:n,arrowsPadded:s,onScrollLeft:b,onScrollRight:g,hasEdgeBlocks:N,activeIndex:h,itemCount:m})]})})}));ha.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard","CarouselEventCard"];const ua=e=>e?"p-12":"",pa=x((({title:e,description:t,blocksLength:l=0,activeIndex:a,options:n})=>{const r=Number(n?.key?.split("-").slice(-1)[0])||0;return u(k,{className:"flex h-[485px]",children:u("div",r===a?{className:"relative flex items-center w-full",children:u(bt,{headlineVersion:"M",title:e,description:t,align:"text-left",className:w("absolute z-10 h-[385px] w-[440px] p-8 text-white shadow-dark-blue",ba(r,l),xa(r))})}:{className:"flex w-full items-center justify-center",children:u("div",{className:w("flex justify-center items-center h-[300px] w-[340px] font-mohave text-title-large tracking-[-0.03em]",xa(r)),children:u("span",{className:ga(r),children:e})})})})})),xa=e=>{switch(e%3){case 0:default:return"bg-primary-main";case 1:return"bg-green-light";case 2:return"bg-yellow-light"}},ga=e=>{switch(e%3){case 1:case 2:return"gradient-color-text-on-yellow";default:return"gradient-color-text-on-green"}},ba=(e,t)=>0===e?"left-9":e===t-1?"right-9":"-left-[25px]",fa="absolute border border-solid border-gray w-full h-full",va={normal:"min-w-[970px]",small:"min-w-[355px]"},Na=x((({className:e="",button:t,description:l,title:a,carouselVersion:n="normal",version:r=""})=>u("section",{className:`flex pb-9 pl-12 border-box h-full ${va[n]} ${e}`,children:p("div",{className:"relative w-full",children:[u("div",{className:`${fa} z-10 top-9 right-12 bg-green-dark`}),u("div",{className:`${fa} z-10 top-6 right-8 bg-green`}),u("div",{className:`${fa} z-10 top-3 right-4 bg-green-light`}),p("div",{className:"relative h-full bg-white z-10 p-10 border border-solid border-green-light",children:[u(bt,{className:"!p-0",title:a,description:l,headlineVersion:"L",align:"text-left",version:r}),ht([t],{className:"mt-14"})]})]})}))),ya={black:"bg-black",white:"bg-white"},wa=x((({className:e="",title:t,description:l,image:a,price:n,button:r,colors:i,...s})=>p(k,{className:`border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${e}`,...s,children:[a?.src?u(Ye,{className:"mb-5 flex justify-center",image:a}):null,t?u(T,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?u("div",{className:"mb-4",children:u(re,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,i?.length?p("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[u("div",{className:"mr-1.5",children:u(ie,{children:"Доступные цвета: "})}),i.map(Ca)]}):null,n?p(ie,{size:"text-h3",align:"text-left",children:[n," ₽"]}):null,ht([r],{buttonClassName:"mt-5 w-full"})]}))),Ca=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${ya[e]}`},String(t)),ka=x((({className:e="",href:t,target:l,children:a})=>{const n=X()({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?n:{},children:a})})),Sa=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),Ia=x((({className:e="",icon:t,title:l,description:a,href:n,target:r,...i})=>u(k,{className:w("w-[365px]",e),...i,children:p(ka,{className:"flex flex-col",href:n,target:r,children:[t?.icon?u(Ye,{image:Sa(t),asSVG:!0}):null,t?.src?u(Ye,{image:t}):null,l?u(T,{headingType:"h6",as:"h4",className:"text-left pt-3 mb-2",title:l}):null,a?u("div",{className:"mb-4",children:u(ie,{font:"font-light",size:"text-m",color:"text-secondary-text",children:a})}):null]})}))),Ta=x((({className:e="",title:t="",buttons:l,image:a,children:n})=>p("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,p("div",{className:"flex grow w-full justify-between",children:[p("div",{className:"flex flex-col justify-between w-full",children:[u("div",{className:"h-full",children:n}),l?u("div",{className:"mt-auto pt-8",children:l}):null]}),a]})]}))),$a={1:"flex-col",2:"gap-x-10 flex-wrap"},Ba=x((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:a=1,description:n,image:r,title:i,...s})=>{const o=i?u(T,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:i}):null,c=r?.src?u(Ye,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return u(k,{className:["relative box-border text-left p-9 w-[697px]","border border-solid border-gray group-data-secondary:border-white/50",l].join(" "),...s,children:p(Ta,{title:o,image:c,children:[p("div",{className:"flex justify-between mb-4",children:[n?u("div",{className:"w-1/3",children:u(ie,{size:"text-h6",children:n})}):null,e?u(ie,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e}):null]}),t.length?u("ul",{className:`list-none m-0 p-0 flex gap-y-2 ${$a[a]}`,children:Ra(t,a)}):null]})})})),Ra=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return p("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?u("div",{className:"pr-2.5",children:u(ie,{size:(a=t,1===a?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?u(ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var a})),Ma="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",Va=x((({text:e,href:t="",target:l="",className:a=""})=>{const n=X()({href:t,target:l});return e?p("div",{className:`relative group/link cursor-pointer w-[328px] h-[82px] ${a}`,children:[p("a",{className:"absolute border border-primary-main ml-3 px-6 py-5\n text-l-light bg-white text-primary-text flex w-[316px]\n justify-between items-center group-hover/link:text-primary-main z-10",role:"link",...n,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6",children:u(Ye,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24",asSVG:!0})})]}),u("div",{className:`${Ma} mx-1.5 mt-1.5`}),u("div",{className:`${Ma} mt-3 mr-3`})]}):null})),ja=x((({className:e="",additionalDescription:t,description:l,links:a,title:n,...r})=>p(k,{className:`flex w-full p-10 overflow-hidden justify-between ${e}`,...r,children:[p("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[u(bt,{isPadding:!1,title:n,description:l,as:"h1",align:"text-left"}),t?u("div",{className:"pt-6",children:u(re,{children:t})}):null]}),a?.length?_a(a):null]}))),_a=e=>{const t=Math.ceil(e.length/10);return u(ha,{className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,children:new Array(t).fill(null).map(((t,l)=>u("div",{className:"w-[672px] min-w-[672px] ml-20 mr-20 flex flex-wrap self-start",children:e.slice(10*l,10*(l+1)).map(((e,t)=>u(Va,{className:"m-1",...e},String(t))))},String(l))))})},La={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},Pa=x((({className:e="",isDotted:t=!0,children:l,size:a="M"})=>p("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?u("div",{children:u("div",{className:`rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${La[a]}`})}):null,u("span",{children:l})]}))),za={S:"text-l-light",M:"text-h6",L:"text-h5"},Da={S:"ml-2",M:"ml-3",L:"ml-4"},Oa=x((({className:e="",hasIndent:t,isDotted:l,itemClassName:a="",items:n,listItemSize:r="M"})=>n?.length?u("section",{className:`text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${za[r]} ${t?Da[r]:""} ${e}`,role:"list",children:n.map(((e,t)=>u(Pa,{className:a,isDotted:l,size:r,children:e},String(t))))}):null)),Aa=x((({additionalDescription:e,align:t="text-center",button:l={},className:a="",description:n,headlineSmallVersion:r="H6",href:i,icon:s,isDotted:o=!0,isFullWidth:c=!0,items:d=[],target:m,title:h,version:u="primary",...x})=>p(k,{className:w("h-full flex flex-col justify-between min-w-[260px]","box-border border-solid border border-gray",t,a),version:u,...x,children:[p(ka,{className:"p-6",href:i,target:m,children:[Ea(s),Fa(r,h),Ha(n,h),Xa(d,o,u),Ua(e)]}),ht([l],{className:w("p-6 pt-0",c?"":"justify-center"),isVertical:!!c})]}))),Ea=e=>p("div",{className:"flex justify-center",children:[e?.src?u(Ye,{className:"mb-5",image:e}):null,e?.icon?u(Ye,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:e,asSVG:!0}):null]}),Fa=(e,t)=>t?u("div",{children:u(ie,{size:gt[e],children:t})}):null,Ha=(e,t)=>e?u("div",{className:t?"mt-2":"",children:u(re,{size:"text-l",children:e})}):null,Ua=e=>e?u("div",{className:"mt-auto",children:u(ie,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e})}):null,Xa=(e,t,l="primary")=>e?.length?u(Oa,{className:"max-w-[308px] mt-2 text-s "+("primary"===l?"!text-secondary-text":""),itemClassName:"text-left",items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t}):null,Ga=x((({className:e="",title:t,icon:l,list:a=[],href:n,target:r,...i})=>u(k,{className:w("border border-gray",e),...i,children:p(ka,{className:"flex",href:n,target:r,children:[p("div",{className:"w-[200px] min-w-[200px] self-center",children:[l?.icon?u(Ye,{image:Sa(l),asSVG:!0}):null,l?.src?u(Ye,{image:l}):null]}),p("div",{className:"p-8 pl-3 w-full",children:[t?u(T,{className:"mb-3.5",headingType:"h5",title:t}):null,a.length?u("div",{className:"flex flex-col gap-3",children:a?.map(Wa)}):null]})]})}))),Wa=(e,t)=>p("div",{className:"break-words",children:[e.title?u("div",{className:"text-h6",children:e.title}):null,e.description?u("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Ka=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Ja={default:"w-14 h-14",small:"w-12 h-12"},Ya=(e,t)=>e?"":`group/media flex items-center justify-center box-border ${Ja[t]}`,qa=x((({buttonSize:e="default",rounded:t=!1,icon:l,...a})=>{const{href:n,version:r,text:i=""}=a,{iconMapped:s,label:o}=Ka.find((({origins:e})=>e.some((e=>n?.includes(e)))))||{},c=Za(l)??s,d=c?Sa(c):void 0;return u(le,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",Ya(i,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:i,version:r,...a,children:d&&!i?u(Ye,{image:d,imageClassName:"group-hover/media:text-white",width:"24",height:"24",asSVG:!0}):null})})),Za=e=>e?.src||e?.icon?e:void 0,Qa=x((({className:e="",media:t,children:l,buttonSize:a})=>p("div",{className:"font-sans",children:[u("div",{className:`flex gap-1 ${e}`,children:t?.map(((e,t)=>u(qa,{buttonSize:a,...e},String(t))))}),u(ie,{size:"text-s-light",color:"text-secondary-text",children:l})]}))),en=x((({className:e="",description:t,href:l,icon:a,items:n=[],socialMedia:r=[],target:i,title:s,align:o="text-left",version:c="primary",...d})=>u(k,{className:w("relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50","border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider",e),version:c,...d,children:p(ka,{href:l,target:i,children:[u(bt,{className:"mb-4",title:s,description:t,headlineVersion:"S",isPadding:!1,align:o}),p("div",{className:"w-1/2 h-full flex flex-col flex-1 justify-end",children:[n.length?u(Oa,{className:"flex flex-col gap-2",itemClassName:"text-l-light",items:n}):null,r.length?u(Qa,{className:"pt-10",media:r}):null]}),tn(a)]})}))),tn=e=>p("div",{className:"absolute bottom-0 right-0",children:[e?.icon?u(Ye,{image:Sa(e),asSVG:!0}):null,e?.src?u(Ye,{image:e}):null]}),ln=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:n,renderFoldButton:i})=>{const[s,o]=a(l),c=r((()=>{o((e=>!e))}),[]),d=n({isUnfolded:s,onToggle:c}),m=i?i({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),an=x((({className:e="",isUnfolded:t,children:l})=>{const a=s(null);return n((()=>{a.current&&(a.current.style.maxHeight=t?`${a.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} ${e}`,children:l})})),nn=x((({className:e="",title:t,icon:l,isHighlighting:a,button:n,cardCells:r=[],...i})=>{const s=r.map(cn),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("relative border border-gray min-w-[322px] p-8 flex flex-col",sn(a),e),...i,children:[a?dn():null,rn(l),t?u(T,{className:"text-center pt-2",headingType:"h5",title:t}):null,n?u(le,{className:"w-full mt-4",...n}):null,r.length?u(ln,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(an,{isUnfolded:e,children:c})]}),renderFoldButton:r.length>1?on:null}):null]})})),rn=e=>p("div",{className:"w-[267px] min-w-[267px] self-center",children:[e?.src?u(Ye,{image:e}):null,e?.icon?u(Ye,{image:Sa(e),asSVG:!0}):null]}),sn=e=>e?"mt-9 pt-[70px]":"mt-[70px] pt-7",on=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(me,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16",asSVG:!0})]}),cn=(e,t)=>p("div",{className:"py-5 border-b border-main-divider",children:[e?.title?u("div",{className:"text-secondary-text text-m-light opacity-80",children:e.title}):null,e?.description?u("div",{className:"text-primary-text text-h6 mt-1",children:e.description}):null]},String(t)),dn=()=>p("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u(me,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22",asSVG:!0}),u(re,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:"ХИТ"})]}),mn="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",hn="border-gray border-solid border",un="border-main-divider border border-t-0 border-x-0",pn="w-[200px] mr-6",xn=x((({icon:e,image:t,title:l,link:a})=>p("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${hn} ${mn}`,role:"columnheader",children:[e&&!t?.src&&u(Ye,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:Sa(e),width:"63",height:"63",asSVG:!0}),t?.src&&u(Ye,{className:"mb-[18px]",image:t}),l?u(T,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,a?.text&&u("div",{className:"mt-auto w-full",children:u(le,{href:a.href,target:a.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"text-xs-light font-medium py-[11px]",children:a.text})})})]}))),gn={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},bn=x((({children:e,activeIndex:t,columnWidth:l,version:a="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:gn[a],style:{transform:`translateX(-${t*l}px)`},children:e})}))),fn=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex",children:e})}))),vn=x((({colHeaders:e,activeIndex:t})=>p(fn,{children:[u("div",{className:pn,role:"columnheader"}),u(bn,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(xn,{...e},String(t))))})]}))),Nn=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:a})=>u("div",{className:`w-80 box-border flex flex-col ${hn} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${a?mn:""}`,role:"cell",children:u("div",{className:`mx-7 h-full ${un} ${a&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>Cn(e,t,a)))})}))),yn=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),wn=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),Cn=({label:e,description:t},l,a)=>p("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?u("h4",{className:yn(a),children:e}):null,t?u("div",{className:wn(a),children:t}):null]},String(l)),kn=(e=!1)=>`text-s py-7 ${un} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,Sn=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:a,isFirstRow:n,isLastRow:r})=>p(fn,{children:[e?.title?u("div",{className:kn(r),children:e.title}):null,t?.length?u(bn,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(Nn,{cell:e,isFirstRow:n,isLastRow:r,isFillGradient:a&&0===t},String(t))))}):null]}))),In=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:a})=>{const{isScrollAvailable:n}=a;return p("div",{className:"relative",children:[e.map(((e,a,{length:n})=>u(Sn,{row:e,isFirstRow:0===a,isLastRow:a+1===n,activeIndex:l,isColoredFirstColumn:t},String(a)))),n?_t({...a,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),Tn=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:a,isColoredFirstColumn:n})=>{const r=e?.map((({header:e})=>e||{})),i=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:i.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:a),[o,c]=Rt({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[r?.length?u(vn,{colHeaders:r,activeIndex:o}):null,s?.length?u(In,{rowData:s,isColoredFirstColumn:n,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),$n=x((({className:e="",title:t,rowHeaders:l,columns:n,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=a(!i),m=r((()=>d((e=>!e))),[]);return p(k,{className:`py-12 pl-12 overflow-hidden relative ${e}`,...o,children:[u(T,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),u(Tn,{columns:n,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?Bn({isShowAllRow:c,onClick:m}):null]})})),Bn=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-12",children:p("div",{className:"flex w-full",children:[u("div",{className:pn}),u("button",{onClick:t,className:"mt-5 flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),Rn=x((({className:e="",contacts:t,info:l,version:a="secondary",...n})=>p(k,{className:`flex p-12 ${e}`,version:a,...n,children:[l?.length?Mn(l):null,t?.length?Mn(t):null]}))),Mn=e=>u("div",{className:"flex grow basis-0",children:e.map(((e,t)=>Vn({column:e,index:t})))}),Vn=({column:e,index:t})=>e?u("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:a},n)=>p("div",{className:"mt-6 first:mt-0",children:[u(bt,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"text-left"}),l?u("div",{className:"mt-1.5 opacity-80",children:u(re,{size:"text-m",font:"font-light",children:l})}):null,a?u(le,{className:"mt-6",...a}):null]},String(n))))},`col-${String(t)}`):null,jn=e=>"Image"===e?.errorContentType&&e?.image?u(Ye,{image:e.image}):"Code"===e?.errorContentType&&e.code?u("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,_n=x((({className:e="",title:t,subtitle:l,error:a,button:n,...r})=>{return p(k,{className:w("flex flex-col justify-center items-center",(i=n?.text,i?"py-20 pt-3 pb-1":"mb-16 pb-2 mt-24 pt-3"),e),version:"transparent",...r,children:[u("div",{className:"flex justify-center py-20",children:jn(a)}),t?u(T,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?u("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,n?.text?u(le,{className:"py-4 px-9",version:n?.version,...n,children:n.text}):null]});var i}));var Ln;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(Ln||(Ln={}));const Pn=new Intl.NumberFormat("ru",{style:"currency",currency:Ln.RUB}),zn=e=>e?Pn.format(e):"",Dn="text-left text-m-light text-secondary-text",On=`${Dn} pl-11`,An={USD:"DollarIcon",EUR:"EuroIcon"},En=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Dn,children:"Валюта"}),u("th",{className:On,children:"Купить"}),u("th",{className:On,children:"Продать"})]})}),u("tbody",{children:t.map(Fn)})]}))),Fn=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-1 text-h6",children:[u("td",{className:"pt-4",children:p("div",{className:"flex items-center",children:[t?u(Ye,{image:{icon:An[t]},width:"24",height:"24"}):null,u("span",{className:"ml-2",children:t})]})}),u("td",{className:"pt-4 pl-11",children:zn(e?.saleExchangeRate)}),u("td",{className:"pt-4 pl-11",children:zn(e?.buyExchangeRate)})]},t)},Hn=x((({className:e="",address:t})=>p("div",{className:`flex ${e}`,children:[u(Ye,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),p("div",{className:"ml-3",children:[t?u("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,u("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),Un=(e,t,l)=>{const a=Number(Xn(e))*Math.pow(t,l?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(a)},Xn=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Gn=e=>{return(t=[[e=>e.value!==Ln.RUB&&e.oppositeValue!==Ln.RUB,()=>e.handleConvert(e.value,Ln.RUB)],[e=>e.value===Ln.RUB&&e.oppositeValue===Ln.RUB,()=>e.handleConvert(e.value,Ln.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Wn(e){const{placeholder:t,rates:l,selected:a,value:n,setValue:r,setSelected:i}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:a,text:a};return p("div",{className:"relative flex",children:[u($,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:n,onChange:r}),s.length?u(pe,{isBorder:!1,onChange:e=>i(e.key),options:s,value:o}):null]})}const Kn=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:n})=>{const[i,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Ln.RUB,selectBuy:l?.[0]?.currency?.currency||Ln.USD}),o=r((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[Wn({placeholder:"Хочу продать",rates:l,selected:i.selectSell,setSelected:Jn(i,o,l),value:i.inputSell,setValue:e=>qn(o,l)(e,i.selectSell,i.selectBuy)}),Wn({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:Yn(i,o,t),value:i.inputBuy,setValue:e=>Zn(o,t)(e,i.selectBuy,i.selectSell)}),n?.text?u(le,{className:"py-4 mr-1",version:n?.version,...n,children:n.text}):null]})})),Jn=(e,t,l)=>a=>{t({selectSell:a}),Gn({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,n=e.selectBuy)=>{qn(t,l)(e.inputSell,a,n)}})},Yn=(e,t,l)=>a=>{t({selectBuy:a}),Gn({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,n=e.selectSell)=>Zn(t,l)(e.inputBuy,a,n)})},qn=(e,t)=>(l,a,n)=>{e({inputSell:Xn(l),selectBuy:n});const r=t.find((e=>e.currency?.currency===n))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;r&&e({inputBuy:String(Un(l,r,a===Ln.RUB)||"")})},Zn=(e,t)=>(l,a,n)=>{e({inputBuy:Xn(l),selectSell:n});const r=t.find((e=>e.currency?.currency===n))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;r&&e({inputSell:String(Un(l,r,a===Ln.RUB)||"")})};const Qn=async e=>{const t=await er(),l=t?.code||"000";return{region:t,exchangeRates:await tr(e,l)}},er=async()=>{try{return await j("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},tr=async(e,t)=>{try{return await j(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},lr=x((({className:e="",title:t="Курсы обмена валют",button:l,...a})=>{const{exchangeRates:n}=function(){const{data:e}=R("/api/v1/exchangerates",Qn);return e||{}}(),r=ar(n?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:Ln.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:Ln.RUB}}),u(k,{className:`p-9 box-border min-h-80 ${e}`,...a,children:u(Ta,{title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:p("div",{className:"flex",children:[p("div",{className:"mr-14 pt-4",children:[r?u(En,{className:"mb-[30px]",exchangeCurrencyItems:r}):null,u(Hn,{address:n?.address})]}),r.length&&i.length&&s.length?u(Kn,{className:"grow",currencyRatesBuy:i,currencyRatesSell:s,button:l}):null]})})})})),ar=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],nr=x((({className:e="",label:t,icon:l,dataTheme:a="",disabled:n=!1,onClick:r})=>p("button",{className:w("flex justify-center w-full px-0 py-5 border border-transparent outline-none focus:border-primary-text",n?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:r,disabled:n,"data-theme":a,children:[u("span",{className:"text-h4 pr-3",children:t}),l?u(Ye,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),rr=({isUnfolded:e,onToggle:t})=>u(nr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ir=["ArrowDownIcon","ArrowUpIcon"],sr="grid grid-cols-12 gap-1 border-box",or=x((({label:e="",filtrationState:t={},topItemsCount:l=0,block:a,notFound:n,...r})=>{const i=a?.blocks?.filter((e=>{return l=t,a=e.content||{},Object.entries(l).map((([e,t])=>Array.isArray(t)?((e,t)=>l=>void 0===t[e]||t[e]?.every((t=>l[e]?.includes(t))))(e,l):((e,t)=>l=>void 0===t[e]||t[e]===l[e])(e,l))).every((e=>e(a)));var l,a}))||[],[s,o]=l>0?[i.slice(0,l),i.slice(l)]:[i,[]];return p("div",{children:[u("div",{className:w(i.length?"hidden":"block"),children:n?cr(n):null}),p("div",{className:w(i.length?"":"hidden"),children:[u("div",{className:w("mb-1",sr),children:ql(s,{...r.options,parent:a})}),u(ln,{renderFoldableSection:({isUnfolded:e})=>u(an,{className:w(sr,e?"mb-1":""),isUnfolded:e,children:ql(o,{...r.options,parent:a})}),renderFoldButton:({isUnfolded:t,onToggle:a})=>u(nr,{className:w(l<1?"hidden":""),disabled:!o?.length,label:e,icon:ir[Number(t)],dataTheme:r.options?.page?.colorPalette,onClick:a})})]})]})}));function cr({title:e,description:t}){return p("div",{className:"bg-white py-20",children:[e?u("div",{className:"mb-2",children:u(re,{align:"text-center",children:u(ie,{size:"text-h4",children:e})})}):null,t?u(re,{size:"text-xl",font:"font-light",align:"text-center",children:t}):null]})}const dr=x((({value:e,onChange:t,items:l=[],multiple:a})=>l.map((l=>u(Ne,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(a){const a=e?.includes(l);t&&t(a?e?.filter((e=>e!==l)):[...e||[],l])}else t&&t(e===l?void 0:l)})(l.value),type:a?"checkbox":"radio"},l.value))))),mr=(e,t)=>l=>{const a=e[l],n=a?.type;return"array"===n?hr(l,t)(a):null},hr=(e,t)=>l=>{const a=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-4",children:u(ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(dr,{items:a,multiple:!0,...t(e)})]},e)},ur=x((({className:e,filtrationSchema:t={},resetButton:l,...n})=>{const{formState:i,register:o,resetForm:c}=((e={})=>{const[t,l]=a(e),n=s({}),i=r((()=>l({})),[]);return{formState:t,register:e=>n.current?(n.current[e]||=t=>{l((l=>({...l,[e]:t})))},{value:t?.[e],onChange:n.current[e]}):{},resetForm:i}})();return p(k,{className:w(e),version:"transparent",...n,children:[p("form",{className:"flex justify-between bg-white p-9 mb-1",children:[u("div",{className:"flex gap-11",children:Object.keys(t).map(mr(t,o))}),l?u("div",{children:u(le,{className:"w-72",onClick:c,...l})}):null]}),u(or,{filtrationState:i,...n})]})}));function pr(e,t={}){const{data:l}=R(`/wcms-resources/${e}.json`,j,{fallback:t});return l||{}}ur.childrenTypes=["ProductTile"],ur.childSchema=e=>e?.filtrationSchema||{};const xr={"bg-white":"color",transparent:"white"},gr={"bg-white":"text-primary-main",transparent:"text-white"},br=(e,t,l)=>u(Ye,t?.src?{image:t,className:gr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:xr[e]},className:gr[e],width:l?.width,height:l?.height,asSVG:!0}),fr={"bg-white":"text-primary-text",transparent:"text-white"},vr=(e,t,l)=>u("span",{className:`${fr[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),Nr=x((({className:e="",href:t,logo:l,children:a=l?.title,targetBlank:n,bgColor:r="bg-white",showTitle:i=!0})=>p("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:n?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[br(r,l?.image,{width:"40",height:"45"}),i?vr(a||l?.title,r):null]}))),yr=x((({className:e,onClick:t})=>u("button",{className:w("visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Ye,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function wr(e){throw new Error(e)}function Cr({onOpen:e,onClose:t}={}){n((()=>f.subscribe("dialog",(l=>{switch(l.type){case"open":e&&e(l);break;case"close":t&&t();break;default:wr(l)}}))),[e,t])}function kr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Sr=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:a,s2Matches:n}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=new Array(e.length),n=new Array(t.length);let r=0;for(let i=0;i<e.length;i++){const s=Math.max(0,i-l),o=Math.min(i+l,t.length-1);for(let l=s;l<=o;l++)a[i]||n[l]||e[i]!==t[l]||(r++,a[i]=!0,n[l]=!0)}return{m:r,s1Matches:a,s2Matches:n}}(e,t);if(0===l)return 0;const r=function(e,t,{s1Matches:l,s2Matches:a}){let n=0;for(let r=0,i=0;r<e.length;r++){if(!l[r])continue;let s=i;for(;s<t.length;s++)if(a[s]){i=s+1;break}e[r]!==t[s]&&n++}return n}(e,t,{s1Matches:a,s2Matches:n}),i=(l/e.length+l/t.length+(l-r/2)/l)/3,s=i>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return i+s*(1-i)};const Ir=(e,t)=>(l,a)=>{for(const[n,r]of a)l.set(n,e(l.get(n)||t,r));return l},Tr=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),$r=e=>t=>e.map((([e,l])=>[Sr(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Rr(t,e))).reduce(Ir(Math.max,0),new Map),Br=e=>t=>{return kr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=Tr(t||"");return l.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e.map((e=>il(l.map(Sr(e)))))):0})(e))).sort((a=([,e])=>e,l=(e,t)=>a(e)-a(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,a},Rr=(e,t)=>new Map(e.map((e=>[e,t]))),Mr=({basePathList:e=["/"],initialQuery:t="",wasOpened:l})=>{const[r,s]=a(t||"");n((()=>{null!=t&&s(t)}),[t]);const o=i((()=>e.map((e=>l?e:null))),[l,...e]),{data:c}=R(o,Vr),[d,m]=a(null);return((e,t,l=300)=>{n((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{c&&m(c.map((e=>t=>{const{corpus:l,dictionary:a}=t||{};if(!(e&&l?.length&&a&&Object.keys(a).length))return[];const n=Tr(e);if(!n.length)return[];const r=Object.entries(a),i=[...n.map($r(r)).reduce(Ir(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*n.length)).map((([e])=>l[e]));return Br(n)(i)})(r)))}),[c,r]),[d,{value:r,onChange:s}]},Vr=async(...e)=>(await Promise.allSettled(e.map((e=>V(A(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),jr=x((({className:e,isOpened:t,head:l,children:a,onClose:r})=>(n((()=>{const e=({key:e})=>{"Escape"===e&&r&&r()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[r]),t?u("div",{className:w("fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar",e),role:"dialog",children:p("div",{className:"relative container pb-12 min-h-full",children:[p("div",{className:"sticky bg-white pt-6 top-0",children:[u(yr,{className:"absolute top-3 -right-6",onClick:r}),l]}),a]})}):null)));function _r(e=!1){const[t,l]=a(e),n=r((()=>l(!0)),[]),i=r((()=>l(!1)),[]),s=r((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:n,setFalse:i,toggle:s}]}function Lr(e){const[t,{setTrue:l,setFalse:n}]=_r(),[i,o]=a({id:e}),c=s(t);c.current||=t;Cr({onOpen:r((t=>{t.id===e?(o(t),l()):n()}),[e]),onClose:n});const d=r((()=>{n(),f.fire("dialog",{type:"close"})}),[]);return{...i,isOpened:t,wasOpened:c.current,onClose:d}}const Pr=x((({className:e,topItems:t})=>{const l=X(!0);return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(zr)})})),zr=(e,t)=>{const{text:l,items:a,href:n,target:r,onClick:i}=e;return p("div",{className:"flex flex-col gap-3.5 w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:n,target:r||"_self",onClick:i,children:l||`Раздел ${t}`}),a?.map(((e,t)=>u(Dr,{...e,basePath:n,index:t},String(t))))]},String(t))},Dr=x((({text:e,index:t,basePath:l,...a})=>{const n=!(!c.BASE_PATH||!l)&&!c.BASE_PATH.startsWith(l),r=X(n),{href:i,target:s,onClick:o}=r(a);return u("a",{className:w("text-l-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:n?A(l,i):i,target:s||"_self",onClick:o,children:e||`Раздел ${t}`})})),Or=x((({className:e,isMobile:t,value:l,autoFocus:a,onChange:n,onFocus:i})=>{const s=r((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-4 pointer-events-none",children:u(Ye,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),u("input",{className:w("h-12 pl-12 w-full 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",t?"":"h-full"),value:l,type:"text",name:"search-bar-input",placeholder:"Поиск по сайту",autoFocus:a,onChange:s,onFocus:i})]})})),Ar="search",Er=x((({topItems:e})=>{const t=Lr(Ar),l=e?.map((e=>e.href||"/")),[a,r]=Mr({basePathList:l,initialQuery:t.message,wasOpened:t.wasOpened}),s=i((()=>Fr(e)(a)),[e,a]);return n((()=>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(jr,{...t,head:u(Or,{className:"my-5",autoFocus:!0,...r}),children:u(Pr,{topItems:s})})})),Fr=e=>t=>e?.length&&t?.length?kr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:A("/",t)})))}))):[];const Hr=x((({className:e,isMobile:t})=>{const[l,n]=a(""),i=r((()=>n("")),[]);Cr({onClose:i});const{open:s}=P(Ar),o=r((e=>{n(e),Ur(e)&&s(e)}),[]);return p("div",{className:e,children:[u(Or,{isMobile:t,value:l,onChange:o}),t?u(yr,{className:"absolute top-2 right-3",onClick:i}):null]})})),Ur=e=>e&&e.length>=3,Xr=x((e=>u(Hr,{...e}))),Gr=x((({className:e="",items:t,hasButton:l})=>p("div",{className:e,children:[t?.length?t.map(Wr):null,l?u(le,{version:"primary",className:"mb-6 w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),Wr=(e,t)=>{const{type:l,text:a,description:n}=e;return p("div",{className:"mb-4",children:[u("div",{children:Kr(l,a)}),u("div",{className:"mt-1 text-s-light text-secondary-text",children:n})]},String(t))},Kr=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Jr(t)}`,children:t});case"email":return u("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},Jr=e=>e.replaceAll(/\D/g,""),Yr=x((({className:e="",index:t,text:l,...a})=>{const n=X(),{href:r,target:i,onClick:s}=n(a);return u("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:r,target:i,onClick:s,children:l||`Документ ${t}`})})),qr=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(Yr,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),Zr=x((({className:e="",index:t,...l})=>{const a=X(),{href:n,target:r,text:i,onClick:s}=a(l);return u("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:n,target:r,onClick:s,children:i||`Документ ${t}`})})),Qr=x((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-5",children:u("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>u(Zr,{index:t,...e},String(t))))}):null]}))),ei="w-[204px]",ti=x((({className:e="",...t})=>{const l=t.options?.page?.fallback,a=pr(c.SITEMAP||"sitemap",l),{documents:n,relatedEnterprises:r,contacts:i,socialMedia:s,mobileApps:o,logo:d}=pr(c.FOOTER||"footer",l);return p(k,{tag:"footer",className:`p-9 ${e}`,...t,children:[p("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[u(Nr,{className:ei,logo:d}),u(Xr,{className:"grow"})]}),p("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[p("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[u(Gr,{items:i,hasButton:!0}),u(Qa,{media:s,children:"Соцсети"}),u(Qa,{className:"mt-6",media:o,children:"Мобильное приложение"})]}),u(Pr,{className:"flex-grow",topItems:a?.topItems})]}),u(qr,{className:"mt-[98px]",links:r}),u(Qr,{links:n})]})})),li=x((({className:e="",title:t,description:l,calendar:a,...n})=>p(k,{className:`p-12 ${e}`,...n,children:[u(bt,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M"}),a?ai(a):null]}))),ai=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 mt-13",children:[u("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>ni(e,t)))}),u("div",{className:"flex w-full",children:l.map(((e,t)=>p("div",{className:"pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex",children:ri(e)}),p("div",{className:"text-s-light text-primary-text mt-3",children:[u("span",{children:e.text})," ",u("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},ni=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),ri=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:u(Ye,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),ii=864e5;function si(e,t,l=globalThis?.localStorage){const a=r((async(...a)=>{const n=`async:${e}`,r=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<ii?t:void 0}(l.getItem(n));if(r)return r;const i=await t(...a);return l.setItem(n,JSON.stringify({data:i,timestamp:Date.now()})),i}),[e,t]);return R(e,a)}const oi=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}},ci=e=>({href:t})=>O(z(t)?e.href:e.pathname).startsWith(O(t));const di=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-4 max-w-[170px] gap-3.5 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-4 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"})]}))),mi="location",hi=x((({currentLocation:e,onChangeLocation:t,foreignOffices:l})=>{const n=Lr(mi),[i,s]=a(""),o=pi(function(){const{data:e}=R("/api/v1/regions",j);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const a of e){const e=t(a),n=l.get(e)||[];l.set(e,[...n,a])}return l})(o,ui),d=r((e=>{n.onClose&&n.onClose(),t&&t(e)}),[n.onClose,t]);return p(jr,{...n,head:p("div",{children:[u(xi,{currentLocation:e}),u(di,{onSearch:s,searchTerm:i,className:"mb-7"})]}),children:[i&&i.length>=3?u("div",{children:o.filter((({name:e})=>e&&Sr(e.toLowerCase())(i.toLowerCase())>=.8)).map(bi(d))}):u("div",{className:"columns-5",children:Array.from(c.entries()).map(gi(d))}),u(fi,{foreignOffices:l})]})})),ui=e=>e.name?.charAt(0)||"",pi=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),xi=x((({currentLocation:e})=>e?p("div",{className:"mb-4",children:[u(ie,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{className:"cursor-pointer",onClick:close,children:u(ie,{color:"text-primary-main",children:e.name})})]}):null)),gi=e=>([t,l])=>p("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[u("div",{className:"mb-2.5",children:u(ie,{size:"text-h6",children:t})}),l.map(bi(e))]},t),bi=e=>t=>u("div",{className:"mb-1",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:t.name||""})},t.id),fi=x((({foreignOffices:e})=>e?.length?p("div",{className:"border-t border-main-divider mt-7 pt-7",children:[u("div",{className:"mb-4",children:u(ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex gap-10",children:e.map(((e,t)=>u(vi,{...e},String(t))))})]}):null)),vi=x((({icon:e,...t})=>{const l=X(),{text:a,target:n,href:r,onClick:i}=l(t);return p("div",{className:"flex gap-x-3",children:[e?u(Ye,{pathPrefix:"/wcms-resources/",image:e}):null,a?u("a",{className:"hover:text-primary-hover",href:r,target:n,onClick:i,children:a}):null]})})),Ni=x((({className:e="",active:t,flat:l,children:a,...n})=>{const r=X(!0),{href:i,target:s,text:o,onClick:c}=r(n);return u("a",{className:w(yi(t,l),e),href:i,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:wi(t,l),children:o||a})})})),yi=(e=!1,t=!1)=>w("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-4 py-2"),wi=(e=!1,t=!1)=>w("font-sans text-s-light",e?"text-primary-main":w(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Ci=x((({className:e,isRounded:t,disabled:l,ariaLabel:a,image:n,onClick:r})=>u("button",{className:w("group/btn border-0 p-0 flex items-center bg-inherit",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":"w-6 h-6 text-primary-text hover:text-primary-main","group-data-transparent:text-white",e),type:"button",disabled:l,"aria-label":a,onClick:r,children:u(Ye,{image:n,className:w("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0",asSVG:!0})}))),ki=e=>globalThis[e];function Si(e,t){const[l,i]=a(),s=r((()=>i(ki(e))),[e]);return n((()=>{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),i(void 0)}}if(!ki(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const Ii={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},Ti=x((e=>{const[t,{setTrue:l}]=_r();return t?u($i,{...e}):Bi({...e,onClick:l})})),$i=x((({chat:e="personal",...t})=>((e=>{n((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),Si("chatbot",Ii[e])})(e),Bi(t)))),Bi=({className:e,iconVersion:t,onClick:l})=>u(Ci,{className:w("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l}),Ri=x((({className:e,version:t,locationName:l,officesLink:a})=>{const n="transparent"===t?"white":"black",{open:i}=P(mi),s=r((()=>i()),[]),{open:o}=P(Ar),d=r((()=>o()),[]);return p("div",{className:w("flex items-center gap-5",e),children:[u(Ni,{flat:!0,href:"#",text:l,onClick:s}),a?u(Ni,{flat:!0,href:a,text:"Офисы и банкоматы"}):null,u(Ci,{image:{icon:"LoupeIcon",iconVersion:n},ariaLabel:"Поиск",onClick:d}),c.CHAT_BOT?u(Ti,{iconVersion:n,chat:c.CHAT_BOT}):null]})})),Mi=x((({className:e="",items:t,activeItem:l})=>{const n=X(),[i,s]=a(!1),o=r((()=>s((e=>!e))),[]),c=ce(r((()=>s(!1)),[]));return p("div",{className:w(i?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[u("button",{className:"group/btn flex justify-between items-center h-6 ml-6","aria-label":""+(i?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>u("div",{className:"w-[3px] h-[3px] rounded mr-1 bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),u("div",{className:w("flex flex-col rounded-md bg-white p-6 pb-2",i?"":"hidden"),"aria-hidden":!i,children:t?.map(((e,t)=>{const{text:a,...r}=e;return u("a",{className:w("text-l-light pb-4 hover:text-primary-main",e===l?"text-primary-main":""),...n(r),children:a},e.href||String(t))}))})]})})),Vi=x((({className:e="",active:t,dataItemName:l,children:a,...n})=>{const r=X(),{href:i,target:s,text:o,onClick:c}=r(n);return p("a",{className:w("relative inline-block bg-transparent text-center no-underline",e),href:i,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:ji(t),children:o||a}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),ji=(e=!1)=>w("font-sans text-l-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),_i=x((({observerOptions:e,onVisibilityChange:t,children:l,...a})=>{const n=v(r((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:n,children:u(Vi,{...a,children:l})})})),Li=x((({subItems:e=[]})=>{const t=(e=>(t=[])=>{const l=t?.filter(ci(e));return l?.length?rl((e=>e.href?.length||0))(l):void 0})(U())(e),[l,n]=a(e.length),r=e.slice(l),o=s(null),c={rootRef:o},d=i((()=>e.map(((e,t)=>e=>{n(e?Pi(t):zi(t))}))),[e]);return p("nav",{className:"relative mt-6",children:[u("div",{ref:o,className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:e.map(((e,a)=>u(_i,{className:w("mr-8",l-1<a?"invisible":""),active:e===t,observerOptions:c,onVisibilityChange:d[a],...e},String(a))))}),r.length?u(Mi,{className:"absolute w-52 -top-4 right-0 pt-4 z-40",items:r,activeItem:t}):null]})})),Pi=e=>t=>Math.max(t,e+1),zi=e=>t=>Math.min(t,e),Di={"bg-white":"primary",transparent:"transparent"},Oi=x((({bgColor:e="bg-white",className:t,showSubMenu:l=!0,version:i=Di[e],...s})=>{const o=U(),{topItems:d,logo:m,defaultLocation:h,foreignOffices:x,officesLink:g}=pr(c.SITEMAP||"sitemap",s.options?.page?.fallback),b=d?.find((e=>ci(c.BASE_PATH?{pathname:c.BASE_PATH}:e))(o)),[f,v]=function(e="Москва"){const t=oi(),[l,i]=a(t?.region??{name:e}),{data:s}=si("/api/v1/region",j);return n((()=>{i(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[l,r((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),i(e)}),[])]}(h);return p(k,{tag:"header",className:w("pt-6 px-20",l&&b?.items?.length?"pb-4":"pb-5",t),version:i,...s,children:[p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(Nr,{className:"mr-8",bgColor:e,logo:m}),d?.map(((e,t)=>u(Ni,{active:e===b,...e},String(t)))),u(Ri,{version:i,className:"ml-auto",locationName:f.name,officesLink:g})]}),u("div",{className:w("mt-6 h-px bg-main-divider","transparent"===i?"opacity-30":"")}),l&&b?.items?.length?u(Li,{subItems:b.items}):null]}),u(Er,{topItems:d}),u(hi,{currentLocation:f,foreignOffices:x,onChangeLocation:v})]})})),Ai={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},Ei=x((({className:e="",gap:t="XS",isPadding:l=!1,version:a="transparent",isTheme:n=!1,...r})=>u(k,{className:w("grid grid-cols-12",l?"p-12":"",Ai[t],e),version:a,isTheme:n,...r,children:Zl(r)})));Ei.childrenTypes={exclude:["HorizontalLayout"]};const Fi=x((e=>{const{className:t,image:l,...a}=e;return u(k,{className:t,...a,children:u(Ye,{image:l})})})),Hi=x((({className:e="",cards:t=[],button:l})=>{const[n,i]=a(0),s=r((e=>i(e)),[]),o=t.length,[c,d]=Rt({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?Ui({activeIndex:c,cards:t,selectedCardIndex:n,onClick:s}):null,_t({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),m?u("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),u(le,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function Ui({activeIndex:e,cards:t,selectedCardIndex:l,onClick:a}){const n=460*e,r=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${n}px)`},className:"duration-1000 px-12",children:u("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${r}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:a}){return p("button",{type:"button",onClick:a,className:"p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u(Ye,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-3.5",children:[e?.sum?Xi("страховая сумма",e.sum):null,e?.fee?Xi("страховой взнос",e.fee):null]}),Gi(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>a(t)})))})})}function Xi(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p("span",{className:"text-h6",children:[_e(t)," ₽"]}),u("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Gi(e){return e?u(Ye,{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 Wi=x((({className:e="",title:t,insuranceTabs:l=[],button:n,...i})=>{const[s,o]=a(0),c=r((e=>o(e)),[]);return p(k,{className:`box-border py-12 overflow-hidden relative w-100 ${e}`,...i,children:[t?u(T,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:a}){return u("button",{type:"button",onClick:a,"aria-label":e,className:"box-border px-4 py-3 text-m-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:Ki({insuranceTabs:l,button:n})})]})})),Ki=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(Hi,{button:t,cards:e},String(l)))):null};function Ji(e){return t=>t.reduce(((t,l,a)=>t.length?t.concat({...e,key:a},l):[l]),[])}const Yi={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},qi={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},Zi=x((e=>{const{className:t="",items:l,isDotted:a,investmentZeroColumn:n,investmentColumns:r,...i}=e,s=r?[...r]:[];return n&&s.unshift(n),u(k,{className:`px-9 py-12 ${t}`,...i,children:p("div",{className:"container text-m-light",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[Ji(u("div",{className:"w-px h-4 bg-gray"}))(s.map(Qi)),u("div",{className:"absolute right-[30px] w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-2 ml-9 mr-8"}),u("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(ls)})]}):null,l?.length?u(Oa,{className:"mt-9 text-l-light max-w-[657px]",items:l,itemClassName:"mb-[7px]",isDotted:a}):null]})})})),Qi=(e,t,l)=>{const a=1===t,n=t===l.length-1;return u("div",{className:`${es(a,n,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(n?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(ts)}):null},`column_${t}`)},es=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-2.5",l.length&&!t?"pr-2.5 pb-8":"pb-[22px]"].join(" "),ts=(e,t)=>{const l=e.cellSize||"XS",a=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-2 ${qi[l]} ${Yi[a]} ${"XS"===l?"px-3":"px-11"}`,children:u("div",{className:"text-center",children:e.text})},`cell_${t}`):null},ls=(e,t,l)=>{const a=0===t,n=t===l.length-1;return u("div",{className:`flex-1 max-w-[180px] text-center px-2 ${a?"pl-9":""} ${n?"mr-3.5":" "}`,children:e.title},`title_${t}`)},as=x((({className:e,iconClassName:t,textClassName:l,suffixClassName:a,doc:n,icon:r})=>{const{text:i,fileSize:s,...o}=n;return p("a",{className:e,role:"link",...o,children:[r?u(Ye,{className:t,image:Sa(r),width:"24px",height:"24px",asSVG:!0}):null,i?p("span",{className:l,children:[i,u("span",{className:a,children:o?.href&&ns(rs(o.href),s)})]}):null]})})),ns=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),rs=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},is=x((({className:e="",doc:t,icon:l})=>u(as,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6",textClassName:"self-center text-l-light",suffixClassName:"text-secondary-text group-hover/item:text-primary-main",doc:t,icon:l}))),ss=x((({className:e,documents:t,columnsMode:l="double",icon:a})=>t?.length?u("div",{className:e,role:"list",children:t.map(((e,t)=>u("div",{className:"double"===l?"basis-[calc(50%-20px)]":"",role:"listitem",children:u(is,{className:"group/item flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:a})},String(t))))}):null)),os={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},cs=x((({className:e="",title:t,description:l,align:a="text-center",documents:n,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>p(k,{className:w("p-12",e),...s,children:[u(bt,{className:"!p-0",title:t,description:l,align:a,headlineVersion:"M",as:"h2"}),u(ss,{className:`mt-8 ${os[i]}`,columnsMode:i,documents:n,icon:r})]}))),ds=e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function ms(e=""){const t=ds(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const hs=x((({className:e="",title:t="Мобильное приложение",qr:l,buttons:a,version:n="primary",items:r,image:i,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const m="secondary"===n?"p-3.5 min-w-[120px]":"min-w-[92px]";return p(k,{className:`flex justify-between p-12 box-border relative min-h-80 ${ms(e)} ${e}`,version:n,...d,children:[p(Ta,{className:"z-10",title:t?u(T,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full ${wt[o]}`}):null,buttons:ht(a,{className:"mt-8",buttonClassName:"min-w-[168px]"}),children:[ps(c),p("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?u("div",{className:`flex justify-center mr-5 bg-white rounded-md ${m}`,children:u(Ye,{className:"w-fit",image:l})}):null,us(r)]})]}),i?.src?u("div",{className:"absolute right-0 bottom-0",children:u(Ye,{image:i})}):null]})})),us=e=>e?.length?u(Oa,{items:e,itemClassName:"text-l-light mb-2 last:mb-0"}):u("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),ps=e=>e?u("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null,xs=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function gs(e,t,l){t.geoObjects.removeAll();const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),n=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:a,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),r=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));n.add(r),t.geoObjects.add(n),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const bs={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"},fs=e=>u("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(bs).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),vs={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},Ns=(e,t,l)=>p("div",{className:`${Object.values(vs).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[u(me,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",asSVG:!0,className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const a=t.target?.value?t.target?.value.toLowerCase():"";if(a){const t=e.filter((e=>e.text.toLowerCase().indexOf(a)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),ys={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"},ws=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(ys).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(me,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Cs={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"},ks=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),a="in"===t?l+1:l-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Cs).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(me,{name:l,width:"20",height:"16"})})})),Ss={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"},Is=x((({points:e,className:t="",zoom:l=5,showSearchField:r=!1})=>{const i=s(null),o=Si("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${c.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[d,m]=a(),[h,x]=a(Rs(xs)),g=Ts(e);if(n((()=>{i?.current||o?.ready((()=>{i.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),gs(o,i.current,h)}))}),[o,i,h]),n((()=>{if(i.current&&h&&o){const e=h.length<1?Rs(xs):h;gs(o,i.current,e)}}),[i,h,o]),!o)return null;const b=d?"z-[100000]":"z-10";return p("div",{id:"map",className:`${d?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-[50%] ${b}`,children:r?Ns(xs,0,(e=>{if(e){const t=Rs(e);x(t)}})):fs(g)}),u("div",{className:`${Object.values(Ss).join(" ")} ${b} right-2 top-4 bg-white`,onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:u(me,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${b}`,children:[u(ks,{yandexMaps:i}),u(ks,{yandexMaps:i,direction:"out"})]}),ws(i.current,o,`right-2 top-80 ${b}`)]})})),Ts=e=>[Bs($s(e,0)),Bs($s(e,1))],$s=(e,t)=>e.map((e=>e[t])),Bs=e=>e.reduce(((e,t)=>e+t))/e.length,Rs=e=>e?e.map((e=>e.coords)):null,Ms=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],Vs=({lunchHour:e,status:t,workTime:l})=>{const a=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?p("div",{className:"flex",children:[u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-primary-main border-green-light mr-4",children:l||null}),u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden",children:e?a:null})]}):u("div",{className:"flex",children:u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},js=({icon:e,title:t,distance:l,time:a},n)=>p("div",{className:"flex mr-4",children:[u(me,{name:e,width:"16",height:"16",asSVG:!0,className:"mr-1"}),t?p("span",{className:"text-m",children:[t," "]}):null,p("span",{className:"text-m-light",children:[l?` (${l})`:null,a?`, ${a}`:null]})]},`nearbyOffice${n}`),_s=({title:e,status:t,workTime:l,lunchHour:a,description:n},r)=>p("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[p("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[u("div",{children:e}),t?null:u("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?u("div",{children:l}):null]}),t&&a?Ls(a):null,n?u("div",{className:"pb-1 text-s-light text-secondary-text",children:n}):null]},`day${r}`),Ls=e=>/\d+/gi.test(e)?p("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[u("div",{children:"Перерыв"}),u("div",{children:e})]}):u("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:u("div",{children:e})}),Ps={id:123,branchType:{id:7,code:"21",name:"Отделение на балансе филиала"},shortName:"Ейский ДО",name:"ДО №3349/3/05",address:"353682, Краснодарский край, г.Ейск, ул.Гоголя, 349/ ул.Баррикадная, 42/1",lawAddress:"353682, Краснодарский край, г.Ейск, ул.Гоголя, 349/ ул.Баррикадная, 42/1",openDate:"2000-12-05",closeDate:null,bik:"040349536",corAcc:"30101810700000000536",registrationNumber:"3349/3/05",phone:"+7(XXX)XXX-XX-XX",fax:"+7(XXX)XXX-XX-XY",okpo:"55105921",ogrn:"1027700342890",kpp:"231002002",inn:"7725114488",branchCode:"0305",upperBranchCode:"0300",timeZone:"+03:00",exchangeRate:{currencies:[{buyExchangeRate:0,saleExchangeRate:0,currency:{id:3,code:"156",currency:"CNY",name:"Китайский юань"}},{buyExchangeRate:59.15,saleExchangeRate:69.25,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:58.4,saleExchangeRate:70.05,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],lastUpdate:"2022-11-11 03:56:17"},workSchedule:{id:413,workTime:"09.00–16.30",lunchHour:"без перерыва",workTimeSaturday:"09.00–15.00",lunchHourSaturday:"без перерыва",workingMonday:!1,workingTuesday:!1,workingWednesday:!0,workingThursday:!0,workingFriday:!0,workingSaturday:!0,workingSunday:!1},gpsLatitude:46.709744,gpsLongitude:38.260703,range:null,safeBoxCaseVolumes:null};function zs(e){return e?V(e,{method:"GET"}):{}}const Ds=x((({className:e=""})=>{const t=function(e){const{data:t}=R(e?`/api/v1/branches?regionCode=${e}`:void 0,zs);return console.warn("Hook useOfficeMap RETURNs MOCK object for testing",t),Ps}("000"),{name:l,address:a,gpsLatitude:n,gpsLongitude:r,workSchedule:i}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:m,workingSaturday:h,workingSunday:x}=i,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=i,N=n&&r?[n,r]:null,y=[{title:"Понедельник",status:s,workTime:g,lunchHour:b},{title:"Вторник",status:o,workTime:g,lunchHour:b},{title:"Среда",status:c,workTime:g,lunchHour:b},{title:"Четверг",status:d,workTime:g,lunchHour:"13:00 - 14:00",description:"Не работает прием денег с 17:00 до 19:00"},{title:"Пятница",status:m,workTime:g,lunchHour:b},{title:"Суббота",status:h,workTime:f,lunchHour:v},{title:"Воскресенье",status:x}],w=(new Date).getDay(),C=w>0?y[w-1]:y[6];return p("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[p("div",{className:"flex flex-col px-12 pt-12",children:[p("div",{className:"flex justify-between",children:[u("div",{className:"text-h2",children:l}),Vs(C)]}),p("div",{className:"flex text-l-light pt-4",children:[u(me,{name:"GeolocationIcon",width:"24",height:"24",asSVG:!0,className:"pr-1"}),a]}),u("div",{className:"flex pt-4",children:Ms.map(js)})]}),p("div",{className:"flex justify-between pt-8",children:[u("div",{className:"flex-grow h-full w-full overflow-hidden",children:N?u(Is,{points:[N],className:"h-full"}):null}),u("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:y.map(_s)})]})]})})),Os=x((({className:e="",title:t,servicesList:l,...a})=>p(k,{className:`p-8 flex flex-col ${e}`,...a,children:[t?u(T,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?u("ul",{className:"list-none m-0 p-0",children:l.map(As)}):null]}))),As=(e,t)=>p("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?u(Ye,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",asSVG:!0,image:Sa(e.icon)}):null,e.label?u("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),Es=x((({text:e,size:t,align:l,font:a,children:n,...r})=>u(k,{...r,children:u(re,{size:t,align:l,font:a,children:e||n})}))),Fs=x((e=>{const{className:t="",icon:l,label:a,description:n,version:r="primary",benefitsVersion:i="normal"}=e,s="white"===i?"secondary":"primary";return p("div",{className:`flex gap-5 ${n?"items-start":"items-center"} ${t}`,children:[l?u("div",{className:Hs(r,i),children:u(Ye,{className:"w-6 h-6",image:Sa(l,s),asSVG:!0})}):null,p("div",{className:"gap-0.5",children:[a?u("div",{className:"text-h6 text-primary-text group-data-secondary:text-white",children:a}):null,n?u("div",{className:"text-m-light text-secondary-text group-data-secondary:text-white",children:n}):null]})]})}));function Hs(e,t){let l="bg-primary-main text-black";return"secondary"===e?l="bg-white/30 text-black":"normal"===t&&(l="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${l}`}const Us=x((e=>{const{__html:t=""}=e;return u("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})})),Xs=e=>(t,l)=>{const{type:a}=t;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return u(Fs,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));case"rte":return u(Us,{__html:t.__html});default:wr(t)}},Gs=x((({className:e="",title:t,description:l,image:a,benefits:n,sum:r,monthLimit:i,directionRight:s=!1,version:o="primary",...c})=>p(k,{className:`relative py-12 px-24 ${e}`,version:o,...c,children:[u(bt,{className:"!p-0",title:t,description:l,headlineVersion:"M"}),p("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[a?.src?u(Ye,{className:s?"order-2":"",image:a}):null,p("div",{className:"w-[558px] m-auto",children:[n?.length?u("div",{className:"flex flex-col gap-4",children:n.map(Xs(o))}):null,Ws(Number(r),Number(i))]})]})]})));function Ws(e,t){return e||t?p("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Ks("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Ks("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Ks(e,t=0,l=!1){return p("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[u("span",{className:"text-secondary-text text-l-light",children:e}),p("span",{className:"text-primary-main text-h6",children:[_e(t)," ₽"]})]})}function Js(e=""){const t=ds(e);return t<=4?"S":t<=8?"M":"L"}function Ys(e=""){const t=ds(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const qs=x((({className:e,title:t,description:l="Блок в разработке...",...a})=>p(k,{className:w("p-9 box-border",e,Ys(e),ms(e)),...a,children:[u(bt,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:Js(e)}),u("figure",{className:"m-0 min-w-[80%]",children:Zs()})]}))),Zs=(e=3)=>eo(100,e).map((e=>Math.floor(e))).map(Qs),Qs=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),eo=(e,t)=>[e].concat(t>0?eo(e/1.618,t-1):[]),to=x((({className:e="",children:t,...l})=>{const a=X(),{text:n,href:r,target:i,onClick:s}=a(l);return r?u("a",{className:`no-underline ${e}`,href:r,target:i,onClick:s,children:u("span",{className:e,children:n||t})}):u("span",{className:e,children:n||t})})),lo=(e="primary",t="normal")=>({icon:l,label:a,description:n},r)=>u(Fs,{icon:l,label:a,description:n,version:e,benefitsVersion:t},String(r)),ao=x((({className:e="",title:t,headlineVersion:l="L",description:a,benefitsCountOfRow:n=3,benefits:r,benefitsVersion:i,buttons:s,footnote:o,image:c,__html:d,items:m,version:h="primary",isDotted:x=!0,textBlockClassName:g="",directionRight:b=!0})=>{const f=r?.filter((e=>e.label))?.length,v=no(n);return p("div",{className:w("flex grow justify-between items-stretch h-full",e),children:[c?.src?u(Ye,{className:"mt-[-50px] "+(b?"order-2":""),image:c}):null,p("div",{className:w("flex flex-col",g),children:[u(bt,{className:"!p-0 max-w-[600px]",title:t,description:a,headlineVersion:l,align:"text-left"}),p("div",{className:"flex flex-col justify-between h-full",children:[p(Ta,{buttons:ht(s),children:[f?u("div",{className:v,children:r?.map(lo(h,i))}):null,d?u("div",{className:"mt-5",children:u(Us,{__html:d})}):null,m?.length?u(Oa,{className:"mt-5 text-h6",items:m,itemClassName:"mb-[7px]",isDotted:x}):null]}),o?u("p",{className:"text-m-light pt-12",children:o}):null]})]})]})})),no=(e=2)=>"gap-6 mt-6 "+(e>2?"inline-grid grid-cols-[auto_auto_auto]":"inline-grid grid-cols-[auto_auto]");function ro(e,t,l){const{text:a,href:n,target:r}=e,i="primary"===t?"white":"black",s=e?.icon||{icon:"ArrowLeftIcon"};return p("div",{className:w("flex items-center",l),children:[u(le,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:a,href:n,target:r,children:u(Ye,{className:"w-4 h-4",image:{...s,iconVersion:s.iconVersion||i},asSVG:!0})}),a?u(le,{version:"link",text:a,href:n,target:r,ariaLabel:a}):null]})}const io="text-secondary-text group-data-secondary:text-white/80",so=x((e=>{const{className:t="",breadcrumbs:l,backwardButton:a,version:n="primary",...r}=e,i="primary"===n?n:"white";return p(k,{className:`overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${t}`,version:n,...r,children:[a?.text?ro(a,i,"mb-10 -mt-2.5"):null,l?.length?u("div",{className:"text-xs-light mb-6",children:Ji(u("span",{className:`mx-2 ${io}`,children:"/"}))(l.map(((e,t)=>u(to,{className:io,...e},String(t)))))}):null,u(ao,{version:n,...r})]})})),oo=x((({className:e="",slides:t=[],...l})=>{const n=t.map((e=>e.nav)),i=t.map((e=>e.productBlock)),[s,o]=a(0),c=r((e=>o(e)),[]);return p(k,{className:`box-border pt-12 overflow-hidden relative w-100 mb-6 ${e}`,...l,children:[u("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${s}00%)`},role:"list",children:i.map(((e,t)=>function(e,t){return u("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:u("div",{className:"flex grow",children:u(ao,{className:"pl-12 z-10 group-data-secondary:text-white",textBlockClassName:"mb-[154px]",headlineVersion:"XXL",...e})})},String(t))}({...e,...l},t)))}),u("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:n.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:a}){const n=l?"bg-white shadow-dark-blue min-w-[350px] border-none p-6":"min-w-[290px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10 px-6 py-5 backdrop-blur",r=l?"text-primary-text !text-h6 p-2":"text-l pb-1 text-secondary-text group-data-secondary:text-white",i=l?"text-secondary-text text-l-light":"text-m-light text-secondary-text group-data-secondary:text-white/80";return u("button",{type:"button",onClick:a,"aria-label":e?.title,className:`relative box-border overflow-hidden cursor-pointer text-left mx-1 grow basis-0 border border-gray group-data-secondary:border-white/50 ${n}`,children:p("div",{className:"border-0 px-6",children:[u("div",{className:`last:pb-0 ${r}`,children:e?.title}),u("div",{className:`text-secondary-text ${i}`,children:e?.description})]})},String(t))}({slide:e,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))})]})}));function co(e,t){if(!e)return null;return u("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:u(re,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e})})}const mo=(e,t)=>{const{type:l}=e;if("default"!==l&&"rte"!==l)return null;switch(l){case"default":return[u(ie,{size:"text-h6",children:e.label},`label-${t}`),u(ie,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e.description},`desc-${t}`)];case"rte":return u("div",{className:"col-span-2",children:u(Us,{__html:e.__html})});default:wr(e)}};function ho(e,t){return e?.src?u(Ye,{className:`absolute ${t?"right-0":"left-0"} bottom-0`,image:e}):null}const uo=x((({className:e="",title:t,headlineVersion:l="S",description:a,additionalDescription:n,benefits:r=[],buttons:i,image:s,isImageOnRightSide:o=!0,...c})=>p(k,{className:w("overflow-hidden p-9 box-border relative min-h-[364px]",Ys(e),e),...c,children:[p("div",{className:w("flex flex-col",o?"":"items-end"),children:[u(bt,{className:w("!p-0 !bg-transparent z-10",t||a?"mb-3.5":""),title:t,description:a,headlineVersion:l,as:"h2",align:"text-left"}),po(r,s),co(n,s),ht(i,{className:"mt-5 z-10 text-l"})]}),ho(s,o)]})));function po(e,t){if(!e.length)return null;return u("div",{className:`z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:e.length?e.map(mo):null})}const xo=x((({className:e="",title:t="Акции и спецпредложения",date:l,description:a,as:n,buttons:r=[],...i})=>u(k,{className:w("p-9 box-border",e,Ys(e),ms(e)),...i,children:u(Ta,{title:t?u(bt,{className:"!p-0 max-w-[600px]",title:t,headlineVersion:Js(e),align:"text-left",as:n||"h2"}):null,buttons:ht(r),children:p("div",{className:"mt-1.5",children:[l?u("div",{className:"text-s mb-2",children:go(l)}):null,u("div",{className:"text-l",children:a})]})})})));function go(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const bo=x((e=>{const{__html:t,...l}=e;return u(k,{...l,children:u(Us,{__html:t})})})),fo=x((({className:e="",label:t="Развернуть",isExpanded:l,isFoldButtonOnTop:a=!0,version:n="primary",...r})=>u(k,{className:`w-full border-0 border-b border-solid border-main-divider last:border-b-0 ${e}`,tag:"div",version:"transparent",...r,children:u(ln,{isFoldButtonOnTop:a,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>u(an,{className:"grid grid-cols-12 gap-5 [&>*]:p-0",isUnfolded:e,children:Zl(r)}),renderFoldButton:({isUnfolded:e,onToggle:l})=>vo({version:n,label:t,isUnfolded:e,onToggle:l})})})));fo.childrenTypes={exclude:["RollupItem"]};const vo=({version:e,label:t,isUnfolded:l,onToggle:a})=>{const n=t||(l?"Скрыть":"Развернуть");return"primary"===e?No({label:n,icon:l?"MinusIcon":"PlusIcon",onToggle:a}):u(nr,{label:n,icon:l?"ArrowUpIcon":"ArrowDownIcon",onClick:a})},No=({label:e,icon:t,onToggle:l})=>p("button",{className:"border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer",onClick:l,children:[u(ie,{size:"text-xl",font:"font-medium",children:e}),t?u(Ye,{image:Sa({icon:t}),width:"24",height:"24",asSVG:!0}):null]}),yo=[];const wo=async e=>await V(e,{method:"GET"})||yo,Co=x((({data:e,fieldLabel:t,fieldValue:l,selected:a,placeholder:n="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===a));return u(pe,{options:s,label:i,placeholder:n||a,onChange:e=>r(e.key),value:o})})),ko=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:a=[],selectedBranch:n,onSelectedBranch:r})=>p("div",{className:"flex justify-between gap-4 mb-6",children:[u("div",{className:"max-w-[396px] w-1/2",children:u(Co,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"max-w-[396px] w-1/2",children:u(Co,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:n,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),So=x((({name:e,text:t,value:l,checked:a,onChange:n,className:r})=>u("div",{className:r,children:p("label",{className:"font-sans flex 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:a,onChange:e=>n(e.target.value)}),t?u("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),Io=x((()=>{const[e,t]=a("option2"),l=r((e=>t(e)),[]);return p("div",{children:[u(So,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),u(So,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),To=["От 1 дня","До 365 дней"],$o=x((({days:e,setDays:t})=>p("div",{className:"mb-6",children:[u("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),u(ze,{min:1,max:365,value:e,items:To,onChange:t})]}))),Bo=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:a=[],selectedBoxSize:n,onSelectedBoxSize:r})=>p("div",{className:"flex justify-between mb-6",children:[u("div",{className:"mr-4 w-full",children:u(Co,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"w-full",children:u(Co,{data:a,fieldLabel:"safeBoxCasesSize",selected:n,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ro=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:a,days:n,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"flex-1 mr-9",children:[u(ko,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:a,onSelectedBranch:Mo(c)}),u($o,{days:n,setDays:e=>c({days:e})}),u(Bo,{caseVolumes:o,selectedCaseVolume:r,onSelectedCaseVolume:Vo(c),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),p("div",{className:"flex justify-between items-center mt-5",children:[u(Io,{}),u(le,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),Mo=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Vo=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},jo=x((({days:e,tariffs:t=[]})=>{const l=Lo(e,t);return p("div",{className:"flex flex-col justify-between",children:[p("div",{className:"flex",children:[_o("Аренда за",e,"mr-11"),_o("Цена",l+" ₽")]}),p("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[u(Ye,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),p("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",u("br",{})," листов формата А4"]})]})]})})),_o=(e,t,l="")=>p("div",{className:l,children:[u("div",{className:"text-m-light text-secondary-text mb-1",children:e}),u("span",{className:"text-h3 text-primary-text",children:t})]}),Lo=(e,t)=>{const l=Po(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Po=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},zo=(e,t)=>e.find((e=>e.branchCode===t)),Do=x((e=>{const{regions:t,data:l,branches:a,onChange:r,onClick:i}=e;n((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,r]);const s=zo(a,l.selectedBranch),o=Oo(s?.safeBoxCaseVolumes),c=Ao(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Eo(c,l.selectedBoxSize);return p("div",{className:"flex justify-between align-top mb-6",children:[u(Ro,{...l,regions:t,onClick:i,branches:a,caseVolumes:o,safeBoxCases:c,onChange:r}),u(jo,{days:l.days,tariffs:d})]})})),Oo=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Ao=(e,t)=>e?.find((e=>e.volume===t)),Eo=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Fo=x((({title:e,footnote:t,className:l="",...n})=>{const[i,s]=a(!1),o=r((()=>s((e=>!e))),[]),[c,d]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=_(),h=Ho(c.selectedRegion,m),x=function(e){const{data:t}=R(e?`/api/v1/safeboxes?regionCode=${e}`:null,wo);return t||yo}(h),g=r((e=>d((t=>({...t,...e})))),[d]),b=(f=zo(x,c.selectedBranch)||x,Array.isArray(f)?f.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):f?.gpsLatitude&&f?.gpsLongitude?[[f.gpsLatitude,f.gpsLongitude]]:[]);var f;return p(k,{className:l,...n,children:[p("div",{className:"px-8 py-12",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,u(Do,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&i?u(Is,{points:b,className:"h-[640px]"}):null]})})),Ho=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Uo=e=>Boolean(e?.icon||e?.src),Xo=({styleMap:e,isMainButton:t,version:l})=>(a,n,r)=>{const{label:i,description:s,button:o,items:c,isDotted:d}=a;return p("div",{className:w("relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden",Go(r.length)),children:[p("div",{className:w(o?.text?"mb-8":"","text-center"),children:[i?u("div",{className:"mb-2",children:u(ie,{size:"text-h6",children:i})}):null,p("div",{className:"flex flex-col items-center",children:[s?u("div",{className:e.description,children:s}):null,u(Oa,{className:w(s?`${e.description} mt-0.5`:"text-h6"),items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(le,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(n))},Go=e=>e<5?"w-[276px]":"w-[210px]",Wo={description:"text-white/80 text-l-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"},Ko=x((({className:e="",showLines:t=!0,steps:l=[],buttons:a,size:n="normal",version:r="primary",stepVersion:i="gray",title:s,...o})=>{const c=l.length>3,d=Wo,m=(e=>e?"":"opacity-0")(t),h=(e=>e<5?"px-[88px]":"px-[55px]")(l.length),x=Boolean(a?.every((e=>e?.text)));return p(k,{className:w("box-border py-12",c?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",e),version:r,...o,children:[s?u(T,{headingType:"h4",className:"max-w-[752px] text-center mb-9",title:s}):null,l?.length?p("div",{className:"box-border",children:[u("div",{className:w("flex items-center",h),children:Ji(u("div",{className:w("h-0.5 w-full bg-secondary-light flex-1",m)}))(l.map(Jo(d,n,i)))}),u("div",{className:w("flex justify-between mt-4",c?"gap-x-3":"gap-x-[101px]"),children:l.map((g={styleMap:d,isMainButton:x,version:r},(e,t,l)=>{const{type:a}=e;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Xo(g)(e,t,l);case"rte":return u("div",{className:w("text-center",Go(l.length)),children:u(Us,{__html:e.__html})},String(t));default:return null}}))})]}):null,ht(a,{className:"mt-8"})]});var g})),Jo=(e,t,l)=>({icon:a},n)=>{const r="secondary"===l?"group-data-primary:text-white":"text-secondary-text";return u(k,{className:`${"normal"===t?"h-[100px] w-[100px]":"h-[63px] w-[63px]"} flex justify-center items-center text-center rounded-full p-[26px] box-border z-10`,version:l,children:Uo(a)?u(Ye,{image:Sa(a||{},l),width:"48",height:"48",asSVG:!0}):u("span",{className:w("text-h4","transparent"===l?e.iconText:r),children:n+1})},String(n))},Yo={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},qo={"horizontal-list":"w-6","vertical-list":"h-6"},Zo=x((({containerRef:e,activeIndex:t,dotCount:l=0,listType:a="horizontal-list",version:n})=>l?u("div",{className:w("flex gap-2",Yo[a],n?"group":""),...n?{"data-ver":n}:{},children:new Array(l).fill(null).map(((l,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===t?qo[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),Qo=x((({className:e="",gap:t=14,padding:l=16,showDots:a=!0,minHeight:n,children:r,onVisibleIndicesChange:i,listType:s="horizontal-list",version:o})=>{const c=Array.isArray(r)?r.length:0,[d,m]=sa({itemCount:c,onVisibleIndicesChange:i}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===s?"relative h-full":""),children:[u(la,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:t,padding:l,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:s,minHeight:n,children:r}),a?u(Zo,{containerRef:d,activeIndex:h,dotCount:c,listType:s,version:o}):null]})})),ec=x((({listType:e,showDots:t,options:l,version:a,...n})=>u(k,{version:a,...n,children:u(Qo,{listType:e,showDots:t,version:a,children:Zl({...n,options:l})})})));ec.childrenTypes={exclude:["SwipeListControlBlock"]};const tc="h-12 flex-1 flex items-center justify-center cursor-pointer",lc="font-sans text-m text-center",ac="text-white",nc="text-secondary-text group-hover/btn:text-primary-main",rc="text-primary-main",ic={div:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${tc} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${tc} group/btn bg-white`},default:{active:`${tc} bg-primary-main text-white whitespace-nowrap`,default:`${tc} group/btn bg-white whitespace-nowrap`}},text:{scrollable:{active:"h-full border-0 border-b-2",default:""},default:{active:"",default:""}}},sc={link:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${tc} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${tc} group/btn bg-white`},default:{active:`${tc} bg-primary-main text-white`,default:`${tc} group/btn bg-white`}},text:{scrollable:{active:`${lc} flex items-center h-full border-0 border-b-2 text-primary-main`,default:`${lc} ${nc}`},default:{active:`${lc} text-white`,default:`${lc} ${nc}`}}},oc=(e,t,l)=>{const a=t?"active":"default";return ic[e][l?"scrollable":"default"][a]},cc=(e,t,l)=>{const a=t?"active":"default";return sc[e][l?"scrollable":"default"][a]},dc=x((e=>{const{tab:t,currentTab:l,onClick:a,isScrollable:n=!1}=e,r="link"===l?.type&&l.href===t.href,i=X()(t);return u("a",{role:"tab",className:cc("link",r,n),target:t.target,href:i.href,onClick:e=>{i.onClick(e),a(t)},children:u("span",{className:cc("text",r,n),children:t.text})})})),mc=(e,t,l)=>e?u("h3",{className:l?`${lc} ${t?rc:nc}`:`${lc} ${t?ac:nc}`,children:e}):null,hc=(e,t,l)=>e&&t?u("div",{className:"min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center "+(l?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover/btn:text-primary-main"),children:t}):null,uc=({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n=!1})=>(r,i)=>{const s=r.type;if("group"!==s&&"link"!==s)return null;switch(s){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n=!1})=>(r,i)=>{const s=t===r,o=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return u("div",{className:oc("div",s,n),role:"tab","aria-selected":s,onClick:()=>a(r),children:p("div",{className:`flex flex-1 items-center justify-center ${oc("text",s,n)}`,children:[mc(r.title,s,n),hc(l,o,s)]})},`group-${String(i)}`)})({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n})(r,i);case"link":return u(dc,{tab:r,currentTab:t,isScrollable:n,onClick:a},String(i));default:wr(s)}return null},pc=x((e=>{const{tabs:t,onClick:l,currentTab:a,page:n,showCounter:r}=e,[i,s]=sa({itemCount:t?.length||0,isCyclic:!1});return p("div",{className:"relative max-w-full m-auto",children:[u("div",{className:"font-sans max-w-full w-full overflow-hidden relative bg-white",children:u(la,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,children:t?.map(uc({onClick:l,currentTab:a,showCounter:r,page:n,isScrollable:!0}))})}),s.canScrollLeft?u(Vt,{className:"absolute z-50 top-0 left-6",onClick:s.scrollLeft}):null,s.canScrollRight?u(jt,{className:"absolute z-50 top-0 rotate-180 right-6",onClick:s.scrollRight}):null]})})),xc=x((e=>{const{className:t="",tabs:l,showCounter:i,isSticky:s,tabsMode:o,...c}=e,[d,m]=a(l?l[0]:void 0);n((()=>{l&&l[0]&&gc(l[0])}),[]),n((()=>{"group"===d?.type&&f.subject("tab",{type:d.type,label:d.ref})}),[d]);const h=r((e=>{gc(e),m(e)}),[]);return u(k,{className:`relative box-border flex gap-x-1 w-full ${s?"sticky top-1 z-20":""} ${t}`,role:"tablist",...c,children:"scrollable"===o?u(pc,{tabs:l,onClick:h,currentTab:d,showCounter:i,...c}):l?.map(uc({onClick:h,currentTab:d,showCounter:i,...c}))})})),gc=e=>{"group"===e.type&&f.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&f.fire("tab",{type:e.type,label:e.href})},bc=x((({isOpen:e,onClick:t})=>p(le,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[u("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),u(me,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),fc={Buttons:({buttons:e})=>ht(e,{buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Ye,{image:e}):null,List:({isDotted:e,...t})=>u(Oa,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?u("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:x((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:a,isOpen:n})=>e?u(bc,{isOpen:n,onClick:()=>{t({dataUrl:l,pdfUrl:a})}}):null))},vc=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,m]=a(!0);n((()=>{t===i&&r||m(!0)}),[r,i]);return p("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?u("div",{className:"h-5"}):null,Nc({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{m(!1),s(t),l(e)},isVisible:d}})]},String(c))},Nc=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...a}=e;if(!l||!(l in fc))return null;return u(fc[l],{...t,...a})},yc=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:a,tableInner:n,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>u("div",{className:"first:pl-0 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0",role:"cell",children:e?.length?e.map(vc({rowIdx:t,cellIdx:l,setTableInner:a,tableInner:n,openTableInnerIdx:r,setOpenTableInnerIdx:i})):null}))),wc=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,a]=Rt({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map(Cc(l)),_t({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),Cc=e=>(t,l)=>{if(!t?.length)return null;const[a,...n]=t,r=[...Array(e).keys()].reduce(((e,t)=>140*(n?.[t]?.cols?.length??1)+e),0),i=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return p("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[a?.data?u("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:a.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${r}px)`},children:n?.map(((t,l)=>p("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?u("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?kc(t.cols,e):null]},`row${l}`)))})})]},String(l))},kc=(e,t)=>e?.length>0?u("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>u("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,Sc=x((({activeTabIndex:e,items:t})=>{const[l,n]=a({}),i=r((e=>n((t=>({...t,[e]:!t[e]})))),[]);return u("div",{children:t.map(((t,a)=>{const n=`activeTabIdx:${e}-tableIdx:${a}`;return p("div",{className:"w-full",children:[p("div",{className:"flex p-4 bg-gray text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>i(n),children:[t.title,u(Ye,{image:{icon:l[n]?"PlusIcon":"MinusIcon"},className:"absolute right-[22px]",width:"24",height:"24"})]}),u("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[n]?"h-0":""),children:u("div",{className:"relative",children:u(wc,{rows:t.rowsData})})})]},n)}))})})),Ic=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:a})=>p("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>a(t),children:e||t+1},e)))}):null,t?u(le,{href:t,version:"secondary",target:"_blank",appendLeft:u(me,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20",asSVG:!0}),text:"Скачать в PDF"}):null]})));async function Tc(e){const t=await fetch(e);return await t.json()}const $c=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:n}=function(e){const{data:t}=R(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Tc);return t||{}}(e),[i,s]=a(0),o=r((e=>s(e)),[]),c=n?.[i]?.items??[],d=n?.map((e=>e.currency??""));return p("div",n?{className:"bg-white z-10",children:[u(Ic,{currencies:d,activeTabIndex:i,setActiveTabIndex:o,linkToPDF:t}),u(Sc,{activeTabIndex:i,items:c}),u(bc,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(bc,{onClick:l,isOpen:!0})]})})),Bc=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:"flex",children:e}),t?u("div",{className:"origin-top animate-expansion",children:u($c,{...t,onClick:l})}):null]}))),Rc=x((({row:{header:e,data:t},activeIndex:l,rowIdx:n,...i})=>{const[s,o]=a(void 0),c=r((e=>o(e)),[]),[d,m]=a(void 0),h=r((e=>m(e)),[]);return p(Bc,{onHideContentClick:()=>o(void 0),tableInner:s,...i,children:[u("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:p("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?u(Ye,{className:"mr-3.5 max-w-6 max-h-6",image:Sa(e.icon),width:"24px",height:"24px",asSVG:!0}):null,e?.title?u("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?u(bn,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(yc,{cells:e,rowIdx:n,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...i},String(t))))}):null]})})),Mc=x((({className:e="",title:t,description:l,rowHeaders:a,tariffsColumns:n,hiddenRowsNum:r=0,...i})=>{const s=n?.map((({data:e})=>e))||[],o=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Rt({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(Rc,{row:e,activeIndex:d,rowIdx:t,...i},String(t)))),[x,g]=r>0?[h.slice(0,-r),h.slice(-r)]:[h,[]];return p(k,{className:`p-12 overflow-hidden relative ${c>1?"pr-0":""} ${e}`,...i,children:[Vc({title:t,description:l}),jc(l),r>0?u(ln,{renderFoldableSection:({isUnfolded:e})=>p(_c,{controls:m,children:[x,u(an,{isUnfolded:e,children:g})]}),renderFoldButton:rr}):u(_c,{controls:m,children:h})]})}));function Vc({title:e,description:t}){return e?u(T,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function jc(e){return e?u("div",{className:"mb-9 text-center text-l",children:e}):null}const _c=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative",children:[e,_t({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Lc=x((({className:e="",title:t,description:l,iconVersion:a,image:n,__html:r,...i})=>p(k,{className:`px-9 py-4 flex gap-3 bg-white group-data-secondary:bg-primary-main/10' ${e}`,...i,children:["small"===a?u("div",{className:"mt-1",children:Pc()}):null,"big"===a?zc(n):null,p("div",{children:[t?Dc(t):null,l?u("div",{className:"mt-1",children:Oc(l)}):null,r?u(Us,{__html:r}):null]})]}))),Pc=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),zc=e=>e?.src?u(Ye,{image:e}):null,Dc=e=>u(ie,{size:"text-l",font:"font-medium",color:"text-primary-text group-data-secondary:text-white",children:e}),Oc=e=>u(re,{size:"text-s",color:"text-secondary-text group-data-secondary:text-white",children:e}),Ac=x((e=>{const{tags:t,className:l=""}=e;return t?.length?u("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Ec)}):null})),Ec=(e,t)=>u("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-gray",children:e},String(t)),Fc=x((({title:e,headingType:t="h3",__html:l,items:a,buttons:n,image:r,isDotted:i=!0,listItemSize:s="M",className:o="",tags:c,children:d,...m})=>u(k,{className:`overflow-hidden p-9 pr-3 box-border ${Ys(o)} ${ms(o)} ${o}`,...m,children:p(Ta,{title:e?u(T,{headingType:t,as:"h2",title:e,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:ht(n,{className:"mt-8",buttonClassName:"min-w-[158px]"}),image:r?.src?u(Ye,{className:"mt-auto ml-7",image:r}):null,children:[l?u("div",{className:"max-w-[600px] mt-2.5",children:u(Us,{__html:l})}):null,d,u(Oa,{className:"mt-2.5",itemClassName:"mb-1.5",items:a,isDotted:i,listItemSize:s}),c?.length?u(Ac,{tags:c,className:"mt-5"}):null]})}))),Hc={stretch:"items-stretch",left:"items-start",center:"items-center",right:"items-end"},Uc=x((({className:e="",gap:t="",align:l="stretch",isPadding:a=!1,isInnerPadding:n=!0,version:r="transparent",isTheme:i=!1,...s})=>{const o=n?"":"!p-0";return u(k,{className:w("flex flex-col [&>*]:max-w-full",a?"p-12":"",Ai[t],l&&Hc[l],e),version:r,isTheme:i,...s,children:Zl({...s,renderProps:(e,t)=>Jl(e,t,{className:o})})})}));Uc.childrenTypes=[];const Xc=e=>ds(e)<10?"py-6 px-11":"py-12 px-32",Gc=x((({className:e,title:t,url:l,previewImg:a,...n})=>{const r=U();return p(k,{className:w(Xc(e),e),...n,children:[u(bt,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:F(r)(a?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:F(r)(l)})}):null]})})),Wc={ApplicationForm:it,BenefitsBlock:st,Bonus:ft,BonusBenefitsBlock:Ct,BusinessBlock:$t,ButtonBlock:Bt,Calculator:Ol,CardTransfer:Gl,Carousel:ha,CarouselBankHistoryCard:pa,CarouselCard:Na,CarouselCatalogCard:wa,CarouselEventCard:Ia,CarouselInvestmentCard:Ba,CarouselLinks:ja,CarouselProductCard:Aa,CarouselProgramsCard:Ga,CarouselRecommendationCard:en,CarouselTariffsCard:nn,ComparisonTable:$n,ContactsBlock:Rn,ErrorBlock:_n,ExchangeRateTile:lr,Filtration:ur,Footer:ti,GracePeriod:li,Header:Oi,Headline:bt,HorizontalLayout:Ei,ImgBlock:Fi,InsuranceAmountBlock:Wi,InvestmentInfo:Zi,LinkDocs:cs,MobileAppTile:hs,OfficeMap:Ds,OfficeServicesBlock:Os,ParagraphBlock:Es,PictureText:Gs,Placeholder:qs,ProductBlock:so,ProductGallery:oo,ProductTile:uo,PromoTile:xo,RichTextBlock:bo,RollupItem:fo,SafeDepositRental:Fo,StepsBlock:Ko,SwipeListControlBlock:ec,Tabs:xc,TariffsTable:Mc,TextBlock:Lc,Tile:Fc,VerticalLayout:Uc,Video:Gc};const Kc=["Header","Footer"],Jc=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Yc(e=globalThis){const t=s(new Map);n((()=>y.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),n((()=>{const l=((e,t=600)=>{let l;const a=(...n)=>{a.dispose(),l=setTimeout((()=>{e(...n)}),t)};return a.dispose=()=>{l&&clearTimeout(l)},a})((()=>{!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])=>!Kc.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?ol(Jc)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const qc=h();const Zc=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:Qc()}))),Qc=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"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"}),u("path",{...e,d:"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"})]})},ed=x((({className:e=""})=>{const t=function(e){const[t,l]=a(0);return n((()=>{(async()=>{const[t]=await qc.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:r((async()=>{l(await qc.like(e))}),[e]),dislike:r((async()=>{l(await qc.dislike(e))}),[e])}}(U().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e}`,children:[u(Zc,{onClick:H(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(Zc,{onClick:H(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),td=x((e=>{const{className:t="",blocksRegistry:l,blockDecorator:a,data:n={}}=e,{style:r,blocks:i,slots:s,likeControl:o,colorPalette:c="pc"}=n,d={key:"",page:n,blocksRegistry:l,blockDecorator:a,parent:n};Yc();const[m,{setTrue:h,setFalse:x}]=_r();return Cr({onOpen:h,onClose:x}),p("section",{className:w("relative",r,t,m?"overflow-hidden h-screen":""),"data-theme":c,children:[s?.header?u("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:ql(s?.header,{...d,slotName:"header"})}):null,p("div",{className:"container grid grid-cols-12 gap-1",children:[ql(i,d),s?.footer?ql(s?.footer,{...d,slotName:"footer"}):null]}),o?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(ed,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));td.childrenTypes=[],td.slots=()=>["header","footer"];e.Blocks=Wc,e.ContentPage=td,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=H,e.joinList=Ji,e.packageVersion="0.9.13",e.projectSettings=c,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=E,e.useRouter=U,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),a=l("useState"),n=l("useEffect"),r=l("useCallback"),i=l("useMemo"),s=l("useRef");const o={PROD_BRANCH:"master"},c=new class{_=o;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||o.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 FOOTER(){return this._.FOOTER}get CHAT_BOT(){return this._.CHAT_BOT}get CDN(){return d(this._.CDN)}get BASE_PATH(){return d(this._.BASE_PATH)}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},d=e=>e&&!e.endsWith("/")?`${e}/`:e,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/${c.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:a}=await e.json();return a||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:n}=await e.json();return n||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:a}=await e();try{const e=await fetch(`/assist/v1/public/projects/${c.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:a},body:JSON.stringify({node_id:t,user_name:a})}),{likes:n}=await e.json();return n||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:a,...n}=t||{},r=l?.slots?.default,i=a||r&&r();return e(Object.assign(n,i&&{children:i}),l)}return t.inheritAttrs=!1,t};class b{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 f=new b;function v(e,{sensitivity:t,rootRef:l}={}){const a=s(null),r=i((()=>({threshold:N(t),root:l?.current})),[t,l?.current]);return n((()=>{if(!a.current)return;const t=new IntersectionObserver(e,r);return t.observe(a.current),()=>{t.disconnect()}}),[e,r]),a}function N(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 y=new b;const w=(...e)=>e.flatMap((e=>e)).filter(Boolean).join(" "),C={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},k=x((({className:e="",version:t="primary",isTheme:l=!0,block:i,tag:s="section",role:o,children:c})=>{const d=s,m=function(e){return v(r((t=>{if(!e||!t?.length)return;const l=t[t.length-1];y.fire("intersection",{block:e,intersection:l})}),[e]),{sensitivity:1})}(i),[h,p]=a(!1);return n((()=>f.subscribe("tab",(e=>{p(Boolean(e.label&&i?.labels?.length&&!i.labels.includes(e.label)))}))),[i]),u(d,{className:w(S(Boolean(t&&l)),C[t],h?"hidden":"",e),...t&&l?{"data-ver":t}:{},...i?.anchor?{id:i.anchor,ref:m}:{},role:o,children:c})})),S=e=>e?"group":"",I={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},T=x((({className:e="",headingType:t="h3",as:l="h3",title:a,children:n})=>u(l,{className:`font-sans m-0 ${I[t]} ${e}`,children:a||n}))),$=x((({className:e="",inputClassName:t="",id:l,name:a,type:n="text",label:i,value:s="",valid:o=!0,children:c,onChange:d,onBlur:m,...h})=>{const x=r((e=>{const t=e.target.validity.valid?e.target.value:s;d(t)}),[d]),g=r((e=>{if(!m)return;const t=e.target.validity.valid?e.target.value:s;m(t)}),[m]),b=c?"pr-8":"",f=o?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return p("div",{className:`relative ${e}`,children:[i?u("label",{className:"block text-m-light mb-2",children:i}):null,u("input",{className:`w-full border rounded-md text-primary-text outline-none p-4 ${b} ${f} ${t}`,id:l,name:a||l,type:n,value:s,onChange:x,onBlur:g,...h}),c]})})),B=new Map;function R(e,t,{fallback:l}={}){const r=i((()=>M(e)),[e]),[s,o]=a(),[c,d]=a(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};n((()=>{if(!r.every((e=>null===e)))try{const e=t(...r);"then"in e?(e=>{e.then((e=>B.get(r)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...r]);const u=r[0],p=l&&"string"==typeof u&&l[u];return{data:!s&&p?p:s,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function M(e){return e?Array.isArray(e)?e:e instanceof Function?M(e()):[e]:[e]}async function V(e,t){try{return e?await j(e,t):null}catch(e){console.error(e)}return null}async function j(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}function _(){const{data:e}=R("/api/v1/regions",j);return e||[]}const L=[{name:"Торговый эквайринг"},{name:"Мобильный эквайринг"},{name:"Интернет-эквайринг"},{name:"QR-эквайринг (СБП)"},{name:"Все виды эквайринга"}],P=(e="")=>({open:t=>f.fire("dialog",{type:"open",id:e,message:t}),close:()=>f.fire("dialog",{type:"close"})}),z=e=>Boolean(e?.includes(":")),D=(e,t)=>Boolean(e&&!z(e)&&(!t||"_self"===t)),O=e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),A=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/");var E=Object.freeze({__proto__:null,isURL:z,isLocalURL:D,isHash:e=>Boolean(e?.startsWith("#")),withoutQuery:O,joinPath:A});const F=e=>t=>{if(!t||z(t)||c.CDN&&t.startsWith(c.CDN))return t;const l=t.startsWith("/");return A(c.BASE_PATH,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},H=(e,t)=>H._impl(e,t);function U(){return U._impl()}function X(e=!1){const t=U(),{close:l}=P();return l=>({...l,href:e?l.href:F(t)(l.href),"aria-label":l.text,onClick:H(a(l),l)});function a({href:a,target:n,onClick:r}){return i=>{r&&r(i),a&&!e&&D(a,n)&&(l(),i?.preventDefault(),t.push(a))}}}H._impl=e=>e,H.setup=e=>{H._impl=e},U._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),U.setup=e=>{U._impl=e};const G={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:"",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},W="bg-main-divider text-main-disabled",K={primary:W,secondary:W,white:W,link:"",transparent:"",gray:W,"":""},J="text-center font-sans select-none",Y={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:"",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},q=x((e=>{const{text:t,aboveText:l,appendLeft:a,appendRight:n,version:r="primary"}=e;return p("div",{className:Z(e),children:[a?u("div",{className:Y[r],children:a}):null,Q(e)?p("div",{children:[l?u("div",{className:"text-xs-light text-left",children:l}):null,u("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,n?u("div",{className:Y[r],children:n}):null]})})),Z=e=>{const{version:t,aboveText:l,rounded:a}=e;if("link"===t)return"";const n="gap-2 "+(l?"py-2.5 px-7":"py-4 px-4");return["group/btn flex items-center justify-center",Q(e)?n:"h-12 w-12",a?"rounded-full":""].join(" ")},Q=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),ee=({className:e,rounded:t,version:l})=>["inline-block",J,l?K[l]:"",t?"rounded-full":"rounded-md",e].join(" "),te=({className:e,rounded:t,version:l})=>[J,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",l?G[l]:"",t?"rounded-full":"rounded-md",e].join(" "),le=x((({disabled:e,children:t,...l})=>{const a=X()(l),n=t??u(q,{...a});return u(e?ne:ae,{...a,children:n})})),ae=x((({className:e="",href:t,rel:l,target:a,ariaLabel:n,version:r,rounded:i,onClick:s,children:o})=>u("a",{className:te({className:e,version:r,rounded:i}),href:t,rel:l,target:a,"aria-label":n,role:t?"link":"button",onClick:s,children:o}))),ne=x((({className:e,ariaLabel:t,version:l,rounded:a,children:n})=>u("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:ee({className:e,rounded:a,version:l}),children:n}))),re=x((({children:e,...t})=>u("p",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),ie=x((({children:e,...t})=>u("span",{className:["font-sans",...Object.values(t)].join(" "),children:e}))),se=x((({link:e})=>p(re,{size:"text-s-light",color:"text-secondary-text",children:[u(ie,{children:"Нажимая кнопку, вы подтверждаете согласие с "}),e?u(le,{href:e.href,ariaLabel:"условия передачи данных",target:e.target,className:"text-primary-main",children:u(ie,{children:e.text})}):null]}))),oe=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e;function ce(e){const t=s(null);return n((()=>{const l=l=>{t&&t.current&&l.target instanceof Node&&!t.current.contains(l.target)&&e()};return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[e]),t}const de={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},me=x((({className:e="",imageClassName:t="",name:l="",alt:a=`Иконка ${l}`,title:n=a,iconVersion:r="color",asSVG:i,...s})=>{const o=U(),d=F(o)(A(c.CDN,"/icons",`${l}.svg`));return i&&"normal"!==r?u(ue,{className:e,children:p("svg",{className:w(he(s.width),de[r],"white"===r?"invert":"",t),...s,"aria-hidden":"true",children:[n?u("title",{children:n}):null,a?u("desc",{children:a}):null,u("use",{href:`${d}#icon`,xlinkHref:`${d}#icon`})]})}):(e.includes("h-")||(s.style={height:`${s.height}px`}),u("img",{className:e,src:d,alt:a,title:n,"aria-hidden":"true",...s}))})),he=e=>e?"":"w-full h-full",ue=x((({className:e,children:t})=>e?u("div",{className:e,children:t}):t)),pe=x((({className:e="",isBorder:t=!0,label:l,options:i=[],value:s,onChange:o,placeholder:c=""})=>{const[d,m]=a(i[0]||{key:"",text:""}),[h,x]=a(!1),g=ce(r((()=>x(!1)),[]));return n((()=>{m(s||{key:"",text:""})}),[s]),p("div",{className:`${e}`,ref:g,children:[l?u("div",{className:"mb-2",children:u(ie,{size:"text-m",color:"text-primary-text",font:"font-light",children:l})}):null,p("div",{className:"relative "+(h?"z-20":"z-10"),children:[p("div",{className:`text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer\n ${be(t)}`,onClick:()=>x(!h),children:[u("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:d?.text||c}),u(me,{name:"ArrowUpIcon",width:"16",height:"16",className:"absolute right-3 "+(h?"":"rotate-180")})]}),i?.length?u("div",{className:`h-0 ${xe(h)}`,children:u("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:i.map(ge((e=>{m(e),x(!1),o(e)}),h,(e=>Boolean(e.key===d.key))))})}):null]})]})})),xe=e=>e?"":"overflow-hidden",ge=(e,t,l)=>(a,n)=>p("div",{onClick:()=>{e(a)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[u("span",{className:"min-h-6",children:a.text}),u(me,{name:"DoneSimpleIcon",width:"16",height:"16",className:["absolute right-4 pt-0.5",l(a)&&t?"":"hidden"].join(" ")})]},String(n)),be=e=>e?"border border-gray rounded-md hover:border-primary-hover":"",fe=x((({data:e,fieldLabel:t,fieldValue:l,selected:a,placeholder:n="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===a));return u(pe,{options:s,label:i,placeholder:n||a,onChange:e=>r(e.key),value:o})})),ve=({acquiringType:e,regions:t,region:l,handleChange:a})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(fe,{data:L,fieldValue:"name",fieldLabel:"name",selected:e,setSelected:e=>a({acquiringType:e}),label:"Вид эквайринга",placeholder:"Выберите эквайринг"})}),u("div",{className:"w-1/2",children:u(fe,{data:t,fieldValue:"code",fieldLabel:"name",selected:l,setSelected:e=>a({region:e}),label:"Адрес",placeholder:"Выберите адрес"})})]}),Ne=x((({value:e=!1,text:t,type:l="checkbox",onChange:a})=>p("div",{role:l,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-4",onClick:()=>a&&a(!e),children:[u("div",{className:"relative flex-shrink-0 duration-300 w-9 h-5 mr-3 rounded-2xl "+(e?"bg-primary-main":"bg-main-divider"),children:u("div",{className:"absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full "+(e?"left-[50%]":"left-[5%]")})}),u("div",{children:u(ie,{size:"text-m",font:"font-light",color:"text-primary-text",children:t})})]}))),ye=({"onlineСheckout":e,posTerminal:t,handleChange:l})=>p("div",{className:"mb-5",children:[u(Ne,{value:e,text:"Хочу купить онлайн-кассу",onChange:()=>l({"onlineСheckout":!e})}),u(Ne,{value:t,text:"Хочу купить POS-терминал",onChange:()=>l({posTerminal:!t})})]}),we=(e,t)=>{const l=te({className:"text-white",version:e?.version});return u("button",{type:"submit",className:`p-4 ${l} ${t}`,children:e?.text?e.text:"Отправить заявку"})},Ce=({setFormState:e})=>({handleChange:r((t=>e((e=>({...e,...t})))),[])}),ke=x((e=>{const{button:t,link:l,handleSubmit:r}=e,[i,s]=a({acquiringType:"",region:"",fullName:"",inn:"",name:"",phone:"","onlineСheckout":!1,posTerminal:!1}),{acquiringType:o,region:c,fullName:d,inn:m,name:h,phone:x,"onlineСheckout":g,posTerminal:b}=i,f=_(),{handleChange:v}=Ce({setFormState:s}),N=oe(c,f);n((()=>{s((e=>({...e,acquiringType:L?.length&&L[0]?.name?L[0].name:""})))}),[]);return p("form",{onSubmit:async e=>{e.preventDefault();const t=`Вид эквайринга=${o}/Онлайн касса=${g}/POS-терминал=${b}`;r&&await r({typeForm:"acqr",region:f.find((e=>e.code===N))?.name||"",partnerComments:t,fullName:d,inn:m,name:h,phone:x})},className:"container",children:[u(T,{headingType:"h6",title:"Вид эквайринга и регион",className:"text-center mb-4"}),ve({acquiringType:o,regions:f,region:N,handleChange:v}),u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Se({fullName:d,inn:m,name:h,phone:x,handleChange:v}),ye({"onlineСheckout":g,posTerminal:b,handleChange:v}),we(t,"mb-4"),u(se,{link:l})]})})),Se=({fullName:e,inn:t,name:l,phone:a,handleChange:n})=>p("div",{className:"flex justify-between gap-5 mb-5",children:[p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>n({fullName:e})}),u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:l,onChange:e=>n({name:e})})]}),p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text",label:"ИНН","aria-label":"ИНН",value:t,onChange:e=>n({inn:e})}),u($,{className:"shrink-0 text-l w-full",type:"text",label:"Телефон","aria-label":"Телефон",value:a,onChange:e=>n({phone:e})})]})]}),Ie=x((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({region:"",name:"",phone:"",inn:"",mail:""}),{region:s,name:o,phone:c,inn:d,mail:m}=r,h=_(),{handleChange:x}=Ce({setFormState:i}),g=oe(s,h);return p("form",{onSubmit:async e=>{e.preventDefault(),n&&await n({typeForm:"bcrd",region:h.find((e=>e.code===g))?.name||"",name:o,phone:c,inn:d,mail:m})},className:"container",children:[$e({regions:h,region:g,handleChange:x}),Te({name:o,phone:c,inn:d,mail:m,handleChange:x}),we(t,"mb-4"),u(se,{link:l})]})})),Te=({name:e,phone:t,mail:l,inn:a,handleChange:n})=>p("div",{className:"flex justify-between gap-5",children:[p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:e,onChange:e=>n({name:e})}),u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"ИНН",label:"ИНН",value:a,onChange:e=>n({inn:e})})]}),p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Телефон",label:"Телефон",value:t,onChange:e=>n({phone:e})}),u($,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:l,onChange:e=>n({mail:e})})]})]}),$e=({regions:e,region:t,handleChange:l})=>u("div",{className:"flex justify-between gap-5 mb-5",children:u("div",{className:"w-full",children:u(fe,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:e=>l({region:e}),label:"Регион",placeholder:"Выберите регион"})})}),Be=[];const Re=async e=>await V(e,{method:"GET"})||Be,Me=["От 50 000 ₽","До 3 000 000 ₽"],Ve=["От 1 года","До 5 лет"],je=({regions:e,region:t,branches:l,department:a,handleChange:n})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u(fe,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:e=>n({region:e}),label:"Регион",placeholder:"Выберите регион"})}),u("div",{className:"w-1/2",children:u(fe,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:e=>n({department:e}),label:"Адрес",placeholder:"Выберите адрес"})})]}),_e=e=>new Intl.NumberFormat("ru-RU",{}).format(e),Le=(e,t,l)=>Math.max(t,Math.min(e,l)),Pe=e=>e.split(/\s+/).join(""),ze=x((({className:e,title:t,items:l=[],min:a=1,max:n=100,step:r=1,value:i=a,disabled:s=!1,onChange:o})=>{const c=e=>{o&&o(Le(Number(Pe(e.target.value)),a,n))},d={backgroundSize:`${(100*(i-a)/(n-a)).toFixed(2)}% 100%`};return p("div",{className:e,children:[p("label",{className:"block relative",children:[t?u("span",{className:"text-m-light text-primary-text",children:t}):null,u("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md\n outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-text disabled:border-gray disabled:bg-main-divider",value:_e(i),disabled:s,onChange:c,onBlur:c}),u("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:a,max:n,step:r,value:i,disabled:s,onChange:c,style:d})})]}),De(l)]})}));function De(e){return u("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>u("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}const Oe=e=>p("div",{className:"w-1/2",children:[u("label",{children:u(ie,{size:"text-m-light",children:e.label})}),u(ze,{...e})]}),Ae=({amount:e,term:t,handleChange:l})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[Oe({label:"Сумма кредита, ₽",value:e,onChange:e=>l({amount:e}),min:5e4,max:3e6,items:Me}),Oe({label:"Срок кредита, месяцев",value:t,onChange:e=>l({term:e}),min:1,max:60,items:Ve})]}),Ee=({fullName:e,inn:t,name:l,phone:a,mail:n,annualRevenue:r,handleChange:i})=>p("div",{className:"flex justify-between gap-5 mb-7",children:[p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>i({fullName:e})}),u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"ИНН",label:"ИНН",value:t,onChange:e=>i({inn:e})}),u($,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Телефон",label:"Телефон",value:a,onChange:e=>i({phone:e})})]}),p("div",{className:"w-1/2",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Годовая выручка, ₽",label:"Годовая выручка, ₽",value:r,onChange:e=>i({annualRevenue:e})}),u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Контактное лицо",label:"Контактное лицо",value:l,onChange:e=>i({name:e})}),u($,{className:"shrink-0 text-l w-full ",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:n,onChange:e=>i({mail:e})})]})]}),Fe=x((e=>{const{button:t,link:l,handleSubmit:r}=e,[i,s]=a({amount:5e4,term:1,fullName:"",inn:"",name:"",phone:"",mail:"",region:"",department:"",annualRevenue:""}),{amount:o,term:c,fullName:d,inn:m,name:h,phone:x,mail:g,region:b,department:f,annualRevenue:v}=i,N=_(),{handleChange:y}=Ce({setFormState:s}),w=oe(b,N),C=function(e){const{data:t}=R(e?`/api/v1/branches?regionCode=${e}`:null,Re);return t||Be}(w).filter((e=>e.address));n((()=>{y({department:""})}),[i.region,y]);return p("form",{onSubmit:async e=>{e.preventDefault();const t=`Сумма=${o}/Срок=${c}/Выручка=${v}`;r&&await r({typeForm:"cred",fullName:d,inn:m,name:h,phone:x,mail:g,region:N.find((e=>e.code===w))?.name||"",department:C.find((e=>e.branchCode===f))?.address||"",partnerComments:t})},className:"container",children:[u(T,{headingType:"h6",title:"Параметры кредита",className:"text-center mb-4"}),Ae({amount:o,term:c,handleChange:y}),u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),Ee({fullName:d,inn:m,name:h,phone:x,mail:g,annualRevenue:v,handleChange:y}),u(T,{headingType:"h6",title:"Офис Банка",className:"text-center mb-4"}),je({regions:N,region:w,branches:C,department:f,handleChange:y}),we(t,"mb-4"),u(se,{link:l})]})})),He=x((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({name:"",phone:""}),{name:s,phone:o}=r,{handleChange:c}=Ce({setFormState:i});return p("form",{onSubmit:async e=>{e.preventDefault(),n&&await n({typeForm:"dpst",name:s,phone:o})},className:"container",children:[u(T,{headingType:"h6",title:"Оставьте заявку и мы ответим на любые вопросы по депозитам",className:"text-center mb-4"}),Ue({name:r.name,phone:r.phone,handleChange:c}),p("div",{className:"flex justify-between items-center max-w-[560px] m-auto",children:[u("div",{className:"flex-1",children:u(se,{link:l})}),we(t)]})]})})),Ue=({name:e,phone:t,handleChange:l})=>p("div",{className:"max-w-[560px] m-auto",children:[u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Имя",label:"Имя",value:e,onChange:e=>l({name:e})}),u($,{className:"shrink-0 text-l w-full mb-5",type:"text","aria-label":"Телефон",label:"Телефон",value:t,onChange:e=>l({phone:e})})]}),Xe=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Ge=x((({className:e="",image:t,imageClassName:l="",isMobile:a=!1,pathPrefix:n})=>{const r=U();return p("picture",{className:`${a?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Xe).map((({src:e,format:l,media:a},i)=>u("source",{srcSet:Ke(r,n)(e),type:Je(l),media:a?`(max-width: ${a}px)`:"",...t.size},`${i}_${e}`))):null,t?.src?We({...t,src:Ke(r,n)(t.src)},l,a):null]})})),We=(e,t="",l=!1)=>{const a={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},n=e.title||"",r=e.alt||e.title,i=l?"m-auto":"m-0";return u("img",{src:e.src,className:`${i} ${t}`,alt:r,title:n,style:a,...e.size})},Ke=(e,t)=>l=>l&&!z(l)?F(e)(A(t,l)):l,Je=e=>e?`image/${String(e)}`:void 0,Ye=x((({className:e="",image:t,imageClassName:l="",isMobile:a,pathPrefix:n,...r})=>t?.src||t?.icon?t.icon?u(me,{className:e,imageClassName:l,iconVersion:t?.iconVersion||"normal",name:t.icon,...r}):u(Ge,{className:e,imageClassName:l,image:t,isMobile:a,pathPrefix:n}):null)),qe=x((({className:e,viewBox:t,fill:l="none",width:a,height:n,paths:r,...i})=>u("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:a,height:n,children:r.map((({d:e,fill:t,...l},a)=>u("path",{d:e,fill:t||"currentColor",...i,...l},a)))}))),Ze=[{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"}],Qe=x((({className:e,text:t,checked:l,disabled:a,isRadio:n,onChange:r})=>u("div",{className:e,children:p("label",{className:"flex items-center relative cursor-pointer group/box",children:[u("input",{className:w("peer appearance-none w-5 h-5 border-solid cursor-pointer checked:border-primary-main m-0",n?"rounded-full border-2":"rounded checked:bg-primary-main disabled:bg-main-disabled border",l?"border-black":"border-gray",a?"":"group-hover/box:border-primary-hover"),type:"checkbox",onChange:e=>r&&r(e.target.checked),checked:l,disabled:a}),n?u("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):u(qe,{paths:Ze,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?u("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})}))),et=({currencyControl:e,documentaryOperations:t,conversionOperations:l,text:a,handleChange:n})=>p("div",{className:"mb-6",children:[p("div",{className:"flex items-center mb-4 gap-6",children:[u(Qe,{text:"Валютный контроль",checked:e,onChange:e=>n({currencyControl:e})}),u(Qe,{text:"Документарные операции",checked:t,onChange:e=>n({documentaryOperations:e})}),u(Qe,{text:"Конверсионные операции",checked:l,onChange:e=>n({conversionOperations:e})})]}),u("textarea",{placeholder:"Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка",className:"block w-full resize-y min-h-24 p-4 outline-none border rounded-md border-main-stroke hover:border-primary-hover active:focus:border-primary-text",value:a,onChange:e=>n({text:e.target.value})})]}),tt=x((e=>{const{button:t,link:l,handleSubmit:n}=e,[r,i]=a({fullName:"",name:"",phone:"",mail:"",currencyControl:!1,documentaryOperations:!1,conversionOperations:!1,text:""}),{fullName:s,name:o,phone:c,mail:d,currencyControl:m,documentaryOperations:h,conversionOperations:x,text:g}=r,{handleChange:b}=Ce({setFormState:i});return p("form",{onSubmit:async e=>{e.preventDefault();const t=`Валютный контроль=${m}/Документарные операции=${h}/Конверсионные операции=${x}/Доп инф=${g}`;n&&await n({typeForm:"kved",fullName:s,name:o,phone:c,mail:d,partnerComments:t})},className:"container",children:[u(T,{headingType:"h6",title:"Данные организации",className:"text-center mb-4"}),lt({fullName:s,name:o,phone:c,mail:d,handleChange:b}),u(T,{headingType:"h6",title:"Интересующий вопрос",className:"text-center mb-4"}),et({currencyControl:m,documentaryOperations:h,conversionOperations:x,text:g,handleChange:b}),p("div",{className:"flex items-center pb-9 mb-9 border-b border-main-divider",children:[we(t,"mr-5"),u(se,{link:l})]}),u(T,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"text-center mb-4"}),p("div",{className:"flex",children:[p("a",{className:"flex items-center text-primary-text no-underline mr-6",href:"tel:8 (800) 200-78-70","aria-label":"8 (800) 200-78-70",children:[u(Ye,{image:{icon:"PhoneIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"8 (800) 200-78-70"})]}),p("a",{className:"flex items-center text-primary-text no-underline","aria-label":"ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[u(Ye,{image:{icon:"MailIcon"},width:"24",height:"24",className:"mr-3"}),u("span",{children:"ved@rshb.ru"})]})]})]})})),lt=({fullName:e,name:t,phone:l,mail:a,handleChange:n})=>p("div",{children:[p("div",{className:"flex justify-between gap-5 mb-5",children:[u("div",{className:"w-1/2",children:u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Наименование организации",label:"Наименование организации",value:e,onChange:e=>n({fullName:e})})}),u("div",{className:"w-1/2",children:u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"ФИО",label:"ФИО",value:t,onChange:e=>n({name:e})})})]}),p("div",{className:"flex justify-between gap-5 mb-7",children:[u("div",{className:"w-1/2",children:u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Телефон",label:"Телефон",value:l,onChange:e=>n({phone:e})})}),u("div",{className:"w-1/2",children:u($,{className:"shrink-0 text-l w-full",type:"text","aria-label":"Электронная почта",label:"Электронная почта",value:a,onChange:e=>n({mail:e})})})]})]}),at=x((({responceType:e})=>{const t="OK"===e;return p("div",{className:`flex items-center mt-5 p-5 rounded-md ${t?"bg-responce-ok":"bg-responce-fail"}`,children:[u(Ye,t?{image:{icon:"ResponceOKIcon"},width:"42",height:"42",className:"mr-4"}:{image:{icon:"ResponceFailIcon"},width:"37",height:"34",className:"mr-4"}),p("div",{children:[u(T,{headingType:"h6",title:t?"Ваша заявка отправлена":"Не удалось отправить заявку",className:"mb-1"}),u(ie,{size:"text-l-light",color:"text-secondary-text",children:t?"Совсем скоро мы с вами свяжемся":"Пожалуйста, повторите позднее"})]})]})})),nt={credit:e=>u(Fe,{...e}),acquiring:e=>u(ke,{...e}),"business-card":e=>u(Ie,{...e}),deposit:e=>u(He,{...e}),wed:e=>u(tt,{...e})},rt={send:async function(e){try{const t=await fetch("/api/v1/sendcorporatelead",{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(e)});return await t.json()}catch(e){return null}}},it=x((e=>{const{className:t="",title:l,typeForm:n="credit",button:i,link:s,...o}=e,[c,d]=a(""),m=r((async e=>{const t=await rt.send(e);return d(t?"OK":"Fail"),"OK"}),[]);return u(k,{className:`font-sans bg-white p-[50px] pb-9 ${t}`,...o,children:p("div",{className:"container max-w-[978px]",children:[l?u(T,{headingType:"h3",title:l,className:"text-center mb-8"}):null,nt[n]({button:i,link:s,handleSubmit:m}),c?u(at,{responceType:c}):null]})})})),st=x((({className:e="",title:t,benefitList:l,...a})=>p(k,{className:`p-12 flex flex-col items-center ${e}`,...a,children:[t?u(T,{headingType:"h3",as:"h2",className:"max-w-[47rem] text-center",title:t}):null,l?.length?u("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(ot)}):null]}))),ot=(e,t)=>{const l=e.description;return p("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[e?.icon?.icon?u(Ye,{className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider text-primary-main group-data-secondary:bg-white/30 group-data-secondary:text-black",image:e.icon,asSVG:!0}):null,e?.icon?.src?u(Ye,{image:e.icon}):null,p("div",{className:"ml-5 h-full",children:[e?.label?u(T,{headingType:"h6",children:e.label}):null,ct(l)]})]},String(t))},ct=e=>{const t=e?.benefitType||null;return e&&t?u("div",{className:"mt-2 text-l-light text-secondary-text group-data-secondary:text-white/80",children:"list"===t?mt(e):dt(e)}):null},dt=e=>e?.name||null,mt=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?u("ul",{className:t,children:e.items.map(((e,t)=>u("li",{children:e},`benefitListItem-${t}`)))}):null},ht=(e,{className:t="",buttonClassName:l,isVertical:a}={})=>e?.length&&e.some((e=>e?.text))?u("div",{className:w("flex",a?"flex-col gap-2":"gap-4",t),children:e.map(ut(l))}):null,ut=(e="")=>(t,l)=>{const{text:a,icon:n,iconRight:r,version:i,...s}=t||{},o="secondary"===i?"color":"white";return a?u(le,{className:e,appendLeft:pt({...n,iconVersion:o}),appendRight:pt({...r,iconVersion:o}),version:i,text:a,...s},l?String(l):""):null},pt=e=>e?.icon||e?.src?u(Ye,{image:e,width:String(e?.size?.width||24),height:String(24),asSVG:!0}):null,xt={XXL:{wrapper:"gap-[18px]",title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5"},XL:{wrapper:"gap-4",title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl-light"},L:{wrapper:"gap-4",title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl-light"},M:{wrapper:"gap-3",title:{headingType:"h3",as:"h3"},descriptionSize:"text-xl-light"},S:{wrapper:"gap-2",title:{headingType:"h4",as:"h4"},descriptionSize:"text-xl-light"},XS:{wrapper:"gap-2",title:{headingType:"h5",as:"h5"},descriptionSize:"text-l-light"}},gt={H6:"text-h6",XL_L:"text-xl-light",XL_R:"text-xl",L_L:"text-l-light",L_R:"text-l",M:"text-m-light",S:"text-s-light",XS:"text-xs-light"},bt=x((({className:e,title:t,description:l,headlineVersion:a="XL",align:n="text-center",as:r,isPadding:i=!0,isTheme:s=!1,version:o="",...c})=>{const d=xt[a];return p(k,{className:w("flex flex-col",i?"p-12":"",d.wrapper,e),version:o,isTheme:s,...c,children:[t?u(T,{className:w("whitespace-pre-wrap",n),...d?.title,as:r||d?.title.as,title:t}):null,l?u(re,{color:"group-data-secondary:text-white/80",size:d.descriptionSize,align:n,children:l}):null]})})),ft=x((e=>{const{className:t="",title:l,description:a,bonusItems:n,...r}=e;return u(k,{className:`p-12 pb-9 ${t}`,...r,children:p("div",{className:"container",children:[u(bt,{className:"!p-0",title:l,description:a,headlineVersion:"M"}),u("div",{className:"flex flex-wrap w-full mt-9",children:n?.length?n.map(((e,t)=>u("div",{className:"flex-grow w-[49%] border border-gray p-9 mb-3 mx-2 even:mr-0 odd:ml-0 last:odd:mx-0",children:p("div",{className:"flex justify-between w-full",children:[p("div",{className:"flex flex-col justify-between mr-4",children:[p("div",{children:[u("div",{className:"text-h4",children:e.title}),u("div",{className:"text-xl-light mt-2 max-w-[488px]",children:e.description})]}),ht(e?.buttons)]}),e.bonusItemContent?.bonusType?vt(e.bonusItemContent):null]})},String(t)))):null})]})})})),vt=e=>u("div",{children:"count"===e.bonusType?Nt(e):yt(e)}),Nt=e=>p("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?u("span",{className:"font-mohave -tracking-[5px] text-title-extra bg-clip-text text-transparent bg-green-to-yellow -mb-7",children:e.bonusCount}):null,e.bonusName?u("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),yt=e=>e.image?u(Ye,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,wt={left:"text-left",center:"text-center",right:"text-right"},Ct=x((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:a="4",subtitle:n,title:r,...i})=>p(k,{className:`font-sans text-primary-text bg-white p-12 flex flex-col text-center ${l}`,...i,children:[u(bt,{className:"!p-0 mb-8",title:r,description:n,headlineVersion:"M"}),e?.length?u("div",{className:`grid gap-1 ${wt[t]} ${St(a)}`,children:e.map(kt)}):null]}))),kt=({icon:e,title:t,description:l},a)=>p("div",{className:w("flex flex-col items-center text-h6",l||t?"":"justify-center"),children:[t?u("span",{children:t}):null,e?u(Ye,{image:e,height:"180",width:"auto",className:"w-auto"}):null,l?u("span",{children:l}):null]},String(a)),St=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},It=x((e=>{const{title:t,image:l,cardItems:a,button:n}=e;return p("div",{className:"border-gray border p-9 w-1/2",children:[l?p("div",{className:"flex justify-center",children:[l?.src?u(Ye,{className:"mb-5",image:l}):null,l?.icon?u(Ye,{image:l,asSVG:!0}):null]}):null,t?u(T,{headingType:"h4",title:t,className:"mb-6"}):null,a?.length?u("ul",{children:a.map(((e,t)=>Tt(e,String(t))))}):null,ht([n],{buttonClassName:"mt-6"})]})})),Tt=(e,t)=>{const{icon:l,text:a}=e;return p("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?u(Ye,{image:l,className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider",asSVG:!0}):null,l?.src?u(Ye,{image:l}):null,u("span",{className:"text-xl-light",children:a})]},t)},$t=x((({className:e="",title:t,cards:l,...a})=>p(k,{className:`p-12 pb-9 ${e}`,...a,children:[u(T,{headingType:"h3",title:t,className:"text-center mb-8"}),u("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>u(It,{...e},String(t)))):null})]}))),Bt=x((({button:e,className:t,...l})=>u(k,{className:w("!bg-transparent",t),...l,children:ht([e])}))),Rt=e=>{const{itemCount:t,visibleItemCount:l}=e,[n,i]=a(0),s=r((()=>i((e=>Math.min(e+1,t-1)))),[t]),o=r((()=>i((e=>Math.max(e-1,0)))),[t]),c=function({itemCount:e,visibleItemCount:t}){return Boolean(t&&e>t)}(e)&&n<t-(l||1),d=n>0;return[n,{inc:s,dec:o,canInc:c,canDec:d,isScrollAvailable:d||c}]};const Mt=x((({className:e,disabled:t,...l})=>u(le,{rounded:!0,className:`group/btn shadow-[0_4px_25px_rgba(0,0,0,0.07)] w-12 h-12 min-h-12 max-h-12 flex items-center justify-center ${t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main"} ${e||""}`,disabled:t,...l,children:u(Ye,{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",asSVG:!0})}))),Vt=x((e=>u(Mt,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),jt=x((e=>u(Mt,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function _t({dec:e,inc:t,canDec:l,canInc:a,btnClass:n,className:r=""}){return l||a?p("div",{children:[l?u(Mt,{className:`absolute z-40 ${n[0]} ${r}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,a?u(Mt,{className:`absolute z-40 rotate-180 ${n[1]} ${r}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!a}):null]}):null}const Lt=x((({title:e,value:t,postfix:l="",prefix:a,className:n=""})=>p("div",{className:w("mb-7",n),children:[e?u(ie,{size:"text-l-light",color:"text-secondary-text",children:e}):null,u("div",t?{children:p(ie,{size:"text-h3",children:[a," ",_e(Math.round(t))," ",l]})}:{children:u(ie,{size:"text-h3",children:"-"})})]}))),Pt=5e6,zt=2485e3,Dt=Math.round(23.5),Ot={minSum:3e4,maxSum:Pt,minMonths:13,maxMonths:60,rate:0,isSalaryClient:!0,isPensionClient:!1,isStateEmployee:!0,isInsurance:!0},At={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Et={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0},Ft={minSum:1e3,maxSum:5e5,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,isSmallBusiness:!1,depositeName:"Депозит 'Стабильный'"},Ht=x((({rate:e,title:t="Ставка",unit:l,depositeName:a,isShowDepositeName:n,rateBlockClassName:r})=>p("div",{children:[u(ie,{size:"text-l-light",color:"text-secondary-text",children:t}),p("div",{className:"relative",children:[p("div",{className:"flex justify-start",children:[u("span",{className:w("block gradient-color-text font-mohave text-title-huge pr-6 -mt-4",r),children:String(e.toFixed(2)).replace(".",",")}),l?u("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:l}):""]}),a&&n?u("div",{className:"absolute bottom-7 w-full text-center whitespace-nowrap",children:a}):null]})]}))),Ut=e=>e?u(re,{size:"text-s-light",color:"text-secondary-text",children:e}):null,Xt=1e3;function Gt(e,t,l){const{moneyValue:a,minSum:n,maxSum:r,step:i=Xt,isShowItems:s=!0}=t,o=[`От ${_e(n)} ₽`,`До ${_e(r)} ₽`];return u(ze,{title:e,items:s?o:[],min:n,max:r,step:i,value:Le(a,n,r),onChange:l})}function Wt(e){const{data:t}=R(`/wcms-resources/${e}.json`,j);return t}const Kt=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:a}=e,n=Wt(t||"bonus-calculator-data")||At,[r,i]=((e,t,l)=>{const{minSumTravel:a,minSumOther:n,maxBonus:r,prefMonthsNum:i,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===a&&l===n)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),r);return[m,m*i+Math.min(Math.round(c*t)+Math.round(d*l),r)*(12-i)]})(n,l,a);return{...n,...e,monthBonus:r,yearBonus:i}},Jt=x((({className:e="",sourceBookDir:t="",buttons:l,footnote:n})=>{const[i,s]=a(6e3),o=r((e=>s(e)),[]),[c,d]=a(6e3),m=r((e=>d(e)),[]),h={travelExpenseValue:i,restExpenseValue:c},{minSumTravel:x,maxSumTravel:g,minSumOther:b,maxSumOther:f,monthBonus:v,yearBonus:N}=Kt(h,t);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Gt("Сумма покупок в категории путешествия, ₽",{minSum:x,maxSum:g,moneyValue:i,step:500,isShowItems:!1},o),Gt("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:b,maxSum:f,moneyValue:c,step:500,isShowItems:!1},m)]}),u("div",{children:v>=0?u(Ht,{title:"Баллов за месяц",rate:v,rateBlockClassName:"tracking-[-14px]"}):null}),p("div",{className:"w-full max-w-[350px]",children:[N>=0?u(Lt,{title:"Баллов за год",value:N}):null,ht(l,{className:"mt-7",isVertical:!0}),Ut(n)]})]})}));function Yt(e,t,l){const{minDays:a,maxDays:n,daysValue:r}=t,i=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`;return u(ze,{className:"mt-7",title:e,items:[`От ${i(a)}`,`До ${i(n)}`],min:a,max:n,step:1,value:Le(r,a,n),onChange:l})}const qt={horizontal:"gap-10",vertical:"flex-col gap-3"},Zt=x((({items:e,checkedItem:t,onChange:l,orientation:a="horizontal"})=>u("div",{className:`flex ${qt[a]}`,children:e?.map((({id:e,text:a})=>u(Qe,{isRadio:!0,text:a,checked:t===e,onChange:()=>l&&l(e)},String(e))))}))),Qt="everyMonth",el="atEndTerm",tl=[{id:Qt,text:"Ежемесячно"},{id:el,text:"В конце срока"}];function ll({isMonthlyInterestPayment:e,callback:t,title:l,orientation:a="horizontal"}){return p("div",{children:[l?u("div",{className:"mb-3",children:u(ie,{color:"text-secondary-text",font:"font-light",children:l})}):null,u("div",{children:u(Zt,{orientation:a,items:tl,checkedItem:e?Qt:el,onChange:e=>t&&t(e===Qt)})})]})}const al=x((({title:e="Ставка"})=>p("div",{children:[u(ie,{size:"text-l-light",color:"text-secondary-text",children:e}),u("div",{className:"mt-1 pt-1 pl-5 pb-1.5",children:u(Ye,{image:{icon:"PercentIcon"},width:"90",height:"85",asSVG:!0})}),u("div",{className:"w-[250px] mt-3.5",children:p(re,{size:"text-xl-light",color:"text-primary-text",children:["Процентная ставка для срока ",u("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]})})]}))),nl=e=>e,rl=(e=nl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),il=rl(),sl=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let l=1;for(;l<t.length;){const[e,a]=t[l-1],[n,r]=t[l];a>=n?t.splice(l-1,2,[e,Math.max(a,r)]):l++}return t},ol=(e=nl)=>rl((t=>-e(t))),cl=([e,t],l=[])=>({[e]:l.length?ol()(l.map((t=>t[e]))):0,[t]:l.length?rl()(l.map((e=>e[t]))):0}),dl=(e,[t,l],a)=>e>=a[t]&&e<=a[l],ml=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,hl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a,daysValue:n}=t;return l?Math.round(a*Math.pow((1200+e)/1200,n/30)-a):Math.round(a*e*n/365/100)},ul=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n,bottomFootnote:i,isShowDepositeName:s})=>{const[o,c]=a(1e5),d=r((e=>c(e)),[]),[m,h]=a(90),x=r((e=>h(e)),[]),[g,b]=a(!1),f=r((e=>b(e)),[]),[v,N]=a(!1),y=r((e=>N(e)),[]),[w,C]=a(!1),k=r((e=>C(e)),[]),[S,I]=a(!1),T=r((e=>I(e)),[]),$=((e,t)=>{const{daysValue:l,moneyValue:a,isPartialWithdrawal:n,isReplenished:r,isSmallBusiness:i,isMonthlyInterestPayment:s}=e,o=Wt(t||"business-calculator-data"),c=r||n,d=l<90||l>730;if(l<=30)return{...Ft,...e,isDisabledOperatingDeposit:d,isShowUnknownRate:!0};const m=o?.rows?.find((e=>s===e.isMonthlyInterestPayment&&i===e.isSmallBusiness&&ml(c,e)&&dl(a,["minSum","maxSum"],e)&&dl(l,["minDays","maxDays"],e)))||Ft,{rate:h}=m,u=hl(h,e),p=a+u,x=o?.rows||[Ft];return{...m,...cl(["minSum","maxSum"],x),...cl(["minDays","maxDays"],x),...e,isDisabledOperatingDeposit:d,income:u,finalSum:p}})({moneyValue:o,daysValue:m,isReplenished:g,isPartialWithdrawal:v,isSmallBusiness:w,isMonthlyInterestPayment:S},t),{income:B,finalSum:R,rate:M,depositeName:V,isShowUnknownRate:j}=$;return p("section",{className:e,children:[p("div",{className:"flex justify-between",children:[p("div",{className:"w-[486px]",children:[Gt("Сумма вклада, ₽",$,d),Yt("Срок вклада, дни",$,x),p("div",{className:"mt-7 flex justify-between",children:[pl({...$,handleIsReplenished:f,handleIsPartialWithdrawal:y,handleIsSmallBusiness:k}),ll({isMonthlyInterestPayment:S,callback:T,title:"Выплата процентов",orientation:"vertical"})]})]}),j?u(al,{}):u(Ht,{rate:M,depositeName:V,isShowDepositeName:s,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(Lt,{title:"Доход по вкладу",value:B,postfix:"₽",prefix:"+"}),u(Lt,{title:"Сумма в конце срока",value:R,postfix:"₽"}),ht(l,{className:"mt-7",isVertical:!0}),u("div",{className:"mt-7",children:Ut(n)})]})]}),u("div",{className:"mt-5",children:Ut(i)})]})})),pl=({isDisabledOperatingDeposit:e,isReplenished:t,isPartialWithdrawal:l,isSmallBusiness:a,handleIsReplenished:n,handleIsPartialWithdrawal:r,handleIsSmallBusiness:i})=>p("div",{children:[u(Qe,{text:"Пополнение",disabled:e,checked:t,onChange:n}),u(Qe,{className:"mt-3",disabled:e,text:"Частичное снятие",checked:l,onChange:r}),u(Qe,{className:"mt-3",text:"Являюсь малым предприятием",checked:a,onChange:i})]}),xl=x((({className:e,title:t,items:l=[],list:a=[],value:n=a[0],disabled:r=!1,onChange:i})=>{const s=a.length-1,o=e=>{if(!i)return;const t=parseInt(e.target.value),l=a.reduce((function(e,l){return Math.abs(l-t)<Math.abs(e-t)?l:e}));i(Number(Pe(l.toString())))},c=a.findIndex((e=>e===n))||0,d={backgroundSize:`${(100*(c-0)/(s-0)).toFixed(2)}% 100%`};return p("div",{className:e,children:[p("label",{className:"block relative",children:[t?u("span",{className:"text-m-light text-primary-text",children:t}):null,u("input",{className:"m-0 mt-2 font-sans text-h3 w-full h-14 border border-solid border-gray rounded-md\n outline-none p-0 pl-4 box-border text-primary-text hover:border-primary-hover focus:border-primary-text disabled:border-gray disabled:bg-main-divider",value:_e(n),disabled:r,onChange:o,onBlur:o}),a.length?u("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-4",children:a.map(gl(c,r))}):null,u("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:u("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",type:"range",min:0,max:s,step:1,value:c,disabled:r,onChange:e=>{if(!i)return;const t=a.at(Le(parseInt(e.target.value),0,s))||0;i(Number(Pe(t.toString())))},style:d})})]}),bl(l)]})})),gl=(e,t)=>(l,a)=>u("span",{className:"w-2 h-2 rounded-full "+(e<=a||t?"bg-gray":"bg-primary-main")},String(a));function bl(e){return u("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>u("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}function fl(e,t,l){const{minMonths:a,maxMonths:n,monthsValue:r,availableMonths:i}=t,s=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return i?.length?u(xl,{className:"mt-7",title:e,items:[`От ${s(a)}`,`До ${s(n)}`],list:i,value:Le(r,a,n),onChange:l}):u(ze,{className:"mt-7",title:e,items:[`От ${s(a)}`,`До ${s(n)}`],min:a,max:n,step:1,value:Le(r,a,n),onChange:l})}const vl="annuity",Nl="differential",yl=[{id:vl,text:"Аннуитетный"},{id:Nl,text:"Дифференцированный"}];function wl({isAnnuity:e,callback:t,title:l,orientation:a="horizontal"}){return p("div",{children:[l?u("div",{className:"mb-3",children:u(ie,{color:"text-secondary-text",font:"font-light",children:l})}):null,u(Zt,{orientation:a,items:yl,checkedItem:e?vl:Nl,onChange:e=>t&&t(e===vl)})]})}const Cl=(e,t,l)=>{const{moneyValue:a,monthsValue:n}=e,r=Wt(t||"credit-calculator-data"),i=!l?.isShowSalaryClient,s=!l?.isShowStateEmployee,o=!l?.isShowPensionClient,c=!l?.isShowInsurance,d=r?.rows?.find((t=>kl({row:t,userInputParams:e,paramKey:"isSalaryClient",isExclude:i})&&kl({row:t,userInputParams:e,paramKey:"isStateEmployee",isExclude:s})&&kl({row:t,userInputParams:e,paramKey:"isPensionClient",isExclude:o})&&kl({row:t,userInputParams:e,paramKey:"isInsurance",isExclude:c})&&dl(a,["minSum","maxSum"],t)&&dl(n,["minMonths","maxMonths"],t)))||Ot,{rate:m}=d,h=((e,t)=>{const{isAnnuity:l,moneyValue:a,monthsValue:n}=t;if(0===e)return 0;if(l){const t=e/1200;return a*(t+t/(Math.pow(1+t,n)-1))}return Math.round(a/n)+a*(e/1200)})(m,e),u=r?.rows||[Ot];return{...d,...cl(["minSum","maxSum"],u),...cl(["minMonths","maxMonths"],u),...e,monthlyPayment:h}},kl=({row:e,userInputParams:t,paramKey:l,isExclude:a})=>a||t[l]===e[l],Sl=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[s,o]=a(!1),[c,d]=a(!1),m=r((e=>d(e)),[]),[h,x]=a(!1),g=r((e=>x(e)),[]),[b,f]=a(!1),v=r((e=>f(e)),[]),[N,y]=a(!0),C=r((e=>y(e)),[]),[k,S]=a(zt),I=r((e=>S(e)),[]),[T,$]=a(Dt),B=r((e=>$(e)),[]),R=Cl({isAnnuity:s,isInsurance:N,isSalaryClient:c,isPensionClient:b,isStateEmployee:h,moneyValue:k,monthsValue:T},t,i);return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Gt("Сумма кредита, ₽",{...R,step:500},I),fl("Срок кредита, месяцев",R,B),u("div",{className:"mt-7",children:Tl({...R,...i,handleIsSalaryClient:m,handleIsStateEmployee:g,handleIsPensionClient:v,handleIsInsurance:C})})]}),Il(R.rate),p("div",{className:"w-full max-w-[350px]",children:[u(Lt,{title:"Ежемесячный платеж",value:R.monthlyPayment,postfix:"₽"}),wl({isAnnuity:s,orientation:"vertical",callback:o}),ht(l,{className:"mt-7",isVertical:!0}),Ut(n)]})]})})),Il=e=>u(Ht,{title:"Ставка",rate:e,rateBlockClassName:"tracking-[-25px]",unit:"%"}),Tl=({isSalaryClient:e,isStateEmployee:t,isPensionClient:l,isInsurance:a,isShowSalaryClient:n,isShowStateEmployee:r,isShowPensionClient:i,isShowInsurance:s,handleIsSalaryClient:o,handleIsStateEmployee:c,handleIsPensionClient:d,handleIsInsurance:m})=>p("div",{children:[n?u(Qe,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:e,onChange:o}):null,r?u(Qe,{className:"mt-3",text:"Работаю в бюджетной организации",checked:t,onChange:c}):null,i?u(Qe,{className:"mt-3",text:"Получаю пенсию на карту Россельхозбанка",checked:l,onChange:d}):null,s?u(Qe,{className:"mt-3",text:"Комплексная страховая защита",checked:a,onChange:m}):null]}),$l="remote",Bl="office",Rl=[{id:Bl,text:"Офис Банка"},{id:$l,text:"Дистанционно"}];function Ml({isRemoteRegistration:e,callback:t,title:l,orientation:a="horizontal"}){return p("div",{children:[l?u("div",{className:"mb-3",children:u(ie,{color:"text-secondary-text",font:"font-light",children:l})}):null,u("div",{children:u(Zt,{orientation:a,items:Rl,checkedItem:e?$l:Bl,onChange:e=>t&&t(e===$l)})})]})}const Vl=(e,t,l)=>{const{moneyValue:a,monthsValue:n}=e,r=Wt(t||"deposit-calculator-data"),i=!l?.isShowMonthlyInterestPayment,s=!l?.isShowRemoteRegistration,o=r?.rows?.find((t=>_l({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:i})&&_l({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s})&&dl(a,["minSum","maxSum"],t)&&dl(n,["minMonths","maxMonths"],t)))||Et,{rate:c}=o,d=jl(c,e),m=a+d,h=r?.rows||[Et];return{...o,...cl(["minSum","maxSum"],h),...cl(["minMonths","maxMonths"],h),availableMonths:sl(h.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,l=1)=>Array.from({length:Math.abs(t-e)/l+1},((a,n)=>t>=e?e+n*l:e-n*l)))(e,t))),...e,income:d,finalSum:m}},jl=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:a,monthsValue:n}=t;return l?Math.round(a*Math.pow((1200+e)/1200,n)-a):Math.round(a*e*30*n/365/100)},_l=({row:e,userInputParams:t,paramKey:l,isExclude:a})=>a||t[l]===e[l],Ll=x((({className:e="",sourceBookDir:t,buttons:l,footnote:n,paramsViewSettings:i})=>{const[s,o]=a(zt),c=r((e=>o(e)),[]),[d,m]=a(Dt),[h,x]=a(!1),g=r((e=>x(e)),[]),[b,f]=a(!1),v=r((e=>f(e)),[]),N={moneyValue:s,monthsValue:d,isMonthlyInterestPayment:h,isRemoteRegistration:b},y=r((e=>m(e)),[]),C=Vl(N,t,i),{income:k,finalSum:S,rate:I}=C;return p("section",{className:w("flex justify-between",e),children:[p("div",{className:"w-[468px]",children:[Gt("Сумма вклада, ₽",{...C},c),fl("Срок вклада, месяцев",{...C},y),u("div",{className:"mt-7",children:Pl({...C,...i,handleIsMonthlyInterestPayment:g,handleIsRemoteRegistration:v})})]}),u(Ht,{rate:I,rateBlockClassName:"tracking-[-25px]",unit:"%"}),p("div",{className:"w-full max-w-[350px]",children:[u(Lt,{title:"Доход по вкладу",value:k,postfix:"₽",prefix:"+"}),u(Lt,{title:"Сумма в конце срока",value:S,postfix:"₽"}),ht(l,{className:"mt-7",isVertical:!0}),Ut(n)]})]})})),Pl=({isMonthlyInterestPayment:e,isRemoteRegistration:t,isShowMonthlyInterestPayment:l,isShowRemoteRegistration:a,handleIsMonthlyInterestPayment:n,handleIsRemoteRegistration:r})=>p("div",{className:"flex flex-col gap-y-7",children:[l?ll({isMonthlyInterestPayment:e,callback:n,title:"Выплата процентов"}):null,a?Ml({isRemoteRegistration:t,callback:r,title:"Оформление"}):null]}),zl={CreditCalculatorForm:Sl,DepositCalculatorForm:Ll,BusinessDepositCalculatorForm:ul,BonusCalculatorForm:Jt},Dl=(e,t)=>{const l=e?.calcType;if(!l||!(l in zl))return null;const a=zl[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-9 w-full",children:[e?.title?u(T,{className:"text-center mb-6",title:e.title}):null,u(a,{...e})]})},String(t))},Ol=x((({className:e="",calculatorTabs:t=[],...l})=>{const n=t.map((e=>e.nav||{})),i=t.map((({calculatorBlock:e})=>e||{})),[s,o]=a(0),c=r((e=>o(e)),[]),[d,m]=Rt({itemCount:t?.length,visibleItemCount:3});return p(k,{className:`box-border overflow-hidden relative w-100 ${e}`,...l,children:[p("div",{className:"bg-white",children:[n.length>1?Al({activeIndex:d,tabsNav:n,slideIndexShift:s,onClick:c}):null,_t({...m,btnClass:["left-3","right-3"],className:"top-8"})]}),u("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:i?.length?i.map(Dl):null})]})}));function Al({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:a}){return p("div",{children:[u("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:u("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:a}){const n=l?"h-[88px] w-[387px] min-w-[387px] p-5 border-none bg-primary-main text-white":"h-[77px] w-[328px] min-w-[328px] px-5 py-4 ease-in duration-300 bg-white text-primary-text",r=l?"text-xl mb-1.5":"text-l mb-[3px]",i=l?"text-l-light text-white":"text-m-light text-secondary-text",s=l?"":"text-primary-main",o=e?.icon?.iconVersion,c=l?"white":"normal";return p("button",{type:"button",onClick:a,"aria-label":e?.title,className:`box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${n}`,children:[u(Ye,{className:`h-6 w-6 min-w-6 min-h-6 mr-4 ${s}`,image:{...e?.icon,iconVersion:o??c},width:"24",height:"24",asSVG:!0}),p("div",{className:"border-0",children:[u("div",{className:`${r}`,children:e?.title}),u("div",{className:`${i}`,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>a(t)})))})}),u("div",{className:"w-full h-2 bg-primary-main"})]})}const El=e=>(e.match(/\./g)||[]).length>1?e.slice(0,e.lastIndexOf(".")):e,Fl=e=>{const t=0===e.indexOf("0")&&2===e.length?e.replace("0","0."):e;return t.startsWith(".")?t.replace(".","0."):t},Hl=e=>String(e.replace(",",".").replace(/[^.\d]/g,"")),Ul=x((({className:e="",onChange:t,minValue:l=0,maxValue:a=3e5,...n})=>{const i=r((e=>{if(!t)return;const n=El(Fl(Hl(Pe(e))));const r=Xl(n,Le(Number(n),l,a));t(String(r))}),[t]),s=r((e=>{var l;t&&t((l=e,new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(Pe(l))).replace(",",".")))}),[t]);return u($,{className:e,inputClassName:"w-full",onChange:i,onBlur:s,...n,children:u("span",{className:"text-xl-light absolute right-4 bottom-4",children:"₽"})})})),Xl=(e,t)=>Number(e)===t?e:String(t),Gl=x((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:n="1500",button:i,...s})=>{const[o,c]=a(""),d=r((e=>c(e)),[]),m=!Number(Pe(o)),h=m?ee({version:i?.version}):te({className:"text-white",version:i?.version}),x=X();return p(k,{className:`p-12 flex flex-col items-center ${e}`,...s,children:[t?u(T,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,p("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[u(Ul,{name:"amount",value:o,onChange:d,valid:""===o||!m,placeholder:n,label:l}),i?.text?u("button",{type:"submit",className:`w-full p-4 mt-6 ${h} `,disabled:m,...x(i),children:i.text}):null]})]})})),Wl=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),Kl=[];function Jl(e,t,{className:l,...a}={}){const{key:n,blockDecorator:r=Wl,blocksRegistry:i={},ancestors:s=Kl}=t,{type:o}=e;o&&o in i||console.warn(`No block with "${o}" is registered`);const c=o&&i[o];return r({blockClassName:w("scroll-mt-12",l,e.style||"col-span-12"),block:e,ancestors:s,render:({block:l,blockClassName:r})=>{const{content:i}=l;return c?u(c,{className:r,block:e,options:t,...i,...a},n):null}},n)}const Yl=[],ql=(e,{key:t,ancestors:l=Yl,slotName:a=null,renderProps:n=Jl,...r})=>(e||[]).map(((e,i)=>n(e,{...r,key:`${t||e.type}-${i}`,ancestors:r.parent?[...l||Yl,[r.parent,a]]:l})));function Zl({children:e,block:t,options:l,renderProps:a}){return e||(t&&l?ql(t.blocks,{...l,parent:t,renderProps:a}):null)}const Ql=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`}),ea=x((({className:e="",style:t,idx:l,activeIndex:a,observerOptions:n,children:i,onIntersection:s})=>{const o=v(r((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),n);return u("div",{className:`inline-block snap-always box-border ${e}`,style:t,"aria-current":Boolean(l===a),ref:o,children:i})})),ta=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],la=x((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:a=0,gap:n=0,padding:i=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([]),b=r(((e,t)=>{const l=[...g.current||[]];l[e]=t,g.current=l,h&&h(l),p&&p(na(l))}),[h,p]),f=a>0?n*Number(a)-1:0,v="vertical-list"===o,N="horizontal-list"===o,y={...N?aa(i,f):{},...v?Ql(d):{},gap:`${n}px`};return u("div",{className:w("box-border overflow-auto no-scrollbar",o,e),style:y,ref:t,children:(C=(e,t)=>u(ea,{className:w(c,a?ta[a-1]:"",v?"h-full":""),style:N?aa(i/4):{},activeIndex:l,idx:t,observerOptions:x,onIntersection:b,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(C):C(e,0))(m)});var C})),aa=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),na=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),ra=e=>t=>e.scrollWidth/t,ia=e=>(t,l)=>{e.scrollBy({left:l*ra(e)(t),behavior:"smooth"})},sa=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const n=s(null),[i,o]=a([]),c=r((e=>{o((t=>{return(l=t)===(a=e)||Boolean(l&&a&&l?.length===a?.length&&l.every(((e,t)=>e===a[t])))?t:e;var l,a})),l&&l(e)}),[e]),[d,m]=i.length?[ol()(i),rl()(i)]:[-1,-1],h=d>0,u=m<e-1,p=r((()=>{var l;n.current&&(t&&!h?(l=n.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):ia(n.current)(e,-1))}),[t,e,h]),x=r((()=>{n.current&&(t&&!u?n.current.scrollTo({left:0,behavior:"smooth"}):ia(n.current)(e,1))}),[e,t,u]);return[n,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},oa="absolute top-[calc(50%-24px)] z-40",ca="absolute top-0 bottom-0 z-40 w-[84px] pointer-events-none",da=x((({scroll:e,arrowsPadded:t,isBlur:l,onScrollLeft:a,onScrollRight:n,hasEdgeBlocks:i,activeIndex:s,itemCount:o})=>{const{canScrollLeft:c,canScrollRight:d,scrollLeft:m,scrollRight:h}=e,x=i?s>0:c,g=i?s<o-1:d,b=r((()=>{i?(c&&s!==o-1&&m(),a()):m()}),[m,a,i,c,s,o]),f=r((()=>{i?(d&&0!==s&&h(),n()):h()}),[h,n,i,c,s,o]);return p("div",{children:[ma(l,e),x?u(Vt,{className:w(oa,t?"left-8":"left-0"),onClick:b}):null,g?u(jt,{className:w(oa,t?"right-8":"right-0"),onClick:f}):null]})})),ma=(e,t)=>(t.canScrollLeft||t.canScrollRight)&&e?p("div",{children:[u("div",{className:w(ca,"left-0 bg-opacity-from-white")}),u("div",{className:w(ca,"right-0 bg-opacity-to-white")})]}):null,ha={"horizontal-list":"mx-auto mt-5 w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},ua={"horizontal-list":"w-6","vertical-list":"h-6"},pa=x((({containerRef:e,activeIndex:t,dotCount:l=0,listType:a="horizontal-list",version:n})=>l?u("div",{className:w("flex gap-2",ha[a],n?"group":""),...n?{"data-ver":n}:{},children:new Array(l).fill(null).map(((l,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===t?ua[a]:"w-2 h-2 opacity-30"}`,role:"button","aria-hidden":!0,onClick:()=>(l=>{l!==t&&e?.current&&e.current.children[l]?.scrollIntoView({behavior:"smooth",block:"nearest"})})(n)},String(n))))}):null)),xa=x((({className:e="",itemCount:t,visibleItemCount:l,isBlur:n=!0,isCyclic:i=!1,arrowsPadded:s=!0,isPadding:o=!0,showDots:c=!1,...d})=>{const{blocks:m=[]}=d.block||{},h=t||m?.length,[x,g]=a(Math.floor((l||0)/2)),b=r((()=>g((e=>e+1))),[]),f=r((()=>g((e=>e-1))),[]),[v,N]=sa({itemCount:h,isCyclic:i}),[y]=N.visibleIndicesRange,C=m&&"CarouselBankHistoryCard"===m[0]?.type;return u(k,{className:w(ga(o),"group-data-secondary:bg-primary-main group-data-secondary:text-white",e),...d,children:p("div",{className:"relative max-w-full",children:[u(la,{containerRef:v,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:N.handleVisibleIndicesChange,children:Zl({...d,renderProps:C?(e,t)=>Jl(e,t,{blocksLength:m?.length,activeIndex:x}):Jl})}),u(da,{scroll:N,isBlur:n,arrowsPadded:s,onScrollLeft:f,onScrollRight:b,hasEdgeBlocks:C,activeIndex:x,itemCount:h}),c?ba(v,y,t):null]})})}));xa.childrenTypes=["CarouselCard","CarouselBankHistoryCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselRichTextCard","CarouselInvestmentCard","CarouselEventCard"];const ga=e=>e?"p-12":"",ba=(e,t,l)=>u(pa,{containerRef:e,activeIndex:t,dotCount:l,listType:"horizontal-list"}),fa=x((({title:e,description:t,blocksLength:l=0,activeIndex:a,options:n})=>{const r=Number(n?.key?.split("-").slice(-1)[0])||0;return u(k,{className:"flex h-[485px]",children:u("div",r===a?{className:"relative flex items-center w-full",children:u(bt,{headlineVersion:"M",title:e,description:t,align:"text-left",className:w("absolute z-10 h-[385px] w-[440px] p-8 text-white shadow-dark-blue",ya(r,l),va(r))})}:{className:"flex w-full items-center justify-center",children:u("div",{className:w("flex justify-center items-center h-[300px] w-[340px] font-mohave text-title-large tracking-[-0.03em]",va(r)),children:u("span",{className:Na(r),children:e})})})})})),va=e=>{switch(e%3){case 0:default:return"bg-primary-main";case 1:return"bg-green-light";case 2:return"bg-yellow-light"}},Na=e=>{switch(e%3){case 1:case 2:return"gradient-color-text-on-yellow";default:return"gradient-color-text-on-green"}},ya=(e,t)=>0===e?"left-9":e===t-1?"right-9":"-left-[25px]",wa="absolute border border-solid border-gray w-full h-full",Ca={normal:"min-w-[970px]",small:"min-w-[355px]"},ka=x((({className:e="",button:t,description:l,title:a,carouselVersion:n="normal",version:r=""})=>u("section",{className:`flex pb-9 pl-12 border-box h-full ${Ca[n]} ${e}`,children:p("div",{className:"relative w-full",children:[u("div",{className:`${wa} z-10 top-9 right-12 bg-green-dark`}),u("div",{className:`${wa} z-10 top-6 right-8 bg-green`}),u("div",{className:`${wa} z-10 top-3 right-4 bg-green-light`}),p("div",{className:"relative h-full bg-white z-10 p-10 border border-solid border-green-light",children:[u(bt,{className:"!p-0",title:a,description:l,headlineVersion:"L",align:"text-left",version:r}),ht([t],{className:"mt-14"})]})]})}))),Sa={black:"bg-black",white:"bg-white"},Ia=x((({className:e="",title:t,description:l,image:a,price:n,button:r,colors:i,...s})=>p(k,{className:`border box-border border-gray p-7 min-w-[392px] h-full flex flex-col justify-left ${e}`,...s,children:[a?.src?u(Ye,{className:"mb-5 flex justify-center",image:a}):null,t?u(T,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?u("div",{className:"mb-4",children:u(re,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,i?.length?p("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[u("div",{className:"mr-1.5",children:u(ie,{children:"Доступные цвета: "})}),i.map(Ta)]}):null,n?p(ie,{size:"text-h3",align:"text-left",children:[n," ₽"]}):null,ht([r],{buttonClassName:"mt-5 w-full"})]}))),Ta=(e,t)=>u("div",{role:"figure",className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${Sa[e]}`},String(t)),$a=x((({className:e="",href:t,target:l,children:a})=>{const n=X()({href:t,target:l});return u(t?"a":"div",{className:w("block",e),...t?n:{},children:a})})),Ba=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),Ra=x((({className:e="",icon:t,title:l,description:a,href:n,target:r,...i})=>u(k,{className:w("w-[365px]",e),...i,children:p($a,{className:"flex flex-col",href:n,target:r,children:[t?.icon?u(Ye,{image:Ba(t),asSVG:!0}):null,t?.src?u(Ye,{image:t}):null,l?u(T,{headingType:"h6",as:"h4",className:"text-left pt-3 mb-2",title:l}):null,a?u("div",{className:"mb-4",children:u(ie,{font:"font-light",size:"text-m",color:"text-secondary-text",children:a})}):null]})}))),Ma=x((({className:e="",title:t="",buttons:l,image:a,children:n})=>p("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,p("div",{className:"flex grow w-full justify-between",children:[p("div",{className:"flex flex-col justify-between w-full",children:[u("div",{className:"h-full",children:n}),l?u("div",{className:"mt-auto pt-8",children:l}):null]}),a]})]}))),Va={1:"flex-col",2:"gap-x-10 flex-wrap"},ja=x((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:a=1,description:n,image:r,title:i,...s})=>{const o=i?u(T,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:i}):null,c=r?.src?u(Ye,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return u(k,{className:["relative box-border text-left p-9 w-[697px]","border border-solid border-gray group-data-secondary:border-white/50",l].join(" "),...s,children:p(Ma,{title:o,image:c,children:[p("div",{className:"flex justify-between mb-4",children:[n?u("div",{className:"w-1/3",children:u(ie,{size:"text-h6",children:n})}):null,e?u(ie,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e}):null]}),t.length?u("ul",{className:`list-none m-0 p-0 flex gap-y-2 ${Va[a]}`,children:_a(t,a)}):null]})})})),_a=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return p("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?u("div",{className:"pr-2.5",children:u(ie,{size:(a=t,1===a?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?u(ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var a})),La="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",Pa=x((({text:e,href:t="",target:l="",className:a=""})=>{const n=X()({href:t,target:l});return e?p("div",{className:`relative group/link cursor-pointer w-[328px] h-[82px] ${a}`,children:[p("a",{className:"absolute border border-primary-main ml-3 px-6 py-5\n text-l-light bg-white text-primary-text flex w-[316px]\n justify-between items-center group-hover/link:text-primary-main z-10",role:"link",...n,children:[u("div",{className:"p-0.5",children:e}),u("div",{className:"w-6 h-6",children:u(Ye,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover/link:text-primary-main",width:"24",height:"24",asSVG:!0})})]}),u("div",{className:`${La} mx-1.5 mt-1.5`}),u("div",{className:`${La} mt-3 mr-3`})]}):null})),za=x((({className:e="",additionalDescription:t,description:l,links:a,title:n,...r})=>p(k,{className:`flex w-full p-10 overflow-hidden justify-between ${e}`,...r,children:[p("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[u(bt,{isPadding:!1,title:n,description:l,as:"h1",align:"text-left"}),t?u(bt,{className:"pt-6",isPadding:!1,description:l,align:"text-left"}):null]}),a?.length?Da(a):null]}))),Da=e=>{const t=Math.ceil(e.length/10);return u(xa,{className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,arrowsPadded:!1,showDots:!0,children:new Array(t).fill(null).map(((t,l)=>u("div",{className:"w-[672px] min-w-[672px] ml-10 mr-10 flex flex-wrap self-start",children:e.slice(10*l,10*(l+1)).map(((e,t)=>u(Pa,{className:"m-1",...e},String(t))))},String(l))))})},Oa={L:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4",M:"w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3",S:"w-1 h-1 min-w-1 min-h-1 mr-2"},Aa=x((({className:e="",isDotted:t=!0,children:l,size:a="M"})=>p("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?u("div",{children:u("div",{className:`rounded-full align-middle inline-block bg-primary-text group-data-secondary:bg-white ${Oa[a]}`})}):null,u("span",{children:l})]}))),Ea={S:"text-l-light",M:"text-h6",L:"text-h5"},Fa={S:"ml-2",M:"ml-3",L:"ml-4"},Ha=x((({className:e="",hasIndent:t,isDotted:l,itemClassName:a="",items:n,listItemSize:r="M"})=>n?.length?u("section",{className:`text-primary-text group-data-secondary:text-white group-data-gray:text-secondary-text ${Ea[r]} ${t?Fa[r]:""} ${e}`,role:"list",children:n.map(((e,t)=>u(Aa,{className:a,isDotted:l,size:r,children:e},String(t))))}):null)),Ua=x((({additionalDescription:e,align:t="text-center",button:l={},className:a="",description:n,headlineSmallVersion:r="H6",href:i,icon:s,isDotted:o=!0,isFullWidth:c=!0,items:d=[],target:m,title:h,version:u="primary",...x})=>p(k,{className:w("h-full flex flex-col justify-between min-w-[260px]","box-border border-solid border border-gray",t,a),version:u,...x,children:[p($a,{className:"p-6",href:i,target:m,children:[Xa(s),Ga(r,h),Wa(n,h),Ja(d,o,u),Ka(e)]}),ht([l],{className:w("p-6 pt-0",c?"":"justify-center"),isVertical:!!c})]}))),Xa=e=>p("div",{className:"flex justify-center",children:[e?.src?u(Ye,{className:"mb-5",image:e}):null,e?.icon?u(Ye,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:e,asSVG:!0}):null]}),Ga=(e,t)=>t?u("div",{children:u(ie,{size:gt[e],children:t})}):null,Wa=(e,t)=>e?u("div",{className:t?"mt-2":"",children:u(re,{size:"text-l",children:e})}):null,Ka=e=>e?u("div",{className:"mt-auto",children:u(ie,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",children:e})}):null,Ja=(e,t,l="primary")=>e?.length?u(Ha,{className:"max-w-[308px] mt-2 text-s "+("primary"===l?"!text-secondary-text":""),itemClassName:"text-left",items:e.filter((e=>e?.text)).map((e=>e.text)),isDotted:t}):null,Ya=x((({className:e="",title:t,icon:l,list:a=[],href:n,target:r,...i})=>u(k,{className:w("border border-gray",e),...i,children:p($a,{className:"flex",href:n,target:r,children:[p("div",{className:"w-[200px] min-w-[200px] self-center",children:[l?.icon?u(Ye,{image:Ba(l),asSVG:!0}):null,l?.src?u(Ye,{image:l}):null]}),p("div",{className:"p-8 pl-3 w-full",children:[t?u(T,{className:"mb-3.5",headingType:"h5",title:t}):null,a.length?u("div",{className:"flex flex-col gap-3",children:a?.map(qa)}):null]})]})}))),qa=(e,t)=>p("div",{className:"break-words",children:[e.title?u("div",{className:"text-h6",children:e.title}):null,e.description?u("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Za=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],iconMapped:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"},label:"Google Play"},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"},label:"Youtube"}],Qa={default:"w-14 h-14",small:"w-12 h-12"},en=(e,t)=>e?"":`group/media flex items-center justify-center box-border ${Qa[t]}`,tn=x((({buttonSize:e="default",rounded:t=!1,icon:l,...a})=>{const{href:n,version:r,text:i=""}=a,{iconMapped:s,label:o}=Za.find((({origins:e})=>e.some((e=>n?.includes(e)))))||{},c=ln(l)??s,d=c?Ba(c):void 0;return u(le,{className:w(t?"rounded-full":"rounded-md","border border-solid hover:border-transparent","group-data-primary:border-main-divider","hover:bg-primary-main hover:text-black","group-data-secondary:bg-white border-main-divider group-data-secondary:hover:bg-secondary-hover","group-data-gray:border-green",en(i,e)),"aria-label":o,rel:"noopener noreferrer",target:"_blank",text:i,version:r,...a,children:d&&!i?u(Ye,{image:d,imageClassName:"group-hover/media:text-white",width:"24",height:"24",asSVG:!0}):null})})),ln=e=>e?.src||e?.icon?e:void 0,an=x((({className:e="",media:t,children:l,buttonSize:a})=>p("div",{className:"font-sans",children:[u("div",{className:`flex gap-1 ${e}`,children:t?.map(((e,t)=>u(tn,{buttonSize:a,...e},String(t))))}),u(ie,{size:"text-s-light",color:"text-secondary-text",children:l})]}))),nn=x((({className:e="",description:t,href:l,icon:a,items:n=[],socialMedia:r=[],target:i,title:s,align:o="text-left",version:c="primary",...d})=>u(k,{className:w("relative p-7 min-w-[524px] min-h-[218px] h-full box-border group-data-gray:bg-main-divider/50","border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider",e),version:c,...d,children:p($a,{href:l,target:i,children:[u(bt,{className:"mb-4",title:s,description:t,headlineVersion:"S",isPadding:!1,align:o}),p("div",{className:"w-1/2 h-full flex flex-col flex-1 justify-end",children:[n.length?u(Ha,{className:"flex flex-col gap-2",itemClassName:"text-l-light",items:n}):null,r.length?u(an,{className:"pt-10",media:r}):null]}),rn(a)]})}))),rn=e=>p("div",{className:"absolute bottom-0 right-0",children:[e?.icon?u(Ye,{image:Ba(e),asSVG:!0}):null,e?.src?u(Ye,{image:e}):null]}),sn=x((e=>{const{__html:t=""}=e;return u("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})})),on=x((({className:e="",__html:t,richVersion:l="striped",...a})=>u(k,{className:w("p-9 border border-gray min-w-96",l,e),...a,children:u(sn,{__html:t})}))),cn=x((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:l=!1,renderFoldableSection:n,renderFoldButton:i})=>{const[s,o]=a(l),c=r((()=>{o((e=>!e))}),[]),d=n({isUnfolded:s,onToggle:c}),m=i?i({isUnfolded:s,onToggle:c}):null;return p("div",t?{className:e,children:[m,d]}:{className:e,children:[d,m]})})),dn=x((({className:e="",isUnfolded:t,children:l})=>{const a=s(null);return n((()=>{a.current&&(a.current.style.maxHeight=t?`${a.current.scrollHeight}px`:"")}),[t,l?.length]),u("div",{ref:a,className:`transition-max-h duration-300 overflow-hidden ${a.current||!t?"max-h-0":""} ${e}`,children:l})})),mn=x((({className:e="",title:t,icon:l,isHighlighting:a,button:n,cardCells:r=[],...i})=>{const s=r.map(xn),o=s.slice(0,1),c=s.slice(1);return p(k,{className:w("relative border border-gray min-w-[322px] p-8 flex flex-col",un(a),e),...i,children:[a?gn():null,hn(l),t?u(T,{className:"text-center pt-2",headingType:"h5",title:t}):null,n?u(le,{className:"w-full mt-4",...n}):null,r.length?u(cn,{renderFoldableSection:({isUnfolded:e})=>p("div",{children:[o,u(dn,{isUnfolded:e,children:c})]}),renderFoldButton:r.length>1?pn:null}):null]})})),hn=e=>p("div",{className:"w-[267px] min-w-[267px] self-center",children:[e?.src?u(Ye,{image:e}):null,e?.icon?u(Ye,{image:Ba(e),asSVG:!0}):null]}),un=e=>e?"mt-9 pt-[70px]":"mt-[70px] pt-7",pn=({isUnfolded:e,onToggle:t})=>p("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[u("div",{children:e?"Скрыть":"Подробнее о тарифе"}),u(me,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16",asSVG:!0})]}),xn=(e,t)=>p("div",{className:"py-5 border-b border-main-divider",children:[e?.title?u("div",{className:"text-secondary-text text-m-light opacity-80",children:e.title}):null,e?.description?u("div",{className:"text-primary-text text-h6 mt-1",children:e.description}):null]},String(t)),gn=()=>p("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[u(me,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22",asSVG:!0}),u(re,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:"ХИТ"})]}),bn="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",fn="border-gray border-solid border",vn="border-main-divider border border-t-0 border-x-0",Nn="w-[200px] mr-6",yn=x((({icon:e,image:t,title:l,link:a})=>p("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${fn} ${bn}`,role:"columnheader",children:[e&&!t?.src&&u(Ye,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:Ba(e),width:"63",height:"63",asSVG:!0}),t?.src&&u(Ye,{className:"mb-[18px]",image:t}),l?u(T,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,a?.text&&u("div",{className:"mt-auto w-full",children:u(le,{href:a.href,target:a.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:u("div",{className:"text-xs-light font-medium py-[11px]",children:a.text})})})]}))),wn={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},Cn=x((({children:e,activeIndex:t,columnWidth:l,version:a="comparison"})=>u("div",{className:"flex flex-1 overflow-hidden",children:u("div",{className:wn[a],style:{transform:`translateX(-${t*l}px)`},children:e})}))),kn=x((({children:e})=>u("div",{className:"self-start flex flex-col",role:"row",children:u("div",{className:"flex",children:e})}))),Sn=x((({colHeaders:e,activeIndex:t})=>p(kn,{children:[u("div",{className:Nn,role:"columnheader"}),u(Cn,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>u(yn,{...e},String(t))))})]}))),In=x((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:a})=>u("div",{className:`w-80 box-border flex flex-col ${fn} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${a?bn:""}`,role:"cell",children:u("div",{className:`mx-7 h-full ${vn} ${a&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>Bn(e,t,a)))})}))),Tn=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),$n=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),Bn=({label:e,description:t},l,a)=>p("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?u("h4",{className:Tn(a),children:e}):null,t?u("div",{className:$n(a),children:t}):null]},String(l)),Rn=(e=!1)=>`text-s py-7 ${vn} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,Mn=x((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:a,isFirstRow:n,isLastRow:r})=>p(kn,{children:[e?.title?u("div",{className:Rn(r),children:e.title}):null,t?.length?u(Cn,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>u(In,{cell:e,isFirstRow:n,isLastRow:r,isFillGradient:a&&0===t},String(t))))}):null]}))),Vn=x((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:a})=>{const{isScrollAvailable:n}=a;return p("div",{className:"relative",children:[e.map(((e,a,{length:n})=>u(Mn,{row:e,isFirstRow:0===a,isLastRow:a+1===n,activeIndex:l,isColoredFirstColumn:t},String(a)))),n?_t({...a,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),jn=x((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:a,isColoredFirstColumn:n})=>{const r=e?.map((({header:e})=>e||{})),i=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:i.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:a),[o,c]=Rt({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return p("div",{children:[p("div",{role:"table",children:[r?.length?u(Sn,{colHeaders:r,activeIndex:o}):null,s?.length?u(Vn,{rowData:s,isColoredFirstColumn:n,activeIndex:o,controls:c}):null]}),d?u("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),_n=x((({className:e="",title:t,rowHeaders:l,columns:n,visibleRowLength:i=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=a(!i),m=r((()=>d((e=>!e))),[]);return p(k,{className:`py-12 pl-12 overflow-hidden relative ${e}`,...o,children:[u(T,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),u(jn,{columns:n,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:i}),i?Ln({isShowAllRow:c,onClick:m}):null]})})),Ln=({isShowAllRow:e,onClick:t})=>u("div",{className:"pr-12",children:p("div",{className:"flex w-full",children:[u("div",{className:Nn}),u("button",{onClick:t,className:"mt-5 flex-1 border-gray border-solid border text-primary-text bg-white hover:border-primary-main hover:text-primary-main",children:u("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),Pn=x((({className:e="",contacts:t,info:l,version:a="secondary",...n})=>p(k,{className:`flex p-12 ${e}`,version:a,...n,children:[l?.length?zn(l):null,t?.length?zn(t):null]}))),zn=e=>u("div",{className:"flex grow basis-0",children:e.map(((e,t)=>Dn({column:e,index:t})))}),Dn=({column:e,index:t})=>e?u("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:l,button:a},n)=>p("div",{className:"mt-6 first:mt-0",children:[u(bt,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"text-left"}),l?u("div",{className:"mt-1.5 opacity-80",children:u(re,{size:"text-m",font:"font-light",children:l})}):null,a?u(le,{className:"mt-6",...a}):null]},String(n))))},`col-${String(t)}`):null,On=e=>"Image"===e?.errorContentType&&e?.image?u(Ye,{image:e.image}):"Code"===e?.errorContentType&&e.code?u("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,An=x((({className:e="",title:t,subtitle:l,error:a,button:n,...r})=>{return p(k,{className:w("flex flex-col justify-center items-center",(i=n?.text,i?"py-20 pt-3 pb-1":"mb-16 pb-2 mt-24 pt-3"),e),version:"transparent",...r,children:[u("div",{className:"flex justify-center py-20",children:On(a)}),t?u(T,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?u("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,n?.text?u(le,{className:"py-4 px-9",version:n?.version,...n,children:n.text}):null]});var i}));var En;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(En||(En={}));const Fn=new Intl.NumberFormat("ru",{style:"currency",currency:En.RUB}),Hn=e=>e?Fn.format(e):"",Un="text-left text-m-light text-secondary-text",Xn=`${Un} pl-11`,Gn={USD:"DollarIcon",EUR:"EuroIcon"},Wn=x((({className:e,exchangeCurrencyItems:t})=>p("table",{className:`h-fit w-fit ${e}`,children:[u("thead",{children:p("tr",{children:[u("th",{className:Un,children:"Валюта"}),u("th",{className:Xn,children:"Купить"}),u("th",{className:Xn,children:"Продать"})]})}),u("tbody",{children:t.map(Kn)})]}))),Kn=e=>{const t=e?.currency?.currency;return p("tr",{className:"pb-1 text-h6",children:[u("td",{className:"pt-4",children:p("div",{className:"flex items-center",children:[t?u(Ye,{image:{icon:Gn[t]},width:"24",height:"24"}):null,u("span",{className:"ml-2",children:t})]})}),u("td",{className:"pt-4 pl-11",children:Hn(e?.saleExchangeRate)}),u("td",{className:"pt-4 pl-11",children:Hn(e?.buyExchangeRate)})]},t)},Jn=x((({className:e="",address:t})=>p("div",{className:`flex ${e}`,children:[u(Ye,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),p("div",{className:"ml-3",children:[t?u("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,u("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),Yn=(e,t,l)=>{const a=Number(qn(e))*Math.pow(t,l?-1:1);return Number.isInteger(a)?a:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(a)},qn=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Zn=e=>{return(t=[[e=>e.value!==En.RUB&&e.oppositeValue!==En.RUB,()=>e.handleConvert(e.value,En.RUB)],[e=>e.value===En.RUB&&e.oppositeValue===En.RUB,()=>e.handleConvert(e.value,En.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Qn(e){const{placeholder:t,rates:l,selected:a,value:n,setValue:r,setSelected:i}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:a,text:a};return p("div",{className:"relative flex",children:[u($,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:n,onChange:r}),s.length?u(pe,{isBorder:!1,onChange:e=>i(e.key),options:s,value:o}):null]})}const er=x((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:n})=>{const[i,s]=a({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||En.RUB,selectBuy:l?.[0]?.currency?.currency||En.USD}),o=r((e=>s((t=>({...t,...e})))),[]);return p("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[Qn({placeholder:"Хочу продать",rates:l,selected:i.selectSell,setSelected:tr(i,o,l),value:i.inputSell,setValue:e=>ar(o,l)(e,i.selectSell,i.selectBuy)}),Qn({placeholder:"Получу",rates:t,selected:i.selectBuy,setSelected:lr(i,o,t),value:i.inputBuy,setValue:e=>nr(o,t)(e,i.selectBuy,i.selectSell)}),n?.text?u(le,{className:"py-4 mr-1",version:n?.version,...n,children:n.text}):null]})})),tr=(e,t,l)=>a=>{t({selectSell:a}),Zn({value:a,oppositeValue:e.selectBuy,handleConvert:(a=e.selectSell,n=e.selectBuy)=>{ar(t,l)(e.inputSell,a,n)}})},lr=(e,t,l)=>a=>{t({selectBuy:a}),Zn({value:a,oppositeValue:e.selectSell,handleConvert:(a=e.selectBuy,n=e.selectSell)=>nr(t,l)(e.inputBuy,a,n)})},ar=(e,t)=>(l,a,n)=>{e({inputSell:qn(l),selectBuy:n});const r=t.find((e=>e.currency?.currency===n))?.buyExchangeRate||t.find((e=>e.currency?.currency===a))?.saleExchangeRate;r&&e({inputBuy:String(Yn(l,r,a===En.RUB)||"")})},nr=(e,t)=>(l,a,n)=>{e({inputBuy:qn(l),selectSell:n});const r=t.find((e=>e.currency?.currency===n))?.saleExchangeRate||t.find((e=>e.currency?.currency===a))?.buyExchangeRate;r&&e({inputSell:String(Yn(l,r,a===En.RUB)||"")})};const rr=async e=>{const t=await ir(),l=t?.code||"000";return{region:t,exchangeRates:await sr(e,l)}},ir=async()=>{try{return await j("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},sr=async(e,t)=>{try{return await j(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},or=x((({className:e="",title:t="Курсы обмена валют",button:l,...a})=>{const{exchangeRates:n}=function(){const{data:e}=R("/api/v1/exchangerates",rr);return e||{}}(),r=cr(n?.exchangeRate?.currencies),i=r.filter((e=>e.buyExchangeRate));i.unshift({currency:{currency:En.RUB}});const s=r.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:En.RUB}}),u(k,{className:`p-9 box-border min-h-80 ${e}`,...a,children:u(Ma,{title:u(T,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:p("div",{className:"flex",children:[p("div",{className:"mr-14 pt-4",children:[r?u(Wn,{className:"mb-[30px]",exchangeCurrencyItems:r}):null,u(Jn,{address:n?.address})]}),r.length&&i.length&&s.length?u(er,{className:"grow",currencyRatesBuy:i,currencyRatesSell:s,button:l}):null]})})})})),cr=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[],dr=x((({className:e="",label:t,icon:l,dataTheme:a="",disabled:n=!1,onClick:r})=>p("button",{className:w("flex justify-center w-full px-0 py-5 border border-transparent outline-none focus:border-primary-text",n?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),onClick:r,disabled:n,"data-theme":a,children:[u("span",{className:"text-h4 pr-3",children:t}),l?u(Ye,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),mr=({isUnfolded:e,onToggle:t})=>u(dr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),hr=["ArrowDownIcon","ArrowUpIcon"],ur="grid grid-cols-12 gap-1 border-box",pr=x((({label:e="",filtrationState:t={},topItemsCount:l=0,block:a,notFound:n,...r})=>{const i=a?.blocks?.filter((e=>{return l=t,a=e.content||{},Object.entries(l).map((([e,t])=>Array.isArray(t)?((e,t)=>l=>void 0===t[e]||t[e]?.every((t=>l[e]?.includes(t))))(e,l):((e,t)=>l=>void 0===t[e]||t[e]===l[e])(e,l))).every((e=>e(a)));var l,a}))||[],[s,o]=l>0?[i.slice(0,l),i.slice(l)]:[i,[]];return p("div",{children:[u("div",{className:w(i.length?"hidden":"block"),children:n?xr(n):null}),p("div",{className:w(i.length?"":"hidden"),children:[u("div",{className:w("mb-1",ur),children:ql(s,{...r.options,parent:a})}),u(cn,{renderFoldableSection:({isUnfolded:e})=>u(dn,{className:w(ur,e?"mb-1":""),isUnfolded:e,children:ql(o,{...r.options,parent:a})}),renderFoldButton:({isUnfolded:t,onToggle:a})=>u(dr,{className:w(l<1?"hidden":""),disabled:!o?.length,label:e,icon:hr[Number(t)],dataTheme:r.options?.page?.colorPalette,onClick:a})})]})]})}));function xr({title:e,description:t}){return p("div",{className:"bg-white py-20",children:[e?u("div",{className:"mb-2",children:u(re,{align:"text-center",children:u(ie,{size:"text-h4",children:e})})}):null,t?u(re,{size:"text-xl",font:"font-light",align:"text-center",children:t}):null]})}const gr=x((({value:e,onChange:t,items:l=[],multiple:a})=>l.map((l=>u(Ne,{text:l.title,value:[e].flatMap((e=>e)).includes(l.value),onChange:()=>(l=>{if(a){const a=e?.includes(l);t&&t(a?e?.filter((e=>e!==l)):[...e||[],l])}else t&&t(e===l?void 0:l)})(l.value),type:a?"checkbox":"radio"},l.value))))),br=(e,t)=>l=>{const a=e[l],n=a?.type;return"array"===n?fr(l,t)(a):null},fr=(e,t)=>l=>{const a=l?.items?.enum?.map(((e,t)=>({value:e,title:l?.items?.enumNames?.[t]||""})))||[];return p("div",{children:[l?.title?u("div",{className:"mb-4",children:u(ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:l.title})}):null,u(gr,{items:a,multiple:!0,...t(e)})]},e)},vr=x((({className:e,filtrationSchema:t={},resetButton:l,...n})=>{const{formState:i,register:o,resetForm:c}=((e={})=>{const[t,l]=a(e),n=s({}),i=r((()=>l({})),[]);return{formState:t,register:e=>n.current?(n.current[e]||=t=>{l((l=>({...l,[e]:t})))},{value:t?.[e],onChange:n.current[e]}):{},resetForm:i}})();return p(k,{className:w(e),version:"transparent",...n,children:[p("form",{className:"flex justify-between bg-white p-9 mb-1",children:[u("div",{className:"flex gap-11",children:Object.keys(t).map(br(t,o))}),l?u("div",{children:u(le,{className:"w-72",onClick:c,...l})}):null]}),u(pr,{filtrationState:i,...n})]})}));function Nr(e,t={}){const{data:l}=R(`/wcms-resources/${e}.json`,j,{fallback:t});return l||{}}vr.childrenTypes=["ProductTile"],vr.childSchema=e=>e?.filtrationSchema||{};const yr={"bg-white":"color",transparent:"white"},wr={"bg-white":"text-primary-main",transparent:"text-white"},Cr=(e,t,l)=>u(Ye,t?.src?{image:t,className:wr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:yr[e]},className:wr[e],width:l?.width,height:l?.height,asSVG:!0}),kr={"bg-white":"text-primary-text",transparent:"text-white"},Sr=(e,t,l)=>u("span",{className:`${kr[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),Ir=x((({className:e="",href:t,logo:l,children:a=l?.title,targetBlank:n,bgColor:r="bg-white",showTitle:i=!0})=>p("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:n?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[Cr(r,l?.image,{width:"40",height:"45"}),i?Sr(a||l?.title,r):null]}))),Tr=x((({className:e,onClick:t})=>u("button",{className:w("visible peer-placeholder-shown:invisible w-6 h-6 p-1 bg-transparent border-none",e),onClick:t,title:"Закрыть",children:u(Ye,{image:{icon:"CloseIcon"},width:"24",height:"24"})})));function $r(e){throw new Error(e)}function Br({onOpen:e,onClose:t}={}){n((()=>f.subscribe("dialog",(l=>{switch(l.type){case"open":e&&e(l);break;case"close":t&&t();break;default:$r(l)}}))),[e,t])}function Rr(e,...t){return e.map(((e,l)=>[e,...t.map((e=>e[l]))]))}const Mr=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:l,s1Matches:a,s2Matches:n}=function(e,t){const l=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),a=new Array(e.length),n=new Array(t.length);let r=0;for(let i=0;i<e.length;i++){const s=Math.max(0,i-l),o=Math.min(i+l,t.length-1);for(let l=s;l<=o;l++)a[i]||n[l]||e[i]!==t[l]||(r++,a[i]=!0,n[l]=!0)}return{m:r,s1Matches:a,s2Matches:n}}(e,t);if(0===l)return 0;const r=function(e,t,{s1Matches:l,s2Matches:a}){let n=0;for(let r=0,i=0;r<e.length;r++){if(!l[r])continue;let s=i;for(;s<t.length;s++)if(a[s]){i=s+1;break}e[r]!==t[s]&&n++}return n}(e,t,{s1Matches:a,s2Matches:n}),i=(l/e.length+l/t.length+(l-r/2)/l)/3,s=i>.7?.1*function(e,t){let l=0;for(;e[l]===t[l]&&l<4;)l++;return l}(e,t):0;return i+s*(1-i)};const Vr=(e,t)=>(l,a)=>{for(const[n,r]of a)l.set(n,e(l.get(n)||t,r));return l},jr=e=>e.toLowerCase().split(/[^0-9a-zа-я-]+/).filter((e=>e.length>=3&&!/[0-9a-z]/.test(e))),_r=e=>t=>e.map((([e,l])=>[Mr(t)(e),l])).filter((([e])=>e>=.8)).map((([e,t])=>Pr(t,e))).reduce(Vr(Math.max,0),new Map),Lr=e=>t=>{return Rr(t,t.map((({title:e})=>e)).map((e=>t=>{const l=jr(t||"");return l.length?((e=[])=>e.reduce(((e,t)=>e+t),0))(e.map((e=>il(l.map(Mr(e)))))):0})(e))).sort((a=([,e])=>e,l=(e,t)=>a(e)-a(t),(e,t)=>-l(e,t))).map((([e])=>e));var l,a},Pr=(e,t)=>new Map(e.map((e=>[e,t]))),zr=({basePathList:e=["/"],initialQuery:t="",wasOpened:l})=>{const[r,s]=a(t||"");n((()=>{null!=t&&s(t)}),[t]);const o=i((()=>e.map((e=>l?e:null))),[l,...e]),{data:c}=R(o,Dr),[d,m]=a(null);return((e,t,l=300)=>{n((()=>{const t=setTimeout(e,l);return()=>{clearTimeout(t)}}),t)})((()=>{c&&m(c.map((e=>t=>{const{corpus:l,dictionary:a}=t||{};if(!(e&&l?.length&&a&&Object.keys(a).length))return[];const n=jr(e);if(!n.length)return[];const r=Object.entries(a),i=[...n.map(_r(r)).reduce(Vr(((e,t)=>e+t),0),new Map).entries()].filter((([,e])=>e>=.799*n.length)).map((([e])=>l[e]));return Lr(n)(i)})(r)))}),[c,r]),[d,{value:r,onChange:s}]},Dr=async(...e)=>(await Promise.allSettled(e.map((e=>V(A(e,"/","search.index.json")))))).map((e=>"fulfilled"===e.status?e.value:{})),Or=x((({className:e,isOpened:t,head:l,children:a,onClose:r})=>(n((()=>{const e=({key:e})=>{"Escape"===e&&r&&r()};return globalThis.document?.addEventListener("keydown",e),()=>{globalThis.document?.removeEventListener("keydown",e)}}),[r]),t?u("div",{className:w("fixed inset-0 bg-white text-l-light z-50 overflow-x-hidden overflow-y-scroll no-scrollbar",e),role:"dialog",children:p("div",{className:"relative container pb-12 min-h-full",children:[p("div",{className:"sticky bg-white pt-6 top-0",children:[u(Tr,{className:"absolute top-3 -right-6",onClick:r}),l]}),a]})}):null)));function Ar(e=!1){const[t,l]=a(e),n=r((()=>l(!0)),[]),i=r((()=>l(!1)),[]),s=r((()=>l((e=>!e))),[]);return[t,{setValue:l,setTrue:n,setFalse:i,toggle:s}]}function Er(e){const[t,{setTrue:l,setFalse:n}]=Ar(),[i,o]=a({id:e}),c=s(t);c.current||=t;Br({onOpen:r((t=>{t.id===e?(o(t),l()):n()}),[e]),onClose:n});const d=r((()=>{n(),f.fire("dialog",{type:"close"})}),[]);return{...i,isOpened:t,wasOpened:c.current,onClose:d}}const Fr=x((({className:e,topItems:t})=>{const l=X(!0);return u("div",{className:w("flex items-start justify-between",e),children:t?.map(l).map(Hr)})})),Hr=(e,t)=>{const{text:l,items:a,href:n,target:r,onClick:i}=e;return p("div",{className:"flex flex-col gap-3.5 w-1/4",children:[u("a",{className:"leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:n,target:r||"_self",onClick:i,children:l||`Раздел ${t}`}),a?.map(((e,t)=>u(Ur,{...e,basePath:n,index:t},String(t))))]},String(t))},Ur=x((({text:e,index:t,basePath:l,...a})=>{const n=!(!c.BASE_PATH||!l)&&!c.BASE_PATH.startsWith(l),r=X(n),{href:i,target:s,onClick:o}=r(a);return u("a",{className:w("text-l-light text-secondary-text hover:text-primary-main no-underline","overflow-x-hidden overflow-ellipsis whitespace-nowrap"),href:n?A(l,i):i,target:s||"_self",onClick:o,children:e||`Раздел ${t}`})})),Xr=x((({className:e,isMobile:t,value:l,autoFocus:a,onChange:n,onFocus:i})=>{const s=r((e=>{n&&n(e.target?.value||"")}),[n]);return p("div",{className:w("font-sans relative",e),role:"form",children:[u("div",{className:"absolute h-full flex items-center pl-4 pointer-events-none",children:u(Ye,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),u("input",{className:w("h-12 pl-12 w-full 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",t?"":"h-full"),value:l,type:"text",name:"search-bar-input",placeholder:"Поиск по сайту",autoFocus:a,onChange:s,onFocus:i})]})})),Gr="search",Wr=x((({topItems:e})=>{const t=Er(Gr),l=e?.map((e=>e.href||"/")),[a,r]=zr({basePathList:l,initialQuery:t.message,wasOpened:t.wasOpened}),s=i((()=>Kr(e)(a)),[e,a]);return n((()=>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(Or,{...t,head:u(Xr,{className:"my-5",autoFocus:!0,...r}),children:u(Fr,{topItems:s})})})),Kr=e=>t=>e?.length&&t?.length?Rr(e,t).map((([e,t])=>({...e,items:t?.map((({title:e,uri:t})=>({text:e,href:A("/",t)})))}))):[];const Jr=x((({className:e,isMobile:t})=>{const[l,n]=a(""),i=r((()=>n("")),[]);Br({onClose:i});const{open:s}=P(Gr),o=r((e=>{n(e),Yr(e)&&s(e)}),[]);return p("div",{className:e,children:[u(Xr,{isMobile:t,value:l,onChange:o}),t?u(Tr,{className:"absolute top-2 right-3",onClick:i}):null]})})),Yr=e=>e&&e.length>=3,qr=x((e=>u(Jr,{...e}))),Zr=x((({className:e="",items:t,hasButton:l})=>p("div",{className:e,children:[t?.length?t.map(Qr):null,l?u(le,{version:"primary",className:"mb-6 w-full",href:"https://www.rshb.ru/feedback/question/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),Qr=(e,t)=>{const{type:l,text:a,description:n}=e;return p("div",{className:"mb-4",children:[u("div",{children:ei(l,a)}),u("div",{className:"mt-1 text-s-light text-secondary-text",children:n})]},String(t))},ei=(e,t="")=>{switch(e){case"tel":return u("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${ti(t)}`,children:t});case"email":return u("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return u("span",{children:t})}},ti=e=>e.replaceAll(/\D/g,""),li=x((({className:e="",index:t,text:l,...a})=>{const n=X(),{href:r,target:i,onClick:s}=n(a);return u("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:r,target:i,onClick:s,children:l||`Документ ${t}`})})),ai=x((({className:e="",links:t})=>u("div",{className:e,children:t?.length?u("div",{className:"flex justify-between items-center gap-5 py-5 border-solid border-x-0 border-y border-y-main-divider",children:t.map(((e,t)=>u(li,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),ni=x((({className:e="",index:t,...l})=>{const a=X(),{href:n,target:r,text:i,onClick:s}=a(l);return u("a",{className:`text-xs-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px] ${e}`,href:n,target:r,onClick:s,children:i||`Документ ${t}`})})),ri=x((({className:e="",links:t})=>p("div",{className:e,children:[u("div",{className:"pt-5",children:u("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?u("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>u(ni,{index:t,...e},String(t))))}):null]}))),ii="w-[204px]",si=x((({className:e="",...t})=>{const l=t.options?.page?.fallback,a=Nr(c.SITEMAP||"sitemap",l),{documents:n,relatedEnterprises:r,contacts:i,socialMedia:s,mobileApps:o,logo:d}=Nr(c.FOOTER||"footer",l);return p(k,{tag:"footer",className:`p-9 ${e}`,...t,children:[p("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[u(Ir,{className:ii,logo:d}),u(qr,{className:"grow"})]}),p("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[p("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[u(Zr,{items:i,hasButton:!0}),u(an,{media:s,children:"Соцсети"}),u(an,{className:"mt-6",media:o,children:"Мобильное приложение"})]}),u(Fr,{className:"flex-grow",topItems:a?.topItems})]}),u(ai,{className:"mt-[98px]",links:r}),u(ri,{links:n})]})})),oi=x((({className:e="",title:t,description:l,calendar:a,...n})=>p(k,{className:`p-12 ${e}`,...n,children:[u(bt,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M"}),a?ci(a):null]}))),ci=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 mt-13",children:[u("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>di(e,t)))}),u("div",{className:"flex w-full",children:l.map(((e,t)=>p("div",{className:"pr-[11px] mr-3 border-r border-main-divider last:border-r-0 last:pr-0 last:mr-0",style:{flexBasis:e.flexBasis},children:[u("div",{className:"flex",children:mi(e)}),p("div",{className:"text-s-light text-primary-text mt-3",children:[u("span",{children:e.text})," ",u("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},di=(e,t)=>e.month?.map(((e,l)=>u("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),mi=e=>e.month?.map((e=>e.image?.src?u("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:u(Ye,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),hi=864e5;function ui(e,t,l=globalThis?.localStorage){const a=r((async(...a)=>{const n=`async:${e}`,r=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<hi?t:void 0}(l.getItem(n));if(r)return r;const i=await t(...a);return l.setItem(n,JSON.stringify({data:i,timestamp:Date.now()})),i}),[e,t]);return R(e,a)}const pi=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}},xi=e=>({href:t})=>O(z(t)?e.href:e.pathname).startsWith(O(t));const gi=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-4 max-w-[170px] gap-3.5 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-4 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"})]}))),bi="location",fi=x((({currentLocation:e,onChangeLocation:t,foreignOffices:l})=>{const n=Er(bi),[i,s]=a(""),o=Ni(function(){const{data:e}=R("/api/v1/regions",j);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;for(const a of e){const e=t(a),n=l.get(e)||[];l.set(e,[...n,a])}return l})(o,vi),d=r((e=>{n.onClose&&n.onClose(),t&&t(e)}),[n.onClose,t]);return p(Or,{...n,head:p("div",{children:[u(yi,{currentLocation:e,onChangeLocation:d}),u(gi,{onSearch:s,searchTerm:i,className:"mb-7"})]}),children:[i&&i.length>=3?u("div",{children:o.filter((({name:e})=>e&&Mr(e.toLowerCase())(i.toLowerCase())>=.8)).map(Ci(d))}):u("div",{className:"columns-5",children:Array.from(c.entries()).map(wi(d))}),u(ki,{foreignOffices:l})]})})),vi=e=>e.name?.charAt(0)||"",Ni=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),yi=x((({currentLocation:e,onChangeLocation:t})=>e?p("div",{className:"mb-4",children:[u(ie,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),u("button",{className:"cursor-pointer",onClick:()=>{t&&t(e)},children:u(ie,{color:"text-primary-main",children:e.name})})]}):null)),wi=e=>([t,l])=>p("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[u("div",{className:"mb-2.5",children:u(ie,{size:"text-h6",children:t})}),l.map(Ci(e))]},t),Ci=e=>t=>u("div",{className:"mb-1",children:u("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(t)},children:t.name||""})},t.id),ki=x((({foreignOffices:e})=>e?.length?p("div",{className:"border-t border-main-divider mt-7 pt-7",children:[u("div",{className:"mb-4",children:u(ie,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),u("div",{className:"flex gap-10",children:e.map(((e,t)=>u(Si,{...e},String(t))))})]}):null)),Si=x((({icon:e,...t})=>{const l=X(),{text:a,target:n,href:r,onClick:i}=l(t);return p("div",{className:"flex gap-x-3",children:[e?u(Ye,{pathPrefix:"/wcms-resources/",image:e}):null,a?u("a",{className:"hover:text-primary-hover",href:r,target:n,onClick:i,children:a}):null]})})),Ii=x((({className:e="",active:t,flat:l,children:a,...n})=>{const r=X(!0),{href:i,target:s,text:o,onClick:c}=r(n);return u("a",{className:w(Ti(t,l),e),href:i,target:s,onClick:c,rel:"noopener noreferrer","aria-label":o,children:u("span",{className:$i(t,l),children:o||a})})})),Ti=(e=!1,t=!1)=>w("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-4 py-2"),$i=(e=!1,t=!1)=>w("font-sans text-s-light",e?"text-primary-main":w(t?"text-primary-text":"text-secondary-text","hover:text-primary-main"),"group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Bi=x((({className:e,isRounded:t,disabled:l,ariaLabel:a,image:n,onClick:r})=>u("button",{className:w("group/btn border-0 p-0 flex items-center bg-inherit",t?"w-8 h-8 text-secondary-light hover:text-secondary-hove":"w-6 h-6 text-primary-text hover:text-primary-main","group-data-transparent:text-white",e),type:"button",disabled:l,"aria-label":a,onClick:r,children:u(Ye,{image:n,className:w("h-full",t?"bg-main-divider/20 rounded-full":""),imageClassName:"group-hover/btn:text-primary-hover group-hover/btn:invert-0",asSVG:!0})}))),Ri=e=>globalThis[e];function Mi(e,t){const[l,i]=a(),s=r((()=>i(Ri(e))),[e]);return n((()=>{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),i(void 0)}}if(!Ri(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}const Vi={personal:"//chat.mes.rshb.ru/assets/js/webchat_rshb",business:""},ji=x((e=>{const[t,{setTrue:l}]=Ar();return t?u(_i,{...e}):Li({...e,onClick:l})})),_i=x((({chat:e="personal",...t})=>((e=>{n((()=>globalThis.localStorage?.setItem("webchat-keep-open",String(Date.now()))),[]),Mi("chatbot",Vi[e])})(e),Li(t)))),Li=({className:e,iconVersion:t,onClick:l})=>u(Bi,{className:w("text-page__btn-chat",e),image:{icon:"HeadphonesIcon",iconVersion:t},ariaLabel:"Чат",onClick:l}),Pi=x((({className:e,version:t,locationName:l,officesLink:a})=>{const n="transparent"===t?"white":"black",{open:i}=P(bi),s=r((()=>i()),[]),{open:o}=P(Gr),d=r((()=>o()),[]);return p("div",{className:w("flex items-center gap-5",e),children:[u(Ii,{flat:!0,href:"#",text:l,onClick:s}),a?u(Ii,{flat:!0,href:a,text:"Офисы и банкоматы"}):null,u(Bi,{image:{icon:"LoupeIcon",iconVersion:n},ariaLabel:"Поиск",onClick:d}),c.CHAT_BOT?u(ji,{iconVersion:n,chat:c.CHAT_BOT}):null]})})),zi=x((({className:e="",items:t,activeItem:l})=>{const n=X(),[i,s]=a(!1),o=r((()=>s((e=>!e))),[]),c=ce(r((()=>s(!1)),[]));return p("div",{className:w(i?"bg-white rounded-md shadow-blue-gray":"",e),ref:c,children:[u("button",{className:"group/btn flex justify-between items-center h-6 ml-6","aria-label":""+(i?"Скрыть другие разделы":"Показать другие разделы"),onClick:o,children:Array(3).fill(null).map(((e,t)=>u("div",{className:"w-[3px] h-[3px] rounded mr-1 bg-primary-text group-hover/btn:bg-primary-hover group-data-transparent:bg-white"},String(t))))}),u("div",{className:w("flex flex-col rounded-md bg-white p-6 pb-2",i?"":"hidden"),"aria-hidden":!i,children:t?.map(((e,t)=>{const{text:a,...r}=e;return u("a",{className:w("text-l-light pb-4 hover:text-primary-main",e===l?"text-primary-main":""),...n(r),children:a},e.href||String(t))}))})]})})),Di=x((({className:e="",active:t,dataItemName:l,children:a,...n})=>{const r=X(),{href:i,target:s,text:o,onClick:c}=r(n);return p("a",{className:w("relative inline-block bg-transparent text-center no-underline",e),href:i,target:s,"data-item-name":l,onClick:c,children:[u("span",{className:Oi(t),children:o||a}),t?u("div",{className:"absolute left-0 right-0 -bottom-3 h-0.5 bg-primary-main group-data-transparent:bg-transparent"}):null]})})),Oi=(e=!1)=>w("font-sans text-l-light",e?"text-primary-main":"text-primary-text hover:text-primary-main","group-data-transparent:text-white group-data-transparent:hover:text-primary-hover"),Ai=x((({observerOptions:e,onVisibilityChange:t,children:l,...a})=>{const n=v(r((e=>{if(!e.length||!t)return;const l=e[e.length-1];t(l.isIntersecting)}),[t]),e);return u("span",{ref:n,children:u(Di,{...a,children:l})})})),Ei=x((({subItems:e=[]})=>{const t=(e=>(t=[])=>{const l=t?.filter(xi(e));return l?.length?rl((e=>e.href?.length||0))(l):void 0})(U())(e),[l,n]=a(e.length),r=e.slice(l),o=s(null),c={rootRef:o},d=i((()=>e.map(((e,t)=>e=>{n(e?Fi(t):Hi(t))}))),[e]);return p("nav",{className:"relative mt-6",children:[u("div",{ref:o,className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:e.map(((e,a)=>u(Ai,{className:w("mr-8",l-1<a?"invisible":""),active:e===t,observerOptions:c,onVisibilityChange:d[a],...e},String(a))))}),r.length?u(zi,{className:"absolute w-52 -top-4 right-0 pt-4 z-40",items:r,activeItem:t}):null]})})),Fi=e=>t=>Math.max(t,e+1),Hi=e=>t=>Math.min(t,e),Ui={"bg-white":"primary",transparent:"transparent"},Xi=x((({bgColor:e="bg-white",className:t,showSubMenu:l=!0,version:i=Ui[e],...s})=>{const o=U(),{topItems:d,logo:m,defaultLocation:h,foreignOffices:x,officesLink:g}=Nr(c.SITEMAP||"sitemap",s.options?.page?.fallback),b=d?.find((e=>xi(c.BASE_PATH?{pathname:c.BASE_PATH}:e))(o)),[f,v]=function(e="Москва"){const t=pi(),[l,i]=a(t?.region??{name:e}),{data:s}=ui("/api/v1/region",j);return n((()=>{i(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[l,r((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),i(e)}),[])]}(h);return p(k,{tag:"header",className:w("pt-6 px-20",l&&b?.items?.length?"pb-4":"pb-5",t),version:i,...s,children:[p("div",{className:"container",children:[p("div",{className:"flex items-center",children:[u(Ir,{className:"mr-8",bgColor:e,logo:m}),d?.map(((e,t)=>u(Ii,{active:e===b,...e},String(t)))),u(Pi,{version:i,className:"ml-auto",locationName:f.name,officesLink:g})]}),u("div",{className:w("mt-6 h-px bg-main-divider","transparent"===i?"opacity-30":"")}),l&&b?.items?.length?u(Ei,{subItems:b.items}):null]}),u(Wr,{topItems:d}),u(fi,{currentLocation:f,foreignOffices:x,onChangeLocation:v})]})})),Gi={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},Wi=x((({className:e="",gap:t="XS",isPadding:l=!1,version:a="transparent",isTheme:n=!1,...r})=>u(k,{className:w("grid grid-cols-12",l?"p-12":"",Gi[t],e),version:a,isTheme:n,...r,children:Zl(r)})));Wi.childrenTypes={exclude:["HorizontalLayout"]};const Ki=x((e=>{const{className:t,image:l,...a}=e;return u(k,{className:t,...a,children:u(Ye,{image:l})})})),Ji=x((({className:e="",cards:t=[],button:l})=>{const[n,i]=a(0),s=r((e=>i(e)),[]),o=t.length,[c,d]=Rt({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?Yi({activeIndex:c,cards:t,selectedCardIndex:n,onClick:s}):null,_t({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),m?u("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,h?u("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),u(le,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function Yi({activeIndex:e,cards:t,selectedCardIndex:l,onClick:a}){const n=460*e,r=t.length>2?"justify-start":"justify-center";return u("div",{style:{transform:`translateX(-${n}px)`},className:"duration-1000 px-12",children:u("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${r}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:a}){return p("button",{type:"button",onClick:a,className:"p-[30px] min-w-[460px] flex items-center bg-white border-solid border relative "+(l?"shadow-dark-blue border-primary-main":"ease-in duration-300 border-gray"),children:[e?.icon?u(Ye,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,p("div",{className:"flex gap-3.5",children:[e?.sum?qi("страховая сумма",e.sum):null,e?.fee?qi("страховой взнос",e.fee):null]}),Zi(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>a(t)})))})})}function qi(e,t){return p("div",{className:"flex flex-col text-left whitespace-pre",children:[p("span",{className:"text-h6",children:[_e(t)," ₽"]}),u("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Zi(e){return e?u(Ye,{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 Qi=x((({className:e="",title:t,insuranceTabs:l=[],button:n,...i})=>{const[s,o]=a(0),c=r((e=>o(e)),[]);return p(k,{className:`box-border py-12 overflow-hidden relative w-100 ${e}`,...i,children:[t?u(T,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?u("div",{className:"p-1.5 bg-secondary-light w-fit mx-auto mb-7 rounded-md",children:l.map(((e,t)=>function({title:e,i:t,isActive:l,onClick:a}){return u("button",{type:"button",onClick:a,"aria-label":e,className:"box-border px-4 py-3 text-m-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:es({insuranceTabs:l,button:n})})]})})),es=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>u(Ji,{button:t,cards:e},String(l)))):null};function ts(e){return t=>t.reduce(((t,l,a)=>t.length?t.concat({...e,key:a},l):[l]),[])}const ls={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},as={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},ns=x((e=>{const{className:t="",items:l,isDotted:a,investmentZeroColumn:n,investmentColumns:r,...i}=e,s=r?[...r]:[];return n&&s.unshift(n),u(k,{className:`px-9 py-12 ${t}`,...i,children:p("div",{className:"container text-m-light",children:[s?.length?p("div",{children:[p("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[ts(u("div",{className:"w-px h-4 bg-gray"}))(s.map(rs)),u("div",{className:"absolute right-[30px] w-px h-4 bg-gray"})]}),u("div",{className:"border-t border-gray -mt-2 ml-9 mr-8"}),u("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(os)})]}):null,l?.length?u(Ha,{className:"mt-9 text-l-light max-w-[657px]",items:l,itemClassName:"mb-[7px]",isDotted:a}):null]})})})),rs=(e,t,l)=>{const a=1===t,n=t===l.length-1;return u("div",{className:`${is(a,n,e.cells)}`,children:e.cells?.length?u("div",{className:"w-full "+(n?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(ss)}):null},`column_${t}`)},is=(e,t,l=[])=>[l.length?"flex-1":"flex-0",!l.length||e||t?"":"pl-2.5",l.length&&!t?"pr-2.5 pb-8":"pb-[22px]"].join(" "),ss=(e,t)=>{const l=e.cellSize||"XS",a=e.cellColor||"green";return e.text?u("div",{className:`flex-1 flex items-center justify-center relative py-2 ${as[l]} ${ls[a]} ${"XS"===l?"px-3":"px-11"}`,children:u("div",{className:"text-center",children:e.text})},`cell_${t}`):null},os=(e,t,l)=>{const a=0===t,n=t===l.length-1;return u("div",{className:`flex-1 max-w-[180px] text-center px-2 ${a?"pl-9":""} ${n?"mr-3.5":" "}`,children:e.title},`title_${t}`)},cs=x((({className:e,iconClassName:t,textClassName:l,suffixClassName:a,doc:n,icon:r})=>{const{text:i,fileSize:s,...o}=n;return p("a",{className:e,role:"link",...o,children:[r?u(Ye,{className:t,image:Ba(r),width:"24px",height:"24px",asSVG:!0}):null,i?p("span",{className:l,children:[i,u("span",{className:a,children:o?.href&&ds(ms(o.href),s)})]}):null]})})),ds=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),ms=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},hs=x((({className:e="",doc:t,icon:l})=>u(cs,{className:`flex h-full box-border ${e}`,iconClassName:"mr-2.5 min-w-6 min-h-6",textClassName:"self-center text-l-light",suffixClassName:"text-secondary-text group-hover/item:text-primary-main",doc:t,icon:l}))),us=x((({className:e,documents:t,columnsMode:l="double",icon:a})=>t?.length?u("div",{className:e,role:"list",children:t.map(((e,t)=>u("div",{className:"double"===l?"basis-[calc(50%-20px)]":"",role:"listitem",children:u(hs,{className:"group/item flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:a})},String(t))))}):null)),ps={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},xs=x((({className:e="",title:t,description:l,align:a="text-center",documents:n,icon:r={icon:"DocIcon"},columnsMode:i="double",...s})=>p(k,{className:w("p-12",e),...s,children:[u(bt,{className:"!p-0",title:t,description:l,align:a,headlineVersion:"M",as:"h2"}),u(us,{className:`mt-8 ${ps[i]}`,columnsMode:i,documents:n,icon:r})]}))),gs=e=>{const t="col-span-",l=e?.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function bs(e=""){const t=gs(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const fs=x((({className:e="",title:t="Мобильное приложение",qr:l,buttons:a,version:n="primary",items:r,image:i,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const m="secondary"===n?"p-3.5 min-w-[120px]":"min-w-[92px]";return p(k,{className:`flex justify-between p-12 box-border relative min-h-80 ${bs(e)} ${e}`,version:n,...d,children:[p(Ma,{className:"z-10",title:t?u(T,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full ${wt[o]}`}):null,buttons:ht(a,{className:"mt-8",buttonClassName:"min-w-[168px]"}),children:[Ns(c),p("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?u("div",{className:`flex justify-center mr-5 bg-white rounded-md ${m}`,children:u(Ye,{className:"w-fit",image:l})}):null,vs(r)]})]}),i?.src?u("div",{className:"absolute right-0 bottom-0",children:u(Ye,{image:i})}):null]})})),vs=e=>e?.length?u(Ha,{items:e,itemClassName:"text-l-light mb-2 last:mb-0"}):u("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),Ns=e=>e?u("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null,ys=[{coords:[55.77,37.46],text:"Трактир"},{coords:[55.66,37.48],text:"Трактор"},{coords:[55.65,37.42],text:"Ресторан"},{coords:[55.64,37.54],text:"Музей"},{coords:[55.54,37.52],text:"Библиотека"},{coords:[55.53,37.56],text:"Школа"},{coords:[55.61,37.61],text:"Аптека"},{coords:[55.8,37.58],text:"Бар"},{coords:[55.71,37.35],text:"Институт"},{coords:[55.74,37.57],text:"Университет"},{coords:[55.58,37.69],text:"Больница"},{coords:[55.57,37.7],text:"Цирк"},{coords:[55.55,37.64],text:"Магазин"},{coords:[55.5,37.75],text:"Булочная"},{coords:[55.81,37.73],text:"Полиция"},{coords:[55.73,37.68],text:"Салон красоты"},{coords:[55.86,37.76],text:"Баня"},{coords:[55.38,37.69],text:"Гараж"},{coords:[55.91,37.5],text:"Дом"},{coords:[55.62,37.32],text:"Прачечная"},{coords:[55.85,37.41],text:"Стадион"},{coords:[55.67,37.24],text:"Вокзал"},{coords:[55.79,37.41],text:"Кафе"}];function ws(e,t,l){t.geoObjects.removeAll();const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),n=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:a,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),r=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));n.add(r),t.geoObjects.add(n),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Cs={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"},ks=e=>u("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(Cs).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),Ss={border:"border border-transparent rounded-md",position:"relative flex items-center",font:"text-center font-sans",shadow:"shadow-[0_4px_25px_rgba(0,0,0,0.07)]"},Is=(e,t,l)=>p("div",{className:`${Object.values(Ss).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[u(me,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",asSVG:!0,className:"absolute left-4"}),u("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const a=t.target?.value?t.target?.value.toLowerCase():"";if(a){const t=e.filter((e=>e.text.toLowerCase().indexOf(a)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),Ts={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"},$s=(e,t,l)=>u("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(Ts).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:u(me,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Bs={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"},Rs=x((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return u("div",{onClick:()=>{const l=e.current.getZoom(),a="in"===t?l+1:l-1;e.current.setZoom(a,{checkZoomRange:!0})},className:`${Object.values(Bs).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:u(me,{name:l,width:"20",height:"16"})})})),Ms={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"},Vs=x((({points:e,className:t="",zoom:l=5,showSearchField:r=!1})=>{const i=s(null),o=Mi("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${c.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),[d,m]=a(),[h,x]=a(Ps(ys)),g=js(e);if(n((()=>{i?.current||o?.ready((()=>{i.current=new o.Map("map",{center:g,zoom:l,controls:[],suppressMapOpenBlock:!0}),ws(o,i.current,h)}))}),[o,i,h]),n((()=>{if(i.current&&h&&o){const e=h.length<1?Ps(ys):h;ws(o,i.current,e)}}),[i,h,o]),!o)return null;const b=d?"z-[100000]":"z-10";return p("div",{id:"map",className:`${d?"":"relative"} w-full ${t}`,children:[u("div",{className:`absolute flex left-2 top-4 w-[50%] ${b}`,children:r?Is(ys,0,(e=>{if(e){const t=Ps(e);x(t)}})):ks(g)}),u("div",{className:`${Object.values(Ms).join(" ")} ${b} right-2 top-4 bg-white`,onClick:()=>{const e=i.current.container;d?e.exitFullscreen():e.enterFullscreen(),m(e.isFullscreen())},children:u(me,{name:"FullScreenIcon",width:"16",height:"16"})}),p("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${b}`,children:[u(Rs,{yandexMaps:i}),u(Rs,{yandexMaps:i,direction:"out"})]}),$s(i.current,o,`right-2 top-80 ${b}`)]})})),js=e=>[Ls(_s(e,0)),Ls(_s(e,1))],_s=(e,t)=>e.map((e=>e[t])),Ls=e=>e.reduce(((e,t)=>e+t))/e.length,Ps=e=>e?e.map((e=>e.coords)):null,zs=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],Ds=({lunchHour:e,status:t,workTime:l})=>{const a=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?p("div",{className:"flex",children:[u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-primary-main border-green-light mr-4",children:l||null}),u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden",children:e?a:null})]}):u("div",{className:"flex",children:u("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},Os=({icon:e,title:t,distance:l,time:a},n)=>p("div",{className:"flex mr-4",children:[u(me,{name:e,width:"16",height:"16",asSVG:!0,className:"mr-1"}),t?p("span",{className:"text-m",children:[t," "]}):null,p("span",{className:"text-m-light",children:[l?` (${l})`:null,a?`, ${a}`:null]})]},`nearbyOffice${n}`),As=({title:e,status:t,workTime:l,lunchHour:a,description:n},r)=>p("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[p("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[u("div",{children:e}),t?null:u("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?u("div",{children:l}):null]}),t&&a?Es(a):null,n?u("div",{className:"pb-1 text-s-light text-secondary-text",children:n}):null]},`day${r}`),Es=e=>/\d+/gi.test(e)?p("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[u("div",{children:"Перерыв"}),u("div",{children:e})]}):u("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:u("div",{children:e})}),Fs={id:123,branchType:{id:7,code:"21",name:"Отделение на балансе филиала"},shortName:"Ейский ДО",name:"ДО №3349/3/05",address:"353682, Краснодарский край, г.Ейск, ул.Гоголя, 349/ ул.Баррикадная, 42/1",lawAddress:"353682, Краснодарский край, г.Ейск, ул.Гоголя, 349/ ул.Баррикадная, 42/1",openDate:"2000-12-05",closeDate:null,bik:"040349536",corAcc:"30101810700000000536",registrationNumber:"3349/3/05",phone:"+7(XXX)XXX-XX-XX",fax:"+7(XXX)XXX-XX-XY",okpo:"55105921",ogrn:"1027700342890",kpp:"231002002",inn:"7725114488",branchCode:"0305",upperBranchCode:"0300",timeZone:"+03:00",exchangeRate:{currencies:[{buyExchangeRate:0,saleExchangeRate:0,currency:{id:3,code:"156",currency:"CNY",name:"Китайский юань"}},{buyExchangeRate:59.15,saleExchangeRate:69.25,currency:{id:2,code:"978",currency:"EUR",name:"Евро"}},{buyExchangeRate:58.4,saleExchangeRate:70.05,currency:{id:1,code:"840",currency:"USD",name:"Американский доллар"}}],lastUpdate:"2022-11-11 03:56:17"},workSchedule:{id:413,workTime:"09.00–16.30",lunchHour:"без перерыва",workTimeSaturday:"09.00–15.00",lunchHourSaturday:"без перерыва",workingMonday:!1,workingTuesday:!1,workingWednesday:!0,workingThursday:!0,workingFriday:!0,workingSaturday:!0,workingSunday:!1},gpsLatitude:46.709744,gpsLongitude:38.260703,range:null,safeBoxCaseVolumes:null};function Hs(e){return e?V(e,{method:"GET"}):{}}const Us=x((({className:e=""})=>{const t=function(e){const{data:t}=R(e?`/api/v1/branches?regionCode=${e}`:void 0,Hs);return console.warn("Hook useOfficeMap RETURNs MOCK object for testing",t),Fs}("000"),{name:l,address:a,gpsLatitude:n,gpsLongitude:r,workSchedule:i}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:m,workingSaturday:h,workingSunday:x}=i,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=i,N=n&&r?[n,r]:null,y=[{title:"Понедельник",status:s,workTime:g,lunchHour:b},{title:"Вторник",status:o,workTime:g,lunchHour:b},{title:"Среда",status:c,workTime:g,lunchHour:b},{title:"Четверг",status:d,workTime:g,lunchHour:"13:00 - 14:00",description:"Не работает прием денег с 17:00 до 19:00"},{title:"Пятница",status:m,workTime:g,lunchHour:b},{title:"Суббота",status:h,workTime:f,lunchHour:v},{title:"Воскресенье",status:x}],w=(new Date).getDay(),C=w>0?y[w-1]:y[6];return p("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[p("div",{className:"flex flex-col px-12 pt-12",children:[p("div",{className:"flex justify-between",children:[u("div",{className:"text-h2",children:l}),Ds(C)]}),p("div",{className:"flex text-l-light pt-4",children:[u(me,{name:"GeolocationIcon",width:"24",height:"24",asSVG:!0,className:"pr-1"}),a]}),u("div",{className:"flex pt-4",children:zs.map(Os)})]}),p("div",{className:"flex justify-between pt-8",children:[u("div",{className:"flex-grow h-full w-full overflow-hidden",children:N?u(Vs,{points:[N],className:"h-full"}):null}),u("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:y.map(As)})]})]})})),Xs=x((({className:e="",title:t,servicesList:l,...a})=>p(k,{className:`p-8 flex flex-col ${e}`,...a,children:[t?u(T,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?u("ul",{className:"list-none m-0 p-0",children:l.map(Gs)}):null]}))),Gs=(e,t)=>p("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?u(Ye,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",asSVG:!0,image:Ba(e.icon)}):null,e.label?u("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),Ws=x((({text:e,size:t,align:l,font:a,children:n,...r})=>u(k,{...r,children:u(re,{size:t,align:l,font:a,children:e||n})}))),Ks=x((e=>{const{className:t="",icon:l,label:a,description:n,version:r="primary",benefitsVersion:i="normal"}=e,s="white"===i?"secondary":"primary";return p("div",{className:`flex gap-5 ${n?"items-start":"items-center"} ${t}`,children:[l?u("div",{className:Js(r,i),children:u(Ye,{className:"w-6 h-6",image:Ba(l,s),asSVG:!0})}):null,p("div",{className:"gap-0.5",children:[a?u("div",{className:"text-h6 text-primary-text group-data-secondary:text-white",children:a}):null,n?u("div",{className:"text-m-light text-secondary-text group-data-secondary:text-white",children:n}):null]})]})}));function Js(e,t){let l="bg-primary-main text-black";return"secondary"===e?l="bg-white/30 text-black":"normal"===t&&(l="bg-secondary-light text-primary-main"),`w-12 h-12 min-w-12 rounded-full p-2.5 box-border flex items-center justify-center ${l}`}const Ys=e=>(t,l)=>{const{type:a}=t;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return u(Ks,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));case"rte":return u(sn,{__html:t.__html});default:$r(t)}},qs=x((({className:e="",title:t,description:l,image:a,benefits:n,sum:r,monthLimit:i,directionRight:s=!1,version:o="primary",...c})=>p(k,{className:`relative py-12 px-24 ${e}`,version:o,...c,children:[u(bt,{className:"!p-0",title:t,description:l,headlineVersion:"M"}),p("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[a?.src?u(Ye,{className:s?"order-2":"",image:a}):null,p("div",{className:"w-[558px] m-auto",children:[n?.length?u("div",{className:"flex flex-col gap-4",children:n.map(Ys(o))}):null,Zs(Number(r),Number(i))]})]})]})));function Zs(e,t){return e||t?p("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Qs("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Qs("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Qs(e,t=0,l=!1){return p("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[u("span",{className:"text-secondary-text text-l-light",children:e}),p("span",{className:"text-primary-main text-h6",children:[_e(t)," ₽"]})]})}function eo(e=""){const t=gs(e);return t<=4?"S":t<=8?"M":"L"}function to(e=""){const t=gs(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const lo=x((({className:e,title:t,description:l="Блок в разработке...",...a})=>p(k,{className:w("p-9 box-border",e,to(e),bs(e)),...a,children:[u(bt,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:eo(e)}),u("figure",{className:"m-0 min-w-[80%]",children:ao()})]}))),ao=(e=3)=>ro(100,e).map((e=>Math.floor(e))).map(no),no=(e,t)=>u("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),ro=(e,t)=>[e].concat(t>0?ro(e/1.618,t-1):[]),io=x((({className:e="",children:t,...l})=>{const a=X(),{text:n,href:r,target:i,onClick:s}=a(l);return r?u("a",{className:`no-underline ${e}`,href:r,target:i,onClick:s,children:u("span",{className:e,children:n||t})}):u("span",{className:e,children:n||t})})),so=(e="primary",t="normal")=>({icon:l,label:a,description:n},r)=>u(Ks,{icon:l,label:a,description:n,version:e,benefitsVersion:t},String(r)),oo=x((({className:e="",title:t,headlineVersion:l="L",description:a,benefitsCountOfRow:n=3,benefits:r,benefitsVersion:i,buttons:s,footnote:o,image:c,__html:d,items:m,version:h="primary",isDotted:x=!0,textBlockClassName:g="",directionRight:b=!0})=>{const f=r?.filter((e=>e.label))?.length,v=co(n);return p("div",{className:w("flex grow justify-between items-stretch h-full",e),children:[c?.src?u(Ye,{className:"mt-[-50px] "+(b?"order-2":""),image:c}):null,p("div",{className:w("flex flex-col",g),children:[u(bt,{className:"!p-0 max-w-[600px]",title:t,description:a,headlineVersion:l,align:"text-left"}),p("div",{className:"flex flex-col justify-between h-full",children:[p(Ma,{buttons:ht(s),children:[f?u("div",{className:v,children:r?.map(so(h,i))}):null,d?u("div",{className:"mt-5",children:u(sn,{__html:d})}):null,m?.length?u(Ha,{className:"mt-5 text-h6",items:m,itemClassName:"mb-[7px]",isDotted:x}):null]}),o?u("p",{className:"text-m-light pt-12",children:o}):null]})]})]})})),co=(e=2)=>"gap-6 mt-6 "+(e>2?"inline-grid grid-cols-[auto_auto_auto]":"inline-grid grid-cols-[auto_auto]");function mo(e,t,l){const{text:a,href:n,target:r}=e,i="primary"===t?"white":"black",s=e?.icon||{icon:"ArrowLeftIcon"};return p("div",{className:w("flex items-center",l),children:[u(le,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:a,href:n,target:r,children:u(Ye,{className:"w-4 h-4",image:{...s,iconVersion:s.iconVersion||i},asSVG:!0})}),a?u(le,{version:"link",text:a,href:n,target:r,ariaLabel:a}):null]})}const ho="text-secondary-text group-data-secondary:text-white/80",uo=x((e=>{const{className:t="",breadcrumbs:l,backwardButton:a,version:n="primary",...r}=e,i="primary"===n?n:"white";return p(k,{className:`overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${t}`,version:n,...r,children:[a?.text?mo(a,i,"mb-10 -mt-2.5"):null,l?.length?u("div",{className:"text-xs-light mb-6",children:ts(u("span",{className:`mx-2 ${ho}`,children:"/"}))(l.map(((e,t)=>u(io,{className:ho,...e},String(t)))))}):null,u(oo,{version:n,...r})]})})),po=x((({className:e="",slides:t=[],...l})=>{const n=t.map((e=>e.nav)),i=t.map((e=>e.productBlock)),[s,o]=a(0),c=r((e=>o(e)),[]);return p(k,{className:`box-border pt-12 overflow-hidden relative w-100 mb-6 ${e}`,...l,children:[u("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${s}00%)`},role:"list",children:i.map(((e,t)=>function(e,t){return u("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:u("div",{className:"flex grow",children:u(oo,{className:"pl-12 z-10 group-data-secondary:text-white",textBlockClassName:"mb-[154px]",headlineVersion:"XXL",...e})})},String(t))}({...e,...l},t)))}),u("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:n.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:a}){const n=l?"bg-white shadow-dark-blue min-w-[350px] border-none p-6":"min-w-[290px] hover:py-[26px] hover:py-[26px] ease-in duration-300 bg-white/10 px-6 py-5 backdrop-blur",r=l?"text-primary-text !text-h6 p-2":"text-l pb-1 text-secondary-text group-data-secondary:text-white",i=l?"text-secondary-text text-l-light":"text-m-light text-secondary-text group-data-secondary:text-white/80";return u("button",{type:"button",onClick:a,"aria-label":e?.title,className:`relative box-border overflow-hidden cursor-pointer text-left mx-1 grow basis-0 border border-gray group-data-secondary:border-white/50 ${n}`,children:p("div",{className:"border-0 px-6",children:[u("div",{className:`last:pb-0 ${r}`,children:e?.title}),u("div",{className:`text-secondary-text ${i}`,children:e?.description})]})},String(t))}({slide:e,i:t,isActive:Boolean(t===s),onClick:()=>c(t)})))})]})}));function xo(e,t){if(!e)return null;return u("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:u(re,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e})})}const go=(e,t)=>{const{type:l}=e;if("default"!==l&&"rte"!==l)return null;switch(l){case"default":return[u(ie,{size:"text-h6",children:e.label},`label-${t}`),u(ie,{size:"text-m",font:"font-light",color:"group-data-primary:text-secondary-text",children:e.description},`desc-${t}`)];case"rte":return u("div",{className:"col-span-2",children:u(sn,{__html:e.__html})});default:$r(e)}};function bo(e,t){return e?.src?u(Ye,{className:`absolute ${t?"right-0":"left-0"} bottom-0`,image:e}):null}const fo=x((({className:e="",title:t,headlineVersion:l="S",description:a,additionalDescription:n,benefits:r=[],buttons:i,image:s,isImageOnRightSide:o=!0,...c})=>p(k,{className:w("overflow-hidden p-9 box-border relative min-h-[364px]",to(e),e),...c,children:[p("div",{className:w("flex flex-col",o?"":"items-end"),children:[u(bt,{className:w("!p-0 !bg-transparent z-10",t||a?"mb-3.5":""),title:t,description:a,headlineVersion:l,as:"h2",align:"text-left"}),vo(r,s),xo(n,s),ht(i,{className:"mt-5 z-10 text-l"})]}),bo(s,o)]})));function vo(e,t){if(!e.length)return null;return u("div",{className:`z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:e.length?e.map(go):null})}const No=x((({className:e="",title:t="Акции и спецпредложения",date:l,description:a,as:n,buttons:r=[],...i})=>u(k,{className:w("p-9 box-border",e,to(e),bs(e)),...i,children:u(Ma,{title:t?u(bt,{className:"!p-0 max-w-[600px]",title:t,headlineVersion:eo(e),align:"text-left",as:n||"h2"}):null,buttons:ht(r),children:p("div",{className:"mt-1.5",children:[l?u("div",{className:"text-s mb-2",children:yo(l)}):null,u("div",{className:"text-l",children:a})]})})})));function yo(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const wo=x((e=>{const{__html:t,...l}=e;return u(k,{...l,children:u(sn,{__html:t})})})),Co=x((({className:e="",label:t="Развернуть",isExpanded:l,isFoldButtonOnTop:a=!0,version:n="primary",...r})=>u(k,{className:`w-full border-0 border-b border-solid border-main-divider last:border-b-0 ${e}`,tag:"div",version:"transparent",...r,children:u(cn,{isFoldButtonOnTop:a,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>u(dn,{className:"grid grid-cols-12 gap-5 [&>*]:p-0",isUnfolded:e,children:Zl(r)}),renderFoldButton:({isUnfolded:e,onToggle:l})=>ko({version:n,label:t,isUnfolded:e,onToggle:l})})})));Co.childrenTypes={exclude:["RollupItem"]};const ko=({version:e,label:t,isUnfolded:l,onToggle:a})=>{const n=t||(l?"Скрыть":"Развернуть");return"primary"===e?So({label:n,icon:l?"MinusIcon":"PlusIcon",onToggle:a}):u(dr,{label:n,icon:l?"ArrowUpIcon":"ArrowDownIcon",onClick:a})},So=({label:e,icon:t,onToggle:l})=>p("button",{className:"border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 cursor-pointer",onClick:l,children:[u(ie,{size:"text-xl",font:"font-medium",children:e}),t?u(Ye,{image:Ba({icon:t}),width:"24",height:"24",asSVG:!0}):null]}),Io=[];const To=async e=>await V(e,{method:"GET"})||Io,$o=x((({data:e,fieldLabel:t,fieldValue:l,selected:a,placeholder:n="",setSelected:r,label:i})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===a));return u(pe,{options:s,label:i,placeholder:n||a,onChange:e=>r(e.key),value:o})})),Bo=x((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:a=[],selectedBranch:n,onSelectedBranch:r})=>p("div",{className:"flex justify-between gap-4 mb-6",children:[u("div",{className:"max-w-[396px] w-1/2",children:u($o,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),u("div",{className:"max-w-[396px] w-1/2",children:u($o,{data:a,fieldValue:"branchCode",fieldLabel:"address",selected:n,setSelected:r,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ro=x((({name:e,text:t,value:l,checked:a,onChange:n,className:r})=>u("div",{className:r,children:p("label",{className:"font-sans flex 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:a,onChange:e=>n(e.target.value)}),t?u("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),Mo=x((()=>{const[e,t]=a("option2"),l=r((e=>t(e)),[]);return p("div",{children:[u(Ro,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),u(Ro,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),Vo=["От 1 дня","До 365 дней"],jo=x((({days:e,setDays:t})=>p("div",{className:"mb-6",children:[u("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),u(ze,{min:1,max:365,value:e,items:Vo,onChange:t})]}))),_o=x((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:a=[],selectedBoxSize:n,onSelectedBoxSize:r})=>p("div",{className:"flex justify-between mb-6",children:[u("div",{className:"mr-4 w-full",children:u($o,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),u("div",{className:"w-full",children:u($o,{data:a,fieldLabel:"safeBoxCasesSize",selected:n,setSelected:r,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Lo=x((({regions:e,selectedRegion:t,branches:l,selectedBranch:a,days:n,selectedCaseVolume:r,selectedBoxSize:i,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>p("div",{className:"flex-1 mr-9",children:[u(Bo,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:a,onSelectedBranch:Po(c)}),u(jo,{days:n,setDays:e=>c({days:e})}),u(_o,{caseVolumes:o,selectedCaseVolume:r,onSelectedCaseVolume:zo(c),safeBoxCases:s,selectedBoxSize:i,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),u("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),p("div",{className:"flex justify-between items-center mt-5",children:[u(Mo,{}),u(le,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),Po=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},zo=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Do=x((({days:e,tariffs:t=[]})=>{const l=Ao(e,t);return p("div",{className:"flex flex-col justify-between",children:[p("div",{className:"flex",children:[Oo("Аренда за",e,"mr-11"),Oo("Цена",l+" ₽")]}),p("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[u(Ye,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),p("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",u("br",{})," листов формата А4"]})]})]})})),Oo=(e,t,l="")=>p("div",{className:l,children:[u("div",{className:"text-m-light text-secondary-text mb-1",children:e}),u("span",{className:"text-h3 text-primary-text",children:t})]}),Ao=(e,t)=>{const l=Eo(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Eo=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},Fo=(e,t)=>e.find((e=>e.branchCode===t)),Ho=x((e=>{const{regions:t,data:l,branches:a,onChange:r,onClick:i}=e;n((()=>{r({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,r]);const s=Fo(a,l.selectedBranch),o=Uo(s?.safeBoxCaseVolumes),c=Xo(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Go(c,l.selectedBoxSize);return p("div",{className:"flex justify-between align-top mb-6",children:[u(Lo,{...l,regions:t,onClick:i,branches:a,caseVolumes:o,safeBoxCases:c,onChange:r}),u(Do,{days:l.days,tariffs:d})]})})),Uo=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Xo=(e,t)=>e?.find((e=>e.volume===t)),Go=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,Wo=x((({title:e,footnote:t,className:l="",...n})=>{const[i,s]=a(!1),o=r((()=>s((e=>!e))),[]),[c,d]=a({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),m=_(),h=Ko(c.selectedRegion,m),x=function(e){const{data:t}=R(e?`/api/v1/safeboxes?regionCode=${e}`:null,To);return t||Io}(h),g=r((e=>d((t=>({...t,...e})))),[d]),b=(f=Fo(x,c.selectedBranch)||x,Array.isArray(f)?f.map((e=>e.gpsLatitude&&e.gpsLongitude?[e.gpsLatitude,e.gpsLongitude]:[])):f?.gpsLatitude&&f?.gpsLongitude?[[f.gpsLatitude,f.gpsLongitude]]:[]);var f;return p(k,{className:l,...n,children:[p("div",{className:"px-8 py-12",children:[e?u(T,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,u(Ho,{regions:m,branches:x,data:{...c,selectedRegion:h},onClick:o,onChange:g}),t?u("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&i?u(Vs,{points:b,className:"h-[640px]"}):null]})})),Ko=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Jo=e=>Boolean(e?.icon||e?.src),Yo=({styleMap:e,isMainButton:t,version:l})=>(a,n,r)=>{const{label:i,description:s,button:o,items:c,isDotted:d}=a;return p("div",{className:w("relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden",qo(r.length)),children:[p("div",{className:w(o?.text?"mb-8":"","text-center"),children:[i?u("div",{className:"mb-2",children:u(ie,{size:"text-h6",children:i})}):null,p("div",{className:"flex flex-col items-center",children:[s?u("div",{className:e.description,children:s}):null,u(Ha,{className:w(s?`${e.description} mt-0.5`:"text-h6"),items:c,listItemSize:"M",isDotted:d})]})]}),o?.text&&!t?u(le,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(n))},qo=e=>e<5?"w-[276px]":"w-[210px]",Zo={description:"text-white/80 text-l-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"},Qo=x((({className:e="",showLines:t=!0,steps:l=[],buttons:a,size:n="normal",version:r="primary",stepVersion:i="gray",title:s,...o})=>{const c=l.length>3,d=Zo,m=(e=>e?"":"opacity-0")(t),h=(e=>e<5?"px-[88px]":"px-[55px]")(l.length),x=Boolean(a?.every((e=>e?.text)));return p(k,{className:w("box-border py-12",c?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",e),version:r,...o,children:[s?u(T,{headingType:"h4",className:"max-w-[752px] text-center mb-9",title:s}):null,l?.length?p("div",{className:"box-border",children:[u("div",{className:w("flex items-center",h),children:ts(u("div",{className:w("h-0.5 w-full bg-secondary-light flex-1",m)}))(l.map(ec(d,n,i)))}),u("div",{className:w("flex justify-between mt-4",c?"gap-x-3":"gap-x-[101px]"),children:l.map((g={styleMap:d,isMainButton:x,version:r},(e,t,l)=>{const{type:a}=e;if("default"!==a&&"rte"!==a)return null;switch(a){case"default":return Yo(g)(e,t,l);case"rte":return u("div",{className:w("text-center",qo(l.length)),children:u(sn,{__html:e.__html})},String(t));default:return null}}))})]}):null,ht(a,{className:"mt-8"})]});var g})),ec=(e,t,l)=>({icon:a},n)=>{const r="secondary"===l?"group-data-primary:text-white":"text-secondary-text";return u(k,{className:`${"normal"===t?"h-[100px] w-[100px]":"h-[63px] w-[63px]"} flex justify-center items-center text-center rounded-full p-[26px] box-border z-10`,version:l,children:Jo(a)?u(Ye,{image:Ba(a||{},l),width:"48",height:"48",asSVG:!0}):u("span",{className:w("text-h4","transparent"===l?e.iconText:r),children:n+1})},String(n))},tc=x((({className:e="",gap:t=14,padding:l=16,showDots:a=!0,minHeight:n,children:r,onVisibleIndicesChange:i,listType:s="horizontal-list",version:o})=>{const c=Array.isArray(r)?r.length:0,[d,m]=sa({itemCount:c,onVisibleIndicesChange:i}),[h]=m.visibleIndicesRange;return p("div",{className:w(e,"vertical-list"===s?"relative h-full":""),children:[u(la,{containerRef:d,activeIndex:h,visibleItemCount:1,gap:t,padding:l,onVisibleIndicesChange:m.handleVisibleIndicesChange,listType:s,minHeight:n,children:r}),a?u(pa,{containerRef:d,activeIndex:h,dotCount:c,listType:s,version:o}):null]})})),lc=x((({listType:e,showDots:t,options:l,version:a,...n})=>u(k,{version:a,...n,children:u(tc,{listType:e,showDots:t,version:a,children:Zl({...n,options:l})})})));lc.childrenTypes={exclude:["SwipeListControlBlock"]};const ac="h-12 flex-1 flex items-center justify-center cursor-pointer",nc="font-sans text-m text-center",rc="text-white",ic="text-secondary-text group-hover/btn:text-primary-main",sc="text-primary-main",oc={div:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${ac} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${ac} group/btn bg-white`},default:{active:`${ac} bg-primary-main text-white whitespace-nowrap`,default:`${ac} group/btn bg-white whitespace-nowrap`}},text:{scrollable:{active:"h-full border-0 border-b-2",default:""},default:{active:"",default:""}}},cc={link:{scrollable:{active:`inline-flex px-4 grow whitespace-nowrap ${ac} bg-white text-primary-main`,default:`inline-flex px-4 grow whitespace-nowrap ${ac} group/btn bg-white`},default:{active:`${ac} bg-primary-main text-white`,default:`${ac} group/btn bg-white`}},text:{scrollable:{active:`${nc} flex items-center h-full border-0 border-b-2 text-primary-main`,default:`${nc} ${ic}`},default:{active:`${nc} text-white`,default:`${nc} ${ic}`}}},dc=(e,t,l)=>{const a=t?"active":"default";return oc[e][l?"scrollable":"default"][a]},mc=(e,t,l)=>{const a=t?"active":"default";return cc[e][l?"scrollable":"default"][a]},hc=x((e=>{const{tab:t,currentTab:l,onClick:a,isScrollable:n=!1}=e,r="link"===l?.type&&l.href===t.href,i=X()(t);return u("a",{role:"tab",className:mc("link",r,n),target:t.target,href:i.href,onClick:e=>{i.onClick(e),a(t)},children:u("span",{className:mc("text",r,n),children:t.text})})})),uc=(e,t,l)=>e?u("h3",{className:l?`${nc} ${t?sc:ic}`:`${nc} ${t?rc:ic}`,children:e}):null,pc=(e,t,l)=>e&&t?u("div",{className:"min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center "+(l?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover/btn:text-primary-main"),children:t}):null,xc=({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n=!1})=>(r,i)=>{const s=r.type;if("group"!==s&&"link"!==s)return null;switch(s){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n=!1})=>(r,i)=>{const s=t===r,o=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return u("div",{className:dc("div",s,n),role:"tab","aria-selected":s,onClick:()=>a(r),children:p("div",{className:`flex flex-1 items-center justify-center ${dc("text",s,n)}`,children:[uc(r.title,s,n),pc(l,o,s)]})},`group-${String(i)}`)})({page:e,currentTab:t,showCounter:l,onClick:a,isScrollable:n})(r,i);case"link":return u(hc,{tab:r,currentTab:t,isScrollable:n,onClick:a},String(i));default:$r(s)}return null},gc=x((e=>{const{tabs:t,onClick:l,currentTab:a,page:n,showCounter:r}=e,[i,s]=sa({itemCount:t?.length||0,isCyclic:!1});return p("div",{className:"relative max-w-full m-auto",children:[u("div",{className:"font-sans max-w-full w-full overflow-hidden relative bg-white",children:u(la,{containerRef:i,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,children:t?.map(xc({onClick:l,currentTab:a,showCounter:r,page:n,isScrollable:!0}))})}),s.canScrollLeft?u(Vt,{className:"absolute z-40 top-0 left-6",onClick:s.scrollLeft}):null,s.canScrollRight?u(jt,{className:"absolute z-40 top-0 rotate-180 right-6",onClick:s.scrollRight}):null]})})),bc=x((e=>{const{className:t="",tabs:l,showCounter:i,isSticky:s,tabsMode:o,...c}=e,[d,m]=a(l?l[0]:void 0);n((()=>{l&&l[0]&&fc(l[0])}),[]),n((()=>{"group"===d?.type&&f.subject("tab",{type:d.type,label:d.ref})}),[d]);const h=r((e=>{fc(e),m(e)}),[]);return u(k,{className:`relative box-border flex gap-x-1 w-full ${s?"sticky top-1 z-20":""} ${t}`,role:"tablist",...c,children:"scrollable"===o?u(gc,{tabs:l,onClick:h,currentTab:d,showCounter:i,...c}):l?.map(xc({onClick:h,currentTab:d,showCounter:i,...c}))})})),fc=e=>{"group"===e.type&&f.fire("tab",{type:e.type,label:e.ref}),"link"===e.type&&f.fire("tab",{type:e.type,label:e.href})},vc=x((({isOpen:e,onClick:t})=>p(le,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[u("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),u(me,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),Nc={Buttons:({buttons:e})=>ht(e,{buttonClassName:"w-12 h-12"}),Img:({image:e})=>e?.src?u(Ye,{image:e}):null,List:({isDotted:e,...t})=>u(Ha,{className:"flex flex-col justify-between items-start text-h6",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>p("div",{children:[e?u("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?u("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:x((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:a,isOpen:n})=>e?u(vc,{isOpen:n,onClick:()=>{t({dataUrl:l,pdfUrl:a})}}):null))},yc=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,m]=a(!0);n((()=>{t===i&&r||m(!0)}),[r,i]);return p("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?u("div",{className:"h-5"}):null,wc({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{m(!1),s(t),l(e)},isVisible:d}})]},String(c))},wc=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...a}=e;if(!l||!(l in Nc))return null;return u(Nc[l],{...t,...a})},Cc=x((({cells:e,rowIdx:t,cellIdx:l,setTableInner:a,tableInner:n,openTableInnerIdx:r,setOpenTableInnerIdx:i})=>u("div",{className:"first:pl-0 w-80 flex-grow flex flex-col border-solid border-main-divider border border-t-0 border-x-0",role:"cell",children:e?.length?e.map(yc({rowIdx:t,cellIdx:l,setTableInner:a,tableInner:n,openTableInnerIdx:r,setOpenTableInnerIdx:i})):null}))),kc=x((({rows:e})=>{const t=e?.[0]?.length??0,[l,a]=Rt({itemCount:t,visibleItemCount:5});return p("div",{children:[e?.map(Sc(l)),_t({...a,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),Sc=e=>(t,l)=>{if(!t?.length)return null;const[a,...n]=t,r=[...Array(e).keys()].reduce(((e,t)=>140*(n?.[t]?.cols?.length??1)+e),0),i=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return p("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[a?.data?u("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:a.data}):null,u("div",{className:"flex flex-grow overflow-hidden",children:u("div",{className:i,style:{transform:`translateX(-${r}px)`},children:n?.map(((t,l)=>p("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?u("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?Ic(t.cols,e):null]},`row${l}`)))})})]},String(l))},Ic=(e,t)=>e?.length>0?u("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>u("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,Tc=x((({activeTabIndex:e,items:t})=>{const[l,n]=a({}),i=r((e=>n((t=>({...t,[e]:!t[e]})))),[]);return u("div",{children:t.map(((t,a)=>{const n=`activeTabIdx:${e}-tableIdx:${a}`;return p("div",{className:"w-full",children:[p("div",{className:"flex p-4 bg-gray text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>i(n),children:[t.title,u(Ye,{image:{icon:l[n]?"PlusIcon":"MinusIcon"},className:"absolute right-[22px]",width:"24",height:"24"})]}),u("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[n]?"h-0":""),children:u("div",{className:"relative",children:u(kc,{rows:t.rowsData})})})]},n)}))})})),$c=x((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:a})=>p("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?u("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>u("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>a(t),children:e||t+1},e)))}):null,t?u(le,{href:t,version:"secondary",target:"_blank",appendLeft:u(me,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20",asSVG:!0}),text:"Скачать в PDF"}):null]})));async function Bc(e){const t=await fetch(e);return await t.json()}const Rc=x((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:n}=function(e){const{data:t}=R(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),Bc);return t||{}}(e),[i,s]=a(0),o=r((e=>s(e)),[]),c=n?.[i]?.items??[],d=n?.map((e=>e.currency??""));return p("div",n?{className:"bg-white z-10",children:[u($c,{currencies:d,activeTabIndex:i,setActiveTabIndex:o,linkToPDF:t}),u(Tc,{activeTabIndex:i,items:c}),u(vc,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[u("p",{children:"Данных нет"}),u(vc,{onClick:l,isOpen:!0})]})})),Mc=x((({children:e,tableInner:t,onHideContentClick:l})=>p("div",{className:"self-start flex flex-col",role:"row",children:[u("div",{className:"flex",children:e}),t?u("div",{className:"origin-top animate-expansion",children:u(Rc,{...t,onClick:l})}):null]}))),Vc=x((({row:{header:e,data:t},activeIndex:l,rowIdx:n,...i})=>{const[s,o]=a(void 0),c=r((e=>o(e)),[]),[d,m]=a(void 0),h=r((e=>m(e)),[]);return p(Mc,{onHideContentClick:()=>o(void 0),tableInner:s,...i,children:[u("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:p("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?u(Ye,{className:"mr-3.5 max-w-6 max-h-6",image:Ba(e.icon),width:"24px",height:"24px",asSVG:!0}):null,e?.title?u("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?u(Cn,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>u(Cc,{cells:e,rowIdx:n,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:h,...i},String(t))))}):null]})})),jc=x((({className:e="",title:t,description:l,rowHeaders:a,tariffsColumns:n,hiddenRowsNum:r=0,...i})=>{const s=n?.map((({data:e})=>e))||[],o=a?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,m]=Rt({itemCount:c,visibleItemCount:2}),h=(o||[]).map(((e,t)=>u(Vc,{row:e,activeIndex:d,rowIdx:t,...i},String(t)))),[x,g]=r>0?[h.slice(0,-r),h.slice(-r)]:[h,[]];return p(k,{className:`p-12 overflow-hidden relative ${c>1?"pr-0":""} ${e}`,...i,children:[_c({title:t,description:l}),Lc(l),r>0?u(cn,{renderFoldableSection:({isUnfolded:e})=>p(Pc,{controls:m,children:[x,u(dn,{isUnfolded:e,children:g})]}),renderFoldButton:mr}):u(Pc,{controls:m,children:h})]})}));function _c({title:e,description:t}){return e?u(T,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function Lc(e){return e?u("div",{className:"mb-9 text-center text-l",children:e}):null}const Pc=x((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return p("div",{role:"table",children:[p("div",{className:"relative",children:[e,_t({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?u("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),zc=x((({className:e="",title:t,description:l,iconVersion:a,image:n,__html:r,...i})=>p(k,{className:`px-9 py-4 flex gap-3 bg-white group-data-secondary:bg-primary-main/10' ${e}`,...i,children:["small"===a?u("div",{className:"mt-1",children:Dc()}):null,"big"===a?Oc(n):null,p("div",{children:[t?Ac(t):null,l?u("div",{className:"mt-1",children:Ec(l)}):null,r?u(sn,{__html:r}):null]})]}))),Dc=()=>u("div",{className:"rounded-full h-4 w-4 text-center text-xs-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Oc=e=>e?.src?u(Ye,{image:e}):null,Ac=e=>u(ie,{size:"text-l",font:"font-medium",color:"text-primary-text group-data-secondary:text-white",children:e}),Ec=e=>u(re,{size:"text-s",color:"text-secondary-text group-data-secondary:text-white",children:e}),Fc=x((e=>{const{tags:t,className:l=""}=e;return t?.length?u("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Hc)}):null})),Hc=(e,t)=>u("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-gray",children:e},String(t)),Uc=x((({title:e,headingType:t="h3",__html:l,items:a,buttons:n,image:r,isDotted:i=!0,listItemSize:s="M",className:o="",tags:c,children:d,...m})=>u(k,{className:`overflow-hidden p-9 pr-3 box-border ${to(o)} ${bs(o)} ${o}`,...m,children:p(Ma,{title:e?u(T,{headingType:t,as:"h2",title:e,className:"whitespace-pre-wrap max-w-[600px]"}):null,buttons:ht(n,{className:"mt-8",buttonClassName:"min-w-[158px]"}),image:r?.src?u(Ye,{className:"mt-auto ml-7",image:r}):null,children:[l?u("div",{className:"max-w-[600px] mt-2.5",children:u(sn,{__html:l})}):null,d,u(Ha,{className:"mt-2.5",itemClassName:"mb-1.5",items:a,isDotted:i,listItemSize:s}),c?.length?u(Fc,{tags:c,className:"mt-5"}):null]})}))),Xc={stretch:"items-stretch",left:"items-start",center:"items-center",right:"items-end"},Gc=x((({className:e="",gap:t="",align:l="stretch",isPadding:a=!1,isInnerPadding:n=!0,version:r="transparent",isTheme:i=!1,...s})=>{const o=n?"":"!p-0";return u(k,{className:w("flex flex-col [&>*]:max-w-full",a?"p-12":"",Gi[t],l&&Xc[l],e),version:r,isTheme:i,...s,children:Zl({...s,renderProps:(e,t)=>Jl(e,t,{className:o})})})}));Gc.childrenTypes=[];const Wc=e=>gs(e)<10?"py-6 px-11":"py-12 px-32",Kc=x((({className:e,title:t,url:l,previewImg:a,...n})=>{const r=U();return p(k,{className:w(Wc(e),e),...n,children:[u(bt,{title:t,headlineVersion:"M"}),l?u("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:F(r)(a?.src),style:{maxHeight:524},controls:!0,children:u("source",{src:F(r)(l)})}):null]})})),Jc={ApplicationForm:it,BenefitsBlock:st,Bonus:ft,BonusBenefitsBlock:Ct,BusinessBlock:$t,ButtonBlock:Bt,Calculator:Ol,CardTransfer:Gl,Carousel:xa,CarouselBankHistoryCard:fa,CarouselCard:ka,CarouselCatalogCard:Ia,CarouselEventCard:Ra,CarouselInvestmentCard:ja,CarouselLinks:za,CarouselProductCard:Ua,CarouselProgramsCard:Ya,CarouselRecommendationCard:nn,CarouselRichTextCard:on,CarouselTariffsCard:mn,ComparisonTable:_n,ContactsBlock:Pn,ErrorBlock:An,ExchangeRateTile:or,Filtration:vr,Footer:si,GracePeriod:oi,Header:Xi,Headline:bt,HorizontalLayout:Wi,ImgBlock:Ki,InsuranceAmountBlock:Qi,InvestmentInfo:ns,LinkDocs:xs,MobileAppTile:fs,OfficeMap:Us,OfficeServicesBlock:Xs,ParagraphBlock:Ws,PictureText:qs,Placeholder:lo,ProductBlock:uo,ProductGallery:po,ProductTile:fo,PromoTile:No,RichTextBlock:wo,RollupItem:Co,SafeDepositRental:Wo,StepsBlock:Qo,SwipeListControlBlock:lc,Tabs:bc,TariffsTable:jc,TextBlock:zc,Tile:Uc,VerticalLayout:Gc,Video:Kc};const Yc=["Header","Footer"],qc=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function Zc(e=globalThis){const t=s(new Map);n((()=>y.subscribe("intersection",(({block:e,intersection:l})=>{t.current&&t.current.set(e,l)}))),[]),n((()=>{const l=((e,t=600)=>{let l;const a=(...n)=>{a.dispose(),l=setTimeout((()=>{e(...n)}),t)};return a.dispose=()=>{l&&clearTimeout(l)},a})((()=>{!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])=>!Yc.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?ol(qc)(t):[];return l}([...t.current||[]]):void 0)}),100);return e.addEventListener("scroll",l),()=>{l.dispose(),e.removeEventListener("scroll",l)}}),[e])}const Qc=h();const ed=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:td()}))),td=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return p("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u("path",{...e,strokeMiterlimit:"10",d:"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"}),u("path",{...e,d:"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"})]})},ld=x((({className:e=""})=>{const t=function(e){const[t,l]=a(0);return n((()=>{(async()=>{const[t]=await Qc.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:r((async()=>{l(await Qc.like(e))}),[e]),dislike:r((async()=>{l(await Qc.dislike(e))}),[e])}}(U().pathname);return p("div",{className:`border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${e}`,children:[u(ed,{onClick:H(t.like),ariaLabel:"Поставить отметку «лайк»"}),u(ed,{onClick:H(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),u("span",{className:"select-none",children:t.likeCount})]})})),ad=x((e=>{const{className:t="",blocksRegistry:l,blockDecorator:a,data:n={}}=e,{style:r,blocks:i,slots:s,likeControl:o,colorPalette:c="pc"}=n,d={key:"",page:n,blocksRegistry:l,blockDecorator:a,parent:n};Zc();const[m,{setTrue:h,setFalse:x}]=Ar();return Br({onOpen:h,onClose:x}),p("section",{className:w("relative",r,t,m?"overflow-hidden h-screen":""),"data-theme":c,children:[s?.header?u("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:ql(s?.header,{...d,slotName:"header"})}):null,p("div",{className:"container grid grid-cols-12 gap-1",children:[ql(i,d),s?.footer?ql(s?.footer,{...d,slotName:"footer"}):null]}),o?u("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:u(ld,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));ad.childrenTypes=[],ad.slots=()=>["header","footer"];e.Blocks=Jc,e.ContentPage=ad,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=H,e.joinList=ts,e.packageVersion="0.9.14",e.projectSettings=c,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=E,e.useRouter=U,Object.defineProperty(e,"__esModule",{value:!0})}));