(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65019,e=>{"use strict";var n=e.i(43476),t=e.i(7670);let i=(0,e.i(54061).g)("card"),l={card:i,variants:{primary:`${i}--primary`,secondary:`${i}--secondary`}},a=({as:e,className:i,style:a,children:s,variant:o="primary",dataQa:r,dataId:c,...u})=>(0,n.jsx)(e||"div",{className:(0,t.default)(i,l.card,l.variants[o]),style:a,...u,"data-id":c,"data-qa":r,children:s});a.displayName="Card",e.s(["Card",0,a])},99974,e=>{"use strict";var n=e.i(71645);let t={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},i={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},l=e=>n.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},n.createElement("path",{d:"M19.03 10.28l-6.5 6.5a.75.75 0 01-1.06 0l-6.5-6.5a.75.75 0 111.06-1.06L12 15.19l5.97-5.97a.75.75 0 111.06 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function a({className:e,style:s,boxSize:o,size:r,onClick:c}){return n.default.createElement("span",{className:e,style:{...t,...c&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...o&&{width:`${o}px`,height:`${o}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...s},...c?{role:"button",tabIndex:"0",onClick:c}:{}},n.default.createElement(l,{viewBox:"0 0 24 24",style:i}))}a.displayName="IconFdsChevronDownO",e.s(["m",0,a])},74100,e=>{"use strict";var n=e.i(43476),t=e.i(71645),i=e.i(70703),l=e.i(86473),a=e.i(99974),s=e.i(30382),o=e.i(20841);e.i(34348);var r=e.i(47611),c=e.i(60822),u=e.i(7670),d=e.i(85900),p=e.i(88753),h=e.i(63687),f=e.i(22468),v=e.i(40383),m=e.i(44437),g=e.i(34650);e.i(46401);var x=e.i(34986),w=e.i(3366),b=e.i(71121),_=e.i(65019),C=e.i(93562),k=e.i(1668);let O={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},j={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},y=e=>t.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("defs",null,t.createElement("clipPath",{id:"fds-chat-dots-square-add-o_svg__a"},t.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24.001H0z"}))),t.createElement("g",{clipPath:"url(#fds-chat-dots-square-add-o_svg__a)"},t.createElement("path",{d:"M18.25 5.75V8c0 .42.33.75.75.75s.75-.33.75-.75V5.75H22c.42 0 .75-.33.75-.75s-.33-.75-.75-.75h-2.25V2c0-.42-.33-.75-.75-.75s-.75.33-.75.75v2.25H16c-.42 0-.75.33-.75.75s.33.75.75.75h2.25zm-4.546-2.23c-.259-.014-.827-.02-1.704-.02-.676 0-1.129.002-1.358.007a7.963 7.963 0 00-.779.047 7.246 7.246 0 00-2.328.689 7.204 7.204 0 00-4.028 6.4c-.005.228-.007.68-.007 1.357 0 .671.002 1.121.007 1.349.007.324.023.584.047.778.057.474.158.933.303 1.378v.001a7.17 7.17 0 001.76 2.867 7.169 7.169 0 002.92 1.777 7.436 7.436 0 002.108.341c.228.006.68.009 1.355.009.67 0 1.12-.003 1.346-.009a7.12 7.12 0 00.794-.057c.476-.05.96-.162 1.455-.333a.71.71 0 01.685.102c.662.48 1.32.829 1.976 1.047a4.85 4.85 0 001.482.264c.142.002.278-.004.41-.016a10.758 10.758 0 01-.222-.535c-.45-1.164-.676-2.305-.676-3.423a.74.74 0 01.116-.401 7.211 7.211 0 001.08-3.01c.024-.196.04-.456.047-.78.005-.228.007-.678.007-1.349 0-.214.002-.488.006-.822.003-.22.004-.376.004-.468 0-.42.33-.75.75-.75s.75.33.75.75c0 .098-.001.26-.004.486A70.38 70.38 0 0022 12c0 .682-.003 1.142-.008 1.381a9.337 9.337 0 01-.058.93 8.752 8.752 0 01-.393 1.737 8.757 8.757 0 01-.788 1.7c.026.866.217 1.757.571 2.674a8.847 8.847 0 00.6 1.249c.11.224.136.42.078.587-.057.168-.198.306-.423.416-.139.068-.32.13-.543.189a5 5 0 01-1.316.15 6.336 6.336 0 01-1.94-.34 8.598 8.598 0 01-2.064-1.035c-.471.14-.939.236-1.402.286a8.23 8.23 0 01-.93.067c-.24.006-.701.009-1.384.009-.688 0-1.152-.003-1.392-.009a8.222 8.222 0 01-.937-.067 8.672 8.672 0 01-3.989-1.538 8.707 8.707 0 01-2.077-2.078 8.705 8.705 0 01-1.597-4.927A78.972 78.972 0 012 12c0-.687.003-1.15.008-1.39.008-.376.027-.686.057-.93a8.737 8.737 0 01.832-2.806 8.69 8.69 0 013.977-3.977 8.7 8.7 0 012.803-.831c.246-.03.557-.05.933-.058C10.85 2.003 11.313 2 12 2c.902 0 1.495.007 1.779.021.42.021.732.367.712.787a.743.743 0 01-.787.711zm-5.91 9.19a1 1 0 111.412-1.414 1 1 0 01-1.413 1.415zm3.497-1.412a1 1 0 101.418 1.41 1 1 0 00-1.418-1.41zm3.502 1.413a1 1 0 111.414-1.415 1 1 0 01-1.414 1.415z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function I({className:e,style:n,boxSize:i,size:l,onClick:a}){return t.default.createElement("span",{className:e,style:{...O,...a&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...i&&{width:`${i}px`,height:`${i}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},t.default.createElement(y,{viewBox:"0 0 24 24",style:j}))}I.displayName="IconFdsChatDotsSquareAddO";let $={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},N={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},A=e=>t.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("defs",null,t.createElement("clipPath",{id:"fds-menu-skewed-o_svg__a"},t.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24.001H0z"}))),t.createElement("g",{clipPath:"url(#fds-menu-skewed-o_svg__a)"},t.createElement("path",{d:"M7.75 5a.75.75 0 100 1.5h13.5a.75.75 0 100-1.5H7.75zM22 12a.75.75 0 00-.75-.75H2.75a.75.75 0 100 1.5h18.5A.75.75 0 0022 12zm-5.75 5.5a.75.75 0 110 1.5H2.75a.75.75 0 110-1.5h13.5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function S({className:e,style:n,boxSize:i,size:l,onClick:a}){return t.default.createElement("span",{className:e,style:{...$,...a&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...i&&{width:`${i}px`,height:`${i}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},t.default.createElement(A,{viewBox:"0 0 24 24",style:N}))}S.displayName="IconFdsMenuSkewedO";let T=()=>{let e=(0,t.useRef)(null),n=(0,t.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),i=(0,t.useCallback)((n,t)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,n()},t)},[]);return(0,t.useEffect)(()=>n,[n]),{start:i,clear:n,pending:!!e.current}},B=(0,f.g)("certificates-warning-banner","sc"),R=(0,f.g)("certificates-warning-popup","sc"),E=Object.freeze({wrapper:`${B}`,container:`${B}__container`,content:`${B}__content`,info:`${B}__info`,image:`${B}__image`,text:`${B}__text`,title:`${B}__title`,description:`${B}__description`,details:`${B}__details`,buttons:`${B}__buttons`,button:`${B}__button`,closeButton:`${B}__close-button`,mobileActivator:`${B}__mobile-activator`}),M=Object.freeze({modal:`${R}__modal`,desktopCloseButton:`${R}__desktop-close-button`,mobilePopup:`${R}__mobile-popup`,mobileContentContainer:`${R}__mobile-content-container`,mobileCloseButton:`${R}__mobile-close-button`,mobileDialog:`${R}__mobile-dialog`,content:`${R}__content`,image:`${R}__image`,text:`${R}__text`,title:`${R}__title`,description:`${R}__description`,actions:`${R}__actions`,primaryActions:`${R}__primary-actions`,divider:`${R}__divider`,explanation:`${R}__explanation`,button:`${R}__button`,gosuslugiButton:`${R}__gosuslugi-button`,gosuslugiIcon:`${R}__gosuslugi-icon`}),z="fu_certificates_access_confirmed",P="fu_certificates_banner_dismissed",F="fu_external_link_warning_shown",L=new Map,W=e=>{if(typeof window>"u")return"1"===L.get(e);try{return"1"===window.localStorage.getItem(e)||"1"===L.get(e)}catch{return"1"===L.get(e)}},H=e=>{if(L.set(e,"1"),!(typeof window>"u"))try{window.localStorage.setItem(e,"1")}catch{}},D=(e,n)=>{if(!e)return null;try{let t,i,l=new URL(e.toString(),n.href);return"http:"!==l.protocol&&"https:"!==l.protocol||(t=l.hostname,i=n.hostname,t===i||"finuslugi.ru"===t||t.endsWith(".finuslugi.ru"))?null:l}catch{return null}},U={"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"},V=(0,t.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 G(){return(0,t.useContext)(V)}let q=e=>{let[i,l]=(0,t.useState)(!1),[a,s]=(0,t.useState)(!1),[o,r]=(0,t.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d}=(()=>{let[e,n]=(0,t.useState)(!1),[i,l]=(0,t.useState)(!1),a=(0,t.useRef)(!1),s=e=>{a.current=e,l(e)};return(0,t.useEffect)(()=>{if(typeof window>"u")return;let e=(()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(U,e)?U[e]:U["finuslugi.ru"]})(),t="webchat_main";window.supportWidget={craftTalk:{isOpened:!1,setConfig:n=>{if(n.host&&(e=n.host),n.channel&&(t=n.channel),n.user){let e="function"==typeof n.user?n.user:()=>({...n.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((l,o)=>{var r,c;let u,d;a.current?o(Error("chat is already opened")):i?(i.openWidget(),n(!1),l()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var t;i=e;let a=document.querySelector(".webchat");a&&new MutationObserver(e=>{e.forEach(e=>{if("style"===e.attributeName){let e=document.querySelector(".webchat"),n=!!e&&"none"!==e.style.display;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.isOpened=n)}})}).observe(a,{attributes:!0,attributeFilter:["style"]}),null!=(t=window.supportWidget)&&t.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),s(!1),n(!1),l()},r=e,c=t,(u=document.createElement("link")).rel="stylesheet",u.type="text/css",u.href=`${r}/assets/css/${c}`,document.head.appendChild(u),(d=document.createElement("script")).src=`${r}/get-bootstrap/${c}`,d.defer=!0,document.body.appendChild(d))}),window.supportWidget.craftTalk.toggle=()=>{var e,n,t,i;null!=(n=null==(e=window.supportWidget)?void 0:e.craftTalk)&&n.isOpened?window.supportWidget.craftTalk.close():null==(i=null==(t=window.supportWidget)?void 0:t.craftTalk)||i.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:n,isChatLoading:i}})(),[p,h]=(0,t.useState)(null),[f,g]=(0,t.useState)(null),[x,w]=(0,t.useState)(!1),[b,_]=(0,t.useState)(!1),[C,k]=(0,t.useState)(!1),O=(0,t.useRef)(null),j=(0,v.u)(x),y=(0,t.useRef)(null),I=(0,t.useRef)(null),$=(0,t.useRef)(null),N=(0,t.useRef)(null),A=(0,t.useCallback)(()=>{j.current&&j.current.scrollTo({top:0})},[j]),S=(0,t.useCallback)(e=>{g(e),A()},[A]),T=(0,t.useCallback)(e=>{y.current&&clearTimeout(y.current),e&&_(!0),e||(y.current=setTimeout(()=>{_(!1),S(null)},300))},[S]),B=(0,t.useCallback)((e,n,t)=>{if(n&&S(n),!t&&e===p||!e){T(!x),w(!x);return}h(e),T(!0),w(!0)},[p,S,x,T]),R=(0,t.useCallback)(()=>{I.current&&clearTimeout(I.current),k(!0),I.current=setTimeout(()=>{k(!1)},650)},[]);return(0,t.useEffect)(()=>{l(!!document.cookie.includes("auth.gtm_customer_id"));let n=(0,m.s)(s,r,e.isMainBannerPage);return(0,m.i)(),n},[]),(0,n.jsx)("header",{children:(0,n.jsx)(V.Provider,{value:{isAuth:i,isHeaderHidden:a,isHeaderTransparent:o,openedBlock:p,setOpenedBlock:B,openedSection:f,setOpenedSection:S,isNavigationOpen:x,isNavigationMounted:b,navMenuItemsRef:O,navigationRef:j,ignoreClicks:C,setIgnoreClicks:R,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:d,fixedContainerRef:$,headerRef:N},children:e.children})})},Y=(0,f.g)("city-select","sc"),K=Object.freeze({button:`${Y}__button`,minimal:`${Y}__minimal`,full:`${Y}__full`}),J=(0,i.default)(()=>e.A(55425).then(e=>e.CitySelectModal),{ssr:!1}),Q=(0,i.default)(()=>e.A(11738).then(e=>e.StartChoicePopup),{ssr:!1}),X=({initialTown:e})=>{var i;let l=(0,p.u)(),a=(null==(i=l.town)?void 0:i.name)||e||"Вся Россия",{setIsChatModalOpen:s,isChatModalOpen:o}=G(),{startPopupVisible:c,setStartPopupVisible:d,popupVisible:h}=l,f=(0,p.a)(h),v=(0,p.a)(c),m=(0,t.useRef)();(0,t.useEffect)(()=>{h&&(m.current="popup")},[h]),(0,t.useEffect)(()=>{o&&(m.current="chat")},[o]),(0,t.useEffect)(()=>{c&&(m.current="startPopup")},[c]),(0,t.useEffect)(()=>{m.current&&("chat"===m.current&&c?d(!1):["startPopup","popup"].includes(m.current)&&o&&s(!1))},[h,o,c,d,s]);let g={appearance:"ghost",size:"xs",onClick:()=>l.handleButtonClick(!1),iconLeft:(0,n.jsx)(p.Y,{size:24})};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.Button,{...g,className:(0,u.default)(K.button,K.full),label:a}),(0,n.jsx)(r.Button,{...g,className:(0,u.default)(K.button,K.minimal),shape:"icon"}),f&&(0,n.jsx)(J,{}),v&&(0,n.jsx)(Q,{})]})},Z=({label:e,onClick:t,eventActionText:i,eventLabel:l,...a})=>(0,n.jsx)(r.Button,{label:e,onClick:e=>{null==t||t(e),(0,h.h)({eventCategory:g.H,eventActionType:h.D.button,eventActionText:i||"",eventLabel:l||""})},...a}),ee=({onClick:e,eventActionType:t,eventActionText:i,eventLabel:l,...a})=>(0,n.jsx)(x.Link,{onClick:n=>{null==e||e(n),(0,h.h)({eventCategory:g.H,eventActionType:t||h.D.link,eventActionText:i||"",eventLabel:l||""})},...a}),en={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},et={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},ei=e=>t.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},t.createElement("path",{d:"M7.22 12.53a.75.75 0 010-1.06l6.5-6.5a.75.75 0 111.06 1.06L8.81 12l5.97 5.97a.75.75 0 11-1.06 1.06l-6.5-6.5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function el({className:e,style:n,boxSize:i,size:l,onClick:a}){return t.default.createElement("span",{className:e,style:{...en,...a&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...i&&{width:`${i}px`,height:`${i}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...n},...a?{role:"button",tabIndex:"0",onClick:a}:{}},t.default.createElement(ei,{viewBox:"0 0 24 24",style:et}))}el.displayName="IconFdsChevronLeftO";let ea=(0,f.g)("header-chat-modal-body","sc"),es=Object.freeze({wrapper:`${ea}__wrapper`,cardButton:`${ea}__card-button`,card:`${ea}__card`,cardTitle:`${ea}__card-title`,cardSubtitle:`${ea}__card-subtitle`,button:`${ea}__button`}),eo=()=>{let e=G();return(0,n.jsxs)("div",{className:es.wrapper,children:[(0,n.jsx)(Z,{className:es.cardButton,variant:"secondary",pending:e.isChatLoading,onClick:()=>{var e,n,t;return null==(t=null==(n=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:n.open)?void 0:t.call(n)},eventActionText:"Напишите в чат",children:(0,n.jsxs)(_.Card,{className:es.card,variant:"secondary",children:[(0,n.jsxs)("div",{className:es.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:es.cardSubtitle,children:["Виртуальный ассистент доступен 24/7, ",(0,n.jsx)("br",{}),"операторы — с 6:00 до 23:59 мск"]})]})}),!1]})},er=({data:e,isMobile:i})=>{let l=G();return(0,n.jsx)("div",{className:k.s.contentWrapper,children:e.map(e=>(0,n.jsx)(t.Fragment,{children:e.sections.map(e=>{var t;return(0,n.jsxs)("div",{className:(0,u.default)(k.s.content,{[k.s.hidden]:l.openedSection!==e.id,[k.s.contentOpen]:!!l.openedSection}),children:[(0,n.jsx)("div",{className:k.s.contentHeader,children:(0,n.jsx)("label",{children:e.title})}),null==(t=e.content)?void 0:t.map((t,l)=>{var a,s;return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{children:(0,n.jsx)("a",{className:(0,u.default)(k.s.contentTitle,{[k.s.removed]:!t.title,[k.s.contentTitleUrl]:!!t.url,[k.s.contentTitleLink]:!!e.isSeeAllLinkAvailable,[k.s.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,n.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,n.jsx)("div",{className:k.s.arrowIcon,children:(0,n.jsx)(C.K,{})}),t.title]})})}),!(null!=(a=t.links)&&a.length)&&(0,n.jsx)(k.N,{items:t.chips||[],maxNumberOfLines:e.content.length<=1?99:i?3:2}),!!(null!=(s=t.links)&&s.length)&&(0,n.jsx)("div",{className:(0,u.default)(k.s.links,{[k.s.linksColumns]:!!t.columns,[k.s.linksTitleless]:!t.title}),children:t.links.map((e,t)=>(0,n.jsxs)("a",{href:e.url,onClick:()=>(0,m.h)(h.D.link,e.title,`${e.title}_${e.url}`),children:[(0,n.jsx)("div",{className:k.s.arrowIcon,children:(0,n.jsx)(C.K,{})}),(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{children:e.title}),!!e.new&&(0,n.jsx)("span",{className:(0,u.default)({[k.s.newInline]:!!e.new})})]})]},`${e.url}_${t}`))})]},`${t.url}_${l}`)})]},e.id)})},e.id))})},ec=(0,f.g)("navigation-section-icon","sc"),eu=Object.freeze({icon:`${ec}`}),ed={IconFdsAcademicCapO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsAcademicCapO),IconFdsBankO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsBankO),IconFdsBookOpenO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsBookOpenO),IconFdsCalculatorO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsCalculatorO),IconFdsCardO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsCardO),IconFdsChatDotsCircleO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsChatDotsCircleO),IconFdsCoinMultipleO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsCoinMultipleO),IconFdsDotsHorizontalO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsDotsHorizontalO),IconFdsFlashO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsFlashO),IconFdsGraphO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsGraphO),IconFdsLayoutHorizontalO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsLayoutHorizontalO),IconFdsPortfolioO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsPortfolioO),IconFdsRubleCircleO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsRubleCircleO),IconFdsSafeO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsSafeO),IconFdsShieldCheckO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsShieldCheckO),IconFdsWalletO:()=>e.A(16973).then(({navigationSectionIcons:e})=>e.IconFdsWalletO)},ep=e=>Object.prototype.hasOwnProperty.call(ed,e),eh=({name:e,background:i})=>{let[l,a]=(0,t.useState)(null);if((0,t.useEffect)(()=>{if(!e||!ep(e))return void a(null);let n=!0;return ed[e]().then(t=>{n&&a({name:e,component:t})}).catch(()=>{n&&a(null)}),()=>{n=!1}},[e]),!e||!ep(e))return null;let s=(null==l?void 0:l.name)===e?l.component:null;return(0,n.jsx)("div",{className:eu.icon,style:{background:i},children:s&&(0,n.jsx)(s,{})})},ef=(0,f.g)("navigation","sc"),ev=Object.freeze({navigation:`${ef}`,navigationOpening:`${ef}--opening`,navigationClosing:`${ef}--closing`,wrapper:`${ef}__wrapper`,container:`${ef}__container`,containerOpen:`${ef}__container--open`,sections:`${ef}__sections`,sectionsOpen:`${ef}__sections--open`,citySelectButton:`${ef}__city-select-button`,sectionsTitle:`${ef}__sections-title`,sectionsWrapper:`${ef}__sections-wrapper`,section:`${ef}__section`,sectionArrow:`${ef}__section-arrow`,sectionExtra:`${ef}__section--extra`,sectionActive:`${ef}__section--active`,sectionTitle:`${ef}__section-title`,chatWrapper:`${ef}__chat-wrapper`,chatHeader:`${ef}__chat-header`,backButton:`${ef}__back-button`,useful:`${ef}__useful`,usefulOpen:`${ef}__useful--open`,usefulTitle:`${ef}__useful-title`,usefulGrid:`${ef}__useful-grid`,removed:`${ef}__removed`}),em=({data:e})=>{var i;let l=G(),a=(0,p.u)(),s=(0,b.useBreakpointDown)("m"),[o,d]=(0,t.useState)(!0);(0,t.useEffect)(()=>{d(s)},[s]);let f=(0,t.useRef)(null),v=(0,t.useCallback)(()=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>l.openedSection?l.setOpenedSection(null):l.isNavigationOpen?l.setOpenedBlock(null):void 0,50)},[l]),x=(0,t.useRef)(!1),_=(0,t.useRef)(null),C=(0,t.useCallback)(()=>{o&&(x.current=!0,_.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),v()},window.history.pushState(null,"",window.location.href))},[v,o]),k=(0,t.useCallback)(()=>{x.current=!1,window.onpopstate=_.current,window.history.go(-1)},[]),O=(0,t.useRef)(null),j=(0,t.useCallback)(e=>{if(o||!l.navMenuItemsRef.current||!l.navigationRef.current)return;let n=e.target,t=!l.navMenuItemsRef.current.contains(n)&&!l.navigationRef.current.contains(n);if(t&&!O.current){l.setIgnoreClicks(),O.current=setTimeout(()=>l.setOpenedBlock(null),300);return}!t&&O.current&&(clearTimeout(O.current),O.current=null)},[o,l]),y=(0,t.useRef)(null),I=(0,t.useCallback)(e=>{typeof window>"u"||(e?(y.current=j,window.addEventListener("mousemove",y.current)):y.current&&window.removeEventListener("mousemove",y.current))},[j]);(0,t.useEffect)(()=>{I(l.isNavigationOpen),l.isNavigationOpen&&!x.current&&C(),!l.isNavigationOpen&&x.current&&k()},[l.isNavigationOpen]);let $=(e,n)=>()=>{(0,m.h)(h.D.button,n),l.setOpenedSection(e)},{start:N,clear:A}=T(),S=()=>{o||A()};return(0,n.jsx)("div",{ref:l.navigationRef,className:(0,u.default)(ev.navigation,{[ev.removed]:!l.isNavigationMounted,[ev.navigationOpening]:l.isNavigationOpen,[ev.navigationClosing]:!l.isNavigationOpen}),children:(0,n.jsx)("div",{className:ev.wrapper,children:(0,n.jsxs)(c.Container,{className:(0,u.default)(ev.container,{[ev.containerOpen]:!!l.openedSection}),children:[(0,n.jsxs)("div",{className:(0,u.default)(ev.sections,{[ev.sectionsOpen]:!!l.openedSection}),children:[(0,n.jsx)(r.Button,{className:ev.citySelectButton,variant:"violet",appearance:"ghost",size:"xs",onClick:()=>a.handleButtonClick(!1),iconLeft:(0,n.jsx)(p.Y,{size:24}),label:(null==(i=a.town)?void 0:i.name)||"Вся Россия"}),e.map(e=>(0,n.jsxs)("ul",{className:(0,u.default)(ev.sectionsWrapper,{[ev.removed]:l.openedBlock!==e.id&&!o}),children:[(0,n.jsx)("div",{className:ev.sectionsTitle,children:g.a[e.id]}),e.sections.map(e=>{let t,i;return(0,n.jsxs)("li",{className:(0,u.default)(ev.section,{[ev.sectionExtra]:!!e.extra,[ev.sectionActive]:l.openedSection===e.id}),onClick:$(e.id,e.title),onMouseEnter:(t=e.id,i=e.title,()=>{o||N($(t,i),150)}),onMouseLeave:S,children:[l.isNavigationMounted&&(0,n.jsx)(eh,{name:e.uikitIcon,background:e.uikitIconBg}),(0,n.jsx)("span",{className:ev.sectionTitle,children:e.title}),(0,n.jsx)("div",{className:ev.sectionArrow,children:(0,n.jsx)(w._,{size:24})})]},e.id)})]},e.id)),(0,n.jsxs)("div",{className:ev.chatWrapper,children:[(0,n.jsx)("div",{className:ev.chatHeader,children:"Нужна помощь?"}),(0,n.jsx)(eo,{})]})]}),(0,n.jsxs)("button",{type:"button",className:(0,u.default)(ev.backButton,{[ev.removed]:!l.openedSection}),onClick:()=>{(0,m.h)(h.D.button,"Назад"),l.setOpenedSection(null)},children:[(0,n.jsx)(el,{size:24}),(0,n.jsx)("span",{children:"Назад"})]}),(0,n.jsx)(er,{data:e,isMobile:o}),(0,n.jsxs)("div",{className:(0,u.default)(ev.useful,{[ev.usefulOpen]:!!l.openedSection}),children:[(0,n.jsx)("div",{className:ev.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,n.jsx)(t.Fragment,{children:e.sections.map(e=>{var t;return(0,n.jsx)("div",{className:(0,u.default)(ev.usefulGrid,{[ev.removed]:l.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,n.jsxs)("a",{href:e.url,onClick:()=>(0,m.h)(h.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))]})]})})})},eg=(0,i.default)(()=>e.A(5122).then(e=>e.CertificatesWarningBanner),{ssr:!1}),ex=(0,i.default)(()=>e.A(1286).then(e=>e.CertificatesWarningPopup),{ssr:!1}),ew=(0,i.default)(()=>e.A(64532).then(e=>e.HeaderMobileAppBanner),{ssr:!1}),eb=({data:e,showcaseUrl:i="https://finuslugi.ru",minioUrl:f="https://assets.finuslugi.ru/mp-assets",lkUrl:v="https://lk.finuslugi.ru/registration",initialTown:x,isMainBannerPage:w,enableAppHeaderBanner:b=!1,enableCertificatesBanner:_=!1,enableExternalLinkWarning:C=!1,certificatesWarningProduct:k,news:O,className:j})=>{let y=G(),$=(0,t.useMemo)(()=>((e,n,t)=>{var i,l,a,s,o,r,c;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==(s=null==(a=null==e?void 0:e.NAVIGATOR)?void 0:a[u])?void 0:s.content)||[];if(null!=(c=null==(r=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[u])?void 0:r.content)&&c[0]&&Array.isArray(t)&&p.length){let i=t.map(({title:e,url:t})=>({title:e,url:(0,d.joinURL)(n||"",t),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,i,O),[e,i,O]),N=null==e?void 0:e.config,A=!!e&&_&&!!w,B=(({enableCertificatesBanner:e,enableExternalLinkWarning:n,isMainBannerPage:i})=>{let[l,a]=(0,t.useState)("checking"),[s,o]=(0,t.useState)(!1),[r,c]=(0,t.useState)(!1),[u,d]=(0,t.useState)(!1),[p,h]=(0,t.useState)(!1),f=(0,t.useRef)(),v=(0,t.useRef)(!1),m=(0,t.useRef)(!1),g=(0,t.useRef)(!1);(0,t.useRef)(null);let x=(0,t.useRef)(null),w=(0,t.useRef)(null),b=(0,t.useRef)(null),_=e&&i,C=_||n,k=(0,t.useCallback)(e=>{let n=f.current;n?n.call(window,e,"_blank","noopener,noreferrer"):window.open(e,"_blank","noopener,noreferrer")},[]),O=(0,t.useCallback)(()=>{o(!1),g.current=!1,x.current=null,w.current=null,b.current=null,h(!1)},[]),j=(0,t.useCallback)(e=>{H(F),m.current=!0,g.current=!1,x.current=e,h("external"===e&&null!==w.current),o(!0)},[]),y=(0,t.useCallback)(()=>!v.current&&("external"===x.current&&!g.current||!m.current),[]),I=(0,t.useCallback)(()=>{"external"!==x.current&&j("external")},[j]);(0,t.useEffect)(()=>{f.current=window.open;let e=window.navigator.userAgent.includes("YaBrowser/");return e&&H(z),v.current=e||W(z),m.current=W(F),d(v.current),c(!0),()=>{w.current=null,b.current=null}},[]),(0,t.useEffect)(()=>{if(r){if(!_)return void a("skipped");a(e=>"shown"===e||"closing"===e||"dismissed"===e?e:u||W(P)?"skipped":"shown")}},[u,_,r]),(0,t.useEffect)(()=>{},[O,C,r]),(0,t.useEffect)(()=>{if(!r||!n)return;let e=f.current;if(!e)return;let t=!0,i=e=>{if(0!==e.button&&1!==e.button||!(e.target instanceof Element))return;let n=e.target.closest("a[href]");if(!n||e.defaultPrevented)return;let i=D(n.href,window.location);if(!i||!y())return;e.preventDefault(),null===w.current&&(w.current=i.href,b.current={source:"external_anchor",host:i.hostname});let l=w.current;queueMicrotask(()=>{t&&y()&&w.current===l&&I()})},l=(n,t="_blank",i)=>{let l=D(n,window.location);return l&&y()?(null===w.current&&(w.current=l.href,b.current={source:"external_window_open",host:l.hostname}),I(),null):e.call(window,n,t,i)};return window.open=l,document.addEventListener("click",i,!0),document.addEventListener("auxclick",i,!0),()=>{t=!1,document.removeEventListener("click",i,!0),document.removeEventListener("auxclick",i,!0),window.open===l&&(window.open=e)}},[n,r,y,I]),(0,t.useEffect)(()=>{var e;n||(w.current=null,(null==(e=b.current)?void 0:e.source)!=="banner"&&(b.current=null),h(!1),"external"===x.current&&O())},[O,n]),(0,t.useEffect)(()=>{_||"banner"===x.current&&O()},[O,_]),(0,t.useEffect)(()=>{C||O()},[O,C]);let $=(0,t.useCallback)(()=>{H(P),a("closing")},[]),N=(0,t.useCallback)(()=>{a("dismissed")},[]),A=(0,t.useCallback)(()=>{w.current=null,b.current={source:"banner"},j("banner")},[j]),S=(0,t.useCallback)(()=>{k("https://www.gosuslugi.ru/crt")},[k]),T=(0,t.useCallback)(()=>{k("https://browser.yandex.ru/")},[k]),B=(0,t.useCallback)(()=>{let e=w.current;e&&(H(F),m.current=!0,g.current=!0,k(e))},[k]);return{bannerStatus:l,isPopupOpen:s,popupAnalyticsContext:b.current,dismissBanner:$,finishBannerClosing:N,openPopupFromBanner:A,closePopup:O,openCertificatesPage:S,openYandexBrowserPage:T,continueToExternalPage:p?B:void 0}})({enableCertificatesBanner:A,enableExternalLinkWarning:C,isMainBannerPage:!!w}),R="shown"===B.bannerStatus||"closing"===B.bannerStatus,E=!A||"skipped"===B.bannerStatus,M=(0,p.a)(B.isPopupOpen),L=(0,t.useMemo)(()=>$.reduce((e,n)=>{var t;return e[n.id]=null==(t=n.sections[0])?void 0:t.id,e},{}),[$]),U=y.isAuth?"Личный кабинет":"Войти",V=w&&y.isHeaderTransparent,q=(e,n,t,i)=>()=>{e!==y.openedBlock?(0,m.h)(h.D.toggle,n,"on"):(0,m.h)(h.D.button,"menu_close","on");let l=t?L[e]:"";y.setOpenedBlock(e,l,!!i)},{start:Y,clear:K}=T(),J=e=>()=>{y.ignoreClicks||e()},Q=M?(0,n.jsx)(ex,{isOpen:B.isPopupOpen,analyticsContext:B.popupAnalyticsContext,certificatesWarningProduct:k,onClose:B.closePopup,onOpenCertificatesPage:B.openCertificatesPage,onOpenYandexBrowserPage:B.openYandexBrowserPage,onContinue:B.continueToExternalPage}):null;return e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{ref:y.headerRef,className:(0,u.default)(g.s.header,j,{[g.s.transparent]:V}),children:(0,n.jsxs)("div",{ref:y.fixedContainerRef,className:(0,u.default)(g.s.fixed,{[g.s.hidden]:y.isHeaderHidden,[g.s.navigationOpen]:y.isNavigationOpen}),children:[R&&(0,n.jsx)(eg,{onDismiss:B.dismissBanner,onClosed:B.finishBannerClosing,onOpenDetails:B.openPopupFromBanner,onOpenCertificatesPage:B.openCertificatesPage,onOpenYandexBrowserPage:B.openYandexBrowserPage}),E&&!!(null!=N&&N.appBannerUrl)&&b&&(0,n.jsx)(ew,{mobileAppUrl:N.appBannerUrl,minioUrl:f}),(0,n.jsxs)(c.Container,{className:g.s.container,children:[(0,n.jsxs)("div",{className:g.s.leftRow,children:[(0,n.jsx)(ee,{className:g.s.logo,href:i,eventActionType:h.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${i}`,children:(0,n.jsxs)("picture",{children:[(0,n.jsx)("source",{srcSet:(0,d.joinURL)(f,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,n.jsx)("img",{src:(0,d.joinURL)(f,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,n.jsx)("nav",{ref:y.navMenuItemsRef,className:g.s.menuItems,children:(0,n.jsx)("ul",{children:g.b.map(({id:e,label:t})=>(0,n.jsx)("li",{children:(0,n.jsx)(r.Button,{className:(0,u.default)({[g.s.menuItemActive]:y.openedBlock===e&&y.isNavigationOpen}),label:t,variant:"white",size:"xs",onClick:J(q(e,t,!0)),onMouseEnter:()=>{y.isNavigationOpen&&e===y.openedBlock||y.setIgnoreClicks(),Y(q(e,t,!0,!0),200)},onMouseLeave:K})},e))})}),(0,n.jsx)(Z,{className:(0,u.default)(g.s.tabletMenuButton,{[g.s.menuItemActive]:y.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,n.jsx)(a.m,{size:24}),onClick:q("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,n.jsxs)("div",{className:(0,u.default)(g.s.buttonGroup,{[g.s.whiteIcons]:(null==N?void 0:N.iconColorOnMobileMainBanner)==="white"}),children:[(0,n.jsxs)("div",{className:g.s.chips,children:[(0,n.jsx)(Z,{as:"a",href:v,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${v}`,iconLeft:(0,n.jsx)(o.e,{size:20}),"aria-label":U}),(0,n.jsx)(Z,{onClick:()=>{var e,n,t;return null==(t=null==(n=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:n.open)?void 0:t.call(n)},size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,n.jsx)(l.G,{size:24}),"aria-label":"Онлайн чат"})]}),(0,n.jsx)(Z,{className:g.s.menuButton,size:"xs",shape:V?"icon":"default",appearance:V?"ghost":"fill",label:"Меню",onClick:q("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,n.jsx)(S,{size:24})}),(0,n.jsxs)("div",{className:g.s.moreButtons,children:[(0,n.jsx)(X,{initialTown:x}),(0,n.jsx)(Z,{onClick:()=>{var e,n,t;return null==(t=null==(n=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:n.open)?void 0:t.call(n)},size:"xs",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,n.jsx)(I,{size:24}),children:"Онлайн чат"}),(0,n.jsx)(Z,{as:"a",href:v,size:"xs",eventActionText:U,eventLabel:`${U}_${v}`,label:U})]})]}),(0,n.jsxs)(ee,{className:g.s.auth,href:v,eventActionText:U,eventLabel:`${U}_${v}`,children:[(0,n.jsx)(Z,{size:"xs",shape:"circle-icon",iconLeft:(0,n.jsx)(o.e,{}),eventActionText:U,eventLabel:`${U}_${v}`}),(0,n.jsx)("p",{children:U})]}),(0,n.jsx)("div",{className:g.s.close,children:(0,n.jsx)(Z,{className:g.s.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,n.jsx)(s.a,{}),onClick:()=>y.setOpenedBlock(null),eventActionText:"IconFdsCloseO","aria-label":"Закрыть"})})]})]})}),(0,n.jsx)("div",{className:(0,u.default)(g.s.overlay,{[g.s.removed]:!y.isNavigationMounted,[g.s.overlayOpening]:y.isNavigationOpen,[g.s.overlayClosing]:!y.isNavigationOpen}),onClick:J(()=>y.setOpenedBlock(null))}),(0,n.jsx)(em,{data:$,minioUrl:f}),Q]}):C?Q:null};e.s(["H",0,Z,"Header",0,e=>(0,n.jsx)(q,{isMainBannerPage:e.isMainBannerPage,children:(0,n.jsx)(eb,{...e})}),"b",0,E,"p",0,M,"u",0,G])}]);