@redneckz/wildless-cms-uni-blocks 0.6.49 → 0.6.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +1 -1
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/icons/IconName.d.ts +4 -2
- package/cosmos-static/icons/ArrowRightIcon.svg +1 -1
- package/cosmos-static/icons/ArrowTopRightIcon.svg +1 -0
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +2 -0
- package/dist/icons/IconName.js.map +1 -1
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +2 -0
- package/lib/icons/IconName.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +2 -0
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +2 -0
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/src/icons/ArrowRightIcon.svg +1 -1
- package/mobile/src/icons/ArrowTopRightIcon.svg +1 -0
- package/mobile/src/icons/IconName.ts +4 -4
- package/package.json +1 -1
- package/src/icons/ArrowRightIcon.svg +1 -1
- package/src/icons/ArrowTopRightIcon.svg +1 -0
package/bundle/bundle.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),r=l("useEffect"),i=l("useCallback"),a=l("useMemo"),s=l("useRef");const o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};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}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 CDN(){return this._.CDN}get BASE_PATH(){return this._.BASE_PATH&&!this._.BASE_PATH.endsWith("/")?`${this._.BASE_PATH}/`:this._.BASE_PATH}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(c)||"");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(c,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/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:p(e)),t._tmpl},p=e=>{function t(t,l){const{children:n,...r}=t||{},i=l?.slots?.default,a=n||i&&i();return e(Object.assign(r,a&&{children:a}),l)}return t.inheritAttrs=!1,t};function x(e){return e?e.filter(Boolean).join(" "):""}const g=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),b=[],f=["col-span-12"];function v(e,t){const{key:l,blockDecorator:n=g,blocksRegistry:r={},ancestors:i=b,className:a=""}=t,{type:s}=e;s&&s in r||console.warn(`No block with "${s}" is registered`);const o=s&&r[s];return n({blockClassName:`scroll-mt-12 ${a} ${x(e.style||f)}`,block:e,ancestors:i,render:({block:n,blockClassName:r})=>{const{content:i}=n;return o?m(o,{className:r,block:e,options:t,...i},l):null}},l)}const N=[],y=(e,{key:t,ancestors:l=N,slotName:n=null,renderChild:r=v,...i})=>(e||[]).map(((e,a)=>r(e,{...i,key:`${t||e.type}-${a}`,ancestors:i.parent?[...l||N,[i.parent,n]]:l})));function w({children:e,block:t,options:l,renderChild:n}){return e||(t&&l?y(t.blocks,{...l,parent:t,renderChild:n}):null)}const C={left:"text-left",center:"text-center",right:"text-right"};class k{static inst=new k;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}function $(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=a((()=>({threshold:S(t),root:l?.current})),[t,l?.current]);return r((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function S(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 I=e=>e?.replace("#",""),T=e=>`${globalThis.location?.pathname}#${I(e)}`;class B{static inst=new B;eventBus=new k;constructor(){const e=I(globalThis.location?.hash);e&&this.eventBus.subject("goto",{anchor:e})}goto(e){const t=I(e);t&&(this.push(t),this.eventBus.fire("goto",{anchor:t}))}push(e){globalThis.history?.pushState(null,"",T(e))}replace(e){globalThis.history?.replaceState(null,"",T(e))}reset(){globalThis.history?.replaceState(null,"",T())}}const R=u((({className:e,block:t,tag:l="section",role:a,children:s})=>{const o=l,c=function(e,t=B.inst){const l=$(i((l=>{if(!e||!l?.length)return;const n=l[l.length-1];t.eventBus.fire("intersection",{block:e,intersection:n})}),[e,t]),{sensitivity:1});return r((()=>{if(l.current)return t.eventBus.subscribe("goto",(({anchor:t})=>{l.current&&e?.anchor===t&&l.current.scrollIntoView({behavior:"smooth",block:"start"})}))}),[e,t]),l}(t),[d,h]=n(!0);return r((()=>k.inst.subscribe("tab",(e=>{if("group"===e.type){const l=t?.labels?.length||t?.anchor;h(!e.label||(!l||Boolean(t?.labels?.includes(e.label))))}else h(!0)}))),[t]),d?m(o,{className:e,role:a,...t?.anchor?{id:t.anchor,ref:c}:{},children:s}):null})),j={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},V=u((e=>{const{className:t="",headingType:l="h3",title:n,as:r="h3"}=e;return m(r,{className:`font-sans m-0 ${j[l]} ${t}`,children:n})})),_=u((({size:e,color:t,align:l,font:n,children:r})=>m("p",{className:["font-sans",e,t,l,n].filter(Boolean).join(" "),children:r}))),L=u((({children:e})=>m("ul",{className:"list-none m-0 p-0",children:e}))),M=u((({className:e="",title:t,accordionAlignTitle:l="center",description:n,...r})=>h(R,{className:`p-12 mb-1 last:mb-0 bg-white text-primary-text ${e}`,...r,children:[t?m(V,{headingType:"h3",as:"h2",className:`mb-2.5 ${C[l]}`,title:t}):null,n?m("div",{className:"mb-2.5",children:m(_,{size:"text-l",children:n})}):null,m(L,{children:w(r)})]})));M.childrenTypes=["AccordionItem"];const A=u((({isFoldButtonOnTop:e=!1,unfoldedByDefault:t=!1,renderFoldableSection:l,renderFoldButton:r})=>{const[a,s]=n(t),o=i((()=>{s((e=>!e))}),[]),c=l({isUnfolded:a,onToggle:o}),d=r?r({isUnfolded:a,onToggle:o}):null;return h("div",e?{children:[d,c]}:{children:[c,d]})})),D=u((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return r((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),m("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),z={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},O=u((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:r=n,iconVersion:i="color",asSVG:a,...s})=>{const c=`${o.CDN||""}icons/${l}.svg`;return a&&"normal"!==i?m(F,{className:e,children:h("svg",{className:[E(e,s.width),z[i],t,P(i)].join(" "),...s,"aria-hidden":"true",children:[r?m("title",{children:r}):null,n?m("desc",{children:n}):null,m("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):m("img",{className:e,src:c,alt:n,title:r,...s,"aria-hidden":"true"})})),P=e=>"white"===e?"invert":"",E=(e,t)=>t?`width: ${t}px `:"w-full h-full",F=u((({className:e,children:t})=>e?m("div",{className:e,children:t}):t)),U=(e,t)=>e.media&&t.media?e.media-t.media:0,H=u((({className:e="",image:t,imageClassName:l="",isMobile:n=!1,pathPrefix:r})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${n?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(U).map((({src:e,format:l,media:n},i)=>m("source",{srcSet:W(e,r),type:J(l),media:n?`(max-width: ${n}px)`:"",...t.size},`${i}_${e}`))):null,X({...t,src:G(t.src,r)},l,n)]})})),X=(e,t="",l=!1)=>{const n={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",i=e.alt||e.title,a=l?"m-auto":"m-0";return m("img",{src:e.src,className:`${a} ${t}`,alt:i,title:r,style:n,...e.size})},G=(e,t)=>!e||e?.startsWith("data:image")?e:`${((e="")=>e&&!e.endsWith("/")?`${e}/`:e)(t)}${e}`,W=(e,t)=>e?.split(",").map((e=>G(e.trim(),t))).join(", ");function J(e){return e?`image/${String(e)}`:void 0}const Y=u((({className:e="",image:t,imageClassName:l="",isMobile:n,pathPrefix:r,...i})=>t?.src||t?.icon?t.icon?m(O,{className:e,imageClassName:l,iconVersion:t?.iconVersion||"normal",name:t.icon,...i}):m(H,{className:e,imageClassName:l,image:t,isMobile:n,pathPrefix:r}):null)),Z=u((({size:e,color:t,align:l,font:n,children:r})=>m("span",{className:["font-sans",e,t,l,n].filter(Boolean).join(" "),children:r}))),K=["PlusIcon","MinusIcon"],q=u((({className:e="",label:t="",isExpanded:l,...n})=>m("li",{className:`border-0 border-b border-solid border-main-divider last:border-b-0 ${e}`,children:m(A,{isFoldButtonOnTop:!0,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m(D,{className:"grid grid-cols-12 gap-5 [&>*]:p-0",isUnfolded:e,children:w(n)}),renderFoldButton:({isUnfolded:e,onToggle:l})=>m(Q,{label:t,icon:K[Number(e)],onClick:l})})})));q.childrenTypes=[];const Q=u((({label:e,icon:t,onClick:l})=>h("button",{className:"border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer",onClick:l,children:[m(Z,{size:"text-xl",font:"font-medium",children:e}),m(Y,{image:{icon:t},className:"text-primary-main flex-shrink-0",width:"24",height:"24",asSVG:!0})]}))),ee={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},te={primary:"text-secondary-text",secondary:"text-white"},le={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text"},ne={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},re={transparent:"",primary:"bg-white",secondary:"bg-primary-main"},ie=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),ae={primary:"",secondary:"text-white"},se={primary:"text-secondary-text",secondary:"text-white opacity-80"},oe={primary:"bg-main-divider text-primary-main",secondary:"bg-white/30 text-black"},ce=u((({className:e="",title:t,benefitList:l,version:n="primary",...r})=>h(R,{className:`font-sans text-primary-text p-12 flex flex-col items-center ${e} ${ee[n]}`,...r,children:[t?m(V,{headingType:"h3",as:"h2",className:`max-w-[47rem] text-center ${ae[n]}`,title:t}):null,l?.length?m("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(de(n))}):null]}))),de=e=>(t,l)=>{const n=t.description;return h("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[t?.icon?.icon?m(Y,{className:`w-12 h-12 min-w-12 p-3 rounded-full ${oe[e]}`,image:ie(t.icon,e),asSVG:!0}):null,t?.icon?.src?m(Y,{image:t.icon}):null,h("div",{className:"ml-5",children:[t?.label?m("h3",{className:`text-h6 m-0 ${ae[e]}`,children:t.label}):null,me(n,e)]})]},String(l))},me=(e,t)=>{const l=e?.benefitType||null;return e&&l?m("div",{className:`text-l-light mt-2 ${se[t]}`,children:"list"===l?ue(e):he(e)}):null},he=e=>e?.name||null,ue=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?m("ul",{className:t,children:e.items.map(((e,t)=>m("li",{children:e},`benefitListItem-${t}`)))}):null};const pe=e=>e?.includes("//"),xe=e=>(e||"").replace(/\/?\?.*/,""),ge=e=>{if(!e||!pe(e))return;const t=e,l=t.indexOf("//"),n=t.indexOf("/",l+"//".length);return-1!==n?t.substring(0,n):t},be=e=>{if(!e||!pe(e))return;return new URL(e).pathname},fe=e=>e?.startsWith("#");var ve=Object.freeze({__proto__:null,isURL:pe,withoutQuery:xe,getOrigin:ge,getPathname:be,getHash:e=>{if(!e||!pe(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:fe});const Ne=(e,t)=>Ne._impl(e,t);function ye(){return ye._impl()}function we(){const e=ye(),t=B.inst;return l=>{const n=((e,t)=>{if(!e)return e;const l=ge(t?.href);return l?e.replace(l,"")||"/":e})(l.href,e);return{...l,href:n,"aria-label":l.text,onClick:Ne((r=>{l.onClick&&l.onClick(r),Ce(n,l.target)||(r?.preventDefault(),fe(n)?t.goto(n):n&&e.push(n))}),l)}}}Ne._impl=e=>e,Ne.setup=e=>{Ne._impl=e},ye._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),ye.setup=e=>{ye._impl=e};const Ce=(e,t)=>pe(e)||t&&"_self"!==t||e?.startsWith("/"),ke={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:""},$e="bg-main-divider text-main-disabled",Se={primary:$e,secondary:$e,white:$e,link:""},Ie="text-center font-sans select-none",Te={primary:"group-hover:brightness-0 group-hover:invert",secondary:"group-hover:brightness-0 group-hover:invert",white:"group-hover:brightness-0 group-hover:invert",link:""},Be=u((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:r,version:i="primary"}=e;return h("div",{className:Re(e),children:[n?m("div",{className:Te[i],children:n}):null,je(e)?h("div",{children:[l?m("div",{className:"text-xs-light text-left",children:l}):null,m("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,r?m("div",{className:Te[i],children:r}):null]})})),Re=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const r="gap-2 "+(l?"py-2.5 px-7":"py-4 px-4");return["group flex items-center justify-center",je(e)?r:"h-12 w-12",n?"rounded-full":""].join(" ")},je=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),Ve=({className:e,rounded:t,version:l})=>["inline-block",Ie,l?Se[l]:"",t?"rounded-full":"rounded-md",e].join(" "),_e=({className:e,rounded:t,version:l})=>[Ie,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",l?ke[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Le=u((({disabled:e,children:t,...l})=>{const n=we()(l),r=t??m(Be,{...n});return m(e?Ae:Me,{...n,children:r})})),Me=u((({className:e="",href:t,rel:l,target:n,ariaLabel:r,version:i,rounded:a,onClick:s,children:o})=>m("a",{className:_e({className:e,version:i,rounded:a}),href:t,rel:l,target:n,"aria-label":r,role:t?"link":"button",onClick:s,children:o}))),Ae=u((({className:e,ariaLabel:t,version:l,rounded:n,children:r})=>m("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:Ve({className:e,rounded:n,version:l}),children:r}))),De=u((({className:e="",buttons:t})=>t&&t?.length?m("div",{className:e,children:t.map(((e,t)=>ze({button:e,index:t})))}):null));function ze({button:e,buttonClassName:t,index:l}){const{icon:n,iconRight:r,version:i,text:a,...s}=e,o="secondary"===i?"color":"white",c=Oe({...n,iconVersion:o}),d=Oe({...r,iconVersion:o});return a?m(Le,{className:t,appendLeft:c,appendRight:d,version:i,text:a,...s},l?String(l):""):null}const Oe=e=>{if(!e?.icon&&!e?.src)return null;const t=e?.size?.width?`${e.size.width}`:"24";return m(Y,{image:e,width:t,height:"24",asSVG:!0})},Pe={transparent:{wrapper:"bg-transparent",titleColor:"text-primary-text"},primary:{wrapper:"bg-white",titleColor:"text-primary-text"},secondary:{wrapper:"bg-primary-main",titleColor:"text-white",descriptionColor:"text-white/80"}},Ee={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"}},Fe={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"},Ue=u((({className:e="",title:t,description:l,headlineVersion:n="XL",bgColorHeadline:r="transparent",align:i="text-center",as:a,...s})=>{const o=Pe[r],c=Ee[n];return h(R,{className:`flex flex-col p-12 ${c.wrapper} ${o.wrapper} ${e}`,...s,children:[t?m(V,{className:`whitespace-pre-wrap ${o.titleColor} ${i}`,...c?.title,as:a||c?.title.as,title:t}):null,l?m(_,{color:o.descriptionColor||o.titleColor,size:c.descriptionSize,align:i,children:l}):null]})})),He=u((e=>{const{className:t="",title:l,description:n,bonusItems:r,...i}=e;return m(R,{className:`font-sans bg-white p-12 pb-9 ${t}`,...i,children:h("div",{className:"container",children:[m(Ue,{className:"!p-0",title:l,description:n,headlineVersion:"M",...i}),m("div",{className:"flex flex-wrap w-full mt-9",children:r?.length?r.map(((e,t)=>m("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:h("div",{className:"flex justify-between w-full",children:[h("div",{className:"flex flex-col justify-between mr-4",children:[h("div",{children:[m("div",{className:"text-h4",children:e.title}),m("div",{className:"text-xl-light mt-2 max-w-[488px]",children:e.description})]}),e?.buttons?.length?m(De,{buttons:e?.buttons}):null]}),e.bonusItemContent?.bonusType?Xe(e.bonusItemContent):null]})},String(t)))):null})]})})})),Xe=e=>m("div",{children:"count"===e.bonusType?Ge(e):We(e)}),Ge=e=>h("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?m("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?m("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),We=e=>e.image?m(Y,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,Je=u((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:r,title:i,...a})=>h(R,{className:`font-sans text-primary-text bg-white p-12 flex flex-col text-center ${l}`,...a,children:[m(Ue,{className:"!p-0 mb-8",title:i,description:r,headlineVersion:"M",...a}),e?.length?m("div",{className:`grid gap-1 ${C[t]} ${Ze(n)}`,children:e.map(Ye)}):null]}))),Ye=({icon:e,label:t,description:l},n)=>h("div",{className:"flex flex-col items-center text-h6",children:[l?m("span",{children:l}):null,e?m(Y,{image:e,height:"180",width:"auto",className:"h-[180px] w-auto"}):null,m("div",{children:t?m("span",{children:t}):null})]},String(n)),Ze=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ke=u((e=>{const{title:t,image:l,cardItems:n,button:r}=e;return h("div",{className:"border-gray border p-9 w-1/2",children:[l?h("div",{className:"flex justify-center",children:[l?.src?m(Y,{className:"mb-5",image:l}):null,l?.icon?m(Y,{image:l,asSVG:!0}):null]}):null,t?m(V,{headingType:"h4",title:t,className:"mb-6"}):null,n?.length?m("ul",{children:n.map(((e,t)=>qe(e,String(t))))}):null,r?.text?ze({button:r,buttonClassName:"mt-6"}):null]})})),qe=(e,t)=>{const{icon:l,text:n}=e;return h("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?m(Y,{image:l,className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider",asSVG:!0}):null,l?.src?m(Y,{image:l}):null,m("span",{className:"text-xl-light",children:n})]},t)},Qe=u((({className:e="",title:t,cards:l,...n})=>h(R,{className:`font-sans bg-white p-12 pb-9 ${e}`,...n,children:[m(V,{headingType:"h3",title:t,className:"text-center mb-8"}),m("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>m(Ke,{...e},String(t)))):null})]}))),et=u((e=>{const{className:t,button:l,...n}=e;return m(R,{className:t,...n,children:l?ze({button:l}):null})})),tt=e=>{const{itemCount:t,visibleItemCount:l,isCyclic:r}=e,[a,s]=n(0),o=i((()=>s((e=>r?(e+1)%t:Math.min(e+1,t-1)))),[r,t]),c=i((()=>s((e=>r?(t+e-1)%t:Math.max(e-1,0)))),[r,t]),d=r||function(e,{itemCount:t,visibleItemCount:l,container:n}){if(l)return t>l;if(n){return n.scrollWidth*e/t+n.clientWidth<n.scrollWidth}return!1}(a,e)&&a<t-(l||1),m=r||a>0;return[a,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};const lt=u((({className:e,disabled:t,...l})=>m(Le,{rounded:!0,className:`group 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:m(Y,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"16",height:"16",asSVG:!0})}))),nt=u((e=>m(lt,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),rt=u((e=>m(lt,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function it({dec:e,inc:t,canDec:l,canInc:n,btnClass:r,className:i=""}){return l||n?h("div",{children:[l?m(lt,{className:`absolute z-50 ${r[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?m(lt,{className:`absolute z-50 rotate-180 ${r[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const at=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),st=u((({title:e,value:t,postfix:l="",prefix:n,className:r=""})=>h("div",{className:`mb-7 ${r}`,children:[e?m("div",{className:"text-l-light text-secondary-text",children:e}):null,t?h("div",{className:"text-h3",children:[n," ",at(Math.round(t))," ",l]}):null]}))),ot=2e6,ct=97e4,dt=Math.round(23.5),mt={minSum:6e4,maxSum:ot,minMonths:13,maxMonths:60,rateBottomRange:12,rateTopRange:7,isSalaryClient:!0,isStateEmployee:!0,isInsurance:!0,sumBorder:999999},ht={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ut={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:120,rate:5.9,isMonthlyInterestPayment:!0},pt=u((({rate:e,title:t="Ставка",unit:l,rateBlockClassName:n})=>h("div",{children:[m("div",{className:"text-l-light text-secondary-text",children:t}),h("div",{className:"flex justify-start",children:[m("span",{className:`block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${n}`,children:String(e).replace(".",",")}),l?m("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:l}):""]})]})));function xt(e){return e?.length?m(De,{buttons:e,className:"flex flex-col mt-7 gap-2"}):null}const gt=e=>e?m("p",{className:"text-s-light text-secondary-text mt-7",children:e}):null,bt=(e,t,l)=>Math.max(t,Math.min(e,l)),ft=e=>e.split(/\s+/).join(""),vt=u((({className:e,title:t,items:l=[],min:n=1,max:r=100,step:i=1,value:a=n,disabled:s=!1,onChange:o})=>{const c=e=>{o&&o(bt(Number(ft(e.target.value)),n,r))},d={backgroundSize:`${(100*(a-n)/(r-n)).toFixed(2)}% 100%`};return h("div",{className:e,children:[h("label",{className:"block relative",children:[t?m("span",{className:"text-m-light text-primary-text",children:t}):null,m("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:at(a),disabled:s,onChange:c,onBlur:c}),m("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:m("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:n,max:r,step:i,value:a,disabled:s,onChange:c,style:d})})]}),Nt(l)]})}));function Nt(e){return m("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>m("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}const yt=1e3;function wt(e,t,l){const{moneyValue:n,minSum:r,maxSum:i,step:a=yt,isShowItems:s=!0}=t,o=[`От ${at(r)} ₽`,`До ${at(i)} ₽`];return m(vt,{title:e,items:s?o:[],min:r,max:i,step:a,value:bt(n,r,i),onChange:l})}const Ct=new Map;function kt(e,t,{fallback:l}={}){const i=a((()=>$t(e)),[e]),[s,o]=n(),[c,d]=n(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};r((()=>{if(!i.every((e=>null===e)))try{const e=t(...i);"then"in e?(e=>{e.then((e=>Ct.get(i)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...i]);const u=i[0],p=l&&"string"==typeof u&&l[u];return{data:s||c||!p?s:p,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function $t(e){return e?Array.isArray(e)?e:e instanceof Function?$t(e()):[e]:[e]}async function St(e,t){try{return await It(e,t)}catch(e){console.error(e)}return null}async function It(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}function Tt(e){const{data:t}=kt(`/wcms-resources/${e}.json`,It);return t}const Bt=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,r=Tt(t||"bonus-calculator-data")||ht,[i,a]=((e,t,l)=>{const{minSumTravel:n,minSumOther:r,maxBonus:i,prefMonthsNum:a,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===r)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*a+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-a)]})(r,l,n);return{...r,...e,monthBonus:i,yearBonus:a}},Rt=u((({className:e="",sourceBookDir:t="",buttons:l,footnote:r})=>{const[a,s]=n(6e3),o=i((e=>s(e)),[]),[c,d]=n(6e3),u=i((e=>d(e)),[]),p={travelExpenseValue:a,restExpenseValue:c},{minSumTravel:x,maxSumTravel:g,minSumOther:b,maxSumOther:f,monthBonus:v,yearBonus:N}=Bt(p,t);return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[wt("Сумма покупок в категории путешествия, ₽",{minSum:x,maxSum:g,moneyValue:a,step:500,isShowItems:!1},o),wt("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:b,maxSum:f,moneyValue:c,step:500,isShowItems:!1},u)]}),m("div",{children:v>=0?m(pt,{title:"Баллов за месяц",rate:v,rateBlockClassName:"tracking-[-14px]"}):null}),h("div",{className:"w-full max-w-[350px]",children:[N>=0?m(st,{title:"Баллов за год",value:N}):null,xt(l),gt(r)]})]})})),jt=u((({className:e,viewBox:t,fill:l="none",width:n,height:r,paths:i,...a})=>m("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:r,children:i.map((({d:e,fill:t,...l},n)=>m("path",{d:e,fill:t||"currentColor",...a,...l},n)))}))),Vt=[{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"}],_t=u((({className:e,text:t,checked:l,isRadio:n,onChange:r})=>m("div",{className:e,children:h("label",{className:"flex items-center relative cursor-pointer group",children:[m("input",{className:`peer appearance-none w-5 h-5 border-solid cursor-pointer group-hover:border-primary-hover\n ${n?"rounded-full border-2":"rounded checked:bg-primary-main border"}\n ${l?"border-black":"border-gray"}\n checked:border-primary-main m-0`,type:"checkbox",onChange:e=>r&&r(e.target.checked),checked:l}),n?m("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):m(jt,{paths:Vt,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?m("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})}))),Lt=u((({items:e,checkedItem:t,onChange:l})=>m("div",{className:"flex flex-col gap-3",children:e?.map((({id:e,text:n})=>m(_t,{isRadio:!0,text:n,checked:t===e,onChange:()=>l&&l(e)},String(e))))})));function Mt(e,t,l){const{minMonths:n,maxMonths:r,monthsValue:i}=t,a=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return m(vt,{className:"mt-7",title:e,items:[`От ${a(n)}`,`До ${a(r)}`],min:n,max:r,step:1,value:bt(i,n,r),onChange:l})}const At=(e,t)=>{const{isInsurance:l,isSalaryClient:n,isStateEmployee:r,moneyValue:i}=e,a=Tt(t||"credit-calculator-data")?.rows?.find((e=>l===e.isInsurance&&n===e.isSalaryClient&&r===e.isStateEmployee))||mt,{rateBottomRange:s,rateTopRange:o,sumBorder:c}=a,d=i<=c?s:o,m=((e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:r}=t;if(l){const t=e/1200;return n*(t+t/(Math.pow(1+t,r)-1))}return Math.round(n/r)+n*(e/1200)})(d,e);return{...a,...e,finalRate:d,monthlyPayment:m}},Dt="annuity",zt="differential",Ot=[{id:Dt,text:"Аннуитетный"},{id:zt,text:"Дифференцированный"}],Pt=u((({className:e="",sourceBookDir:t,buttons:l,footnote:r})=>{const[a,s]=n(!1),[o,c]=n(!0),[d,u]=n(!1),[p,x]=n(!1),[g,b]=n(ct),f=i((e=>b(e)),[]),[v,N]=n(dt),y=i((e=>N(e)),[]),w=At({isAnnuity:a,isInsurance:o,isSalaryClient:d,isStateEmployee:p,moneyValue:g,monthsValue:v},t);return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[wt("Сумма кредита, ₽",{...w,step:500},f),Mt("Срок кредита, месяцев",w,y),h("div",{className:"mt-7",children:[m(_t,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:d,onChange:u}),m(_t,{className:"mt-3",text:"Работаю в бюджетной организации",checked:p,onChange:x}),m(_t,{className:"mt-3",text:"Комплексная страховая защита",checked:o,onChange:c})]})]}),m(pt,{title:"Ставка",rate:w.finalRate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-full max-w-[350px]",children:[m(st,{title:a?"Ежемесячный платеж":"Платёж в первый месяц",value:w.monthlyPayment,postfix:"₽"}),m(Lt,{items:Ot,checkedItem:a?Dt:zt,onChange:e=>s(e===Dt)}),xt(l),gt(r)]})]})})),Et=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:r}=t;return l?Math.round(n*Math.pow((1200+e)/1200,r)-n):Math.round(n*e*30*r/365/100)},Ft="everyMonth",Ut="atEndTerm",Ht=[{id:Ft,text:"Ежемесячно"},{id:Ut,text:"В конце срока"}],Xt={CreditCalculatorForm:Pt,DepositCalculatorForm:u((({className:e="",sourceBookDir:t,buttons:l,footnote:r})=>{const[a,s]=n(ct),o=i((e=>s(e)),[]),[c,d]=n(dt),[u,p]=n(!1),x={moneyValue:a,monthsValue:c,isMonthlyInterestPayment:u},g=i((e=>d(e)),[]),b=((e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n}=e,r=Tt(t||"deposit-calculator-data")?.rows.find((e=>l===e.isMonthlyInterestPayment))||ut,{rate:i}=r,a=Et(i,e),s=n+a;return{...r,...e,income:a,finalSum:s}})(x,t),{income:f,finalSum:v,rate:N}=b;return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[wt("Сумма вклада, ₽",{...b},o),Mt("Срок вклада, месяцев",{...b},g)]}),m(pt,{rate:N||1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-full max-w-[350px]",children:[f?m(st,{title:"Доход по вкладу",value:f,postfix:"₽",prefix:"+"}):null,v?m(st,{title:"Сумма в конце срока",value:v,postfix:"₽"}):null,m(Lt,{items:Ht,checkedItem:u?Ft:Ut,onChange:e=>p(e===Ft)}),xt(l),gt(r)]})]})})),BonusCalculatorForm:Rt},Gt=(e,t)=>{const l=e?.calcType;if(!l||!(l in Xt))return null;const n=Xt[l];return m("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:h("div",{className:"box-border p-9 w-full",children:[e?.title?m(V,{className:"text-center mb-6",title:e.title}):null,m(n,{...e,className:"flex justify-between"})]})},String(t))},Wt=u((({className:e="",calculatorTabs:t=[],...l})=>{const r=t.map((e=>e.nav||{})),a=t.map((({calculatorBlock:e})=>e||{})),[s,o]=n(0),c=i((e=>o(e)),[]),[d,u]=tt({itemCount:t?.length,visibleItemCount:3});return h(R,{className:`box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white ${e}`,...l,children:[h("div",{className:"bg-white",children:[r.length>1?Jt({activeIndex:d,tabsNav:r,slideIndexShift:s,onClick:c}):null,it({...u,btnClass:["left-3","right-3"],className:"top-8"})]}),m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:a?.length?a.map(Gt):null})]})}));function Jt({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:n}){return h("div",{children:[m("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:m("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const r=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",i=l?"text-xl mb-1.5":"text-l mb-[3px]",a=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 h("button",{type:"button",onClick:n,"aria-label":e?.title,className:`box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${r}`,children:[m(Y,{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}),h("div",{className:"border-0",children:[m("div",{className:`${i}`,children:e?.title}),m("div",{className:`${a}`,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})}),m("div",{className:"w-full h-2 bg-primary-main"})]})}const Yt=e=>(e.match(/\./g)||[]).length>1?e.slice(0,e.lastIndexOf(".")):e,Zt=e=>{const t=0===e.indexOf("0")&&2===e.length?e.replace("0","0."):e;return t.startsWith(".")?t.replace(".","0."):t},Kt=e=>String(e.replace(",",".").replace(/[^.\d]/g,"")),qt=u((({className:e="",inputClassName:t="",id:l,name:n,type:r="text",label:a,value:s="",valid:o=!0,children:c,onChange:d,onBlur:u,...p})=>{const x=i((e=>{const t=e.target.validity.valid?e.target.value:s;d(t)}),[d]),g=i((e=>{if(!u)return;const t=e.target.validity.valid?e.target.value:s;u(t)}),[u]),b=c?"pr-8":"",f=o?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return h("div",{className:`relative ${e}`,children:[a?m("label",{className:"block text-m-light mb-2",children:a}):null,m("input",{className:`w-full border rounded-md text-primary-text outline-none p-4 ${b} ${f} ${t}`,id:l,name:n||l,type:r,value:s,onChange:x,onBlur:g,...p}),c]})})),Qt=u((({className:e="",onChange:t,minValue:l=0,maxValue:n=3e5,...r})=>{const a=i((e=>{if(!t)return;const r=Yt(Zt(Kt(ft(e))));const i=el(r,bt(Number(r),l,n));t(String(i))}),[t]),s=i((e=>{var l;t&&t((l=e,new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(ft(l))).replace(",",".")))}),[t]);return m(qt,{className:e,inputClassName:"w-full",onChange:a,onBlur:s,...r,children:m("span",{className:"text-xl-light absolute right-4 bottom-4",children:"₽"})})})),el=(e,t)=>Number(e)===t?e:String(t),tl=u((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:r="1500",button:a,...s})=>{const[o,c]=n(""),d=i((e=>c(e)),[]),u=!Number(ft(o)),p=u?Ve({version:a?.version}):_e({className:"text-white",version:a?.version}),x=we();return h(R,{className:`p-12 flex flex-col items-center font-sans bg-white ${e}`,...s,children:[t?m(V,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,h("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[m(Qt,{name:"amount",value:o,onChange:d,valid:""===o||!u,placeholder:r,label:l}),a?.text?m("button",{type:"submit",className:`w-full p-4 mt-6 ${p} `,disabled:u,...x(a),children:a.text}):null]})]})})),ll=u((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:r,children:a,onIntersection:s})=>{const o=$(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),r);return m("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(l===n),ref:o,children:a})})),nl=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],rl=u((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:r=0,padding:a=0,snapAlign:o="snap-center",children:c,onVisibleItemsChange:d,onVisibleIndicesChange:h})=>{const u={sensitivity:1,rootRef:t},p=s([]),x=i(((e,t)=>{const l=[...p.current||[]];l[e]=t,p.current=l,d&&d(l),h&&h(al(l))}),[d,h]),g=n>0?r*Number(n)-1:0;return m("div",{className:`box-border overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...il(a,g),gap:`${r}px`},role:"list",ref:t,children:(b=(e,t)=>m(ll,{className:`${o} ${n?nl[n-1]:""}`,style:il(a/4),activeIndex:l,idx:t,observerOptions:u,onIntersection:x,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(b):b(e,0))(c)});var b})),il=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),al=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),sl=e=>e,ol=(e=sl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),cl=(e=sl)=>ol((t=>-e(t))),dl=e=>t=>e.scrollWidth/t,ml=e=>(t,l)=>{e.scrollBy({left:l*dl(e)(t),behavior:"smooth"})},hl=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const r=s(null),[a,o]=n([]),c=i((e=>{o((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),l&&l(e)}),[e]),[d,m]=a.length?[cl()(a),ol()(a)]:[-1,-1],h=d>0,u=m<e-1,p=i((()=>{var l;r.current&&(t&&!h?(l=r.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):ml(r.current)(e,-1))}),[t,e,h]),x=i((()=>{r.current&&(t&&!u?r.current.scrollTo({left:0,behavior:"smooth"}):ml(r.current)(e,1))}),[e,t,u]);return[r,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},ul="absolute top-0 bottom-0 z-50 w-[84px]",pl="absolute top-[calc(50%-12px)] z-50",xl=u((({className:e="",itemCount:t,visibleItemCount:l,isBlur:n=!0,isCyclic:r=!1,...i})=>{const{blocks:a}=i.block||{},s=t||a?.length||0,[o,c]=hl({itemCount:s,isCyclic:r});return m(R,{className:`font-sans p-12 ${e}`,...i,children:h("div",{className:"relative max-w-full",children:[m(rl,{containerRef:o,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:c.handleVisibleIndicesChange,children:w(i)}),(c.canScrollLeft||c.canScrollRight)&&n?h("div",{children:[m("div",{className:`${ul} left-0 bg-opacity-from-white`}),m("div",{className:`${ul} right-0 bg-opacity-to-white`})]}):null,gl(c)]})})}));xl.childrenTypes=["CarouselCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard"];const gl=({scrollLeft:e,scrollRight:t,canScrollLeft:l,canScrollRight:n})=>h("div",{children:[l?m(nt,{className:`${pl} left-8`,onClick:e}):null,n?m(rt,{className:`${pl} right-8`,onClick:t}):null]}),bl="absolute border border-solid border-gray w-full h-full",fl={normal:"min-w-[1007px]",mini:"min-w-[355px]"},vl=u((({className:e="",button:t,description:l,title:n,version:r="normal"})=>m("section",{className:`flex pb-9 pl-12 ${fl[r]} ${e}`,children:h("div",{className:"relative w-full",children:[m("div",{className:`${bl} z-10 top-9 right-12 bg-green-dark`}),m("div",{className:`${bl} z-10 top-6 right-8 bg-green`}),m("div",{className:`${bl} z-10 top-3 right-4 bg-green-light`}),h("div",{className:"relative bg-white z-10 py-6 px-10 border border-solid border-green-light",children:[m(Ue,{className:"!p-0",title:n,description:l,headlineVersion:"M"}),t?m("div",{className:"mt-6",children:ze({button:t})}):null]})]})}))),Nl={black:"bg-black",white:"bg-white"},yl=u((({className:e="",title:t,description:l,image:n,price:r,button:i,colors:a,version:s="primary"})=>h("section",{className:`border box-border border-gray p-7 min-w-[392px] flex flex-col justify-left ${ee[s]} ${e}`,role:"listitem",children:[n?.src?m(Y,{className:"mb-5 flex justify-center",image:n}):null,t?m(V,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?m("div",{className:"mb-4",children:m(_,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,a?.length?h("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:m(Z,{children:"Доступные цвета: "})}),a.map(wl)]}):null,r?h(Z,{size:"text-h3",align:"text-left",children:[r," ₽"]}):null,i?ze({button:i,buttonClassName:"mt-5 w-full"}):null]}))),wl=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${Nl[e]}`},String(t)),Cl={primary:"border-gray",secondary:"border-white/50"},kl=u((({className:e="",title:t="",buttons:l,image:n,children:r})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{className:"h-full",children:r}),l?m("div",{className:"mt-auto pt-8",children:l}):null]}),n]})]}))),$l={1:"flex gap-y-2 flex-col",2:"flex gap-y-2 gap-x-10 flex-wrap"},Sl=u((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:n=1,description:r,image:i,title:a,version:s="primary",...o})=>{const c=a?m(V,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:a}):null,d=i?.src?m(Y,{className:"absolute bottom-0 right-0 m-0",image:i}):null;return m(R,{className:["relative text-left border border-solid box-border p-9 w-[697px]",ee[s],Cl[s],l].join(" "),...o,children:h(kl,{title:c,image:d,children:[h("div",{className:"flex justify-between mb-4",children:[r?m("div",{className:"w-1/3",children:m(Z,{size:"text-h6",children:r})}):null,e?m(Z,{size:"text-m",font:"font-light",color:te[s],children:e}):null]}),t.length?m("ul",{className:`list-none m-0 p-0 ${$l[n]}`,children:Il(t,n)}):null]})})})),Il=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return h("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?m("div",{className:"pr-2.5",children:m(Z,{size:(n=t,1===n?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?m(Z,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var n})),Tl="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",Bl=u((({text:e,href:t="",target:l="",className:n=""})=>e?h("div",{className:`relative group cursor-pointer w-[328px] h-[82px] ${n}`,children:[h("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:text-primary-main z-10",role:"link",href:t,target:l,children:[m("div",{className:"p-0.5",children:e}),m("div",{className:"w-6 h-6",children:m(Y,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"24",height:"24",asSVG:!0})})]}),m("div",{className:`${Tl} mx-1.5 mt-1.5`}),m("div",{className:`${Tl} mt-3 mr-3`})]}):null)),Rl=u((({className:e="",additionalDescription:t,description:l,links:n,title:r,...i})=>h(R,{className:`bg-primary-main flex w-full p-10 overflow-hidden justify-between font-sans ${e}`,...i,children:[h("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[m(Ue,{title:r,as:"h1",description:l,align:"text-left",className:"p-0",bgColorHeadline:"secondary"}),t?m("div",{className:"pt-6",children:m(_,{children:t})}):null]}),n?.length?jl(n):null]}))),jl=e=>{const t=Math.ceil(e.length/12);return m(xl,{className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,children:new Array(t).fill(null).map(((t,l)=>m("div",{className:"w-[672px] min-w-[672px] ml-20 mr-20 flex flex-wrap self-start",children:e.slice(12*l,12*(l+1)).map(((e,t)=>m(Bl,{className:"m-1",...e},String(t))))},String(l))))})},Vl={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text"},_l={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"},Ll=u((({className:e="",isDotted:t=!0,children:l,version:n="primary",size:r="M"})=>h("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?m("div",{children:m("div",{className:`rounded-full align-middle inline-block ${Vl[n]} ${_l[r]}`})}):null,m("span",{children:l})]}))),Ml={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},Al={S:"text-l-light",M:"text-h6",L:"text-h5"},Dl={S:"ml-2",M:"ml-3",L:"ml-4"},zl=u((e=>{const{className:t="",hasIndent:l,isDotted:n,itemClassName:r="",items:i,listItemSize:a="M",version:s="primary"}=e;return i?.length?m("section",{className:`${Ml[s]} ${Al[a]} ${t} ${l?Dl[a]:""}`,role:"list",children:i.map(((e,t)=>m(Ll,{className:`${r} mb-1.5`,isDotted:n,version:s,size:a,children:e},String(t))))}):null})),Ol={primary:"text-secondary-text",secondary:"text-white/80"},Pl="box-border border-solid border border-gray ",El=u((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:n,icon:r,items:i=[],button:a={},version:s="primary",isDotted:o=!0,align:c="center"})=>h("section",{className:["flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6",Pl,C[c],ee[s]].join(" "),role:"listitem",children:[h("div",{className:"flex flex-col h-full",children:[Fl(r,s),Ul(t,e),Hl(l,e),Gl(i,o,s),Xl(n,s)]}),ze({button:a,buttonClassName:"mt-6"})]}))),Fl=(e,t)=>h("div",{className:"flex justify-center",children:[e?.src?m(Y,{className:"mb-5",image:e}):null,e?.icon?m(Y,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:ie(e,t),asSVG:!0}):null]}),Ul=(e,t)=>t?m(Z,{size:Fe[e],children:t}):null,Hl=(e,t)=>e?m("div",{className:t?"mt-2":"",children:m(_,{size:"text-l",children:e})}):null,Xl=(e,t="primary")=>e?m("div",{className:"mt-auto",children:m(Z,{size:"text-m",font:"font-light",color:Ol[t],children:e})}):null,Gl=(e,t,l="primary")=>e?.length?m(zl,{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,version:l}):null,Wl=u((({className:e="",title:t,icon:l,list:n=[],version:r="primary",...i})=>h(R,{className:`font-sans border border-gray flex min-w-[536px] ${ee[r]} ${e}`,...i,children:[h("div",{className:"w-[200px] min-w-[200px] self-end",children:[l?.icon?m(Y,{image:ie(l),asSVG:!0}):null,l?.src?m(Y,{image:l}):null]}),h("div",{className:"p-8 pl-3 w-full",children:[t?m(V,{className:" mb-3.5",headingType:"h5",title:t}):null,n.length?m("div",{className:"flex flex-col gap-3",children:n?.map(Jl)}):null]})]}))),Jl=(e,t)=>h("div",{className:"break-words",children:[e.title?m("div",{className:"text-h6",children:e.title}):null,e.description?m("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Yl=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"}],Zl={default:" w-14 h-14",small:" w-12 h-12"},Kl=u((({version:e="primary",isRounded:t=!1,buttonSize:l="default",...n})=>{const r=we(),{href:i,onClick:a}=r(n),{icon:s,label:o}=Yl.find((({origins:e})=>e.some((e=>i?.includes(e)))))||{};if(!s)return null;return m("a",{className:`flex items-center justify-center group box-border ${"secondary"===e?"bg-white hover:bg-secondary-hover":"border-solid border border-main-divider hover:border-transparent hover:bg-primary-main"} ${t?"rounded-full":"rounded-md"} ${"primary"===e?"hover:text-black":""} ${Zl[l]}`,href:i,"aria-label":o,target:"_blank",rel:"noopener noreferrer",onClick:a,children:s?m(Y,{image:ie(s),imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),ql=u((({className:e="",media:t,version:l,isRounded:n=!1,buttonSize:r,children:i})=>h("div",{className:"font-sans",children:[m("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>m(Kl,{version:l,isRounded:n,buttonSize:r,...e},String(t))))}),m("span",{className:"text-s-light text-secondary-text",children:i})]}))),Ql=u((({button:e,className:t="",description:l,image:n,items:r=[],socialMedia:i=[],title:a,version:s="primary",...o})=>{const c=a?m(V,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:a}):null,d=n?.src?m(Y,{className:"absolute bottom-0 right-0 m-0",image:n}):null;return m(R,{className:`relative text-left border border-solid box-border p-7 min-w-[524px]\n ${Cl[en(s)]}\n ${le[s]}\n ${t}`,...o,children:m(kl,{className:"flex justify-between",title:c,image:d,children:h("div",{className:"h-full flex flex-col justify-between",children:[l?m("span",{className:"mb-2",children:l}):null,r.length?m(zl,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:r,version:s}):null,i.length?m(ql,{className:"pt-10 pb-0",media:i,version:en(s)}):null,e?.text?m("div",{className:"pt-2 mt-16",children:ze({button:e})}):null]})})})})),en=e=>"gray"===e?"primary":e,tn=u((({className:e="",title:t,icon:l,isHighlighting:n,button:r,rows:i=[],...a})=>{const s=i.map(rn),o=s.slice(0,1),c=s.slice(1);return h(R,{className:`font-sans relative bg-white border border-gray min-w-[322px] p-8\n ${ln(n)}\n ${e}`,...a,children:[n?an():null,l?.src?m(Y,{image:l}):null,t?m(V,{className:"text-primary-text text-center pt-2",headingType:"h5",title:t}):null,r?m(Le,{className:"w-full mt-4",...r}):null,i.length?m(A,{renderFoldableSection:({isUnfolded:e})=>h("div",{children:[o,m(D,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?nn:null}):null]})})),ln=e=>e?"mt-9 pt-[70px]":"mt-[70px] pt-9",nn=({isUnfolded:e,onToggle:t})=>h("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[m("div",{children:e?"Скрыть":"Подробнее о тарифе"}),m(O,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16",asSVG:!0})]}),rn=(e,t)=>h("div",{className:"py-5 border-b border-main-divider",children:[e?.title?m("div",{className:"text-secondary-text text-m-light opacity-80",children:e.title}):null,e?.description?m("div",{className:"text-primary-text text-h6 mt-1",children:e.description}):null]},String(t)),an=()=>h("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[m(O,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22",asSVG:!0}),m("div",{className:"text-center",children:"Хит"})]}),sn={black:"bg-black",white:"bg-white"},on=u((({className:e="",title:t,description:l,image:n,price:r,button:i,colors:a})=>h("section",{className:`border border-solid box-border border-gray p-[30px] min-w-[402px] flex flex-col justify-left ${e}`,role:"listitem",children:[n?.src?m(Y,{className:"mb-5 flex justify-center",image:n}):null,t?m(V,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?m("div",{className:"text-m-light text-left mb-4",children:l}):null,a?.length?h("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:"Доступные цвета: "}),a.map(cn)]}):null,r?h("div",{className:"text-h3 text-left",children:[r," ₽"]}):null,i?ze({button:i,buttonClassName:"mt-5 w-full"}):null]}))),cn=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${sn[e]}`},String(t)),dn="absolute top-0 bottom-0 w-[84px]",mn=u((({cards:e=[],className:t="",title:l,description:n,...r})=>{const[i,a]=tt({itemCount:e?.length,visibleItemCount:3});return h(R,{className:`bg-white relative font-sans p-12 overflow-hidden text-center ${t}`,...r,children:[m(Ue,{className:"!p-0",title:l,description:n,headlineVersion:"M",...r}),m("div",{className:"flex duration-1000 gap-3.5 mt-8",style:{transform:`translateX(-${430*i}px)`},role:"list",children:e?.length?e.map(((e,t)=>m(on,{...e},String(t)))):null}),it({...a,btnClass:["left-8","right-8"],className:"top-1/2 z-10 mt-6"}),m("div",{className:`${dn} left-0 bg-opacity-from-white`}),m("div",{className:`${dn} right-0 bg-opacity-to-white`})]})})),hn="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",un="border-gray border-solid border",pn="border-main-divider border border-t-0 border-x-0",xn="w-[200px] mr-6",gn=u((({icon:e,image:t,title:l,link:n})=>h("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${un} ${hn}`,role:"columnheader",children:[e&&!t?.src&&m(Y,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:ie(e),width:"63",height:"63",asSVG:!0}),t?.src&&m(Y,{className:"mb-[18px]",image:t}),l?m(V,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&m("div",{className:"mt-auto w-full",children:m(Le,{href:n.href,target:n.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:m("div",{className:"text-xs-light font-medium py-[11px]",children:n.text})})})]}))),bn={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},fn=u((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>m("div",{className:"flex flex-1 overflow-hidden",children:m("div",{className:bn[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),vn=u((({children:e})=>m("div",{className:"self-start flex flex-col",role:"row",children:m("div",{className:"flex",children:e})}))),Nn=u((({colHeaders:e,activeIndex:t})=>h(vn,{children:[m("div",{className:xn,role:"columnheader"}),m(fn,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>m(gn,{...e},String(t))))})]}))),yn=u((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>m("div",{className:`w-80 box-border flex flex-col ${un} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${n?hn:""}`,role:"cell",children:m("div",{className:`mx-7 h-full ${pn} ${n&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>kn(e,t,n)))})}))),wn=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),Cn=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),kn=({label:e,description:t},l,n)=>h("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?m("h4",{className:wn(n),children:e}):null,t?m("div",{className:Cn(n),children:t}):null]},String(l)),$n=(e=!1)=>`text-s py-7 ${pn} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,Sn=u((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:r,isLastRow:i})=>h(vn,{children:[e?.title?m("div",{className:$n(i),children:e.title}):null,t?.length?m(fn,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>m(yn,{cell:e,isFirstRow:r,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),In=u((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:r}=n;return h("div",{className:"relative",children:[e.map(((e,n,{length:r})=>m(Sn,{row:e,isFirstRow:0===n,isLastRow:n+1===r,activeIndex:l,isColoredFirstColumn:t},String(n)))),r?it({...n,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),Tn=u((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:r})=>{const i=e?.map((({header:e})=>e||{})),a=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:a.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=tt({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return h("div",{children:[h("div",{role:"table",children:[i?.length?m(Nn,{colHeaders:i,activeIndex:o}):null,s?.length?m(In,{rowData:s,isColoredFirstColumn:r,activeIndex:o,controls:c}):null]}),d?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Bn=u((({className:e="",title:t,rowHeaders:l,columns:r,visibleRowLength:a=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!a),u=i((()=>d((e=>!e))),[]);return h(R,{className:`bg-white font-sans py-12 pl-12 overflow-hidden text-primary-text relative ${e}`,...o,children:[m(V,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),m(Tn,{columns:r,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:a}),a?Rn({isShowAllRow:c,onClick:u}):null]})})),Rn=({isShowAllRow:e,onClick:t})=>m("div",{className:"pr-12",children:h("div",{className:"flex w-full",children:[m("div",{className:xn}),m("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:m("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),jn=u((({className:e="",contacts:t,info:l,version:n="secondary",...r})=>h(R,{className:`${ee[n]} flex p-12 ${e}`,...r,children:[l?.length?Vn(l,n):null,t?.length?Vn(t,n):null]}))),Vn=(e,t)=>m("div",{className:"flex grow basis-0",children:e.map(((e,l)=>_n({column:e,index:l,version:t})))}),_n=({column:e,index:t,version:l})=>e?m("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:r},i)=>h("div",{className:"mt-6 first:mt-0",children:[m(Ue,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"text-left",bgColorHeadline:l}),n?m("div",{className:"mt-1.5 opacity-80",children:m(_,{size:"text-m-light",children:n})}):null,r?m(Le,{className:"mt-6",...r}):null]},String(i))))},`col-${String(t)}`):null,Ln=e=>"Image"===e?.errorContentType&&e?.image?m(Y,{image:e.image}):"Code"===e?.errorContentType&&e.code?m("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,Mn=u((({className:e="",title:t,subtitle:l,error:n,button:r})=>h("section",{className:`flex flex-col justify-center items-center mt-12 ${e}`,children:[m("div",{className:"flex justify-center py-20",children:Ln(n)}),t?m(V,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?m("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,r?.text?m(Le,{className:"py-4 px-9",version:r?.version,...r,children:r.text}):null]})));var An;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(An||(An={}));const Dn=new Intl.NumberFormat("ru",{style:"currency",currency:An.RUB}),zn=e=>e?Dn.format(e):"",On="text-left text-m-light text-secondary-text",Pn=`${On} pl-11`,En={USD:"DollarIcon",EUR:"EuroIcon"},Fn=u((({className:e,exchangeCurrencyItems:t})=>h("table",{className:`h-fit w-fit ${e}`,children:[m("thead",{children:h("tr",{children:[m("th",{className:On,children:"Валюта"}),m("th",{className:Pn,children:"Купить"}),m("th",{className:Pn,children:"Продать"})]})}),m("tbody",{children:t.map(Un)})]}))),Un=e=>{const t=e?.currency?.currency;return h("tr",{className:"pb-1 text-h6",children:[m("td",{className:"pt-4",children:h("div",{className:"flex items-center",children:[t?m(Y,{image:{icon:En[t]},width:"24",height:"24"}):null,m("span",{className:"ml-2",children:t})]})}),m("td",{className:"pt-4 pl-11",children:zn(e?.saleExchangeRate)}),m("td",{className:"pt-4 pl-11",children:zn(e?.buyExchangeRate)})]},t)},Hn=u((({className:e="",address:t})=>h("div",{className:`flex ${e}`,children:[m(Y,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),h("div",{className:"ml-3",children:[t?m("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,m("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),Xn=(e,t,l)=>{const n=Number(Gn(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Gn=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Wn=e=>{return(t=[[e=>e.value!==An.RUB&&e.oppositeValue!==An.RUB,()=>e.handleConvert(e.value,An.RUB)],[e=>e.value===An.RUB&&e.oppositeValue===An.RUB,()=>e.handleConvert(e.value,An.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Jn(e){const t=s(null);return r((()=>{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 Yn=u((({className:e="",isBorder:t=!0,label:l,options:a=[],value:s,onChange:o,placeholder:c=""})=>{const[d,u]=n(a[0]||{key:"",text:""}),[p,x]=n(!1),g=Jn(i((()=>x(!1)),[]));return r((()=>{u(s||{key:"",text:""})}),[s]),h("div",{className:`${e}`,ref:g,children:[l?m("span",{className:"mb-2 flex text-primary-text",children:l}):null,h("div",{className:"relative "+(p?"z-20":"z-10"),children:[h("div",{className:`text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer\n ${qn(t)}`,onClick:()=>x(!p),children:[m("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:d?.text||c}),m(O,{name:"ArrowUpIcon",width:"16",height:"16",className:"absolute right-3 "+(p?"":"rotate-180")})]}),a?.length?m("div",{className:`h-0 ${Zn(p)}`,children:m("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:a.map(Kn((e=>{u(e),x(!1),o(e)}),p,(e=>Boolean(e.key===d.key))))})}):null]})]})})),Zn=e=>e?"":"overflow-hidden",Kn=(e,t,l)=>(n,r)=>h("div",{onClick:()=>{e(n)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[m("span",{className:"min-h-6",children:n.text}),m(O,{name:"DoneSimpleIcon",width:"16",height:"16",className:["absolute right-4 pt-0.5",l(n)&&t?"":"hidden"].join(" ")})]},String(r)),qn=e=>e?"border border-gray rounded-md hover:border-primary-hover":"";function Qn(e){const{placeholder:t,rates:l,selected:n,value:r,setValue:i,setSelected:a}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return h("div",{className:"relative flex",children:[m(qt,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:r,onChange:i}),s.length?m(Yn,{isBorder:!1,onChange:e=>a(e.key),options:s,value:o}):null]})}const er=u((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:r})=>{const[a,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||An.RUB,selectBuy:l?.[0]?.currency?.currency||An.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return h("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[Qn({placeholder:"Хочу продать",rates:l,selected:a.selectSell,setSelected:tr(a,o,l),value:a.inputSell,setValue:e=>nr(o,l)(e,a.selectSell,a.selectBuy)}),Qn({placeholder:"Получу",rates:t,selected:a.selectBuy,setSelected:lr(a,o,t),value:a.inputBuy,setValue:e=>rr(o,t)(e,a.selectBuy,a.selectSell)}),r?.text?m(Le,{className:"py-4 mr-1",version:r?.version,...r,children:r.text}):null]})})),tr=(e,t,l)=>n=>{t({selectSell:n}),Wn({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,r=e.selectBuy)=>{nr(t,l)(e.inputSell,n,r)}})},lr=(e,t,l)=>n=>{t({selectBuy:n}),Wn({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,r=e.selectSell)=>rr(t,l)(e.inputBuy,n,r)})},nr=(e,t)=>(l,n,r)=>{e({inputSell:Gn(l),selectBuy:r});const i=t.find((e=>e.currency?.currency===r))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Xn(l,i,n===An.RUB)||"")})},rr=(e,t)=>(l,n,r)=>{e({inputBuy:Gn(l),selectSell:r});const i=t.find((e=>e.currency?.currency===r))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Xn(l,i,n===An.RUB)||"")})};const ir=async e=>{const t=await ar(),l=t?.code||"000";return{region:t,exchangeRates:await sr(e,l)}},ar=async()=>{try{return await It("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},sr=async(e,t)=>{try{return await It(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},or=u((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:r}=function(){const{data:e}=kt("/api/v1/exchangerates",ir);return e||{}}(),i=cr(r?.exchangeRate?.currencies),a=i.filter((e=>e.buyExchangeRate));a.unshift({currency:{currency:An.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:An.RUB}}),m(R,{className:`bg-white text-primary-text font-sans p-9 box-border min-h-80 ${e}`,...n,children:m(kl,{title:m(V,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:h("div",{className:"flex",children:[h("div",{className:"mr-14 pt-4",children:[i?m(Fn,{className:"mb-[30px]",exchangeCurrencyItems:i}):null,m(Hn,{address:r?.address})]}),i.length&&a.length&&s.length?m(er,{className:"grow",currencyRatesBuy:a,currencyRatesSell:s,button:l}):null]})})})})),cr=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[];function dr(e,t={}){const{data:l}=kt(`/wcms-resources/${e}.json`,It,{fallback:t});return l||{}}const mr={"bg-white":"color",transparent:"white"},hr={"bg-white":"text-primary-main",transparent:"text-white"},ur=(e,t,l)=>m(Y,t?.src?{image:t,className:hr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:mr[e]},className:hr[e],width:l?.width,height:l?.height,asSVG:!0}),pr={"bg-white":"text-primary-text",transparent:"text-white"},xr=(e,t,l)=>m("span",{className:`${pr[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),gr=u((({className:e="",href:t,logo:l,children:n=l?.title,targetBlank:r,bgColor:i="bg-white",showTitle:a=!0})=>h("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:r?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[ur(i,l?.image,{width:"40",height:"45"}),a?xr(n||l?.title,i):null]}))),br=()=>{const[e,t]=n("");return{term:e,setTerm:e=>t(e)}},fr=u((({className:e,isMobile:t=!1})=>{const{term:l,setTerm:n}=br(),r=t?"text-s":"text-l-light",i=t?" placeholder-transparent":"h-full",a=t?"some search":void 0;return h("form",{className:`font-sans relative ${e}`,children:[h("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[m("div",{className:t?"w-5 h-5":"w-6 h-6",children:m(Y,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),l?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${r}`,children:"Поиск по сайту"})]}),m("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text ${i}`,value:l,onChange:e=>n(e.target.value),type:"text",name:"search-bar-input",placeholder:a}),t?m("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),n("")},children:m(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}):m(Le,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),vr=u((e=>m(fr,{...e}))),Nr=u((({className:e="",items:t,hasButton:l})=>h("div",{className:e,children:[t?.length?t.map(yr):null,l?m(Le,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),yr=(e,t)=>{const{type:l,text:n,description:r}=e;return h("div",{className:"mb-4",children:[m("div",{children:wr(l,n)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},wr=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Cr(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},Cr=e=>e.replaceAll(/\D/g,""),kr=u((({className:e="",index:t,text:l,...n})=>{const r=we(),{href:i,target:a,onClick:s}=r(n);return m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:i,target:a,onClick:s,children:l||`Документ ${t}`})})),$r=u((({className:e="",links:t})=>m("div",{className:e,children:t?.length?m("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)=>m(kr,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),Sr=e=>t=>e?.href===t?.href,Ir=(e,t)=>{return(n=e,r=t,(n||[]).map((e=>r?.find(Sr(e))||e))).concat((l=e,(t||[]).filter((e=>!l?.find(Sr(e))))));var l,n,r},Tr=u((({className:e="",items:t,fallback:l})=>{const n=we(),r=dr(o.SITEMAP||"sitemap",l),i=Ir(r.topItems,t);return m("div",{className:`flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${e}`,children:i?.map(((e,t)=>Br(n(e),t)))})})),Br=(e,t)=>{const{text:l,items:n,href:r,target:i,onClick:a}=e;return h("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-3.5",children:[m("a",{className:"block leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:r,target:i||"_self",onClick:a,children:l||`Раздел ${t}`}),n?.map(((e,t)=>m(Rr,{...e,index:t},String(t))))]},String(t))},Rr=u((({text:e,index:t,...l})=>{const n=we(),{href:r,target:i,onClick:a}=n(l);return m("a",{className:"block text-l-light text-secondary-text hover:text-primary-main no-underline",href:r,target:i||"_self",onClick:a,children:e||`Раздел ${t}`})})),jr=u((({className:e="",index:t,...l})=>{const n=we(),{href:r,target:i,text:a,onClick:s}=n(l);return m("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:r,target:i,onClick:s,children:a||`Документ ${t}`})})),Vr=u((({className:e="",links:t})=>h("div",{className:e,children:[m("div",{className:"pt-5",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>m(jr,{index:t,...e},String(t))))}):null]}))),_r="w-[204px]",Lr=u((({className:e,...t})=>{const l=t.options?.page?.fallback,{documents:n,relatedEnterprises:r,contacts:i,socialMedia:a,mobileApps:s,topItems:c,logo:d}=dr(o.FOOTER||"footer",l);return h(R,{tag:"footer",className:`p-9 bg-white font-sans ${e||""}`,...t,children:[h("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[m(gr,{className:_r,logo:d}),m(vr,{className:"grow"})]}),h("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[h("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[m(Nr,{items:i,hasButton:!0}),m(ql,{media:a,children:"Соцсети"}),m(ql,{className:"mt-6",media:s,children:"Мобильное приложение"})]}),m(Tr,{className:"pt-[3px]",items:c,fallback:l})]}),m($r,{className:"mt-[98px]",links:r}),m(Vr,{links:n})]})})),Mr={normal:3,mini:4},Ar={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Dr={normal:380,mini:276},zr=u((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:n,icon:r,items:i,button:a,version:s,isFullWidth:o=!0,isDotted:c=!0,align:d="center"})=>h("div",{className:`h-full flex flex-col justify-between ${C[d]}`,children:[h("div",{className:"flex flex-col h-full",children:[Or(r,s),Pr(t,e),Er(l,e),i?.length?Ur(i,c,s):null,Fr(n,s)]}),a?.text?ze({button:a,buttonClassName:"mt-6 "+(o?"":"self-center")}):null]}))),Or=(e,t)=>h("div",{className:"flex justify-center",children:[e?.src?m(Y,{className:"mb-5",image:e}):null,e?.icon?m(Y,{className:"w-8 h-8 min-w-8 mb-5 rounded-full",image:ie(e,t),asSVG:!0}):null]}),Pr=(e,t)=>t?m("div",{className:Fe[e],children:t}):null,Er=(e,t)=>e?m("div",{className:"text-l "+(t?"mt-2":""),children:e}):null,Fr=(e,t)=>e?m("div",{className:`text-m-light mt-auto ${te[t??"primary"]}`,children:e}):null,Ur=(e,t,l="primary")=>m(zl,{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,version:l}),Hr=u((({headlineVersion:e="M",cards:t=[],version:l="normal",activeIndex:n,...r})=>h("div",{children:[m(Ue,{...r,className:"!p-0",headlineVersion:e}),m("div",{className:`flex mt-8 ${t?.length<=Mr[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${n*Dr[l]}px)`},role:"list",children:t?.map(((e,t)=>function({card:e,version:t},l){return m("section",{className:`box-border border-solid border border-gray p-6 mx-2 flex flex-col justify-between\n items-stretch ${Ar[t]} ${ee[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:m(zr,{...e})},String(l))}({card:e,version:l},t)))})]})));const Xr=u((({cards:e=[],className:t="",version:l="normal",button:n,...r})=>{const[i,a]=tt({itemCount:e?.length,visibleItemCount:Mr[l]}),{isScrollAvailable:s}=a;return h(R,{className:`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden flex flex-col ${t}`,...r,children:[m(Hr,{cards:e,version:l,activeIndex:i,...r}),it({...a,btnClass:["left-8","right-8"],className:"top-1/2"}),s?h("div",{children:[m("div",{className:"absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white"}),m("div",{className:"absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white"})]}):null,n?ze({button:n,buttonClassName:"mt-8 mx-auto"}):null]})})),Gr=u((e=>m(Xr,{...e,version:"normal"}))),Wr=u((({className:e="",title:t,description:l,calendar:n,...r})=>h(R,{className:`font-sans bg-white p-12 ${e}`,...r,children:[m(Ue,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M",...r}),n?Jr(n):null]}))),Jr=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 h("div",{className:"w-full flex flex-col justify-center mt-13",children:[m("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>Yr(e,t)))}),m("div",{className:"flex w-full",children:l.map(((e,t)=>h("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:[m("div",{className:"flex",children:Zr(e)}),h("div",{className:"text-s-light text-primary-text mt-3",children:[m("span",{children:e.text})," ",m("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Yr=(e,t)=>e.month?.map(((e,l)=>m("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Zr=e=>e.month?.map((e=>e.image?.src?m("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:m(Y,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Kr=(e,t,l=((e,t)=>t.startsWith(e)))=>l(xe((e=>pe(e)||e?.startsWith("/")?e:`${o.BASE_PATH||""}${e}`)(e)),xe(pe(e)?t.href:be(t.href))),qr=e=>t=>Kr(t.href,e),Qr=e=>t=>t.items?.some(qr(e))||Kr(t.href,e)||((e,t)=>[ge(e),ge(t.href)].every(((e,t,l)=>Boolean(e)&&e===l[0])))(t.href,e)||Boolean(o.BASE_PATH?.startsWith(t.href||"/")),ei="font-sans text-s-light",ti=u((({className:e="",active:t,flat:l,ariaLabel:n,bgColor:r="bg-white",children:i,...a})=>{const s=we(),{href:o,target:c,text:d,onClick:h}=s(a);return m("a",{className:`${li(r,t,l)} ${e}`,href:o,target:c,onClick:h,rel:"noopener noreferrer","aria-label":n,children:m("span",{className:ni(r,t,l),children:d||i})})})),li=(e,t=!1,l=!1)=>{let n="border-transparent";return t&&(n="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${n} inline-block border border-solid bg-transparent text-center no-underline ${l?"":"px-4 py-2"}`},ni=(e,t=!1,l=!1)=>{if("transparent"===e)return`text-white hover:text-primary-hover ${ei}`;return`${t?"text-primary-main":(l?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"} ${ei}`},ri=864e5;function ii(e,t,l=globalThis?.localStorage){const n=i((async(...n)=>{const r=`async:${e}`,i=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<ri?t:void 0}(l.getItem(r));if(i)return i;const a=await t(...n);return l.setItem(r,JSON.stringify({data:a,timestamp:Date.now()})),a}),[e,t]);return kt(e,n)}const ai=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}};const si=u((({className:e,searchTerm:t,onSearch:l})=>h("form",{className:`font-sans relative ${e}`,children:[m("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:m("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),m("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),type:"text",name:"location-search-bar-input"})]}))),oi=u((({currentLocation:e,onChangeLocation:t,close:l,foreignOffices:n})=>{const{term:r,setTerm:a}=br(),s=i((e=>a(e)),[]),o=di(function(){const{data:e}=kt("/api/v1/regions",It);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;return e.forEach((e=>{const n=t(e),r=l.get(n);l.set(n,[...r||[],e])})),l})(o,ci);return h("div",{className:"absolute h-full w-full inset-0 bg-white text-l-light z-50",children:[m(hi,{close:l}),h("div",{className:"container py-12",children:[m(mi,{currentLocation:e}),m(si,{onSearch:s,searchTerm:r,className:"mb-7"}),r&&r.length>=3?m("div",{children:o.filter((e=>e.name?.startsWith(r))).map(pi({onChangeLocation:t,close:l}))}):m("div",{className:"columns-5",children:Array.from(c.entries()).map(ui({onChangeLocation:t,close:l}))}),m(xi,{foreignOffices:n})]})]})})),ci=e=>e.name?.charAt(0)||"",di=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),mi=u((({currentLocation:e})=>e?h("div",{className:"mb-4",children:[m(Z,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),m("button",{className:"cursor-pointer",onClick:close,children:m(Z,{color:"text-green",children:e.name})})]}):null)),hi=u((({close:e})=>m("button",{className:"visible peer-placeholder-shown:invisible absolute top-6 right-6 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:t=>{t.preventDefault(),e&&e()},children:m(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),ui=({onChangeLocation:e,close:t})=>([l,n])=>h("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[m("div",{className:"mb-2.5",children:m(Z,{size:"text-h6",children:l})}),n.map(pi({onChangeLocation:e,close:t}))]},l),pi=({onChangeLocation:e,close:t})=>l=>m("div",{className:"mb-1",children:m("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(l),t&&t()},children:l.name||""})},l.id),xi=u((({foreignOffices:e})=>e?.length?h("div",{className:"border-t border-main-divider mt-7 pt-7",children:[m("div",{className:"mb-4",children:m(Z,{size:"text-m-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),m("div",{className:"flex gap-10",children:e.map(((e,t)=>m(gi,{...e},String(t))))})]}):null)),gi=u((({icon:e,...t})=>{const l=we(),{text:n,target:r,href:i,onClick:a}=l(t);return h("div",{className:"flex gap-x-3",children:[e?m(Y,{pathPrefix:"/wcms-resources/",image:e}):null,n?m("a",{className:"hover:text-primary-hover",href:i,target:r,onClick:a,children:n}):null]})})),bi=u((({className:e="",children:t,ariaLabel:l})=>m("button",{type:"button",className:`border-0 p-0 w-6 h-6 flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":l,children:t}))),fi={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},vi={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},Ni={"bg-white":"black",transparent:"white"},yi=u((({className:e,officesLink:t,defaultLocation:l="Москва",foreignOffices:a,bgColor:s="bg-white"})=>{const[o,c]=n(!1),[d,u]=function(e){const t=ai(),[l,a]=n(t?.region??{name:e}),{data:s}=ii("/api/v1/region",It);return r((()=>{a(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[l,i((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),a(e)}),[a])]}(l);return h("div",{className:`flex items-center ${e||""}`,children:[m(ti,{className:"mr-5",flat:!0,href:"#",text:d.name,ariaLabel:"Местоположение",onClick:()=>{c(!0)},bgColor:s}),t?m(ti,{className:"mr-7",flat:!0,href:t,text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:s}):null,m(bi,{className:`mr-5 group ${fi[s]}`,ariaLabel:"Поиск по сайту",children:m(Y,{image:{icon:"LoupeIcon",iconVersion:Ni[s]},className:"h-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0 pointer-events-none",asSVG:!0})}),m(bi,{className:`${vi[s]} group min-w-8 min-h-8`,ariaLabel:"Дополнительные ссылки",children:m(Y,{image:{icon:"GridIcon",iconVersion:Ni[s]},className:"h-full bg-main-divider/20 rounded-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0",asSVG:!0})}),o?m(oi,{currentLocation:d,foreignOffices:a,onChangeLocation:u,close:()=>{c(!1)}}):null]})})),wi={"bg-white":"bg-primary-text",transparent:"bg-white"},Ci=u((({className:e="",items:t,activeItem:l,bgColor:r})=>{const a=we(),[s,o]=n(!1),c=i((()=>o((e=>!e))),[]),d=Jn(i((()=>o(!1)),[]));return h("div",{className:`${s?"bg-white rounded-md shadow-blue-gray":""} ${e}`,ref:d,children:[m("button",{className:"flex justify-between items-center cursor-pointer h-6 ml-6","aria-label":""+(s?"Скрыть другие разделы":"Показать другие разделы"),onClick:c,children:Array(3).fill(r).map(ki)}),m("div",{className:"flex flex-col rounded-md bg-white p-6 pb-2 "+(s?"":"hidden"),"aria-hidden":!s,children:t?.map(((e,t)=>m("a",{className:"text-l-light pb-4 hover:text-primary-main "+(e===l?"text-primary-main":""),...a(e),children:e.text},e.href||String(t))))})]})})),ki=(e,t)=>m("div",{className:`w-[3px] h-[3px] rounded mr-1 ${wi[e]}`},String(t)),$i="absolute left-0 -bottom-3 w-full h-0.5",Si=u((({className:e="",active:t,bgColor:l="bg-white",dataItemName:n,children:r,...i})=>{const a=we(),{href:s,target:o,text:c,onClick:d}=a(i);return h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:s,target:o,"data-item-name":n,onClick:d,children:[m("span",{className:Ii(l,t),children:c||r}),t?m("div",{className:Ti(l,t)}):null]})})),Ii=(e,t=!1)=>{let l="text-white";return"bg-white"===e&&(l=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${l} font-sans text-l-light`},Ti=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${$i}`:$i,Bi=u((({className:e,active:t,bgColor:l,observerOptions:n,onVisibilityChange:r,children:a,...s})=>{const o=$(i((e=>{if(!e.length||!r)return;const t=e[e.length-1];r(t.isIntersecting)}),[r]),n);return m("span",{ref:o,children:m(Si,{className:e,active:t,bgColor:l,...s,children:a})})})),Ri=u((({subItems:e=[],bgColor:t})=>{const l=(e=>(t=[])=>{const l=t?.filter(qr(e));return l?.length?ol((e=>e.href?.length||0))(l):void 0})(ye())(e),[r,i]=n(e.length),o=e.slice(r),c=s(null),d={rootRef:c},u=a((()=>e.map(((e,t)=>e=>{i(e?ji(t):Vi(t))}))),[e]);return h("nav",{className:"relative mt-6",children:[m("div",{ref:c,className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:e.map(((e,n)=>m(Bi,{className:"mr-8 "+(r-1<n?"invisible":""),active:e===l,bgColor:t,observerOptions:d,onVisibilityChange:u[n],...e},String(n))))}),o.length?m(Ci,{className:"absolute w-52 -top-4 right-0 pt-4 z-40",items:o,activeItem:l,bgColor:t}):null]})})),ji=e=>t=>Math.max(t,e+1),Vi=e=>t=>Math.min(t,e),_i={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},Li=u((({bgColor:e="bg-white",className:t="",showSubMenu:l=!0,...n})=>{const r=ye(),{topItems:i,logo:a,defaultLocation:s,foreignOffices:c,officesLink:d}=dr(o.SITEMAP||"sitemap",n.options?.page?.fallback),u=i?.find(Qr(r)),p=i?.map(((t,l)=>m(ti,{active:t===u,"aria-label":t.text,bgColor:e,...t},String(l))));return m(R,{tag:"header",className:`pt-6 px-20 ${e} ${t} ${l&&u?.items?.length?"pb-4":"pb-5"}`,...n,children:h("div",{className:"container",children:[h("div",{className:"flex items-center",children:[m(gr,{className:"mr-8",bgColor:e,logo:a}),p,m(yi,{className:"ml-auto",foreignOffices:c,defaultLocation:s,officesLink:d,bgColor:e})]}),m("div",{className:`mt-6 h-px ${_i[e]}`}),l&&u?.items?.length?m(Ri,{subItems:u.items,bgColor:e}):null]})})})),Mi=u((({className:e="",gap:t="XS",isPadding:l=!1,version:n="transparent",options:r,...i})=>m(R,{className:["grid grid-cols-12",l?"p-12":"",ne[t],re[n],e].filter(Boolean).join(" "),...i,children:w({...i,options:r})})));Mi.childrenTypes={exclude:["HorizontalLayout"]};const Ai=u((e=>{const{className:t,image:l,...n}=e;return m(R,{className:t,...n,children:m(Y,{image:l})})})),Di=u((({className:e="",cards:t=[],button:l})=>{const[r,a]=n(0),s=i((e=>a(e)),[]),o=t.length,[c,d]=tt({itemCount:o,visibleItemCount:2}),{canDec:u,canInc:p}=d,x=t[c]?.href;return h("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[h("div",{className:"relative overflow-hidden",children:[o?zi({activeIndex:c,cards:t,selectedCardIndex:r,onClick:s}):null,it({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),u?m("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,p?m("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),m(Le,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function zi({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const r=460*e,i=t.length>2?"justify-start":"justify-center";return m("div",{style:{transform:`translateX(-${r}px)`},className:"duration-1000 px-12",children:m("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return h("button",{type:"button",onClick:n,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?m(Y,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,h("div",{className:"flex gap-3.5",children:[e?.sum?Oi("страховая сумма",e.sum):null,e?.fee?Oi("страховой взнос",e.fee):null]}),Pi(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function Oi(e,t){return h("div",{className:"flex flex-col text-left whitespace-pre",children:[h("span",{className:"text-h6",children:[at(t)," ₽"]}),m("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Pi(e){return e?m(Y,{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 Ei=u((({className:e="",title:t,insuranceTabs:l=[],button:r,...a})=>{const[s,o]=n(0),c=i((e=>o(e)),[]);return h(R,{className:`box-border py-12 overflow-hidden relative font-sans w-100 bg-white ${e}`,...a,children:[t?m(V,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?m("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:n}){return m("button",{type:"button",onClick:n,"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,m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Fi({insuranceTabs:l,button:r})})]})})),Fi=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>m(Di,{button:t,cards:e},String(l)))):null};function Ui(e){return t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:n},l):[l]),[])}const Hi={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Xi={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},Gi=u((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:r,investmentColumns:i,...a}=e,s=i?[...i]:[];return r&&s.unshift(r),m(R,{className:`font-sans bg-white px-9 py-12 ${t}`,...a,children:h("div",{className:"container text-m-light",children:[s?.length?h("div",{children:[h("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[Ui(m("div",{className:"w-px h-4 bg-gray"}))(s.map(Wi)),m("div",{className:"absolute right-[30px] w-px h-4 bg-gray"})]}),m("div",{className:"border-t border-gray -mt-2 ml-9 mr-8"}),m("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(Zi)})]}):null,l?.length?m(zl,{className:"mt-9 text-l-light max-w-[657px]",items:l,itemClassName:"mb-[7px]",isDotted:n}):null]})})})),Wi=(e,t,l)=>{const n=1===t,r=t===l.length-1;return m("div",{className:`${Ji(n,r,e.cells)}`,children:e.cells?.length?m("div",{className:"w-full "+(r?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(Yi)}):null},`column_${t}`)},Ji=(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(" "),Yi=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?m("div",{className:`flex-1 flex items-center justify-center relative py-2 ${Xi[l]} ${Hi[n]} ${"XS"===l?"px-3":"px-11"}`,children:m("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Zi=(e,t,l)=>{const n=0===t,r=t===l.length-1;return m("div",{className:`flex-1 max-w-[180px] text-center px-2 ${n?"pl-9":""} ${r?"mr-3.5":" "}`,children:e.title},`title_${t}`)},Ki=u((({className:e,iconClassName:t,textClassName:l,suffixClassName:n,doc:r,icon:i})=>{const{text:a,fileSize:s,...o}=r;return h("a",{className:e,role:"link",...o,children:[i?m(Y,{className:t,image:ie(i),width:"24px",height:"24px",asSVG:!0}):null,a?h("span",{className:l,children:[a,m("span",{className:n,children:o?.href&&qi(Qi(o.href),s)})]}):null]})})),qi=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Qi=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},ea=u((({className:e="",doc:t,icon:l})=>m(Ki,{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:text-primary-main",doc:t,icon:l}))),ta=u((({className:e,documents:t,columnsMode:l="double",icon:n})=>t?.length?m("div",{className:e,role:"list",children:t.map(((e,t)=>m("div",{className:"double"===l?"basis-[calc(50%-20px)]":"",role:"listitem",children:m(ea,{className:"group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:n})},String(t))))}):null)),la={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},na=u((({className:e="",title:t,description:l,align:n="text-center",documents:r,icon:i={icon:"DocIcon"},columnsMode:a="double",...s})=>h(R,{className:`font-sans text-primary-text p-12 bg-white ${e}`,...s,children:[m(Ue,{className:"!p-0",title:t,description:l,align:n,headlineVersion:"M",as:"h2",...s}),m(ta,{className:`mt-8 ${la[a]}`,columnsMode:a,documents:r,icon:i})]}))),ra=u((e=>m(Xr,{...e,version:"mini"}))),ia=e=>{const t="col-span-",l=e.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function aa(e=""){const t=ia(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const sa=u((({className:e="",title:t="Мобильное приложение",qr:l,buttons:n,version:r="primary",items:i,image:a,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const u="primary"===r?"text-primary-text":"",p="secondary"===r?"p-3.5 min-w-[120px]":"min-w-[92px]",x=n?.map((e=>({...e,className:"min-w-[168px]"})));return h(R,{className:`flex justify-between font-sans p-12 box-border relative min-h-80\n ${aa(e)}\n ${ee[r]}\n ${e}`,...d,children:[h(kl,{className:"z-10",title:t?m(V,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full\n ${u} ${C[o]}`}):null,buttons:n?.length?m(De,{buttons:x,className:"flex gap-4 mt-8",...d}):null,children:[ca(c),h("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?m("div",{className:`flex justify-center mr-5 bg-white rounded-md ${p}`,children:m(Y,{className:"w-fit",image:l})}):null,oa(r,i)]})]}),a?.src?m("div",{className:"absolute right-0 bottom-0",children:m(Y,{image:a})}):null]})})),oa=(e,t)=>t?.length?m(zl,{items:t,itemClassName:"text-l-light mb-2 last:mb-0",version:e}):m("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),ca=e=>e?m("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null,da=[{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 ma(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),r=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));r.add(i),t.geoObjects.add(r),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ha={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"},ua=e=>m("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(ha).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),pa={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)]"},xa=(e,t,l)=>h("div",{className:`${Object.values(pa).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[m(O,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",asSVG:!0,className:"absolute left-4"}),m("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),ga={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"},ba=(e,t,l)=>m("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(ga).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:m(O,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),fa=e=>globalThis[e];const va=()=>function(e,t){const[l,a]=n(),s=i((()=>a(fa(e))),[e]);return r((()=>{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),a(void 0)}}if(!fa(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${o.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Na={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"},ya=u((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return m("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Na).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:m(O,{name:l,width:"20",height:"16"})})})),wa={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"},Ca=u((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const a=s(null),o=va(),[c,d]=n(),[u,p]=n(Ia(da)),x=ka(e);if(r((()=>{a?.current||o?.ready((()=>{a.current=new o.Map("map",{center:x,zoom:l,controls:[],suppressMapOpenBlock:!0}),ma(o,a.current,u)}))}),[o,a,u]),r((()=>{if(a.current&&u&&o){const e=u.length<1?Ia(da):u;ma(o,a.current,e)}}),[a,u,o]),!o)return null;const g=c?"z-[100000]":"z-10";return h("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[m("div",{className:`absolute flex left-2 top-4 w-[50%] ${g}`,children:i?xa(da,0,(e=>{if(e){const t=Ia(e);p(t)}})):ua(x)}),m("div",{className:`${Object.values(wa).join(" ")} ${g} right-2 top-4 bg-white`,onClick:()=>{const e=a.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:m(O,{name:"FullScreenIcon",width:"16",height:"16"})}),h("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${g}`,children:[m(ya,{yandexMaps:a}),m(ya,{yandexMaps:a,direction:"out"})]}),ba(a.current,o,`right-2 top-80 ${g}`)]})})),ka=e=>[Sa($a(e,0)),Sa($a(e,1))],$a=(e,t)=>e.map((e=>e[t])),Sa=e=>e.reduce(((e,t)=>e+t))/e.length,Ia=e=>e?e.map((e=>e.coords)):null,Ta=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],Ba=({lunchHour:e,status:t,workTime:l})=>{const n=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?h("div",{className:"flex",children:[m("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}),m("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden",children:e?n:null})]}):m("div",{className:"flex",children:m("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},Ra=({icon:e,title:t,distance:l,time:n},r)=>h("div",{className:"flex mr-4",children:[m(O,{name:e,width:"16",height:"16",asSVG:!0,className:"mr-1"}),t?h("span",{className:"text-m",children:[t," "]}):null,h("span",{className:"text-m-light",children:[l?` (${l})`:null,n?`, ${n}`:null]})]},`nearbyOffice${r}`),ja=({title:e,status:t,workTime:l,lunchHour:n,description:r},i)=>h("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[h("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[m("div",{children:e}),t?null:m("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?m("div",{children:l}):null]}),t&&n?Va(n):null,r?m("div",{className:"pb-1 text-s-light text-secondary-text",children:r}):null]},`day${i}`),Va=e=>/\d+/gi.test(e)?h("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[m("div",{children:"Перерыв"}),m("div",{children:e})]}):m("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:m("div",{children:e})}),_a={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 La(e){return e?St(e,{method:"GET"}):{}}const Ma=u((({className:e=""})=>{const t=function(e){const{data:t}=kt(e?`/api/v1/branches?regionCode=${e}`:void 0,La);return console.warn("Hook useOfficeMap RETURNs MOCK object for testing",t),_a}("000"),{name:l,address:n,gpsLatitude:r,gpsLongitude:i,workSchedule:a}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:u,workingSaturday:p,workingSunday:x}=a,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=a,N=r&&i?[r,i]: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:u,workTime:g,lunchHour:b},{title:"Суббота",status:p,workTime:f,lunchHour:v},{title:"Воскресенье",status:x}],w=(new Date).getDay(),C=w>0?y[w-1]:y[6];return h("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[h("div",{className:"flex flex-col px-12 pt-12",children:[h("div",{className:"flex justify-between",children:[m("div",{className:"text-h2",children:l}),Ba(C)]}),h("div",{className:"flex text-l-light pt-4",children:[m(O,{name:"GeolocationIcon",width:"24",height:"24",asSVG:!0,className:"pr-1"}),n]}),m("div",{className:"flex pt-4",children:Ta.map(Ra)})]}),h("div",{className:"flex justify-between pt-8",children:[m("div",{className:"flex-grow h-full w-full overflow-hidden",children:N?m(Ca,{points:[N],className:"h-full"}):null}),m("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:y.map(ja)})]})]})})),Aa=u((({className:e="",title:t,servicesList:l,...n})=>h(R,{className:`font-sans bg-white p-8 flex flex-col ${e}`,...n,children:[t?m(V,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?m("ul",{className:"list-none m-0 p-0",children:l.map(Da)}):null]}))),Da=(e,t)=>h("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?m(Y,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",asSVG:!0,image:ie(e.icon)}):null,e.label?m("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),za=u((({className:e="",...t})=>m(R,{className:`font-sans text-primary-text ${e}`,...t,children:w(t)})));za.childrenTypes=["OtherProductsItem"];const Oa=u((({className:e="",label:t,icon:l,dataTheme:n="",onClick:r})=>h("button",{className:["border border-transparent bg-primary-main font-sans text-white cursor-pointer","hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none","flex justify-center w-full px-0 py-5",e].join(" "),"data-theme":n,onClick:r,children:[m("span",{className:"text-h4 pr-3",children:t}),l?m(Y,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),Pa=({isUnfolded:e,onToggle:t})=>m(Oa,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Ea=["ArrowDownIcon","ArrowUpIcon"],Fa=u((({className:e,label:t="",isUnfolded:l,...n})=>{const{colorPalette:r}=function(e,t){const{content:l}=function(e){return e?.parent||{}}(e);return l||t}(n.options,{});return m("div",{className:`border-0 border-b border-solid border-main-divider ${e}`,children:m(A,{unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m("div",{className:"box-border",children:m(D,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(n)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>m(Oa,{label:t,icon:Ea[Number(e)],dataTheme:r||n.options?.page?.colorPalette,onClick:l})})})}));Fa.childrenTypes=[];const Ua=u((e=>{const{className:t,text:l,size:n,color:r,align:i,font:a,...s}=e;return m(R,{className:t,...s,children:m(_,{size:n,color:r,align:i,font:a,children:l})})})),Ha={primary:"text-primary-text",secondary:"text-white"},Xa={primary:"text-secondary-text",secondary:"text-white"},Ga=u((e=>{const{className:t="",icon:l,label:n,description:r,version:i="primary",benefitsVersion:a="normal"}=e,s="white"===a?"secondary":"primary";return h("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[l?m("div",{className:Wa(i,a),children:m(Y,{className:"w-6 h-6",image:ie(l,s),asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[n?m("div",{className:`text-h6 ${Ha[i]}`,children:n}):null,r?m("div",{className:`text-m-light ${Xa[i]}`,children:r}):null]})]})}));function Wa(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 Ja=u((({className:e="",title:t,description:l,image:n,benefits:r,version:i="primary",sum:a,monthLimit:s,directionRight:o=!1,...c})=>h(R,{className:`relative font-sans py-12 px-24 ${ee[i]} ${e}`,...c,children:[m(Ue,{className:"!p-0",title:t,description:l,headlineVersion:"M",bgColorHeadline:i,...c}),h("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[n?.src?m(Y,{className:o?"order-2":"",image:n}):null,h("div",{className:"w-[558px] m-auto",children:[r?.length?m("div",{className:"flex flex-col gap-4",children:r.map(Ya(i))}):null,Za(Number(a),Number(s))]})]})]}))),Ya=e=>(t,l)=>m(Ga,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));function Za(e,t){return e||t?h("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Ka("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Ka("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Ka(e,t=0,l=!1){return h("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[m("span",{className:"text-secondary-text text-l-light",children:e}),h("span",{className:"text-primary-main text-h6",children:[at(t)," ₽"]})]})}function qa(e=""){const t=ia(e);return t<=4?"S":t<=8?"M":"L"}function Qa(e=""){const t=ia(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const es=u((({className:e,title:t,description:l="Блок в разработке...",...n})=>h(R,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Qa(e)} ${aa(e)} `,...n,children:[m(Ue,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:qa(e),...n}),m("figure",{className:"m-0 min-w-[80%]",children:ts()})]}))),ts=(e=3)=>ns(100,e).map((e=>Math.floor(e))).map(ls),ls=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),ns=(e,t)=>[e].concat(t>0?ns(e/1.618,t-1):[]),rs=u((({className:e="",children:t,...l})=>{const n=we(),{text:r,href:i,target:a,onClick:s}=n(l);return i?m("a",{className:`no-underline ${e}`,href:i,target:a,onClick:s,children:m("span",{className:e,children:r||t})}):m("span",{className:e,children:r||t})})),is=(e="primary",t="normal")=>({icon:l,label:n,description:r},i)=>m(Ga,{icon:l,label:n,description:r,version:e,benefitsVersion:t},String(i)),as=u((({className:e="",title:t,headlineVersion:l="L",description:n,benefitsCountOfRow:r=3,benefits:i,benefitsVersion:a,buttons:s,footnote:o,image:c,items:d,version:u="primary",isDotted:p=!0,textBlockClassName:x="",...g})=>{const b=i?.filter((e=>e.label))?.length,f=ss(r);return h("div",{className:`flex grow justify-between items-stretch h-full ${e}`,children:[h("div",{className:`flex flex-col ${x}`,children:[m(Ue,{title:t,description:n,className:"!p-0 max-w-[600px]",bgColorHeadline:u,headlineVersion:l,align:"text-left",...g}),h("div",{className:"flex flex-col justify-between h-full",children:[h(kl,{buttons:s?.length?m(De,{buttons:s,className:"flex gap-4",...g}):null,children:[b?m("div",{className:f,children:i.map(is(u,a))}):null,d?.length?m(zl,{className:"mt-5 text-h6",items:d,itemClassName:"mb-[7px]",version:u,isDotted:p}):null]}),o?m("p",{className:"text-m-light pt-12",children:o}):null]})]}),c?.src&&m(Y,{className:"mt-[-50px]",image:c})]})})),ss=(e=2)=>"gap-6 mt-6 "+(e>2?"inline-grid grid-cols-[auto_auto_auto]":"inline-grid grid-cols-[auto_auto]");function os(e,t,l){const{text:n,href:r,target:i,onClick:a}=e,s="primary"===t?"white":"black",o=e?.icon||{icon:"ArrowLeftIcon"};return h("div",{className:`flex items-center cursor-pointer ${l}`,onClick:a,children:[m(Le,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:n,href:r,target:i,children:m(Y,{className:"w-4 h-4",image:{...o,iconVersion:o.iconVersion||s},asSVG:!0})}),n?m("span",{className:"text-m",children:n}):null]})}const cs={primary:"text-secondary-text",secondary:"text-white/80"},ds=u((e=>{const{className:t="",breadcrumbs:l,backwardButton:n,version:r="primary",...i}=e,a="primary"===r?r:"white";return h(R,{className:`font-sans overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${ee[r]} ${t}`,...i,children:[n?.text?os(n,a,"mb-10 -mt-2.5"):null,l?.length?m("div",{className:"text-xs-light mb-6",children:Ui(m("span",{className:`mx-2 ${cs[r]}`,children:"/"}))(l.map(((e,t)=>m(rs,{className:cs[r],...e},String(t)))))}):null,m(as,{version:r,...i})]})})),ms={primary:{title:"text-secondary-text",text:"text-secondary-text"},secondary:{title:"text-white",text:"text-white/80"}},hs=u((({className:e="",slides:t=[],version:l="primary",...r})=>{const a=t.map((e=>e.nav)),s=t.map((e=>e.productBlock)),[o,c]=n(0),d=i((e=>c(e)),[]);return h(R,{className:`box-border pt-12 overflow-hidden relative font-sans w-100 mb-6 ${e}\n ${ee[l]}`,...r,children:[m("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,t)=>function(e,t){const{version:l}=e,n=l?ms[l].title:"";return m("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:m("div",{className:"flex grow",children:m(as,{className:`pl-12 z-10 ${n}`,textBlockClassName:"mb-[154px]",headlineVersion:"XXL",...e})})},String(t))}({...e,...r,version:l},t)))}),m("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:a.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n,version:r}){const i=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\n ${ee[r]}`,a=l?"text-primary-text !text-h6 p-2":`text-l pb-1 ${ms[r].title}`,s=l?"text-secondary-text text-l-light":`text-m-light ${ms[r].text}`;return m("button",{type:"button",onClick:n,"aria-label":e?.title,className:`box-border relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0\n ${i} ${Cl[r]}\n `,children:h("div",{className:"border-0 px-6",children:[m("div",{className:`last:pb-0 ${a}`,children:e?.title}),m("div",{className:`text-secondary-text ${s}`,children:e?.description})]})},String(t))}({slide:e,i:t,isActive:Boolean(t===o),onClick:()=>d(t),version:l})))})]})}));const us={primary:"text-secondary-text",secondary:"text-white"};function ps(e,t,l="primary"){if(!e)return null;return m("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:m(_,{size:"text-m",font:"font-light",color:us[l],children:e})})}const xs=u((e=>{const{__html:t=""}=e;return m("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})}));function gs(e){throw new Error(e)}const bs={primary:"text-secondary-text",secondary:"text-white"},fs=(e="primary")=>(t,l)=>{const{type:n}=t;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return[m(Z,{size:"text-h6",children:t.label},`label-${l}`),m(Z,{size:"text-m-light",color:bs[e],children:t.description},`desc-${l}`)];case"rte":return m(xs,{__html:t.__html});default:gs(t)}};function vs(e,t){return e?.src?m(Y,{className:`absolute ${t?"right-0":"left-0"} bottom-0`,image:e}):null}const Ns=u((({className:e="",title:t,headlineVersion:l="S",description:n,additionalDescription:r,benefits:i=[],buttons:a,image:s,isImageOnRightSide:o=!0,version:c="primary",...d})=>h(R,{className:`overflow-hidden font-sans p-9 box-border relative min-h-[364px]\n ${ee[c]} ${Qa(e)} ${e}`,...d,children:[h("div",{className:"flex flex-col "+(o?"":"items-end"),children:[m(Ue,{className:"!p-0 !bg-transparent z-10 "+(t||n?"mb-3.5":""),as:"h2",title:t,description:n,headlineVersion:l,bgColorHeadline:c,align:"text-left",...d}),ys(i,c,s),ps(r,s),a?.length?m(De,{buttons:a,className:"mt-5 gap-4 z-10 text-l"}):null]}),vs(s,o)]})));function ys(e,t,l){if(!e.length)return null;return m("div",{className:`z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline\n ${l?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:e.length?e.map(fs(t)):null})}const ws=u((({className:e="",title:t="Акции и спецпредложения",date:l,description:n,buttons:r=[],version:i="primary",...a})=>m(R,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${ee[i]} ${Qa(e)} ${aa(e)} `,...a,children:m(kl,{title:t?m(Ue,{title:t,className:"!p-0 max-w-[600px]",headlineVersion:qa(e),bgColorHeadline:i,align:"text-left",as:"h2",...a}):null,buttons:r?.length?m(De,{buttons:r,className:"flex gap-3"}):null,children:h("div",{className:"mt-1.5",children:[l?m("div",{className:"text-s mb-2",children:Cs(l)}):null,m("div",{className:"text-l",children:n})]})})})));function Cs(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const ks=u((({className:e="",title:t,description:l,items:n,image:r,version:i,socialMedia:a,button:s})=>{const o=t?m(V,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:t}):null,c=r?.src?m(Y,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return m("section",{className:`relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${e}`,role:"listitem",children:m(kl,{className:"flex justify-between",title:o,image:c,children:h("div",{className:"h-full flex flex-col justify-between",children:[l?m("span",{className:"mb-2",children:l}):null,n?.length?m(zl,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:n,version:i}):null,a?m(ql,{className:"pt-10 pb-0",media:a,version:i}):null,s?.text?m("div",{className:"pt-2",children:ze({button:s,buttonClassName:"mt-16 px-5"})}):null]})})})})),$s="absolute top-0 bottom-0 w-[84px]",Ss=u((({recommendations:e=[],className:t="",title:l,version:n="primary",...r})=>{const[i,a]=tt({itemCount:e.length,visibleItemCount:2});return h(R,{className:`relative font-sans p-9 overflow-hidden text-center ${ee[n]} ${t}`,...r,children:[l?m(V,{headingType:"h3",className:"mb-6",title:l}):null,h("div",{children:[m("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*i}px)`},role:"list",children:e.length?e.map(((e,t)=>m(ks,{version:n,className:Cl[n],...e},String(t)))):null}),it({...a,btnClass:["left-8","right-8"],className:"top-1/2 mt-3"})]}),m("div",{className:`${$s} left-0 ${"secondary"===n?"bg-opacity-from-main":"bg-opacity-from-white"}`}),m("div",{className:`${$s} right-0 ${"secondary"===n?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),Is=u((e=>{const{__html:t,...l}=e;return m(R,{...l,children:m(xs,{__html:t})})})),Ts=u((({className:e="",label:t="Развернуть",isExpanded:l,isFoldButtonOnTop:n=!0,version:r="primary",...i})=>m("div",{className:`border-b border-solid border-main-divider w-full ${e}`,children:m(A,{isFoldButtonOnTop:n,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m("div",{className:"box-border",children:m(D,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(i)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>Bs({isUnfolded:e,onToggle:l,label:t,version:r})})})));Ts.childrenTypes={exclude:["RollupItem","Accordion","AccordionItem","OtherProducts","OtherProductsItem","VerticalLayout"]};const Bs=({isUnfolded:e,onToggle:t,label:l,version:n})=>{const r=l?[l,l]:["Развернуть","Скрыть"];return"primary"===n?m(Rs,{icon:["PlusIcon","MinusIcon"][Number(e)],label:r[Number(e)],onClick:t}):m(Oa,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:r[Number(e)],onClick:t})},Rs=u((({label:e,icon:t,onClick:l})=>h("button",{className:"border-none bg-transparent px-9 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer",onClick:l,children:[m("span",{className:"text-xl font-medium pr-2.5",children:e}),t?m(Y,{image:ie({icon:t}),width:"24",height:"24",asSVG:!0}):null]}))),js=[];const Vs=async e=>await St(e,{method:"GET"})||js,_s=u((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:r="",setSelected:i,label:a})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return m(Yn,{options:s,label:a,placeholder:r||n,onChange:e=>i(e.key),value:o})})),Ls=u((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:r,onSelectedBranch:i})=>h("div",{className:"flex justify-between gap-4 mb-6",children:[m("div",{className:"max-w-[396px] w-1/2",children:m(_s,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),m("div",{className:"max-w-[396px] w-1/2",children:m(_s,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:r,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ms=u((({name:e,text:t,value:l,checked:n,onChange:r,className:i})=>m("div",{className:i,children:h("label",{className:"font-sans flex items-center relative cursor-pointer",children:[m("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>r(e.target.value)}),t?m("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),As=u((()=>{const[e,t]=n("option2"),l=i((e=>t(e)),[]);return h("div",{children:[m(Ms,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),m(Ms,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),Ds=["От 1 дня","До 365 дней"],zs=u((({days:e,setDays:t})=>h("div",{className:"mb-6",children:[m("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),m(vt,{min:1,max:365,value:e,items:Ds,onChange:t})]}))),Os=u((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:r,onSelectedBoxSize:i})=>h("div",{className:"flex justify-between mb-6",children:[m("div",{className:"mr-4 w-full",children:m(_s,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),m("div",{className:"w-full",children:m(_s,{data:n,fieldLabel:"safeBoxCasesSize",selected:r,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ps=u((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:r,selectedCaseVolume:i,selectedBoxSize:a,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>h("div",{className:"flex-1 mr-9",children:[m(Ls,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Es(c)}),m(zs,{days:r,setDays:e=>c({days:e})}),m(Os,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Fs(c),safeBoxCases:s,selectedBoxSize:a,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),m("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),h("div",{className:"flex justify-between items-center mt-5",children:[m(As,{}),m(Le,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),Es=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Fs=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Us=u((({days:e,tariffs:t=[]})=>{const l=Xs(e,t);return h("div",{className:"flex flex-col justify-between",children:[h("div",{className:"flex",children:[Hs("Аренда за",e,"mr-11"),Hs("Цена",l+" ₽")]}),h("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[m(Y,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),h("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",m("br",{})," листов формата А4"]})]})]})})),Hs=(e,t,l="")=>h("div",{className:l,children:[m("div",{className:"text-m-light text-secondary-text mb-1",children:e}),m("span",{className:"text-h3 text-primary-text",children:t})]}),Xs=(e,t)=>{const l=Gs(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Gs=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},Ws=(e,t)=>e.find((e=>e.branchCode===t)),Js=u((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:a}=e;r((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Ws(n,l.selectedBranch),o=Ys(s?.safeBoxCaseVolumes),c=Zs(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Ks(c,l.selectedBoxSize);return h("div",{className:"flex justify-between align-top mb-6",children:[m(Ps,{...l,regions:t,onClick:a,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),m(Us,{days:l.days,tariffs:d})]})})),Ys=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Zs=(e,t)=>e?.find((e=>e.volume===t)),Ks=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs;const qs=u((({title:e,footnote:t,className:l="",...r})=>{const[a,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=function(){const{data:e}=kt("/api/v1/regions",It);return e||[]}(),p=Qs(c.selectedRegion,u),x=function(e){const{data:t}=kt(e?`/api/v1/safeboxes?regionCode=${e}`:null,Vs);return t||js}(p),g=i((e=>d((t=>({...t,...e})))),[d]),b=(f=Ws(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 h(R,{className:l,...r,children:[h("div",{className:"font-sans bg-white px-8 py-12",children:[e?m(V,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,m(Js,{regions:u,branches:x,data:{...c,selectedRegion:p},onClick:o,onChange:g}),t?m("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&a?m(Ca,{points:b,className:"h-[640px]"}):null]})})),Qs=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,eo=e=>Boolean(e?.icon||e?.src),to=({items:e,isDotted:t=!0,version:l="primary",className:n=""})=>e?m(zl,{className:n,version:l,items:e,listItemSize:"M",isDotted:t}):null,lo=({styleMap:e,isMainButton:t,version:l})=>(n,r,{length:i})=>{const{label:a,description:s,button:o,items:c,isDotted:d}=n,u=a&&(s||c)?"mt-2":"";return h("div",{className:`relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${ao(i)}`,children:[h("div",{className:(o?.text?"mb-8":"")+" text-center",children:[no(a),h("div",{className:`${u} flex flex-col items-center`,children:[ro({description:s,className:e.description}),to({items:c,isDotted:d,version:l,className:io({className:"text-left",description:s,styleMap:e})})]})]}),o?.text&&!t?m(Le,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(r))},no=e=>e?m("div",{className:"text-h6",children:e}):null,ro=({description:e,className:t=""})=>e?m("div",{className:t,children:e}):null,io=({className:e,description:t,styleMap:l})=>[t?l.description:"text-h6",t?"mt-0.5":"",e].join(" "),ao=e=>e<5?"w-[276px]":"w-[210px]",so={primary:{background:"bg-white",title:"text-primary-text",description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{background:"bg-primary-main",title:"text-white",description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},oo=u((({className:e="",showLines:t=!0,steps:l=[],button:n,version:r="primary",...i})=>{const{title:a}=i,s=so[r],o=l.length>3,c=(e=>e?"":"opacity-0")(t),d=a?"mt-9":"",u=(e=>e<5?"px-[88px]":"px-[55px]")(l.length);return h(R,{className:["box-border py-12 font-sans",o?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",s.background,s.title,e].join(" "),...i,children:[a?m(V,{headingType:"h3",className:"max-w-[752px] text-center",title:a}):null,l?.length?h("div",{className:`box-border ${d}`,children:[m("div",{className:`flex items-center ${u}`,children:Ui(m("div",{className:`h-0.5 w-full bg-secondary-light ${c}`}))(l.map(co(s,r)))}),m("div",{className:"flex justify-between mt-4 "+(o?"gap-x-3":"gap-x-[101px]"),children:l.map(lo({styleMap:s,isMainButton:Boolean(n?.text),version:r}))})]}):null,n?.text?m(Le,{className:"mt-8 min-w-60",version:"primary",...n}):null]})})),co=(e,t)=>({icon:l},n)=>m("div",{className:"flex flex-col items-center text-center",children:m("div",{className:`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center\n ${e.iconBackground} ${e.title}`,children:eo(l)?m(Y,{image:ie(l||{},t),width:"48",height:"48",asSVG:!0}):m("span",{className:`text-h4 ${e.iconText}`,children:n+1})})},String(n)),mo="h-12 flex-1 flex items-center justify-center cursor-pointer",ho="bg-primary-main",uo="group bg-white",po="font-sans text-m",xo="text-white",go="text-secondary-text group-hover:text-primary-main",bo=u((e=>{const{tab:t,currentTab:l}=e,n="link"===l?.type&&l.href===t.href,r=we()(t);return m("a",{role:"tab",className:`${mo} ${n?ho:uo}`,target:t.target,href:r.href,onClick:r.onClick,children:m("span",{className:`${po} ${n?xo:go}`,children:t.text})})})),fo=(e,t)=>m("h3",{className:`${po} ${t?xo:go}`,children:e}),vo=(e,t)=>m("div",{className:"min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center "+(t?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover:text-primary-main"),children:e}),No=({page:e,currentTab:t,showCounter:l,onClick:n})=>(r,i)=>{const a=r.type;if("group"!==a&&"link"!==a)return null;switch(a){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:n})=>(r,i)=>{const a=t===r,s=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return m("div",{className:`${mo} ${a?ho:uo}`,role:"tab","aria-selected":a,onClick:()=>n(r),children:h("div",{className:"flex flex-1 items-center justify-center",children:[r?.title?fo(r.title,a):null,l&&s?vo(s,a):null]})},String(i))})({page:e,currentTab:t,showCounter:l,onClick:n})(r,i);case"link":return m(bo,{tab:r,currentTab:t},String(i));default:gs(a)}},yo=u((e=>{const{className:t="",tabs:l,showCounter:a,isSticky:s,...o}=e,[c,d]=n(l?l[0]:void 0);r((()=>k.inst.subscribe("tab",(e=>{const t=l?.find(wo(e));"link"===e.type&&t&&d(t)}))),[l]),r((()=>"group"===c?.type?k.inst.subject("tab",{label:c.ref}):void 0),[c]);const h=i((e=>{"group"===e?.type&&k.inst.fire("tab",{type:e.type,label:e.ref}),d(e)}),[]);return m(R,{className:`${s?"sticky top-1 z-20 ":""}box-border flex gap-x-1 ${t}`,role:"tablist",...o,children:l?.map(No({onClick:h,currentTab:c,showCounter:a,...o}))})})),wo=e=>t=>"link"===t.type&&t.href===`#${e.label}`,Co=u((({isOpen:e,onClick:t})=>h(Le,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[m("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),m(O,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),ko={Buttons:({buttons:e})=>e&&e?.length?m("div",{children:e.map((({rounded:e,...t},l)=>ze({button:{rounded:e,...t},buttonClassName:(l>0&&e?"ml-3":"")+" w-12 h-12"})))}):null,Img:({image:e})=>e?.src?m(Y,{image:e}):null,List:({isDotted:e,...t})=>m(zl,{className:"flex flex-col justify-between items-start text-h6",version:"primary",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:u((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:r})=>e?m(Co,{isOpen:r,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null))},$o=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:i,openTableInnerIdx:a,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,u]=n(!0);r((()=>{t===a&&i||u(!0)}),[i,a]);return h("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?m("div",{className:"h-5"}):null,So({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{u(!1),s(t),l(e)},isVisible:d}})]},String(c))},So=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in ko))return null;return m(ko[l],{...t,...n})},Io=u((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:a})=>m("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($o({rowIdx:t,cellIdx:l,setTableInner:n,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:a})):null}))),To=u((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=tt({itemCount:t,visibleItemCount:5});return h("div",{children:[e?.map(Bo(l)),it({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),Bo=e=>(t,l)=>{if(!t?.length)return null;const[n,...r]=t,i=[...Array(e).keys()].reduce(((e,t)=>140*(r?.[t]?.cols?.length??1)+e),0),a=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return h("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[n?.data?m("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:n.data}):null,m("div",{className:"flex flex-grow overflow-hidden",children:m("div",{className:a,style:{transform:`translateX(-${i}px)`},children:r?.map(((t,l)=>h("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?m("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?Ro(t.cols,e):null]},`row${l}`)))})})]},String(l))},Ro=(e,t)=>e?.length>0?m("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>m("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,jo=u((({activeTabIndex:e,items:t})=>{const[l,r]=n({}),a=i((e=>r((t=>({...t,[e]:!t[e]})))),[]);return m("div",{children:t.map(((t,n)=>{const r=`activeTabIdx:${e}-tableIdx:${n}`;return h("div",{className:"w-full",children:[h("div",{className:"flex p-4 bg-gray text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>a(r),children:[t.title,m(Y,{image:{icon:l[r]?"PlusIcon":"MinusIcon"},className:"absolute right-[22px]",width:"24",height:"24"})]}),m("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[r]?"h-0":""),children:m("div",{className:"relative",children:m(To,{rows:t.rowsData})})})]},r)}))})})),Vo=u((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>h("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?m("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>m("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?m(Le,{href:t,version:"secondary",target:"_blank",appendLeft:m(O,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20",asSVG:!0}),text:"Скачать в PDF"}):null]})));async function _o(e){const t=await fetch(e);return await t.json()}const Lo=u((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:r}=function(e){const{data:t}=kt(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),_o);return t||{}}(e),[a,s]=n(0),o=i((e=>s(e)),[]),c=r?.[a]?.items??[],d=r?.map((e=>e.currency??""));return h("div",r?{className:"bg-white z-10",children:[m(Vo,{currencies:d,activeTabIndex:a,setActiveTabIndex:o,linkToPDF:t}),m(jo,{activeTabIndex:a,items:c}),m(Co,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[m("p",{children:"Данных нет"}),m(Co,{onClick:l,isOpen:!0})]})})),Mo=u((({children:e,tableInner:t,onHideContentClick:l})=>h("div",{className:"self-start flex flex-col",role:"row",children:[m("div",{className:"flex",children:e}),t?m("div",{className:"origin-top animate-expansion",children:m(Lo,{...t,onClick:l})}):null]}))),Ao=u((({row:{header:e,data:t},activeIndex:l,rowIdx:r,...a})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,u]=n(void 0),p=i((e=>u(e)),[]);return h(Mo,{onHideContentClick:()=>o(void 0),tableInner:s,...a,children:[m("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:h("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?m(Y,{className:"mr-3.5 max-w-6 max-h-6",image:ie(e.icon),width:"24px",height:"24px",asSVG:!0}):null,e?.title?m("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?m(fn,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>m(Io,{cells:e,rowIdx:r,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:p,...a},String(t))))}):null]})})),Do=u((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:r,hiddenRowsNum:i=0,...a})=>{const s=r?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,u]=tt({itemCount:c,visibleItemCount:2}),p=(o||[]).map(((e,t)=>m(Ao,{row:e,activeIndex:d,rowIdx:t,...a},String(t)))),[x,g]=i>0?[p.slice(0,-i),p.slice(-i)]:[p,[]];return h(R,{className:`bg-white font-sans p-12 overflow-hidden text-primary-text relative ${c>1?"pr-0":""} ${e}`,...a,children:[zo({title:t,description:l}),Oo(l),i>0?m(A,{renderFoldableSection:({isUnfolded:e})=>h(Po,{controls:u,children:[x,m(D,{isUnfolded:e,children:g})]}),renderFoldButton:Pa}):m(Po,{controls:u,children:p})]})}));function zo({title:e,description:t}){return e?m(V,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function Oo(e){return e?m("div",{className:"mb-9 text-center text-l",children:e}):null}const Po=u((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return h("div",{role:"table",children:[h("div",{className:"relative",children:[e,it({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Eo={primary:"bg-white",secondary:"bg-primary-main","secondary-light":"bg-primary-main/10"},Fo=u((({className:e="",title:t,description:l,blockVersion:n="primary",iconVersion:r,image:i,...a})=>{const s="secondary"===n;return h(R,{className:`px-9 py-4 flex gap-3 ${Eo[n]} ${e}`,...a,children:["small"===r?m("div",{className:"mt-1",children:Uo(s)}):null,"big"===r?Ho(i):null,h("div",{children:[t?Xo(t,s):null,l?m("div",{className:"mt-1",children:Go(l,s)}):null]})]})})),Uo=e=>m("div",{className:"rounded-full h-4 w-4 text-center text-xs-light "+(e?"bg-white text-primary-main":"bg-primary-main text-white"),children:"i"}),Ho=e=>e?.src?m(Y,{image:e}):null,Xo=(e,t)=>m(Z,{size:"text-l",font:"font-medium",color:t?"text-white":"text-primary-text",children:e}),Go=(e,t)=>m(_,{size:"text-s",color:t?"text-white":"text-secondary-text",children:e}),Wo=u((e=>{const{tags:t,className:l=""}=e;return t?.length?m("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Jo)}):null})),Jo=(e,t)=>m("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-gray",children:e},String(t)),Yo=u((e=>{const{title:t,headingType:l="h3",description:n,items:r,buttons:i,image:a,isDotted:s=!0,listItemSize:o="M",className:c="",version:d="primary",tags:u,children:p,...x}=e,g="primary"===d?"text-primary-text":"";return m(R,{className:`overflow-hidden font-sans p-9 pr-3 box-border ${c} ${ee[d]} ${Qa(c)} ${aa(c)} `,...x,children:h(kl,{title:t?m(V,{headingType:l,as:"h2",title:t,className:`whitespace-pre-wrap max-w-[600px] ${g}`}):null,buttons:i?.length?m(De,{buttons:i.map((e=>({...e,className:"min-w-[158px]"}))),className:"flex mt-8 gap-3",...x}):null,image:a?.src?m(Y,{className:"mt-auto ml-7",image:a}):null,children:[n?m("div",{className:"max-w-[600px] mt-2.5",children:m(_,{size:"text-xl-light",children:n})}):null,p,Zo({version:d,isDotted:s,listItemSize:o},r),u?.length?m(Wo,{tags:u,className:"mt-5"}):null]})})}));function Zo({version:e,isDotted:t,listItemSize:l},n){return n?.length?m(zl,{items:n,isDotted:t,className:"mt-2.5",listItemSize:l,itemClassName:"mb-1.5",version:e}):null}const Ko={left:"items-start",center:"items-center",right:"items-end"},qo=u((({className:e="",gap:t="",align:l,isPadding:n=!1,isInnerPadding:r=!0,version:i="transparent",options:a,...s})=>{const o=r?"":"!p-0";return m(R,{className:["flex flex-col [&>*]:max-w-full",n?"p-12":"",ne[t],l&&Ko[l],re[i],e].filter(Boolean).join(" "),...s,children:w({...s,options:{...a,className:o}})})}));qo.childrenTypes={exclude:["VerticalLayout"]};const Qo=e=>ia(e)<10?"py-6 px-11":"py-12 px-32",ec=u((e=>{const{title:t,src:l,previewImg:n,className:r="",...i}=e;return h(R,{className:`bg-white ${Qo(r)} ${r}`,...i,children:[m(Ue,{title:t,headlineVersion:"M"}),l?m("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:n?.src,style:{maxHeight:524},controls:!0,children:m("source",{src:l})}):null]})})),tc={Accordion:M,AccordionItem:q,BenefitsBlock:ce,Bonus:He,BonusBenefitsBlock:Je,BusinessBlock:Qe,ButtonBlock:et,Calculator:Wt,CardTransfer:tl,Carousel:xl,CarouselCard:vl,CarouselCatalogCard:yl,CarouselInvestmentCard:Sl,CarouselLinks:Rl,CarouselProductCard:El,CarouselProgramsCard:Wl,CarouselRecommendationCard:Ql,CarouselTariffsCard:tn,Catalog:mn,ComparisonTable:Bn,ContactsBlock:jn,ErrorBlock:Mn,ExchangeRateTile:or,Footer:Lr,Gallery:Gr,GracePeriod:Wr,Header:Li,Headline:Ue,HorizontalLayout:Mi,ImgBlock:Ai,InsuranceAmountBlock:Ei,InvestmentInfo:Gi,LinkDocs:na,MiniGallery:ra,MobileAppTile:sa,OfficeMap:Ma,OfficeServicesBlock:Aa,OtherProducts:za,OtherProductsItem:Fa,ParagraphBlock:Ua,PictureText:Ja,Placeholder:es,ProductBlock:ds,ProductGallery:hs,ProductTile:Ns,PromoTile:ws,Recommendation:Ss,RichTextBlock:Is,RollupItem:Ts,SafeDepositRental:qs,StepsBlock:oo,Tabs:yo,TariffsTable:Do,TextBlock:Fo,Tile:Yo,VerticalLayout:qo,Video:ec},lc=["Header","Footer"],nc=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function rc(e=B.inst,t=globalThis){const l=s(new Map);r((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{l.current&&l.current.set(e,t)}))),[e]),r((()=>{const n=((e,t=600)=>{let l;const n=(...r)=>{n.dispose(),l=setTimeout((()=>{e(...r)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!lc.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?cl(nc)(t):[];return l}([...l.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",n),()=>{n.dispose(),t.removeEventListener("scroll",n)}}),[e,t])}const ic=d();const ac=u((({className:e,onClick:t,ariaLabel:l})=>m("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:sc()}))),sc=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("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"}),m("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"})]})},oc=u((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return r((()=>{(async()=>{const[t]=await ic.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await ic.like(e))}),[e]),dislike:i((async()=>{l(await ic.dislike(e))}),[e])}}(ye().pathname);return h("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:[m(ac,{onClick:Ne(t.like),ariaLabel:"Поставить отметку «лайк»"}),m(ac,{onClick:Ne(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:t.likeCount})]})})),cc=u((e=>{const{className:t="",blocksRegistry:l,blockDecorator:n,data:r={}}=e,{style:i,blocks:a,slots:s,likeControl:o,colorPalette:c="pc"}=r,d={key:"",page:r,blocksRegistry:l,blockDecorator:n,parent:r};return rc(),h("section",{className:`relative ${x(i)} ${t}`,"data-theme":c,children:[s?.header?m("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:y(s?.header,{...d,slotName:"header"})}):null,h("div",{className:"container grid grid-cols-12 gap-1",children:[y(a,d),s?.footer?y(s?.footer,{...d,slotName:"footer"}):null]}),o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(oc,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));cc.childrenTypes=[],cc.slots=()=>["header","footer"];e.Blocks=tc,e.ContentPage=cc,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=d,e.handlerDecorator=Ne,e.joinList=Ui,e.packageVersion="0.6.49",e.projectSettings=o,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=ve,e.useRouter=ye,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniBlocks={})}(this,(function(e){"use strict";let t;const l=e=>(...l)=>t[e](...l),n=l("useState"),r=l("useEffect"),i=l("useCallback"),a=l("useMemo"),s=l("useRef");const o=new class{_={PROD_BRANCH:"master",FORCED_DRAFT_FLOW:!1};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}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 CDN(){return this._.CDN}get BASE_PATH(){return this._.BASE_PATH&&!this._.BASE_PATH.endsWith("/")?`${this._.BASE_PATH}/`:this._.BASE_PATH}get YANDEX_MAP_API_KEY(){return this._.YANDEX_MAP_API_KEY}get YANDEX_METRIKA_ID(){return this._.YANDEX_METRIKA_ID}},c="likesToken";function d(){async function e(){try{const e=JSON.parse(globalThis.localStorage?.getItem(c)||"");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(c,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/${o.ASSIST_PROJECT_ID}/nodes/likes`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify({node_ids:t})}),{likes:n}=await e.json();return n||[]}catch(e){return console.error(e),[]}},like:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/like`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}},dislike:async function(t){if(!t)return 0;const{token:l,name:n}=await e();try{const e=await fetch(`/assist/v1/public/projects/${o.ASSIST_PROJECT_ID}/nodes/unlike`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Authorization:l,UserID:n},body:JSON.stringify({node_id:t,user_name:n})}),{likes:r}=await e.json();return r||0}catch(e){return console.error(e),0}}}}const m=(...e)=>globalThis._uni._jsx(...e),h=(...e)=>globalThis._uni._jsxs(...e),u=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:p(e)),t._tmpl},p=e=>{function t(t,l){const{children:n,...r}=t||{},i=l?.slots?.default,a=n||i&&i();return e(Object.assign(r,a&&{children:a}),l)}return t.inheritAttrs=!1,t};function x(e){return e?e.filter(Boolean).join(" "):""}const g=({blockClassName:e,block:t,render:l})=>l({blockClassName:e,block:t}),b=[],f=["col-span-12"];function v(e,t){const{key:l,blockDecorator:n=g,blocksRegistry:r={},ancestors:i=b,className:a=""}=t,{type:s}=e;s&&s in r||console.warn(`No block with "${s}" is registered`);const o=s&&r[s];return n({blockClassName:`scroll-mt-12 ${a} ${x(e.style||f)}`,block:e,ancestors:i,render:({block:n,blockClassName:r})=>{const{content:i}=n;return o?m(o,{className:r,block:e,options:t,...i},l):null}},l)}const N=[],y=(e,{key:t,ancestors:l=N,slotName:n=null,renderChild:r=v,...i})=>(e||[]).map(((e,a)=>r(e,{...i,key:`${t||e.type}-${a}`,ancestors:i.parent?[...l||N,[i.parent,n]]:l})));function w({children:e,block:t,options:l,renderChild:n}){return e||(t&&l?y(t.blocks,{...l,parent:t,renderChild:n}):null)}const C={left:"text-left",center:"text-center",right:"text-right"};class k{static inst=new k;subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const l=this.subjectsStateMap[e];return l&&t(l),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}}function $(e,{sensitivity:t,rootRef:l}={}){const n=s(null),i=a((()=>({threshold:S(t),root:l?.current})),[t,l?.current]);return r((()=>{if(!n.current)return;const t=new IntersectionObserver(e,i);return t.observe(n.current),()=>{t.disconnect()}}),[e,i]),n}function S(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 I=e=>e?.replace("#",""),T=e=>`${globalThis.location?.pathname}#${I(e)}`;class B{static inst=new B;eventBus=new k;constructor(){const e=I(globalThis.location?.hash);e&&this.eventBus.subject("goto",{anchor:e})}goto(e){const t=I(e);t&&(this.push(t),this.eventBus.fire("goto",{anchor:t}))}push(e){globalThis.history?.pushState(null,"",T(e))}replace(e){globalThis.history?.replaceState(null,"",T(e))}reset(){globalThis.history?.replaceState(null,"",T())}}const R=u((({className:e,block:t,tag:l="section",role:a,children:s})=>{const o=l,c=function(e,t=B.inst){const l=$(i((l=>{if(!e||!l?.length)return;const n=l[l.length-1];t.eventBus.fire("intersection",{block:e,intersection:n})}),[e,t]),{sensitivity:1});return r((()=>{if(l.current)return t.eventBus.subscribe("goto",(({anchor:t})=>{l.current&&e?.anchor===t&&l.current.scrollIntoView({behavior:"smooth",block:"start"})}))}),[e,t]),l}(t),[d,h]=n(!0);return r((()=>k.inst.subscribe("tab",(e=>{if("group"===e.type){const l=t?.labels?.length||t?.anchor;h(!e.label||(!l||Boolean(t?.labels?.includes(e.label))))}else h(!0)}))),[t]),d?m(o,{className:e,role:a,...t?.anchor?{id:t.anchor,ref:c}:{},children:s}):null})),j={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},V=u((e=>{const{className:t="",headingType:l="h3",title:n,as:r="h3"}=e;return m(r,{className:`font-sans m-0 ${j[l]} ${t}`,children:n})})),_=u((({size:e,color:t,align:l,font:n,children:r})=>m("p",{className:["font-sans",e,t,l,n].filter(Boolean).join(" "),children:r}))),L=u((({children:e})=>m("ul",{className:"list-none m-0 p-0",children:e}))),M=u((({className:e="",title:t,accordionAlignTitle:l="center",description:n,...r})=>h(R,{className:`p-12 mb-1 last:mb-0 bg-white text-primary-text ${e}`,...r,children:[t?m(V,{headingType:"h3",as:"h2",className:`mb-2.5 ${C[l]}`,title:t}):null,n?m("div",{className:"mb-2.5",children:m(_,{size:"text-l",children:n})}):null,m(L,{children:w(r)})]})));M.childrenTypes=["AccordionItem"];const A=u((({isFoldButtonOnTop:e=!1,unfoldedByDefault:t=!1,renderFoldableSection:l,renderFoldButton:r})=>{const[a,s]=n(t),o=i((()=>{s((e=>!e))}),[]),c=l({isUnfolded:a,onToggle:o}),d=r?r({isUnfolded:a,onToggle:o}):null;return h("div",e?{children:[d,c]}:{children:[c,d]})})),D=u((({className:e="",isUnfolded:t,children:l})=>{const n=s(null);return r((()=>{n.current&&(n.current.style.maxHeight=t?`${n.current.scrollHeight}px`:"")}),[t,l?.length]),m("div",{ref:n,className:`transition-max-h duration-300 overflow-hidden ${n.current||!t?"max-h-0":""} ${e}`,children:l})})),z={normal:"",color:"text-primary-main",black:"text-black",white:"text-black"},O=u((({className:e="",imageClassName:t="",name:l="",alt:n=`Иконка ${l}`,title:r=n,iconVersion:i="color",asSVG:a,...s})=>{const c=`${o.CDN||""}icons/${l}.svg`;return a&&"normal"!==i?m(F,{className:e,children:h("svg",{className:[E(e,s.width),z[i],t,P(i)].join(" "),...s,"aria-hidden":"true",children:[r?m("title",{children:r}):null,n?m("desc",{children:n}):null,m("use",{href:`${c}#icon`,xlinkHref:`${c}#icon`})]})}):m("img",{className:e,src:c,alt:n,title:r,...s,"aria-hidden":"true"})})),P=e=>"white"===e?"invert":"",E=(e,t)=>t?`width: ${t}px `:"w-full h-full",F=u((({className:e,children:t})=>e?m("div",{className:e,children:t}):t)),U=(e,t)=>e.media&&t.media?e.media-t.media:0,H=u((({className:e="",image:t,imageClassName:l="",isMobile:n=!1,pathPrefix:r})=>{if(!t||!t?.sources&&!t?.src)return null;return h("picture",{className:`${n?"flex":"flex-none"} ${e}`,children:[t?.sources?.length?t.sources.sort(U).map((({src:e,format:l,media:n},i)=>m("source",{srcSet:W(e,r),type:J(l),media:n?`(max-width: ${n}px)`:"",...t.size},`${i}_${e}`))):null,X({...t,src:G(t.src,r)},l,n)]})})),X=(e,t="",l=!1)=>{const n={width:e.size?.width?`${e.size?.width}px`:"100%",height:e.size?.height?`${e.size?.height}px`:"100%"},r=e.title||"",i=e.alt||e.title,a=l?"m-auto":"m-0";return m("img",{src:e.src,className:`${a} ${t}`,alt:i,title:r,style:n,...e.size})},G=(e,t)=>!e||e?.startsWith("data:image")?e:`${((e="")=>e&&!e.endsWith("/")?`${e}/`:e)(t)}${e}`,W=(e,t)=>e?.split(",").map((e=>G(e.trim(),t))).join(", ");function J(e){return e?`image/${String(e)}`:void 0}const Y=u((({className:e="",image:t,imageClassName:l="",isMobile:n,pathPrefix:r,...i})=>t?.src||t?.icon?t.icon?m(O,{className:e,imageClassName:l,iconVersion:t?.iconVersion||"normal",name:t.icon,...i}):m(H,{className:e,imageClassName:l,image:t,isMobile:n,pathPrefix:r}):null)),Z=u((({size:e,color:t,align:l,font:n,children:r})=>m("span",{className:["font-sans",e,t,l,n].filter(Boolean).join(" "),children:r}))),K=["PlusIcon","MinusIcon"],q=u((({className:e="",label:t="",isExpanded:l,...n})=>m("li",{className:`border-0 border-b border-solid border-main-divider last:border-b-0 ${e}`,children:m(A,{isFoldButtonOnTop:!0,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m(D,{className:"grid grid-cols-12 gap-5 [&>*]:p-0",isUnfolded:e,children:w(n)}),renderFoldButton:({isUnfolded:e,onToggle:l})=>m(Q,{label:t,icon:K[Number(e)],onClick:l})})})));q.childrenTypes=[];const Q=u((({label:e,icon:t,onClick:l})=>h("button",{className:"border-none bg-transparent px-0 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer",onClick:l,children:[m(Z,{size:"text-xl",font:"font-medium",children:e}),m(Y,{image:{icon:t},className:"text-primary-main flex-shrink-0",width:"24",height:"24",asSVG:!0})]}))),ee={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white"},te={primary:"text-secondary-text",secondary:"text-white"},le={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text"},ne={XXL:"gap-12",XL:"gap-10",L:"gap-8",M:"gap-4",S:"gap-2",XS:"gap-1","":""},re={transparent:"",primary:"bg-white",secondary:"bg-primary-main"},ie=(e,t="primary")=>({...e,iconVersion:e?.iconVersion??("secondary"===t?"white":"color")}),ae={primary:"",secondary:"text-white"},se={primary:"text-secondary-text",secondary:"text-white opacity-80"},oe={primary:"bg-main-divider text-primary-main",secondary:"bg-white/30 text-black"},ce=u((({className:e="",title:t,benefitList:l,version:n="primary",...r})=>h(R,{className:`font-sans text-primary-text p-12 flex flex-col items-center ${e} ${ee[n]}`,...r,children:[t?m(V,{headingType:"h3",as:"h2",className:`max-w-[47rem] text-center ${ae[n]}`,title:t}):null,l?.length?m("div",{className:"flex flex-wrap w-full justify-center gap-x-20 mt-8",children:l.map(de(n))}):null]}))),de=e=>(t,l)=>{const n=t.description;return h("div",{className:"flex items-center basis-1/2 max-w-[500px] mb-14",children:[t?.icon?.icon?m(Y,{className:`w-12 h-12 min-w-12 p-3 rounded-full ${oe[e]}`,image:ie(t.icon,e),asSVG:!0}):null,t?.icon?.src?m(Y,{image:t.icon}):null,h("div",{className:"ml-5",children:[t?.label?m("h3",{className:`text-h6 m-0 ${ae[e]}`,children:t.label}):null,me(n,e)]})]},String(l))},me=(e,t)=>{const l=e?.benefitType||null;return e&&l?m("div",{className:`text-l-light mt-2 ${se[t]}`,children:"list"===l?ue(e):he(e)}):null},he=e=>e?.name||null,ue=e=>{const t=e?.bullets?"list-disc pl-6":"";return e?.items&&e.items.length>0?m("ul",{className:t,children:e.items.map(((e,t)=>m("li",{children:e},`benefitListItem-${t}`)))}):null};const pe=e=>e?.includes("//"),xe=e=>(e||"").replace(/\/?\?.*/,""),ge=e=>{if(!e||!pe(e))return;const t=e,l=t.indexOf("//"),n=t.indexOf("/",l+"//".length);return-1!==n?t.substring(0,n):t},be=e=>{if(!e||!pe(e))return;return new URL(e).pathname},fe=e=>e?.startsWith("#");var ve=Object.freeze({__proto__:null,isURL:pe,withoutQuery:xe,getOrigin:ge,getPathname:be,getHash:e=>{if(!e||!pe(e))return;const t=e.indexOf("#");return-1!==t?e.substring(t,e.length):void 0},isHash:fe});const Ne=(e,t)=>Ne._impl(e,t);function ye(){return ye._impl()}function we(){const e=ye(),t=B.inst;return l=>{const n=((e,t)=>{if(!e)return e;const l=ge(t?.href);return l?e.replace(l,"")||"/":e})(l.href,e);return{...l,href:n,"aria-label":l.text,onClick:Ne((r=>{l.onClick&&l.onClick(r),Ce(n,l.target)||(r?.preventDefault(),fe(n)?t.goto(n):n&&e.push(n))}),l)}}}Ne._impl=e=>e,Ne.setup=e=>{Ne._impl=e},ye._impl=()=>({href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{}}),ye.setup=e=>{ye._impl=e};const Ce=(e,t)=>pe(e)||t&&"_self"!==t||e?.startsWith("/"),ke={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:""},$e="bg-main-divider text-main-disabled",Se={primary:$e,secondary:$e,white:$e,link:""},Ie="text-center font-sans select-none",Te={primary:"group-hover:brightness-0 group-hover:invert",secondary:"group-hover:brightness-0 group-hover:invert",white:"group-hover:brightness-0 group-hover:invert",link:""},Be=u((e=>{const{text:t,aboveText:l,appendLeft:n,appendRight:r,version:i="primary"}=e;return h("div",{className:Re(e),children:[n?m("div",{className:Te[i],children:n}):null,je(e)?h("div",{children:[l?m("div",{className:"text-xs-light text-left",children:l}):null,m("div",{className:"text-left "+(l?"text-s -mt-0.5":"text-l"),children:t})]}):null,r?m("div",{className:Te[i],children:r}):null]})})),Re=e=>{const{version:t,aboveText:l,rounded:n}=e;if("link"===t)return"";const r="gap-2 "+(l?"py-2.5 px-7":"py-4 px-4");return["group flex items-center justify-center",je(e)?r:"h-12 w-12",n?"rounded-full":""].join(" ")},je=({text:e,aboveText:t,appendLeft:l})=>Boolean(e||t||!l),Ve=({className:e,rounded:t,version:l})=>["inline-block",Ie,l?Se[l]:"",t?"rounded-full":"rounded-md",e].join(" "),_e=({className:e,rounded:t,version:l})=>[Ie,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border",l?ke[l]:"",t?"rounded-full":"rounded-md",e].join(" "),Le=u((({disabled:e,children:t,...l})=>{const n=we()(l),r=t??m(Be,{...n});return m(e?Ae:Me,{...n,children:r})})),Me=u((({className:e="",href:t,rel:l,target:n,ariaLabel:r,version:i,rounded:a,onClick:s,children:o})=>m("a",{className:_e({className:e,version:i,rounded:a}),href:t,rel:l,target:n,"aria-label":r,role:t?"link":"button",onClick:s,children:o}))),Ae=u((({className:e,ariaLabel:t,version:l,rounded:n,children:r})=>m("div",{role:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:Ve({className:e,rounded:n,version:l}),children:r}))),De=u((({className:e="",buttons:t})=>t&&t?.length?m("div",{className:e,children:t.map(((e,t)=>ze({button:e,index:t})))}):null));function ze({button:e,buttonClassName:t,index:l}){const{icon:n,iconRight:r,version:i,text:a,...s}=e,o="secondary"===i?"color":"white",c=Oe({...n,iconVersion:o}),d=Oe({...r,iconVersion:o});return a?m(Le,{className:t,appendLeft:c,appendRight:d,version:i,text:a,...s},l?String(l):""):null}const Oe=e=>{if(!e?.icon&&!e?.src)return null;const t=e?.size?.width?`${e.size.width}`:"24";return m(Y,{image:e,width:t,height:"24",asSVG:!0})},Pe={transparent:{wrapper:"bg-transparent",titleColor:"text-primary-text"},primary:{wrapper:"bg-white",titleColor:"text-primary-text"},secondary:{wrapper:"bg-primary-main",titleColor:"text-white",descriptionColor:"text-white/80"}},Ee={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"}},Fe={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"},Ue=u((({className:e="",title:t,description:l,headlineVersion:n="XL",bgColorHeadline:r="transparent",align:i="text-center",as:a,...s})=>{const o=Pe[r],c=Ee[n];return h(R,{className:`flex flex-col p-12 ${c.wrapper} ${o.wrapper} ${e}`,...s,children:[t?m(V,{className:`whitespace-pre-wrap ${o.titleColor} ${i}`,...c?.title,as:a||c?.title.as,title:t}):null,l?m(_,{color:o.descriptionColor||o.titleColor,size:c.descriptionSize,align:i,children:l}):null]})})),He=u((e=>{const{className:t="",title:l,description:n,bonusItems:r,...i}=e;return m(R,{className:`font-sans bg-white p-12 pb-9 ${t}`,...i,children:h("div",{className:"container",children:[m(Ue,{className:"!p-0",title:l,description:n,headlineVersion:"M",...i}),m("div",{className:"flex flex-wrap w-full mt-9",children:r?.length?r.map(((e,t)=>m("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:h("div",{className:"flex justify-between w-full",children:[h("div",{className:"flex flex-col justify-between mr-4",children:[h("div",{children:[m("div",{className:"text-h4",children:e.title}),m("div",{className:"text-xl-light mt-2 max-w-[488px]",children:e.description})]}),e?.buttons?.length?m(De,{buttons:e?.buttons}):null]}),e.bonusItemContent?.bonusType?Xe(e.bonusItemContent):null]})},String(t)))):null})]})})})),Xe=e=>m("div",{children:"count"===e.bonusType?Ge(e):We(e)}),Ge=e=>h("div",{className:"relative -bottom-3 h-auto flex items-end mt-14 shrink-0",children:[e.bonusCount?m("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?m("span",{className:"text-h2 bg-clip-text text-transparent bg-green-to-yellow",children:e.bonusName}):null]}),We=e=>e.image?m(Y,{className:"w-12 h-12 min-w-12 p-3 rounded-full",image:e.image}):null,Je=u((({bonusBenefits:e,cardTextAlign:t="center",className:l="",columnsCount:n="4",subtitle:r,title:i,...a})=>h(R,{className:`font-sans text-primary-text bg-white p-12 flex flex-col text-center ${l}`,...a,children:[m(Ue,{className:"!p-0 mb-8",title:i,description:r,headlineVersion:"M",...a}),e?.length?m("div",{className:`grid gap-1 ${C[t]} ${Ze(n)}`,children:e.map(Ye)}):null]}))),Ye=({icon:e,label:t,description:l},n)=>h("div",{className:"flex flex-col items-center text-h6",children:[l?m("span",{children:l}):null,e?m(Y,{image:e,height:"180",width:"auto",className:"h-[180px] w-auto"}):null,m("div",{children:t?m("span",{children:t}):null})]},String(n)),Ze=e=>{switch(e){case"3":return"grid-cols-3";case"4":return"grid-cols-4";default:return"grid-cols-5"}},Ke=u((e=>{const{title:t,image:l,cardItems:n,button:r}=e;return h("div",{className:"border-gray border p-9 w-1/2",children:[l?h("div",{className:"flex justify-center",children:[l?.src?m(Y,{className:"mb-5",image:l}):null,l?.icon?m(Y,{image:l,asSVG:!0}):null]}):null,t?m(V,{headingType:"h4",title:t,className:"mb-6"}):null,n?.length?m("ul",{children:n.map(((e,t)=>qe(e,String(t))))}):null,r?.text?ze({button:r,buttonClassName:"mt-6"}):null]})})),qe=(e,t)=>{const{icon:l,text:n}=e;return h("li",{className:"flex items-center gap-3.5 mb-3 last:mb-0",children:[l?.icon?m(Y,{image:l,className:"w-12 h-12 min-w-12 p-3 rounded-full bg-main-divider",asSVG:!0}):null,l?.src?m(Y,{image:l}):null,m("span",{className:"text-xl-light",children:n})]},t)},Qe=u((({className:e="",title:t,cards:l,...n})=>h(R,{className:`font-sans bg-white p-12 pb-9 ${e}`,...n,children:[m(V,{headingType:"h3",title:t,className:"text-center mb-8"}),m("div",{className:"flex gap-5",children:l?.length?l.map(((e,t)=>m(Ke,{...e},String(t)))):null})]}))),et=u((e=>{const{className:t,button:l,...n}=e;return m(R,{className:t,...n,children:l?ze({button:l}):null})})),tt=e=>{const{itemCount:t,visibleItemCount:l,isCyclic:r}=e,[a,s]=n(0),o=i((()=>s((e=>r?(e+1)%t:Math.min(e+1,t-1)))),[r,t]),c=i((()=>s((e=>r?(t+e-1)%t:Math.max(e-1,0)))),[r,t]),d=r||function(e,{itemCount:t,visibleItemCount:l,container:n}){if(l)return t>l;if(n){return n.scrollWidth*e/t+n.clientWidth<n.scrollWidth}return!1}(a,e)&&a<t-(l||1),m=r||a>0;return[a,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]};const lt=u((({className:e,disabled:t,...l})=>m(Le,{rounded:!0,className:`group 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:m(Y,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"16",height:"16",asSVG:!0})}))),nt=u((e=>m(lt,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),rt=u((e=>m(lt,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"})));function it({dec:e,inc:t,canDec:l,canInc:n,btnClass:r,className:i=""}){return l||n?h("div",{children:[l?m(lt,{className:`absolute z-50 ${r[0]} ${i}`,onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!l}):null,n?m(lt,{className:`absolute z-50 rotate-180 ${r[1]} ${i}`,onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!n}):null]}):null}const at=e=>new Intl.NumberFormat("ru-RU",{maximumSignificantDigits:3}).format(e),st=u((({title:e,value:t,postfix:l="",prefix:n,className:r=""})=>h("div",{className:`mb-7 ${r}`,children:[e?m("div",{className:"text-l-light text-secondary-text",children:e}):null,t?h("div",{className:"text-h3",children:[n," ",at(Math.round(t))," ",l]}):null]}))),ot=2e6,ct=97e4,dt=Math.round(23.5),mt={minSum:6e4,maxSum:ot,minMonths:13,maxMonths:60,rateBottomRange:12,rateTopRange:7,isSalaryClient:!0,isStateEmployee:!0,isInsurance:!0,sumBorder:999999},ht={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},ut={minSum:5e4,maxSum:5e6,minMonths:2,maxMonths:120,rate:5.9,isMonthlyInterestPayment:!0},pt=u((({rate:e,title:t="Ставка",unit:l,rateBlockClassName:n})=>h("div",{children:[m("div",{className:"text-l-light text-secondary-text",children:t}),h("div",{className:"flex justify-start",children:[m("span",{className:`block gradient-color-text font-mohave text-title-huge pr-6 -mt-4 ${n}`,children:String(e).replace(".",",")}),l?m("span",{className:"gradient-color-text text-[65px] leading-[75px]",children:l}):""]})]})));function xt(e){return e?.length?m(De,{buttons:e,className:"flex flex-col mt-7 gap-2"}):null}const gt=e=>e?m("p",{className:"text-s-light text-secondary-text mt-7",children:e}):null,bt=(e,t,l)=>Math.max(t,Math.min(e,l)),ft=e=>e.split(/\s+/).join(""),vt=u((({className:e,title:t,items:l=[],min:n=1,max:r=100,step:i=1,value:a=n,disabled:s=!1,onChange:o})=>{const c=e=>{o&&o(bt(Number(ft(e.target.value)),n,r))},d={backgroundSize:`${(100*(a-n)/(r-n)).toFixed(2)}% 100%`};return h("div",{className:e,children:[h("label",{className:"block relative",children:[t?m("span",{className:"text-m-light text-primary-text",children:t}):null,m("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:at(a),disabled:s,onChange:c,onBlur:c}),m("div",{className:"absolute inset-x-0 -bottom-1 px-4 leading-[18px]",children:m("input",{className:"box-border w-full m-0 cursor-pointer slider",type:"range",min:n,max:r,step:i,value:a,disabled:s,onChange:c,style:d})})]}),Nt(l)]})}));function Nt(e){return m("div",{className:"flex justify-between my-2",children:e.map(((e,t)=>m("span",{className:"text-s-light text-secondary-text",children:e},String(t))))})}const yt=1e3;function wt(e,t,l){const{moneyValue:n,minSum:r,maxSum:i,step:a=yt,isShowItems:s=!0}=t,o=[`От ${at(r)} ₽`,`До ${at(i)} ₽`];return m(vt,{title:e,items:s?o:[],min:r,max:i,step:a,value:bt(n,r,i),onChange:l})}const Ct=new Map;function kt(e,t,{fallback:l}={}){const i=a((()=>$t(e)),[e]),[s,o]=n(),[c,d]=n(),m=e=>{o(e),d(void 0)},h=e=>{o(void 0),d(e)};r((()=>{if(!i.every((e=>null===e)))try{const e=t(...i);"then"in e?(e=>{e.then((e=>Ct.get(i)||e)).then(m).catch(h)})(e):m(e)}catch(e){h(e)}}),[t,...i]);const u=i[0],p=l&&"string"==typeof u&&l[u];return{data:s||c||!p?s:p,error:c,mutate:()=>Promise.resolve(void 0),isValidating:!1}}function $t(e){return e?Array.isArray(e)?e:e instanceof Function?$t(e()):[e]:[e]}async function St(e,t){try{return await It(e,t)}catch(e){console.error(e)}return null}async function It(e,t){const l=await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}});return await l.json()}function Tt(e){const{data:t}=kt(`/wcms-resources/${e}.json`,It);return t}const Bt=(e,t)=>{const{travelExpenseValue:l,restExpenseValue:n}=e,r=Tt(t||"bonus-calculator-data")||ht,[i,a]=((e,t,l)=>{const{minSumTravel:n,minSumOther:r,maxBonus:i,prefMonthsNum:a,prefTravelBonusRate:s,prefRestBonusRate:o,travelBonusRate:c,restBonusRate:d}=e;if(t===n&&l===r)return[0,0];const m=Math.min(Math.round(s*t)+Math.round(o*l),i);return[m,m*a+Math.min(Math.round(c*t)+Math.round(d*l),i)*(12-a)]})(r,l,n);return{...r,...e,monthBonus:i,yearBonus:a}},Rt=u((({className:e="",sourceBookDir:t="",buttons:l,footnote:r})=>{const[a,s]=n(6e3),o=i((e=>s(e)),[]),[c,d]=n(6e3),u=i((e=>d(e)),[]),p={travelExpenseValue:a,restExpenseValue:c},{minSumTravel:x,maxSumTravel:g,minSumOther:b,maxSumOther:f,monthBonus:v,yearBonus:N}=Bt(p,t);return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[wt("Сумма покупок в категории путешествия, ₽",{minSum:x,maxSum:g,moneyValue:a,step:500,isShowItems:!1},o),wt("Сумма покупок в остальных категориях, ₽",{className:"mt-7",minSum:b,maxSum:f,moneyValue:c,step:500,isShowItems:!1},u)]}),m("div",{children:v>=0?m(pt,{title:"Баллов за месяц",rate:v,rateBlockClassName:"tracking-[-14px]"}):null}),h("div",{className:"w-full max-w-[350px]",children:[N>=0?m(st,{title:"Баллов за год",value:N}):null,xt(l),gt(r)]})]})})),jt=u((({className:e,viewBox:t,fill:l="none",width:n,height:r,paths:i,...a})=>m("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:l,width:n,height:r,children:i.map((({d:e,fill:t,...l},n)=>m("path",{d:e,fill:t||"currentColor",...a,...l},n)))}))),Vt=[{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"}],_t=u((({className:e,text:t,checked:l,isRadio:n,onChange:r})=>m("div",{className:e,children:h("label",{className:"flex items-center relative cursor-pointer group",children:[m("input",{className:`peer appearance-none w-5 h-5 border-solid cursor-pointer group-hover:border-primary-hover\n ${n?"rounded-full border-2":"rounded checked:bg-primary-main border"}\n ${l?"border-black":"border-gray"}\n checked:border-primary-main m-0`,type:"checkbox",onChange:e=>r&&r(e.target.checked),checked:l}),n?m("div",{className:"left-1 w-3 h-3 rounded-full bg-primary-main hidden absolute peer-checked:block"}):m(jt,{paths:Vt,className:"hidden absolute left-1 ml-px peer-checked:block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"}),t?m("span",{className:"font-sans ml-3 text-l-light",children:t}):null]})}))),Lt=u((({items:e,checkedItem:t,onChange:l})=>m("div",{className:"flex flex-col gap-3",children:e?.map((({id:e,text:n})=>m(_t,{isRadio:!0,text:n,checked:t===e,onChange:()=>l&&l(e)},String(e))))})));function Mt(e,t,l){const{minMonths:n,maxMonths:r,monthsValue:i}=t,a=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`;return m(vt,{className:"mt-7",title:e,items:[`От ${a(n)}`,`До ${a(r)}`],min:n,max:r,step:1,value:bt(i,n,r),onChange:l})}const At=(e,t)=>{const{isInsurance:l,isSalaryClient:n,isStateEmployee:r,moneyValue:i}=e,a=Tt(t||"credit-calculator-data")?.rows?.find((e=>l===e.isInsurance&&n===e.isSalaryClient&&r===e.isStateEmployee))||mt,{rateBottomRange:s,rateTopRange:o,sumBorder:c}=a,d=i<=c?s:o,m=((e,t)=>{const{isAnnuity:l,moneyValue:n,monthsValue:r}=t;if(l){const t=e/1200;return n*(t+t/(Math.pow(1+t,r)-1))}return Math.round(n/r)+n*(e/1200)})(d,e);return{...a,...e,finalRate:d,monthlyPayment:m}},Dt="annuity",zt="differential",Ot=[{id:Dt,text:"Аннуитетный"},{id:zt,text:"Дифференцированный"}],Pt=u((({className:e="",sourceBookDir:t,buttons:l,footnote:r})=>{const[a,s]=n(!1),[o,c]=n(!0),[d,u]=n(!1),[p,x]=n(!1),[g,b]=n(ct),f=i((e=>b(e)),[]),[v,N]=n(dt),y=i((e=>N(e)),[]),w=At({isAnnuity:a,isInsurance:o,isSalaryClient:d,isStateEmployee:p,moneyValue:g,monthsValue:v},t);return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[wt("Сумма кредита, ₽",{...w,step:500},f),Mt("Срок кредита, месяцев",w,y),h("div",{className:"mt-7",children:[m(_t,{text:"Получаю зарплату на счёт в Россельхозбанке",checked:d,onChange:u}),m(_t,{className:"mt-3",text:"Работаю в бюджетной организации",checked:p,onChange:x}),m(_t,{className:"mt-3",text:"Комплексная страховая защита",checked:o,onChange:c})]})]}),m(pt,{title:"Ставка",rate:w.finalRate,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-full max-w-[350px]",children:[m(st,{title:a?"Ежемесячный платеж":"Платёж в первый месяц",value:w.monthlyPayment,postfix:"₽"}),m(Lt,{items:Ot,checkedItem:a?Dt:zt,onChange:e=>s(e===Dt)}),xt(l),gt(r)]})]})})),Et=(e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n,monthsValue:r}=t;return l?Math.round(n*Math.pow((1200+e)/1200,r)-n):Math.round(n*e*30*r/365/100)},Ft="everyMonth",Ut="atEndTerm",Ht=[{id:Ft,text:"Ежемесячно"},{id:Ut,text:"В конце срока"}],Xt={CreditCalculatorForm:Pt,DepositCalculatorForm:u((({className:e="",sourceBookDir:t,buttons:l,footnote:r})=>{const[a,s]=n(ct),o=i((e=>s(e)),[]),[c,d]=n(dt),[u,p]=n(!1),x={moneyValue:a,monthsValue:c,isMonthlyInterestPayment:u},g=i((e=>d(e)),[]),b=((e,t)=>{const{isMonthlyInterestPayment:l,moneyValue:n}=e,r=Tt(t||"deposit-calculator-data")?.rows.find((e=>l===e.isMonthlyInterestPayment))||ut,{rate:i}=r,a=Et(i,e),s=n+a;return{...r,...e,income:a,finalSum:s}})(x,t),{income:f,finalSum:v,rate:N}=b;return h("section",{className:e,children:[h("div",{className:"w-[468px]",children:[wt("Сумма вклада, ₽",{...b},o),Mt("Срок вклада, месяцев",{...b},g)]}),m(pt,{rate:N||1,rateBlockClassName:"tracking-[-25px]",unit:"%"}),h("div",{className:"w-full max-w-[350px]",children:[f?m(st,{title:"Доход по вкладу",value:f,postfix:"₽",prefix:"+"}):null,v?m(st,{title:"Сумма в конце срока",value:v,postfix:"₽"}):null,m(Lt,{items:Ht,checkedItem:u?Ft:Ut,onChange:e=>p(e===Ft)}),xt(l),gt(r)]})]})})),BonusCalculatorForm:Rt},Gt=(e,t)=>{const l=e?.calcType;if(!l||!(l in Xt))return null;const n=Xt[l];return m("section",{className:"box-border relative bg-white flex shrink-0 self-start basis-full",role:"listitem",children:h("div",{className:"box-border p-9 w-full",children:[e?.title?m(V,{className:"text-center mb-6",title:e.title}):null,m(n,{...e,className:"flex justify-between"})]})},String(t))},Wt=u((({className:e="",calculatorTabs:t=[],...l})=>{const r=t.map((e=>e.nav||{})),a=t.map((({calculatorBlock:e})=>e||{})),[s,o]=n(0),c=i((e=>o(e)),[]),[d,u]=tt({itemCount:t?.length,visibleItemCount:3});return h(R,{className:`box-border overflow-hidden relative font-sans w-100 text-primary-text bg-white ${e}`,...l,children:[h("div",{className:"bg-white",children:[r.length>1?Jt({activeIndex:d,tabsNav:r,slideIndexShift:s,onClick:c}):null,it({...u,btnClass:["left-3","right-3"],className:"top-8"})]}),m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:a?.length?a.map(Gt):null})]})}));function Jt({activeIndex:e,tabsNav:t,slideIndexShift:l,onClick:n}){return h("div",{children:[m("div",{style:{transform:`translateX(-${388*e}px)`},className:"flex flex-col justify-end items-center h-[126px] pt-9 box-border duration-1000",children:m("div",{className:"w-full flex flex-nowrap items-end gap-2",children:t.map(((e,t)=>function({tab:e,i:t,isActive:l,onClick:n}){const r=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",i=l?"text-xl mb-1.5":"text-l mb-[3px]",a=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 h("button",{type:"button",onClick:n,"aria-label":e?.title,className:`box-border relative border border-gray cursor-pointer text-left border-b-0 flex hover:h-[88px]\n ${r}`,children:[m(Y,{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}),h("div",{className:"border-0",children:[m("div",{className:`${i}`,children:e?.title}),m("div",{className:`${a}`,children:e.description})]})]},String(t))}({tab:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})}),m("div",{className:"w-full h-2 bg-primary-main"})]})}const Yt=e=>(e.match(/\./g)||[]).length>1?e.slice(0,e.lastIndexOf(".")):e,Zt=e=>{const t=0===e.indexOf("0")&&2===e.length?e.replace("0","0."):e;return t.startsWith(".")?t.replace(".","0."):t},Kt=e=>String(e.replace(",",".").replace(/[^.\d]/g,"")),qt=u((({className:e="",inputClassName:t="",id:l,name:n,type:r="text",label:a,value:s="",valid:o=!0,children:c,onChange:d,onBlur:u,...p})=>{const x=i((e=>{const t=e.target.validity.valid?e.target.value:s;d(t)}),[d]),g=i((e=>{if(!u)return;const t=e.target.validity.valid?e.target.value:s;u(t)}),[u]),b=c?"pr-8":"",f=o?"border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text":"border-error";return h("div",{className:`relative ${e}`,children:[a?m("label",{className:"block text-m-light mb-2",children:a}):null,m("input",{className:`w-full border rounded-md text-primary-text outline-none p-4 ${b} ${f} ${t}`,id:l,name:n||l,type:r,value:s,onChange:x,onBlur:g,...p}),c]})})),Qt=u((({className:e="",onChange:t,minValue:l=0,maxValue:n=3e5,...r})=>{const a=i((e=>{if(!t)return;const r=Yt(Zt(Kt(ft(e))));const i=el(r,bt(Number(r),l,n));t(String(i))}),[t]),s=i((e=>{var l;t&&t((l=e,new Intl.NumberFormat("ru-RU",{minimumFractionDigits:0,maximumFractionDigits:2}).format(Number(ft(l))).replace(",",".")))}),[t]);return m(qt,{className:e,inputClassName:"w-full",onChange:a,onBlur:s,...r,children:m("span",{className:"text-xl-light absolute right-4 bottom-4",children:"₽"})})})),el=(e,t)=>Number(e)===t?e:String(t),tl=u((({className:e="",title:t="Укажите сумму перевода",label:l="Сумма перевода",placeholder:r="1500",button:a,...s})=>{const[o,c]=n(""),d=i((e=>c(e)),[]),u=!Number(ft(o)),p=u?Ve({version:a?.version}):_e({className:"text-white",version:a?.version}),x=we();return h(R,{className:`p-12 flex flex-col items-center font-sans bg-white ${e}`,...s,children:[t?m(V,{className:"max-w-[684px] pb-9",headingType:"h2",title:t}):null,h("form",{className:"w-[468px]",method:"POST",action:"https://www.rshb.ru/p2p/",children:[m(Qt,{name:"amount",value:o,onChange:d,valid:""===o||!u,placeholder:r,label:l}),a?.text?m("button",{type:"submit",className:`w-full p-4 mt-6 ${p} `,disabled:u,...x(a),children:a.text}):null]})]})})),ll=u((({className:e="",style:t,idx:l,activeIndex:n,observerOptions:r,children:a,onIntersection:s})=>{const o=$(i((e=>{e.length&&s&&s(l||0,e[e.length-1])}),[s,l]),r);return m("div",{className:`inline-block snap-always box-border ${e}`,style:t,role:"listitem","aria-current":Boolean(l===n),ref:o,children:a})})),nl=["min-w-[100%]","min-w-[50%]","min-w-[33.33%]","min-w-[25%]"],rl=u((({className:e="",containerRef:t,activeIndex:l,visibleItemCount:n=0,gap:r=0,padding:a=0,snapAlign:o="snap-center",children:c,onVisibleItemsChange:d,onVisibleIndicesChange:h})=>{const u={sensitivity:1,rootRef:t},p=s([]),x=i(((e,t)=>{const l=[...p.current||[]];l[e]=t,p.current=l,d&&d(l),h&&h(al(l))}),[d,h]),g=n>0?r*Number(n)-1:0;return m("div",{className:`box-border overflow-auto flex horizontal-list no-scrollbar ${e}`,style:{...il(a,g),gap:`${r}px`},role:"list",ref:t,children:(b=(e,t)=>m(ll,{className:`${o} ${n?nl[n-1]:""}`,style:il(a/4),activeIndex:l,idx:t,observerOptions:u,onIntersection:x,children:e},String(t)),e=>null==e?e:Array.isArray(e)?e.map(b):b(e,0))(c)});var b})),il=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),al=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),sl=e=>e,ol=(e=sl)=>t=>t.reduceRight(((t,l)=>e(t)>e(l)?t:l)),cl=(e=sl)=>ol((t=>-e(t))),dl=e=>t=>e.scrollWidth/t,ml=e=>(t,l)=>{e.scrollBy({left:l*dl(e)(t),behavior:"smooth"})},hl=({itemCount:e,isCyclic:t,onVisibleIndicesChange:l})=>{const r=s(null),[a,o]=n([]),c=i((e=>{o((t=>{return(l=t)===(n=e)||Boolean(l&&n&&l?.length===n?.length&&l.every(((e,t)=>e===n[t])))?t:e;var l,n})),l&&l(e)}),[e]),[d,m]=a.length?[cl()(a),ol()(a)]:[-1,-1],h=d>0,u=m<e-1,p=i((()=>{var l;r.current&&(t&&!h?(l=r.current).scrollTo({left:l.scrollWidth,behavior:"smooth"}):ml(r.current)(e,-1))}),[t,e,h]),x=i((()=>{r.current&&(t&&!u?r.current.scrollTo({left:0,behavior:"smooth"}):ml(r.current)(e,1))}),[e,t,u]);return[r,{scrollLeft:p,scrollRight:x,canScrollLeft:t||h,canScrollRight:t||u,visibleIndicesRange:[d,m],handleVisibleIndicesChange:c}]},ul="absolute top-0 bottom-0 z-50 w-[84px]",pl="absolute top-[calc(50%-12px)] z-50",xl=u((({className:e="",itemCount:t,visibleItemCount:l,isBlur:n=!0,isCyclic:r=!1,...i})=>{const{blocks:a}=i.block||{},s=t||a?.length||0,[o,c]=hl({itemCount:s,isCyclic:r});return m(R,{className:`font-sans p-12 ${e}`,...i,children:h("div",{className:"relative max-w-full",children:[m(rl,{containerRef:o,visibleItemCount:l,snapAlign:"snap-start",gap:4,onVisibleIndicesChange:c.handleVisibleIndicesChange,children:w(i)}),(c.canScrollLeft||c.canScrollRight)&&n?h("div",{children:[m("div",{className:`${ul} left-0 bg-opacity-from-white`}),m("div",{className:`${ul} right-0 bg-opacity-to-white`})]}):null,gl(c)]})})}));xl.childrenTypes=["CarouselCard","CarouselCatalogCard","CarouselInvestmentCard","CarouselProductCard","CarouselProgramsCard","CarouselRecommendationCard","CarouselTariffsCard","CarouselInvestmentCard"];const gl=({scrollLeft:e,scrollRight:t,canScrollLeft:l,canScrollRight:n})=>h("div",{children:[l?m(nt,{className:`${pl} left-8`,onClick:e}):null,n?m(rt,{className:`${pl} right-8`,onClick:t}):null]}),bl="absolute border border-solid border-gray w-full h-full",fl={normal:"min-w-[1007px]",mini:"min-w-[355px]"},vl=u((({className:e="",button:t,description:l,title:n,version:r="normal"})=>m("section",{className:`flex pb-9 pl-12 ${fl[r]} ${e}`,children:h("div",{className:"relative w-full",children:[m("div",{className:`${bl} z-10 top-9 right-12 bg-green-dark`}),m("div",{className:`${bl} z-10 top-6 right-8 bg-green`}),m("div",{className:`${bl} z-10 top-3 right-4 bg-green-light`}),h("div",{className:"relative bg-white z-10 py-6 px-10 border border-solid border-green-light",children:[m(Ue,{className:"!p-0",title:n,description:l,headlineVersion:"M"}),t?m("div",{className:"mt-6",children:ze({button:t})}):null]})]})}))),Nl={black:"bg-black",white:"bg-white"},yl=u((({className:e="",title:t,description:l,image:n,price:r,button:i,colors:a,version:s="primary"})=>h("section",{className:`border box-border border-gray p-7 min-w-[392px] flex flex-col justify-left ${ee[s]} ${e}`,role:"listitem",children:[n?.src?m(Y,{className:"mb-5 flex justify-center",image:n}):null,t?m(V,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?m("div",{className:"mb-4",children:m(_,{size:"text-m",align:"text-left",font:"font-light",children:l})}):null,a?.length?h("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:m(Z,{children:"Доступные цвета: "})}),a.map(wl)]}):null,r?h(Z,{size:"text-h3",align:"text-left",children:[r," ₽"]}):null,i?ze({button:i,buttonClassName:"mt-5 w-full"}):null]}))),wl=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${Nl[e]}`},String(t)),Cl={primary:"border-gray",secondary:"border-white/50"},kl=u((({className:e="",title:t="",buttons:l,image:n,children:r})=>h("div",{className:`font-sans flex flex-col grow h-full items-start ${e}`,children:[t,h("div",{className:"flex grow w-full justify-between",children:[h("div",{className:"flex flex-col justify-between w-full",children:[m("div",{className:"h-full",children:r}),l?m("div",{className:"mt-auto pt-8",children:l}):null]}),n]})]}))),$l={1:"flex gap-y-2 flex-col",2:"flex gap-y-2 gap-x-10 flex-wrap"},Sl=u((({additionalDescription:e,cardsList:t=[],className:l="",columnsMode:n=1,description:r,image:i,title:a,version:s="primary",...o})=>{const c=a?m(V,{headingType:"h4",as:"h3",className:"mb-3.5 z-10",title:a}):null,d=i?.src?m(Y,{className:"absolute bottom-0 right-0 m-0",image:i}):null;return m(R,{className:["relative text-left border border-solid box-border p-9 w-[697px]",ee[s],Cl[s],l].join(" "),...o,children:h(kl,{title:c,image:d,children:[h("div",{className:"flex justify-between mb-4",children:[r?m("div",{className:"w-1/3",children:m(Z,{size:"text-h6",children:r})}):null,e?m(Z,{size:"text-m",font:"font-light",color:te[s],children:e}):null]}),t.length?m("ul",{className:`list-none m-0 p-0 ${$l[n]}`,children:Il(t,n)}):null]})})})),Il=(e,t)=>e.slice(0,[4,9][t-1]).map(((e,l)=>{return h("li",{className:2===t?"basis-[calc(50%-20px)]":"",children:[e?.parameter?m("div",{className:"pr-2.5",children:m(Z,{size:(n=t,1===n?"text-h6":"text-l"),children:e.parameter})}):null,e?.parameterDescription?m(Z,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e.parameterDescription}):null]},String(l));var n})),Tl="bg-transparent border-white border h-[70px] absolute w-[316px] top-0",Bl=u((({text:e,href:t="",target:l="",className:n=""})=>e?h("div",{className:`relative group cursor-pointer w-[328px] h-[82px] ${n}`,children:[h("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:text-primary-main z-10",role:"link",href:t,target:l,children:[m("div",{className:"p-0.5",children:e}),m("div",{className:"w-6 h-6",children:m(Y,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover:brightness-100",image:{icon:"ArrowRightIcon",iconVersion:"black"},imageClassName:"group-hover:text-primary-main",width:"24",height:"24",asSVG:!0})})]}),m("div",{className:`${Tl} mx-1.5 mt-1.5`}),m("div",{className:`${Tl} mt-3 mr-3`})]}):null)),Rl=u((({className:e="",additionalDescription:t,description:l,links:n,title:r,...i})=>h(R,{className:`bg-primary-main flex w-full p-10 overflow-hidden justify-between font-sans ${e}`,...i,children:[h("div",{className:"flex flex-col max-w-96 pr-9 text-white text-xl-light",children:[m(Ue,{title:r,as:"h1",description:l,align:"text-left",className:"p-0",bgColorHeadline:"secondary"}),t?m("div",{className:"pt-6",children:m(_,{children:t})}):null]}),n?.length?jl(n):null]}))),jl=e=>{const t=Math.ceil(e.length/12);return m(xl,{className:"min-w-[832px] w-[832px]",isBlur:!1,isCyclic:!0,itemCount:t,children:new Array(t).fill(null).map(((t,l)=>m("div",{className:"w-[672px] min-w-[672px] ml-20 mr-20 flex flex-wrap self-start",children:e.slice(12*l,12*(l+1)).map(((e,t)=>m(Bl,{className:"m-1",...e},String(t))))},String(l))))})},Vl={primary:"bg-primary-text",secondary:"bg-white",gray:"bg-secondary-text"},_l={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"},Ll=u((({className:e="",isDotted:t=!0,children:l,version:n="primary",size:r="M"})=>h("div",{className:`font-sans flex items-baseline ${e}`,role:"listitem",children:[t?m("div",{children:m("div",{className:`rounded-full align-middle inline-block ${Vl[n]} ${_l[r]}`})}):null,m("span",{children:l})]}))),Ml={primary:"text-primary-text",secondary:"text-white",gray:"text-secondary-text"},Al={S:"text-l-light",M:"text-h6",L:"text-h5"},Dl={S:"ml-2",M:"ml-3",L:"ml-4"},zl=u((e=>{const{className:t="",hasIndent:l,isDotted:n,itemClassName:r="",items:i,listItemSize:a="M",version:s="primary"}=e;return i?.length?m("section",{className:`${Ml[s]} ${Al[a]} ${t} ${l?Dl[a]:""}`,role:"list",children:i.map(((e,t)=>m(Ll,{className:`${r} mb-1.5`,isDotted:n,version:s,size:a,children:e},String(t))))}):null})),Ol={primary:"text-secondary-text",secondary:"text-white/80"},Pl="box-border border-solid border border-gray ",El=u((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:n,icon:r,items:i=[],button:a={},version:s="primary",isDotted:o=!0,align:c="center"})=>h("section",{className:["flex flex-col justify-between items-stretch min-w-[260px] h-full w-full p-6",Pl,C[c],ee[s]].join(" "),role:"listitem",children:[h("div",{className:"flex flex-col h-full",children:[Fl(r,s),Ul(t,e),Hl(l,e),Gl(i,o,s),Xl(n,s)]}),ze({button:a,buttonClassName:"mt-6"})]}))),Fl=(e,t)=>h("div",{className:"flex justify-center",children:[e?.src?m(Y,{className:"mb-5",image:e}):null,e?.icon?m(Y,{className:"w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full",image:ie(e,t),asSVG:!0}):null]}),Ul=(e,t)=>t?m(Z,{size:Fe[e],children:t}):null,Hl=(e,t)=>e?m("div",{className:t?"mt-2":"",children:m(_,{size:"text-l",children:e})}):null,Xl=(e,t="primary")=>e?m("div",{className:"mt-auto",children:m(Z,{size:"text-m",font:"font-light",color:Ol[t],children:e})}):null,Gl=(e,t,l="primary")=>e?.length?m(zl,{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,version:l}):null,Wl=u((({className:e="",title:t,icon:l,list:n=[],version:r="primary",...i})=>h(R,{className:`font-sans border border-gray flex min-w-[536px] ${ee[r]} ${e}`,...i,children:[h("div",{className:"w-[200px] min-w-[200px] self-end",children:[l?.icon?m(Y,{image:ie(l),asSVG:!0}):null,l?.src?m(Y,{image:l}):null]}),h("div",{className:"p-8 pl-3 w-full",children:[t?m(V,{className:" mb-3.5",headingType:"h5",title:t}):null,n.length?m("div",{className:"flex flex-col gap-3",children:n?.map(Jl)}):null]})]}))),Jl=(e,t)=>h("div",{className:"break-words",children:[e.title?m("div",{className:"text-h6",children:e.title}):null,e.description?m("span",{className:"text-l-light mt-1",children:e.description}):null]},String(t)),Yl=[{origins:["t.me","telegram.org"],icon:{icon:"TelegramIcon"},label:"Телеграм"},{origins:["vk.com"],icon:{icon:"VKIcon"},label:"ВКонтакте"},{origins:["ok.ru"],icon:{icon:"OkIcon"},label:"Одноклассники"},{origins:["apps.apple.com"],icon:{icon:"AppleIcon"},label:"App Store"},{origins:["play.google.com"],icon:{icon:"PlayMarketIcon"},label:"Google Play"}],Zl={default:" w-14 h-14",small:" w-12 h-12"},Kl=u((({version:e="primary",isRounded:t=!1,buttonSize:l="default",...n})=>{const r=we(),{href:i,onClick:a}=r(n),{icon:s,label:o}=Yl.find((({origins:e})=>e.some((e=>i?.includes(e)))))||{};if(!s)return null;return m("a",{className:`flex items-center justify-center group box-border ${"secondary"===e?"bg-white hover:bg-secondary-hover":"border-solid border border-main-divider hover:border-transparent hover:bg-primary-main"} ${t?"rounded-full":"rounded-md"} ${"primary"===e?"hover:text-black":""} ${Zl[l]}`,href:i,"aria-label":o,target:"_blank",rel:"noopener noreferrer",onClick:a,children:s?m(Y,{image:ie(s),imageClassName:"group-hover:text-white",width:"24",height:"24",asSVG:!0}):null})})),ql=u((({className:e="",media:t,version:l,isRounded:n=!1,buttonSize:r,children:i})=>h("div",{className:"font-sans",children:[m("div",{className:`flex gap-2.5 ${e}`,children:t?.map(((e,t)=>m(Kl,{version:l,isRounded:n,buttonSize:r,...e},String(t))))}),m("span",{className:"text-s-light text-secondary-text",children:i})]}))),Ql=u((({button:e,className:t="",description:l,image:n,items:r=[],socialMedia:i=[],title:a,version:s="primary",...o})=>{const c=a?m(V,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:a}):null,d=n?.src?m(Y,{className:"absolute bottom-0 right-0 m-0",image:n}):null;return m(R,{className:`relative text-left border border-solid box-border p-7 min-w-[524px]\n ${Cl[en(s)]}\n ${le[s]}\n ${t}`,...o,children:m(kl,{className:"flex justify-between",title:c,image:d,children:h("div",{className:"h-full flex flex-col justify-between",children:[l?m("span",{className:"mb-2",children:l}):null,r.length?m(zl,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:r,version:s}):null,i.length?m(ql,{className:"pt-10 pb-0",media:i,version:en(s)}):null,e?.text?m("div",{className:"pt-2 mt-16",children:ze({button:e})}):null]})})})})),en=e=>"gray"===e?"primary":e,tn=u((({className:e="",title:t,icon:l,isHighlighting:n,button:r,rows:i=[],...a})=>{const s=i.map(rn),o=s.slice(0,1),c=s.slice(1);return h(R,{className:`font-sans relative bg-white border border-gray min-w-[322px] p-8\n ${ln(n)}\n ${e}`,...a,children:[n?an():null,l?.src?m(Y,{image:l}):null,t?m(V,{className:"text-primary-text text-center pt-2",headingType:"h5",title:t}):null,r?m(Le,{className:"w-full mt-4",...r}):null,i.length?m(A,{renderFoldableSection:({isUnfolded:e})=>h("div",{children:[o,m(D,{isUnfolded:e,children:c})]}),renderFoldButton:i.length>1?nn:null}):null]})})),ln=e=>e?"mt-9 pt-[70px]":"mt-[70px] pt-9",nn=({isUnfolded:e,onToggle:t})=>h("button",{className:"w-full cursor-pointer text-primary-main pt-5 flex justify-between items-center",onClick:t,children:[m("div",{children:e?"Скрыть":"Подробнее о тарифе"}),m(O,{className:"text-primary-text",name:e?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16",asSVG:!0})]}),rn=(e,t)=>h("div",{className:"py-5 border-b border-main-divider",children:[e?.title?m("div",{className:"text-secondary-text text-m-light opacity-80",children:e.title}):null,e?.description?m("div",{className:"text-primary-text text-h6 mt-1",children:e.description}):null]},String(t)),an=()=>h("div",{className:"absolute -top-7 -right-4 h-[60px] w-[60px] bg-white flex flex-col items-center justify-center shadow-[0_4px_25px_rgba(0,0,0,0.07)]",children:[m(O,{iconVersion:"black",name:"HeartIcon",width:"23",height:"22",asSVG:!0}),m("div",{className:"text-center",children:"Хит"})]}),sn={black:"bg-black",white:"bg-white"},on=u((({className:e="",title:t,description:l,image:n,price:r,button:i,colors:a})=>h("section",{className:`border border-solid box-border border-gray p-[30px] min-w-[402px] flex flex-col justify-left ${e}`,role:"listitem",children:[n?.src?m(Y,{className:"mb-5 flex justify-center",image:n}):null,t?m(V,{headingType:"h6",as:"h4",className:"text-left mb-1.5",title:t}):null,l?m("div",{className:"text-m-light text-left mb-4",children:l}):null,a?.length?h("div",{className:"flex mb-4 text-s-light text-secondary-text",children:[m("div",{className:"mr-1.5",children:"Доступные цвета: "}),a.map(cn)]}):null,r?h("div",{className:"text-h3 text-left",children:[r," ₽"]}):null,i?ze({button:i,buttonClassName:"mt-5 w-full"}):null]}))),cn=(e,t)=>m("span",{className:`w-6 h-6 ml-3 border border-solid border-main-divider rounded-full ${sn[e]}`},String(t)),dn="absolute top-0 bottom-0 w-[84px]",mn=u((({cards:e=[],className:t="",title:l,description:n,...r})=>{const[i,a]=tt({itemCount:e?.length,visibleItemCount:3});return h(R,{className:`bg-white relative font-sans p-12 overflow-hidden text-center ${t}`,...r,children:[m(Ue,{className:"!p-0",title:l,description:n,headlineVersion:"M",...r}),m("div",{className:"flex duration-1000 gap-3.5 mt-8",style:{transform:`translateX(-${430*i}px)`},role:"list",children:e?.length?e.map(((e,t)=>m(on,{...e},String(t)))):null}),it({...a,btnClass:["left-8","right-8"],className:"top-1/2 z-10 mt-6"}),m("div",{className:`${dn} left-0 bg-opacity-from-white`}),m("div",{className:`${dn} right-0 bg-opacity-to-white`})]})})),hn="bg-gradient-to-r from-main-gradient-start to-main-gradient-end",un="border-gray border-solid border",pn="border-main-divider border border-t-0 border-x-0",xn="w-[200px] mr-6",gn=u((({icon:e,image:t,title:l,link:n})=>h("div",{className:`w-80 box-border flex flex-col items-center rounded-t-md border-b-0 px-7 pt-7 pb-[46px] ${un} ${hn}`,role:"columnheader",children:[e&&!t?.src&&m(Y,{className:"h-[63px] w-[63px] min-w-[63px] min-h-[63px] mb-4",image:ie(e),width:"63",height:"63",asSVG:!0}),t?.src&&m(Y,{className:"mb-[18px]",image:t}),l?m(V,{headingType:"h4",as:"h3",className:"text-center text-white",title:l}):null,n?.text&&m("div",{className:"mt-auto w-full",children:m(Le,{href:n.href,target:n.target,className:"mt-4 w-full text-primary-main bg-white hover:bg-secondary-hover active:bg-secondary-active",children:m("div",{className:"text-xs-light font-medium py-[11px]",children:n.text})})})]}))),bn={comparison:"flex gap-4 duration-1000",tariff:"flex flex-grow duration-1000"},fn=u((({children:e,activeIndex:t,columnWidth:l,version:n="comparison"})=>m("div",{className:"flex flex-1 overflow-hidden",children:m("div",{className:bn[n],style:{transform:`translateX(-${t*l}px)`},children:e})}))),vn=u((({children:e})=>m("div",{className:"self-start flex flex-col",role:"row",children:m("div",{className:"flex",children:e})}))),Nn=u((({colHeaders:e,activeIndex:t})=>h(vn,{children:[m("div",{className:xn,role:"columnheader"}),m(fn,{activeIndex:t,columnWidth:336,children:e.map(((e,t)=>m(gn,{...e},String(t))))})]}))),yn=u((({cell:e,isFirstRow:t,isLastRow:l,isFillGradient:n})=>m("div",{className:`w-80 box-border flex flex-col ${un} ${l?"border-t-0 rounded-b-md":"border-y-0"} ${n?hn:""}`,role:"cell",children:m("div",{className:`mx-7 h-full ${pn} ${n&&t?"border-t":""} ${l?"border-b-0":"border-solid"}`,children:e.map(((e,t)=>kn(e,t,n)))})}))),wn=(e=!1)=>"text-xl m-0 "+(e?"text-white":""),Cn=(e=!1)=>"text-s opacity-80 "+(e?"text-white":"text-secondary-text"),kn=({label:e,description:t},l,n)=>h("div",{className:"first:pt-7 pt-6 last:pb-7",children:[e?m("h4",{className:wn(n),children:e}):null,t?m("div",{className:Cn(n),children:t}):null]},String(l)),$n=(e=!1)=>`text-s py-7 ${pn} w-[200px] mr-6 ${e?"border-b-0":"border-solid"}`,Sn=u((({row:{header:e,data:t},activeIndex:l,isColoredFirstColumn:n,isFirstRow:r,isLastRow:i})=>h(vn,{children:[e?.title?m("div",{className:$n(i),children:e.title}):null,t?.length?m(fn,{activeIndex:l,columnWidth:336,children:t.map(((e,t)=>m(yn,{cell:e,isFirstRow:r,isLastRow:i,isFillGradient:n&&0===t},String(t))))}):null]}))),In=u((({rowData:e,isColoredFirstColumn:t,activeIndex:l,controls:n})=>{const{isScrollAvailable:r}=n;return h("div",{className:"relative",children:[e.map(((e,n,{length:r})=>m(Sn,{row:e,isFirstRow:0===n,isLastRow:n+1===r,activeIndex:l,isColoredFirstColumn:t},String(n)))),r?it({...n,btnClass:["top-[108px]","top-[44px]"],className:"right-7",isDisabled:!0}):null]})})),Tn=u((({columns:e=[],rowHeaders:t,isShowAllRow:l,visibleRowLength:n,isColoredFirstColumn:r})=>{const i=e?.map((({header:e})=>e||{})),a=e?.map((({data:e})=>e))||[],s=t?.map(((e,t)=>({header:e,data:a.map((e=>e?.[t]||[{}]))}))).slice(0,l?t.length:n),[o,c]=tt({itemCount:e.length,visibleItemCount:3}),{isScrollAvailable:d}=c;return h("div",{children:[h("div",{role:"table",children:[i?.length?m(Nn,{colHeaders:i,activeIndex:o}):null,s?.length?m(In,{rowData:s,isColoredFirstColumn:r,activeIndex:o,controls:c}):null]}),d?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Bn=u((({className:e="",title:t,rowHeaders:l,columns:r,visibleRowLength:a=0,isColoredFirstColumn:s=!1,...o})=>{const[c,d]=n(!a),u=i((()=>d((e=>!e))),[]);return h(R,{className:`bg-white font-sans py-12 pl-12 overflow-hidden text-primary-text relative ${e}`,...o,children:[m(V,{headingType:"h2",className:"max-w-[47rem] text-center mb-9 mx-auto",title:t}),m(Tn,{columns:r,rowHeaders:l,isShowAllRow:c,isColoredFirstColumn:s,visibleRowLength:a}),a?Rn({isShowAllRow:c,onClick:u}):null]})})),Rn=({isShowAllRow:e,onClick:t})=>m("div",{className:"pr-12",children:h("div",{className:"flex w-full",children:[m("div",{className:xn}),m("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:m("div",{className:"font-sans text-xs-light font-medium py-3",children:e?"Скрыть":"Показать все параметры"})})]})}),jn=u((({className:e="",contacts:t,info:l,version:n="secondary",...r})=>h(R,{className:`${ee[n]} flex p-12 ${e}`,...r,children:[l?.length?Vn(l,n):null,t?.length?Vn(t,n):null]}))),Vn=(e,t)=>m("div",{className:"flex grow basis-0",children:e.map(((e,l)=>_n({column:e,index:l,version:t})))}),_n=({column:e,index:t,version:l})=>e?m("div",{className:"flex flex-col grow basis-0 pr-11 last:pr-0",children:e.map((({title:e="",description:t,additionalDescription:n,button:r},i)=>h("div",{className:"mt-6 first:mt-0",children:[m(Ue,{className:"!p-0",title:e,description:t,headlineVersion:"XS",align:"text-left",bgColorHeadline:l}),n?m("div",{className:"mt-1.5 opacity-80",children:m(_,{size:"text-m-light",children:n})}):null,r?m(Le,{className:"mt-6",...r}):null]},String(i))))},`col-${String(t)}`):null,Ln=e=>"Image"===e?.errorContentType&&e?.image?m(Y,{image:e.image}):"Code"===e?.errorContentType&&e.code?m("div",{className:"font-mohave text-title-extra gradient-color-text",children:e.code}):null,Mn=u((({className:e="",title:t,subtitle:l,error:n,button:r})=>h("section",{className:`flex flex-col justify-center items-center mt-12 ${e}`,children:[m("div",{className:"flex justify-center py-20",children:Ln(n)}),t?m(V,{headingType:"h1",className:"text-left mb-4",title:t}):null,l?m("div",{className:"font-sans text-xl-light mb-7 max-w-[613px] text-center",children:l}):null,r?.text?m(Le,{className:"py-4 px-9",version:r?.version,...r,children:r.text}):null]})));var An;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD"}(An||(An={}));const Dn=new Intl.NumberFormat("ru",{style:"currency",currency:An.RUB}),zn=e=>e?Dn.format(e):"",On="text-left text-m-light text-secondary-text",Pn=`${On} pl-11`,En={USD:"DollarIcon",EUR:"EuroIcon"},Fn=u((({className:e,exchangeCurrencyItems:t})=>h("table",{className:`h-fit w-fit ${e}`,children:[m("thead",{children:h("tr",{children:[m("th",{className:On,children:"Валюта"}),m("th",{className:Pn,children:"Купить"}),m("th",{className:Pn,children:"Продать"})]})}),m("tbody",{children:t.map(Un)})]}))),Un=e=>{const t=e?.currency?.currency;return h("tr",{className:"pb-1 text-h6",children:[m("td",{className:"pt-4",children:h("div",{className:"flex items-center",children:[t?m(Y,{image:{icon:En[t]},width:"24",height:"24"}):null,m("span",{className:"ml-2",children:t})]})}),m("td",{className:"pt-4 pl-11",children:zn(e?.saleExchangeRate)}),m("td",{className:"pt-4 pl-11",children:zn(e?.buyExchangeRate)})]},t)},Hn=u((({className:e="",address:t})=>h("div",{className:`flex ${e}`,children:[m(Y,{image:{icon:"GpsIcon"},width:"24",height:"24",asSVG:!0}),h("div",{className:"ml-3",children:[t?m("p",{className:"text-primary-main m-0 mb-1 text-l",children:t}):null,m("p",{className:"text-secondary-text m-0 text-m",children:"Курс указан для заданного офиса"})]})]}))),Xn=(e,t,l)=>{const n=Number(Gn(e))*Math.pow(t,l?-1:1);return Number.isInteger(n)?n:((e,t=2)=>{const l=10**t;return Math.round(parseFloat(String(e))*l)/l})(n)},Gn=e=>e.replace(/[^\d.,]/g,"").replace(",","."),Wn=e=>{return(t=[[e=>e.value!==An.RUB&&e.oppositeValue!==An.RUB,()=>e.handleConvert(e.value,An.RUB)],[e=>e.value===An.RUB&&e.oppositeValue===An.RUB,()=>e.handleConvert(e.value,An.USD)],[()=>!0,()=>e.handleConvert(e.value)]],e=>{const[,l]=t.find((([t])=>t(e)))||[];return l})(e)?.();var t};function Jn(e){const t=s(null);return r((()=>{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 Yn=u((({className:e="",isBorder:t=!0,label:l,options:a=[],value:s,onChange:o,placeholder:c=""})=>{const[d,u]=n(a[0]||{key:"",text:""}),[p,x]=n(!1),g=Jn(i((()=>x(!1)),[]));return r((()=>{u(s||{key:"",text:""})}),[s]),h("div",{className:`${e}`,ref:g,children:[l?m("span",{className:"mb-2 flex text-primary-text",children:l}):null,h("div",{className:"relative "+(p?"z-20":"z-10"),children:[h("div",{className:`text-l flex justify-between items-center mb-0.5 text-primary-text cursor-pointer\n ${qn(t)}`,onClick:()=>x(!p),children:[m("p",{className:"p-4 pr-8 h-14 overflow-hidden text-ellipsis whitespace-nowrap",children:d?.text||c}),m(O,{name:"ArrowUpIcon",width:"16",height:"16",className:"absolute right-3 "+(p?"":"rotate-180")})]}),a?.length?m("div",{className:`h-0 ${Zn(p)}`,children:m("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:a.map(Kn((e=>{u(e),x(!1),o(e)}),p,(e=>Boolean(e.key===d.key))))})}):null]})]})})),Zn=e=>e?"":"overflow-hidden",Kn=(e,t,l)=>(n,r)=>h("div",{onClick:()=>{e(n)},className:"flex px-4 py-3 cursor-pointer hover:bg-main-divider pr-11 relative",children:[m("span",{className:"min-h-6",children:n.text}),m(O,{name:"DoneSimpleIcon",width:"16",height:"16",className:["absolute right-4 pt-0.5",l(n)&&t?"":"hidden"].join(" ")})]},String(r)),qn=e=>e?"border border-gray rounded-md hover:border-primary-hover":"";function Qn(e){const{placeholder:t,rates:l,selected:n,value:r,setValue:i,setSelected:a}=e,s=l.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),o={key:n,text:n};return h("div",{className:"relative flex",children:[m(qt,{className:"shrink-0 text-l w-full appearance-none mr-[-90px]",placeholder:t,type:"text",value:r,onChange:i}),s.length?m(Yn,{isBorder:!1,onChange:e=>a(e.key),options:s,value:o}):null]})}const er=u((({className:e="",currencyRatesBuy:t,currencyRatesSell:l,button:r})=>{const[a,s]=n({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||An.RUB,selectBuy:l?.[0]?.currency?.currency||An.USD}),o=i((e=>s((t=>({...t,...e})))),[]);return h("div",{className:`grid gap-[18px] pt-2 ${e}`,children:[Qn({placeholder:"Хочу продать",rates:l,selected:a.selectSell,setSelected:tr(a,o,l),value:a.inputSell,setValue:e=>nr(o,l)(e,a.selectSell,a.selectBuy)}),Qn({placeholder:"Получу",rates:t,selected:a.selectBuy,setSelected:lr(a,o,t),value:a.inputBuy,setValue:e=>rr(o,t)(e,a.selectBuy,a.selectSell)}),r?.text?m(Le,{className:"py-4 mr-1",version:r?.version,...r,children:r.text}):null]})})),tr=(e,t,l)=>n=>{t({selectSell:n}),Wn({value:n,oppositeValue:e.selectBuy,handleConvert:(n=e.selectSell,r=e.selectBuy)=>{nr(t,l)(e.inputSell,n,r)}})},lr=(e,t,l)=>n=>{t({selectBuy:n}),Wn({value:n,oppositeValue:e.selectSell,handleConvert:(n=e.selectBuy,r=e.selectSell)=>rr(t,l)(e.inputBuy,n,r)})},nr=(e,t)=>(l,n,r)=>{e({inputSell:Gn(l),selectBuy:r});const i=t.find((e=>e.currency?.currency===r))?.buyExchangeRate||t.find((e=>e.currency?.currency===n))?.saleExchangeRate;i&&e({inputBuy:String(Xn(l,i,n===An.RUB)||"")})},rr=(e,t)=>(l,n,r)=>{e({inputBuy:Gn(l),selectSell:r});const i=t.find((e=>e.currency?.currency===r))?.saleExchangeRate||t.find((e=>e.currency?.currency===n))?.buyExchangeRate;i&&e({inputSell:String(Xn(l,i,n===An.RUB)||"")})};const ir=async e=>{const t=await ar(),l=t?.code||"000";return{region:t,exchangeRates:await sr(e,l)}},ar=async()=>{try{return await It("/api/v1/region",{method:"GET"})}catch(e){return console.log(e),{}}},sr=async(e,t)=>{try{return await It(e+`?regionCode=${t}`,{method:"GET"})}catch(e){return console.log(e),{}}},or=u((({className:e="",title:t="Курсы обмена валют",button:l,...n})=>{const{exchangeRates:r}=function(){const{data:e}=kt("/api/v1/exchangerates",ir);return e||{}}(),i=cr(r?.exchangeRate?.currencies),a=i.filter((e=>e.buyExchangeRate));a.unshift({currency:{currency:An.RUB}});const s=i.filter((e=>e.saleExchangeRate));return s.push({currency:{currency:An.RUB}}),m(R,{className:`bg-white text-primary-text font-sans p-9 box-border min-h-80 ${e}`,...n,children:m(kl,{title:m(V,{headingType:"h4",title:t,className:"whitespace-pre-wrap text-h4 mb-5"}),children:h("div",{className:"flex",children:[h("div",{className:"mr-14 pt-4",children:[i?m(Fn,{className:"mb-[30px]",exchangeCurrencyItems:i}):null,m(Hn,{address:r?.address})]}),i.length&&a.length&&s.length?m(er,{className:"grow",currencyRatesBuy:a,currencyRatesSell:s,button:l}):null]})})})})),cr=e=>e?.filter((e=>1===e?.currency?.id||2===e?.currency?.id))||[];function dr(e,t={}){const{data:l}=kt(`/wcms-resources/${e}.json`,It,{fallback:t});return l||{}}const mr={"bg-white":"color",transparent:"white"},hr={"bg-white":"text-primary-main",transparent:"text-white"},ur=(e,t,l)=>m(Y,t?.src?{image:t,className:hr[e],width:l?.width,height:l?.height,pathPrefix:"/wcms-resources/",asSVG:!0}:{image:{icon:t?.icon||"LogoIcon",iconVersion:mr[e]},className:hr[e],width:l?.width,height:l?.height,asSVG:!0}),pr={"bg-white":"text-primary-text",transparent:"text-white"},xr=(e,t,l)=>m("span",{className:`${pr[t]} ml-2.5 font-medium ${l||""}`,children:e||"Россельхозбанк"}),gr=u((({className:e="",href:t,logo:l,children:n=l?.title,targetBlank:r,bgColor:i="bg-white",showTitle:a=!0})=>h("a",{className:`inline-flex items-center font-sans no-underline ${e}`,href:t||"/",target:r?"_blank":"_self","aria-label":l?.title||"Россельхозбанк",children:[ur(i,l?.image,{width:"40",height:"45"}),a?xr(n||l?.title,i):null]}))),br=()=>{const[e,t]=n("");return{term:e,setTerm:e=>t(e)}},fr=u((({className:e,isMobile:t=!1})=>{const{term:l,setTerm:n}=br(),r=t?"text-s":"text-l-light",i=t?" placeholder-transparent":"h-full",a=t?"some search":void 0;return h("form",{className:`font-sans relative ${e}`,children:[h("div",{className:"absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none",children:[m("div",{className:t?"w-5 h-5":"w-6 h-6",children:m(Y,{image:{icon:"LoupeIcon"},width:"24",height:"24"})}),l?null:m("label",{htmlFor:"search-bar-input",className:`text-secondary-text ${r}`,children:"Поиск по сайту"})]}),m("input",{id:"search-bar-input",className:`h-12 pl-12 w-full peer text-l text-black border border-solid rounded-md box-border\n outline-none pr-[6%] border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text ${i}`,value:l,onChange:e=>n(e.target.value),type:"text",name:"search-bar-input",placeholder:a}),t?m("button",{className:"visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:e=>{e.preventDefault(),n("")},children:m(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}):m(Le,{version:"primary",text:"Найти",className:"invisible peer-focus:visible absolute top-[3px] right-1",onClick:e=>{e?.preventDefault(),console.log("click")},children:m("div",{className:"text-s px-9 py-2.5",children:"Найти"})})]})})),vr=u((e=>m(fr,{...e}))),Nr=u((({className:e="",items:t,hasButton:l})=>h("div",{className:e,children:[t?.length?t.map(yr):null,l?m(Le,{version:"primary",className:"mb-6 w-full",href:"/",target:"_blank",ariaLabel:"Обратная связь",text:"Обратная связь"}):null]}))),yr=(e,t)=>{const{type:l,text:n,description:r}=e;return h("div",{className:"mb-4",children:[m("div",{children:wr(l,n)}),m("div",{className:"mt-1 text-s-light text-secondary-text",children:r})]},String(t))},wr=(e,t="")=>{switch(e){case"tel":return m("a",{className:"text-h6 text-primary-text hover:text-primary-main no-underline",href:`tel:${Cr(t)}`,children:t});case"email":return m("a",{className:"text-xl-light text-primary-text no-underline",href:`mailto:${t}`,children:t});default:return m("span",{children:t})}},Cr=e=>e.replaceAll(/\D/g,""),kr=u((({className:e="",index:t,text:l,...n})=>{const r=we(),{href:i,target:a,onClick:s}=r(n);return m("a",{className:`text-secondary-text hover:text-primary-main inline-block no-underline ${e}`,href:i,target:a,onClick:s,children:l||`Документ ${t}`})})),$r=u((({className:e="",links:t})=>m("div",{className:e,children:t?.length?m("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)=>m(kr,{index:t,className:"text-l-light max-w-[292px]",...e},String(t))))}):null}))),Sr=e=>t=>e?.href===t?.href,Ir=(e,t)=>{return(n=e,r=t,(n||[]).map((e=>r?.find(Sr(e))||e))).concat((l=e,(t||[]).filter((e=>!l?.find(Sr(e))))));var l,n,r},Tr=u((({className:e="",items:t,fallback:l})=>{const n=we(),r=dr(o.SITEMAP||"sitemap",l),i=Ir(r.topItems,t);return m("div",{className:`flex flex-grow items-start justify-between gap-[54px] xl:gap-5 ${e}`,children:i?.map(((e,t)=>Br(n(e),t)))})})),Br=(e,t)=>{const{text:l,items:n,href:r,target:i,onClick:a}=e;return h("div",{className:"flex flex-col w-1/5 last:w-1/4 gap-3.5",children:[m("a",{className:"block leading-5 text-l text-primary-text hover:text-primary-main no-underline",href:r,target:i||"_self",onClick:a,children:l||`Раздел ${t}`}),n?.map(((e,t)=>m(Rr,{...e,index:t},String(t))))]},String(t))},Rr=u((({text:e,index:t,...l})=>{const n=we(),{href:r,target:i,onClick:a}=n(l);return m("a",{className:"block text-l-light text-secondary-text hover:text-primary-main no-underline",href:r,target:i||"_self",onClick:a,children:e||`Раздел ${t}`})})),jr=u((({className:e="",index:t,...l})=>{const n=we(),{href:r,target:i,text:a,onClick:s}=n(l);return m("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:r,target:i,onClick:s,children:a||`Документ ${t}`})})),Vr=u((({className:e="",links:t})=>h("div",{className:e,children:[m("div",{className:"pt-5",children:m("span",{className:"text-xs-light text-secondary-text",children:`© 2000-${(new Date).getFullYear()} АО «Россельхозбанк» Генеральная лицензия Банка России № 3349 от 12.08.2015 г.`})}),t?.length?m("div",{className:"flex justify-start items-start gap-5 pt-2.5",children:t.map(((e,t)=>m(jr,{index:t,...e},String(t))))}):null]}))),_r="w-[204px]",Lr=u((({className:e,...t})=>{const l=t.options?.page?.fallback,{documents:n,relatedEnterprises:r,contacts:i,socialMedia:a,mobileApps:s,topItems:c,logo:d}=dr(o.FOOTER||"footer",l);return h(R,{tag:"footer",className:`p-9 bg-white font-sans ${e||""}`,...t,children:[h("div",{className:"flex items-stretch gap-[54px] pb-[30px] xl:gap-8",children:[m(gr,{className:_r,logo:d}),m(vr,{className:"grow"})]}),h("div",{className:"flex items-stretch gap-[54px] xl:gap-8",children:[h("div",{className:"w-[204px] flex flex-col shrink-0 overflow-hidden",children:[m(Nr,{items:i,hasButton:!0}),m(ql,{media:a,children:"Соцсети"}),m(ql,{className:"mt-6",media:s,children:"Мобильное приложение"})]}),m(Tr,{className:"pt-[3px]",items:c,fallback:l})]}),m($r,{className:"mt-[98px]",links:r}),m(Vr,{links:n})]})})),Mr={normal:3,mini:4},Ar={normal:"min-w-[364px] w-[364px]",mini:"min-w-[260px] w-[260px]"},Dr={normal:380,mini:276},zr=u((({title:e,headlineSmallVersion:t="H6",description:l,additionalDescription:n,icon:r,items:i,button:a,version:s,isFullWidth:o=!0,isDotted:c=!0,align:d="center"})=>h("div",{className:`h-full flex flex-col justify-between ${C[d]}`,children:[h("div",{className:"flex flex-col h-full",children:[Or(r,s),Pr(t,e),Er(l,e),i?.length?Ur(i,c,s):null,Fr(n,s)]}),a?.text?ze({button:a,buttonClassName:"mt-6 "+(o?"":"self-center")}):null]}))),Or=(e,t)=>h("div",{className:"flex justify-center",children:[e?.src?m(Y,{className:"mb-5",image:e}):null,e?.icon?m(Y,{className:"w-8 h-8 min-w-8 mb-5 rounded-full",image:ie(e,t),asSVG:!0}):null]}),Pr=(e,t)=>t?m("div",{className:Fe[e],children:t}):null,Er=(e,t)=>e?m("div",{className:"text-l "+(t?"mt-2":""),children:e}):null,Fr=(e,t)=>e?m("div",{className:`text-m-light mt-auto ${te[t??"primary"]}`,children:e}):null,Ur=(e,t,l="primary")=>m(zl,{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,version:l}),Hr=u((({headlineVersion:e="M",cards:t=[],version:l="normal",activeIndex:n,...r})=>h("div",{children:[m(Ue,{...r,className:"!p-0",headlineVersion:e}),m("div",{className:`flex mt-8 ${t?.length<=Mr[l]?"justify-center":""} duration-1000`,style:{transform:`translateX(-${n*Dr[l]}px)`},role:"list",children:t?.map(((e,t)=>function({card:e,version:t},l){return m("section",{className:`box-border border-solid border border-gray p-6 mx-2 flex flex-col justify-between\n items-stretch ${Ar[t]} ${ee[e.version??"primary"]} w-full col-span-4`,role:"listitem",children:m(zr,{...e})},String(l))}({card:e,version:l},t)))})]})));const Xr=u((({cards:e=[],className:t="",version:l="normal",button:n,...r})=>{const[i,a]=tt({itemCount:e?.length,visibleItemCount:Mr[l]}),{isScrollAvailable:s}=a;return h(R,{className:`relative font-sans text-primary-text bg-white p-[42px] overflow-hidden flex flex-col ${t}`,...r,children:[m(Hr,{cards:e,version:l,activeIndex:i,...r}),it({...a,btnClass:["left-8","right-8"],className:"top-1/2"}),s?h("div",{children:[m("div",{className:"absolute top-0 left-0 bottom-0 w-[82px] bg-opacity-from-white"}),m("div",{className:"absolute top-0 right-0 bottom-0 w-[82px] bg-opacity-to-white"})]}):null,n?ze({button:n,buttonClassName:"mt-8 mx-auto"}):null]})})),Gr=u((e=>m(Xr,{...e,version:"normal"}))),Wr=u((({className:e="",title:t,description:l,calendar:n,...r})=>h(R,{className:`font-sans bg-white p-12 ${e}`,...r,children:[m(Ue,{className:"!p-0 mb-4",title:t,description:l,headlineVersion:"M",...r}),n?Jr(n):null]}))),Jr=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 h("div",{className:"w-full flex flex-col justify-center mt-13",children:[m("div",{className:"flex w-full mb-3 text-h6 text-center",children:l.map((e=>Yr(e,t)))}),m("div",{className:"flex w-full",children:l.map(((e,t)=>h("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:[m("div",{className:"flex",children:Zr(e)}),h("div",{className:"text-s-light text-primary-text mt-3",children:[m("span",{children:e.text})," ",m("span",{className:"text-primary-main",children:e.greenText})]})]},`monthItem-${t}`)))})]})},Yr=(e,t)=>e.month?.map(((e,l)=>m("div",{style:{flexBasis:`${t}%`},children:e.text},`monthName-${l}`))),Zr=e=>e.month?.map((e=>e.image?.src?m("div",{className:"h-[207px] border-r pr-3 mr-3 border-main-divider last:border-r-0 last:pr-0 last:mr-0",children:m(Y,{image:e.image,className:"flex"})},`monthImage-${e.image.src}`):null)),Kr=(e,t,l=((e,t)=>t.startsWith(e)))=>l(xe((e=>pe(e)||e?.startsWith("/")?e:`${o.BASE_PATH||""}${e}`)(e)),xe(pe(e)?t.href:be(t.href))),qr=e=>t=>Kr(t.href,e),Qr=e=>t=>t.items?.some(qr(e))||Kr(t.href,e)||((e,t)=>[ge(e),ge(t.href)].every(((e,t,l)=>Boolean(e)&&e===l[0])))(t.href,e)||Boolean(o.BASE_PATH?.startsWith(t.href||"/")),ei="font-sans text-s-light",ti=u((({className:e="",active:t,flat:l,ariaLabel:n,bgColor:r="bg-white",children:i,...a})=>{const s=we(),{href:o,target:c,text:d,onClick:h}=s(a);return m("a",{className:`${li(r,t,l)} ${e}`,href:o,target:c,onClick:h,rel:"noopener noreferrer","aria-label":n,children:m("span",{className:ni(r,t,l),children:d||i})})})),li=(e,t=!1,l=!1)=>{let n="border-transparent";return t&&(n="rounded-md "+("bg-white"===e?"border-primary-main":"border-white")),`${n} inline-block border border-solid bg-transparent text-center no-underline ${l?"":"px-4 py-2"}`},ni=(e,t=!1,l=!1)=>{if("transparent"===e)return`text-white hover:text-primary-hover ${ei}`;return`${t?"text-primary-main":(l?"text-primary-text":"text-secondary-text")+" hover:text-primary-main"} ${ei}`},ri=864e5;function ii(e,t,l=globalThis?.localStorage){const n=i((async(...n)=>{const r=`async:${e}`,i=function(e){const{data:t=null,timestamp:l=null}=e?JSON.parse(e):{};return t&&Date.now()-l<ri?t:void 0}(l.getItem(r));if(i)return i;const a=await t(...n);return l.setItem(r,JSON.stringify({data:a,timestamp:Date.now()})),a}),[e,t]);return kt(e,n)}const ai=()=>{const e=globalThis.localStorage?.getItem("location");try{return e?JSON.parse(e):null}catch(e){return null}};const si=u((({className:e,searchTerm:t,onSearch:l})=>h("form",{className:`font-sans relative ${e}`,children:[m("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:m("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),m("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),type:"text",name:"location-search-bar-input"})]}))),oi=u((({currentLocation:e,onChangeLocation:t,close:l,foreignOffices:n})=>{const{term:r,setTerm:a}=br(),s=i((e=>a(e)),[]),o=di(function(){const{data:e}=kt("/api/v1/regions",It);return e||[]}()).sort(((e,t)=>e.name.localeCompare(t.name))),c=((e,t)=>{const l=new Map;return e.forEach((e=>{const n=t(e),r=l.get(n);l.set(n,[...r||[],e])})),l})(o,ci);return h("div",{className:"absolute h-full w-full inset-0 bg-white text-l-light z-50",children:[m(hi,{close:l}),h("div",{className:"container py-12",children:[m(mi,{currentLocation:e}),m(si,{onSearch:s,searchTerm:r,className:"mb-7"}),r&&r.length>=3?m("div",{children:o.filter((e=>e.name?.startsWith(r))).map(pi({onChangeLocation:t,close:l}))}):m("div",{className:"columns-5",children:Array.from(c.entries()).map(ui({onChangeLocation:t,close:l}))}),m(xi,{foreignOffices:n})]})]})})),ci=e=>e.name?.charAt(0)||"",di=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),mi=u((({currentLocation:e})=>e?h("div",{className:"mb-4",children:[m(Z,{size:"text-l",font:"font-light",children:"Сейчас выбран: "}),m("button",{className:"cursor-pointer",onClick:close,children:m(Z,{color:"text-green",children:e.name})})]}):null)),hi=u((({close:e})=>m("button",{className:"visible peer-placeholder-shown:invisible absolute top-6 right-6 w-6 h-6 p-1 bg-transparent cursor-pointer border-none",onClick:t=>{t.preventDefault(),e&&e()},children:m(Y,{image:{icon:"CloseIcon"},width:"24",height:"24"})}))),ui=({onChangeLocation:e,close:t})=>([l,n])=>h("div",{className:"break-inside-avoid mb-7 w-[224px]",children:[m("div",{className:"mb-2.5",children:m(Z,{size:"text-h6",children:l})}),n.map(pi({onChangeLocation:e,close:t}))]},l),pi=({onChangeLocation:e,close:t})=>l=>m("div",{className:"mb-1",children:m("button",{className:"cursor-pointer hover:text-primary-hover",onClick:()=>{e&&e(l),t&&t()},children:l.name||""})},l.id),xi=u((({foreignOffices:e})=>e?.length?h("div",{className:"border-t border-main-divider mt-7 pt-7",children:[m("div",{className:"mb-4",children:m(Z,{size:"text-m-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),m("div",{className:"flex gap-10",children:e.map(((e,t)=>m(gi,{...e},String(t))))})]}):null)),gi=u((({icon:e,...t})=>{const l=we(),{text:n,target:r,href:i,onClick:a}=l(t);return h("div",{className:"flex gap-x-3",children:[e?m(Y,{pathPrefix:"/wcms-resources/",image:e}):null,n?m("a",{className:"hover:text-primary-hover",href:i,target:r,onClick:a,children:n}):null]})})),bi=u((({className:e="",children:t,ariaLabel:l})=>m("button",{type:"button",className:`border-0 p-0 w-6 h-6 flex items-center bg-inherit cursor-pointer ${e}`,disabled:!0,"aria-label":l,children:t}))),fi={"bg-white":"text-primary-text hover:text-primary-main",transparent:"text-white"},vi={"bg-white":"text-secondary-light hover:text-secondary-hover",transparent:"text-white"},Ni={"bg-white":"black",transparent:"white"},yi=u((({className:e,officesLink:t,defaultLocation:l="Москва",foreignOffices:a,bgColor:s="bg-white"})=>{const[o,c]=n(!1),[d,u]=function(e){const t=ai(),[l,a]=n(t?.region??{name:e}),{data:s}=ii("/api/v1/region",It);return r((()=>{a(t?.region&&t?.manual?t.region:s||{name:e})}),[s]),[l,i((e=>{globalThis.localStorage?.setItem("location",JSON.stringify({manual:!0,region:e})),a(e)}),[a])]}(l);return h("div",{className:`flex items-center ${e||""}`,children:[m(ti,{className:"mr-5",flat:!0,href:"#",text:d.name,ariaLabel:"Местоположение",onClick:()=>{c(!0)},bgColor:s}),t?m(ti,{className:"mr-7",flat:!0,href:t,text:"Офисы и банкоматы",ariaLabel:"Список всех доступных офисов и банкоматов",bgColor:s}):null,m(bi,{className:`mr-5 group ${fi[s]}`,ariaLabel:"Поиск по сайту",children:m(Y,{image:{icon:"LoupeIcon",iconVersion:Ni[s]},className:"h-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0 pointer-events-none",asSVG:!0})}),m(bi,{className:`${vi[s]} group min-w-8 min-h-8`,ariaLabel:"Дополнительные ссылки",children:m(Y,{image:{icon:"GridIcon",iconVersion:Ni[s]},className:"h-full bg-main-divider/20 rounded-full pointer-events-none",imageClassName:"group-hover:text-primary-hover group-hover:invert-0",asSVG:!0})}),o?m(oi,{currentLocation:d,foreignOffices:a,onChangeLocation:u,close:()=>{c(!1)}}):null]})})),wi={"bg-white":"bg-primary-text",transparent:"bg-white"},Ci=u((({className:e="",items:t,activeItem:l,bgColor:r})=>{const a=we(),[s,o]=n(!1),c=i((()=>o((e=>!e))),[]),d=Jn(i((()=>o(!1)),[]));return h("div",{className:`${s?"bg-white rounded-md shadow-blue-gray":""} ${e}`,ref:d,children:[m("button",{className:"flex justify-between items-center cursor-pointer h-6 ml-6","aria-label":""+(s?"Скрыть другие разделы":"Показать другие разделы"),onClick:c,children:Array(3).fill(r).map(ki)}),m("div",{className:"flex flex-col rounded-md bg-white p-6 pb-2 "+(s?"":"hidden"),"aria-hidden":!s,children:t?.map(((e,t)=>m("a",{className:"text-l-light pb-4 hover:text-primary-main "+(e===l?"text-primary-main":""),...a(e),children:e.text},e.href||String(t))))})]})})),ki=(e,t)=>m("div",{className:`w-[3px] h-[3px] rounded mr-1 ${wi[e]}`},String(t)),$i="absolute left-0 -bottom-3 w-full h-0.5",Si=u((({className:e="",active:t,bgColor:l="bg-white",dataItemName:n,children:r,...i})=>{const a=we(),{href:s,target:o,text:c,onClick:d}=a(i);return h("a",{className:`relative inline-block bg-transparent text-center no-underline ${e}`,href:s,target:o,"data-item-name":n,onClick:d,children:[m("span",{className:Ii(l,t),children:c||r}),t?m("div",{className:Ti(l,t)}):null]})})),Ii=(e,t=!1)=>{let l="text-white";return"bg-white"===e&&(l=t?"text-primary-main":"text-primary-text hover:text-primary-main"),`${l} font-sans text-l-light`},Ti=(e,t=!1)=>t?`${"bg-white"===e?"bg-primary-main":e} ${$i}`:$i,Bi=u((({className:e,active:t,bgColor:l,observerOptions:n,onVisibilityChange:r,children:a,...s})=>{const o=$(i((e=>{if(!e.length||!r)return;const t=e[e.length-1];r(t.isIntersecting)}),[r]),n);return m("span",{ref:o,children:m(Si,{className:e,active:t,bgColor:l,...s,children:a})})})),Ri=u((({subItems:e=[],bgColor:t})=>{const l=(e=>(t=[])=>{const l=t?.filter(qr(e));return l?.length?ol((e=>e.href?.length||0))(l):void 0})(ye())(e),[r,i]=n(e.length),o=e.slice(r),c=s(null),d={rootRef:c},u=a((()=>e.map(((e,t)=>e=>{i(e?ji(t):Vi(t))}))),[e]);return h("nav",{className:"relative mt-6",children:[m("div",{ref:c,className:"overflow-hidden whitespace-nowrap mr-52 pb-3",children:e.map(((e,n)=>m(Bi,{className:"mr-8 "+(r-1<n?"invisible":""),active:e===l,bgColor:t,observerOptions:d,onVisibilityChange:u[n],...e},String(n))))}),o.length?m(Ci,{className:"absolute w-52 -top-4 right-0 pt-4 z-40",items:o,activeItem:l,bgColor:t}):null]})})),ji=e=>t=>Math.max(t,e+1),Vi=e=>t=>Math.min(t,e),_i={"bg-white":"bg-main-divider",transparent:"bg-main-divider opacity-30"},Li=u((({bgColor:e="bg-white",className:t="",showSubMenu:l=!0,...n})=>{const r=ye(),{topItems:i,logo:a,defaultLocation:s,foreignOffices:c,officesLink:d}=dr(o.SITEMAP||"sitemap",n.options?.page?.fallback),u=i?.find(Qr(r)),p=i?.map(((t,l)=>m(ti,{active:t===u,"aria-label":t.text,bgColor:e,...t},String(l))));return m(R,{tag:"header",className:`pt-6 px-20 ${e} ${t} ${l&&u?.items?.length?"pb-4":"pb-5"}`,...n,children:h("div",{className:"container",children:[h("div",{className:"flex items-center",children:[m(gr,{className:"mr-8",bgColor:e,logo:a}),p,m(yi,{className:"ml-auto",foreignOffices:c,defaultLocation:s,officesLink:d,bgColor:e})]}),m("div",{className:`mt-6 h-px ${_i[e]}`}),l&&u?.items?.length?m(Ri,{subItems:u.items,bgColor:e}):null]})})})),Mi=u((({className:e="",gap:t="XS",isPadding:l=!1,version:n="transparent",options:r,...i})=>m(R,{className:["grid grid-cols-12",l?"p-12":"",ne[t],re[n],e].filter(Boolean).join(" "),...i,children:w({...i,options:r})})));Mi.childrenTypes={exclude:["HorizontalLayout"]};const Ai=u((e=>{const{className:t,image:l,...n}=e;return m(R,{className:t,...n,children:m(Y,{image:l})})})),Di=u((({className:e="",cards:t=[],button:l})=>{const[r,a]=n(0),s=i((e=>a(e)),[]),o=t.length,[c,d]=tt({itemCount:o,visibleItemCount:2}),{canDec:u,canInc:p}=d,x=t[c]?.href;return h("section",{role:"listitem",className:`min-w-full text-center ${e}`,children:[h("div",{className:"relative overflow-hidden",children:[o?zi({activeIndex:c,cards:t,selectedCardIndex:r,onClick:s}):null,it({...d,btnClass:["left-12","right-12"],className:"top-[62px]"}),u?m("div",{className:"absolute top-0 left-0 h-full w-[136px] bg-opacity-from-white"}):null,p?m("div",{className:"absolute top-0 right-0 h-full w-[136px] bg-opacity-to-white"}):null]}),m(Le,{className:"w-60 text-center",version:"primary",...l,href:x})]})}));function zi({activeIndex:e,cards:t,selectedCardIndex:l,onClick:n}){const r=460*e,i=t.length>2?"justify-start":"justify-center";return m("div",{style:{transform:`translateX(-${r}px)`},className:"duration-1000 px-12",children:m("div",{className:`w-full flex flex-nowrap gap-3.5 pb-12 ${i}`,children:t.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n}){return h("button",{type:"button",onClick:n,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?m(Y,{className:"p-5 rounded-full bg-secondary-light mr-[30px]",image:e.icon,width:"108",height:"108"}):null,h("div",{className:"flex gap-3.5",children:[e?.sum?Oi("страховая сумма",e.sum):null,e?.fee?Oi("страховой взнос",e.fee):null]}),Pi(l)]},String(t))}({slide:e,i:t,isActive:Boolean(t===l),onClick:()=>n(t)})))})})}function Oi(e,t){return h("div",{className:"flex flex-col text-left whitespace-pre",children:[h("span",{className:"text-h6",children:[at(t)," ₽"]}),m("span",{className:"text-secondary-text text-l mt-1",children:e})]})}function Pi(e){return e?m(Y,{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 Ei=u((({className:e="",title:t,insuranceTabs:l=[],button:r,...a})=>{const[s,o]=n(0),c=i((e=>o(e)),[]);return h(R,{className:`box-border py-12 overflow-hidden relative font-sans w-100 bg-white ${e}`,...a,children:[t?m(V,{className:"text-center mb-8",title:t,headingType:"h3"}):null,l?.length>1?m("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:n}){return m("button",{type:"button",onClick:n,"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,m("div",{className:"flex",style:{transform:`translateX(-${s}00%)`},role:"list",children:Fi({insuranceTabs:l,button:r})})]})})),Fi=({insuranceTabs:e,button:t})=>{const l=e?.map((e=>e.cards));return l?.length?l.map(((e,l)=>m(Di,{button:t,cards:e},String(l)))):null};function Ui(e){return t=>t.reduce(((t,l,n)=>t.length?t.concat({...e,key:n},l):[l]),[])}const Hi={yellow:"bg-yellow",green:"bg-green","green-light":"bg-green-light","green-dark":"bg-green-dark"},Xi={XS:"h-[40px]",S:"h-[68px]",M:"h-[102px]",L:"h-[136px]",XL:"h-[204px]"},Gi=u((e=>{const{className:t="",items:l,isDotted:n,investmentZeroColumn:r,investmentColumns:i,...a}=e,s=i?[...i]:[];return r&&s.unshift(r),m(R,{className:`font-sans bg-white px-9 py-12 ${t}`,...a,children:h("div",{className:"container text-m-light",children:[s?.length?h("div",{children:[h("div",{className:"flex items-end relative pl-9 pr-5 text-white",children:[Ui(m("div",{className:"w-px h-4 bg-gray"}))(s.map(Wi)),m("div",{className:"absolute right-[30px] w-px h-4 bg-gray"})]}),m("div",{className:"border-t border-gray -mt-2 ml-9 mr-8"}),m("div",{className:"flex justify-between text-primary-text mt-3 -mx-10",children:s.map(Zi)})]}):null,l?.length?m(zl,{className:"mt-9 text-l-light max-w-[657px]",items:l,itemClassName:"mb-[7px]",isDotted:n}):null]})})})),Wi=(e,t,l)=>{const n=1===t,r=t===l.length-1;return m("div",{className:`${Ji(n,r,e.cells)}`,children:e.cells?.length?m("div",{className:"w-full "+(r?"border-4 border-green-more-dark p-1.5 min-w-[290px]":""),children:e.cells.reverse().map(Yi)}):null},`column_${t}`)},Ji=(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(" "),Yi=(e,t)=>{const l=e.cellSize||"XS",n=e.cellColor||"green";return e.text?m("div",{className:`flex-1 flex items-center justify-center relative py-2 ${Xi[l]} ${Hi[n]} ${"XS"===l?"px-3":"px-11"}`,children:m("div",{className:"text-center",children:e.text})},`cell_${t}`):null},Zi=(e,t,l)=>{const n=0===t,r=t===l.length-1;return m("div",{className:`flex-1 max-w-[180px] text-center px-2 ${n?"pl-9":""} ${r?"mr-3.5":" "}`,children:e.title},`title_${t}`)},Ki=u((({className:e,iconClassName:t,textClassName:l,suffixClassName:n,doc:r,icon:i})=>{const{text:a,fileSize:s,...o}=r;return h("a",{className:e,role:"link",...o,children:[i?m(Y,{className:t,image:ie(i),width:"24px",height:"24px",asSVG:!0}):null,a?h("span",{className:l,children:[a,m("span",{className:n,children:o?.href&&qi(Qi(o.href),s)})]}):null]})})),qi=(e,t)=>(e||t?",":"")+(e?` ${e}`:"")+(t?` (${t})`:""),Qi=e=>{if(!e)return"";const t=e.lastIndexOf(".");return-1!==t?e.substring(t+1):""},ea=u((({className:e="",doc:t,icon:l})=>m(Ki,{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:text-primary-main",doc:t,icon:l}))),ta=u((({className:e,documents:t,columnsMode:l="double",icon:n})=>t?.length?m("div",{className:e,role:"list",children:t.map(((e,t)=>m("div",{className:"double"===l?"basis-[calc(50%-20px)]":"",role:"listitem",children:m(ea,{className:"group flex align-middle h-fit w-fit text-primary-text no-underline hover:text-primary-main",doc:e,icon:n})},String(t))))}):null)),la={double:"flex gap-x-5 gap-y-[26px] flex-wrap",single:"flex gap-3.5 flex-col"},na=u((({className:e="",title:t,description:l,align:n="text-center",documents:r,icon:i={icon:"DocIcon"},columnsMode:a="double",...s})=>h(R,{className:`font-sans text-primary-text p-12 bg-white ${e}`,...s,children:[m(Ue,{className:"!p-0",title:t,description:l,align:n,headlineVersion:"M",as:"h2",...s}),m(ta,{className:`mt-8 ${la[a]}`,columnsMode:a,documents:r,icon:i})]}))),ra=u((e=>m(Xr,{...e,version:"mini"}))),ia=e=>{const t="col-span-",l=e.split(/\s+/).find((e=>e.startsWith(t)));return l?parseInt(l.substring(t.length),10):12};function aa(e=""){const t=ia(e);return t<=6?"min-h-[300px]":t<=8?"min-h-[320px]":"min-h-[360px]"}const sa=u((({className:e="",title:t="Мобильное приложение",qr:l,buttons:n,version:r="primary",items:i,image:a,headingType:s="h4",alignTitle:o="left",description:c,...d})=>{const u="primary"===r?"text-primary-text":"",p="secondary"===r?"p-3.5 min-w-[120px]":"min-w-[92px]",x=n?.map((e=>({...e,className:"min-w-[168px]"})));return h(R,{className:`flex justify-between font-sans p-12 box-border relative min-h-80\n ${aa(e)}\n ${ee[r]}\n ${e}`,...d,children:[h(kl,{className:"z-10",title:t?m(V,{headingType:s,as:"h3",title:t,className:`whitespace-pre-wrap mb-7 w-full\n ${u} ${C[o]}`}):null,buttons:n?.length?m(De,{buttons:x,className:"flex gap-4 mt-8",...d}):null,children:[ca(c),h("div",{className:"flex flex-1 items-center mb-3",children:[l?.src?m("div",{className:`flex justify-center mr-5 bg-white rounded-md ${p}`,children:m(Y,{className:"w-fit",image:l})}):null,oa(r,i)]})]}),a?.src?m("div",{className:"absolute right-0 bottom-0",children:m(Y,{image:a})}):null]})})),oa=(e,t)=>t?.length?m(zl,{items:t,itemClassName:"text-l-light mb-2 last:mb-0",version:e}):m("span",{className:"text-m-light text-secondary-text",children:"Наведите камеру телефона на QR-код и скачайте приложение"}),ca=e=>e?m("p",{className:"text-xl-light mb-5 pt-0.5",children:e}):null,da=[{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 ma(e,t,l){t.geoObjects.removeAll();const n=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),r=new e.Clusterer({clusterIcons:[{href:"icons/MapMarkerClusterIcon.svg",size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),i=l.map((t=>new e.Placemark(t,{},{iconLayout:"default#image",iconImageHref:"icons/MapMarkerSingleIcon.svg",iconImageSize:[78,84],iconImageOffset:[-35,-50]})));r.add(i),t.geoObjects.add(r),t.setBounds(e.util.bounds.fromPoints(l)).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const ha={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"},ua=e=>m("a",{className:`select-none cursor-pointer px-9 h-12 bg-primary-main text-white ${Object.values(ha).join(" ")}`,href:`https://yandex.ru/maps/?ll=${[e[1],e[0]]}&z=10&l=map`,target:"_blank",children:"Открыть на карте"}),pa={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)]"},xa=(e,t,l)=>h("div",{className:`${Object.values(pa).join(" ")} bg-white py-3 pl-11 pr-4 w-full`,children:[m(O,{name:"LoupeIcon",iconVersion:"black",width:"20",height:"20",asSVG:!0,className:"absolute left-4"}),m("input",{type:"text",placeholder:"Введите адрес или метро",onChange:t=>{const n=t.target?.value?t.target?.value.toLowerCase():"";if(n){const t=e.filter((e=>e.text.toLowerCase().indexOf(n)>-1?e:null));l(t)}else l(null)},className:"border-0 focus:border-0 outline-0 w-full"})]}),ga={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"},ba=(e,t,l)=>m("div",{className:`select-none cursor-pointer py-4 w-12 bg-white ${Object.values(ga).join(" ")} ${l}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.geoObjects.add(t.geoObjects)}))},children:m(O,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),fa=e=>globalThis[e];const va=()=>function(e,t){const[l,a]=n(),s=i((()=>a(fa(e))),[e]);return r((()=>{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),a(void 0)}}if(!fa(e))return l.addEventListener("load",s),()=>{l.removeEventListener("load",s)};s()}),[e,t]),l}("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${o.YANDEX_MAP_API_KEY||""}&lang=ru_RU`),Na={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"},ya=u((({yandexMaps:e,direction:t="in"})=>{const l="in"===t?"PlusIcon":"MinusIcon";return m("div",{onClick:()=>{const l=e.current.getZoom(),n="in"===t?l+1:l-1;e.current.setZoom(n,{checkZoomRange:!0})},className:`${Object.values(Na).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:m(O,{name:l,width:"20",height:"16"})})})),wa={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"},Ca=u((({points:e,className:t="",zoom:l=5,showSearchField:i=!1})=>{const a=s(null),o=va(),[c,d]=n(),[u,p]=n(Ia(da)),x=ka(e);if(r((()=>{a?.current||o?.ready((()=>{a.current=new o.Map("map",{center:x,zoom:l,controls:[],suppressMapOpenBlock:!0}),ma(o,a.current,u)}))}),[o,a,u]),r((()=>{if(a.current&&u&&o){const e=u.length<1?Ia(da):u;ma(o,a.current,e)}}),[a,u,o]),!o)return null;const g=c?"z-[100000]":"z-10";return h("div",{id:"map",className:`${c?"":"relative"} w-full ${t}`,children:[m("div",{className:`absolute flex left-2 top-4 w-[50%] ${g}`,children:i?xa(da,0,(e=>{if(e){const t=Ia(e);p(t)}})):ua(x)}),m("div",{className:`${Object.values(wa).join(" ")} ${g} right-2 top-4 bg-white`,onClick:()=>{const e=a.current.container;c?e.exitFullscreen():e.enterFullscreen(),d(e.isFullscreen())},children:m(O,{name:"FullScreenIcon",width:"16",height:"16"})}),h("div",{className:`absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md ${g}`,children:[m(ya,{yandexMaps:a}),m(ya,{yandexMaps:a,direction:"out"})]}),ba(a.current,o,`right-2 top-80 ${g}`)]})})),ka=e=>[Sa($a(e,0)),Sa($a(e,1))],$a=(e,t)=>e.map((e=>e[t])),Sa=e=>e.reduce(((e,t)=>e+t))/e.length,Ia=e=>e?e.map((e=>e.coords)):null,Ta=[{title:"Деловой центр",time:"1 мин",distance:"~30 м.",icon:"MetroIcon"},{title:"Выставочная",time:"5 мин",distance:"~120 м.",icon:"MetroIcon"},{title:"Деловой центр",time:"8 мин",distance:"~350 м.",icon:"MetroIcon"}],Ba=({lunchHour:e,status:t,workTime:l})=>{const n=/\d+/gi.test(e)?`Перерыв ${e}`:e;return t?h("div",{className:"flex",children:[m("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}),m("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-yellow border-golden",children:e?n:null})]}):m("div",{className:"flex",children:m("div",{className:"p-3 border rounded-md text-m flex items-center cursor-pointer text-error border-error",children:"Выходной"})})},Ra=({icon:e,title:t,distance:l,time:n},r)=>h("div",{className:"flex mr-4",children:[m(O,{name:e,width:"16",height:"16",asSVG:!0,className:"mr-1"}),t?h("span",{className:"text-m",children:[t," "]}):null,h("span",{className:"text-m-light",children:[l?` (${l})`:null,n?`, ${n}`:null]})]},`nearbyOffice${r}`),ja=({title:e,status:t,workTime:l,lunchHour:n,description:r},i)=>h("div",{className:"flex flex-col pb-3 border-b border-solid border-main-divider mb-3 last:border-0",children:[h("div",{className:"flex justify-between items-center w-full pb-1 text-l text-primary-text",children:[m("div",{children:e}),t?null:m("div",{className:"text-m-light text-error",children:"Выходной"}),t&&l?m("div",{children:l}):null]}),t&&n?Va(n):null,r?m("div",{className:"pb-1 text-s-light text-secondary-text",children:r}):null]},`day${i}`),Va=e=>/\d+/gi.test(e)?h("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-error",children:[m("div",{children:"Перерыв"}),m("div",{children:e})]}):m("div",{className:"flex justify-between items-center w-full pb-1 text-m-light text-primary-main",children:m("div",{children:e})}),_a={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 La(e){return e?St(e,{method:"GET"}):{}}const Ma=u((({className:e=""})=>{const t=function(e){const{data:t}=kt(e?`/api/v1/branches?regionCode=${e}`:void 0,La);return console.warn("Hook useOfficeMap RETURNs MOCK object for testing",t),_a}("000"),{name:l,address:n,gpsLatitude:r,gpsLongitude:i,workSchedule:a}=t,{workingMonday:s,workingTuesday:o,workingWednesday:c,workingThursday:d,workingFriday:u,workingSaturday:p,workingSunday:x}=a,{workTime:g,lunchHour:b,workTimeSaturday:f,lunchHourSaturday:v}=a,N=r&&i?[r,i]: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:u,workTime:g,lunchHour:b},{title:"Суббота",status:p,workTime:f,lunchHour:v},{title:"Воскресенье",status:x}],w=(new Date).getDay(),C=w>0?y[w-1]:y[6];return h("div",{className:`flex flex-col font-sans bg-white w-full ${e}`,children:[h("div",{className:"flex flex-col px-12 pt-12",children:[h("div",{className:"flex justify-between",children:[m("div",{className:"text-h2",children:l}),Ba(C)]}),h("div",{className:"flex text-l-light pt-4",children:[m(O,{name:"GeolocationIcon",width:"24",height:"24",asSVG:!0,className:"pr-1"}),n]}),m("div",{className:"flex pt-4",children:Ta.map(Ra)})]}),h("div",{className:"flex justify-between pt-8",children:[m("div",{className:"flex-grow h-full w-full overflow-hidden",children:N?m(Ca,{points:[N],className:"h-full"}):null}),m("div",{className:"w-[434px] min-w-[434px] pl-9 pr-12 pb-14 flex flex-col",children:y.map(ja)})]})]})})),Aa=u((({className:e="",title:t,servicesList:l,...n})=>h(R,{className:`font-sans bg-white p-8 flex flex-col ${e}`,...n,children:[t?m(V,{headingType:"h5",className:"mb-5",title:t}):null,l?.length?m("ul",{className:"list-none m-0 p-0",children:l.map(Da)}):null]}))),Da=(e,t)=>h("li",{className:"flex mb-5 last:mb-0 list-none",children:[e.icon?m(Y,{className:"mr-3 min-w-6 min-h-6 w-6 h-6",width:"24",height:"24",asSVG:!0,image:ie(e.icon)}):null,e.label?m("span",{className:"text-l-light",children:e.label}):null]},`list_item_${String(t)}`),za=u((({className:e="",...t})=>m(R,{className:`font-sans text-primary-text ${e}`,...t,children:w(t)})));za.childrenTypes=["OtherProductsItem"];const Oa=u((({className:e="",label:t,icon:l,dataTheme:n="",onClick:r})=>h("button",{className:["border border-transparent bg-primary-main font-sans text-white cursor-pointer","hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none","flex justify-center w-full px-0 py-5",e].join(" "),"data-theme":n,onClick:r,children:[m("span",{className:"text-h4 pr-3",children:t}),l?m(Y,{image:{icon:l,iconVersion:"white"},className:"flex-shrink-0 my-auto",width:"20",height:"20",asSVG:!0}):null]}))),Pa=({isUnfolded:e,onToggle:t})=>m(Oa,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),Ea=["ArrowDownIcon","ArrowUpIcon"],Fa=u((({className:e,label:t="",isUnfolded:l,...n})=>{const{colorPalette:r}=function(e,t){const{content:l}=function(e){return e?.parent||{}}(e);return l||t}(n.options,{});return m("div",{className:`border-0 border-b border-solid border-main-divider ${e}`,children:m(A,{unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m("div",{className:"box-border",children:m(D,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(n)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>m(Oa,{label:t,icon:Ea[Number(e)],dataTheme:r||n.options?.page?.colorPalette,onClick:l})})})}));Fa.childrenTypes=[];const Ua=u((e=>{const{className:t,text:l,size:n,color:r,align:i,font:a,...s}=e;return m(R,{className:t,...s,children:m(_,{size:n,color:r,align:i,font:a,children:l})})})),Ha={primary:"text-primary-text",secondary:"text-white"},Xa={primary:"text-secondary-text",secondary:"text-white"},Ga=u((e=>{const{className:t="",icon:l,label:n,description:r,version:i="primary",benefitsVersion:a="normal"}=e,s="white"===a?"secondary":"primary";return h("div",{className:`flex gap-5 ${r?"items-start":"items-center"} ${t}`,children:[l?m("div",{className:Wa(i,a),children:m(Y,{className:"w-6 h-6",image:ie(l,s),asSVG:!0})}):null,h("div",{className:"gap-0.5",children:[n?m("div",{className:`text-h6 ${Ha[i]}`,children:n}):null,r?m("div",{className:`text-m-light ${Xa[i]}`,children:r}):null]})]})}));function Wa(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 Ja=u((({className:e="",title:t,description:l,image:n,benefits:r,version:i="primary",sum:a,monthLimit:s,directionRight:o=!1,...c})=>h(R,{className:`relative font-sans py-12 px-24 ${ee[i]} ${e}`,...c,children:[m(Ue,{className:"!p-0",title:t,description:l,headlineVersion:"M",bgColorHeadline:i,...c}),h("div",{className:"flex justify-center gap-[122px] mt-[30px]",children:[n?.src?m(Y,{className:o?"order-2":"",image:n}):null,h("div",{className:"w-[558px] m-auto",children:[r?.length?m("div",{className:"flex flex-col gap-4",children:r.map(Ya(i))}):null,Za(Number(a),Number(s))]})]})]}))),Ya=e=>(t,l)=>m(Ga,{icon:t.icon,label:t.label,description:t.description,version:e},String(l));function Za(e,t){return e||t?h("div",{className:"bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4",children:[Number(e)>0?Ka("Страховая сумма:",e,Boolean(t)):null,Number(t)>0?Ka("Ежемесячный лимит:",t,Boolean(e)):null]}):null}function Ka(e,t=0,l=!1){return h("div",{className:`flex justify-between items-center gap-2 w-full whitespace-pre ${l?"w-fit":"w-full"}`,children:[m("span",{className:"text-secondary-text text-l-light",children:e}),h("span",{className:"text-primary-main text-h6",children:[at(t)," ₽"]})]})}function qa(e=""){const t=ia(e);return t<=4?"S":t<=8?"M":"L"}function Qa(e=""){const t=ia(e);return t<=6?"pr-9":t<=8?"pr-[4.75rem]":"pr-[9.4rem]"}const es=u((({className:e,title:t,description:l="Блок в разработке...",...n})=>h(R,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${Qa(e)} ${aa(e)} `,...n,children:[m(Ue,{className:"!p-0 max-w-[600px]",title:t,description:l,headlineVersion:qa(e),...n}),m("figure",{className:"m-0 min-w-[80%]",children:ts()})]}))),ts=(e=3)=>ns(100,e).map((e=>Math.floor(e))).map(ls),ls=(e,t)=>m("div",{style:{width:`${e||100}%`},className:"h-4 mt-2 bg-secondary-light"},String(t)),ns=(e,t)=>[e].concat(t>0?ns(e/1.618,t-1):[]),rs=u((({className:e="",children:t,...l})=>{const n=we(),{text:r,href:i,target:a,onClick:s}=n(l);return i?m("a",{className:`no-underline ${e}`,href:i,target:a,onClick:s,children:m("span",{className:e,children:r||t})}):m("span",{className:e,children:r||t})})),is=(e="primary",t="normal")=>({icon:l,label:n,description:r},i)=>m(Ga,{icon:l,label:n,description:r,version:e,benefitsVersion:t},String(i)),as=u((({className:e="",title:t,headlineVersion:l="L",description:n,benefitsCountOfRow:r=3,benefits:i,benefitsVersion:a,buttons:s,footnote:o,image:c,items:d,version:u="primary",isDotted:p=!0,textBlockClassName:x="",...g})=>{const b=i?.filter((e=>e.label))?.length,f=ss(r);return h("div",{className:`flex grow justify-between items-stretch h-full ${e}`,children:[h("div",{className:`flex flex-col ${x}`,children:[m(Ue,{title:t,description:n,className:"!p-0 max-w-[600px]",bgColorHeadline:u,headlineVersion:l,align:"text-left",...g}),h("div",{className:"flex flex-col justify-between h-full",children:[h(kl,{buttons:s?.length?m(De,{buttons:s,className:"flex gap-4",...g}):null,children:[b?m("div",{className:f,children:i.map(is(u,a))}):null,d?.length?m(zl,{className:"mt-5 text-h6",items:d,itemClassName:"mb-[7px]",version:u,isDotted:p}):null]}),o?m("p",{className:"text-m-light pt-12",children:o}):null]})]}),c?.src&&m(Y,{className:"mt-[-50px]",image:c})]})})),ss=(e=2)=>"gap-6 mt-6 "+(e>2?"inline-grid grid-cols-[auto_auto_auto]":"inline-grid grid-cols-[auto_auto]");function os(e,t,l){const{text:n,href:r,target:i,onClick:a}=e,s="primary"===t?"white":"black",o=e?.icon||{icon:"ArrowLeftIcon"};return h("div",{className:`flex items-center cursor-pointer ${l}`,onClick:a,children:[m(Le,{version:t,rounded:!0,className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center mr-3",ariaLabel:n,href:r,target:i,children:m(Y,{className:"w-4 h-4",image:{...o,iconVersion:o.iconVersion||s},asSVG:!0})}),n?m("span",{className:"text-m",children:n}):null]})}const cs={primary:"text-secondary-text",secondary:"text-white/80"},ds=u((e=>{const{className:t="",breadcrumbs:l,backwardButton:n,version:r="primary",...i}=e,a="primary"===r?r:"white";return h(R,{className:`font-sans overflow-hidden p-12 flex flex-col box-border min-h-[454px] ${ee[r]} ${t}`,...i,children:[n?.text?os(n,a,"mb-10 -mt-2.5"):null,l?.length?m("div",{className:"text-xs-light mb-6",children:Ui(m("span",{className:`mx-2 ${cs[r]}`,children:"/"}))(l.map(((e,t)=>m(rs,{className:cs[r],...e},String(t)))))}):null,m(as,{version:r,...i})]})})),ms={primary:{title:"text-secondary-text",text:"text-secondary-text"},secondary:{title:"text-white",text:"text-white/80"}},hs=u((({className:e="",slides:t=[],version:l="primary",...r})=>{const a=t.map((e=>e.nav)),s=t.map((e=>e.productBlock)),[o,c]=n(0),d=i((e=>c(e)),[]);return h(R,{className:`box-border pt-12 overflow-hidden relative font-sans w-100 mb-6 ${e}\n ${ee[l]}`,...r,children:[m("div",{className:"flex duration-1000 pb-14",style:{transform:`translateX(-${o}00%)`},role:"list",children:s.map(((e,t)=>function(e,t){const{version:l}=e,n=l?ms[l].title:"";return m("section",{className:"box-border relative flex grow-0 shrink-0 basis-full",role:"listitem",children:m("div",{className:"flex grow",children:m(as,{className:`pl-12 z-10 ${n}`,textBlockClassName:"mb-[154px]",headlineVersion:"XXL",...e})})},String(t))}({...e,...r,version:l},t)))}),m("div",{className:"flex items-center absolute bottom-6 left-0 right-0 px-[26px] box-border h-28",children:a.map(((e,t)=>function({slide:e,i:t,isActive:l,onClick:n,version:r}){const i=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\n ${ee[r]}`,a=l?"text-primary-text !text-h6 p-2":`text-l pb-1 ${ms[r].title}`,s=l?"text-secondary-text text-l-light":`text-m-light ${ms[r].text}`;return m("button",{type:"button",onClick:n,"aria-label":e?.title,className:`box-border relative overflow-hidden border border-white/50 cursor-pointer text-left mx-1 grow basis-0\n ${i} ${Cl[r]}\n `,children:h("div",{className:"border-0 px-6",children:[m("div",{className:`last:pb-0 ${a}`,children:e?.title}),m("div",{className:`text-secondary-text ${s}`,children:e?.description})]})},String(t))}({slide:e,i:t,isActive:Boolean(t===o),onClick:()=>d(t),version:l})))})]})}));const us={primary:"text-secondary-text",secondary:"text-white"};function ps(e,t,l="primary"){if(!e)return null;return m("div",{className:`mt-2.5 z-10 ${t?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:m(_,{size:"text-m",font:"font-light",color:us[l],children:e})})}const xs=u((e=>{const{__html:t=""}=e;return m("div",{className:"md-container",dangerouslySetInnerHTML:{__html:t}})}));function gs(e){throw new Error(e)}const bs={primary:"text-secondary-text",secondary:"text-white"},fs=(e="primary")=>(t,l)=>{const{type:n}=t;if("default"!==n&&"rte"!==n)return null;switch(n){case"default":return[m(Z,{size:"text-h6",children:t.label},`label-${l}`),m(Z,{size:"text-m-light",color:bs[e],children:t.description},`desc-${l}`)];case"rte":return m(xs,{__html:t.__html});default:gs(t)}};function vs(e,t){return e?.src?m(Y,{className:`absolute ${t?"right-0":"left-0"} bottom-0`,image:e}):null}const Ns=u((({className:e="",title:t,headlineVersion:l="S",description:n,additionalDescription:r,benefits:i=[],buttons:a,image:s,isImageOnRightSide:o=!0,version:c="primary",...d})=>h(R,{className:`overflow-hidden font-sans p-9 box-border relative min-h-[364px]\n ${ee[c]} ${Qa(e)} ${e}`,...d,children:[h("div",{className:"flex flex-col "+(o?"":"items-end"),children:[m(Ue,{className:"!p-0 !bg-transparent z-10 "+(t||n?"mb-3.5":""),as:"h2",title:t,description:n,headlineVersion:l,bgColorHeadline:c,align:"text-left",...d}),ys(i,c,s),ps(r,s),a?.length?m(De,{buttons:a,className:"mt-5 gap-4 z-10 text-l"}):null]}),vs(s,o)]})));function ys(e,t,l){if(!e.length)return null;return m("div",{className:`z-10 grid grid-cols-[max-content_1fr] auto-rows-auto gap-x-6 gap-y-2.5 items-baseline\n ${l?.src?"max-w-[calc(100%-186px)]":"100%"}`,children:e.length?e.map(fs(t)):null})}const ws=u((({className:e="",title:t="Акции и спецпредложения",date:l,description:n,buttons:r=[],version:i="primary",...a})=>m(R,{className:`bg-white text-primary-text font-sans p-9 box-border ${e} ${ee[i]} ${Qa(e)} ${aa(e)} `,...a,children:m(kl,{title:t?m(Ue,{title:t,className:"!p-0 max-w-[600px]",headlineVersion:qa(e),bgColorHeadline:i,align:"text-left",as:"h2",...a}):null,buttons:r?.length?m(De,{buttons:r,className:"flex gap-3"}):null,children:h("div",{className:"mt-1.5",children:[l?m("div",{className:"text-s mb-2",children:Cs(l)}):null,m("div",{className:"text-l",children:n})]})})})));function Cs(e){return new Date(e).toLocaleString("ru-RU",{day:"numeric",month:"long",year:"numeric"}).replace("г.","")}const ks=u((({className:e="",title:t,description:l,items:n,image:r,version:i,socialMedia:a,button:s})=>{const o=t?m(V,{headingType:"h5",as:"h3",className:"mb-3.5 z-10",title:t}):null,c=r?.src?m(Y,{className:"absolute bottom-0 right-0 m-0",image:r}):null;return m("section",{className:`relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${e}`,role:"listitem",children:m(kl,{className:"flex justify-between",title:o,image:c,children:h("div",{className:"h-full flex flex-col justify-between",children:[l?m("span",{className:"mb-2",children:l}):null,n?.length?m(zl,{className:"text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]",items:n,version:i}):null,a?m(ql,{className:"pt-10 pb-0",media:a,version:i}):null,s?.text?m("div",{className:"pt-2",children:ze({button:s,buttonClassName:"mt-16 px-5"})}):null]})})})})),$s="absolute top-0 bottom-0 w-[84px]",Ss=u((({recommendations:e=[],className:t="",title:l,version:n="primary",...r})=>{const[i,a]=tt({itemCount:e.length,visibleItemCount:2});return h(R,{className:`relative font-sans p-9 overflow-hidden text-center ${ee[n]} ${t}`,...r,children:[l?m(V,{headingType:"h3",className:"mb-6",title:l}):null,h("div",{children:[m("div",{className:"flex duration-1000 gap-3.5",style:{transform:`translateX(-${525*i}px)`},role:"list",children:e.length?e.map(((e,t)=>m(ks,{version:n,className:Cl[n],...e},String(t)))):null}),it({...a,btnClass:["left-8","right-8"],className:"top-1/2 mt-3"})]}),m("div",{className:`${$s} left-0 ${"secondary"===n?"bg-opacity-from-main":"bg-opacity-from-white"}`}),m("div",{className:`${$s} right-0 ${"secondary"===n?"bg-opacity-to-main":"bg-opacity-to-white"}`})]})})),Is=u((e=>{const{__html:t,...l}=e;return m(R,{...l,children:m(xs,{__html:t})})})),Ts=u((({className:e="",label:t="Развернуть",isExpanded:l,isFoldButtonOnTop:n=!0,version:r="primary",...i})=>m("div",{className:`border-b border-solid border-main-divider w-full ${e}`,children:m(A,{isFoldButtonOnTop:n,unfoldedByDefault:l,renderFoldableSection:({isUnfolded:e})=>m("div",{className:"box-border",children:m(D,{className:"grid grid-cols-12 gap-1 border-box",isUnfolded:e,children:w(i)})}),renderFoldButton:({isUnfolded:e,onToggle:l})=>Bs({isUnfolded:e,onToggle:l,label:t,version:r})})})));Ts.childrenTypes={exclude:["RollupItem","Accordion","AccordionItem","OtherProducts","OtherProductsItem","VerticalLayout"]};const Bs=({isUnfolded:e,onToggle:t,label:l,version:n})=>{const r=l?[l,l]:["Развернуть","Скрыть"];return"primary"===n?m(Rs,{icon:["PlusIcon","MinusIcon"][Number(e)],label:r[Number(e)],onClick:t}):m(Oa,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:r[Number(e)],onClick:t})},Rs=u((({label:e,icon:t,onClick:l})=>h("button",{className:"border-none bg-transparent px-9 pt-5 pb-3.5 flex justify-between text-left w-full font-sans text-h6 group cursor-pointer",onClick:l,children:[m("span",{className:"text-xl font-medium pr-2.5",children:e}),t?m(Y,{image:ie({icon:t}),width:"24",height:"24",asSVG:!0}):null]}))),js=[];const Vs=async e=>await St(e,{method:"GET"})||js,_s=u((({data:e,fieldLabel:t,fieldValue:l,selected:n,placeholder:r="",setSelected:i,label:a})=>{const s=e.filter(Boolean).map((e=>({key:e?.[l||t],text:e?.[t]}))),o=s.find((e=>e.key===n));return m(Yn,{options:s,label:a,placeholder:r||n,onChange:e=>i(e.key),value:o})})),Ls=u((({regions:e=[],selectedRegion:t,onSelectedRegion:l,branches:n=[],selectedBranch:r,onSelectedBranch:i})=>h("div",{className:"flex justify-between gap-4 mb-6",children:[m("div",{className:"max-w-[396px] w-1/2",children:m(_s,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:l,label:"Регион"})}),m("div",{className:"max-w-[396px] w-1/2",children:m(_s,{data:n,fieldValue:"branchCode",fieldLabel:"address",selected:r,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ms=u((({name:e,text:t,value:l,checked:n,onChange:r,className:i})=>m("div",{className:i,children:h("label",{className:"font-sans flex items-center relative cursor-pointer",children:[m("input",{className:"appearance-none flex justify-center items-center shrink-0 w-5 h-5 border border-gray hover:border-primary-hover\n checked:border-2 checked:!border-primary-main focus:checked:border-primary-main focus:border-primary-text active:border-primary-text\n after:block after:w-2.5 after:h-2.5 after:rounded-full checked:after:bg-primary-main outline-none rounded-full cursor-pointer",type:"radio",value:l,name:e,checked:n,onChange:e=>r(e.target.value)}),t?m("span",{className:"text-primary-text ml-3 cursor-pointer",children:t}):null]})}))),As=u((()=>{const[e,t]=n("option2"),l=i((e=>t(e)),[]);return h("div",{children:[m(Ms,{className:"mb-2",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===e,onChange:l}),m(Ms,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===e,onChange:l})]})})),Ds=["От 1 дня","До 365 дней"],zs=u((({days:e,setDays:t})=>h("div",{className:"mb-6",children:[m("span",{className:"block text-m-light mb-[3px]",children:"Срок аренды"}),m(vt,{min:1,max:365,value:e,items:Ds,onChange:t})]}))),Os=u((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:l,safeBoxCases:n=[],selectedBoxSize:r,onSelectedBoxSize:i})=>h("div",{className:"flex justify-between mb-6",children:[m("div",{className:"mr-4 w-full",children:m(_s,{data:e,fieldLabel:"volume",selected:t,setSelected:l,label:"Размер",placeholder:"Выберите размер"})}),m("div",{className:"w-full",children:m(_s,{data:n,fieldLabel:"safeBoxCasesSize",selected:r,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Ps=u((({regions:e,selectedRegion:t,branches:l,selectedBranch:n,days:r,selectedCaseVolume:i,selectedBoxSize:a,safeBoxCases:s,caseVolumes:o,onChange:c,onClick:d})=>h("div",{className:"flex-1 mr-9",children:[m(Ls,{regions:e,selectedRegion:t,onSelectedRegion:e=>c({selectedRegion:e}),branches:l,selectedBranch:n,onSelectedBranch:Es(c)}),m(zs,{days:r,setDays:e=>c({days:e})}),m(Os,{caseVolumes:o,selectedCaseVolume:i,onSelectedCaseVolume:Fs(c),safeBoxCases:s,selectedBoxSize:a,onSelectedBoxSize:e=>c({selectedBoxSize:e})}),m("span",{className:"text-secondary-text text-l-light",children:"Тип договора"}),h("div",{className:"flex justify-between items-center mt-5",children:[m(As,{}),m(Le,{text:"Офисы на карте",version:"primary",onClick:d})]})]}))),Es=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Fs=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Us=u((({days:e,tariffs:t=[]})=>{const l=Xs(e,t);return h("div",{className:"flex flex-col justify-between",children:[h("div",{className:"flex",children:[Hs("Аренда за",e,"mr-11"),Hs("Цена",l+" ₽")]}),h("div",{className:"bg-primary-main px-10 pt-10 pb-4 text-center",children:[m(Y,{image:{icon:"PackA4Icon"},width:"290",height:"257",asSVG:!0}),h("span",{className:"text-s-light text-white opacity-80 mt-2 inline-block",children:["На рисунки изображена пачка",m("br",{})," листов формата А4"]})]})]})})),Hs=(e,t,l="")=>h("div",{className:l,children:[m("div",{className:"text-m-light text-secondary-text mb-1",children:e}),m("span",{className:"text-h3 text-primary-text",children:t})]}),Xs=(e,t)=>{const l=Gs(e);return e*(t?.find((e=>e.tariffType===String(l)))?.tariffValue||0)},Gs=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},Ws=(e,t)=>e.find((e=>e.branchCode===t)),Js=u((e=>{const{regions:t,data:l,branches:n,onChange:i,onClick:a}=e;r((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[l.selectedRegion,i]);const s=Ws(n,l.selectedBranch),o=Ys(s?.safeBoxCaseVolumes),c=Zs(s?.safeBoxCaseVolumes,l.selectedCaseVolume)?.safeBoxCases,d=Ks(c,l.selectedBoxSize);return h("div",{className:"flex justify-between align-top mb-6",children:[m(Ps,{...l,regions:t,onClick:a,branches:n,caseVolumes:o,safeBoxCases:c,onChange:i}),m(Us,{days:l.days,tariffs:d})]})})),Ys=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Zs=(e,t)=>e?.find((e=>e.volume===t)),Ks=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs;const qs=u((({title:e,footnote:t,className:l="",...r})=>{const[a,s]=n(!1),o=i((()=>s((e=>!e))),[]),[c,d]=n({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),u=function(){const{data:e}=kt("/api/v1/regions",It);return e||[]}(),p=Qs(c.selectedRegion,u),x=function(e){const{data:t}=kt(e?`/api/v1/safeboxes?regionCode=${e}`:null,Vs);return t||js}(p),g=i((e=>d((t=>({...t,...e})))),[d]),b=(f=Ws(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 h(R,{className:l,...r,children:[h("div",{className:"font-sans bg-white px-8 py-12",children:[e?m(V,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-2.5 text-center"}):null,m(Js,{regions:u,branches:x,data:{...c,selectedRegion:p},onClick:o,onChange:g}),t?m("p",{className:"text-s-light text-secondary-text",children:t}):null]}),b.length&&a?m(Ca,{points:b,className:"h-[640px]"}):null]})})),Qs=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,eo=e=>Boolean(e?.icon||e?.src),to=({items:e,isDotted:t=!0,version:l="primary",className:n=""})=>e?m(zl,{className:n,version:l,items:e,listItemSize:"M",isDotted:t}):null,lo=({styleMap:e,isMainButton:t,version:l})=>(n,r,{length:i})=>{const{label:a,description:s,button:o,items:c,isDotted:d}=n,u=a&&(s||c)?"mt-2":"";return h("div",{className:`relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${ao(i)}`,children:[h("div",{className:(o?.text?"mb-8":"")+" text-center",children:[no(a),h("div",{className:`${u} flex flex-col items-center`,children:[ro({description:s,className:e.description}),to({items:c,isDotted:d,version:l,className:io({className:"text-left",description:s,styleMap:e})})]})]}),o?.text&&!t?m(Le,{className:"box-border py-3 h-12 w-full max-w-[240px] mt-auto",version:l,...o,children:o?.text}):null]},String(r))},no=e=>e?m("div",{className:"text-h6",children:e}):null,ro=({description:e,className:t=""})=>e?m("div",{className:t,children:e}):null,io=({className:e,description:t,styleMap:l})=>[t?l.description:"text-h6",t?"mt-0.5":"",e].join(" "),ao=e=>e<5?"w-[276px]":"w-[210px]",so={primary:{background:"bg-white",title:"text-primary-text",description:"!text-secondary-text text-l-light",iconText:"text-secondary-text",iconBackground:"bg-main-divider",iconConnector:"bg-secondary-light",dot:"bg-secondary-text"},secondary:{background:"bg-primary-main",title:"text-white",description:"!text-white/80 text-l-light",iconText:"text-white",iconBackground:"bg-white/30",iconConnector:"bg-white",dot:"bg-white/80"}},oo=u((({className:e="",showLines:t=!0,steps:l=[],button:n,version:r="primary",...i})=>{const{title:a}=i,s=so[r],o=l.length>3,c=(e=>e?"":"opacity-0")(t),d=a?"mt-9":"",u=(e=>e<5?"px-[88px]":"px-[55px]")(l.length);return h(R,{className:["box-border py-12 font-sans",o?"px-20":"px-[70px]","flex flex-col items-center overflow-hidden",s.background,s.title,e].join(" "),...i,children:[a?m(V,{headingType:"h3",className:"max-w-[752px] text-center",title:a}):null,l?.length?h("div",{className:`box-border ${d}`,children:[m("div",{className:`flex items-center ${u}`,children:Ui(m("div",{className:`h-0.5 w-full bg-secondary-light ${c}`}))(l.map(co(s,r)))}),m("div",{className:"flex justify-between mt-4 "+(o?"gap-x-3":"gap-x-[101px]"),children:l.map(lo({styleMap:s,isMainButton:Boolean(n?.text),version:r}))})]}):null,n?.text?m(Le,{className:"mt-8 min-w-60",version:"primary",...n}):null]})})),co=(e,t)=>({icon:l},n)=>m("div",{className:"flex flex-col items-center text-center",children:m("div",{className:`h-[100px] w-[100px] min-w-[100px] min-h-[100px] rounded-full p-[26px] box-border z-10 flex justify-center items-center\n ${e.iconBackground} ${e.title}`,children:eo(l)?m(Y,{image:ie(l||{},t),width:"48",height:"48",asSVG:!0}):m("span",{className:`text-h4 ${e.iconText}`,children:n+1})})},String(n)),mo="h-12 flex-1 flex items-center justify-center cursor-pointer",ho="bg-primary-main",uo="group bg-white",po="font-sans text-m",xo="text-white",go="text-secondary-text group-hover:text-primary-main",bo=u((e=>{const{tab:t,currentTab:l}=e,n="link"===l?.type&&l.href===t.href,r=we()(t);return m("a",{role:"tab",className:`${mo} ${n?ho:uo}`,target:t.target,href:r.href,onClick:r.onClick,children:m("span",{className:`${po} ${n?xo:go}`,children:t.text})})})),fo=(e,t)=>m("h3",{className:`${po} ${t?xo:go}`,children:e}),vo=(e,t)=>m("div",{className:"min-w-[22px] h-[22px] rounded-full text-xs ml-2 flex justify-center items-center "+(t?"bg-white/30 text-white":"bg-main-divider text-secondary-text group-hover:text-primary-main"),children:e}),No=({page:e,currentTab:t,showCounter:l,onClick:n})=>(r,i)=>{const a=r.type;if("group"!==a&&"link"!==a)return null;switch(a){case"group":return(({page:e,currentTab:t,showCounter:l,onClick:n})=>(r,i)=>{const a=t===r,s=r.ref&&e?.blocks?e.blocks.filter((e=>e?.labels?.includes(r.ref))).length:0;return m("div",{className:`${mo} ${a?ho:uo}`,role:"tab","aria-selected":a,onClick:()=>n(r),children:h("div",{className:"flex flex-1 items-center justify-center",children:[r?.title?fo(r.title,a):null,l&&s?vo(s,a):null]})},String(i))})({page:e,currentTab:t,showCounter:l,onClick:n})(r,i);case"link":return m(bo,{tab:r,currentTab:t},String(i));default:gs(a)}},yo=u((e=>{const{className:t="",tabs:l,showCounter:a,isSticky:s,...o}=e,[c,d]=n(l?l[0]:void 0);r((()=>k.inst.subscribe("tab",(e=>{const t=l?.find(wo(e));"link"===e.type&&t&&d(t)}))),[l]),r((()=>"group"===c?.type?k.inst.subject("tab",{label:c.ref}):void 0),[c]);const h=i((e=>{"group"===e?.type&&k.inst.fire("tab",{type:e.type,label:e.ref}),d(e)}),[]);return m(R,{className:`${s?"sticky top-1 z-20 ":""}box-border flex gap-x-1 ${t}`,role:"tablist",...o,children:l?.map(No({onClick:h,currentTab:c,showCounter:a,...o}))})})),wo=e=>t=>"link"===t.type&&t.href===`#${e.label}`,Co=u((({isOpen:e,onClick:t})=>h(Le,{version:"primary",onClick:t,className:"w-full flex items-center justify-center rounded-none py-5",children:[m("div",{className:"text-h4",children:e?"Скрыть":"Показать ставки по вкладу"}),m(O,{name:e?"ArrowUpIcon":"ArrowDownIcon",className:"ml-3",iconVersion:"white",width:"20",height:"20",asSVG:!0})]}))),ko={Buttons:({buttons:e})=>e&&e?.length?m("div",{children:e.map((({rounded:e,...t},l)=>ze({button:{rounded:e,...t},buttonClassName:(l>0&&e?"ml-3":"")+" w-12 h-12"})))}):null,Img:({image:e})=>e?.src?m(Y,{image:e}):null,List:({isDotted:e,...t})=>m(zl,{className:"flex flex-col justify-between items-start text-h6",version:"primary",isDotted:e??!0,...t}),LabelDescription:({label:e,description:t})=>h("div",{children:[e?m("div",{className:"text-h6 m-0 "+(t?"mb-1":""),children:e}):null,t?m("div",{className:"text-secondary-text text-l-light",children:t}):null]}),Table:u((({isVisible:e,displayTable:t,dataUrl:l,pdfUrl:n,isOpen:r})=>e?m(Co,{isOpen:r,onClick:()=>{t({dataUrl:l,pdfUrl:n})}}):null))},$o=({rowIdx:e,cellIdx:t,setTableInner:l,tableInner:i,openTableInnerIdx:a,setOpenTableInnerIdx:s})=>(o,c)=>{const[d,u]=n(!0);r((()=>{t===a&&i||u(!0)}),[i,a]);return h("div",{className:"Table"===o?.tableCellType?"ml-10":"first:pt-5 last:pb-5 pl-10",children:[c>0?m("div",{className:"h-5"}):null,So({cell:o,cellProps:{rowIdx:e,cellIdx:t,fieldIdx:c,displayTable:e=>{u(!1),s(t),l(e)},isVisible:d}})]},String(c))},So=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:l,...n}=e;if(!l||!(l in ko))return null;return m(ko[l],{...t,...n})},Io=u((({cells:e,rowIdx:t,cellIdx:l,setTableInner:n,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:a})=>m("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($o({rowIdx:t,cellIdx:l,setTableInner:n,tableInner:r,openTableInnerIdx:i,setOpenTableInnerIdx:a})):null}))),To=u((({rows:e})=>{const t=e?.[0]?.length??0,[l,n]=tt({itemCount:t,visibleItemCount:5});return h("div",{children:[e?.map(Bo(l)),it({...n,btnClass:["left-3 top-20","right-3 top-20"],className:""})]})})),Bo=e=>(t,l)=>{if(!t?.length)return null;const[n,...r]=t,i=[...Array(e).keys()].reduce(((e,t)=>140*(r?.[t]?.cols?.length??1)+e),0),a=["flex duration-1000 text-center",0!==l?"font-normal":"font-light"].join(" ");return h("div",{className:"flex border-main-divider border border-t-0 border-x-0 border-solid",children:[n?.data?m("div",{className:"text-xl-light w-[214px] pb-5 "+(0===l?"pt-8":"pt-6"),children:n.data}):null,m("div",{className:"flex flex-grow overflow-hidden",children:m("div",{className:a,style:{transform:`translateX(-${i}px)`},children:r?.map(((t,l)=>h("div",{className:"flex flex-col flex-grow justify-center pt-6 pb-5 odd:bg-main-divider",children:[t?.data?m("div",{className:"text-xl-light mb-3",children:t.data}):null,t?.cols?Ro(t.cols,e):null]},`row${l}`)))})})]},String(l))},Ro=(e,t)=>e?.length>0?m("div",{className:`flex ${t} ${0===t?"text-secondary-text":""} last:mr-3`,children:e.map(((e,t)=>m("div",{className:"w-[76px] text-h6 mr-5 first:ml-8",children:e},String(t))))}):null,jo=u((({activeTabIndex:e,items:t})=>{const[l,r]=n({}),a=i((e=>r((t=>({...t,[e]:!t[e]})))),[]);return m("div",{children:t.map(((t,n)=>{const r=`activeTabIdx:${e}-tableIdx:${n}`;return h("div",{className:"w-full",children:[h("div",{className:"flex p-4 bg-gray text-xl-light text-center justify-center cursor-pointer relative",onClick:()=>a(r),children:[t.title,m(Y,{image:{icon:l[r]?"PlusIcon":"MinusIcon"},className:"absolute right-[22px]",width:"24",height:"24"})]}),m("div",{className:"w-full pl-2 overflow-hidden transition-height duration-500 ease-in-out "+(l[r]?"h-0":""),children:m("div",{className:"relative",children:m(To,{rows:t.rowsData})})})]},r)}))})})),Vo=u((({currencies:e,linkToPDF:t,activeTabIndex:l,setActiveTabIndex:n})=>h("div",{className:"flex justify-between w-full pt-2.5 pb-3",children:[e&&e.length>1?m("div",{className:"flex bg-secondary-light p-1.5 rounded-md",children:e.map(((e,t)=>m("div",{className:"rounded-md text-xl-light px-4 py-3 cursor-pointer "+(t===l?"bg-primary-main text-white":"text-secondary-text"),onClick:()=>n(t),children:e||t+1},e)))}):null,t?m(Le,{href:t,version:"secondary",target:"_blank",appendLeft:m(O,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-0.5",width:"20",height:"20",asSVG:!0}),text:"Скачать в PDF"}):null]})));async function _o(e){const t=await fetch(e);return await t.json()}const Lo=u((({dataUrl:e,pdfUrl:t,onClick:l})=>{const{tableData:r}=function(e){const{data:t}=kt(function(e){return`/wcms-resources/${e||"tariffs-inner-table-data"}.json`}(e),_o);return t||{}}(e),[a,s]=n(0),o=i((e=>s(e)),[]),c=r?.[a]?.items??[],d=r?.map((e=>e.currency??""));return h("div",r?{className:"bg-white z-10",children:[m(Vo,{currencies:d,activeTabIndex:a,setActiveTabIndex:o,linkToPDF:t}),m(jo,{activeTabIndex:a,items:c}),m(Co,{onClick:l,isOpen:!0})]}:{className:"my-5 text-h6 text-center",children:[m("p",{children:"Данных нет"}),m(Co,{onClick:l,isOpen:!0})]})})),Mo=u((({children:e,tableInner:t,onHideContentClick:l})=>h("div",{className:"self-start flex flex-col",role:"row",children:[m("div",{className:"flex",children:e}),t?m("div",{className:"origin-top animate-expansion",children:m(Lo,{...t,onClick:l})}):null]}))),Ao=u((({row:{header:e,data:t},activeIndex:l,rowIdx:r,...a})=>{const[s,o]=n(void 0),c=i((e=>o(e)),[]),[d,u]=n(void 0),p=i((e=>u(e)),[]);return h(Mo,{onHideContentClick:()=>o(void 0),tableInner:s,...a,children:[m("div",{className:"text-s py-5 w-[354px] flex-shrink-0 border-main-divider border border-t-0 border-x-0",children:h("div",{className:"flex items-center text-primary-text",role:"cell",children:[e?.icon?m(Y,{className:"mr-3.5 max-w-6 max-h-6",image:ie(e.icon),width:"24px",height:"24px",asSVG:!0}):null,e?.title?m("div",{className:"text-m-light",children:e?.title}):null]})}),t?.length?m(fn,{activeIndex:l,columnWidth:360,version:"tariff",children:t.map(((e,t)=>m(Io,{cells:e,rowIdx:r,cellIdx:t,setTableInner:c,tableInner:s,openTableInnerIdx:d,setOpenTableInnerIdx:p,...a},String(t))))}):null]})})),Do=u((({className:e="",title:t,description:l,rowHeaders:n,tariffsColumns:r,hiddenRowsNum:i=0,...a})=>{const s=r?.map((({data:e})=>e))||[],o=n?.map(((e,t)=>({header:e,data:s.map((e=>e?.[t]||[]))}))),c=s.length,[d,u]=tt({itemCount:c,visibleItemCount:2}),p=(o||[]).map(((e,t)=>m(Ao,{row:e,activeIndex:d,rowIdx:t,...a},String(t)))),[x,g]=i>0?[p.slice(0,-i),p.slice(-i)]:[p,[]];return h(R,{className:`bg-white font-sans p-12 overflow-hidden text-primary-text relative ${c>1?"pr-0":""} ${e}`,...a,children:[zo({title:t,description:l}),Oo(l),i>0?m(A,{renderFoldableSection:({isUnfolded:e})=>h(Po,{controls:u,children:[x,m(D,{isUnfolded:e,children:g})]}),renderFoldButton:Pa}):m(Po,{controls:u,children:p})]})}));function zo({title:e,description:t}){return e?m(V,{headingType:"h3",className:"text-center "+(t?"mb-2.5":"mb-8"),title:e}):null}function Oo(e){return e?m("div",{className:"mb-9 text-center text-l",children:e}):null}const Po=u((({children:e,controls:t})=>{const{isScrollAvailable:l}=t;return h("div",{role:"table",children:[h("div",{className:"relative",children:[e,it({...t,btnClass:["top-[108px]","top-[44px]"],className:"right-7"})]}),l?m("div",{className:"absolute top-0 right-0 bottom-0 w-[84px] bg-opacity-to-white"}):null]})})),Eo={primary:"bg-white",secondary:"bg-primary-main","secondary-light":"bg-primary-main/10"},Fo=u((({className:e="",title:t,description:l,blockVersion:n="primary",iconVersion:r,image:i,...a})=>{const s="secondary"===n;return h(R,{className:`px-9 py-4 flex gap-3 ${Eo[n]} ${e}`,...a,children:["small"===r?m("div",{className:"mt-1",children:Uo(s)}):null,"big"===r?Ho(i):null,h("div",{children:[t?Xo(t,s):null,l?m("div",{className:"mt-1",children:Go(l,s)}):null]})]})})),Uo=e=>m("div",{className:"rounded-full h-4 w-4 text-center text-xs-light "+(e?"bg-white text-primary-main":"bg-primary-main text-white"),children:"i"}),Ho=e=>e?.src?m(Y,{image:e}):null,Xo=(e,t)=>m(Z,{size:"text-l",font:"font-medium",color:t?"text-white":"text-primary-text",children:e}),Go=(e,t)=>m(_,{size:"text-s",color:t?"text-white":"text-secondary-text",children:e}),Wo=u((e=>{const{tags:t,className:l=""}=e;return t?.length?m("div",{className:`flex flex-wrap gap-2 ${l}`,children:t.map(Jo)}):null})),Jo=(e,t)=>m("span",{className:"text-m-light py-2 px-2.5 border-solid border rounded-md border-gray",children:e},String(t)),Yo=u((e=>{const{title:t,headingType:l="h3",description:n,items:r,buttons:i,image:a,isDotted:s=!0,listItemSize:o="M",className:c="",version:d="primary",tags:u,children:p,...x}=e,g="primary"===d?"text-primary-text":"";return m(R,{className:`overflow-hidden font-sans p-9 pr-3 box-border ${c} ${ee[d]} ${Qa(c)} ${aa(c)} `,...x,children:h(kl,{title:t?m(V,{headingType:l,as:"h2",title:t,className:`whitespace-pre-wrap max-w-[600px] ${g}`}):null,buttons:i?.length?m(De,{buttons:i.map((e=>({...e,className:"min-w-[158px]"}))),className:"flex mt-8 gap-3",...x}):null,image:a?.src?m(Y,{className:"mt-auto ml-7",image:a}):null,children:[n?m("div",{className:"max-w-[600px] mt-2.5",children:m(_,{size:"text-xl-light",children:n})}):null,p,Zo({version:d,isDotted:s,listItemSize:o},r),u?.length?m(Wo,{tags:u,className:"mt-5"}):null]})})}));function Zo({version:e,isDotted:t,listItemSize:l},n){return n?.length?m(zl,{items:n,isDotted:t,className:"mt-2.5",listItemSize:l,itemClassName:"mb-1.5",version:e}):null}const Ko={left:"items-start",center:"items-center",right:"items-end"},qo=u((({className:e="",gap:t="",align:l,isPadding:n=!1,isInnerPadding:r=!0,version:i="transparent",options:a,...s})=>{const o=r?"":"!p-0";return m(R,{className:["flex flex-col [&>*]:max-w-full",n?"p-12":"",ne[t],l&&Ko[l],re[i],e].filter(Boolean).join(" "),...s,children:w({...s,options:{...a,className:o}})})}));qo.childrenTypes={exclude:["VerticalLayout"]};const Qo=e=>ia(e)<10?"py-6 px-11":"py-12 px-32",ec=u((e=>{const{title:t,src:l,previewImg:n,className:r="",...i}=e;return h(R,{className:`bg-white ${Qo(r)} ${r}`,...i,children:[m(Ue,{title:t,headlineVersion:"M"}),l?m("video",{className:"m-auto w-full object-fill",preload:"metadata",poster:n?.src,style:{maxHeight:524},controls:!0,children:m("source",{src:l})}):null]})})),tc={Accordion:M,AccordionItem:q,BenefitsBlock:ce,Bonus:He,BonusBenefitsBlock:Je,BusinessBlock:Qe,ButtonBlock:et,Calculator:Wt,CardTransfer:tl,Carousel:xl,CarouselCard:vl,CarouselCatalogCard:yl,CarouselInvestmentCard:Sl,CarouselLinks:Rl,CarouselProductCard:El,CarouselProgramsCard:Wl,CarouselRecommendationCard:Ql,CarouselTariffsCard:tn,Catalog:mn,ComparisonTable:Bn,ContactsBlock:jn,ErrorBlock:Mn,ExchangeRateTile:or,Footer:Lr,Gallery:Gr,GracePeriod:Wr,Header:Li,Headline:Ue,HorizontalLayout:Mi,ImgBlock:Ai,InsuranceAmountBlock:Ei,InvestmentInfo:Gi,LinkDocs:na,MiniGallery:ra,MobileAppTile:sa,OfficeMap:Ma,OfficeServicesBlock:Aa,OtherProducts:za,OtherProductsItem:Fa,ParagraphBlock:Ua,PictureText:Ja,Placeholder:es,ProductBlock:ds,ProductGallery:hs,ProductTile:Ns,PromoTile:ws,Recommendation:Ss,RichTextBlock:Is,RollupItem:Ts,SafeDepositRental:qs,StepsBlock:oo,Tabs:yo,TariffsTable:Do,TextBlock:Fo,Tile:Yo,VerticalLayout:qo,Video:ec},lc=["Header","Footer"],nc=([,{target:e}])=>Math.abs(e.getBoundingClientRect().top);function rc(e=B.inst,t=globalThis){const l=s(new Map);r((()=>e.eventBus.subscribe("intersection",(({block:e,intersection:t})=>{l.current&&l.current.set(e,t)}))),[e]),r((()=>{const n=((e,t=600)=>{let l;const n=(...r)=>{n.dispose(),l=setTimeout((()=>{e(...r)}),t)};return n.dispose=()=>{l&&clearTimeout(l)},n})((()=>{if(!(globalThis.scrollY>3*globalThis.innerHeight/4))return void e.reset();const t=function(e){const t=e.filter((([e])=>!lc.includes(e.type||""))).filter((([,{intersectionRatio:e}])=>e>.01)),[l]=t.length>0?cl(nc)(t):[];return l}([...l.current||[]]);t?.anchor?e.replace(t.anchor):t||e.reset()}),100);return t.addEventListener("scroll",n),()=>{n.dispose(),t.removeEventListener("scroll",n)}}),[e,t])}const ic=d();const ac=u((({className:e,onClick:t,ariaLabel:l})=>m("button",{type:"button",className:`border-0 w-9 bg-inherit cursor-pointer ${e||""}`,onClick:t,"aria-label":l,children:sc()}))),sc=()=>{const e={stroke:"#292D32",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"};return h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[m("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"}),m("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"})]})},oc=u((({className:e=""})=>{const t=function(e){const[t,l]=n(0);return r((()=>{(async()=>{const[t]=await ic.getLikeCount(e);l(t?.value||0)})()}),[e]),{likeCount:t,like:i((async()=>{l(await ic.like(e))}),[e]),dislike:i((async()=>{l(await ic.dislike(e))}),[e])}}(ye().pathname);return h("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:[m(ac,{onClick:Ne(t.like),ariaLabel:"Поставить отметку «лайк»"}),m(ac,{onClick:Ne(t.dislike),className:"rotate-180",ariaLabel:"Поставить отметку «дизлайк»"}),m("span",{className:"select-none",children:t.likeCount})]})})),cc=u((e=>{const{className:t="",blocksRegistry:l,blockDecorator:n,data:r={}}=e,{style:i,blocks:a,slots:s,likeControl:o,colorPalette:c="pc"}=r,d={key:"",page:r,blocksRegistry:l,blockDecorator:n,parent:r};return rc(),h("section",{className:`relative ${x(i)} ${t}`,"data-theme":c,children:[s?.header?m("div",{className:"mb-5 shadow-[0_8px_32px_0px_#00000014]",children:y(s?.header,{...d,slotName:"header"})}):null,h("div",{className:"container grid grid-cols-12 gap-1",children:[y(a,d),s?.footer?y(s?.footer,{...d,slotName:"footer"}):null]}),o?m("div",{className:"flex items-end absolute bottom-0 right-0 h-full pointer-events-none",children:m(oc,{className:"rounded-tl-lg sticky bottom-0 pointer-events-auto"})}):null]})}));cc.childrenTypes=[],cc.slots=()=>["header","footer"];e.Blocks=tc,e.ContentPage=cc,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=d,e.handlerDecorator=Ne,e.joinList=Ui,e.packageVersion="0.6.50",e.projectSettings=o,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=ve,e.useRouter=ye,Object.defineProperty(e,"__esModule",{value:!0})}));
|