(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[814],{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 o=n(2265),l=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 o.createElement(l.IntlProvider,i({locale:t},n))}},24232:function(e,t,n){"use strict";n.d(t,{default:function(){return o.a}});var i=n(24930),o=n.n(i)},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)},24930:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let i=n(86921);n(57437),n(2265);let o=i._(n(84795));function l(e,t){let n={loading:e=>{let{error:t,isLoading:n,pastDelay:i}=e;return null}};return"function"==typeof e&&(n.loader=e),(0,o.default)({...n,...t})}("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)},19721:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let i=n(99775);function o(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new i.BailoutToCSRError(t);return n}},84795:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}});let i=n(57437),o=n(2265),l=n(19721);function s(e){var t;return{default:null!=(t=null==e?void 0:e.default)?t:e}}let a={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},r=function(e){let t={...a,...e},n=(0,o.lazy)(()=>t.loader().then(s)),r=t.loading;function c(e){let s=r?(0,i.jsx)(r,{isLoading:!0,pastDelay:!0,error:null}):null,a=t.ssr?(0,i.jsx)(n,{...e}):(0,i.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,i.jsx)(n,{...e})});return(0,i.jsx)(o.Suspense,{fallback:s,children:a})}return c.displayName="LoadableComponent",c}},43570:function(){},49928:function(){},34380:function(){},85530:function(){},89464:function(){},52116:function(e,t,n){"use strict";n.r(t),n.d(t,{CookiesPlate:function(){return d}});var i=n(57437),o=n(26094),l=n(75504),s=n(2265),a=n(63919);let r={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=>{r.setItem(e,"",{"max-age":-1})}},c=(0,a.g)("cookies-plate","sc"),u=Object.freeze({wrapper:"".concat(c,"__wrapper"),contentWrapper:"".concat(c,"__content-wrapper"),visible:"".concat(c,"--visible"),hidden:"".concat(c,"--hidden"),content:"".concat(c,"__content"),text:"".concat(c,"__text"),link:"".concat(c,"__link"),button:"".concat(c,"__button")}),d=e=>{let{className:t,mountDelay:n=3e3,href:a="https://assets.finuslugi.ru/mp-assets/user-agreement.pdf",children:c,closeIcon:d,onMount:p,onLinkClick:h,onClose:m,mountAfterScroll:f=!0}=e,[g,v]=(0,s.useState)(!1),[w,_]=(0,s.useState)(!1),[x,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{document.removeEventListener("scroll",e),r.getItem("Allow-Cookie")||(b(!0),setTimeout(()=>{v(!0),null==p||p()},n))};return f?document.addEventListener("scroll",e):e(),()=>document.removeEventListener("scroll",e)},[]);let j=(0,s.useCallback)(()=>{r.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,l.Z)(u.contentWrapper,{[u.visible]:g,[u.hidden]:w}),children:(0,i.jsxs)("div",{className:(0,l.Z)(t,u.content),children:[c||(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)(o.IconFdsCloseO,{})})]})})}):(0,i.jsx)(i.Fragment,{})}},4479:function(e,t,n){"use strict";n.r(t),n.d(t,{CitySelectProvider:function(){return U},Header:function(){return eI},useCitySelectContext:function(){return W}});var i=n(57437),o=n(2265),l=n(22331),s=n(26094),a=n(32833),r=n(61810),c=n(75504),u=n(24866),d=n(682),p=n(63919);let h=(0,p.g)("header","sc"),m=Object.freeze({header:`${h}`,fixed:`${h}__fixed`,hidden:`${h}__fixed--hidden`,transparent:`${h}--transparent`,navigationOpen:`${h}__navigation-open`,container:`${h}__container`,leftRow:`${h}__left-row`,logo:`${h}__logo`,menuItems:`${h}__menu-items`,menuItemActive:`${h}__menu-item-active`,tabletMenuButton:`${h}__tablet-menu-button`,buttonGroup:`${h}__button-group`,chips:`${h}__chips`,menuButton:`${h}__menu-button`,moreButtons:`${h}__more-buttons`,auth:`${h}__auth`,close:`${h}__close`,removed:`${h}__removed`,overlay:`${h}__overlay`,overlayOpening:`${h}__overlay--opening`,overlayClosing:`${h}__overlay--closing`}),f="cb-header",g=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],v=g.reduce((e,t)=>(e[t.id]=t.label,e),{}),w=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),o=!1,l=0;window.addEventListener("scroll",function(){let s=window.scrollY||document.documentElement.scrollTop,a=window.innerWidth<768?55:80,r=s<((null==i?void 0:i.clientHeight)||0);if(n&&r||s<a){o=!1,e(!1),t(!0);return}o=s>l,e(s>l),o&&setTimeout(()=>t(!1),50);let c=o?"0px":"";document.documentElement.style.setProperty("--new-header-height-desktop",c),document.documentElement.style.setProperty("--new-header-height-mobile",c),l=s<=0?0:s})},_=()=>{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},x=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),b=(e,t)=>{let n=new Date;n.setTime(n.getTime()+864e5*t);let i=encodeURIComponent(JSON.stringify(e));document.cookie=`utm_params=${i};expires=${n.toUTCString()};path=/;SameSite=Lax`},j=()=>{if(x())return;let e=_();e&&b(e,90)},C=()=>{setTimeout(()=>{if(!(typeof document>"u"||!document.cookie))try{j()}catch(e){console.error("UTM tracking error:",e)}},0)},k=(e,t,n)=>(0,l.h)({eventCategory:f,eventActionType:e,eventActionText:t,eventLabel:n}),y=(0,p.g)("navigation-chips","sc"),N=Object.freeze({wrapper:`${y}__wrapper`,gray:`${y}__variantGray`,white:`${y}__variantWhite`,container:`${y}__container`,chip:`${y}__chip`,more:`${y}__chip--more`,active:`${y}__chip--active`,label:`${y}__label`,hidden:`${y}__hidden`}),O=(0,p.g)("navigation-content","sc"),T=Object.freeze({contentWrapper:`${O}__content-wrapper`,content:`${O}__content`,contentOpen:`${O}__content--open`,contentHeader:`${O}__content-header`,contentTitle:`${O}__content-title`,contentTitleUrl:`${O}__content-title--url`,contentTitleLink:`${O}__content-title--link`,contentTitleNew:`${O}__content-title--new`,new:`${O}__new`,vip:`${O}__vip`,arrowIcon:`${O}__arrow-icon`,links:`${O}__links`,linksColumns:`${O}__links--columns`,linksTitleless:`${O}__links--titleless`,removed:`${O}__removed`,hidden:`${O}__content--hidden`}),S=({chip:e,hidden:t,onClick:n,refCallback:o,activeChipId:a})=>{let r=!!n,u=()=>{if(r)return null==n?void 0:n(e.url);k(l.D.chip,e.title,`${e.title}_${e.url}`)},d=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:N.label,children:e.title}),e.arrow&&(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,c.Z)(N.chip,{[N.hidden]:t,[T.new]:!!e.new,[T.vip]:!!e.vip,[N.active]:e.url===a});return r?(0,i.jsx)("button",{type:"button",className:p,onClick:u,ref:o,children:d}):(0,i.jsx)("a",{href:e.url,className:p,onClick:u,ref:o,children:d})},I=({items:e=[],maxNumberOfLines:t,variant:n,className:a,activeChipId:r,onClick:u})=>{let d=(0,o.useRef)(null),p=(0,o.useRef)(null),h=(0,o.useRef)({}),[m,f]=(0,o.useState)(!1),[g,v]=(0,o.useState)(e.length),[w,_]=(0,o.useState)(!1);(0,o.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 x=(0,o.useCallback)(()=>{let n=d.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,o=i(n),l=Math.max(Number(t)||0,0),s=()=>{v(e.length),_(!1)};if(m||0===l||o<=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}})(),r=i(p.current),c=e.map(e=>i(h.current[e.url]));if(c.some(e=>0===e)){s();return}let u=1,f=0,g=0;for(let e of c){let t=u===l?r+a:0,n=0===f?e:f+a+e;if(n+t<=o-.5)f=n,g++;else{if(++u>l)break;f=e,g++}}_(g<e.length),v(g)},[m,e,t]);(0,o.useLayoutEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(x)});return t.observe(e),requestAnimationFrame(x),()=>{t.disconnect()}},[x]),(0,o.useEffect)(()=>{requestAnimationFrame(x)},[x]);let b=m||(t??0)<=0||!w;return(0,i.jsx)("div",{className:(0,c.Z)(a,N.wrapper,{[N.gray]:"gray"===n,[N.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:d,className:N.container,children:[e.map((e,t)=>(0,i.jsx)(S,{chip:e,hidden:!b&&t>=g,activeChipId:r,onClick:u,refCallback:t=>{h.current[e.url]=t}},e.url)),!b&&w&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(N.chip,N.more),onClick:()=>{k(l.D.chip,"Еще"),f(!0)},children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:N.label,children:"Еще"})]}),(b||!w)&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,c.Z)(N.chip,N.more,N.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,i.jsx)(s.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:N.label,children:"Еще"})]})]})})},A=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},R=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=A("all_regions")||[];return window.allRegions=e,e},L=e=>{let t={};return e.map(e=>{let{id:n,name:i,towns:o}=e;return o.forEach(e=>{e.parentId=n,t[e.name]=t[e.name]||{},t[e.name][e.id]=i}),o}).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},M=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)},P=async e=>{let t=null;try{t=await (await fetch("".concat(e),{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},z=(e,t,n)=>{(0,l.h)({eventCategory:F,eventActionType:e,eventActionText:t,eventLabel:n})},$=R(),B=L($),E={regions:$,towns:B,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},F="finkit-widgets-sc-city-select",D=(0,o.createContext)(E);function W(){return(0,o.useContext)(D)}let U=e=>{let{children:t,showStartGeoPopup:n=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:a="https://finuslugi.ru/backend/money/dadata"}=e,r=Number(A("lastRegionsUpdateUnixTimestamp")||0),c=Number(s||0)>r,[u,d]=(0,o.useState)(R()),[{startRegion:p,startTown:h},m]=(0,o.useState)({startRegion:E.startRegion,startTown:E.startTown}),[{region:f,town:g},v]=(0,o.useState)({region:E.region,town:E.town}),[w,_]=(0,o.useState)(E.startPopupVisible),[x,b]=(0,o.useState)(E.popupVisible),j=(0,o.useRef)(""),C=(0,o.useMemo)(()=>L(u),[u.length]),k=(0,o.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]),y=(0,o.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||k(e,t)},[k]),N=(0,o.useCallback)(()=>{if(j.current&&!f&&!g){var e,t;let n=null!==(e=C.find(e=>e.name===j.current))&&void 0!==e?e:null;return y(null!==(t=u.find(e=>e.id===(null==n?void 0:n.parentId)))&&void 0!==t?t:null,n)}y(f,g)},[f,g,C,u,y]),O=(0,o.useCallback)(e=>{b(e)},[b]),T=(0,o.useCallback)(e=>{e?z(l.D.icon,"location"):z(l.D.button,(null==g?void 0:g.name)||"Вся Россия"),!n||window.sessionStorage.getItem("start_popup_opened")?O(!0):N()},[n,g,O,N]),S=(0,o.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","")),v({region:e||null,town:t||null}),_(!1),O(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[O]),I=()=>{v({region:A("user_region"),town:A("user_town")});let e=async e=>{let{coords:{latitude:t,longitude:n}}=e,i="".concat(a,"?lat=").concat(t,"&lon=").concat(n),o=await P(i);null!=o&&o.location&&(j.current=o.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&n)try{navigator.geolocation.getCurrentPosition(e,()=>null)}catch(e){}};return(0,o.useEffect)(()=>{if((u.length<1||c)&&M().then(e=>d(e)),window.innerWidth<1024){let e=()=>{I(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{I()},0)},[]),(0,i.jsx)(D.Provider,{value:{regions:u,towns:C,region:f,town:g,startPopupVisible:w,setStartPopupVisible:_,popupVisible:x,handleToggleModal:O,selectCity:S,handleButtonClick:T,startRegion:p,startTown:h},children:t})},Z=()=>{let e=(0,o.useRef)(null),t=(0,o.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,o.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,o.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},V=(0,p.g)("city-select-modal-body","sc"),G=Object.freeze({wrapper:"".concat(V,"__wrapper"),subtitle:"".concat(V,"__subtitle"),hintWrapper:"".concat(V,"__hint-wrapper"),hintText:"".concat(V,"__hint-text"),input:"".concat(V,"__input"),chips:"".concat(V,"__chips"),townsListWrapper:"".concat(V,"__towns-list-wrapper"),townsList:"".concat(V,"__towns-list"),townsGroup:"".concat(V,"__towns-group"),townsGroupLabel:"".concat(V,"__towns-group-label"),townsGroupList:"".concat(V,"__towns-group-list"),townsName:"".concat(V,"__towns-name"),regionName:"".concat(V,"__region-name")}),H=e=>{var t;let{groupedTowns:n,chips:a,query:c,setQuery:u,isDrawer:d}=e,p=W(),h=(0,o.useRef)(null),[m,f]=(0,o.useState)("10000px");(0,o.useEffect)(()=>{if(!d||!h.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,i)=>{let o=n.map(e=>[...e]),l=o.map(e),s=l.reduce((e,t,n)=>t<l[e]?n:e,0);0===s&&o[0].push(o[1].shift()),2===s&&o[2].unshift(o[1].pop()),1===s&&l[0]>l[2]&&o[1].unshift(o[0].pop()),1===s&&l[0]<l[2]&&o[1].push(o[2].shift());let a=Math.max(...o.map(e));return a>=i?i:t(o,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&&f("".concat(i,"px"))}).observe(h.current)},[]);let g=e=>{if(z(l.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:G.wrapper,children:[(0,i.jsxs)("div",{className:G.subtitle,children:["Покажем предложения рядом с вами",(0,i.jsxs)("div",{className:G.hintWrapper,children:[(0,i.jsx)(s.IconFdsQuestionCircleO,{size:24}),(0,i.jsx)("div",{className:G.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,i.jsx)(r.MA,{className:G.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:G.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:G.townsListWrapper,children:(0,i.jsx)("div",{ref:h,className:G.townsList,style:{maxHeight:m},children:n.map(e=>(0,i.jsxs)("div",{className:G.townsGroup,children:[(0,i.jsx)("div",{className:G.townsGroupLabel,children:e.letter}),(0,i.jsx)("div",{className:G.townsGroupList,children:e.towns.map(e=>(0,i.jsxs)("button",{type:"button",onClick:()=>g(e),children:[(0,i.jsx)("div",{className:G.townsName,children:e.name}),(0,i.jsx)("div",{className:G.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},q=[1095,1096,134,720,189,180],J=()=>{var e;let t=W(),n=(0,r._m)("l"),[s,a]=(0,o.useState)(""),c="Ваш выбор: ".concat((null==(e=t.town)?void 0:e.name)||"Вся Россия"),u=(0,o.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,o.useMemo)(()=>[{id:0,label:"Вся Россия"},...q.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=()=>{z(l.D.button,"close"),t.handleToggleModal(!1)};return(0,i.jsxs)(d.P,{children:[!n&&(0,i.jsx)(d.U,{title:c,isOpen:t.popupVisible,onClose:h,full:!0,children:(0,i.jsx)(H,{groupedTowns:u,chips:p,query:s,setQuery:a})}),n&&(0,i.jsx)(d.D,{title:c,isOpen:t.popupVisible,onClose:h,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,i.jsx)(H,{groupedTowns:u,chips:p,query:s,setQuery:a,isDrawer:!0})})]})},Q=e=>{let{label:t,onClick:n,eventActionText:o,eventLabel:s,...a}=e;return(0,i.jsx)(r.zx,{label:t,onClick:e=>{null==n||n(e),(0,l.h)({eventCategory:f,eventActionType:l.D.button,eventActionText:o||"",eventLabel:s||""})},...a})},Y=(0,p.g)("header-popup","sc"),K=Object.freeze({popup:"".concat(Y,"__popup"),popupHeader:"".concat(Y,"__popup-header"),popupClose:"".concat(Y,"__popup-close"),body:"".concat(Y,"__body")}),X=e=>{let{isOpen:t,onClose:n,children:o,title:l}=e,a=(0,r._m)("l");return(0,i.jsxs)(d.P,{children:[!a&&(0,i.jsx)(d.U,{title:l,isOpen:t,onClose:n,children:o}),a&&t&&(0,i.jsxs)("div",{className:K.popup,children:[(0,i.jsxs)("div",{className:K.popupHeader,children:[l,(0,i.jsx)(Q,{className:K.popupClose,iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:n,eventActionText:"IconFdsCloseO"})]}),(0,i.jsx)("div",{className:K.body,children:o})]})]})},ee=(0,p.g)("start-choice-popup","sc"),et=Object.freeze({top:"".concat(ee,"__top"),progress:"".concat(ee,"__progress"),innerCircle:"".concat(ee,"__inner-circle"),title:"".concat(ee,"__title"),subtitle:"".concat(ee,"__subtitle"),actions:"".concat(ee,"__actions")}),en=()=>{var e,t;let n=W(),[s,a]=(0,o.useState)(10),[r,c]=(0,o.useState)(0),u=(0,o.useRef)(void 0),d=()=>{z(l.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,o.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+s).slice(1)),t=1e3*e/100,n=0,i=0;u.current=setInterval(()=>{n++,i+=t,c(3.6*n);let o=e-Math.floor(i/1e3);o<s&&a(o),100===n&&(clearInterval(u.current),d())},t)})():(clearInterval(u.current),a(10),c(0))},[n.startPopupVisible]),(0,i.jsxs)(X,{isOpen:n.startPopupVisible,onClose:d,title:(0,i.jsx)("button",{type:"button",className:et.progress,style:{background:"conic-gradient(#ff0508 ".concat(r,"deg, #e3e7ec 0deg)")},onClick:d,children:(0,i.jsx)("div",{className:et.innerCircle,children:s})}),children:[(0,i.jsxs)("div",{className:et.top,children:[(0,i.jsxs)("div",{className:et.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,i.jsx)("div",{className:et.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,i.jsxs)("div",{className:et.actions,children:[(0,i.jsx)(Q,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{z(l.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,i.jsx)(Q,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{z(l.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ei=(0,p.g)("city-select","sc"),eo=Object.freeze({button:"".concat(ei,"__button")}),el=e=>{var t;let{initialTown:n}=e,o=W(),l=(null==(t=o.town)?void 0:t.name)||n||"Вся Россия";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.zx,{className:eo.button,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>o.handleButtonClick(!1),iconLeft:(0,i.jsx)(s.IconFdsLocationO,{size:16}),label:l}),(0,i.jsx)(J,{}),(0,i.jsx)(en,{})]})},es={"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"},ea=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(es,e)?es[e]:es["finuslugi.ru"]},er=(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)},ec=()=>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)}})}),eu=()=>{let[e,t]=(0,o.useState)(!1),[n,i]=(0,o.useState)(!1),l=(0,o.useRef)(!1),s=e=>{l.current=e,i(e)};return(0,o.useEffect)(()=>{if(typeof window>"u")return;let e=ea(),n="webchat_main";window.supportWidget={craftTalk:{isOpened:!1,setConfig:t=>{if(t.host&&(e=t.host),t.channel&&(n=t.channel),t.user){let e="function"==typeof t.user?t.user:()=>({...t.user});window.__WebchatUserCallback=e}},open:()=>new Promise(e=>{e()}),close:()=>null,toggle:()=>null}};let i=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((o,a)=>{if(l.current){a(Error("chat is already opened"));return}i?(i.openWidget(),t(!1),o()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let l=document.querySelector(".webchat");l&&ec().observe(l,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),s(!1),t(!1),o()},er(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}},ed=(0,o.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 ep(){return(0,o.useContext)(ed)}let eh=e=>{let[t,n]=(0,o.useState)(!1),[l,s]=(0,o.useState)(!1),[a,r]=(0,o.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p}=eu(),[h,m]=(0,o.useState)(null),[f,g]=(0,o.useState)(null),[v,_]=(0,o.useState)(!1),[x,b]=(0,o.useState)(!1),[j,k]=(0,o.useState)(!1),y=(0,o.useRef)(null),N=(0,d.u)(v),O=(0,o.useRef)(null),T=(0,o.useRef)(null),S=(0,o.useCallback)(()=>{N.current&&N.current.scrollTo({top:0})},[N]),I=(0,o.useCallback)(e=>{g(e),S()},[S]),A=(0,o.useCallback)(e=>{O.current&&clearTimeout(O.current),e&&b(!0),e||(O.current=setTimeout(()=>{b(!1),I(null)},300))},[I]),R=(0,o.useCallback)((e,t,n)=>{if(t&&I(t),!n&&e===h||!e){A(!v),_(!v);return}m(e),A(!0),_(!0)},[h,I,v,A]),L=(0,o.useCallback)(()=>{T.current&&clearTimeout(T.current),k(!0),T.current=setTimeout(()=>{k(!1)},650)},[]);return(0,o.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id")),w(s,r,e.isMainBannerPage),C()},[]),(0,i.jsx)("div",{children:(0,i.jsx)(ed.Provider,{value:{isAuth:t,isHeaderHidden:l,isHeaderTransparent:a,openedBlock:h,setOpenedBlock:R,openedSection:f,setOpenedSection:I,isNavigationOpen:v,isNavigationMounted:x,navMenuItemsRef:y,navigationRef:N,ignoreClicks:j,setIgnoreClicks:L,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p},children:e.children})})},em=(0,p.g)("header-chat-modal-body","sc"),ef=Object.freeze({wrapper:"".concat(em,"__wrapper"),cardButton:"".concat(em,"__card-button"),card:"".concat(em,"__card"),cardTitle:"".concat(em,"__card-title"),cardSubtitle:"".concat(em,"__card-subtitle"),button:"".concat(em,"__button")}),eg=()=>{let e=ep();return(0,i.jsxs)("div",{className:ef.wrapper,children:[(0,i.jsx)(Q,{className:ef.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:ef.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:ef.cardTitle,children:[(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat"}),"Напишите в чат"]}),(0,i.jsxs)("p",{className:ef.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:ef.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"})]})},ev=(0,p.g)("header-chat-modal","sc"),ew=Object.freeze({wrapper:"".concat(ev,"__wrapper")}),e_=()=>{let e=ep();return(0,i.jsx)(d.P,{children:(0,i.jsx)(X,{isOpen:e.isChatModalOpen,onClose:()=>e.setIsChatModalOpen(!1),title:"Нужна помощь?",children:(0,i.jsx)("div",{className:ew.wrapper,children:(0,i.jsx)(eg,{})})})})},ex=e=>{let{onClick:t,eventActionType:n,eventActionText:o,eventLabel:s,...a}=e;return(0,i.jsx)(r.rU,{onClick:e=>{null==t||t(e),(0,l.h)({eventCategory:f,eventActionType:n||l.D.link,eventActionText:o||"",eventLabel:s||""})},...a})},eb=e=>{let{data:t,isMobile:n}=e,a=ep();return(0,i.jsx)("div",{className:T.contentWrapper,children:t.map(e=>(0,i.jsx)(o.Fragment,{children:e.sections.map(e=>(0,i.jsxs)("div",{className:(0,c.Z)(T.content,{[T.hidden]:a.openedSection!==e.id,[T.contentOpen]:!!a.openedSection}),children:[(0,i.jsx)("div",{className:T.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),e.content.map((t,o)=>{var a,r;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,c.Z)(T.contentTitle,{[T.removed]:!t.title,[T.contentTitleUrl]:!!t.url,[T.contentTitleLink]:!!e.isSeeAllLinkAvailable,[T.contentTitleNew]:!!t.new}),href:e.isSeeAllLinkAvailable?t.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:T.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),t.title]})})}),!(null!=(a=t.links)&&a.length)&&(0,i.jsx)(I,{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)(T.links,{[T.linksColumns]:!!t.columns,[T.linksTitleless]:!t.title}),children:t.links.map(e=>(0,i.jsxs)("a",{href:e.url,className:(0,c.Z)({[T.new]:!!e.new}),onClick:()=>k(l.D.link,e.title,"".concat(e.title,"_").concat(e.url)),children:[(0,i.jsx)("div",{className:T.arrowIcon,children:(0,i.jsx)(s.IconFdsArrowUpRightSmallO,{})}),(0,i.jsx)("span",{children:e.title})]},e.url))})]},"".concat(t.url,"_").concat(o))})]},e.id))},e.id))})},ej=(0,p.g)("navigation-section-icon","sc"),eC=Object.freeze({icon:"".concat(ej)}),ek=e=>{let{name:t,background:n}=e,l=(0,o.useMemo)(()=>t&&s[t]||null,[t]);return t&&l?(0,i.jsx)("div",{className:eC.icon,style:{background:n},children:(0,i.jsx)(l,{})}):null},ey=(0,p.g)("navigation","sc"),eN=Object.freeze({navigation:"".concat(ey),navigationOpening:"".concat(ey,"--opening"),navigationClosing:"".concat(ey,"--closing"),wrapper:"".concat(ey,"__wrapper"),container:"".concat(ey,"__container"),containerOpen:"".concat(ey,"__container--open"),sections:"".concat(ey,"__sections"),sectionsOpen:"".concat(ey,"__sections--open"),citySelectButton:"".concat(ey,"__city-select-button"),sectionsTitle:"".concat(ey,"__sections-title"),sectionsWrapper:"".concat(ey,"__sections-wrapper"),section:"".concat(ey,"__section"),sectionArrow:"".concat(ey,"__section-arrow"),sectionExtra:"".concat(ey,"__section--extra"),sectionActive:"".concat(ey,"__section--active"),sectionTitle:"".concat(ey,"__section-title"),chatWrapper:"".concat(ey,"__chat-wrapper"),chatHeader:"".concat(ey,"__chat-header"),backButton:"".concat(ey,"__back-button"),useful:"".concat(ey,"__useful"),usefulOpen:"".concat(ey,"__useful--open"),usefulTitle:"".concat(ey,"__useful-title"),usefulGrid:"".concat(ey,"__useful-grid"),removed:"".concat(ey,"__removed")}),eO=e=>{var t;let{data:n}=e,u=ep(),d=W(),p=(0,r.aF)("m"),[h,m]=(0,o.useState)(!0);(0,o.useEffect)(()=>{m(p)},[p]);let f=(0,o.useRef)(null),g=(0,o.useCallback)(()=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>u.openedSection?u.setOpenedSection(null):u.isNavigationOpen?u.setOpenedBlock(null):void 0,50)},[u]),w=(0,o.useRef)(!1),_=(0,o.useRef)(null),x=(0,o.useCallback)(()=>{h&&(w.current=!0,_.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),g()},window.history.pushState(null,"",window.location.href))},[g,h]),b=(0,o.useCallback)(()=>{w.current=!1,window.onpopstate=_.current,window.history.go(-1)},[]),j=(0,o.useRef)(null),C=(0,o.useCallback)(e=>{if(h||!u.navMenuItemsRef.current||!u.navigationRef.current)return;let t=e.target,n=!u.navMenuItemsRef.current.contains(t)&&!u.navigationRef.current.contains(t);if(n&&!j.current){u.setIgnoreClicks(),j.current=setTimeout(()=>u.setOpenedBlock(null),300);return}!n&&j.current&&(clearTimeout(j.current),j.current=null)},[h,u]),y=(0,o.useRef)(null),N=(0,o.useCallback)(e=>{typeof window>"u"||(e?(y.current=C,window.addEventListener("mousemove",y.current)):y.current&&window.removeEventListener("mousemove",y.current))},[C]);(0,o.useEffect)(()=>{N(u.isNavigationOpen),u.isNavigationOpen&&!w.current&&x(),!u.isNavigationOpen&&w.current&&b()},[u.isNavigationOpen]);let O=(e,t)=>()=>{k(l.D.button,t),u.setOpenedSection(e)},{start:T,clear:S}=Z(),I=(e,t)=>()=>{h||T(O(e,t),200)},A=()=>{h||S()};return(0,i.jsx)("div",{ref:u.navigationRef,className:(0,c.Z)(eN.navigation,{[eN.removed]:!u.isNavigationMounted,[eN.navigationOpening]:u.isNavigationOpen,[eN.navigationClosing]:!u.isNavigationOpen}),children:(0,i.jsx)("div",{className:eN.wrapper,children:(0,i.jsxs)(a.W2,{className:(0,c.Z)(eN.container,{[eN.containerOpen]:!!u.openedSection}),children:[(0,i.jsxs)("div",{className:(0,c.Z)(eN.sections,{[eN.sectionsOpen]:!!u.openedSection}),children:[(0,i.jsx)(r.zx,{className:eN.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)(eN.sectionsWrapper,{[eN.removed]:u.openedBlock!==e.id&&!h}),children:[(0,i.jsx)("div",{className:eN.sectionsTitle,children:v[e.id]}),e.sections.map(e=>(0,i.jsxs)("li",{className:(0,c.Z)(eN.section,{[eN.sectionExtra]:!!e.extra,[eN.sectionActive]:u.openedSection===e.id}),onClick:O(e.id,e.title),onMouseEnter:I(e.id,e.title),onMouseLeave:A,children:[(0,i.jsx)(ek,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eN.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eN.sectionArrow,children:(0,i.jsx)(s.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,i.jsxs)("div",{className:eN.chatWrapper,children:[(0,i.jsx)("div",{className:eN.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(eg,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,c.Z)(eN.backButton,{[eN.removed]:!u.openedSection}),onClick:()=>{k(l.D.button,"Назад"),u.setOpenedSection(null)},children:[(0,i.jsx)(s.IconFdsChevronLeftO,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eb,{data:n,isMobile:h}),(0,i.jsxs)("div",{className:(0,c.Z)(eN.useful,{[eN.usefulOpen]:!!u.openedSection}),children:[(0,i.jsx)("div",{className:eN.usefulTitle,children:"Полезное на Финуслугах"}),n.map(e=>(0,i.jsx)(o.Fragment,{children:e.sections.map(e=>(0,i.jsx)("div",{className:(0,c.Z)(eN.usefulGrid,{[eN.removed]:u.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>k(l.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:e.title,loading:"lazy"})}),(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},"".concat(e.title,"_").concat(t)))},e.id))},e.id))]})]})})})},eT=(e,t,n)=>{var i,o,l;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==(l=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[s])?void 0:l.content)||[];if(e&&Array.isArray(n)&&a.length){let i=n.map(e=>{let{title:n,url:i}=e;return{title:n,url:(0,u.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)||[]}]},eS=e=>{let{data:t,showcaseUrl:n="https://finuslugi.ru",minioUrl:d="https://assets.finuslugi.ru/mp-assets",lkUrl:p="https://lk.finuslugi.ru/registration",initialTown:h,isMainBannerPage:f,news:v}=e,w=ep(),_=eT(t,n,v),x=(0,o.useMemo)(()=>_.reduce((e,t)=>(e[t.id]=t.sections[0].id,e),{}),[_]),b=w.isAuth?"Личный кабинет":"Войти",j=f&&w.isHeaderTransparent,C=(e,t,n,i)=>()=>{e!==w.openedBlock?k(l.D.toggle,t,"on"):k(l.D.button,"menu_close","on");let o=n?x[e]:"";w.setOpenedBlock(e,o,!!i)},{start:y,clear:N}=Z(),O=(e,t,n,i)=>()=>{w.isNavigationOpen&&e===w.openedBlock||w.setIgnoreClicks(),y(C(e,t,n,i),200)},T=e=>()=>{w.ignoreClicks||e()},S=e=>w.openedBlock===e&&w.isNavigationOpen;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("header",{className:(0,c.Z)(m.header,{[m.transparent]:j}),children:(0,i.jsx)("div",{className:(0,c.Z)(m.fixed,{[m.hidden]:w.isHeaderHidden,[m.navigationOpen]:w.isNavigationOpen}),children:(0,i.jsxs)(a.W2,{className:m.container,children:[(0,i.jsxs)("div",{className:m.leftRow,children:[(0,i.jsx)(ex,{className:m.logo,href:n,eventActionType:l.D.icon,eventActionText:"finuslugi_logo",eventLabel:"finuslugi_logo_".concat(n),children:(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,u.xn)(d,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{src:(0,u.xn)(d,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,i.jsx)("nav",{ref:w.navMenuItemsRef,className:m.menuItems,children:(0,i.jsx)("ul",{children:g.map(e=>{let{id:t,label:n}=e;return(0,i.jsx)("li",{children:(0,i.jsx)(r.zx,{className:(0,c.Z)({[m.menuItemActive]:S(t)}),label:n,variant:"white",size:"xs",onClick:T(C(t,n,!0)),onMouseEnter:O(t,n,!0,!0),onMouseLeave:N})},t)})})}),(0,i.jsx)(Q,{className:(0,c.Z)(m.tabletMenuButton,{[m.menuItemActive]:w.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(s.IconFdsChevronDownO,{size:24}),onClick:C("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:m.buttonGroup,children:[(0,i.jsxs)("div",{className:m.chips,children:[(0,i.jsx)(Q,{onClick:()=>w.setIsChatModalOpen(!w.isChatModalOpen),size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,i.jsx)(s.IconFdsChatDotsCircleO,{size:24})}),(0,i.jsx)(Q,{as:"a",href:p,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:"profile_".concat(p),iconLeft:(0,i.jsx)(s.IconFdsUserO,{size:24})})]}),(0,i.jsx)(Q,{className:m.menuButton,size:"xs",shape:j?"icon":"default",appearance:j?"ghost":"fill",label:"Меню",onClick:C("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(s.IconFdsMenuSkewedO,{size:24})}),(0,i.jsxs)("div",{className:m.moreButtons,children:[(0,i.jsx)(el,{initialTown:h}),(0,i.jsx)(e_,{}),(0,i.jsx)(Q,{onClick:()=>w.setIsChatModalOpen(!w.isChatModalOpen),size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,i.jsx)(s.IconFdsChatDotsCircleO,{size:24})}),(0,i.jsx)(Q,{as:"a",href:p,size:"xs",eventActionText:b,eventLabel:"".concat(b,"_").concat(p),label:b})]})]}),(0,i.jsxs)(ex,{className:m.auth,href:p,eventActionText:b,eventLabel:"".concat(b,"_").concat(p),children:[(0,i.jsx)(Q,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsUserO,{}),eventActionText:b,eventLabel:"".concat(b,"_").concat(p)}),(0,i.jsx)("p",{children:b})]}),(0,i.jsx)("div",{className:m.close,children:(0,i.jsx)(Q,{className:m.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(s.IconFdsCloseO,{}),onClick:()=>w.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})})}),(0,i.jsx)("div",{className:(0,c.Z)(m.overlay,{[m.removed]:!w.isNavigationMounted,[m.overlayOpening]:w.isNavigationOpen,[m.overlayClosing]:!w.isNavigationOpen}),onClick:T(()=>w.setOpenedBlock(null))}),(0,i.jsx)(eO,{data:_,minioUrl:d})]})},eI=e=>(0,i.jsx)(eh,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(eS,{...e})})}}]);