(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71267,e=>{"use strict";let t;var n=e.i(43476),i=e.i(70703);e.i(51966);var l=e.i(61193),s=e.i(52543),o=e.i(19390),r=e.i(2305),a=e.i(85900),c=e.i(22468),d=e.i(12716),u=e.i(28133),p=e.i(62965),m=e.i(71645),h=e.i(74080);let v=300,g=({opened:e})=>{let[t,n]=(0,m.useState)(!1),i=(0,m.useRef)(null),l=(0,m.useRef)(!1);return(0,m.useEffect)(()=>(e&&!l.current?(l.current=!0,n(!0)):!e&&l.current&&(i.current=setTimeout(()=>{l.current=!1,n(!1)},v)),()=>{i.current&&clearTimeout(i.current)}),[e]),{mounted:t}},f=(0,c.g)("click-outside","sc"),w=Object.freeze({overlay:`${f}__overlay`,open:`${f}--open`,close:`${f}--close`}),x=({onClose:e,onToucheMove:t,isOpen:i,delay:l=v})=>{let s=(0,m.useRef)(null),o=(0,m.useCallback)(()=>{e&&(s.current=setTimeout(()=>{e()},l))},[l,e]),a=(0,m.useCallback)(e=>{"Escape"===e.key&&o()},[o]);return(0,m.useEffect)(()=>(i&&window.addEventListener("keydown",a),()=>{s.current&&clearTimeout(s.current),window.removeEventListener("keydown",a)}),[i,a]),(0,n.jsx)("div",{className:(0,r.default)(w.overlay,{[w.open]:i,[w.close]:!i}),onTouchStart:t,onClick:o})},_=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},j=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},b=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},N=()=>document.querySelectorAll("[data-portal]").length>1,C=e=>{let t=(0,m.useRef)(null),n=(0,m.useRef)(!1);return(0,m.useEffect)(()=>{if(n.current===e)return;n.current=e;let i=t.current,l=document.body,s=document.documentElement,o=window.innerWidth-s.clientWidth;if(e&&o>0)l.style.top||(window.prevScrollPosition=window.scrollY),s.style.setProperty("overflow-y","scroll"),l.classList.toggle("scroll-disable-windows",!0),l.style.setProperty("width",`calc(100vw - ${o}px)`),l.style.setProperty("top",`-${window.prevScrollPosition}px`),_(i,!0);else if(e)l.style.setProperty("overflow","hidden"),l.style.setProperty("height","100vh"),_(i,!0);else{let e=!N();e&&j(l),e&&b(),_(i,!1)}return()=>{let e=!N();e&&j(l),e&&b()}},[e]),t},y=(0,c.g)("drawer-footer","sc"),$=Object.freeze({footer:`${y}__footer`,hasScroll:`${y}__footer--has-scroll`}),k=({footer:e,hasScroll:t,className:i})=>(0,n.jsx)("div",{className:(0,r.default)($.footer,{[$.hasScroll]:t},i),children:"function"==typeof e?e():e}),T=(0,c.g)("drawer-content","sc"),O=Object.freeze({container:`${T}__container`,open:`${T}--open`,close:`${T}--close`,header:`${T}__header`,rowHeader:`${T}__header--row`,title:`${T}__title`,center:`${T}__title--center`,left:`${T}__title--left`,right:`${T}__title--right`,controlContainer:`${T}__control-container`,content:`${T}__content`,footer:`${T}__footer`}),S=({onClose:e,onContentClick:t,children:i,title:l,rowTitle:s,titleAlign:o,isCloseable:a,footer:c,closeButton:d,isOpen:u,contentClassName:h,footerClassName:v,contentStyle:g,width:f})=>{let w=(0,m.useRef)(null),x=(0,m.useRef)(null),[_,j]=(0,m.useState)(!1);(0,m.useEffect)(()=>{var e;if(!x.current||!w.current)return;let t=(null==(e=null==x?void 0:x.current)?void 0:e.getBoundingClientRect().top)||0,n=null==w?void 0:w.current,i=()=>{let e=null==x?void 0:x.current;e&&j(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",i,!1),()=>{null==n||n.removeEventListener("scroll",i,!1)}},[]);let b=g||f?{width:f,...g||{}}:void 0;return(0,n.jsxs)("div",{ref:w,style:b,className:(0,r.default)(O.container,{[O.open]:u,[O.close]:!u},h),children:[l||a?(0,n.jsxs)("div",{className:(0,r.default)(O.header,{[O.rowHeader]:s}),children:[a?d?"function"==typeof d?d():d:(0,n.jsx)("button",{type:"button",className:O.controlContainer,onClick:e,children:(0,n.jsx)(p.IconFdsCloseO,{size:24})}):null,l?(0,n.jsx)("h3",{className:(0,r.default)(O.title,{[O[o]]:!0}),children:l}):null]}):null,(0,n.jsx)("div",{ref:x,className:O.content,onClick:t,children:i}),c&&(0,n.jsx)(k,{className:(0,r.default)(O.footer,v),footer:c,hasScroll:_})]})},A=(0,c.g)("drawer-layout","sc"),R=Object.freeze({window:`${A}__window`}),I=({onClose:e,isOpen:t,children:i,withDisabledScroll:l,className:s,...o})=>{let a=(0,m.useCallback)(e=>e.stopPropagation(),[]);return C(t&&l),(0,n.jsxs)("div",{"data-portal":!0,className:(0,r.default)(R.window,s),children:[(0,n.jsx)(x,{onClose:e,isOpen:t,delay:0}),(0,n.jsx)(S,{onContentClick:a,onClose:e,isOpen:t,...o,children:i})]})},L=({isOpen:e=!1,children:t,titleAlign:i="center",isCloseable:l=!0,withDisabledScroll:s=!0,...o})=>{let{mounted:r}=g({opened:e});return r?(0,n.jsx)(I,{titleAlign:i,isCloseable:l,isOpen:e,withDisabledScroll:s,...o,children:t}):null};L.displayName="Drawer";let P=(0,c.g)("mobile-modal-footer","sc"),z=Object.freeze({footer:`${P}__footer`,footerWithoutShadow:`${P}__footer--without-shadow`}),U=({footer:e,isSmallPopup:t=!1,footerClassName:i})=>(0,n.jsx)("div",{className:(0,r.default)(z.footer,t&&z.footerWithoutShadow,i),children:"function"==typeof e?e():e}),E=(0,c.g)("mobile-popup","sc"),B=Object.freeze({mobilePopup:`${E}`,mobilePopupOpen:`${E}--open`,content:`${E}__content`,contentFull:`${E}__content--full`,contentTransition:`${E}__content--transition`,contentTransitionOpen:`${E}__content--transition-open`,contentLine:`${E}__content-line`,contentContainer:`${E}__content-container`,smallContentContainer:`${E}__content-container--small`,min:`${E}__content-container--min`,title:`${E}__title`,closeContainer:`${E}__close-container`,closeButton:`${E}__close-button`}),M=({children:e,footer:t,isOpen:i,isSmallPopup:l,onClose:s,hasCloseButton:o=!0,full:a,touchDistance:c=100,withDisabledScroll:d=!0,contentClassName:u,className:h,title:v,closeButton:g,footerClassName:f})=>{let[w,_]=(0,m.useState)(!1),[j,b]=(0,m.useState)(!1),[N,y]=(0,m.useState)(!0),[$,k]=(0,m.useState)("120%"),T=(0,m.useRef)(null),O=(0,m.useRef)(0),S=(0,m.useRef)(!1),A=e=>{var t,n,i;let l=null==(t=T.current)?void 0:t.offsetTop,s=null==(n=T.current)?void 0:n.offsetHeight;if(S.current=!0,y(!1),l&&s){let t=(null==(i=null==e?void 0:e.touches[0])?void 0:i.clientY)-l,n=0;t>=0&&t<=s+30&&(n=t),t>s+30&&(n=s+30),k(`${n}px`),O.current=n}},R=()=>{S.current&&(O.current>c&&s?null==s||s():k("0"),y(!0),S.current=!1),window.removeEventListener("touchmove",A),window.removeEventListener("touchend",R)};return(0,m.useEffect)(()=>{i&&setTimeout(()=>{_(!0),b(!0),k("0")},100),!i&&j&&(k("120%"),_(!1),b(!1))},[j,i]),C(i&&d),(0,n.jsxs)("div",{"data-portal":!0,className:(0,r.default)(B.mobilePopup,j&&B.mobilePopupOpen,h),children:[(0,n.jsx)(x,{onClose:()=>{i&&(null==s||s())},onToucheMove:()=>{i&&(_(!1),window.addEventListener("touchmove",A),window.addEventListener("touchend",R))},isOpen:i,delay:0}),(0,n.jsxs)("div",{className:(0,r.default)(B.content,a&&B.contentFull,N&&B.contentTransition,N&&w&&B.contentTransitionOpen),ref:T,style:{transform:`translateY(${$})`},children:[(0,n.jsx)("div",{className:B.contentLine}),(0,n.jsxs)("div",{className:(0,r.default)(B.contentContainer,l&&B.smallContentContainer,{[B.min]:!v&&!o},u),children:[!!v&&(0,n.jsx)("div",{className:B.title,children:v}),o?(0,n.jsx)("div",{className:B.closeContainer,children:o?g?"function"==typeof g?g():g:(0,n.jsx)("button",{onClick:s,className:B.closeButton,children:(0,n.jsx)(p.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,n.jsx)(U,{footerClassName:f,isSmallPopup:l,footer:t})]})]})},D=({children:e,isSmallPopup:t=!1,isOpen:i=!1,...l})=>{let{mounted:s}=g({opened:i});return s?(0,n.jsx)(M,{isSmallPopup:t,isOpen:i,...l,children:e}):null};D.displayName="UiMobilePopup";let W=({children:e,id:t="portal-root"})=>{let[n,i]=(0,m.useState)(null);return(0,m.useEffect)(()=>{let e=document.getElementById(t);if(e)return void i(e);let n=document.createElement("div");return n.id=t,document.body.appendChild(n),i(n),()=>{document.body.removeChild(n)}},[t]),n?(0,h.createPortal)(e,n):null},F=(0,c.g)("footer-contacts-block","sc"),H=Object.freeze({contactsWrapper:`${F}__contacts-wrapper`,gray:`${F}__gray`,phones:`${F}__phones`,contactsButtons:`${F}__contacts-buttons`,vkIcon:`${F}__vk-icon`,tgIcon:`${F}__tg-icon`,dzenIcon:`${F}__dzen-icon`,maxIcon:`${F}__max-icon`,link:`${F}__link`}),V=(0,c.g)("footer","sc"),G=Object.freeze({wrapper:`${V}__wrapper`,section:`${V}__section`,container:`${V}__container`,top:`${V}__top`,main:`${V}__main`,links:`${V}__links`,disclaimer:`${V}__disclaimer`,bottom:`${V}__bottom`,bottomLinks:`${V}__bottom-links`,bottomDisclaimer:`${V}__bottom-disclaimer`,compact:`${V}__wrapper--compact`,white:`${V}__wrapper--white`}),J="finkit-widgets-sc-footer",q=[{title:"8 (800) 505-32-32",url:"tel:88005053232"},{title:"8 (800) 700-64-94",url:"tel:88007006494"},{title:"+7 (495) 145-32-32",url:"tel:+74951453232"},{title:"+7 (495) 787-64-94",url:"tel:+74957876494"}],Q=[...q,{title:"Онлайн чат",url:void 0}],Y=[{type:"vk",className:H.vkIcon,iconName:"vk"},{type:"telegramChannel",className:H.tgIcon,iconName:"telegram"},{type:"dzen",className:H.dzenIcon,iconName:"dzen"},{type:"max",className:H.maxIcon,iconName:"max"}],K=(0,n.jsxs)("p",{children:["На сайте finuslugi.ru предоставляются услуги оператора финансовой платформы ПАО Московская Биржа, а также услуги ООО «МБ Маркетплейс», организации, не являющейся оператором финансовой платформы в соответствии с Федеральным законом от 20.07.2020 №211-ФЗ «О совершении финансовых сделок с использованием финансовой платформы». Услуги оператора финансовой платформы ПАО Московская Биржа обозначены пометкой «Открытие онлайн на Финуслугах». Иная информация на сайте www.finuslugi.ru считается размещенной ООО «МБ Маркетплейс», если иное явно не следует из существа размещаемой информации. ООО «МБ Маркетплейс» входит в Группу «Московская Биржа».",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Группа «Московская Биржа» - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),X=({onClick:e,eventActionText:t,eventLabel:i,...l})=>(0,n.jsx)(d.Button,{onClick:n=>{null==e||e(n),(0,u.h)({eventCategory:J,eventActionType:u.D.button,eventActionText:t||"",eventLabel:i})},...l}),Z=({onClick:e,eventActionType:t,eventActionText:i,eventLabel:l,chat:s,...o})=>(0,n.jsx)(d.Link,{onClick:n=>{var o,r,a;null==e||e(n),s&&(null==n||n.preventDefault(),null==(a=null==(r=null==(o=null==window?void 0:window.supportWidget)?void 0:o.craftTalk)?void 0:r.open)||a.call(r)),(0,u.h)({eventCategory:J,eventActionType:t||u.D.link,eventActionText:i||"",eventLabel:l})},...o}),ee=({minioUrl:e,blogs:t})=>(0,n.jsxs)("div",{className:H.contactsWrapper,children:[(0,n.jsx)(l.Text,{className:H.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,n.jsx)("div",{className:H.phones,children:Q.map(({title:e,url:t})=>(0,n.jsx)(Z,{href:t,eventActionText:e,chat:!t,children:e},e))}),(0,n.jsx)(l.Text,{className:H.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,n.jsx)("div",{className:H.contactsButtons,children:Y.map(({type:i,className:l,iconName:s})=>(0,n.jsx)(X,{as:"a",href:null==t?void 0:t[i],target:"_blank",className:l,iconRight:(0,n.jsx)("img",{width:24,height:24,src:(0,a.joinURL)(e,`/widgets/footer/${s}.svg`),alt:i,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:i,eventLabel:null==t?void 0:t[i]},i))}),(0,n.jsx)(l.Text,{className:H.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,n.jsx)("div",{className:H.contactsButtons,children:(0,n.jsxs)(Z,{href:null==t?void 0:t.investTg,target:"_blank",className:H.link,eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg,children:[(0,n.jsx)(X,{className:H.tgIcon,iconRight:(0,n.jsx)("img",{width:24,height:24,src:(0,a.joinURL)(e,"/widgets/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg}),"Финуслуги Инвест"]})})]}),et=(0,c.g)("footer-disclaimer","sc"),en=Object.freeze({disclaimer:`${et}`}),ei=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,u.h)({eventCategory:J,eventActionType:u.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,n.jsx)("div",{className:(0,r.default)(e.className,en.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,n.jsx)("div",{className:(0,r.default)(e.className,en.disclaimer),onClick:t,children:e.children})},el=(0,c.g)("footer-modal-body","sc"),es=Object.freeze({wrapper:`${el}__wrapper`,title:`${el}__title`,item:`${el}__item`,label:`${el}__label`,button:`${el}__button`,description:`${el}__description`}),eo=({directions:e})=>(0,n.jsxs)("div",{className:es.wrapper,children:[(0,n.jsx)("div",{className:es.title,children:"Направления"}),e.map(e=>(0,n.jsxs)(Z,{className:es.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:`${e.name}_${e.url}`,children:[(0,n.jsxs)("div",{className:es.label,children:[(0,n.jsx)("span",{children:e.name}),(0,n.jsx)(X,{className:es.button,iconRight:(0,n.jsx)(p.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,n.jsx)("p",{className:es.description,children:e.description})]},e.url))]}),er=(0,c.g)("footer-popup","sc"),ea=Object.freeze({wrapper:`${er}__wrapper`,button:`${er}__button`,icon:`${er}__icon`,buttonWrapper:`${er}__button-wrapper`}),ec=({directions:e})=>{let t=(0,d.useBreakpointUp)("l"),[i,l]=(0,m.useState)(!1),s=()=>{l(!1)};return(0,n.jsxs)("div",{className:ea.wrapper,children:[(0,n.jsx)("div",{className:ea.buttonWrapper,children:(0,n.jsx)(X,{className:ea.button,appearance:"ghost",variant:"white",onClick:()=>{l(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,n.jsx)("div",{className:ea.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,n.jsx)("div",{},e))})})}),(0,n.jsxs)(W,{children:[!t&&(0,n.jsx)(D,{isOpen:i,onClose:s,full:!0,children:(0,n.jsx)(eo,{directions:e})}),t&&(0,n.jsx)(L,{isOpen:i,onClose:s,width:"804px",children:(0,n.jsx)(eo,{directions:e})})]})]})},ed=(0,c.g)("footer-left-column","sc"),eu=Object.freeze({leftColumn:`${ed}__left-column`,logoWrapper:`${ed}__logo-wrapper`,banner:`${ed}__banner`,mobAppLink:`${ed}__mob-app-link`,br:`${ed}__br`}),ep=({showcaseUrl:e,minioUrl:t,directions:i,mobAppUrl:o})=>{let r=((e="")=>{let[t,n]=(0,m.useState)(e);return(0,m.useEffect)(()=>{let t,i,l=(t=new URL(window.location.href),i=new URLSearchParams,t.searchParams.forEach((e,t)=>{/^utm_/i.test(t)&&i.set(t,e)}),i);if(!l||0===l.size)return;let[s,o=""]=e.split("?"),r=new URLSearchParams(o);l.forEach((e,t)=>{r.has(t)||r.set(t,e)});let a=r.toString();n(a?`${s}?${a}`:s)},[e]),t})(o);return(0,n.jsxs)("div",{className:eu.leftColumn,children:[(0,n.jsx)(Z,{className:eu.logoWrapper,href:e,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:(0,n.jsx)("img",{src:(0,a.joinURL)(t,"/widgets/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,n.jsx)(ec,{directions:i??[]}),(0,n.jsx)(Z,{href:r,target:"_blank",eventActionType:u.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:r,className:eu.mobAppLink,children:(0,n.jsxs)(s.Card,{className:eu.banner,children:[(0,n.jsxs)(l.Text,{weight:"medium",children:["Управляйте финансами",(0,n.jsx)("br",{}),"через приложение",(0,n.jsx)("br",{className:eu.br})," Финуслуг"]}),(0,n.jsx)(X,{iconRight:(0,n.jsx)(p.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,n.jsxs)("picture",{children:[(0,n.jsx)("source",{srcSet:(0,a.joinURL)(t,"/widgets/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,n.jsx)("img",{src:(0,a.joinURL)(t,"/widgets/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},em=(0,c.g)("footer-logo","sc"),eh=Object.freeze({wrapper:`${em}__wrapper`,link:`${em}__link`,fromMoex:`${em}__from-moex`,logo:`${em}__logo`,white:`${em}__wrapper--white`}),ev=({showcaseUrl:e,minioUrl:t,isWhite:i})=>(0,n.jsx)("div",{className:(0,r.default)(eh.wrapper,{[eh.white]:i}),children:(0,n.jsxs)(Z,{className:eh.link,href:e,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:[(0,n.jsx)("img",{className:eh.logo,src:`${t}/images/logo-brandmark-common-finuslugi.svg`}),(0,n.jsx)("img",{className:eh.fromMoex,src:`${t}/images/fromMoex.svg`})]})});var eg=((t=eg||{}).BLACK="black",t.GRAY="gray",t);let ef=(0,c.g)("footer-warning","sc"),ew=Object.freeze({reservedSpace:`${ef}__reserved-space`,wrapper:`${ef}__wrapper`,wrapperGray:`${ef}__wrapper--gray`,fixed:`${ef}__wrapper--fixed`,container:`${ef}__container`,text:`${ef}__text`,invisibleText:`${ef}__text--invisible`}),ex=({text:e,variant:t,fixed:i,isPlaceholder:l})=>(0,n.jsx)("div",{className:(0,r.default)(ew.wrapper,{[ew.wrapperGray]:"gray"===t,[ew.fixed]:i&&!l}),children:(0,n.jsx)(o.Container,{className:ew.container,children:(0,n.jsx)("div",{className:(0,r.default)(ew.text,{[ew.invisibleText]:l}),dangerouslySetInnerHTML:{__html:e}})})}),e_=({warning:e})=>{let t="string"==typeof e?{text:e}:e,i={text:t.text,fixed:t.fixed??!0,variant:t.variant??eg.BLACK};return(0,n.jsxs)("div",{className:ew.reservedSpace,children:[(0,n.jsx)(ex,{...i,isPlaceholder:i.fixed}),i.fixed&&(0,n.jsx)(ex,{...i,fixed:!0})]})},ej=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:i="https://assets.finuslugi.ru/mp-assets",customDisclaimer:l,variant:s="default",className:a})=>{var c,d;let u=!l&&null!=e&&e.disclaimer?e.disclaimer:void 0,p=s.includes("compact"),m=s.includes("white"),h=null==(c=null==e?void 0:e.bottom)?void 0:c.concat(p?q:[]),v=e&&"warning"in e?e.warning:void 0;return e?(0,n.jsx)("footer",{className:(0,r.default)(G.wrapper,a,{[G.compact]:p,[G.white]:m}),children:(0,n.jsxs)("section",{className:G.section,children:[(0,n.jsxs)(o.Container,{className:G.container,children:[!p&&(0,n.jsx)(ep,{showcaseUrl:t,minioUrl:i,directions:null==e?void 0:e.directions,mobAppUrl:null==e?void 0:e.mobAppUrl}),(0,n.jsx)("div",{className:G.wrapper,children:(0,n.jsxs)("div",{className:G.top,children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:G.main,children:[!p&&(0,n.jsx)("div",{className:G.links,children:null==(d=null==e?void 0:e.top)?void 0:d.map(e=>(0,n.jsx)(Z,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),p&&(0,n.jsx)(ev,{showcaseUrl:t,minioUrl:i,isWhite:m}),(0,n.jsx)(ei,{className:G.disclaimer,disclaimer:u,children:l||K})]}),(0,n.jsxs)("div",{className:G.bottom,children:[(0,n.jsx)("div",{className:G.bottomLinks,children:null==h?void 0:h.map(e=>(0,n.jsx)(Z,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,n.jsx)(ei,{className:G.bottomDisclaimer,disclaimer:null==e?void 0:e.bottomDisclaimer})]})]}),!p&&(0,n.jsx)(ee,{minioUrl:i,blogs:null==e?void 0:e.blogs})]})})]}),p&&!!v&&(0,n.jsx)(e_,{warning:v})]})}):null};var eb=e.i(22926),eN=e.i(24359),eC=e.i(1e4);let ey=(e,t)=>{if(!(typeof document>"u")){if(!e&&!t){eN.a.removeItem(eb.U),eN.a.removeItem(eb.a);return}eN.a.setItem(eb.U,JSON.stringify(e)||"",{"max-age":31536e3}),eN.a.setItem(eb.a,JSON.stringify(t)||"",{"max-age":31536e3})}},e$=e=>{if(typeof document>"u")return null;let t=eN.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},ek=function(e){if(typeof window>"u"||!window.localStorage)return null;let t=window.localStorage.getItem(e);if(!t||"undefined"===t)return null;try{return JSON.parse(t)}catch(t){console.warn(`Invalid object in localStorage for key "${e}": ${t}`)}return null},eT=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=ek("all_regions")||[];return window.allRegions=e,e},eO=e=>{let t={};return e.map(({id:e,name:n,towns:i})=>(i.forEach(i=>{i.parentId=e,t[i.name]=t[i.name]||{},t[i.name][i.id]=n}),i)).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},eS=async()=>{let e={regions:[]};try{e=await (await fetch("https://finuslugi.ru/money_data/Root.json?short=1")).json()}catch(e){console.warn(e)}let t=null!=e&&e.regions?e.regions:[];return t.length<1?[]:(window.allRegions=t,window.localStorage.setItem("all_regions",JSON.stringify(t)),window.localStorage.setItem("lastRegionsUpdateUnixTimestamp",JSON.stringify(Date.now())),t)},eA=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},eR=(e,t,n)=>{(0,u.h)({eventCategory:ez,eventActionType:e,eventActionText:t,eventLabel:n})},eI=eT(),eL=eO(eI),eP={regions:eI,towns:eL,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},ez="finkit-widgets-sc-city-select",eU=(0,m.createContext)(eP);function eE(){return(0,m.useContext)(eU)}let eB=({children:e,initialRegion:t,initialTown:i,showStartGeoPopup:l=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:o="https://finuslugi.ru/backend/money/dadata"})=>{let r=Number(ek("lastRegionsUpdateUnixTimestamp")||0),a=Number(s||0)>r,[c,d]=(0,m.useState)(eT()),[{startRegion:p,startTown:h},v]=(0,m.useState)({startRegion:eP.startRegion,startTown:eP.startTown}),g=t??eP.region,f=i??eP.town,[{region:w,town:x},_]=(0,m.useState)({region:g,town:f}),[j,b]=(0,m.useState)(eP.startPopupVisible),[N,C]=(0,m.useState)(eP.popupVisible),y=(0,m.useRef)(""),$=(0,m.useMemo)(()=>eO(c),[c.length]),k=(0,m.useCallback)((e,t)=>{window.sessionStorage.setItem("start_popup_opened","1"),window.localStorage.setItem("auto_town",JSON.stringify(t)||""),window.localStorage.setItem("auto_region",JSON.stringify(e)||""),b(!0),v({startRegion:e,startTown:t})},[b,v]),T=(0,m.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||k(e,t)},[k]),O=(0,m.useCallback)(()=>{if(y.current&&!w&&!x){let e=$.find(e=>e.name===y.current)??null;return T(c.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}T(w,x)},[w,x,$,c,T]),S=(0,m.useCallback)(e=>{C(e)},[C]),A=(0,m.useCallback)(e=>{e?eR(u.D.icon,"location"):eR(u.D.button,(null==x?void 0:x.name)||"Вся Россия"),!l||window.sessionStorage.getItem("start_popup_opened")?S(!0):O()},[l,x,S,O]),R=(0,m.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem(eb.U,JSON.stringify(e)||""),window.localStorage.setItem(eb.a,JSON.stringify(t)||""),ey(e||null,t||null)):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem(eb.U,""),window.localStorage.setItem(eb.a,""),ey(null,null)),_({region:e||null,town:t||null}),b(!1),S(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[S]),I=()=>{_({region:e$(eb.U)??ek(eb.U),town:e$(eb.a)??ek(eb.a)});let e=async({coords:{latitude:e,longitude:t}})=>{let n=`${o}?lat=${e}&lon=${t}`,i=await eA(n);null!=i&&i.location&&(y.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&l)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch{}};return(0,m.useEffect)(()=>{if((c.length<1||a)&&eS().then(e=>d(e)),window.innerWidth<1024){let e=()=>{I(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{I()},0)},[]),(0,n.jsx)(eU.Provider,{value:{regions:c,towns:$,region:w,town:x,startPopupVisible:j,setStartPopupVisible:b,popupVisible:N,handleToggleModal:S,selectCity:R,handleButtonClick:A,startRegion:p,startTown:h},children:e})},eM=()=>{let e=(0,m.useRef)(null),t=(0,m.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,m.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,m.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},eD=(0,c.g)("city-select-modal-body","sc"),eW=Object.freeze({wrapper:`${eD}__wrapper`,subtitle:`${eD}__subtitle`,hintWrapper:`${eD}__hint-wrapper`,hintText:`${eD}__hint-text`,input:`${eD}__input`,chips:`${eD}__chips`,townsListWrapper:`${eD}__towns-list-wrapper`,townsList:`${eD}__towns-list`,townsGroup:`${eD}__towns-group`,townsGroupLabel:`${eD}__towns-group-label`,townsGroupList:`${eD}__towns-group-list`,townsName:`${eD}__towns-name`,regionName:`${eD}__region-name`}),eF=({groupedTowns:e,chips:t,query:i,setQuery:l,isDrawer:s})=>{var o;let r=eE(),a=(0,m.useRef)(null),[c,h]=(0,m.useState)("10000px");(0,m.useEffect)(()=>{if(!s||!a.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,i)=>{let l=n.map(e=>[...e]),s=l.map(e),o=s.reduce((e,t,n)=>t<s[e]?n:e,0);0===o&&l[0].push(l[1].shift()),2===o&&l[2].unshift(l[1].pop()),1===o&&s[0]>s[2]&&l[1].unshift(l[0].pop()),1===o&&s[0]<s[2]&&l[1].push(l[2].shift());let r=Math.max(...l.map(e));return r>=i?i:t(l,r)};new ResizeObserver(()=>{var e;if(!(null!=(e=a.current)&&e.children))return;let n=Array.from(a.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let i=0;try{i=t([[],n,[]],1/0)}catch{i=0}i>0&&h(`${i}px`)}).observe(a.current)},[]);let v=e=>{if(eR(u.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return r.selectCity();let t=r.regions.find(t=>t.id===Number(e.parentId))||null;r.selectCity(t,e)};return(0,n.jsxs)("div",{className:eW.wrapper,children:[(0,n.jsxs)("div",{className:eW.subtitle,children:["Покажем предложения рядом с вами",(0,n.jsxs)("div",{className:eW.hintWrapper,children:[(0,n.jsx)(p.IconFdsQuestionCircleO,{size:24}),(0,n.jsx)("div",{className:eW.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,n.jsx)(d.InputBase,{className:eW.input,value:i,onChange:l,size:"s",placeholder:"Введите название города",icon:i?(0,n.jsx)(p.IconFdsCloseCircleO,{size:24,onClick:()=>l("")}):(0,n.jsx)(p.IconFdsSearchO,{size:24})}),(0,n.jsx)(d.Chips,{className:eW.chips,chips:t,value:(null==(o=r.town)?void 0:o.id)||0,onChipClick:e=>{v(r.towns.find(t=>t.id===e))}}),(0,n.jsx)("div",{className:eW.townsListWrapper,children:(0,n.jsx)("div",{ref:a,className:eW.townsList,style:{maxHeight:c},children:e.map(e=>(0,n.jsxs)("div",{className:eW.townsGroup,children:[(0,n.jsx)("div",{className:eW.townsGroupLabel,children:e.letter}),(0,n.jsx)("div",{className:eW.townsGroupList,children:e.towns.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>v(e),children:[(0,n.jsx)("div",{className:eW.townsName,children:e.name}),(0,n.jsx)("div",{className:eW.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},eH=[1095,1096,134,720,189,180],eV=()=>{var e;let t=eE(),i=(0,d.useBreakpointUp)("l"),[l,s]=(0,m.useState)(""),o=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,r=(0,m.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(l.toLocaleLowerCase())).sort((e,t)=>e.name.localeCompare(t.name)).reduce((e,t)=>{let n=e.pop();return n||(n={letter:t.name[0],towns:[]}),n.letter!==t.name[0]&&(e.push(n),n={letter:t.name[0],towns:[]}),n.towns.push(t),e.push(n),e},[]),[l,t.towns.length]),a=(0,m.useMemo)(()=>[{id:0,label:"Вся Россия"},...eH.map(e=>{let n=t.towns.find(t=>t.id===e);return{id:null==n?void 0:n.id,label:null==n?void 0:n.name}}).filter(e=>(null==e?void 0:e.id)!==void 0)],[t.towns.length]),c=()=>{eR(u.D.button,"close"),t.handleToggleModal(!1)};return(0,n.jsxs)(W,{children:[!i&&(0,n.jsx)(D,{title:o,isOpen:t.popupVisible,onClose:c,full:!0,children:(0,n.jsx)(eF,{groupedTowns:r,chips:a,query:l,setQuery:s})}),i&&(0,n.jsx)(L,{title:o,isOpen:t.popupVisible,onClose:c,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,n.jsx)(eF,{groupedTowns:r,chips:a,query:l,setQuery:s,isDrawer:!0})})]})},eG={"uat-mp.beta.moex.com":"//chat-marketplace.beta.moex.com","finuslugi.ru":"//chat.finuslugi.ru","dev-rc.beta.moex.com":"//dev-opbot.tech.finuslugi.ru"},eJ=(0,m.createContext)({isAuth:!1,isHeaderHidden:!1,isHeaderTransparent:!1,openedBlock:null,setOpenedBlock:()=>null,openedSection:null,setOpenedSection:()=>null,isNavigationOpen:!1,isNavigationMounted:!1,navMenuItemsRef:{current:null},navigationRef:{current:null},ignoreClicks:!1,setIgnoreClicks:()=>null,isChatModalOpen:!1,setIsChatModalOpen:()=>null,isChatLoading:!1,fixedContainerRef:{current:null},headerRef:{current:null}});function eq(){return(0,m.useContext)(eJ)}let eQ=e=>{let[t,i]=(0,m.useState)(!1),[l,s]=(0,m.useState)(!1),[o,r]=(0,m.useState)(!!e.isMainBannerPage),{isChatModalOpen:a,setIsChatModalOpen:c,isChatLoading:d}=(()=>{let[e,t]=(0,m.useState)(!1),[n,i]=(0,m.useState)(!1),l=(0,m.useRef)(!1),s=e=>{l.current=e,i(e)};return(0,m.useEffect)(()=>{if(typeof window>"u")return;let e=(()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(eG,e)?eG[e]:eG["finuslugi.ru"]})(),n="webchat_main";window.supportWidget={craftTalk:{isOpened:!1,setConfig:t=>{if(t.host&&(e=t.host),t.channel&&(n=t.channel),t.user){let e="function"==typeof t.user?t.user:()=>({...t.user});window.__WebchatUserCallback=e}},open:()=>new Promise(e=>{e()}),close:()=>null,toggle:()=>null}};let i=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((o,r)=>{var a,c;let d,u;l.current?r(Error("chat is already opened")):i?(i.openWidget(),t(!1),o()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let l=document.querySelector(".webchat");l&&new MutationObserver(e=>{e.forEach(e=>{if("style"===e.attributeName){let e=document.querySelector(".webchat"),t=!!e&&"none"!==e.style.display;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.isOpened=t)}})}).observe(l,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),s(!1),t(!1),o()},a=e,c=n,(d=document.createElement("link")).rel="stylesheet",d.type="text/css",d.href=`${a}/assets/css/${c}`,document.head.appendChild(d),(u=document.createElement("script")).src=`${a}/get-bootstrap/${c}`,u.defer=!0,document.body.appendChild(u))}),window.supportWidget.craftTalk.toggle=()=>{var e,t,n,i;null!=(t=null==(e=window.supportWidget)?void 0:e.craftTalk)&&t.isOpened?window.supportWidget.craftTalk.close():null==(i=null==(n=window.supportWidget)?void 0:n.craftTalk)||i.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:t,isChatLoading:n}})(),[u,p]=(0,m.useState)(null),[h,v]=(0,m.useState)(null),[g,f]=(0,m.useState)(!1),[w,x]=(0,m.useState)(!1),[_,j]=(0,m.useState)(!1),b=(0,m.useRef)(null),N=C(g),y=(0,m.useRef)(null),$=(0,m.useRef)(null),k=(0,m.useRef)(null),T=(0,m.useRef)(null),O=(0,m.useCallback)(()=>{N.current&&N.current.scrollTo({top:0})},[N]),S=(0,m.useCallback)(e=>{v(e),O()},[O]),A=(0,m.useCallback)(e=>{y.current&&clearTimeout(y.current),e&&x(!0),e||(y.current=setTimeout(()=>{x(!1),S(null)},300))},[S]),R=(0,m.useCallback)((e,t,n)=>{if(t&&S(t),!n&&e===u||!e){A(!g),f(!g);return}p(e),A(!0),f(!0)},[u,S,g,A]),I=(0,m.useCallback)(()=>{$.current&&clearTimeout($.current),j(!0),$.current=setTimeout(()=>{j(!1)},650)},[]);return(0,m.useEffect)(()=>{i(!!document.cookie.includes("auth.gtm_customer_id"));let t=(0,eC.s)(s,r,e.isMainBannerPage);return(0,eC.i)(),t},[]),(0,n.jsx)("header",{children:(0,n.jsx)(eJ.Provider,{value:{isAuth:t,isHeaderHidden:l,isHeaderTransparent:o,openedBlock:u,setOpenedBlock:R,openedSection:h,setOpenedSection:S,isNavigationOpen:g,isNavigationMounted:w,navMenuItemsRef:b,navigationRef:N,ignoreClicks:_,setIgnoreClicks:I,isChatModalOpen:a,setIsChatModalOpen:c,isChatLoading:d,fixedContainerRef:k,headerRef:T},children:e.children})})},eY=({label:e,onClick:t,eventActionText:i,eventLabel:l,...s})=>(0,n.jsx)(d.Button,{label:e,onClick:e=>{null==t||t(e),(0,u.h)({eventCategory:eb.H,eventActionType:u.D.button,eventActionText:i||"",eventLabel:l||""})},...s}),eK=(0,c.g)("header-popup","sc"),eX=Object.freeze({popup:`${eK}__popup`,popupHeader:`${eK}__popup-header`,popupClose:`${eK}__popup-close`,body:`${eK}__body`}),eZ=({isOpen:e,onClose:t,children:i,title:l})=>{let s=(0,d.useBreakpointUp)("l");return(0,n.jsxs)(W,{children:[!s&&(0,n.jsx)(D,{title:l,isOpen:e,onClose:t,children:i}),s&&e&&(0,n.jsxs)("div",{className:eX.popup,children:[(0,n.jsxs)("div",{className:eX.popupHeader,children:[l,(0,n.jsx)(eY,{className:eX.popupClose,iconLeft:(0,n.jsx)(p.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,n.jsx)("div",{className:eX.body,children:i})]})]})},e0=(0,c.g)("start-choice-popup","sc"),e1=Object.freeze({top:`${e0}__top`,progress:`${e0}__progress`,innerCircle:`${e0}__inner-circle`,title:`${e0}__title`,subtitle:`${e0}__subtitle`,actions:`${e0}__actions`}),e2=()=>{var e,t;let i=eE(),[l,s]=(0,m.useState)(10),[o,r]=(0,m.useState)(0),a=(0,m.useRef)(void 0),c=()=>{eR(u.D.button,"close_choose_popup"),window.localStorage.setItem("auto_town",JSON.stringify(i.startTown)||""),window.localStorage.setItem("auto_region",JSON.stringify(i.startRegion)||""),i.setStartPopupVisible(!1)};return(0,m.useEffect)(()=>{let e,t,n,o;i.startPopupVisible?(t=1e3*(e=Number((" "+l).slice(1)))/100,n=0,o=0,a.current=setInterval(()=>{n++,o+=t,r(3.6*n);let i=e-Math.floor(o/1e3);i<l&&s(i),100===n&&(clearInterval(a.current),c())},t)):(clearInterval(a.current),s(10),r(0))},[i.startPopupVisible]),(0,n.jsxs)(eZ,{isOpen:i.startPopupVisible,onClose:c,title:(0,n.jsx)("button",{type:"button",className:e1.progress,style:{background:`conic-gradient(#ff0508 ${o}deg, #e3e7ec 0deg)`},onClick:c,children:(0,n.jsx)("div",{className:e1.innerCircle,children:l})}),children:[(0,n.jsxs)("div",{className:e1.top,children:[(0,n.jsxs)("div",{className:e1.title,children:["Ваш город ",(null==(e=i.startTown)?void 0:e.name)||(null==(t=i.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,n.jsx)("div",{className:e1.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,n.jsxs)("div",{className:e1.actions,children:[(0,n.jsx)(eY,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{eR(u.D.button,"Да, все верно"),i.selectCity(i.startRegion,i.startTown)},children:"Да, все верно"}),(0,n.jsx)(eY,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{eR(u.D.button,"Нет, изменить"),i.setStartPopupVisible(!1),i.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},e4=(0,c.g)("city-select","sc"),e3=Object.freeze({button:`${e4}__button`,minimal:`${e4}__minimal`,full:`${e4}__full`}),e6=({initialTown:e})=>{var t;let i=eE(),l=(null==(t=i.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:s,isChatModalOpen:o}=eq(),{startPopupVisible:a,setStartPopupVisible:c,popupVisible:u}=i,h=(0,m.useRef)();(0,m.useEffect)(()=>{u&&(h.current="popup")},[u]),(0,m.useEffect)(()=>{o&&(h.current="chat")},[o]),(0,m.useEffect)(()=>{a&&(h.current="startPopup")},[a]),(0,m.useEffect)(()=>{h.current&&("chat"===h.current&&a?c(!1):["startPopup","popup"].includes(h.current)&&o&&s(!1))},[u,o,a,c,s]);let v={appearance:"ghost",size:"xs",onClick:()=>i.handleButtonClick(!1),iconLeft:(0,n.jsx)(p.IconFdsLocationO,{size:24})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Button,{...v,className:(0,r.default)(e3.button,e3.full),label:l}),(0,n.jsx)(d.Button,{...v,className:(0,r.default)(e3.button,e3.minimal),shape:"icon"}),(0,n.jsx)(eV,{}),(0,n.jsx)(e2,{})]})},e5=({onClick:e,eventActionType:t,eventActionText:i,eventLabel:l,...s})=>(0,n.jsx)(d.Link,{onClick:n=>{null==e||e(n),(0,u.h)({eventCategory:eb.H,eventActionType:t||u.D.link,eventActionText:i||"",eventLabel:l||""})},...s}),e7=(0,c.g)("header-mobile-app-banner","sc"),e8=Object.freeze({wrapper:`${e7}__wrapper`,container:`${e7}__container`,closeButton:`${e7}__close-button`,innerWrapper:`${e7}__inner-wrapper`,imageWrapper:`${e7}__image-wrapper`,image:`${e7}__image`,title:`${e7}__title`,description:`${e7}__description`,callToAction:`${e7}__call-to-action`,scanQr:`${e7}__scan-qr`}),e9=Object.freeze({mobile:56,desktop:68}),te="headerBannerShownAt",tt=({minioUrl:e,className:t,mobileAppUrl:i})=>{let{fixedContainerRef:l,headerRef:s}=eq(),[c,h]=(0,m.useState)(!1),[v,g]=(0,m.useState)(!1),[f,w]=(0,m.useState)(!1),x=(0,m.useCallback)((e="desktop")=>{let t=l.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${e9[e]+eb.F[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${e9.desktop+eb.F.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${e9.mobile+eb.F.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${e9.mobile+eb.F.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${e9.desktop+eb.F.desktop}px`),document.documentElement.style.setProperty("--header-height",`${e9[e]+108}px`))},[]),_=(0,m.useCallback)(()=>{let e=l.current;e&&(document.documentElement.style.removeProperty("--fixed-header-height"),document.documentElement.style.removeProperty("--new-header-height-desktop"),document.documentElement.style.removeProperty("--new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-desktop"),document.documentElement.style.removeProperty("--header-height"),e.style.transform="")},[]);return(0,m.useEffect)(()=>{let e=s.current;if(!e)return;let t=()=>{v&&h(!1),w(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[v]),(0,m.useEffect)(()=>{let e;(!(e=(()=>{let e=localStorage.getItem(te);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t})())||Math.floor((e.getTime()-new Date().getTime())/864e5)>5)&&h(!0)},[]),(0,m.useEffect)(()=>{let e=window.innerWidth<768;c&&(x(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!0):w(!0));let t=()=>{if(!c)return null;x(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{_(),window.removeEventListener("resize",t)}},[c,x,_]),c?(0,n.jsx)("div",{id:"headerNotice",role:"region","aria-label":"Мобильное приложение","data-opening":f,className:(0,r.default)(e8.wrapper,t),children:(0,n.jsx)(o.Container,{children:(0,n.jsxs)("div",{className:e8.container,children:[(0,n.jsxs)("div",{className:e8.innerWrapper,children:[(0,n.jsxs)("picture",{className:e8.imageWrapper,children:[(0,n.jsx)("source",{srcSet:(0,a.joinURL)(e,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,n.jsx)("img",{className:e8.image,src:(0,a.joinURL)(e,"/logo/finuslugi/default-regular.svg")})]}),(0,n.jsxs)("div",{className:e8.scanQr,children:[(0,n.jsx)("div",{className:e8.title,children:"Скачайте приложение Финуслуги"}),(0,n.jsx)("div",{className:e8.description,children:"Сканируйте QR-код"})]}),(0,n.jsxs)("div",{className:e8.callToAction,children:[(0,n.jsxs)("div",{children:["Приложение",(0,n.jsx)("br",{}),"Финуслуги"]}),(0,n.jsx)(d.Button,{onClick:()=>{(0,eC.h)(u.D.button,"skachat_mob_prilozheniye_fu"),window.open(i,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,n.jsx)("div",{"aria-label":"Закрыть",role:"button",className:e8.closeButton,onClick:()=>{localStorage.setItem(te,new Date().toISOString()),_(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!1):g(!0)},children:(0,n.jsx)(p.IconFdsCloseO,{size:"100%"})})]})})}):null},tn=(0,c.g)("header-chat-modal-body","sc"),ti=Object.freeze({wrapper:`${tn}__wrapper`,cardButton:`${tn}__card-button`,card:`${tn}__card`,cardTitle:`${tn}__card-title`,cardSubtitle:`${tn}__card-subtitle`,button:`${tn}__button`}),tl=()=>{let e=eq();return(0,n.jsxs)("div",{className:ti.wrapper,children:[(0,n.jsx)(eY,{className:ti.cardButton,variant:"secondary",pending:e.isChatLoading,onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},eventActionText:"Напишите в чат",children:(0,n.jsxs)(s.Card,{className:ti.card,variant:"secondary",children:[(0,n.jsxs)("div",{className:ti.cardTitle,children:[(0,n.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,n.jsxs)("p",{className:ti.cardSubtitle,children:["Виртуальный ассистент доступен 24/7, ",(0,n.jsx)("br",{}),"операторы — с 6:00 до 23:59 мск"]})]})}),!1]})},ts=({data:e,isMobile:t})=>{let i=eq();return(0,n.jsx)("div",{className:eC.a.contentWrapper,children:e.map(e=>(0,n.jsx)(m.Fragment,{children:e.sections.map(e=>(0,n.jsxs)("div",{className:(0,r.default)(eC.a.content,{[eC.a.hidden]:i.openedSection!==e.id,[eC.a.contentOpen]:!!i.openedSection}),children:[(0,n.jsx)("div",{className:eC.a.contentHeader,children:(0,n.jsx)("label",{children:e.title})}),e.content.map((i,l)=>{var s,o;return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{children:(0,n.jsx)("a",{className:(0,r.default)(eC.a.contentTitle,{[eC.a.removed]:!i.title,[eC.a.contentTitleUrl]:!!i.url,[eC.a.contentTitleLink]:!!e.isSeeAllLinkAvailable,[eC.a.contentTitleNew]:!!i.new}),href:e.isSeeAllLinkAvailable?i.url:void 0,children:(0,n.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,n.jsx)("div",{className:eC.a.arrowIcon,children:(0,n.jsx)(p.IconFdsArrowUpRightSmallO,{})}),i.title]})})}),!(null!=(s=i.links)&&s.length)&&(0,n.jsx)(eC.N,{items:i.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(o=i.links)&&o.length)&&(0,n.jsx)("div",{className:(0,r.default)(eC.a.links,{[eC.a.linksColumns]:!!i.columns,[eC.a.linksTitleless]:!i.title}),children:i.links.map(e=>(0,n.jsxs)("a",{href:e.url,className:(0,r.default)({[eC.a.new]:!!e.new}),onClick:()=>(0,eC.h)(u.D.link,e.title,`${e.title}_${e.url}`),children:[(0,n.jsx)("div",{className:eC.a.arrowIcon,children:(0,n.jsx)(p.IconFdsArrowUpRightSmallO,{})}),(0,n.jsx)("span",{children:e.title})]},e.url))})]},`${i.url}_${l}`)})]},e.id))},e.id))})},to=(0,c.g)("navigation-section-icon","sc"),tr=Object.freeze({icon:`${to}`}),ta=({name:e,background:t})=>{let i=(0,m.useMemo)(()=>e&&p[e]||null,[e]);return e&&i?(0,n.jsx)("div",{className:tr.icon,style:{background:t},children:(0,n.jsx)(i,{})}):null},tc=(0,c.g)("navigation","sc"),td=Object.freeze({navigation:`${tc}`,navigationOpening:`${tc}--opening`,navigationClosing:`${tc}--closing`,wrapper:`${tc}__wrapper`,container:`${tc}__container`,containerOpen:`${tc}__container--open`,sections:`${tc}__sections`,sectionsOpen:`${tc}__sections--open`,citySelectButton:`${tc}__city-select-button`,sectionsTitle:`${tc}__sections-title`,sectionsWrapper:`${tc}__sections-wrapper`,section:`${tc}__section`,sectionArrow:`${tc}__section-arrow`,sectionExtra:`${tc}__section--extra`,sectionActive:`${tc}__section--active`,sectionTitle:`${tc}__section-title`,chatWrapper:`${tc}__chat-wrapper`,chatHeader:`${tc}__chat-header`,backButton:`${tc}__back-button`,useful:`${tc}__useful`,usefulOpen:`${tc}__useful--open`,usefulTitle:`${tc}__useful-title`,usefulGrid:`${tc}__useful-grid`,removed:`${tc}__removed`}),tu=({data:e})=>{var t;let i=eq(),l=eE(),s=(0,d.useBreakpointDown)("m"),[a,c]=(0,m.useState)(!0);(0,m.useEffect)(()=>{c(s)},[s]);let h=(0,m.useRef)(null),v=(0,m.useCallback)(()=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>i.openedSection?i.setOpenedSection(null):i.isNavigationOpen?i.setOpenedBlock(null):void 0,50)},[i]),g=(0,m.useRef)(!1),f=(0,m.useRef)(null),w=(0,m.useCallback)(()=>{a&&(g.current=!0,f.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),v()},window.history.pushState(null,"",window.location.href))},[v,a]),x=(0,m.useCallback)(()=>{g.current=!1,window.onpopstate=f.current,window.history.go(-1)},[]),_=(0,m.useRef)(null),j=(0,m.useCallback)(e=>{if(a||!i.navMenuItemsRef.current||!i.navigationRef.current)return;let t=e.target,n=!i.navMenuItemsRef.current.contains(t)&&!i.navigationRef.current.contains(t);if(n&&!_.current){i.setIgnoreClicks(),_.current=setTimeout(()=>i.setOpenedBlock(null),300);return}!n&&_.current&&(clearTimeout(_.current),_.current=null)},[a,i]),b=(0,m.useRef)(null),N=(0,m.useCallback)(e=>{typeof window>"u"||(e?(b.current=j,window.addEventListener("mousemove",b.current)):b.current&&window.removeEventListener("mousemove",b.current))},[j]);(0,m.useEffect)(()=>{N(i.isNavigationOpen),i.isNavigationOpen&&!g.current&&w(),!i.isNavigationOpen&&g.current&&x()},[i.isNavigationOpen]);let C=(e,t)=>()=>{(0,eC.h)(u.D.button,t),i.setOpenedSection(e)},{start:y,clear:$}=eM(),k=()=>{a||$()};return(0,n.jsx)("div",{ref:i.navigationRef,className:(0,r.default)(td.navigation,{[td.removed]:!i.isNavigationMounted,[td.navigationOpening]:i.isNavigationOpen,[td.navigationClosing]:!i.isNavigationOpen}),children:(0,n.jsx)("div",{className:td.wrapper,children:(0,n.jsxs)(o.Container,{className:(0,r.default)(td.container,{[td.containerOpen]:!!i.openedSection}),children:[(0,n.jsxs)("div",{className:(0,r.default)(td.sections,{[td.sectionsOpen]:!!i.openedSection}),children:[(0,n.jsx)(d.Button,{className:td.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>l.handleButtonClick(!1),iconLeft:(0,n.jsx)(p.IconFdsLocationO,{size:24}),label:(null==(t=l.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,n.jsxs)("ul",{className:(0,r.default)(td.sectionsWrapper,{[td.removed]:i.openedBlock!==e.id&&!a}),children:[(0,n.jsx)("div",{className:td.sectionsTitle,children:eb.b[e.id]}),e.sections.map(e=>{let t,l;return(0,n.jsxs)("li",{className:(0,r.default)(td.section,{[td.sectionExtra]:!!e.extra,[td.sectionActive]:i.openedSection===e.id}),onClick:C(e.id,e.title),onMouseEnter:(t=e.id,l=e.title,()=>{a||y(C(t,l),150)}),onMouseLeave:k,children:[(0,n.jsx)(ta,{name:e.uikitIcon,background:e.uikitIconBg}),(0,n.jsx)("span",{className:td.sectionTitle,children:e.title}),(0,n.jsx)("div",{className:td.sectionArrow,children:(0,n.jsx)(p.IconFdsChevronRightSmallO,{size:24})})]},e.id)})]},e.id)),(0,n.jsxs)("div",{className:td.chatWrapper,children:[(0,n.jsx)("div",{className:td.chatHeader,children:"Нужна помощь?"}),(0,n.jsx)(tl,{})]})]}),(0,n.jsxs)("button",{type:"button",className:(0,r.default)(td.backButton,{[td.removed]:!i.openedSection}),onClick:()=>{(0,eC.h)(u.D.button,"Назад"),i.setOpenedSection(null)},children:[(0,n.jsx)(p.IconFdsChevronLeftO,{size:24}),(0,n.jsx)("span",{children:"Назад"})]}),(0,n.jsx)(ts,{data:e,isMobile:a}),(0,n.jsxs)("div",{className:(0,r.default)(td.useful,{[td.usefulOpen]:!!i.openedSection}),children:[(0,n.jsx)("div",{className:td.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,n.jsx)(m.Fragment,{children:e.sections.map(e=>(0,n.jsx)("div",{className:(0,r.default)(td.usefulGrid,{[td.removed]:i.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,n.jsxs)("a",{href:e.url,onClick:()=>(0,eC.h)(u.D.link,e.title,`${e.title}_${e.url}`),children:[(0,n.jsx)("div",{children:(0,n.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id))},e.id))]})]})})})},tp=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:i="https://assets.finuslugi.ru/mp-assets",lkUrl:l="https://lk.finuslugi.ru/registration",initialTown:s,isMainBannerPage:c,enableAppHeaderBanner:h=!1,news:v,className:g})=>{let f=eq(),w=(0,m.useMemo)(()=>((e,t,n)=>{var i,l,s,o,r,c,d;let u=(null==(l=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex)?void 0:l.call(i,({id:e})=>"news"===e))||-1,p=(null==(o=null==(s=null==e?void 0:e.NAVIGATOR)?void 0:s[u])?void 0:o.content)||[];if(null!=(d=null==(c=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r[u])?void 0:c.content)&&d[0]&&Array.isArray(n)&&p.length){let i=n.map(({title:e,url:n})=>({title:e,url:(0,a.joinURL)(t||"",n),new:0}));e.NAVIGATOR[u].content[0].links=i}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]})(e,t,v),[e,t,v]),x=null==e?void 0:e.config,_=(0,m.useMemo)(()=>w.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[w]),j=f.isAuth?"Личный кабинет":"Войти",b=c&&f.isHeaderTransparent,N=(e,t,n,i)=>()=>{e!==f.openedBlock?(0,eC.h)(u.D.toggle,t,"on"):(0,eC.h)(u.D.button,"menu_close","on");let l=n?_[e]:"";f.setOpenedBlock(e,l,!!i)},{start:C,clear:y}=eM(),$=e=>()=>{f.ignoreClicks||e()};return e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{ref:f.headerRef,className:(0,r.default)(eb.s.header,g,{[eb.s.transparent]:b}),children:(0,n.jsxs)("div",{ref:f.fixedContainerRef,className:(0,r.default)(eb.s.fixed,{[eb.s.hidden]:f.isHeaderHidden,[eb.s.navigationOpen]:f.isNavigationOpen}),children:[!!(null!=x&&x.appBannerUrl)&&h&&(0,n.jsx)(tt,{mobileAppUrl:x.appBannerUrl,minioUrl:i}),(0,n.jsxs)(o.Container,{className:eb.s.container,children:[(0,n.jsxs)("div",{className:eb.s.leftRow,children:[(0,n.jsx)(e5,{className:eb.s.logo,href:t,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,n.jsxs)("picture",{children:[(0,n.jsx)("source",{srcSet:(0,a.joinURL)(i,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,n.jsx)("img",{src:(0,a.joinURL)(i,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,n.jsx)("nav",{ref:f.navMenuItemsRef,className:eb.s.menuItems,children:(0,n.jsx)("ul",{children:eb.c.map(({id:e,label:t})=>(0,n.jsx)("li",{children:(0,n.jsx)(d.Button,{className:(0,r.default)({[eb.s.menuItemActive]:f.openedBlock===e&&f.isNavigationOpen}),label:t,variant:"white",size:"xs",onClick:$(N(e,t,!0)),onMouseEnter:()=>{f.isNavigationOpen&&e===f.openedBlock||f.setIgnoreClicks(),C(N(e,t,!0,!0),200)},onMouseLeave:y})},e))})}),(0,n.jsx)(eY,{className:(0,r.default)(eb.s.tabletMenuButton,{[eb.s.menuItemActive]:f.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,n.jsx)(p.IconFdsChevronDownO,{size:24}),onClick:N("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,n.jsxs)("div",{className:(0,r.default)(eb.s.buttonGroup,{[eb.s.whiteIcons]:(null==x?void 0:x.iconColorOnMobileMainBanner)==="white"}),children:[(0,n.jsxs)("div",{className:eb.s.chips,children:[(0,n.jsx)(eY,{as:"a",href:l,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${l}`,iconLeft:(0,n.jsx)(p.IconFdsUserO,{size:20})}),(0,n.jsx)(eY,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,n.jsx)(p.IconFdsChatDotsCircleO,{size:24})})]}),(0,n.jsx)(eY,{className:eb.s.menuButton,size:"xs",shape:b?"icon":"default",appearance:b?"ghost":"fill",label:"Меню",onClick:N("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,n.jsx)(p.IconFdsMenuSkewedO,{size:24})}),(0,n.jsxs)("div",{className:eb.s.moreButtons,children:[(0,n.jsx)(e6,{initialTown:s}),(0,n.jsx)(eY,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,n.jsx)(p.IconFdsChatDotsSquareAddO,{size:24}),children:"Онлайн чат"}),(0,n.jsx)(eY,{as:"a",href:l,size:"xs",eventActionText:j,eventLabel:`${j}_${l}`,label:j})]})]}),(0,n.jsxs)(e5,{className:eb.s.auth,href:l,eventActionText:j,eventLabel:`${j}_${l}`,children:[(0,n.jsx)(eY,{size:"xs",shape:"circle-icon",iconLeft:(0,n.jsx)(p.IconFdsUserO,{}),eventActionText:j,eventLabel:`${j}_${l}`}),(0,n.jsx)("p",{children:j})]}),(0,n.jsx)("div",{className:eb.s.close,children:(0,n.jsx)(eY,{className:eb.s.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,n.jsx)(p.IconFdsCloseO,{}),onClick:()=>f.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,n.jsx)("div",{className:(0,r.default)(eb.s.overlay,{[eb.s.removed]:!f.isNavigationMounted,[eb.s.overlayOpening]:f.isNavigationOpen,[eb.s.overlayClosing]:!f.isNavigationOpen}),onClick:$(()=>f.setOpenedBlock(null))}),(0,n.jsx)(tu,{data:w,minioUrl:i})]}):null},tm=e=>(0,n.jsx)(eQ,{isMainBannerPage:e.isMainBannerPage,children:(0,n.jsx)(tp,{...e})}),th=(0,c.g)("page-layout","sc"),tv=Object.freeze({main:`${th}__main`}),tg=(0,i.default)(()=>e.A(56322).then(e=>e.CookiesPlate),{ssr:!1});e.s(["PageLayout",0,function({initialGeo:e,headerData:t,footerData:i,showStartGeoPopup:l=!1,children:s}){let{region:o,town:r}=e??{};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(eB,{showStartGeoPopup:l,initialRegion:o,initialTown:r,children:[t&&(0,n.jsx)(tm,{...t}),(0,n.jsx)("main",{className:tv.main,children:s}),i&&(0,n.jsx)(ej,{...i})]}),(0,n.jsx)(tg,{})]})}],71267)}]);

//# sourceMappingURL=0_tc2eh1ma9po.js.map