(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[805],{6541:function(){},220:function(e,t,n){"use strict";n.d(t,{C:function(){return J},H:function(){return eU},u:function(){return q}});var i=n(7437),s=n(2265),l=n(629),r=n(3915),o=n(1518),a=n(7042),c=n(5950),u=n(8161),d=n(8354),p=n(950);let m=(0,p.g)("header","sc"),h=Object.freeze({header:`${m}`,fixed:`${m}__fixed`,hidden:`${m}__fixed--hidden`,transparent:`${m}--transparent`,navigationOpen:`${m}__navigation-open`,container:`${m}__container`,leftRow:`${m}__left-row`,logo:`${m}__logo`,menuItems:`${m}__menu-items`,menuItemActive:`${m}__menu-item-active`,tabletMenuButton:`${m}__tablet-menu-button`,buttonGroup:`${m}__button-group`,chips:`${m}__chips`,menuButton:`${m}__menu-button`,moreButtons:`${m}__more-buttons`,auth:`${m}__auth`,whiteIcons:`${m}__white-icons`,close:`${m}__close`,removed:`${m}__removed`,overlay:`${m}__overlay`,overlayOpening:`${m}__overlay--opening`,overlayClosing:`${m}__overlay--closing`}),g="user_region",v="user_town",w="cb-header",f=[{id:"FINPRODUCTS",label:"Финпродукты"},{id:"NAVIGATOR",label:"Журнал"},{id:"ABOUT",label:"О маркетплейсе"}],x=f.reduce((e,t)=>(e[t.id]=t.label,e),{}),_=Object.freeze({mobile:56,desktop:80});var b=n(2340);let j=(e,t,n)=>{if(typeof window>"u"||typeof document>"u")return;let i=document.getElementById("mainHomeBanner"),s=!1,l=0,r=0,o=()=>window.innerWidth<768,a=o(),c=()=>window.scrollY||document.documentElement.scrollTop,u=()=>{let e=document.querySelector(":root");if(e){let t=window.getComputedStyle(e).getPropertyValue("--fixed-header-height");r=parseFloat(t),l=c()}},d=()=>{let e=o();e!==a&&(a=e,r=0)},p=function(){let o=c(),a=document.getElementById("headerMobileBanner"),d=null==a?void 0:a.getAttribute("data-opening");if("true"===d)return;r||u();let p=o<r,m=o<((null==i?void 0:i.clientHeight)||0);if(n&&m||p){s=!1,e(!1),t(!0);return}e(s=o>l),s&&setTimeout(()=>t(!1),50);let h=s?"0px":"false"===d?`${r}px`:"";document.documentElement.style.setProperty("--new-header-height-desktop",h),document.documentElement.style.setProperty("--new-header-height-mobile",h),l=o<=0?0:o};return window.addEventListener("scroll",p),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",p),window.removeEventListener("resize",d)}},C=()=>{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},$=()=>document.cookie.split(";").some(e=>e.trim().startsWith("utm_params=")),y=(e,t,n)=>{let i=new Date;i.setTime(i.getTime()+864e5*n);let s=encodeURIComponent(JSON.stringify(t)),l=`;domain=.${window.location.hostname}`;document.cookie=`${e}=${s};expires=${i.toUTCString()};path=/;SameSite=Lax${l}`},N=()=>{let e=C();e&&!$()&&y("utm_params",e,90),e&&y("utm_last",e,90)},k=()=>{setTimeout(()=>{if(!(typeof document>"u"||"string"!=typeof document.cookie))try{N()}catch(e){console.error("UTM tracking error:",e)}},0)},O=(e,t,n)=>(0,u.h)({eventCategory:w,eventActionType:e,eventActionText:t,eventLabel:n}),T=(0,p.g)("navigation-chips","sc"),S=Object.freeze({wrapper:`${T}__wrapper`,gray:`${T}__variantGray`,white:`${T}__variantWhite`,container:`${T}__container`,chip:`${T}__chip`,more:`${T}__chip--more`,active:`${T}__chip--active`,label:`${T}__label`,hidden:`${T}__hidden`}),I=(0,p.g)("navigation-content","sc"),A=Object.freeze({contentWrapper:`${I}__content-wrapper`,content:`${I}__content`,contentOpen:`${I}__content--open`,contentHeader:`${I}__content-header`,contentTitle:`${I}__content-title`,contentTitleUrl:`${I}__content-title--url`,contentTitleLink:`${I}__content-title--link`,contentTitleNew:`${I}__content-title--new`,new:`${I}__new`,vip:`${I}__vip`,arrowIcon:`${I}__arrow-icon`,links:`${I}__links`,linksColumns:`${I}__links--columns`,linksTitleless:`${I}__links--titleless`,removed:`${I}__removed`,hidden:`${I}__content--hidden`}),R=({chip:e,hidden:t,onClick:n,refCallback:s,activeChipId:r})=>{let o=!!n,c=()=>{if(o)return null==n?void 0:n(e.url);O(u.D.chip,e.title,`${e.title}_${e.url}`)},d=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:S.label,children:e.title}),e.arrow&&(0,i.jsx)(l.IconFdsArrowUpRightSmallO,{size:24})]}),p=(0,a.Z)(S.chip,{[S.hidden]:t,[A.new]:!!e.new,[A.vip]:!!e.vip,[S.active]:e.url===r});return o?(0,i.jsx)("button",{type:"button",className:p,onClick:c,ref:s,children:d}):(0,i.jsx)("a",{href:e.url,className:p,onClick:c,ref:s,children:d})},L=({items:e=[],maxNumberOfLines:t,variant:n,className:r,activeChipId:o,onClick:c})=>{let d=(0,s.useRef)(null),p=(0,s.useRef)(null),m=(0,s.useRef)({}),[h,g]=(0,s.useState)(!1),[v,w]=(0,s.useState)(e.length),[f,x]=(0,s.useState)(!1);(0,s.useMemo)(()=>{let t=m.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 _=(0,s.useCallback)(()=>{let n=d.current;if(!n)return;let i=e=>e?e.getBoundingClientRect().width:0,s=i(n),l=Math.max(Number(t)||0,0),r=()=>{w(e.length),x(!1)};if(h||0===l||s<=0){r();return}let o=(()=>{try{let e=getComputedStyle(n),t=parseFloat(e.columnGap||e.gap||"12");return Number.isNaN(t)?12:t}catch{return 12}})(),a=i(p.current),c=e.map(e=>i(m.current[e.url]));if(c.some(e=>0===e)){r();return}let u=1,g=0,v=0;for(let e of c){let t=u===l?a+o:0,n=0===g?e:g+o+e;if(n+t<=s-.5)g=n,v++;else{if(++u>l)break;g=e,v++}}x(v<e.length),w(v)},[h,e,t]);(0,s.useLayoutEffect)(()=>{let e=d.current;if(!e)return;let t=new ResizeObserver(()=>{requestAnimationFrame(_)});return t.observe(e),requestAnimationFrame(_),()=>{t.disconnect()}},[_]),(0,s.useEffect)(()=>{requestAnimationFrame(_)},[_]);let b=h||(t??0)<=0||!f;return(0,i.jsx)("div",{className:(0,a.Z)(r,S.wrapper,{[S.gray]:"gray"===n,[S.white]:"white"===n}),children:(0,i.jsxs)("div",{ref:d,className:S.container,children:[e.map((e,t)=>(0,i.jsx)(R,{chip:e,hidden:!b&&t>=v,activeChipId:o,onClick:c,refCallback:t=>{m.current[e.url]=t}},e.url)),!b&&f&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,a.Z)(S.chip,S.more),onClick:()=>{O(u.D.chip,"Еще"),g(!0)},children:[(0,i.jsx)(l.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:S.label,children:"Еще"})]}),(b||!f)&&(0,i.jsxs)("button",{type:"button",ref:p,className:(0,a.Z)(S.chip,S.more,S.hidden),tabIndex:-1,"aria-hidden":"true",children:[(0,i.jsx)(l.IconFdsDotsVerticalO,{size:20}),(0,i.jsx)("span",{className:S.label,children:"Еще"})]})]})})},z=(e,t)=>{if(!(typeof document>"u")){if(!e&&!t){b.a.removeItem(g),b.a.removeItem(v);return}b.a.setItem(g,JSON.stringify(e)||"",{"max-age":31536e3}),b.a.setItem(v,JSON.stringify(t)||"",{"max-age":31536e3})}},E=e=>{if(typeof document>"u")return null;let t=b.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},B=function(e){if(typeof window>"u"||!window.localStorage)return null;let t=window.localStorage.getItem(e);if(!t||"undefined"===t)return null;try{return JSON.parse(t)}catch(t){console.warn(`Invalid object in localStorage for key "${e}": ${t}`)}return null},M=()=>{if(typeof window>"u")return[];if(Array.isArray(window.allRegions)&&window.allRegions.length>0)return window.allRegions;let e=B("all_regions")||[];return window.allRegions=e,e},P=e=>{let t={};return e.map(({id:e,name:n,towns:i})=>(i.forEach(i=>{i.parentId=e,t[i.name]=t[i.name]||{},t[i.name][i.id]=n}),i)).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},W=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)},U=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},F=(e,t,n)=>{(0,u.h)({eventCategory:H,eventActionType:e,eventActionText:t,eventLabel:n})},D=M(),V=P(D),Z={regions:D,towns:V,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},H="finkit-widgets-sc-city-select",G=(0,s.createContext)(Z);function q(){return(0,s.useContext)(G)}let J=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:l=!0,lastRegionsUpdateUnixTimestamp:r,dadataUrl:o="https://finuslugi.ru/backend/money/dadata"})=>{let a=Number(B("lastRegionsUpdateUnixTimestamp")||0),c=Number(r||0)>a,[d,p]=(0,s.useState)(M()),[{startRegion:m,startTown:h},w]=(0,s.useState)({startRegion:Z.startRegion,startTown:Z.startTown}),f=t??Z.region,x=n??Z.town,[{region:_,town:b},j]=(0,s.useState)({region:f,town:x}),[C,$]=(0,s.useState)(Z.startPopupVisible),[y,N]=(0,s.useState)(Z.popupVisible),k=(0,s.useRef)(""),O=(0,s.useMemo)(()=>P(d),[d.length]),T=(0,s.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),w({startRegion:e,startTown:t})},[$,w]),S=(0,s.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||T(e,t)},[T]),I=(0,s.useCallback)(()=>{if(k.current&&!_&&!b){let e=O.find(e=>e.name===k.current)??null,t=d.find(t=>t.id===(null==e?void 0:e.parentId))??null;return S(t,e)}S(_,b)},[_,b,O,d,S]),A=(0,s.useCallback)(e=>{N(e)},[N]),R=(0,s.useCallback)(e=>{e?F(u.D.icon,"location"):F(u.D.button,(null==b?void 0:b.name)||"Вся Россия"),!l||window.sessionStorage.getItem("start_popup_opened")?A(!0):I()},[l,b,A,I]),L=(0,s.useCallback)((e,t)=>{e||t?(window.localStorage.setItem("all_russia_selected","0"),window.localStorage.setItem(g,JSON.stringify(e)||""),window.localStorage.setItem(v,JSON.stringify(t)||""),z(e||null,t||null)):(window.localStorage.setItem("all_russia_selected","1"),window.localStorage.setItem(g,""),window.localStorage.setItem(v,""),z(null,null)),j({region:e||null,town:t||null}),$(!1),A(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[A]),D=()=>{let e=E(g)??B(g),t=E(v)??B(v);j({region:e,town:t});let n=async({coords:{latitude:e,longitude:t}})=>{let n=`${o}?lat=${e}&lon=${t}`,i=await U(n);null!=i&&i.location&&(k.current=i.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&l)try{navigator.geolocation.getCurrentPosition(n,()=>null)}catch{}};return(0,s.useEffect)(()=>{if((d.length<1||c)&&W().then(e=>p(e)),window.innerWidth<1024){let e=()=>{D(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{D()},0)},[]),(0,i.jsx)(G.Provider,{value:{regions:d,towns:O,region:_,town:b,startPopupVisible:C,setStartPopupVisible:$,popupVisible:y,handleToggleModal:A,selectCity:L,handleButtonClick:R,startRegion:m,startTown:h},children:e})},Q=()=>{let e=(0,s.useRef)(null),t=(0,s.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,s.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,s.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},Y=(0,p.g)("city-select-modal-body","sc"),X=Object.freeze({wrapper:`${Y}__wrapper`,subtitle:`${Y}__subtitle`,hintWrapper:`${Y}__hint-wrapper`,hintText:`${Y}__hint-text`,input:`${Y}__input`,chips:`${Y}__chips`,townsListWrapper:`${Y}__towns-list-wrapper`,townsList:`${Y}__towns-list`,townsGroup:`${Y}__towns-group`,townsGroupLabel:`${Y}__towns-group-label`,townsGroupList:`${Y}__towns-group-list`,townsName:`${Y}__towns-name`,regionName:`${Y}__region-name`}),K=({groupedTowns:e,chips:t,query:n,setQuery:r,isDrawer:a})=>{var c;let d=q(),p=(0,s.useRef)(null),[m,h]=(0,s.useState)("10000px");(0,s.useEffect)(()=>{if(!a||!p.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,i)=>{let s=n.map(e=>[...e]),l=s.map(e),r=l.reduce((e,t,n)=>t<l[e]?n:e,0);0===r&&s[0].push(s[1].shift()),2===r&&s[2].unshift(s[1].pop()),1===r&&l[0]>l[2]&&s[1].unshift(s[0].pop()),1===r&&l[0]<l[2]&&s[1].push(s[2].shift());let o=s.map(e),a=Math.max(...o);return a>=i?i:t(s,a)};new ResizeObserver(()=>{var e;if(!(null!=(e=p.current)&&e.children))return;let n=Array.from(p.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let i=0;try{i=t([[],n,[]],1/0)}catch{i=0}i>0&&h(`${i}px`)}).observe(p.current)},[]);let g=e=>{if(F(u.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return d.selectCity();let t=d.regions.find(t=>t.id===Number(e.parentId))||null;d.selectCity(t,e)};return(0,i.jsxs)("div",{className:X.wrapper,children:[(0,i.jsxs)("div",{className:X.subtitle,children:["Покажем предложения рядом с вами",(0,i.jsxs)("div",{className:X.hintWrapper,children:[(0,i.jsx)(l.IconFdsQuestionCircleO,{size:24}),(0,i.jsx)("div",{className:X.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,i.jsx)(o.MA,{className:X.input,value:n,onChange:r,size:"s",placeholder:"Введите название города",icon:n?(0,i.jsx)(l.IconFdsCloseCircleO,{size:24,onClick:()=>r("")}):(0,i.jsx)(l.IconFdsSearchO,{size:24})}),(0,i.jsx)(o.cL,{className:X.chips,chips:t,value:(null==(c=d.town)?void 0:c.id)||0,onChipClick:e=>{let t=d.towns.find(t=>t.id===e);g(t)}}),(0,i.jsx)("div",{className:X.townsListWrapper,children:(0,i.jsx)("div",{ref:p,className:X.townsList,style:{maxHeight:m},children:e.map(e=>(0,i.jsxs)("div",{className:X.townsGroup,children:[(0,i.jsx)("div",{className:X.townsGroupLabel,children:e.letter}),(0,i.jsx)("div",{className:X.townsGroupList,children:e.towns.map(e=>(0,i.jsxs)("button",{type:"button",onClick:()=>g(e),children:[(0,i.jsx)("div",{className:X.townsName,children:e.name}),(0,i.jsx)("div",{className:X.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},ee=[1095,1096,134,720,189,180],et=()=>{var e;let t=q(),n=(0,o._m)("l"),[l,r]=(0,s.useState)(""),a=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,c=(0,s.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(l.toLocaleLowerCase())).sort((e,t)=>e.name.localeCompare(t.name)).reduce((e,t)=>{let n=e.pop();return n||(n={letter:t.name[0],towns:[]}),n.letter!==t.name[0]&&(e.push(n),n={letter:t.name[0],towns:[]}),n.towns.push(t),e.push(n),e},[]),[l,t.towns.length]),p=(0,s.useMemo)(()=>{let e=ee.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);return[{id:0,label:"Вся Россия"},...e]},[t.towns.length]),m=()=>{F(u.D.button,"close"),t.handleToggleModal(!1)};return(0,i.jsxs)(d.P,{children:[!n&&(0,i.jsx)(d.U,{title:a,isOpen:t.popupVisible,onClose:m,full:!0,children:(0,i.jsx)(K,{groupedTowns:c,chips:p,query:l,setQuery:r})}),n&&(0,i.jsx)(d.D,{title:a,isOpen:t.popupVisible,onClose:m,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,i.jsx)(K,{groupedTowns:c,chips:p,query:l,setQuery:r,isDrawer:!0})})]})},en={"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"},ei=()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(en,e)?en[e]:en["finuslugi.ru"]},es=(e,t)=>{let n=document.createElement("link");n.rel="stylesheet",n.type="text/css",n.href=`${e}/assets/css/${t}`,document.head.appendChild(n);let i=document.createElement("script");i.src=`${e}/get-bootstrap/${t}`,i.defer=!0,document.body.appendChild(i)},el=()=>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)}})}),er=()=>{let[e,t]=(0,s.useState)(!1),[n,i]=(0,s.useState)(!1),l=(0,s.useRef)(!1),r=e=>{l.current=e,i(e)};return(0,s.useEffect)(()=>{if(typeof window>"u")return;let e=ei(),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((s,o)=>{if(l.current){o(Error("chat is already opened"));return}i?(i.openWidget(),t(!1),s()):(r(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;i=e;let l=document.querySelector(".webchat");l&&el().observe(l,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=i.closeWidget),null==i||i.openWidget(),r(!1),t(!1),s()},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}},eo=(0,s.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 ea(){return(0,s.useContext)(eo)}let ec=e=>{let[t,n]=(0,s.useState)(!1),[l,r]=(0,s.useState)(!1),[o,a]=(0,s.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p}=er(),[m,h]=(0,s.useState)(null),[g,v]=(0,s.useState)(null),[w,f]=(0,s.useState)(!1),[x,_]=(0,s.useState)(!1),[b,C]=(0,s.useState)(!1),$=(0,s.useRef)(null),y=(0,d.u)(w),N=(0,s.useRef)(null),O=(0,s.useRef)(null),T=(0,s.useRef)(null),S=(0,s.useRef)(null),I=(0,s.useCallback)(()=>{y.current&&y.current.scrollTo({top:0})},[y]),A=(0,s.useCallback)(e=>{v(e),I()},[I]),R=(0,s.useCallback)(e=>{N.current&&clearTimeout(N.current),e&&_(!0),e||(N.current=setTimeout(()=>{_(!1),A(null)},300))},[A]),L=(0,s.useCallback)((e,t,n)=>{if(t&&A(t),!n&&e===m||!e){R(!w),f(!w);return}h(e),R(!0),f(!0)},[m,A,w,R]),z=(0,s.useCallback)(()=>{O.current&&clearTimeout(O.current),C(!0),O.current=setTimeout(()=>{C(!1)},650)},[]);return(0,s.useEffect)(()=>{let t=!!document.cookie.includes("auth.gtm_customer_id");n(t);let i=j(r,a,e.isMainBannerPage);return k(),i},[]),(0,i.jsx)("header",{children:(0,i.jsx)(eo.Provider,{value:{isAuth:t,isHeaderHidden:l,isHeaderTransparent:o,openedBlock:m,setOpenedBlock:L,openedSection:g,setOpenedSection:A,isNavigationOpen:w,isNavigationMounted:x,navMenuItemsRef:$,navigationRef:y,ignoreClicks:b,setIgnoreClicks:z,isChatModalOpen:c,setIsChatModalOpen:u,isChatLoading:p,fixedContainerRef:T,headerRef:S},children:e.children})})},eu=({label:e,onClick:t,eventActionText:n,eventLabel:s,...l})=>(0,i.jsx)(o.zx,{label:e,onClick:e=>{null==t||t(e),(0,u.h)({eventCategory:w,eventActionType:u.D.button,eventActionText:n||"",eventLabel:s||""})},...l}),ed=(0,p.g)("header-popup","sc"),ep=Object.freeze({popup:`${ed}__popup`,popupHeader:`${ed}__popup-header`,popupClose:`${ed}__popup-close`,body:`${ed}__body`}),em=({isOpen:e,onClose:t,children:n,title:s})=>{let r=(0,o._m)("l");return(0,i.jsxs)(d.P,{children:[!r&&(0,i.jsx)(d.U,{title:s,isOpen:e,onClose:t,children:n}),r&&e&&(0,i.jsxs)("div",{className:ep.popup,children:[(0,i.jsxs)("div",{className:ep.popupHeader,children:[s,(0,i.jsx)(eu,{className:ep.popupClose,iconLeft:(0,i.jsx)(l.IconFdsCloseO,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,i.jsx)("div",{className:ep.body,children:n})]})]})},eh=(0,p.g)("start-choice-popup","sc"),eg=Object.freeze({top:`${eh}__top`,progress:`${eh}__progress`,innerCircle:`${eh}__inner-circle`,title:`${eh}__title`,subtitle:`${eh}__subtitle`,actions:`${eh}__actions`}),ev=()=>{var e,t;let n=q(),[l,r]=(0,s.useState)(10),[o,a]=(0,s.useState)(0),c=(0,s.useRef)(void 0),d=()=>{F(u.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,s.useEffect)(()=>{n.startPopupVisible?(()=>{let e=Number((" "+l).slice(1)),t=1e3*e/100,n=0,i=0;c.current=setInterval(()=>{n++,i+=t,a(3.6*n);let s=e-Math.floor(i/1e3);s<l&&r(s),100===n&&(clearInterval(c.current),d())},t)})():(clearInterval(c.current),r(10),a(0))},[n.startPopupVisible]),(0,i.jsxs)(em,{isOpen:n.startPopupVisible,onClose:d,title:(0,i.jsx)("button",{type:"button",className:eg.progress,style:{background:`conic-gradient(#ff0508 ${o}deg, #e3e7ec 0deg)`},onClick:d,children:(0,i.jsx)("div",{className:eg.innerCircle,children:l})}),children:[(0,i.jsxs)("div",{className:eg.top,children:[(0,i.jsxs)("div",{className:eg.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,i.jsx)("div",{className:eg.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,i.jsxs)("div",{className:eg.actions,children:[(0,i.jsx)(eu,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{F(u.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,i.jsx)(eu,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{F(u.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},ew=(0,p.g)("city-select","sc"),ef=Object.freeze({button:`${ew}__button`,minimal:`${ew}__minimal`,full:`${ew}__full`}),ex=({initialTown:e})=>{var t;let n=q(),r=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:c,isChatModalOpen:u}=ea(),{startPopupVisible:d,setStartPopupVisible:p,popupVisible:m}=n,h=(0,s.useRef)();(0,s.useEffect)(()=>{m&&(h.current="popup")},[m]),(0,s.useEffect)(()=>{u&&(h.current="chat")},[u]),(0,s.useEffect)(()=>{d&&(h.current="startPopup")},[d]),(0,s.useEffect)(()=>{h.current&&("chat"===h.current&&d?p(!1):["startPopup","popup"].includes(h.current)&&u&&c(!1))},[m,u,d,p,c]);let g={appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,i.jsx)(l.IconFdsLocationO,{size:24})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.zx,{...g,className:(0,a.Z)(ef.button,ef.full),label:r}),(0,i.jsx)(o.zx,{...g,className:(0,a.Z)(ef.button,ef.minimal),shape:"icon"}),(0,i.jsx)(et,{}),(0,i.jsx)(ev,{})]})},e_=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:s,...l})=>(0,i.jsx)(o.rU,{onClick:i=>{null==e||e(i),(0,u.h)({eventCategory:w,eventActionType:t||u.D.link,eventActionText:n||"",eventLabel:s||""})},...l}),eb=(0,p.g)("header-mobile-app-banner","sc"),ej=Object.freeze({wrapper:`${eb}__wrapper`,container:`${eb}__container`,closeButton:`${eb}__close-button`,innerWrapper:`${eb}__inner-wrapper`,imageWrapper:`${eb}__image-wrapper`,image:`${eb}__image`,title:`${eb}__title`,description:`${eb}__description`,callToAction:`${eb}__call-to-action`,scanQr:`${eb}__scan-qr`}),eC=Object.freeze({mobile:56,desktop:68}),e$="headerBannerShownAt",ey=()=>{let e=localStorage.getItem(e$);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t},eN=()=>{localStorage.setItem(e$,new Date().toISOString())},ek=()=>{let e=ey();return!e||Math.floor((e.getTime()-new Date().getTime())/864e5)>5},eO=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:d,headerRef:p}=ea(),[m,h]=(0,s.useState)(!1),[g,v]=(0,s.useState)(!1),[w,f]=(0,s.useState)(!1),x=(0,s.useCallback)((e="desktop")=>{let t=d.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${eC[e]+_[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${eC.desktop+_.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${eC.mobile+_.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${eC.mobile+_.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${eC.desktop+_.desktop}px`),document.documentElement.style.setProperty("--header-height",`${eC[e]+108}px`))},[]),b=(0,s.useCallback)(()=>{let e=d.current;e&&(document.documentElement.style.removeProperty("--fixed-header-height"),document.documentElement.style.removeProperty("--new-header-height-desktop"),document.documentElement.style.removeProperty("--new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-mobile"),document.documentElement.style.removeProperty("--static-new-header-height-desktop"),document.documentElement.style.removeProperty("--header-height"),e.style.transform="")},[]);return(0,s.useEffect)(()=>{let e=p.current;if(!e)return;let t=()=>{g&&h(!1),f(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[g]),(0,s.useEffect)(()=>{ek()&&h(!0)},[]),(0,s.useEffect)(()=>{let e=window.innerWidth<768;m&&(x(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!0):f(!0));let t=()=>{if(!m)return null;let e=window.innerWidth<768;x(e?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{b(),window.removeEventListener("resize",t)}},[m,x,b]),m?(0,i.jsx)("div",{id:"headerMobileBanner",role:"region","aria-label":"Мобильное приложение","data-opening":w,className:(0,a.Z)(ej.wrapper,t),children:(0,i.jsx)(r.W2,{children:(0,i.jsxs)("div",{className:ej.container,children:[(0,i.jsxs)("div",{className:ej.innerWrapper,children:[(0,i.jsxs)("picture",{className:ej.imageWrapper,children:[(0,i.jsx)("source",{srcSet:(0,c.xn)(e,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{className:ej.image,src:(0,c.xn)(e,"/logo/finuslugi/default-regular.svg")})]}),(0,i.jsxs)("div",{className:ej.scanQr,children:[(0,i.jsx)("div",{className:ej.title,children:"Скачайте приложение Финуслуги"}),(0,i.jsx)("div",{className:ej.description,children:"Сканируйте QR-код"})]}),(0,i.jsxs)("div",{className:ej.callToAction,children:[(0,i.jsxs)("div",{children:["Приложение",(0,i.jsx)("br",{}),"Финуслуги"]}),(0,i.jsx)(o.zx,{onClick:()=>{O(u.D.button,"skachat_mob_prilozheniye_fu"),window.open(n,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,i.jsx)("div",{"aria-label":"Закрыть",role:"button",className:ej.closeButton,onClick:()=>{eN(),b(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?h(!1):v(!0)},children:(0,i.jsx)(l.IconFdsCloseO,{size:"100%"})})]})})}):null},eT=(0,p.g)("header-chat-modal-body","sc"),eS=Object.freeze({wrapper:`${eT}__wrapper`,cardButton:`${eT}__card-button`,card:`${eT}__card`,cardTitle:`${eT}__card-title`,cardSubtitle:`${eT}__card-subtitle`,button:`${eT}__button`}),eI=()=>{let e=ea();return(0,i.jsxs)("div",{className:eS.wrapper,children:[(0,i.jsx)(eu,{className:eS.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)(r.Zb,{className:eS.card,variant:"secondary",children:[(0,i.jsxs)("div",{className:eS.cardTitle,children:[(0,i.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,i.jsxs)("p",{className:eS.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,i.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},eA=({data:e,isMobile:t})=>{let n=ea();return(0,i.jsx)("div",{className:A.contentWrapper,children:e.map(e=>(0,i.jsx)(s.Fragment,{children:e.sections.map(e=>(0,i.jsxs)("div",{className:(0,a.Z)(A.content,{[A.hidden]:n.openedSection!==e.id,[A.contentOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:A.contentHeader,children:(0,i.jsx)("label",{children:e.title})}),e.content.map((n,s)=>{var r,o;return(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{children:(0,i.jsx)("a",{className:(0,a.Z)(A.contentTitle,{[A.removed]:!n.title,[A.contentTitleUrl]:!!n.url,[A.contentTitleLink]:!!e.isSeeAllLinkAvailable,[A.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,i.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,i.jsx)("div",{className:A.arrowIcon,children:(0,i.jsx)(l.IconFdsArrowUpRightSmallO,{})}),n.title]})})}),!(null!=(r=n.links)&&r.length)&&(0,i.jsx)(L,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(o=n.links)&&o.length)&&(0,i.jsx)("div",{className:(0,a.Z)(A.links,{[A.linksColumns]:!!n.columns,[A.linksTitleless]:!n.title}),children:n.links.map(e=>(0,i.jsxs)("a",{href:e.url,className:(0,a.Z)({[A.new]:!!e.new}),onClick:()=>O(u.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{className:A.arrowIcon,children:(0,i.jsx)(l.IconFdsArrowUpRightSmallO,{})}),(0,i.jsx)("span",{children:e.title})]},e.url))})]},`${n.url}_${s}`)})]},e.id))},e.id))})},eR=(0,p.g)("navigation-section-icon","sc"),eL=Object.freeze({icon:`${eR}`}),ez=({name:e,background:t})=>{let n=(0,s.useMemo)(()=>e&&l[e]||null,[e]);return e&&n?(0,i.jsx)("div",{className:eL.icon,style:{background:t},children:(0,i.jsx)(n,{})}):null},eE=(0,p.g)("navigation","sc"),eB=Object.freeze({navigation:`${eE}`,navigationOpening:`${eE}--opening`,navigationClosing:`${eE}--closing`,wrapper:`${eE}__wrapper`,container:`${eE}__container`,containerOpen:`${eE}__container--open`,sections:`${eE}__sections`,sectionsOpen:`${eE}__sections--open`,citySelectButton:`${eE}__city-select-button`,sectionsTitle:`${eE}__sections-title`,sectionsWrapper:`${eE}__sections-wrapper`,section:`${eE}__section`,sectionArrow:`${eE}__section-arrow`,sectionExtra:`${eE}__section--extra`,sectionActive:`${eE}__section--active`,sectionTitle:`${eE}__section-title`,chatWrapper:`${eE}__chat-wrapper`,chatHeader:`${eE}__chat-header`,backButton:`${eE}__back-button`,useful:`${eE}__useful`,usefulOpen:`${eE}__useful--open`,usefulTitle:`${eE}__useful-title`,usefulGrid:`${eE}__useful-grid`,removed:`${eE}__removed`}),eM=({data:e})=>{var t;let n=ea(),c=q(),d=(0,o.aF)("m"),[p,m]=(0,s.useState)(!0);(0,s.useEffect)(()=>{m(d)},[d]);let h=(0,s.useRef)(null),g=(0,s.useCallback)(()=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>n.openedSection?n.setOpenedSection(null):n.isNavigationOpen?n.setOpenedBlock(null):void 0,50)},[n]),v=(0,s.useRef)(!1),w=(0,s.useRef)(null),f=(0,s.useCallback)(()=>{p&&(v.current=!0,w.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),g()},window.history.pushState(null,"",window.location.href))},[g,p]),_=(0,s.useCallback)(()=>{v.current=!1,window.onpopstate=w.current,window.history.go(-1)},[]),b=(0,s.useRef)(null),j=(0,s.useCallback)(e=>{if(p||!n.navMenuItemsRef.current||!n.navigationRef.current)return;let t=e.target,i=!n.navMenuItemsRef.current.contains(t)&&!n.navigationRef.current.contains(t);if(i&&!b.current){n.setIgnoreClicks(),b.current=setTimeout(()=>n.setOpenedBlock(null),300);return}!i&&b.current&&(clearTimeout(b.current),b.current=null)},[p,n]),C=(0,s.useRef)(null),$=(0,s.useCallback)(e=>{typeof window>"u"||(e?(C.current=j,window.addEventListener("mousemove",C.current)):C.current&&window.removeEventListener("mousemove",C.current))},[j]);(0,s.useEffect)(()=>{$(n.isNavigationOpen),n.isNavigationOpen&&!v.current&&f(),!n.isNavigationOpen&&v.current&&_()},[n.isNavigationOpen]);let y=(e,t)=>()=>{O(u.D.button,t),n.setOpenedSection(e)},{start:N,clear:k}=Q(),T=(e,t)=>()=>{p||N(y(e,t),150)},S=()=>{p||k()};return(0,i.jsx)("div",{ref:n.navigationRef,className:(0,a.Z)(eB.navigation,{[eB.removed]:!n.isNavigationMounted,[eB.navigationOpening]:n.isNavigationOpen,[eB.navigationClosing]:!n.isNavigationOpen}),children:(0,i.jsx)("div",{className:eB.wrapper,children:(0,i.jsxs)(r.W2,{className:(0,a.Z)(eB.container,{[eB.containerOpen]:!!n.openedSection}),children:[(0,i.jsxs)("div",{className:(0,a.Z)(eB.sections,{[eB.sectionsOpen]:!!n.openedSection}),children:[(0,i.jsx)(o.zx,{className:eB.citySelectButton,variant:"purple",appearance:"ghost",size:"xs",onClick:()=>c.handleButtonClick(!1),iconLeft:(0,i.jsx)(l.IconFdsLocationO,{size:24}),label:(null==(t=c.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,i.jsxs)("ul",{className:(0,a.Z)(eB.sectionsWrapper,{[eB.removed]:n.openedBlock!==e.id&&!p}),children:[(0,i.jsx)("div",{className:eB.sectionsTitle,children:x[e.id]}),e.sections.map(e=>(0,i.jsxs)("li",{className:(0,a.Z)(eB.section,{[eB.sectionExtra]:!!e.extra,[eB.sectionActive]:n.openedSection===e.id}),onClick:y(e.id,e.title),onMouseEnter:T(e.id,e.title),onMouseLeave:S,children:[(0,i.jsx)(ez,{name:e.uikitIcon,background:e.uikitIconBg}),(0,i.jsx)("span",{className:eB.sectionTitle,children:e.title}),(0,i.jsx)("div",{className:eB.sectionArrow,children:(0,i.jsx)(l.IconFdsChevronRightSmallO,{size:24})})]},e.id))]},e.id)),(0,i.jsxs)("div",{className:eB.chatWrapper,children:[(0,i.jsx)("div",{className:eB.chatHeader,children:"Нужна помощь?"}),(0,i.jsx)(eI,{})]})]}),(0,i.jsxs)("button",{type:"button",className:(0,a.Z)(eB.backButton,{[eB.removed]:!n.openedSection}),onClick:()=>{O(u.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,i.jsx)(l.IconFdsChevronLeftO,{size:24}),(0,i.jsx)("span",{children:"Назад"})]}),(0,i.jsx)(eA,{data:e,isMobile:p}),(0,i.jsxs)("div",{className:(0,a.Z)(eB.useful,{[eB.usefulOpen]:!!n.openedSection}),children:[(0,i.jsx)("div",{className:eB.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,i.jsx)(s.Fragment,{children:e.sections.map(e=>(0,i.jsx)("div",{className:(0,a.Z)(eB.usefulGrid,{[eB.removed]:n.openedSection!==e.id}),children:e.useful.map((e,t)=>(0,i.jsxs)("a",{href:e.url,onClick:()=>O(u.D.link,e.title,`${e.title}_${e.url}`),children:[(0,i.jsx)("div",{children:(0,i.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,i.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id))},e.id))]})]})})})},eP=(e,t,n)=>{var i,s,l,r,o,a,u;let d=(null==(s=null==(i=null==e?void 0:e.NAVIGATOR)?void 0:i.findIndex)?void 0:s.call(i,({id:e})=>"news"===e))||-1,p=(null==(r=null==(l=null==e?void 0:e.NAVIGATOR)?void 0:l[d])?void 0:r.content)||[];if(null!=(u=null==(a=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[d])?void 0:a.content)&&u[0]&&Array.isArray(n)&&p.length){let i=n.map(({title:e,url:n})=>({title:e,url:(0,c.xn)(t||"",n),new:0}));e.NAVIGATOR[d].content[0].links=i}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]},eW=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:d="https://lk.finuslugi.ru/registration",initialTown:p,isMainBannerPage:m,enableAppHeaderBanner:g=!1,news:v,className:w})=>{let x=ea(),_=(0,s.useMemo)(()=>eP(e,t,v),[e,t,v]),b=null==e?void 0:e.config,j=(0,s.useMemo)(()=>_.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[_]),C=x.isAuth?"Личный кабинет":"Войти",$=m&&x.isHeaderTransparent,y=(e,t,n,i)=>()=>{e!==x.openedBlock?O(u.D.toggle,t,"on"):O(u.D.button,"menu_close","on");let s=n?j[e]:"";x.setOpenedBlock(e,s,!!i)},{start:N,clear:k}=Q(),T=(e,t,n,i)=>()=>{x.isNavigationOpen&&e===x.openedBlock||x.setIgnoreClicks(),N(y(e,t,n,i),200)},S=e=>()=>{x.ignoreClicks||e()},I=e=>x.openedBlock===e&&x.isNavigationOpen;return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:x.headerRef,className:(0,a.Z)(h.header,w,{[h.transparent]:$}),children:(0,i.jsxs)("div",{ref:x.fixedContainerRef,className:(0,a.Z)(h.fixed,{[h.hidden]:x.isHeaderHidden,[h.navigationOpen]:x.isNavigationOpen}),children:[!!(null!=b&&b.appBannerUrl)&&g&&(0,i.jsx)(eO,{mobileAppUrl:b.appBannerUrl,minioUrl:n}),(0,i.jsxs)(r.W2,{className:h.container,children:[(0,i.jsxs)("div",{className:h.leftRow,children:[(0,i.jsx)(e_,{className:h.logo,href:t,eventActionType:u.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,i.jsxs)("picture",{children:[(0,i.jsx)("source",{srcSet:(0,c.xn)(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,i.jsx)("img",{src:(0,c.xn)(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,i.jsx)("nav",{ref:x.navMenuItemsRef,className:h.menuItems,children:(0,i.jsx)("ul",{children:f.map(({id:e,label:t})=>(0,i.jsx)("li",{children:(0,i.jsx)(o.zx,{className:(0,a.Z)({[h.menuItemActive]:I(e)}),label:t,variant:"white",size:"xs",onClick:S(y(e,t,!0)),onMouseEnter:T(e,t,!0,!0),onMouseLeave:k})},e))})}),(0,i.jsx)(eu,{className:(0,a.Z)(h.tabletMenuButton,{[h.menuItemActive]:x.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,i.jsx)(l.IconFdsChevronDownO,{size:24}),onClick:y("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,i.jsxs)("div",{className:(0,a.Z)(h.buttonGroup,{[h.whiteIcons]:(null==b?void 0:b.iconColorOnMobileMainBanner)==="white"}),children:[(0,i.jsxs)("div",{className:h.chips,children:[(0,i.jsx)(eu,{as:"a",href:d,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${d}`,iconLeft:(0,i.jsx)(l.IconFdsUserO,{size:20})}),(0,i.jsx)(eu,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,i.jsx)(l.IconFdsChatDotsCircleO,{size:24})})]}),(0,i.jsx)(eu,{className:h.menuButton,size:"xs",shape:$?"icon":"default",appearance:$?"ghost":"fill",label:"Меню",onClick:y("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,i.jsx)(l.IconFdsMenuSkewedO,{size:24})}),(0,i.jsxs)("div",{className:h.moreButtons,children:[(0,i.jsx)(ex,{initialTown:p}),(0,i.jsx)(eu,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,i.jsx)(l.IconFdsChatDotsSquareAddO,{size:24}),children:"Онлайн чат"}),(0,i.jsx)(eu,{as:"a",href:d,size:"xs",eventActionText:C,eventLabel:`${C}_${d}`,label:C})]})]}),(0,i.jsxs)(e_,{className:h.auth,href:d,eventActionText:C,eventLabel:`${C}_${d}`,children:[(0,i.jsx)(eu,{size:"xs",shape:"circle-icon",iconLeft:(0,i.jsx)(l.IconFdsUserO,{}),eventActionText:C,eventLabel:`${C}_${d}`}),(0,i.jsx)("p",{children:C})]}),(0,i.jsx)("div",{className:h.close,children:(0,i.jsx)(eu,{className:h.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,i.jsx)(l.IconFdsCloseO,{}),onClick:()=>x.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,i.jsx)("div",{className:(0,a.Z)(h.overlay,{[h.removed]:!x.isNavigationMounted,[h.overlayOpening]:x.isNavigationOpen,[h.overlayClosing]:!x.isNavigationOpen}),onClick:S(()=>x.setOpenedBlock(null))}),(0,i.jsx)(eM,{data:_,minioUrl:n})]}):null},eU=e=>(0,i.jsx)(ec,{isMainBannerPage:e.isMainBannerPage,children:(0,i.jsx)(eW,{...e})})},2340:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});let i={getItem:e=>{if(typeof document>"u")return null;let t=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return t?t.split("=")[1]??null:null},setItem:(e,t,n={})=>{if(typeof document>"u")return;(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let i=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;for(let e in n){if(!n.hasOwnProperty(e))continue;i+=`; ${e}`;let t=n[e];!0!==t&&(i+=`=${t}`)}document.cookie=i},removeItem:e=>{i.setItem(e,"",{"max-age":-1})}}},1856:function(e,t,n){"use strict";n.r(t),n.d(t,{CitySelectProvider:function(){return i.C},Header:function(){return i.H},useCitySelectContext:function(){return i.u}});var i=n(220)},3217:function(e,t,n){"use strict";n.d(t,{B:function(){return _}});var i=n(7437),s=n(3915),l=n(7042),r=n(629),o=n(1518),a=n(8161),c=n(950),u=n(2265);let d=(0,c.g)("support","sc"),p=Object.freeze({support:d,title:`${d}__title`,cardsContainer:`${d}__cards-container`}),m="cb-support",h=(0,c.g)("support-app-card","sc"),g=Object.freeze({supportAppCard:h,textWrapper:`${h}__text-wrapper`,imageContainer:`${h}__image-container`,title:`${h}__title`,description:`${h}__description`,icon:`${h}__icon`,imageWrapper:`${h}__image-wrapper`,image:`${h}__image`}),v=({title:e,linkUrl:t,s3Assets:n,description:s})=>{let l=(0,o.aF)("s");return(0,i.jsxs)("div",{className:g.supportAppCard,onClick:()=>{l&&((0,a.h)({eventCategory:m,eventActionType:a.D.banner,eventActionText:e,eventLabel:t}),window.open(t,"_blank","noreferrer"))},children:[(0,i.jsx)(r.IconFdsArrowUpRightSmallO,{className:g.icon,size:32}),(0,i.jsxs)("div",{className:g.textWrapper,children:[(0,i.jsx)("div",{className:g.title,children:e}),!!s&&(0,i.jsx)("div",{className:g.description,children:s})]}),(0,i.jsx)("div",{className:g.imageContainer,children:(0,i.jsxs)("picture",{className:g.imageWrapper,children:[(0,i.jsx)("source",{media:"(max-width: 767px)",srcSet:`${n}/mp-assets/widgets/SupportBlock/mobile-app.png 1x, ${n}/mp-assets/widgets/SupportBlock/mobile-app@2x.png 2x`}),(0,i.jsx)("img",{className:g.image,loading:"lazy",src:`${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg`,srcSet:`${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg 1x, ${n}/mp-assets/widgets/SupportBlock/qr-code-mobile-app@2x.jpg 2x`})]})})]})},w=(0,c.g)("support-phone-card","sc"),f=Object.freeze({supportPhoneCard:w,contacts:`${w}__contacts`,phone:`${w}__phone`,chat:`${w}__chat`,info:`${w}__info`,image:`${w}__image`}),x=({phones:e,description:t,s3Assets:n})=>{let s=(0,u.useCallback)(()=>{var e,t,n;null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)||n.call(t),(0,a.h)({eventCategory:m,eventActionType:a.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),l=e=>{let t=e.replace(/[\s-]/g,"");(0,a.h)({eventCategory:m,eventActionType:a.D.link,eventActionText:"phone",eventLabel:t})};return(0,i.jsxs)("div",{className:f.supportPhoneCard,children:[(0,i.jsxs)("div",{className:f.contacts,children:[e.map(e=>(0,i.jsx)("a",{className:f.phone,href:e.href,onClick:()=>l(e.label),children:e.label},e.label)),(0,i.jsx)("span",{className:f.chat,onClick:s,children:"Онлайн чат"})]}),(0,i.jsx)("div",{className:f.info,children:t}),(0,i.jsx)("img",{className:f.image,src:`${n}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},_=({className:e,phoneCard:t,appCard:n,s3Assets:r})=>(0,i.jsx)("section",{className:(0,l.Z)(p.support,e),children:(0,i.jsxs)(s.W2,{children:[(0,i.jsx)(s.X6,{as:"h2",type:"display",weight:"bold",className:(0,l.Z)(p.title,"mb-6"),children:"Поддержка"}),(0,i.jsxs)("div",{className:p.cardsContainer,children:[(0,i.jsx)(x,{s3Assets:r,...t}),(0,i.jsx)(v,{s3Assets:r,...n})]})]})});_.displayName="Support"}}]);