(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[436],{17146:function(e,t,n){"use strict";function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(null,arguments)}n.r(t),n.d(t,{default:function(){return s}});var l=n(2265),o=n(19172);function s(e){let{locale:t,...n}=e;if(!t)throw Error("Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl-docs.vercel.app/docs/configuration#locale");return l.createElement(o.IntlProvider,i({locale:t},n))}},52185:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{requestIdleCallback:function(){return n},cancelIdleCallback:function(){return i}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("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)},43570:function(){},49928:function(){},34380:function(){},85530:function(){},52116:function(e,t,n){"use strict";n.r(t),n.d(t,{CookiesPlate:function(){return d}});var i=n(57437),l=n(26094),o=n(75504),s=n(2265),a=n(63919);let c={getItem:e=>{var t;if(typeof document>"u")return null;let n=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return n&&null!==(t=n.split("=")[1])&&void 0!==t?t:null},setItem:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let i="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t));for(let e in n){if(!n.hasOwnProperty(e))continue;i+="; ".concat(e);let t=n[e];!0!==t&&(i+="=".concat(t))}document.cookie=i},removeItem:e=>{c.setItem(e,"",{"max-age":-1})}},r=(0,a.g)("cookies-plate","sc"),u=Object.freeze({wrapper:"".concat(r,"__wrapper"),contentWrapper:"".concat(r,"__content-wrapper"),visible:"".concat(r,"--visible"),hidden:"".concat(r,"--hidden"),content:"".concat(r,"__content"),text:"".concat(r,"__text"),link:"".concat(r,"__link"),button:"".concat(r,"__button")}),d=e=>{let{className:t,mountDelay:n=3e3,href:a="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",children:r,closeIcon:d,onMount:p,onLinkClick:h,onClose:m,mountAfterScroll:v=!0}=e,[g,f]=(0,s.useState)(!1),[w,_]=(0,s.useState)(!1),[x,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),c.getItem("Allow-Cookie")||(b(!0),setTimeout(()=>{f(!0),null==p||p()},n))};return v?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let j=(0,s.useCallback)(()=>{c.setItem("Allow-Cookie","1"),_(!0),null==m||m(),setTimeout(()=>b(!1),1e3)},[m]);return x?(0,i.jsx)("div",{className:u.wrapper,children:(0,i.jsx)("div",{className:(0,o.Z)(u.contentWrapper,{[u.visible]:g,[u.hidden]:w}),children:(0,i.jsxs)("div",{className:(0,o.Z)(t,u.content),children:[r||(0,i.jsxs)("p",{className:u.text,children:["Мы используем"," ",(0,i.jsx)("a",{className:u.link,href:a,target:"_blank",rel:"noreferrer",onClick:h,children:"cookie"})," ","для лучшей работы сайта"]}),(0,i.jsx)("button",{className:u.button,onClick:j,children:d||(0,i.jsx)(l.IconFdsCloseO,{})})]})})}):(0,i.jsx)(i.Fragment,{})}},18818:function(e,t,n){"use strict";n.r(t),n.d(t,{CitySelectProvider:function(){return R},Header:function(){return eL},useCitySelectContext:function(){return L}});var i=n(57437),l=n(2265),o=n(3455),s=n(26094),a=n(32833),c=n(75504),r=n(61810),u=n(682),d=n(63919);let p=(0,d.g)("navigation","sc"),h=Object.freeze({navigation:`${p}`,navigationOpening:`${p}--opening`,navigationClosing:`${p}--closing`,wrapper:`${p}__wrapper`,container:`${p}__container`,containerOpen:`${p}__container--open`,sections:`${p}__sections`,sectionsOpen:`${p}__sections--open`,citySelectButton:`${p}__city-select-button`,sectionsTitle:`${p}__sections-title`,sectionsWrapper:`${p}__sections-wrapper`,section:`${p}__section`,sectionArrow:`${p}__section-arrow`,sectionExtra:`${p}__section--extra`,sectionActive:`${p}__section--active`,sectionTitle:`${p}__section-title`,chatWrapper:`${p}__chat-wrapper`,chatHeader:`${p}__chat-header`,backButton:`${p}__back-button`,useful:`${p}__useful`,usefulOpen:`${p}__useful--open`,usefulTitle:`${p}__useful-title`,usefulGrid:`${p}__useful-grid`,removed:`${p}__removed`}),m=(e,t,n)=>{(0,o.h)({eventCategory:"finkit-widgets-sc-navigation",eventActionType:e,eventActionText:t,eventLabel:n})},v=(0,d.g)("navigation-chips","sc"),g=Object.freeze({wrapper:`${v}__wrapper`,gray:`${v}__variantGray`,white:`${v}__variantWhite`,container:`${v}__container`,chip:`${v}__chip`,more:`${v}__chip--more`,active:`${v}__chip--active`,label:`${v}__label`,hidden:`${v}__hidden`}),f=(0,d.g)("navigation-content","sc"),w=Object.freeze({contentWrapper:`${f}__content-wrapper`,content:`${f}__content`,contentOpen:`${f}__content--open`,contentHeader:`${f}__content-header`,contentTitle:`${f}__content-title`,contentTitleUrl:`${f}__content-title--url`,contentTitleLink:`${f}__content-title--link`,contentTitleNew:`${f}__content-title--new`,new:`${f}__new`,vip:`${f}__vip`,arrowIcon:`${f}__arrow-icon`,links:`${f}__links`,linksColumns:`${f}__links--columns`,linksTitleless:`${f}__links--titleless`,removed:`${f}__removed`,hidden:`${f}__content--hidden`}),_=({chip:e,hidden:t,onClick:n,refCallback:l,activeChipId:a})=>{let r=!!n,u=()=>{if(r)return null==n?void 0:n(e.url);m(o.D.chip,e.title,`${e.title}_${e.url}`)},d=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:g.label,children:e.title}),e.arrow&&(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,c.Z)(g.chip,{[g.hidden]:t,[w.new]:!!e.new,[w.vip]:!!e.vip,[g.active]:e.url===a});return r?(0,i.jsx)("button",{type:"button",className:p,onClick:u,ref:l,children:d}):(0,i.jsx)("a",{href:e.url,className:p,onClick:u,ref:l,children:d})},x=({items:e=[],maxNumberOfLines:t,variant:n,className:a,activeChipId:r,onClick:u})=>{let d=(0,l.useRef)(null),p=(0,l.useRef)(null),h=(0,l.useRef)({}),[v,f]=(0,l.useState)(!1),[w,x]=(0,l.useState)(e.length),[b,j]=(0,l.useState)(!1);(0,l.useMemo)(()=>{let t=h.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 C=(0,l.useCallback)(()=>{let n=d.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,l=i(n),o=Math.max(Number(t)||0,0),s=()=>{x(e.length),j(!1)};if(v||0===o||l<=0){s();return}let a=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),c=i(p.current),r=e.map(e=>i(h.current[e.url]));if(r.some(e=>0===e)){s();return}let u=1,m=0,g=0;for(let e of r){let t=u===o?c+a:0,n=0===m?e:m+a+e;if(n+t<=l-.5)m=n,g++;else{if(++u>o)break;m=e,g++}}j(g<e.length),x(g)},[v,e,t]);(0,l.useLayoutEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(C)});return t.observe(e),requestAnimationFrame(C),()=>{t.disconnect()}},[C]),(0,l.useEffect)(()=>{requestAnimationFrame(C)},[C]);let k=v||(t??0)<=0||!b;return(0,i.jsx)("div",{className:(0,c.Z)(a,g.wrapper,{[g.gray]:"gray"===n,[g.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:d,className:g.container,children:[e.map((e,t)=>(0,i.jsx)(_,{chip:e,hidden:!k&&t>=w,activeChipId:r,onClick:u,refCallback:t=>{h.current[e.url]=t}},e.url)),!k&&b&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(g.chip,g.more),onClick:()=>{m(o.D.chip,"Еще"),f(!0)},children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:g.label,children:"Еще"})]}),(k||!b)&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(g.chip,g.more,g.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:g.label,children:"Еще"})]})]})})};var b=n(24866);let j=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 "'.concat(e,'": ').concat(t))}return null},C=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=j("all_regions")||[];return window.allRegions=e,e},k=e=>{let t={};return e.map(e=>{let{id:n,name:i,towns:l}=e;return l.forEach(e=>{e.parentId=n,t[e.name]=t[e.name]||{},t[e.name][e.id]=i}),l}).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},N=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)},O=async e=>{let t=null;try{t=await (await fetch("".concat(e),{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},y=(e,t,n)=>{(0,o.h)({eventCategory:A,eventActionType:e,eventActionText:t,eventLabel:n})},T=C(),S=k(T),I={regions:T,towns:S,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},A="finkit-widgets-sc-city-select",Z=(0,l.createContext)(I);function L(){return(0,l.useContext)(Z)}let R=e=>{let{children:t,showStartGeoPopup:n=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:a="https://finuslugi.ru/backend/money/dadata"}=e,c=Number(j("lastRegionsUpdateUnixTimestamp")||0),r=Number(s||0)>c,[u,d]=(0,l.useState)(C()),[{startRegion:p,startTown:h},m]=(0,l.useState)({startRegion:I.startRegion,startTown:I.startTown}),[{region:v,town:g},f]=(0,l.useState)({region:I.region,town:I.town}),[w,_]=(0,l.useState)(I.startPopupVisible),[x,b]=(0,l.useState)(I.popupVisible),T=(0,l.useRef)(""),S=(0,l.useMemo)(()=>k(u),[u.length]),A=(0,l.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)||""),_(!0),m({startRegion:e,startTown:t})},[_,m]),L=(0,l.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||A(e,t)},[A]),R=(0,l.useCallback)(()=>{if(T.current&&!v&&!g){var e,t;let n=null!==(e=S.find(e=>e.name===T.current))&&void 0!==e?e:null;return L(null!==(t=u.find(e=>e.id===(null==n?void 0:n.parentId)))&&void 0!==t?t:null,n)}L(v,g)},[v,g,S,u,L]),M=(0,l.useCallback)(e=>{b(e)},[b]),V=(0,l.useCallback)(e=>{e?y(o.D.icon,"location"):y(o.D.button,(null==g?void 0:g.name)||"Вся Россия"),!n||window.sessionStorage.getItem("start_popup_opened")?M(!0):R()},[n,g,M,R]),F=(0,l.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem("user_region",JSON.stringify(e)||""),window.localStorage.setItem("user_town",JSON.stringify(t)||"")):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem("user_region",""),window.localStorage.setItem("user_town","")),f({region:e||null,town:t||null}),_(!1),M(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[M]),E=()=>{f({region:j("user_region"),town:j("user_town")});let e=async e=>{let{coords:{latitude:t,longitude:n}}=e,i="".concat(a,"?lat=").concat(t,"&lon=").concat(n),l=await O(i);null!=l&&l.location&&(T.current=l.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&n)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch(e){}};return(0,l.useEffect)(()=>{if((u.length<1||r)&&N().then(e=>d(e)),window.innerWidth<1024){let e=()=>{E(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{E()},0)},[]),(0,i.jsx)(Z.Provider,{value:{regions:u,towns:S,region:v,town:g,startPopupVisible:w,setStartPopupVisible:_,popupVisible:x,handleToggleModal:M,selectCity:F,handleButtonClick:V,startRegion:p,startTown:h},children:t})},M=e=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:186,height:48,fill:"none",...e},l.createElement("path",{fill:"#FF0508",d:"M90 0H31v21H0v27h90V0Z"}),l.createElement("path",{fill:"#FFF",d:"m44.97 9.66-.63.03c-2.44.13-3.95 1.64-3.95 4.12 0 2.41 1.48 4.08 3.95 4.21l.63.03V9.66Zm0 12.07v-1.16l-.63-.03c-4.1-.19-6.63-2.57-6.63-6.72 0-4.4 2.6-6.43 6.63-6.62l.63-.03V6h2.7v1.15l.64.03c4.13.19 6.66 2.15 6.66 6.63 0 4.15-2.53 6.53-6.66 6.72l-.64.03v1.15h-2.7v.02Zm2.69-3.67.64-.03c2.41-.12 3.97-1.86 3.97-4.21 0-2.41-1.56-3.99-3.97-4.11l-.64-.03v8.38Zm.19 21.2h1.57c.51 0 .93-.22 1.09-.64L45.9 27.59h3.02l3.11 8.52h.51l3.07-8.52h2.95l-4.2 10.16c-.95 2.32-2.33 3.89-5.03 3.89h-1.48v-2.38Zm9.39-18.4V6.8h2.79v11.52h.51L63.71 6.8h5.22v14.06h-2.78V9.31h-.52l-3.07 11.55h-5.32Zm14.03 20.78V27.58h2.79V39.1h.51l3.17-11.52H83v14.06h-2.79V30.12h-.51l-3.11 11.52h-5.32Zm-43.6-4.8 2.79.39c-.71 2.99-3.05 4.77-6.09 4.77-4.52 0-6.63-3.31-6.63-7.44 0-4.21 2.24-7.33 6.76-7.33 2.76 0 4.87 1.35 5.83 3.96l-2.66 1.19c-.61-1.45-1.63-2.57-3.3-2.57-2.78 0-3.75 2.28-3.75 4.76 0 2.51 1.02 4.86 3.88 4.86 1.7-.01 2.76-1.01 3.17-2.59Zm44.15-15.98V6.8h2.78v5.69h5.6V6.8h2.79v14.06H80.2v-5.82h-5.6v5.82h-2.78ZM31.39 41.64v-2.71h.87c1.22 0 1.66-.68 1.7-2.67l.16-8.62v-.07h9.81v14.06h-2.77V30.12h-4.42l-.13 5.95c-.1 3.89-1.31 5.57-4.04 5.57h-1.18Zm29.15 0V27.58h8.91v2.54h-6.12v11.52h-2.79ZM6.95 39.26h1.56c.52 0 .93-.22 1.09-.64L5 27.59h3.01l3.11 8.52h.51l3.07-8.52h2.95l-4.19 10.16c-.96 2.32-2.34 3.89-5.04 3.89H6.95v-2.38Z"}),l.createElement("path",{d:"M102.13 13.43c1.54 0 2.56-1.16 2.56-3.07s-1.02-3.07-2.56-3.07h-.12c-1.55 0-2.56 1.16-2.56 3.07s1.01 3.07 2.56 3.07h.12ZM102.07 6c2.36-.03 4.09 1.68 4.07 4.36.02 2.68-1.71 4.39-4.07 4.36-2.37.03-4.1-1.68-4.07-4.36-.03-2.68 1.7-4.39 4.07-4.36Zm7.45 1.42h-2.98V6.11h7.41v1.31h-2.98v7.19h-1.45V7.42Zm-1.87 12.39v8.49h-1.43v-7.03l-2.28 7.03h-1.69l-2.34-7.02v7.02h-1.43v-8.49h2.32l2.31 6.96 2.24-6.96h2.3Zm5.78 7.31c1.55 0 2.56-1.16 2.56-3.07 0-1.9-1.01-3.06-2.56-3.06h-.12c-1.54 0-2.55 1.16-2.55 3.06 0 1.91 1.01 3.07 2.55 3.07h.12Zm-.06-7.43c2.37-.03 4.09 1.69 4.07 4.36.02 2.68-1.7 4.4-4.07 4.37-2.37.03-4.1-1.69-4.07-4.37-.03-2.67 1.7-4.39 4.07-4.36Zm9.28 0c2.01-.02 3.39 1.21 3.49 2.86h-1.46c-.07-.49-.29-.86-.64-1.14-.35-.28-.79-.42-1.33-.42h-.12c-1.53-.03-2.54 1.26-2.53 3.06-.01 1.81 1 3.1 2.53 3.07h.12c.54 0 .98-.13 1.33-.41.35-.28.57-.65.64-1.15h1.46c-.1 1.68-1.48 2.88-3.49 2.86-2.5.02-4.06-1.81-4.04-4.37-.02-2.54 1.54-4.39 4.04-4.36Zm7.81 4.7-1.27 1.32v2.59h-1.46v-8.49h1.46v3.98l3.85-3.98h1.83l-3.37 3.5 3.44 4.99h-1.81l-2.67-3.91Zm8.79 2.73c1.55 0 2.56-1.16 2.56-3.07 0-1.9-1.01-3.06-2.56-3.06h-.11c-1.55 0-2.56 1.16-2.56 3.06 0 1.91 1.01 3.07 2.56 3.07h.11Zm-.05-7.43c2.36-.03 4.08 1.69 4.06 4.36.02 2.68-1.7 4.4-4.06 4.37-2.37.03-4.11-1.69-4.08-4.37-.03-2.67 1.71-4.39 4.08-4.36Zm9.33 7.31c.85 0 1.38-.42 1.38-1.19 0-.76-.53-1.18-1.38-1.18h-2.16V27h2.16Zm-.1-3.64c.81 0 1.29-.41 1.29-1.13 0-.71-.48-1.12-1.29-1.12h-2.06v2.25h2.06Zm-3.52-3.55h3.73c1.49-.02 2.56.95 2.54 2.22 0 .48-.13.9-.39 1.24-.26.35-.61.59-1.03.73.93.17 1.6.91 1.6 2.03.02 1.29-1.14 2.29-2.59 2.27h-3.86v-8.49Zm11.69-.12c2.01-.02 3.4 1.21 3.49 2.86h-1.46c-.07-.49-.29-.86-.64-1.14-.35-.28-.79-.42-1.33-.42h-.12c-1.53-.03-2.54 1.26-2.52 3.06-.02 1.81.99 3.1 2.52 3.07h.12c.54 0 .98-.13 1.34-.41.34-.28.56-.65.63-1.15h1.46c-.1 1.68-1.47 2.88-3.49 2.86-2.5.02-4.06-1.81-4.03-4.37-.03-2.54 1.53-4.39 4.03-4.36Zm7.81 4.7-1.27 1.32v2.59h-1.46v-8.49h1.46v3.98l3.85-3.98h1.83l-3.36 3.5 3.43 4.99h-1.81l-2.67-3.91Zm8.8 2.73c1.54 0 2.55-1.16 2.55-3.07 0-1.9-1.01-3.06-2.55-3.06h-.12c-1.55 0-2.56 1.16-2.56 3.06 0 1.91 1.01 3.07 2.56 3.07h.12Zm-.06-7.43c2.36-.03 4.09 1.69 4.06 4.36.03 2.68-1.7 4.4-4.06 4.37-2.37.03-4.11-1.69-4.08-4.37-.03-2.67 1.71-4.39 4.08-4.36Zm8.29-2.17c.05.47.4.71.94.71.54 0 .91-.24.96-.71h1.19c-.02 1.07-.78 1.65-2.15 1.65-1.37 0-2.11-.58-2.13-1.65h1.19Zm4.56 2.29v8.49h-1.45v-6.6l-3.86 6.6h-1.82v-8.49h1.45v6.58l3.84-6.58H186ZM102.07 40.7c.85 0 1.4-.52 1.4-1.36 0-.84-.52-1.28-1.39-1.28h-2.14v2.64h2.13Zm-3.59-7.2h5.87l.01 1.31h-4.42v1.99h2.23c1.95 0 2.75 1.1 2.75 2.47.01 1.52-.89 2.74-2.66 2.72h-3.78V33.5Zm15.12 0v8.49h-1.45v-6.6l-3.86 6.6h-1.82V33.5h1.46v6.58l3.83-6.58h1.84Zm5.66 3.96c.95 0 1.46-.49 1.46-1.33 0-.83-.51-1.32-1.46-1.32h-2.07v2.65h2.07Zm-3.53-3.96h3.72c1.6-.02 2.74 1 2.72 2.63.02 1.64-1.12 2.65-2.72 2.64h-2.26v3.22h-1.46V33.5Zm14.85 4.35-1.43 1.69v2.45h-1.41v-2.44l-1.51-1.68-2.28 4.12h-1.74l2.96-5.27-2.74-3.22h1.69l3.62 4.23V33.5h1.41v4.24l3.64-4.24h1.68l-2.8 3.26 3 5.23h-1.72l-2.37-4.14Zm12.36-4.35v8.49h-1.45v-6.6l-3.86 6.6h-1.82V33.5h1.46v6.58l3.83-6.58h1.84Z",fill:"#1F242E"})),V=e=>l.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 88 48",...e},l.createElement("path",{fill:"#FF0508",d:"M90 0H31v21H0v27h90V0Z"}),l.createElement("path",{fill:"#FFF",d:"m44.97 9.66-.63.03c-2.44.13-3.95 1.64-3.95 4.12 0 2.41 1.48 4.08 3.95 4.21l.63.03V9.66Zm0 12.07v-1.16l-.63-.03c-4.1-.19-6.63-2.57-6.63-6.72 0-4.4 2.6-6.43 6.63-6.62l.63-.03V6h2.7v1.15l.64.03c4.13.19 6.66 2.15 6.66 6.63 0 4.15-2.53 6.53-6.66 6.72l-.64.03v1.15h-2.7v.02Zm2.69-3.67.64-.03c2.41-.12 3.97-1.86 3.97-4.21 0-2.41-1.56-3.99-3.97-4.11l-.64-.03v8.38Zm.19 21.2h1.57c.51 0 .93-.22 1.09-.64L45.9 27.59h3.02l3.11 8.52h.51l3.07-8.52h2.95l-4.2 10.16c-.95 2.32-2.33 3.89-5.03 3.89h-1.48v-2.38Zm9.39-18.4V6.8h2.79v11.52h.51L63.71 6.8h5.22v14.06h-2.78V9.31h-.52l-3.07 11.55h-5.32Zm14.03 20.78V27.58h2.79V39.1h.51l3.17-11.52H83v14.06h-2.79V30.12h-.51l-3.11 11.52h-5.32Zm-43.6-4.8 2.79.39c-.71 2.99-3.05 4.77-6.09 4.77-4.52 0-6.63-3.31-6.63-7.44 0-4.21 2.24-7.33 6.76-7.33 2.76 0 4.87 1.35 5.83 3.96l-2.66 1.19c-.61-1.45-1.63-2.57-3.3-2.57-2.78 0-3.75 2.28-3.75 4.76 0 2.51 1.02 4.86 3.88 4.86 1.7-.01 2.76-1.01 3.17-2.59Zm44.15-15.98V6.8h2.78v5.69h5.6V6.8h2.79v14.06H80.2v-5.82h-5.6v5.82h-2.78ZM31.39 41.64v-2.71h.87c1.22 0 1.66-.68 1.7-2.67l.16-8.62v-.07h9.81v14.06h-2.77V30.12h-4.42l-.13 5.95c-.1 3.89-1.31 5.57-4.04 5.57h-1.18Zm29.15 0V27.58h8.91v2.54h-6.12v11.52h-2.79ZM6.95 39.26h1.56c.52 0 .93-.22 1.09-.64L5 27.59h3.01l3.11 8.52h.51l3.07-8.52h2.95l-4.19 10.16c-.96 2.32-2.34 3.89-5.04 3.89H6.95v-2.38Z"})),F=()=>{let e=(0,l.useRef)(null),t=(0,l.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,l.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,l.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},E=(0,d.g)("city-select-modal-body","sc"),$=Object.freeze({wrapper:"".concat(E,"__wrapper"),subtitle:"".concat(E,"__subtitle"),hintWrapper:"".concat(E,"__hint-wrapper"),hintText:"".concat(E,"__hint-text"),input:"".concat(E,"__input"),chips:"".concat(E,"__chips"),townsListWrapper:"".concat(E,"__towns-list-wrapper"),townsList:"".concat(E,"__towns-list"),townsGroup:"".concat(E,"__towns-group"),townsGroupLabel:"".concat(E,"__towns-group-label"),townsGroupList:"".concat(E,"__towns-group-list"),townsName:"".concat(E,"__towns-name"),regionName:"".concat(E,"__region-name")}),z=e=>{var t;let{groupedTowns:n,chips:a,query:c,setQuery:u,isDrawer:d}=e,p=L(),h=(0,l.useRef)(null),[m,v]=(0,l.useState)("10000px");(0,l.useEffect)(()=>{if(!d||!h.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),s=o.reduce((e,t,n)=>t<o[e]?n:e,0);0===s&&l[0].push(l[1].shift()),2===s&&l[2].unshift(l[1].pop()),1===s&&o[0]>o[2]&&l[1].unshift(l[0].pop()),1===s&&o[0]<o[2]&&l[1].push(l[2].shift());let a=Math.max(...l.map(e));return a>=i?i:t(l,a)};new ResizeObserver(()=>{var e;if(!(null!=(e=h.current)&&e.children))return;let n=Array.from(h.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let i=0;try{i=t([[],n,[]],1/0)}catch(e){i=0}i>0&&v("".concat(i,"px"))}).observe(h.current)},[]);let g=e=>{if(y(o.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return p.selectCity();let t=p.regions.find(t=>t.id===Number(e.parentId))||null;p.selectCity(t,e)};return(0,i.jsxs)("div",{className:$.wrapper,children:[(0,i.jsxs)("div",{className:$.subtitle,children:["Покажем предложения рядом с вами",(0,i.jsxs)("div",{className:$.hintWrapper,children:[(0,i.jsx)(s.IconFdsQuestionCircleO,{size:24}),(0,i.jsx)("div",{className:$.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,i.jsx)(r.MA,{className:$.input,value:c,onChange:u,size:"s",placeholder:"Введите название города",icon:c?(0,i.jsx)(s.IconFdsCloseCircleO,{size:24,onClick:()=>u("")}):(0,i.jsx)(s.IconFdsSearchO,{size:24})}),(0,i.jsx)(r.cL,{className:$.chips,chips:a,value:(null==(t=p.town)?void 0:t.id)||0,onChipClick:e=>{g(p.towns.find(t=>t.id===e))}}),(0,i.jsx)("div",{className:$.townsListWrapper,children:(0,i.jsx)("div",{ref:h,className:$.townsList,style:{maxHeight:m},children:n.map(e=>(0,i.jsxs)("div",{className:$.townsGroup,children:[(0,i.jsx)("div",{className:$.townsGroupLabel,children:e.letter}),(0,i.jsx)("div",{className:$.townsGroupList,children:e.towns.map(e=>(0,i.jsxs)("button",{type:"button",onClick:()=>g(e),children:[(0,i.jsx)("div",{className:$.townsName,children:e.name}),(0,i.jsx)("div",{className:$.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},P=[1095,1096,134,720,189,180],B=()=>{var e;let t=L(),n=(0,r._m)("l"),[s,a]=(0,l.useState)(""),c="Ваш выбор: ".concat((null==(e=t.town)?void 0:e.name)||"Вся Россия"),d=(0,l.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(s.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},[]),[s,t.towns.length]),p=(0,l.useMemo)(()=>[{id:0,label:"Вся Россия"},...P.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]),h=()=>{y(o.D.button,"close"),t.handleToggleModal(!1)};return(0,i.jsxs)(u.P,{children:[!n&&(0,i.jsx)(u.U,{title:c,isOpen:t.popupVisible,onClose:h,full:!0,children:(0,i.jsx)(z,{groupedTowns:d,chips:p,query:s,setQuery:a})}),n&&(0,i.jsx)(u.D,{title:c,isOpen:t.popupVisible,onClose:h,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,i.jsx)(z,{groupedTowns:d,chips:p,query:s,setQuery:a,isDrawer:!0})})]})},D=(0,d.g)("header","sc"),W=Object.freeze({header:"".concat(D),fixed:"".concat(D,"__fixed"),hidden:"".concat(D,"__fixed--hidden"),transparent:"".concat(D,"--transparent"),navigationOpen:"".concat(D,"__navigation-open"),container:"".concat(D,"__container"),leftRow:"".concat(D,"__left-row"),logo:"".concat(D,"__logo"),logoMobile:"".concat(D,"__logo-mobile"),logoDesk:"".concat(D,"__logo-desk"),menuItems:"".concat(D,"__menu-items"),menuItemActive:"".concat(D,"__menu-item-active"),tabletMenuButton:"".concat(D,"__tablet-menu-button"),buttonGroup:"".concat(D,"__button-group"),chips:"".concat(D,"__chips"),menuButton:"".concat(D,"__menu-button"),moreButtons:"".concat(D,"__more-buttons"),auth:"".concat(D,"__auth"),close:"".concat(D,"__close"),removed:"".concat(D,"__removed"),overlay:"".concat(D,"__overlay"),overlayOpening:"".concat(D,"__overlay--opening"),overlayClosing:"".concat(D,"__overlay--closing")}),U="finkit-widgets-sc-header",H=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],G=H.reduce((e,t)=>(e[t.id]=t.label,e),{}),q=e=>{let{label:t,onClick:n,eventActionText:l,eventLabel:s,...a}=e;return(0,i.jsx)(r.zx,{label:t,onClick:e=>{null==n||n(e),(0,o.h)({eventCategory:U,eventActionType:o.D.button,eventActionText:l||"",eventLabel:s||""})},...a})},J=(0,d.g)("header-popup","sc"),Q=Object.freeze({popup:"".concat(J,"__popup"),popupHeader:"".concat(J,"__popup-header"),popupClose:"".concat(J,"__popup-close"),body:"".concat(J,"__body")}),Y=e=>{let{isOpen:t,onClose:n,children:l,title:o}=e,a=(0,r._m)("l");return(0,i.jsxs)(u.P,{children:[!a&&(0,i.jsx)(u.U,{title:o,isOpen:t,onClose:n,children:l}),a&&t&&(0,i.jsxs)("div",{className:Q.popup,children:[(0,i.jsxs)("div",{className:Q.popupHeader,children:[o,(0,i.jsx)(q,{className:Q.popupClose,iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:n,eventActionText:"IconFdsCloseO"})]}),(0,i.jsx)("div",{className:Q.body,children:l})]})]})},K=(0,d.g)("start-choice-popup","sc"),X=Object.freeze({top:"".concat(K,"__top"),progress:"".concat(K,"__progress"),innerCircle:"".concat(K,"__inner-circle"),title:"".concat(K,"__title"),subtitle:"".concat(K,"__subtitle"),actions:"".concat(K,"__actions")}),ee=()=>{var e,t;let n=L(),[s,a]=(0,l.useState)(10),[c,r]=(0,l.useState)(0),u=(0,l.useRef)(void 0),d=()=>{y(o.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,l.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+s).slice(1)),t=1e3*e/100,n=0,i=0;u.current=setInterval(()=>{n++,i+=t,r(3.6*n);let l=e-Math.floor(i/1e3);l<s&&a(l),100===n&&(clearInterval(u.current),d())},t)})():(clearInterval(u.current),a(10),r(0))},[n.startPopupVisible]),(0,i.jsxs)(Y,{isOpen:n.startPopupVisible,onClose:d,title:(0,i.jsx)("button",{type:"button",className:X.progress,style:{background:"conic-gradient(#ff0508 ".concat(c,"deg, #e3e7ec 0deg)")},onClick:d,children:(0,i.jsx)("div",{className:X.innerCircle,children:s})}),children:[(0,i.jsxs)("div",{className:X.top,children:[(0,i.jsxs)("div",{className:X.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,i.jsx)("div",{className:X.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,i.jsxs)("div",{className:X.actions,children:[(0,i.jsx)(q,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{y(o.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,i.jsx)(q,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{y(o.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},et=(0,d.g)("city-select","sc"),en=Object.freeze({button:"".concat(et,"__button")}),ei=e=>{var t;let{initialTown:n}=e,l=L(),o=(null==(t=l.town)?void 0:t.name)||n||"Вся Россия";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.zx,{className:en.button,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>l.handleButtonClick(!1),iconLeft:(0,i.jsx)(s.IconFdsLocationO,{size:16}),label:o}),(0,i.jsx)(B,{}),(0,i.jsx)(ee,{})]})},el={"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"},eo=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(el,e)?el[e]:el["finuslugi.ru"]},es=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href="".concat(e,"/assets/css/").concat(t),document.head.appendChild(n);let i=document.createElement("script");i.src="".concat(e,"/get-bootstrap/").concat(t),i.defer=!0,document.body.appendChild(i)},ea=()=>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)}})}),ec=()=>{let[e,t]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(!1),s=e=>{o.current=e,i(e)};return(0,l.useEffect)(()=>{if(typeof window>"u")return;let e=eo(),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((l,a)=>{if(o.current){a(Error("chat is already opened"));return}i?(i.openWidget(),t(!1),l()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let o=document.querySelector(".webchat");o&&ea().observe(o,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),s(!1),t(!1),l()},es(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}},er=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),l=!1,o=0;window.addEventListener("scroll",function(){let s=window.scrollY||document.documentElement.scrollTop,a=window.innerWidth<768?55:80,c=s<((null==i?void 0:i.clientHeight)||0);if(n&&c||s<a){l=!1,e(!1),t(!0);return}l=s>o,e(s>o),l&&setTimeout(()=>t(!1),50);let r=l?"0px":"";document.documentElement.style.setProperty("--new-header-height-desktop",r),document.documentElement.style.setProperty("--new-header-height-mobile",r),o=s<=0?0:s})},eu=()=>{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},ed=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),ep=(e,t)=>{let n=new Date;n.setTime(n.getTime()+864e5*t);let i=encodeURIComponent(JSON.stringify(e));document.cookie="utm_params=".concat(i,";expires=").concat(n.toUTCString(),";path=/;SameSite=Lax")},eh=()=>{if(ed())return;let e=eu();e&&ep(e,90)},em=()=>{setTimeout(()=>{if(!(typeof document>"u"||!document.cookie))try{eh()}catch(e){console.error("UTM tracking error:",e)}},0)},ev=(e,t,n)=>(0,o.h)({eventCategory:U,eventActionType:e,eventActionText:t,eventLabel:n}),eg=(0,l.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});function ef(){return(0,l.useContext)(eg)}let ew=e=>{let[t,n]=(0,l.useState)(!1),[o,s]=(0,l.useState)(!1),[a,c]=(0,l.useState)(!!e.isMainBannerPage),{isChatModalOpen:r,setIsChatModalOpen:d,isChatLoading:p}=ec(),[h,m]=(0,l.useState)(null),[v,g]=(0,l.useState)(null),[f,w]=(0,l.useState)(!1),[_,x]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),C=(0,l.useRef)(null),k=(0,u.u)(f),N=(0,l.useRef)(null),O=(0,l.useRef)(null),y=(0,l.useCallback)(()=>{k.current&&k.current.scrollTo({top:0})},[k]),T=(0,l.useCallback)(e=>{g(e),y()},[y]),S=(0,l.useCallback)(e=>{N.current&&clearTimeout(N.current),e&&x(!0),e||(N.current=setTimeout(()=>{x(!1),T(null)},300))},[T]),I=(0,l.useCallback)((e,t,n)=>{if(t&&T(t),!n&&e===h||!e){S(!f),w(!f);return}m(e),S(!0),w(!0)},[h,T,f,S]),A=(0,l.useCallback)(()=>{O.current&&clearTimeout(O.current),j(!0),O.current=setTimeout(()=>{j(!1)},650)},[]);return(0,l.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id")),er(s,c,e.isMainBannerPage),em()},[]),(0,i.jsx)("div",{children:(0,i.jsx)(eg.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:a,openedBlock:h,setOpenedBlock:I,openedSection:v,setOpenedSection:T,isNavigationOpen:f,isNavigationMounted:_,navMenuItemsRef:C,navigationRef:k,ignoreClicks:b,setIgnoreClicks:A,isChatModalOpen:r,setIsChatModalOpen:d,isChatLoading:p},children:e.children})})},e_=(0,d.g)("header-chat-modal-body","sc"),ex=Object.freeze({wrapper:"".concat(e_,"__wrapper"),cardButton:"".concat(e_,"__card-button"),card:"".concat(e_,"__card"),cardTitle:"".concat(e_,"__card-title"),cardSubtitle:"".concat(e_,"__card-subtitle"),button:"".concat(e_,"__button")}),eb=()=>{let e=ef();return(0,i.jsxs)("div",{className:ex.wrapper,children:[(0,i.jsx)(q,{className:ex.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,i.jsxs)(a.Zb,{className:ex.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:ex.cardTitle,children:[(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat"}),"Напишите в чат"]}),(0,i.jsxs)("p",{className:ex.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,i.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),(0,i.jsx)(q,{as:"a",href:"https://finuslugi.ru/landing/fingpt",target:"_blank",className:ex.button,variant:"secondary",size:"s",iconLeft:(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/robot_icon_hover.svg",alt:"robot"}),eventActionText:"Новости от ФинGPT",children:"Новости от ФинGPT"})]})},ej=(0,d.g)("header-chat-modal","sc"),eC=Object.freeze({wrapper:"".concat(ej,"__wrapper")}),ek=()=>{let e=ef();return(0,i.jsx)(u.P,{children:(0,i.jsx)(Y,{isOpen:e.isChatModalOpen,onClose:()=>e.setIsChatModalOpen(!1),title:"Нужна помощь?",children:(0,i.jsx)("div",{className:eC.wrapper,children:(0,i.jsx)(eb,{})})})})},eN=e=>{let{onClick:t,eventActionType:n,eventActionText:l,eventLabel:s,...a}=e;return(0,i.jsx)(r.rU,{onClick:e=>{null==t||t(e),(0,o.h)({eventCategory:U,eventActionType:n||o.D.link,eventActionText:l||"",eventLabel:s||""})},...a})},eO=e=>{let{data:t,isMobile:n}=e,a=ef();return(0,i.jsx)("div",{className:w.contentWrapper,children:t.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>(0,i.jsxs)("div",{className:(0,c.Z)(w.content,{[w.hidden]:a.openedSection!==e.id,[w.contentOpen]:!!a.openedSection}),children:[(0,i.jsx)("div",{className:w.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),e.content.map((t,l)=>{var a,r;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,c.Z)(w.contentTitle,{[w.removed]:!t.title,[w.contentTitleUrl]:!!t.url,[w.contentTitleLink]:!!e.isSeeAllLinkAvailable,[w.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:w.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),t.title]})})}),!(null!=(a=t.links)&&a.length)&&(0,i.jsx)(x,{items:t.chips||[],maxNumberOfLines:e.content.length<=1?99:n?3:2}),!!(null!=(r=t.links)&&r.length)&&(0,i.jsx)("div",{className:(0,c.Z)(w.links,{[w.linksColumns]:!!t.columns,[w.linksTitleless]:!t.title}),children:t.links.map(e=>(0,i.jsxs)("a",{href:e.url,className:(0,c.Z)({[w.new]:!!e.new}),onClick:()=>m(o.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,i.jsx)("div",{className:w.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),(0,i.jsx)("span",{children:e.title})]},e.url))})]},"".concat(t.url,"_").concat(l))})]},e.id))},e.id))})},ey=(0,d.g)("navigation-section-icon","sc"),eT=Object.freeze({icon:"".concat(ey)}),eS=e=>{let{name:t,background:n}=e,o=(0,l.useMemo)(()=>t&&s[t]||null,[t]);return t&&o?(0,i.jsx)("div",{className:eT.icon,style:{background:n},children:(0,i.jsx)(o,{})}):null},eI=e=>{var t;let{data:n}=e,u=ef(),d=L(),p=(0,r.aF)("m"),[v,g]=(0,l.useState)(!0);(0,l.useEffect)(()=>{g(p)},[p]);let f=(0,l.useRef)(null),w=(0,l.useCallback)(()=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>u.openedSection?u.setOpenedSection(null):u.isNavigationOpen?u.setOpenedBlock(null):void 0,50)},[u]),_=(0,l.useRef)(!1),x=(0,l.useRef)(null),b=(0,l.useCallback)(()=>{v&&(_.current=!0,x.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),w()},window.history.pushState(null,"",window.location.href))},[w,v]),j=(0,l.useCallback)(()=>{_.current=!1,window.onpopstate=x.current,window.history.go(-1)},[]),C=(0,l.useRef)(null),k=(0,l.useCallback)(e=>{if(v||!u.navMenuItemsRef.current||!u.navigationRef.current)return;let t=e.target,n=!u.navMenuItemsRef.current.contains(t)&&!u.navigationRef.current.contains(t);if(n&&!C.current){u.setIgnoreClicks(),C.current=setTimeout(()=>u.setOpenedBlock(null),300);return}!n&&C.current&&(clearTimeout(C.current),C.current=null)},[v,u]),N=(0,l.useRef)(null),O=(0,l.useCallback)(e=>{typeof window>"u"||(e?(N.current=k,window.addEventListener("mousemove",N.current)):N.current&&window.removeEventListener("mousemove",N.current))},[k]);(0,l.useEffect)(()=>{O(u.isNavigationOpen),u.isNavigationOpen&&!_.current&&b(),!u.isNavigationOpen&&_.current&&j()},[u.isNavigationOpen]);let y=(e,t)=>()=>{m(o.D.button,t),u.setOpenedSection(e)},{start:T,clear:S}=F(),I=(e,t)=>()=>{v||T(y(e,t),200)},A=()=>{v||S()};return(0,i.jsx)("div",{ref:u.navigationRef,className:(0,c.Z)(h.navigation,{[h.removed]:!u.isNavigationMounted,[h.navigationOpening]:u.isNavigationOpen,[h.navigationClosing]:!u.isNavigationOpen}),children:(0,i.jsx)("div",{className:h.wrapper,children:(0,i.jsxs)(a.W2,{className:(0,c.Z)(h.container,{[h.containerOpen]:!!u.openedSection}),children:[(0,i.jsxs)("div",{className:(0,c.Z)(h.sections,{[h.sectionsOpen]:!!u.openedSection}),children:[(0,i.jsx)(r.zx,{className:h.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>d.handleButtonClick(!1),iconLeft:(0,i.jsx)(s.IconFdsLocationO,{size:24}),label:(null==(t=d.town)?void 0:t.name)||"Вся Россия"}),n.map(e=>(0,i.jsxs)("ul",{className:(0,c.Z)(h.sectionsWrapper,{[h.removed]:u.openedBlock!==e.id&&!v}),children:[(0,i.jsx)("div",{className:h.sectionsTitle,children:G[e.id]}),e.sections.map(e=>(0,i.jsxs)("li",{className:(0,c.Z)(h.section,{[h.sectionExtra]:!!e.extra,[h.sectionActive]:u.openedSection===e.id}),onClick:y(e.id,e.title),onMouseEnter:I(e.id,e.title),onMouseLeave:A,children:[(0,i.jsx)(eS,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:h.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:h.sectionArrow,children:(0,i.jsx)(s.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,i.jsxs)("div",{className:h.chatWrapper,children:[(0,i.jsx)("div",{className:h.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(eb,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,c.Z)(h.backButton,{[h.removed]:!u.openedSection}),onClick:()=>{m(o.D.button,"Назад"),u.setOpenedSection(null)},children:[(0,i.jsx)(s.IconFdsChevronLeftO,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eO,{data:n,isMobile:v}),(0,i.jsxs)("div",{className:(0,c.Z)(h.useful,{[h.usefulOpen]:!!u.openedSection}),children:[(0,i.jsx)("div",{className:h.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,i.jsx)(l.Fragment,{children:e.sections.map(e=>(0,i.jsx)("div",{className:(0,c.Z)(h.usefulGrid,{[h.removed]:u.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>m(o.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,i.jsx)("div",{children:(0,i.jsx)("img",{src:e.icon,srcSet:e.icon2?"".concat(e.icon,", ").concat(e.icon2," 2x"):void 0,alt:"icon",loading:"lazy"})}),(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},"".concat(e.title,"_").concat(t)))},e.id))},e.id))]})]})})})},eA=(e,t,n)=>{var i,l,o;let s=(null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex(e=>{let{id:t}=e;return"news"===t}))||-1,a=(null==(o=null==(l=null==e?void 0:e.NAVIGATOR)?void 0:l[s])?void 0:o.content)||[];if(e&&Array.isArray(n)&&a.length){let i=n.map(e=>{let{title:n,url:i}=e;return{title:n,url:(0,b.xn)(t||"",i),new:0}});e.NAVIGATOR[s].content[0].links=i}return[{id:"FINPRODUCTS",sections:(null==e?void 0:e.FINPRODUCTS)||[]},{id:"NAVIGATOR",sections:(null==e?void 0:e.NAVIGATOR)||[]},{id:"ABOUT",sections:(null==e?void 0:e.ABOUT)||[]}]},eZ=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:r="https://assets.finuslugi.ru/mp-assets",lkUrl:u="https://lk.finuslugi.ru/registration",initialTown:d,isMainBannerPage:p,news:h}=e,m=ef(),v=eA(t,n,h),g=(0,l.useMemo)(()=>v.reduce((e,t)=>(e[t.id]=t.sections[0].id,e),{}),[v]),f=m.isAuth?"Личный кабинет":"Войти",w=p&&m.isHeaderTransparent,_=(e,t,n,i)=>()=>{ev(o.D.toggle,t,String(e!==m.openedBlock));let l=n?g[e]:"";m.setOpenedBlock(e,l,!!i)},{start:x,clear:b}=F(),j=(e,t,n,i)=>()=>{m.isNavigationOpen&&e===m.openedBlock||m.setIgnoreClicks(),x(_(e,t,n,i),200)},C=e=>()=>{m.ignoreClicks||e()},k=e=>m.openedBlock===e&&m.isNavigationOpen;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("header",{className:(0,c.Z)(W.header,{[W.transparent]:w}),children:(0,i.jsx)("div",{className:(0,c.Z)(W.fixed,{[W.hidden]:m.isHeaderHidden,[W.navigationOpen]:m.isNavigationOpen}),children:(0,i.jsxs)(a.W2,{className:W.container,children:[(0,i.jsxs)("div",{className:W.leftRow,children:[(0,i.jsxs)(eN,{className:W.logo,href:n,eventActionType:o.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(n),children:[(0,i.jsx)(V,{className:W.logoMobile}),(0,i.jsx)(M,{className:W.logoDesk})]}),(0,i.jsx)("nav",{ref:m.navMenuItemsRef,className:W.menuItems,children:(0,i.jsx)("ul",{children:H.map(e=>{let{id:t,label:n}=e;return(0,i.jsx)("li",{children:(0,i.jsx)(q,{className:(0,c.Z)({[W.menuItemActive]:k(t)}),label:n,eventActionText:n,variant:"white",size:"xs",onClick:C(_(t,n,!0)),onMouseEnter:j(t,n,!0,!0),onMouseLeave:b})},t)})})}),(0,i.jsx)(q,{className:(0,c.Z)(W.tabletMenuButton,{[W.menuItemActive]:m.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(s.IconFdsChevronDownO,{size:24}),onClick:_("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:W.buttonGroup,children:[(0,i.jsxs)("div",{className:W.chips,children:[(0,i.jsx)(q,{onClick:()=>m.setIsChatModalOpen(!m.isChatModalOpen),size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,i.jsx)(s.IconFdsChatDotsCircleO,{size:24})}),(0,i.jsx)(q,{as:"a",href:u,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:"profile_".concat(u),iconLeft:(0,i.jsx)(s.IconFdsUserO,{size:24})})]}),(0,i.jsx)(q,{className:W.menuButton,size:"xs",shape:w?"icon":"default",appearance:w?"ghost":"fill",label:"Меню",onClick:_("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(s.IconFdsMenuSkewedO,{size:24})}),(0,i.jsxs)("div",{className:W.moreButtons,children:[(0,i.jsx)(ei,{initialTown:d}),(0,i.jsx)(ek,{}),(0,i.jsx)(q,{onClick:()=>m.setIsChatModalOpen(!m.isChatModalOpen),size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,i.jsx)(s.IconFdsChatDotsCircleO,{size:24})}),(0,i.jsx)(q,{as:"a",href:u,size:"xs",eventActionText:f,eventLabel:"".concat(f,"_").concat(u),label:f})]})]}),(0,i.jsxs)(eN,{className:W.auth,href:u,eventActionText:f,eventLabel:"".concat(f,"_").concat(u),children:[(0,i.jsx)(q,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsUserO,{}),eventActionText:f,eventLabel:"".concat(f,"_").concat(u)}),(0,i.jsx)("p",{children:f})]}),(0,i.jsx)("div",{className:W.close,children:(0,i.jsx)(q,{className:W.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),onClick:()=>m.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})})}),(0,i.jsx)("div",{className:(0,c.Z)(W.overlay,{[W.removed]:!m.isNavigationMounted,[W.overlayOpening]:m.isNavigationOpen,[W.overlayClosing]:!m.isNavigationOpen}),onClick:C(()=>m.setOpenedBlock(null))}),(0,i.jsx)(eI,{data:v,minioUrl:r})]})},eL=e=>(0,i.jsx)(ew,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(eZ,{...e})})}}]);