(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[699],{5775:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let i=n(7043);n(7437),n(2265);let l=i._(n(5602));function o(e,t){var n;let i={loading:e=>{let{error:t,isLoading:n,pastDelay:i}=e;return null}};"function"==typeof e&&(i.loader=e);let o={...i,...t};return(0,l.default)({...o,modules:null==(n=o.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1523:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}});let i=n(8993);function l(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new i.BailoutToCSRError(t);return n}},5602:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let i=n(7437),l=n(2265),o=n(1523),r=n(49);function s(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},c=function(e){let t={...a,...e},n=(0,l.lazy)(()=>t.loader().then(s)),c=t.loading;function u(e){let s=c?(0,i.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,a=t.ssr?(0,i.jsxs)(i.Fragment,{children:["undefined"==typeof window?(0,i.jsx)(r.PreloadCss,{moduleIds:t.modules}):null,(0,i.jsx)(n,{...e})]}):(0,i.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,i.jsx)(n,{...e})});return(0,i.jsx)(l.Suspense,{fallback:s,children:a})}return u.displayName="LoadableComponent",u}},49:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return o}});let i=n(7437),l=n(544);function o(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,l.getExpectedRequestStore)("next/dynamic css"),o=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));o.push(...t)}}return 0===o.length?null:(0,i.jsx)(i.Fragment,{children:o.map(e=>(0,i.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},6583:function(){},7565:function(){},6034:function(){},631:function(e,t,n){"use strict";function i(){return typeof window>"u"}function l(e){i()||(Array.isArray(window.dataLayer)?window.dataLayer.push(e):console.log("window.dataLayer does not exist"),Array.isArray(window._mtm)?window._mtm.push(e):console.log("window._mtm does not exist"))}function o(){if(i()){console.warn("Cant initialize tag manager on server side");return}"function"!=typeof window._init_gtm?console.warn("Cant init GTM, please check if GTM script exists"):window._init_gtm(),"function"!=typeof window._init_mtm?console.warn("Cant init MTM, please check if MTM script exists"):window._init_mtm()}n.d(t,{AB:function(){return l},zK:function(){return o}})},2778:function(e,t,n){"use strict";n.d(t,{L:function(){return a},g:function(){return s}});var i=n(2265),l=n(631);let o=null,r=e=>{o=e},s=()=>o,a=e=>{let{env:t}=e,n=(0,i.useRef)(!1);return n.current||(r(t),n.current=!0),(0,i.useEffect)(()=>{"production"===t.NODE_ENV&&(0,l.zK)()},[t.NODE_ENV]),null}},2074:function(e,t,n){"use strict";function i(e,t){return`finkit-widgets-${t}-${e}`}n.d(t,{g:function(){return i}})},5487:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});let i={getItem:e=>{if(typeof document>"u")return null;let t=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return t?t.split("=")[1]??null:null},setItem:(e,t,n={})=>{if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let i=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;for(let e in n){if(!n.hasOwnProperty(e))continue;i+=`; ${e}`;let t=n[e];!0!==t&&(i+=`=${t}`)}document.cookie=i},removeItem:e=>{i.setItem(e,"",{"max-age":-1})}}},6554:function(e,t,n){"use strict";let i;n.d(t,{D:function(){return r},h:function(){return a}});var l=n(1620),o=n(6891),r=((i=r||{}).icon="icon",i.chip="chip",i.accordion="accordion",i.button="button",i.checkbox="checkbox",i.radio="radio",i.select="select",i.toggle="toggle",i.tooltip="tooltip",i.link="link",i.banner="banner",i.tag="tag",i.date="date",i.field="field",i.offer="offer",i.tab="tab",i.submitButton="submitButton",i.popup="popup",i.block="block",i);let s={icon:"click_icon_",chip:"click_chip_",accordion:"show_acc_",button:"click_button_",checkbox:"click_check_",radio:"click_radio_",select:"click_sel_",toggle:"click_togg_",tooltip:"click_tip_",link:"click_link_",banner:"click_bnr_",tag:"click_tag_",date:"input_date_",field:"input_field_",offer:"click_offer_",tab:"click_tab_",submitButton:"form_button_",popup:"show_pop_up_",block:"click_block_"},a=({eventCategory:e,eventActionType:t,eventActionText:n="",eventLabel:i})=>{let r={event:"data-event",eventCategory:e,eventAction:s[t]+(0,l.t)(n)};void 0!==i&&(r.eventLabel=(0,l.t)("string"==typeof i?i:i.toString())),(0,o.d)(r)}},6891:function(e,t,n){"use strict";n.d(t,{d:function(){return l}});var i=n(631);let l=(e,t)=>{if(typeof window>"u")return;let n=sessionStorage.getItem("pushedEvents"),l=n?JSON.parse(n):[];e.event||(e.event="data-event"),"string"==typeof e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_")),e.eventLabel||(e.eventLabel="undefined");let o=l.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!o){if(t){let t={...e};t.url=window.location.pathname,l.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(l))}(0,i.AB)(e)}}},1620:function(e,t,n){"use strict";n.d(t,{t:function(){return l}});let i={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},l=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in i?i[t]:e}).replaceAll(/[ \u00A0]/g,"_")},8e3:function(e,t,n){"use strict";let i;n.d(t,{PageLayout:function(){return tY}});var l=n(7437),o=n(5775),r=n.n(o),s=n(5563),a=n(4365);let c=/^\.?\//;function u(e,...t){let n=e||"";for(let e of t.filter(e=>e&&"/"!==e))if(n){let t=e.replace(c,"");n=function(e="",t){return e.endsWith("/")?e:e+"/"}(n)+t}else n=e;return n}Symbol.for("ufo:protocolRelative");var d=n(2074),p=n(5461),m=n(6554),h=n(684),f=n(2265),v=n(4887);let g=300,w=({opened:e})=>{let[t,n]=(0,f.useState)(!1),i=(0,f.useRef)(null),l=(0,f.useRef)(!1);return(0,f.useEffect)(()=>(e&&!l.current?(l.current=!0,n(!0)):!e&&l.current&&(i.current=setTimeout(()=>{l.current=!1,n(!1)},g)),()=>{i.current&&clearTimeout(i.current)}),[e]),{mounted:t}},_=(0,d.g)("click-outside","sc"),x=Object.freeze({overlay:`${_}__overlay`,open:`${_}--open`,close:`${_}--close`}),b=({onClose:e,onToucheMove:t,isOpen:n,delay:i=g})=>{let o=(0,f.useRef)(null),r=(0,f.useCallback)(()=>{e&&(o.current=setTimeout(()=>{e()},i))},[i,e]),s=(0,f.useCallback)(e=>{"Escape"===e.key&&r()},[r]);return(0,f.useEffect)(()=>(n&&window.addEventListener("keydown",s),()=>{o.current&&clearTimeout(o.current),window.removeEventListener("keydown",s)}),[n,s]),(0,l.jsx)("div",{className:(0,a.Z)(x.overlay,{[x.open]:n,[x.close]:!n}),onTouchStart:t,onClick:r})},j=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},y=e=>{e.style.top||(window.prevScrollPosition=window.scrollY)},$=(e,t,n)=>{t.style.setProperty("overflow-y","scroll"),e.classList.toggle("scroll-disable-windows",!0),e.style.setProperty("width",`calc(100vw - ${n}px)`),e.style.setProperty("top",`-${window.prevScrollPosition}px`)},N=e=>{e.style.setProperty("overflow","hidden"),e.style.setProperty("height","100vh")},k=e=>{e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},C=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},O=()=>document.querySelectorAll("[data-portal]").length>1,T=e=>{let t=(0,f.useRef)(null),n=(0,f.useRef)(!1);return(0,f.useEffect)(()=>{if(n.current===e)return;n.current=e;let i=t.current,l=document.body,o=document.documentElement,r=window.innerWidth-o.clientWidth,s=r>0;if(e&&s)y(l),$(l,o,r),j(i,!0);else if(e)N(l),j(i,!0);else{let e=!O();e&&k(l),e&&C(),j(i,!1)}return()=>{let e=!O();e&&k(l),e&&C()}},[e]),t},S=(0,d.g)("drawer-footer","sc"),A=Object.freeze({footer:`${S}__footer`,hasScroll:`${S}__footer--has-scroll`}),I=({footer:e,hasScroll:t,className:n})=>(0,l.jsx)("div",{className:(0,a.Z)(A.footer,{[A.hasScroll]:t},n),children:"function"==typeof e?e():e}),L=(0,d.g)("drawer-content","sc"),R=Object.freeze({container:`${L}__container`,open:`${L}--open`,close:`${L}--close`,header:`${L}__header`,rowHeader:`${L}__header--row`,title:`${L}__title`,center:`${L}__title--center`,left:`${L}__title--left`,right:`${L}__title--right`,controlContainer:`${L}__control-container`,content:`${L}__content`,footer:`${L}__footer`}),z=({onClose:e,onContentClick:t,children:n,title:i,rowTitle:o,titleAlign:r,isCloseable:s,footer:c,closeButton:u,isOpen:d,contentClassName:p,footerClassName:m,contentStyle:v,width:g})=>{let w=(0,f.useRef)(null),_=(0,f.useRef)(null),[x,b]=(0,f.useState)(!1);(0,f.useEffect)(()=>{var e;if(!_.current||!w.current)return;let t=(null==(e=null==_?void 0:_.current)?void 0:e.getBoundingClientRect().top)||0,n=null==w?void 0:w.current,i=()=>{let e=null==_?void 0:_.current;e&&b(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",i,!1),()=>{null==n||n.removeEventListener("scroll",i,!1)}},[]);let j=v||g?{width:g,...v||{}}:void 0;return(0,l.jsxs)("div",{ref:w,style:j,className:(0,a.Z)(R.container,{[R.open]:d,[R.close]:!d},p),children:[i||s?(0,l.jsxs)("div",{className:(0,a.Z)(R.header,{[R.rowHeader]:o}),children:[s?u?"function"==typeof u?u():u:(0,l.jsx)("button",{type:"button",className:R.controlContainer,onClick:e,children:(0,l.jsx)(h.IconFdsCloseO,{size:24})}):null,i?(0,l.jsx)("h3",{className:(0,a.Z)(R.title,{[R[r]]:!0}),children:i}):null]}):null,(0,l.jsx)("div",{ref:_,className:R.content,onClick:t,children:n}),c&&(0,l.jsx)(I,{className:(0,a.Z)(R.footer,m),footer:c,hasScroll:x})]})},P=(0,d.g)("drawer-layout","sc"),E=Object.freeze({window:`${P}__window`}),M=({onClose:e,isOpen:t,children:n,withDisabledScroll:i,className:o,...r})=>{let s=(0,f.useCallback)(e=>e.stopPropagation(),[]);return T(t&&i),(0,l.jsxs)("div",{"data-portal":!0,className:(0,a.Z)(E.window,o),children:[(0,l.jsx)(b,{onClose:e,isOpen:t,delay:0}),(0,l.jsx)(z,{onContentClick:s,onClose:e,isOpen:t,...r,children:n})]})},B=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:i=!0,withDisabledScroll:o=!0,...r})=>{let{mounted:s}=w({opened:e});return s?(0,l.jsx)(M,{titleAlign:n,isCloseable:i,isOpen:e,withDisabledScroll:o,...r,children:t}):null};B.displayName="Drawer";let U=(0,d.g)("mobile-modal-footer","sc"),D=Object.freeze({footer:`${U}__footer`,footerWithoutShadow:`${U}__footer--without-shadow`}),W=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,l.jsx)("div",{className:(0,a.Z)(D.footer,t&&D.footerWithoutShadow,n),children:"function"==typeof e?e():e}),F=(0,d.g)("mobile-popup","sc"),Z=Object.freeze({mobilePopup:`${F}`,mobilePopupOpen:`${F}--open`,content:`${F}__content`,contentFull:`${F}__content--full`,contentTransition:`${F}__content--transition`,contentTransitionOpen:`${F}__content--transition-open`,contentLine:`${F}__content-line`,contentContainer:`${F}__content-container`,smallContentContainer:`${F}__content-container--small`,min:`${F}__content-container--min`,title:`${F}__title`,closeContainer:`${F}__close-container`,closeButton:`${F}__close-button`}),G=({children:e,footer:t,isOpen:n,isSmallPopup:i,onClose:o,hasCloseButton:r=!0,full:s,touchDistance:c=100,withDisabledScroll:u=!0,contentClassName:d,className:p,title:m,closeButton:v,footerClassName:g})=>{let[w,_]=(0,f.useState)(!1),[x,j]=(0,f.useState)(!1),[y,$]=(0,f.useState)(!0),[N,k]=(0,f.useState)("120%"),C=(0,f.useRef)(null),O=(0,f.useRef)(0),S=(0,f.useRef)(!1),A=e=>{var t,n,i;let l=null==(t=C.current)?void 0:t.offsetTop,o=null==(n=C.current)?void 0:n.offsetHeight;if(S.current=!0,$(!1),l&&o){let t=(null==(i=null==e?void 0:e.touches[0])?void 0:i.clientY)-l,n=0;t>=0&&t<=o+30&&(n=t),t>o+30&&(n=o+30),k(`${n}px`),O.current=n}},I=()=>{S.current&&(O.current>c&&o?null==o||o():k("0"),$(!0),S.current=!1),window.removeEventListener("touchmove",A),window.removeEventListener("touchend",I)};return(0,f.useEffect)(()=>{n&&setTimeout(()=>{_(!0),j(!0),k("0")},100),!n&&x&&(k("120%"),_(!1),j(!1))},[x,n]),T(n&&u),(0,l.jsxs)("div",{"data-portal":!0,className:(0,a.Z)(Z.mobilePopup,x&&Z.mobilePopupOpen,p),children:[(0,l.jsx)(b,{onClose:()=>{n&&(null==o||o())},onToucheMove:()=>{n&&(_(!1),window.addEventListener("touchmove",A),window.addEventListener("touchend",I))},isOpen:n,delay:0}),(0,l.jsxs)("div",{className:(0,a.Z)(Z.content,s&&Z.contentFull,y&&Z.contentTransition,y&&w&&Z.contentTransitionOpen),ref:C,style:{transform:`translateY(${N})`},children:[(0,l.jsx)("div",{className:Z.contentLine}),(0,l.jsxs)("div",{className:(0,a.Z)(Z.contentContainer,i&&Z.smallContentContainer,{[Z.min]:!m&&!r},d),children:[!!m&&(0,l.jsx)("div",{className:Z.title,children:m}),r?(0,l.jsx)("div",{className:Z.closeContainer,children:r?v?"function"==typeof v?v():v:(0,l.jsx)("button",{onClick:o,className:Z.closeButton,children:(0,l.jsx)(h.IconFdsCloseO,{size:24})}):null}):null,e]}),t&&(0,l.jsx)(W,{footerClassName:g,isSmallPopup:i,footer:t})]})]})},V=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...i})=>{let{mounted:o}=w({opened:n});return o?(0,l.jsx)(G,{isSmallPopup:t,isOpen:n,...i,children:e}):null};V.displayName="UiMobilePopup";let H=({children:e,id:t="portal-root"})=>{let[n,i]=(0,f.useState)(null);return(0,f.useEffect)(()=>{let e=document.getElementById(t);if(e){i(e);return}let n=document.createElement("div");return n.id=t,document.body.appendChild(n),i(n),()=>{document.body.removeChild(n)}},[t]),n?(0,v.createPortal)(e,n):null},q=(0,d.g)("footer-contacts-block","sc"),J=Object.freeze({contactsWrapper:`${q}__contacts-wrapper`,gray:`${q}__gray`,phones:`${q}__phones`,contactsButtons:`${q}__contacts-buttons`,vkIcon:`${q}__vk-icon`,tgIcon:`${q}__tg-icon`,dzenIcon:`${q}__dzen-icon`,maxIcon:`${q}__max-icon`,link:`${q}__link`}),Q=(0,d.g)("footer","sc"),Y=Object.freeze({wrapper:`${Q}__wrapper`,section:`${Q}__section`,container:`${Q}__container`,top:`${Q}__top`,main:`${Q}__main`,links:`${Q}__links`,disclaimer:`${Q}__disclaimer`,bottom:`${Q}__bottom`,bottomLinks:`${Q}__bottom-links`,bottomDisclaimer:`${Q}__bottom-disclaimer`,compact:`${Q}__wrapper--compact`,white:`${Q}__wrapper--white`}),K="finkit-widgets-sc-footer",X=[{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"}],ee=[...X,{title:"Онлайн чат",url:void 0}],et=[{type:"vk",className:J.vkIcon,iconName:"vk"},{type:"telegramChannel",className:J.tgIcon,iconName:"telegram"},{type:"dzen",className:J.dzenIcon,iconName:"dzen"},{type:"max",className:J.maxIcon,iconName:"max"}],en=(0,l.jsxs)("p",{children:["На сайте finuslugi.ru предоставляются услуги оператора финансовой платформы ПАО Московская Биржа, а также услуги ООО \xabМБ Маркетплейс\xbb, организации, не являющейся оператором финансовой платформы в соответствии с Федеральным законом от 20.07.2020 №211-ФЗ \xabО совершении финансовых сделок с использованием финансовой платформы\xbb. Услуги оператора финансовой платформы ПАО Московская Биржа обозначены пометкой \xabОткрытие онлайн на Финуслугах\xbb. Иная информация на сайте www.finuslugi.ru считается размещенной ООО \xabМБ Маркетплейс\xbb, если иное явно не следует из существа размещаемой информации. ООО \xabМБ Маркетплейс\xbb входит в Группу \xabМосковская Биржа\xbb.",(0,l.jsx)("br",{}),(0,l.jsx)("br",{}),"Группа \xabМосковская Биржа\xbb - ПАО Московская Биржа и юридические лица, находящиеся под прямым или косвенным контролем ПАО Московская Биржа."]}),ei=({onClick:e,eventActionText:t,eventLabel:n,...i})=>(0,l.jsx)(p.zx,{onClick:i=>{null==e||e(i),(0,m.h)({eventCategory:K,eventActionType:m.D.button,eventActionText:t||"",eventLabel:n})},...i}),el=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,chat:o,...r})=>(0,l.jsx)(p.rU,{onClick:l=>{var r,s,a;null==e||e(l),o&&(null==l||l.preventDefault(),null==(a=null==(s=null==(r=null==window?void 0:window.supportWidget)?void 0:r.craftTalk)?void 0:s.open)||a.call(s)),(0,m.h)({eventCategory:K,eventActionType:t||m.D.link,eventActionText:n||"",eventLabel:i})},...r}),eo=({minioUrl:e,blogs:t})=>(0,l.jsxs)("div",{className:J.contactsWrapper,children:[(0,l.jsx)(s.xv,{className:J.gray,size:"16",weight:"regular",children:"Звоните или пишите"}),(0,l.jsx)("div",{className:J.phones,children:ee.map(({title:e,url:t})=>(0,l.jsx)(el,{href:t,eventActionText:e,chat:!t,children:e},e))}),(0,l.jsx)(s.xv,{className:J.gray,size:"16",weight:"regular",children:"Следите за нами в соцсетях"}),(0,l.jsx)("div",{className:J.contactsButtons,children:et.map(({type:n,className:i,iconName:o})=>(0,l.jsx)(ei,{as:"a",href:null==t?void 0:t[n],target:"_blank",className:i,iconRight:(0,l.jsx)("img",{width:24,height:24,src:u(e,`/widgets/footer/${o}.svg`),alt:n,loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:n,eventLabel:null==t?void 0:t[n]},n))}),(0,l.jsx)(s.xv,{className:J.gray,size:"16",weight:"regular",children:"Канал для инвесторов"}),(0,l.jsx)("div",{className:J.contactsButtons,children:(0,l.jsxs)(el,{href:null==t?void 0:t.investTg,target:"_blank",className:J.link,eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg,children:[(0,l.jsx)(ei,{className:J.tgIcon,iconRight:(0,l.jsx)("img",{width:24,height:24,src:u(e,"/widgets/footer/telegram.svg"),alt:"telegram",loading:"lazy"}),shape:"circle-icon",variant:"white",eventActionText:"telegram",eventLabel:null==t?void 0:t.investTg}),"Финуслуги Инвест"]})})]}),er=(0,d.g)("footer-disclaimer","sc"),es=Object.freeze({disclaimer:`${er}`}),ea=e=>{let t=e=>{e.target instanceof HTMLAnchorElement&&(0,m.h)({eventCategory:K,eventActionType:m.D.link,eventActionText:e.target.textContent||"",eventLabel:e.target.href})};return e.disclaimer?(0,l.jsx)("div",{className:(0,a.Z)(e.className,es.disclaimer),dangerouslySetInnerHTML:{__html:e.disclaimer||""},onClick:t}):(0,l.jsx)("div",{className:(0,a.Z)(e.className,es.disclaimer),onClick:t,children:e.children})},ec=()=>{let e=new URL(window.location.href),t=new URLSearchParams;return e.searchParams.forEach((e,n)=>{/^utm_/i.test(n)&&t.set(n,e)}),t},eu=(e="")=>{let[t,n]=(0,f.useState)(e);return(0,f.useEffect)(()=>{let t=ec();if(!t||0===t.size)return;let[i,l=""]=e.split("?"),o=new URLSearchParams(l);t.forEach((e,t)=>{o.has(t)||o.set(t,e)});let r=o.toString();n(r?`${i}?${r}`:i)},[e]),t},ed=(0,d.g)("footer-modal-body","sc"),ep=Object.freeze({wrapper:`${ed}__wrapper`,title:`${ed}__title`,item:`${ed}__item`,label:`${ed}__label`,button:`${ed}__button`,description:`${ed}__description`}),em=({directions:e})=>(0,l.jsxs)("div",{className:ep.wrapper,children:[(0,l.jsx)("div",{className:ep.title,children:"Направления"}),e.map(e=>(0,l.jsxs)(el,{className:ep.item,href:e.url,target:"_blank",eventActionText:e.name,eventLabel:`${e.name}_${e.url}`,children:[(0,l.jsxs)("div",{className:ep.label,children:[(0,l.jsx)("span",{children:e.name}),(0,l.jsx)(ei,{className:ep.button,iconRight:(0,l.jsx)(h.IconFdsArrowUpRightSmallO,{size:28}),shape:"circle-icon",eventActionText:"IconFdsArrowUpRightSmallO"})]}),(0,l.jsx)("p",{className:ep.description,children:e.description})]},e.url))]}),eh=(0,d.g)("footer-popup","sc"),ef=Object.freeze({wrapper:`${eh}__wrapper`,button:`${eh}__button`,icon:`${eh}__icon`,buttonWrapper:`${eh}__button-wrapper`}),ev=({directions:e})=>{let t=(0,p._m)("l"),[n,i]=(0,f.useState)(!1),o=()=>{i(!1)};return(0,l.jsxs)("div",{className:ef.wrapper,children:[(0,l.jsx)("div",{className:ef.buttonWrapper,children:(0,l.jsx)(ei,{className:ef.button,appearance:"ghost",variant:"white",onClick:()=>{i(!0)},label:"Все направления",eventActionText:"Все направления",iconLeft:(0,l.jsx)("div",{className:ef.icon,children:[1,2,3,4,5,6,7,8,9].map(e=>(0,l.jsx)("div",{},e))})})}),(0,l.jsxs)(H,{children:[!t&&(0,l.jsx)(V,{isOpen:n,onClose:o,full:!0,children:(0,l.jsx)(em,{directions:e})}),t&&(0,l.jsx)(B,{isOpen:n,onClose:o,width:"804px",children:(0,l.jsx)(em,{directions:e})})]})]})},eg=(0,d.g)("footer-left-column","sc"),ew=Object.freeze({leftColumn:`${eg}__left-column`,logoWrapper:`${eg}__logo-wrapper`,banner:`${eg}__banner`,mobAppLink:`${eg}__mob-app-link`,br:`${eg}__br`}),e_=({showcaseUrl:e,minioUrl:t,directions:n,mobAppUrl:i})=>{let o=eu(i);return(0,l.jsxs)("div",{className:ew.leftColumn,children:[(0,l.jsx)(el,{className:ew.logoWrapper,href:e,eventActionType:m.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:(0,l.jsx)("img",{src:u(t,"/widgets/footer/finuslugi_base_logo.svg"),alt:"finuslugi logo",loading:"lazy"})}),(0,l.jsx)(ev,{directions:n??[]}),(0,l.jsx)(el,{href:o,target:"_blank",eventActionType:m.D.banner,eventActionText:"Управляйте финансами через приложение Финуслуг",eventLabel:o,className:ew.mobAppLink,children:(0,l.jsxs)(s.Zb,{className:ew.banner,children:[(0,l.jsxs)(s.xv,{weight:"medium",children:["Управляйте финансами",(0,l.jsx)("br",{}),"через приложение",(0,l.jsx)("br",{className:ew.br})," Финуслуг"]}),(0,l.jsx)(ei,{iconRight:(0,l.jsx)(h.IconFdsArrowUpRightSmallO,{size:32}),shape:"circle-icon",variant:"white",eventActionText:"IconFdsArrowUpRightSmallO"}),(0,l.jsxs)("picture",{children:[(0,l.jsx)("source",{srcSet:u(t,"/widgets/footer/apps_d.webp"),media:"(min-width: 1024px)"}),(0,l.jsx)("img",{src:u(t,"/widgets/footer/apps_m.webp"),alt:"иллюстрация мобильного приложения",loading:"lazy"})]})]})})]})},ex=(0,d.g)("footer-logo","sc"),eb=Object.freeze({wrapper:`${ex}__wrapper`,link:`${ex}__link`,fromMoex:`${ex}__from-moex`,logo:`${ex}__logo`,white:`${ex}__wrapper--white`}),ej=({showcaseUrl:e,minioUrl:t,isWhite:n})=>(0,l.jsx)("div",{className:(0,a.Z)(eb.wrapper,{[eb.white]:n}),children:(0,l.jsxs)(el,{className:eb.link,href:e,eventActionType:m.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${e}`,children:[(0,l.jsx)("img",{className:eb.logo,src:`${t}/images/logo-brandmark-common-finuslugi.svg`}),(0,l.jsx)("img",{className:eb.fromMoex,src:`${t}/images/fromMoex.svg`})]})});var ey=((i=ey||{}).BLACK="black",i.GRAY="gray",i);let e$=(0,d.g)("footer-warning","sc"),eN=Object.freeze({reservedSpace:`${e$}__reserved-space`,wrapper:`${e$}__wrapper`,wrapperGray:`${e$}__wrapper--gray`,fixed:`${e$}__wrapper--fixed`,container:`${e$}__container`,text:`${e$}__text`,invisibleText:`${e$}__text--invisible`}),ek=({text:e,variant:t,fixed:n,isPlaceholder:i})=>(0,l.jsx)("div",{className:(0,a.Z)(eN.wrapper,{[eN.wrapperGray]:"gray"===t,[eN.fixed]:n&&!i}),children:(0,l.jsx)(s.W2,{className:eN.container,children:(0,l.jsx)("div",{className:(0,a.Z)(eN.text,{[eN.invisibleText]:i}),dangerouslySetInnerHTML:{__html:e}})})}),eC=({warning:e})=>{let t="string"==typeof e?{text:e}:e,n={text:t.text,fixed:t.fixed??!0,variant:t.variant??ey.BLACK};return(0,l.jsxs)("div",{className:eN.reservedSpace,children:[(0,l.jsx)(ek,{...n,isPlaceholder:n.fixed}),n.fixed&&(0,l.jsx)(ek,{...n,fixed:!0})]})},eO=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",customDisclaimer:i,variant:o="default",className:r})=>{var c,u;let d=!i&&null!=e&&e.disclaimer?e.disclaimer:void 0,p=o.includes("compact"),m=o.includes("white"),h=null==(c=null==e?void 0:e.bottom)?void 0:c.concat(p?X:[]),f=e&&"warning"in e?e.warning:void 0;return e?(0,l.jsx)("footer",{className:(0,a.Z)(Y.wrapper,r,{[Y.compact]:p,[Y.white]:m}),children:(0,l.jsxs)("section",{className:Y.section,children:[(0,l.jsxs)(s.W2,{className:Y.container,children:[!p&&(0,l.jsx)(e_,{showcaseUrl:t,minioUrl:n,directions:null==e?void 0:e.directions,mobAppUrl:null==e?void 0:e.mobAppUrl}),(0,l.jsx)("div",{className:Y.wrapper,children:(0,l.jsxs)("div",{className:Y.top,children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:Y.main,children:[!p&&(0,l.jsx)("div",{className:Y.links,children:null==(u=null==e?void 0:e.top)?void 0:u.map(e=>(0,l.jsx)(el,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),p&&(0,l.jsx)(ej,{showcaseUrl:t,minioUrl:n,isWhite:m}),(0,l.jsx)(ea,{className:Y.disclaimer,disclaimer:d,children:i||en})]}),(0,l.jsxs)("div",{className:Y.bottom,children:[(0,l.jsx)("div",{className:Y.bottomLinks,children:null==h?void 0:h.map(e=>(0,l.jsx)(el,{href:e.url,eventActionText:e.title,eventLabel:e.url,children:e.title},e.url))}),(0,l.jsx)(ea,{className:Y.bottomDisclaimer,disclaimer:null==e?void 0:e.bottomDisclaimer})]})]}),!p&&(0,l.jsx)(eo,{minioUrl:n,blogs:null==e?void 0:e.blogs})]})})]}),p&&!!f&&(0,l.jsx)(eC,{warning:f})]})}):null},eT=(0,d.g)("header","sc"),eS=Object.freeze({header:`${eT}`,fixed:`${eT}__fixed`,hidden:`${eT}__fixed--hidden`,transparent:`${eT}--transparent`,navigationOpen:`${eT}__navigation-open`,container:`${eT}__container`,leftRow:`${eT}__left-row`,logo:`${eT}__logo`,menuItems:`${eT}__menu-items`,menuItemActive:`${eT}__menu-item-active`,tabletMenuButton:`${eT}__tablet-menu-button`,buttonGroup:`${eT}__button-group`,chips:`${eT}__chips`,menuButton:`${eT}__menu-button`,moreButtons:`${eT}__more-buttons`,auth:`${eT}__auth`,whiteIcons:`${eT}__white-icons`,close:`${eT}__close`,removed:`${eT}__removed`,overlay:`${eT}__overlay`,overlayOpening:`${eT}__overlay--opening`,overlayClosing:`${eT}__overlay--closing`}),eA="user_region",eI="user_town",eL="cb-header",eR=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],ez=eR.reduce((e,t)=>(e[t.id]=t.label,e),{}),eP=Object.freeze({mobile:56,desktop:80});var eE=n(5487);let eM=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,o=0,r=0,s=()=>window.innerWidth<768,a=s(),c=()=>window.scrollY||document.documentElement.scrollTop,u=()=>{let e=document.querySelector(":root");e&&(r=parseFloat(window.getComputedStyle(e).getPropertyValue("--fixed-header-height")),o=c())},d=()=>{let e=s();e!==a&&(a=e,r=0)},p=function(){let s=c(),a=document.getElementById("headerNotice"),d=null==a?void 0:a.getAttribute("data-opening");if("true"===d)return;r||u();let p=s<r,m=s<((null==i?void 0:i.clientHeight)||0);if(n&&m||p){l=!1,e(!1),t(!0);return}e(l=s>o),l&&setTimeout(()=>t(!1),50);let h=l?"0px":"false"===d?`${r}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",h),document.documentElement.style.setProperty("--new-header-height-mobile",h),o=s<=0?0:s};return window.addEventListener("scroll",p),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d)}},eB=()=>{let e=new URLSearchParams(window.location.search),t={};for(let[n,i]of Array.from(e.entries()))n.startsWith("utm_")&&(t[n]=i);return Object.keys(t).length>0?t:null},eU=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),eD=(e,t,n)=>{let i=new Date;i.setTime(i.getTime()+864e5*n);let l=encodeURIComponent(JSON.stringify(t)),o=`;domain=.${window.location.hostname}`;document.cookie=`${e}=${l};expires=${i.toUTCString()};path=/;SameSite=Lax${o}`},eW=()=>{let e=eB();e&&!eU()&&eD("utm_params",e,90),e&&eD("utm_last",e,90)},eF=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{eW()}catch(e){console.error("UTM tracking error:",e)}},0)},eZ=(e,t,n)=>(0,m.h)({eventCategory:eL,eventActionType:e,eventActionText:t,eventLabel:n}),eG=(0,d.g)("navigation-chips","sc"),eV=Object.freeze({wrapper:`${eG}__wrapper`,gray:`${eG}__variantGray`,white:`${eG}__variantWhite`,container:`${eG}__container`,chip:`${eG}__chip`,more:`${eG}__chip--more`,active:`${eG}__chip--active`,label:`${eG}__label`,hidden:`${eG}__hidden`}),eH=(0,d.g)("navigation-content","sc"),eq=Object.freeze({contentWrapper:`${eH}__content-wrapper`,content:`${eH}__content`,contentOpen:`${eH}__content--open`,contentHeader:`${eH}__content-header`,contentTitle:`${eH}__content-title`,contentTitleUrl:`${eH}__content-title--url`,contentTitleLink:`${eH}__content-title--link`,contentTitleNew:`${eH}__content-title--new`,new:`${eH}__new`,vip:`${eH}__vip`,arrowIcon:`${eH}__arrow-icon`,links:`${eH}__links`,linksColumns:`${eH}__links--columns`,linksTitleless:`${eH}__links--titleless`,removed:`${eH}__removed`,hidden:`${eH}__content--hidden`}),eJ=({chip:e,hidden:t,onClick:n,refCallback:i,activeChipId:o})=>{let r=!!n,s=()=>{if(r)return null==n?void 0:n(e.url);eZ(m.D.chip,e.title,`${e.title}_${e.url}`)},c=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:eV.label,children:e.title}),e.arrow&&(0,l.jsx)(h.IconFdsArrowUpRightSmallO,{size:24})]}),u=(0,a.Z)(eV.chip,{[eV.hidden]:t,[eq.new]:!!e.new,[eq.vip]:!!e.vip,[eV.active]:e.url===o});return r?(0,l.jsx)("button",{type:"button",className:u,onClick:s,ref:i,children:c}):(0,l.jsx)("a",{href:e.url,className:u,onClick:s,ref:i,children:c})},eQ=({items:e=[],maxNumberOfLines:t,variant:n,className:i,activeChipId:o,onClick:r})=>{let s=(0,f.useRef)(null),c=(0,f.useRef)(null),u=(0,f.useRef)({}),[d,p]=(0,f.useState)(!1),[v,g]=(0,f.useState)(e.length),[w,_]=(0,f.useState)(!1);(0,f.useMemo)(()=>{let t=u.current;e.forEach(e=>{e.url in t||(t[e.url]=null)}),Object.keys(t).forEach(n=>{e.find(e=>String(e.url)===String(n))||delete t[n]})},[e]);let x=(0,f.useCallback)(()=>{let n=s.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,l=i(n),o=Math.max(Number(t)||0,0),r=()=>{g(e.length),_(!1)};if(d||0===o||l<=0){r();return}let a=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),p=i(c.current),m=e.map(e=>i(u.current[e.url]));if(m.some(e=>0===e)){r();return}let h=1,f=0,v=0;for(let e of m){let t=h===o?p+a:0,n=0===f?e:f+a+e;if(n+t<=l-.5)f=n,v++;else{if(++h>o)break;f=e,v++}}_(v<e.length),g(v)},[d,e,t]);(0,f.useLayoutEffect)(()=>{let e=s.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(x)});return t.observe(e),requestAnimationFrame(x),()=>{t.disconnect()}},[x]),(0,f.useEffect)(()=>{requestAnimationFrame(x)},[x]);let b=d||(t??0)<=0||!w;return(0,l.jsx)("div",{className:(0,a.Z)(i,eV.wrapper,{[eV.gray]:"gray"===n,[eV.white]:"white"===n}),children:(0,l.jsxs)("div",{ref:s,className:eV.container,children:[e.map((e,t)=>(0,l.jsx)(eJ,{chip:e,hidden:!b&&t>=v,activeChipId:o,onClick:r,refCallback:t=>{u.current[e.url]=t}},e.url)),!b&&w&&(0,l.jsxs)("button",{type:"button",ref:c,className:(0,a.Z)(eV.chip,eV.more),onClick:()=>{eZ(m.D.chip,"Еще"),p(!0)},children:[(0,l.jsx)(h.IconFdsDotsVerticalO,{size:20}),(0,l.jsx)("span",{className:eV.label,children:"Еще"})]}),(b||!w)&&(0,l.jsxs)("button",{type:"button",ref:c,className:(0,a.Z)(eV.chip,eV.more,eV.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,l.jsx)(h.IconFdsDotsVerticalO,{size:20}),(0,l.jsx)("span",{className:eV.label,children:"Еще"})]})]})})},eY=(e,t)=>{if(!(typeof document>"u")){if(!e&&!t){eE.a.removeItem(eA),eE.a.removeItem(eI);return}eE.a.setItem(eA,JSON.stringify(e)||"",{"max-age":31536e3}),eE.a.setItem(eI,JSON.stringify(t)||"",{"max-age":31536e3})}},eK=e=>{if(typeof document>"u")return null;let t=eE.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},eX=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},e0=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=eX("all_regions")||[];return window.allRegions=e,e},e1=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]),[])},e2=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)},e4=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},e5=(e,t,n)=>{(0,m.h)({eventCategory:e8,eventActionType:e,eventActionText:t,eventLabel:n})},e6=e0(),e3=e1(e6),e7={regions:e6,towns:e3,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},e8="finkit-widgets-sc-city-select",e9=(0,f.createContext)(e7);function te(){return(0,f.useContext)(e9)}let tt=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:i=!0,lastRegionsUpdateUnixTimestamp:o,dadataUrl:r="https://finuslugi.ru/backend/money/dadata"})=>{let s=Number(eX("lastRegionsUpdateUnixTimestamp")||0),a=Number(o||0)>s,[c,u]=(0,f.useState)(e0()),[{startRegion:d,startTown:p},h]=(0,f.useState)({startRegion:e7.startRegion,startTown:e7.startTown}),v=t??e7.region,g=n??e7.town,[{region:w,town:_},x]=(0,f.useState)({region:v,town:g}),[b,j]=(0,f.useState)(e7.startPopupVisible),[y,$]=(0,f.useState)(e7.popupVisible),N=(0,f.useRef)(""),k=(0,f.useMemo)(()=>e1(c),[c.length]),C=(0,f.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)||""),j(!0),h({startRegion:e,startTown:t})},[j,h]),O=(0,f.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||C(e,t)},[C]),T=(0,f.useCallback)(()=>{if(N.current&&!w&&!_){let e=k.find(e=>e.name===N.current)??null;return O(c.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}O(w,_)},[w,_,k,c,O]),S=(0,f.useCallback)(e=>{$(e)},[$]),A=(0,f.useCallback)(e=>{e?e5(m.D.icon,"location"):e5(m.D.button,(null==_?void 0:_.name)||"Вся Россия"),!i||window.sessionStorage.getItem("start_popup_opened")?S(!0):T()},[i,_,S,T]),I=(0,f.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem(eA,JSON.stringify(e)||""),window.localStorage.setItem(eI,JSON.stringify(t)||""),eY(e||null,t||null)):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem(eA,""),window.localStorage.setItem(eI,""),eY(null,null)),x({region:e||null,town:t||null}),j(!1),S(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[S]),L=()=>{x({region:eK(eA)??eX(eA),town:eK(eI)??eX(eI)});let e=async({coords:{latitude:e,longitude:t}})=>{let n=`${r}?lat=${e}&lon=${t}`,i=await e4(n);null!=i&&i.location&&(N.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&i)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch{}};return(0,f.useEffect)(()=>{if((c.length<1||a)&&e2().then(e=>u(e)),window.innerWidth<1024){let e=()=>{L(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{L()},0)},[]),(0,l.jsx)(e9.Provider,{value:{regions:c,towns:k,region:w,town:_,startPopupVisible:b,setStartPopupVisible:j,popupVisible:y,handleToggleModal:S,selectCity:I,handleButtonClick:A,startRegion:d,startTown:p},children:e})},tn=()=>{let e=(0,f.useRef)(null),t=(0,f.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,f.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,f.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},ti=(0,d.g)("city-select-modal-body","sc"),tl=Object.freeze({wrapper:`${ti}__wrapper`,subtitle:`${ti}__subtitle`,hintWrapper:`${ti}__hint-wrapper`,hintText:`${ti}__hint-text`,input:`${ti}__input`,chips:`${ti}__chips`,townsListWrapper:`${ti}__towns-list-wrapper`,townsList:`${ti}__towns-list`,townsGroup:`${ti}__towns-group`,townsGroupLabel:`${ti}__towns-group-label`,townsGroupList:`${ti}__towns-group-list`,townsName:`${ti}__towns-name`,regionName:`${ti}__region-name`}),to=({groupedTowns:e,chips:t,query:n,setQuery:i,isDrawer:o})=>{var r;let s=te(),a=(0,f.useRef)(null),[c,u]=(0,f.useState)("10000px");(0,f.useEffect)(()=>{if(!o||!a.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,i)=>{let l=n.map(e=>[...e]),o=l.map(e),r=o.reduce((e,t,n)=>t<o[e]?n:e,0);0===r&&l[0].push(l[1].shift()),2===r&&l[2].unshift(l[1].pop()),1===r&&o[0]>o[2]&&l[1].unshift(l[0].pop()),1===r&&o[0]<o[2]&&l[1].push(l[2].shift());let s=Math.max(...l.map(e));return s>=i?i:t(l,s)};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&&u(`${i}px`)}).observe(a.current)},[]);let d=e=>{if(e5(m.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return s.selectCity();let t=s.regions.find(t=>t.id===Number(e.parentId))||null;s.selectCity(t,e)};return(0,l.jsxs)("div",{className:tl.wrapper,children:[(0,l.jsxs)("div",{className:tl.subtitle,children:["Покажем предложения рядом с вами",(0,l.jsxs)("div",{className:tl.hintWrapper,children:[(0,l.jsx)(h.IconFdsQuestionCircleO,{size:24}),(0,l.jsx)("div",{className:tl.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,l.jsx)(p.MA,{className:tl.input,value:n,onChange:i,size:"s",placeholder:"Введите название города",icon:n?(0,l.jsx)(h.IconFdsCloseCircleO,{size:24,onClick:()=>i("")}):(0,l.jsx)(h.IconFdsSearchO,{size:24})}),(0,l.jsx)(p.cL,{className:tl.chips,chips:t,value:(null==(r=s.town)?void 0:r.id)||0,onChipClick:e=>{d(s.towns.find(t=>t.id===e))}}),(0,l.jsx)("div",{className:tl.townsListWrapper,children:(0,l.jsx)("div",{ref:a,className:tl.townsList,style:{maxHeight:c},children:e.map(e=>(0,l.jsxs)("div",{className:tl.townsGroup,children:[(0,l.jsx)("div",{className:tl.townsGroupLabel,children:e.letter}),(0,l.jsx)("div",{className:tl.townsGroupList,children:e.towns.map(e=>(0,l.jsxs)("button",{type:"button",onClick:()=>d(e),children:[(0,l.jsx)("div",{className:tl.townsName,children:e.name}),(0,l.jsx)("div",{className:tl.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},tr=[1095,1096,134,720,189,180],ts=()=>{var e;let t=te(),n=(0,p._m)("l"),[i,o]=(0,f.useState)(""),r=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,s=(0,f.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(i.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},[]),[i,t.towns.length]),a=(0,f.useMemo)(()=>[{id:0,label:"Вся Россия"},...tr.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=()=>{e5(m.D.button,"close"),t.handleToggleModal(!1)};return(0,l.jsxs)(H,{children:[!n&&(0,l.jsx)(V,{title:r,isOpen:t.popupVisible,onClose:c,full:!0,children:(0,l.jsx)(to,{groupedTowns:s,chips:a,query:i,setQuery:o})}),n&&(0,l.jsx)(B,{title:r,isOpen:t.popupVisible,onClose:c,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,l.jsx)(to,{groupedTowns:s,chips:a,query:i,setQuery:o,isDrawer:!0})})]})},ta={"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"},tc=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(ta,e)?ta[e]:ta["finuslugi.ru"]},tu=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=`${e}/assets/css/${t}`,document.head.appendChild(n);let i=document.createElement("script");i.src=`${e}/get-bootstrap/${t}`,i.defer=!0,document.body.appendChild(i)},td=()=>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)}})}),tp=()=>{let[e,t]=(0,f.useState)(!1),[n,i]=(0,f.useState)(!1),l=(0,f.useRef)(!1),o=e=>{l.current=e,i(e)};return(0,f.useEffect)(()=>{if(typeof window>"u")return;let e=tc(),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((r,s)=>{if(l.current){s(Error("chat is already opened"));return}i?(i.openWidget(),t(!1),r()):(o(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let l=document.querySelector(".webchat");l&&td().observe(l,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),o(!1),t(!1),r()},tu(e,n))}),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}},tm=(0,f.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 th(){return(0,f.useContext)(tm)}let tf=e=>{let[t,n]=(0,f.useState)(!1),[i,o]=(0,f.useState)(!1),[r,s]=(0,f.useState)(!!e.isMainBannerPage),{isChatModalOpen:a,setIsChatModalOpen:c,isChatLoading:u}=tp(),[d,p]=(0,f.useState)(null),[m,h]=(0,f.useState)(null),[v,g]=(0,f.useState)(!1),[w,_]=(0,f.useState)(!1),[x,b]=(0,f.useState)(!1),j=(0,f.useRef)(null),y=T(v),$=(0,f.useRef)(null),N=(0,f.useRef)(null),k=(0,f.useRef)(null),C=(0,f.useRef)(null),O=(0,f.useCallback)(()=>{y.current&&y.current.scrollTo({top:0})},[y]),S=(0,f.useCallback)(e=>{h(e),O()},[O]),A=(0,f.useCallback)(e=>{$.current&&clearTimeout($.current),e&&_(!0),e||($.current=setTimeout(()=>{_(!1),S(null)},300))},[S]),I=(0,f.useCallback)((e,t,n)=>{if(t&&S(t),!n&&e===d||!e){A(!v),g(!v);return}p(e),A(!0),g(!0)},[d,S,v,A]),L=(0,f.useCallback)(()=>{N.current&&clearTimeout(N.current),b(!0),N.current=setTimeout(()=>{b(!1)},650)},[]);return(0,f.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=eM(o,s,e.isMainBannerPage);return eF(),t},[]),(0,l.jsx)("header",{children:(0,l.jsx)(tm.Provider,{value:{isAuth:t,isHeaderHidden:i,isHeaderTransparent:r,openedBlock:d,setOpenedBlock:I,openedSection:m,setOpenedSection:S,isNavigationOpen:v,isNavigationMounted:w,navMenuItemsRef:j,navigationRef:y,ignoreClicks:x,setIgnoreClicks:L,isChatModalOpen:a,setIsChatModalOpen:c,isChatLoading:u,fixedContainerRef:k,headerRef:C},children:e.children})})},tv=({label:e,onClick:t,eventActionText:n,eventLabel:i,...o})=>(0,l.jsx)(p.zx,{label:e,onClick:e=>{null==t||t(e),(0,m.h)({eventCategory:eL,eventActionType:m.D.button,eventActionText:n||"",eventLabel:i||""})},...o}),tg=(0,d.g)("header-popup","sc"),tw=Object.freeze({popup:`${tg}__popup`,popupHeader:`${tg}__popup-header`,popupClose:`${tg}__popup-close`,body:`${tg}__body`}),t_=({isOpen:e,onClose:t,children:n,title:i})=>{let o=(0,p._m)("l");return(0,l.jsxs)(H,{children:[!o&&(0,l.jsx)(V,{title:i,isOpen:e,onClose:t,children:n}),o&&e&&(0,l.jsxs)("div",{className:tw.popup,children:[(0,l.jsxs)("div",{className:tw.popupHeader,children:[i,(0,l.jsx)(tv,{className:tw.popupClose,iconLeft:(0,l.jsx)(h.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,l.jsx)("div",{className:tw.body,children:n})]})]})},tx=(0,d.g)("start-choice-popup","sc"),tb=Object.freeze({top:`${tx}__top`,progress:`${tx}__progress`,innerCircle:`${tx}__inner-circle`,title:`${tx}__title`,subtitle:`${tx}__subtitle`,actions:`${tx}__actions`}),tj=()=>{var e,t;let n=te(),[i,o]=(0,f.useState)(10),[r,s]=(0,f.useState)(0),a=(0,f.useRef)(void 0),c=()=>{e5(m.D.button,"close_choose_popup"),window.localStorage.setItem("auto_town",JSON.stringify(n.startTown)||""),window.localStorage.setItem("auto_region",JSON.stringify(n.startRegion)||""),n.setStartPopupVisible(!1)};return(0,f.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+i).slice(1)),t=1e3*e/100,n=0,l=0;a.current=setInterval(()=>{n++,l+=t,s(3.6*n);let r=e-Math.floor(l/1e3);r<i&&o(r),100===n&&(clearInterval(a.current),c())},t)})():(clearInterval(a.current),o(10),s(0))},[n.startPopupVisible]),(0,l.jsxs)(t_,{isOpen:n.startPopupVisible,onClose:c,title:(0,l.jsx)("button",{type:"button",className:tb.progress,style:{background:`conic-gradient(#ff0508 ${r}deg, #e3e7ec 0deg)`},onClick:c,children:(0,l.jsx)("div",{className:tb.innerCircle,children:i})}),children:[(0,l.jsxs)("div",{className:tb.top,children:[(0,l.jsxs)("div",{className:tb.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,l.jsx)("div",{className:tb.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,l.jsxs)("div",{className:tb.actions,children:[(0,l.jsx)(tv,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{e5(m.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,l.jsx)(tv,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{e5(m.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ty=(0,d.g)("city-select","sc"),t$=Object.freeze({button:`${ty}__button`,minimal:`${ty}__minimal`,full:`${ty}__full`}),tN=({initialTown:e})=>{var t;let n=te(),i=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:o,isChatModalOpen:r}=th(),{startPopupVisible:s,setStartPopupVisible:c,popupVisible:u}=n,d=(0,f.useRef)();(0,f.useEffect)(()=>{u&&(d.current="popup")},[u]),(0,f.useEffect)(()=>{r&&(d.current="chat")},[r]),(0,f.useEffect)(()=>{s&&(d.current="startPopup")},[s]),(0,f.useEffect)(()=>{d.current&&("chat"===d.current&&s?c(!1):["startPopup","popup"].includes(d.current)&&r&&o(!1))},[u,r,s,c,o]);let m={appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,l.jsx)(h.IconFdsLocationO,{size:24})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.zx,{...m,className:(0,a.Z)(t$.button,t$.full),label:i}),(0,l.jsx)(p.zx,{...m,className:(0,a.Z)(t$.button,t$.minimal),shape:"icon"}),(0,l.jsx)(ts,{}),(0,l.jsx)(tj,{})]})},tk=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,...o})=>(0,l.jsx)(p.rU,{onClick:l=>{null==e||e(l),(0,m.h)({eventCategory:eL,eventActionType:t||m.D.link,eventActionText:n||"",eventLabel:i||""})},...o}),tC=(0,d.g)("header-mobile-app-banner","sc"),tO=Object.freeze({wrapper:`${tC}__wrapper`,container:`${tC}__container`,closeButton:`${tC}__close-button`,innerWrapper:`${tC}__inner-wrapper`,imageWrapper:`${tC}__image-wrapper`,image:`${tC}__image`,title:`${tC}__title`,description:`${tC}__description`,callToAction:`${tC}__call-to-action`,scanQr:`${tC}__scan-qr`}),tT=Object.freeze({mobile:56,desktop:68}),tS="headerBannerShownAt",tA=()=>{let e=localStorage.getItem(tS);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},tI=()=>{localStorage.setItem(tS,new Date().toISOString())},tL=()=>{let e=tA();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},tR=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:i,headerRef:o}=th(),[r,c]=(0,f.useState)(!1),[d,v]=(0,f.useState)(!1),[g,w]=(0,f.useState)(!1),_=(0,f.useCallback)((e="desktop")=>{let t=i.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${tT[e]+eP[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${tT.desktop+eP.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${tT.mobile+eP.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${tT.mobile+eP.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${tT.desktop+eP.desktop}px`),document.documentElement.style.setProperty("--header-height",`${tT[e]+108}px`))},[]),x=(0,f.useCallback)(()=>{let e=i.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,f.useEffect)(()=>{let e=o.current;if(!e)return;let t=()=>{d&&c(!1),w(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[d]),(0,f.useEffect)(()=>{tL()&&c(!0)},[]),(0,f.useEffect)(()=>{let e=window.innerWidth<768;r&&(_(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?c(!0):w(!0));let t=()=>{if(!r)return null;_(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{x(),window.removeEventListener("resize",t)}},[r,_,x]),r?(0,l.jsx)("div",{id:"headerNotice",role:"region","aria-label":"Мобильное приложение","data-opening":g,className:(0,a.Z)(tO.wrapper,t),children:(0,l.jsx)(s.W2,{children:(0,l.jsxs)("div",{className:tO.container,children:[(0,l.jsxs)("div",{className:tO.innerWrapper,children:[(0,l.jsxs)("picture",{className:tO.imageWrapper,children:[(0,l.jsx)("source",{srcSet:u(e,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,l.jsx)("img",{className:tO.image,src:u(e,"/logo/finuslugi/default-regular.svg")})]}),(0,l.jsxs)("div",{className:tO.scanQr,children:[(0,l.jsx)("div",{className:tO.title,children:"Скачайте приложение Финуслуги"}),(0,l.jsx)("div",{className:tO.description,children:"Сканируйте QR-код"})]}),(0,l.jsxs)("div",{className:tO.callToAction,children:[(0,l.jsxs)("div",{children:["Приложение",(0,l.jsx)("br",{}),"Финуслуги"]}),(0,l.jsx)(p.zx,{onClick:()=>{eZ(m.D.button,"skachat_mob_prilozheniye_fu"),window.open(n,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,l.jsx)("div",{"aria-label":"Закрыть",role:"button",className:tO.closeButton,onClick:()=>{tI(),x(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?c(!1):v(!0)},children:(0,l.jsx)(h.IconFdsCloseO,{size:"100%"})})]})})}):null},tz=(0,d.g)("header-chat-modal-body","sc"),tP=Object.freeze({wrapper:`${tz}__wrapper`,cardButton:`${tz}__card-button`,card:`${tz}__card`,cardTitle:`${tz}__card-title`,cardSubtitle:`${tz}__card-subtitle`,button:`${tz}__button`}),tE=()=>{let e=th();return(0,l.jsxs)("div",{className:tP.wrapper,children:[(0,l.jsx)(tv,{className:tP.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,l.jsxs)(s.Zb,{className:tP.card,variant:"secondary",children:[(0,l.jsxs)("div",{className:tP.cardTitle,children:[(0,l.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,l.jsxs)("p",{className:tP.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,l.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},tM=({data:e,isMobile:t})=>{let n=th();return(0,l.jsx)("div",{className:eq.contentWrapper,children:e.map(e=>(0,l.jsx)(f.Fragment,{children:e.sections.map(e=>{var i;return(0,l.jsxs)("div",{className:(0,a.Z)(eq.content,{[eq.hidden]:n.openedSection!==e.id,[eq.contentOpen]:!!n.openedSection}),children:[(0,l.jsx)("div",{className:eq.contentHeader,children:(0,l.jsx)("label",{children:e.title})}),null==(i=e.content)?void 0:i.map((n,i)=>{var o,r;return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("a",{className:(0,a.Z)(eq.contentTitle,{[eq.removed]:!n.title,[eq.contentTitleUrl]:!!n.url,[eq.contentTitleLink]:!!e.isSeeAllLinkAvailable,[eq.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,l.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,l.jsx)("div",{className:eq.arrowIcon,children:(0,l.jsx)(h.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(o=n.links)&&o.length)&&(0,l.jsx)(eQ,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(r=n.links)&&r.length)&&(0,l.jsx)("div",{className:(0,a.Z)(eq.links,{[eq.linksColumns]:!!n.columns,[eq.linksTitleless]:!n.title}),children:n.links.map(e=>(0,l.jsxs)("a",{href:e.url,className:(0,a.Z)({[eq.new]:!!e.new}),onClick:()=>eZ(m.D.link,e.title,`${e.title}_${e.url}`),children:[(0,l.jsx)("div",{className:eq.arrowIcon,children:(0,l.jsx)(h.IconFdsArrowUpRightSmallO,{})}),(0,l.jsx)("span",{children:e.title})]},e.url))})]},`${n.url}_${i}`)})]},e.id)})},e.id))})},tB=(0,d.g)("navigation-section-icon","sc"),tU=Object.freeze({icon:`${tB}`}),tD=({name:e,background:t})=>{let n=(0,f.useMemo)(()=>e&&h[e]||null,[e]);return e&&n?(0,l.jsx)("div",{className:tU.icon,style:{background:t},children:(0,l.jsx)(n,{})}):null},tW=(0,d.g)("navigation","sc"),tF=Object.freeze({navigation:`${tW}`,navigationOpening:`${tW}--opening`,navigationClosing:`${tW}--closing`,wrapper:`${tW}__wrapper`,container:`${tW}__container`,containerOpen:`${tW}__container--open`,sections:`${tW}__sections`,sectionsOpen:`${tW}__sections--open`,citySelectButton:`${tW}__city-select-button`,sectionsTitle:`${tW}__sections-title`,sectionsWrapper:`${tW}__sections-wrapper`,section:`${tW}__section`,sectionArrow:`${tW}__section-arrow`,sectionExtra:`${tW}__section--extra`,sectionActive:`${tW}__section--active`,sectionTitle:`${tW}__section-title`,chatWrapper:`${tW}__chat-wrapper`,chatHeader:`${tW}__chat-header`,backButton:`${tW}__back-button`,useful:`${tW}__useful`,usefulOpen:`${tW}__useful--open`,usefulTitle:`${tW}__useful-title`,usefulGrid:`${tW}__useful-grid`,removed:`${tW}__removed`}),tZ=({data:e})=>{var t;let n=th(),i=te(),o=(0,p.aF)("m"),[r,c]=(0,f.useState)(!0);(0,f.useEffect)(()=>{c(o)},[o]);let u=(0,f.useRef)(null),d=(0,f.useCallback)(()=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>n.openedSection?n.setOpenedSection(null):n.isNavigationOpen?n.setOpenedBlock(null):void 0,50)},[n]),v=(0,f.useRef)(!1),g=(0,f.useRef)(null),w=(0,f.useCallback)(()=>{r&&(v.current=!0,g.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),d()},window.history.pushState(null,"",window.location.href))},[d,r]),_=(0,f.useCallback)(()=>{v.current=!1,window.onpopstate=g.current,window.history.go(-1)},[]),x=(0,f.useRef)(null),b=(0,f.useCallback)(e=>{if(r||!n.navMenuItemsRef.current||!n.navigationRef.current)return;let t=e.target,i=!n.navMenuItemsRef.current.contains(t)&&!n.navigationRef.current.contains(t);if(i&&!x.current){n.setIgnoreClicks(),x.current=setTimeout(()=>n.setOpenedBlock(null),300);return}!i&&x.current&&(clearTimeout(x.current),x.current=null)},[r,n]),j=(0,f.useRef)(null),y=(0,f.useCallback)(e=>{typeof window>"u"||(e?(j.current=b,window.addEventListener("mousemove",j.current)):j.current&&window.removeEventListener("mousemove",j.current))},[b]);(0,f.useEffect)(()=>{y(n.isNavigationOpen),n.isNavigationOpen&&!v.current&&w(),!n.isNavigationOpen&&v.current&&_()},[n.isNavigationOpen]);let $=(e,t)=>()=>{eZ(m.D.button,t),n.setOpenedSection(e)},{start:N,clear:k}=tn(),C=(e,t)=>()=>{r||N($(e,t),150)},O=()=>{r||k()};return(0,l.jsx)("div",{ref:n.navigationRef,className:(0,a.Z)(tF.navigation,{[tF.removed]:!n.isNavigationMounted,[tF.navigationOpening]:n.isNavigationOpen,[tF.navigationClosing]:!n.isNavigationOpen}),children:(0,l.jsx)("div",{className:tF.wrapper,children:(0,l.jsxs)(s.W2,{className:(0,a.Z)(tF.container,{[tF.containerOpen]:!!n.openedSection}),children:[(0,l.jsxs)("div",{className:(0,a.Z)(tF.sections,{[tF.sectionsOpen]:!!n.openedSection}),children:[(0,l.jsx)(p.zx,{className:tF.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>i.handleButtonClick(!1),iconLeft:(0,l.jsx)(h.IconFdsLocationO,{size:24}),label:(null==(t=i.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,l.jsxs)("ul",{className:(0,a.Z)(tF.sectionsWrapper,{[tF.removed]:n.openedBlock!==e.id&&!r}),children:[(0,l.jsx)("div",{className:tF.sectionsTitle,children:ez[e.id]}),e.sections.map(e=>(0,l.jsxs)("li",{className:(0,a.Z)(tF.section,{[tF.sectionExtra]:!!e.extra,[tF.sectionActive]:n.openedSection===e.id}),onClick:$(e.id,e.title),onMouseEnter:C(e.id,e.title),onMouseLeave:O,children:[(0,l.jsx)(tD,{name:e.uikitIcon,background:e.uikitIconBg}),(0,l.jsx)("span",{className:tF.sectionTitle,children:e.title}),(0,l.jsx)("div",{className:tF.sectionArrow,children:(0,l.jsx)(h.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,l.jsxs)("div",{className:tF.chatWrapper,children:[(0,l.jsx)("div",{className:tF.chatHeader,children:"Нужна помощь?"}),(0,l.jsx)(tE,{})]})]}),(0,l.jsxs)("button",{type:"button",className:(0,a.Z)(tF.backButton,{[tF.removed]:!n.openedSection}),onClick:()=>{eZ(m.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,l.jsx)(h.IconFdsChevronLeftO,{size:24}),(0,l.jsx)("span",{children:"Назад"})]}),(0,l.jsx)(tM,{data:e,isMobile:r}),(0,l.jsxs)("div",{className:(0,a.Z)(tF.useful,{[tF.usefulOpen]:!!n.openedSection}),children:[(0,l.jsx)("div",{className:tF.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,l.jsx)(f.Fragment,{children:e.sections.map(e=>{var t;return(0,l.jsx)("div",{className:(0,a.Z)(tF.usefulGrid,{[tF.removed]:n.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,l.jsxs)("a",{href:e.url,onClick:()=>eZ(m.D.link,e.title,`${e.title}_${e.url}`),children:[(0,l.jsx)("div",{children:(0,l.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id)})},e.id))]})]})})})},tG=(e,t,n)=>{var i,l,o,r,s,a,c;let d=(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==(r=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[d])?void 0:r.content)||[];if(null!=(c=null==(a=null==(s=null==e?void 0:e.NAVIGATOR)?void 0:s[d])?void 0:a.content)&&c[0]&&Array.isArray(n)&&p.length){let i=n.map(({title:e,url:n})=>({title:e,url:u(t||"",n),new:0}));e.NAVIGATOR[d].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:[]}]},tV=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:i="https://lk.finuslugi.ru/registration",initialTown:o,isMainBannerPage:r,enableAppHeaderBanner:c=!1,news:d,className:v})=>{let g=th(),w=(0,f.useMemo)(()=>tG(e,t,d),[e,t,d]),_=null==e?void 0:e.config,x=(0,f.useMemo)(()=>w.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[w]),b=g.isAuth?"Личный кабинет":"Войти",j=r&&g.isHeaderTransparent,y=(e,t,n,i)=>()=>{e!==g.openedBlock?eZ(m.D.toggle,t,"on"):eZ(m.D.button,"menu_close","on");let l=n?x[e]:"";g.setOpenedBlock(e,l,!!i)},{start:$,clear:N}=tn(),k=(e,t,n,i)=>()=>{g.isNavigationOpen&&e===g.openedBlock||g.setIgnoreClicks(),$(y(e,t,n,i),200)},C=e=>()=>{g.ignoreClicks||e()},O=e=>g.openedBlock===e&&g.isNavigationOpen;return e?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:g.headerRef,className:(0,a.Z)(eS.header,v,{[eS.transparent]:j}),children:(0,l.jsxs)("div",{ref:g.fixedContainerRef,className:(0,a.Z)(eS.fixed,{[eS.hidden]:g.isHeaderHidden,[eS.navigationOpen]:g.isNavigationOpen}),children:[!!(null!=_&&_.appBannerUrl)&&c&&(0,l.jsx)(tR,{mobileAppUrl:_.appBannerUrl,minioUrl:n}),(0,l.jsxs)(s.W2,{className:eS.container,children:[(0,l.jsxs)("div",{className:eS.leftRow,children:[(0,l.jsx)(tk,{className:eS.logo,href:t,eventActionType:m.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,l.jsxs)("picture",{children:[(0,l.jsx)("source",{srcSet:u(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,l.jsx)("img",{src:u(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,l.jsx)("nav",{ref:g.navMenuItemsRef,className:eS.menuItems,children:(0,l.jsx)("ul",{children:eR.map(({id:e,label:t})=>(0,l.jsx)("li",{children:(0,l.jsx)(p.zx,{className:(0,a.Z)({[eS.menuItemActive]:O(e)}),label:t,variant:"white",size:"xs",onClick:C(y(e,t,!0)),onMouseEnter:k(e,t,!0,!0),onMouseLeave:N})},e))})}),(0,l.jsx)(tv,{className:(0,a.Z)(eS.tabletMenuButton,{[eS.menuItemActive]:g.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,l.jsx)(h.IconFdsChevronDownO,{size:24}),onClick:y("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,l.jsxs)("div",{className:(0,a.Z)(eS.buttonGroup,{[eS.whiteIcons]:(null==_?void 0:_.iconColorOnMobileMainBanner)==="white"}),children:[(0,l.jsxs)("div",{className:eS.chips,children:[(0,l.jsx)(tv,{as:"a",href:i,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${i}`,iconLeft:(0,l.jsx)(h.IconFdsUserO,{size:20})}),(0,l.jsx)(tv,{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,l.jsx)(h.IconFdsChatDotsCircleO,{size:24})})]}),(0,l.jsx)(tv,{className:eS.menuButton,size:"xs",shape:j?"icon":"default",appearance:j?"ghost":"fill",label:"Меню",onClick:y("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,l.jsx)(h.IconFdsMenuSkewedO,{size:24})}),(0,l.jsxs)("div",{className:eS.moreButtons,children:[(0,l.jsx)(tN,{initialTown:o}),(0,l.jsx)(tv,{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,l.jsx)(h.IconFdsChatDotsSquareAddO,{size:24}),children:"Онлайн чат"}),(0,l.jsx)(tv,{as:"a",href:i,size:"xs",eventActionText:b,eventLabel:`${b}_${i}`,label:b})]})]}),(0,l.jsxs)(tk,{className:eS.auth,href:i,eventActionText:b,eventLabel:`${b}_${i}`,children:[(0,l.jsx)(tv,{size:"xs",shape:"circle-icon",iconLeft:(0,l.jsx)(h.IconFdsUserO,{}),eventActionText:b,eventLabel:`${b}_${i}`}),(0,l.jsx)("p",{children:b})]}),(0,l.jsx)("div",{className:eS.close,children:(0,l.jsx)(tv,{className:eS.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,l.jsx)(h.IconFdsCloseO,{}),onClick:()=>g.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,l.jsx)("div",{className:(0,a.Z)(eS.overlay,{[eS.removed]:!g.isNavigationMounted,[eS.overlayOpening]:g.isNavigationOpen,[eS.overlayClosing]:!g.isNavigationOpen}),onClick:C(()=>g.setOpenedBlock(null))}),(0,l.jsx)(tZ,{data:w,minioUrl:n})]}):null},tH=e=>(0,l.jsx)(tf,{isMainBannerPage:e.isMainBannerPage,children:(0,l.jsx)(tV,{...e})}),tq=(0,d.g)("page-layout","sc"),tJ=Object.freeze({main:"".concat(tq,"__main")}),tQ=r()(()=>n.e(715).then(n.bind(n,6715)).then(e=>e.CookiesPlate),{loadableGenerated:{webpack:()=>[require.resolveWeak("../sc-cookies-plate/index.mjs")]},ssr:!1});function tY(e){let{initialGeo:t,headerData:n,footerData:i,showStartGeoPopup:o=!1,children:r}=e,{region:s,town:a}=null!=t?t:{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(tt,{showStartGeoPopup:o,initialRegion:s,initialTown:a,children:[n&&(0,l.jsx)(tH,{...n}),(0,l.jsx)("main",{className:tJ.main,children:r}),i&&(0,l.jsx)(eO,{...i})]}),(0,l.jsx)(tQ,{})]})}}}]);