(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7597],{5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return l.workAsyncStorageInstance}});let l=n(17828)},9056:()=>{},11412:()=>{},12989:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var l=n(95155),i=n(29722),o=n(83640);n(11412);let s=(0,o.g)("card"),r={card:s,variants:{primary:`${s}--primary`,secondary:`${s}--secondary`}},a=({as:e,className:t,style:n,children:o,variant:s="primary",dataQa:a,dataId:c,...d})=>(0,l.jsx)(e||"div",{className:(0,i.A)(t,r.card,r.variants[s]),style:n,...d,"data-id":c,"data-qa":a,children:o});a.displayName="Card"},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return l}});let l=(0,n(64054).createAsyncLocalStorage)()},21957:(e,t,n)=>{"use strict";function l({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return l}}),n(95155),n(47650),n(5214),n(2451),n(53887)},23273:()=>{},25032:(e,t,n)=>{"use strict";n.d(t,{C:()=>d});var l=n(95155),i=n(12115),o=n(29722),s=n(92681),r=n(83640);n(49735);let a=(0,r.g)("chips"),c=Object.freeze({chips:a,chip:`${a}__item`,icon:`${a}__icon`,iconLeft:`${a}__icon-left`,iconRight:`${a}__icon-right`,label:`${a}__label`,variants:{primary:`${a}--primary`,secondary:`${a}--secondary`,tertiary:`${a}--tertiary`},activeVariants:{primary:`${a}--active-primary`,secondary:`${a}--active-secondary`},sizes:{s:`${a}--s`,m:`${a}--m`,l:`${a}--l`},selected:`${a}--selected`,indicator:`${a}__indicator`,indicatorVariant:{red:`${a}__indicator--red`,orange:`${a}__indicator--orange`,green:`${a}__indicator--green`,purple:`${a}__indicator--purple`,purpleSecondary:`${a}__indicator--purple-secondary`,blue:`${a}__indicator--blue`,pink:`${a}__indicator--pink`}}),d=(0,i.forwardRef)(({chips:e,value:t,variant:n="primary",activeVariant:r="primary",multiple:a,clearable:d,size:u="m",className:p,style:h,dataQa:m,dataId:f,onChipClick:g,...w},v)=>{let[x,b]=(0,i.useState)(a?[]:void 0),y=(0,i.useRef)(null);(0,i.useImperativeHandle)(v,()=>({getRoot:()=>y.current,getSelectedChips:()=>x})),(0,i.useEffect)(()=>{a?b(Array.isArray(t)?t:[]):b(t)},[t,a]);let _=a||d,C=e=>a&&Array.isArray(x)?x.includes(e):x===e,j=(e,t,n)=>{b(n),null==g||g(e,t,n)},$=(e,t)=>{if(a&&Array.isArray(x))if(C(e)){let n=x.filter(t=>t!==e);j(e,t,n)}else j(e,t,[...x,e]);else{let n=d&&C(e)?void 0:e;j(e,t,n)}};return(0,l.jsx)("div",{ref:y,className:(0,o.A)(p,c.chips),style:h,...w,"data-id":f,"data-qa":m,children:e.map((e,t)=>(({id:e,label:t,iconLeft:i,iconRight:a,indicator:d},p)=>{let h=C(e);return(0,l.jsxs)("div",{className:(0,o.A)(c.chip,c.sizes[u],c.activeVariants[r],c.variants[n],[{[c.selected]:h}]),role:_?"checkbox":"radio","aria-checked":h,"aria-label":t,tabIndex:0,"data-qa":(0,s.g)(`${m}-item-${++p}`,!!m),onClick:t=>{$(e,t)},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),$(e,t))},children:[i&&(0,l.jsx)("span",{className:(0,o.A)(c.icon,c.iconLeft),"aria-hidden":"true",children:i}),(0,l.jsx)("span",{className:(0,o.A)(c.label),children:t}),d&&(0,l.jsx)("div",{className:(0,o.A)(c.indicator,c.indicatorVariant[d])}),a&&(0,l.jsx)("span",{className:(0,o.A)(c.icon,c.iconRight),"aria-hidden":"true",children:a})]},e)})(e,t))})});d.displayName="Chips"},35738:(e,t,n)=>{"use strict";n.d(t,{L:()=>to,Y9:()=>t8,om:()=>ti}),n(9056);var l=n(95155),i=n(12115),o=n(24691),s=n(66216),r=n(29722),a=n(17806),c=n(20197),d=n(14347),u=n(51768),p=n(46089),h=n(56053),m=n(7596),f=n(68990),g=n(83640);n(23273);let w=(0,g.g)("divider"),v=Object.freeze({divider:w,content:`${w}__content`}),x=({content:e,className:t,style:n,dataQa:i,dataId:o,...s})=>(0,l.jsx)("div",{className:(0,r.A)(v.divider,t),style:n,...s,"data-id":o,"data-qa":i,children:e&&(0,l.jsx)("div",{className:v.content,children:e})});x.displayName="Divider";var b=n(25032),y=n(73302),_=n(53730);let C={userRegion:h.U,userTown:h.c,allRegions:"all_regions",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp",allRussiaSelected:"all_russia_selected"},j={userRegion:h.U,userTown:h.c,allRegions:"all_regions_new_api",lastRegionsUpdateUnixTimestamp:"lastRegionsUpdateUnixTimestamp_new_api",allRussiaSelected:"all_russia_selected"},$=(e=!1)=>e?j:C,N=(e,t=!1)=>{if(t){window.allRegionsNewApi=e;return}window.allRegions=e},k=(e,t,n=!1)=>{if(typeof document>"u")return;let l=$(n);if(!e&&!t){_.a.removeItem(l.userRegion),_.a.removeItem(l.userTown);return}_.a.setItem(l.userRegion,JSON.stringify(e)||"",{"max-age":31536e3}),_.a.setItem(l.userTown,JSON.stringify(t)||"",{"max-age":31536e3})},S=e=>{if(typeof document>"u")return null;let t=_.a.getItem(e)??void 0;if(!t||"undefined"===t)return null;try{return JSON.parse(decodeURIComponent(t))}catch{return null}},E=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},O=(e=!1)=>{if(typeof window>"u")return[];let t=((e=!1)=>e?window.allRegionsNewApi:window.allRegions)(e);if(Array.isArray(t)&&t.length>0)return t;let n=E($(e).allRegions)||[];return N(n,e),n},z=e=>e.some(e=>e.towns.some(e=>!!e.newId||!!e.fiasId)),I=e=>{let t={};return e.map(({id:e,name:n,towns:l})=>(l.forEach(l=>{l.parentId=e,t[l.name]=t[l.name]||{},t[l.name][l.id]=n}),l)).reduce((e,n)=>(n.forEach(e=>{Object.keys(t[e.name]).length>1&&(e.parentName=t[e.name][e.id])}),[...e,...n]),[])},A=(e,t)=>`${e.replace(/\/+$/,"")}${t}`,R=async e=>{try{return await (await fetch(e)).json()}catch(e){console.warn(e)}return null},T=(e,t=!1)=>{if(e.length<1)return;let n=$(t);N(e,t),window.localStorage.setItem(n.allRegions,JSON.stringify(e)),window.localStorage.setItem(n.lastRegionsUpdateUnixTimestamp,JSON.stringify(Date.now()))},P=(e,t,n)=>{let l=null,i=null;n&&e.some(e=>{let t=e.towns.find(e=>e.id===n.id)??null;return!!t&&(l=e,i=t,!0)});let o=t?e.find(e=>e.id===t.id)??null:null;return{region:l??o??t,town:i??n}},L=(e,t)=>!!(null!=e&&e.newId||null!=e&&e.fiasId||null!=t&&t.newId||null!=t&&t.fiasId),B=async()=>{let e=await R("https://finuslugi.ru/money_data/Root.json?short=1"),t=Array.isArray(null==e?void 0:e.regions)?e.regions:[];return T(t),t},M=async e=>{let t,n,[l,i]=await Promise.all([R(A(e,"/sc/api/v1/cities?all=true&isActive=true")),R(A(e,"/sc/api/v1/regions?all=true"))]);if(!Array.isArray(null==l?void 0:l.content)||!Array.isArray(null==i?void 0:i.content))return[];let o=l.content,s=(n=(t=i.content.filter(e=>e.isActive).map(e=>({id:e.geoRegionId,name:e.name,name_r:e.nameR,name_p:e.nameP,url:e.url,region_id:e.geoRegionId,enabled:+!!e.isActive,fiasId:e.fiasId,towns:[]}))).reduce((e,t)=>(e[t.id]=t,e),{}),o.forEach(e=>{let t=n[e.geoRegionId];t&&t.towns.push({id:e.legacyId,name:e.name,name_r:e.nameR,name_p:e.nameP,url:e.url,main:+!!e.isRegionalCenter,newId:e.id,fiasId:e.fiasId})}),t);return z(s)?(T(s,!0),s):[]},F=async({showcaseUrl:e="",useNewCitiesApi:t=!1}={})=>t?M(e):B(),D=async e=>{let t=null;try{t=await (await fetch(`${e}`,{method:"GET"})).json()}catch(e){console.warn(e)}return t||null},H=(e,t,n)=>{(0,c.h)({eventCategory:"finkit-widgets-sc-city-select",eventActionType:e,eventActionText:t,eventLabel:n})};var U=n(55727),W=n(12989),V=n(14572);let q={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},G={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"};function Y(e){return{width:`${e}px`,height:`${e}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}}let J=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M21.309 22.765a6.932 6.932 0 01-2.016.233c-1.156-.04-2.62-.39-3.927-1.58A9.985 9.985 0 0112 22a9.97 9.97 0 01-7.071-2.929A9.97 9.97 0 012 12C2 6.477 6.477 2 12 2s10 4.477 10 10a9.958 9.958 0 01-1.233 4.814c.07 1.607.354 2.81.617 3.606a7.784 7.784 0 00.424 1.04c.125.248.251.497.15.787-.103.296-.366.44-.65.52zM12 3.5a8.5 8.5 0 103.258 16.353.75.75 0 01.834.178c1.06 1.124 2.278 1.436 3.252 1.469.304.01.584-.007.824-.035a10.45 10.45 0 01-.208-.574c-.317-.96-.641-2.374-.7-4.237a.75.75 0 01.1-.4A8.5 8.5 0 0012 3.5zm-4.209 7.794a1 1 0 10.003-.002l-.003.002zm3.5 0a1 1 0 10.003-.002l-.003.002zm3.502 1.414a1 1 0 01-.002-1.414l.003-.002a1 1 0 110 1.415z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function Q({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...q,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&Y(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(J,{viewBox:"0 0 24 24",style:G}))}Q.displayName="IconFdsChatDotsCircleO";let K=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("defs",null,i.createElement("clipPath",{id:"fds-chat-dots-square-add-o_svg__a"},i.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24.001H0z"}))),i.createElement("g",{clipPath:"url(#fds-chat-dots-square-add-o_svg__a)"},i.createElement("path",{d:"M18.25 5.75V8c0 .42.33.75.75.75s.75-.33.75-.75V5.75H22c.42 0 .75-.33.75-.75s-.33-.75-.75-.75h-2.25V2c0-.42-.33-.75-.75-.75s-.75.33-.75.75v2.25H16c-.42 0-.75.33-.75.75s.33.75.75.75h2.25zm-4.546-2.23c-.259-.014-.827-.02-1.704-.02-.676 0-1.129.002-1.358.007a7.963 7.963 0 00-.779.047 7.246 7.246 0 00-2.328.689 7.204 7.204 0 00-4.028 6.4c-.005.228-.007.68-.007 1.357 0 .671.002 1.121.007 1.349.007.324.023.584.047.778.057.474.158.933.303 1.378v.001a7.17 7.17 0 001.76 2.867 7.169 7.169 0 002.92 1.777 7.436 7.436 0 002.108.341c.228.006.68.009 1.355.009.67 0 1.12-.003 1.346-.009a7.12 7.12 0 00.794-.057c.476-.05.96-.162 1.455-.333a.71.71 0 01.685.102c.662.48 1.32.829 1.976 1.047a4.85 4.85 0 001.482.264c.142.002.278-.004.41-.016a10.758 10.758 0 01-.222-.535c-.45-1.164-.676-2.305-.676-3.423a.74.74 0 01.116-.401 7.211 7.211 0 001.08-3.01c.024-.196.04-.456.047-.78.005-.228.007-.678.007-1.349 0-.214.002-.488.006-.822.003-.22.004-.376.004-.468 0-.42.33-.75.75-.75s.75.33.75.75c0 .098-.001.26-.004.486A70.38 70.38 0 0022 12c0 .682-.003 1.142-.008 1.381a9.337 9.337 0 01-.058.93 8.752 8.752 0 01-.393 1.737 8.757 8.757 0 01-.788 1.7c.026.866.217 1.757.571 2.674a8.847 8.847 0 00.6 1.249c.11.224.136.42.078.587-.057.168-.198.306-.423.416-.139.068-.32.13-.543.189a5 5 0 01-1.316.15 6.336 6.336 0 01-1.94-.34 8.598 8.598 0 01-2.064-1.035c-.471.14-.939.236-1.402.286a8.23 8.23 0 01-.93.067c-.24.006-.701.009-1.384.009-.688 0-1.152-.003-1.392-.009a8.222 8.222 0 01-.937-.067 8.672 8.672 0 01-3.989-1.538 8.707 8.707 0 01-2.077-2.078 8.705 8.705 0 01-1.597-4.927A78.972 78.972 0 012 12c0-.687.003-1.15.008-1.39.008-.376.027-.686.057-.93a8.737 8.737 0 01.832-2.806 8.69 8.69 0 013.977-3.977 8.7 8.7 0 012.803-.831c.246-.03.557-.05.933-.058C10.85 2.003 11.313 2 12 2c.902 0 1.495.007 1.779.021.42.021.732.367.712.787a.743.743 0 01-.787.711zm-5.91 9.19a1 1 0 111.412-1.414 1 1 0 01-1.413 1.415zm3.497-1.412a1 1 0 101.418 1.41 1 1 0 00-1.418-1.41zm3.502 1.413a1 1 0 111.414-1.415 1 1 0 01-1.414 1.415z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function X({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...q,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&Y(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(K,{viewBox:"0 0 24 24",style:G}))}X.displayName="IconFdsChatDotsSquareAddO";let Z=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M19.03 10.28l-6.5 6.5a.75.75 0 01-1.06 0l-6.5-6.5a.75.75 0 111.06-1.06L12 15.19l5.97-5.97a.75.75 0 111.06 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function ee({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...q,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&Y(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(Z,{viewBox:"0 0 24 24",style:G}))}ee.displayName="IconFdsChevronDownO";let et=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function en({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...q,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&Y(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(et,{viewBox:"0 0 24 24",style:G}))}en.displayName="IconFdsCloseO";let el=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("defs",null,i.createElement("clipPath",{id:"fds-menu-skewed-o_svg__a"},i.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24.001H0z"}))),i.createElement("g",{clipPath:"url(#fds-menu-skewed-o_svg__a)"},i.createElement("path",{d:"M7.75 5a.75.75 0 100 1.5h13.5a.75.75 0 100-1.5H7.75zM22 12a.75.75 0 00-.75-.75H2.75a.75.75 0 100 1.5h18.5A.75.75 0 0022 12zm-5.75 5.5a.75.75 0 110 1.5H2.75a.75.75 0 110-1.5h13.5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function ei({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...q,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&Y(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(el,{viewBox:"0 0 24 24",style:G}))}ei.displayName="IconFdsMenuSkewedO";let eo=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M6.999 7a5 5 0 1110 0 5 5 0 01-10 0zm5-3.5a3.5 3.5 0 100 7 3.5 3.5 0 000-7zM10.012 14h3.974c1.52 0 2.497 0 3.345.337a4.75 4.75 0 011.916 1.402c.579.705.875 1.636 1.335 3.085l.05.159.332 1.04a.75.75 0 11-1.43.455l-.33-1.04c-.53-1.664-.744-2.293-1.117-2.748a3.249 3.249 0 00-1.31-.959c-.547-.217-1.212-.23-2.958-.23h-3.64c-1.746 0-2.41.013-2.957.23a3.249 3.249 0 00-1.311.959c-.373.454-.587 1.084-1.116 2.748l-.331 1.04a.75.75 0 11-1.43-.455l.331-1.04.05-.159c.461-1.449.757-2.38 1.336-3.086a4.752 4.752 0 011.916-1.4C7.515 14 8.492 14 10.012 14z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function es({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...q,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&Y(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(eo,{viewBox:"0 0 24 24",style:G}))}es.displayName="IconFdsUserO";let er=()=>{let e=(0,i.useRef)(null),t=(0,i.useCallback)(()=>{e.current&&(clearTimeout(e.current),e.current=null)},[]),n=(0,i.useCallback)((t,n)=>{e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{e.current=null,t()},n)},[]);return(0,i.useEffect)(()=>t,[t]),{start:n,clear:t,pending:!!e.current}},ea={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},ec={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"};function ed(e){return{width:`${e}px`,height:`${e}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}}let eu=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M11.28 17.03l4.5-4.5a.75.75 0 000-1.06l-4.5-4.5a.75.75 0 10-1.06 1.06L14.19 12l-3.97 3.97a.75.75 0 101.06 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function ep({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...ea,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&ed(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(eu,{viewBox:"0 0 24 24",style:ec}))}ep.displayName="IconFdsChevronRightSmallO";let eh=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function em({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...ea,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&ed(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(eh,{viewBox:"0 0 24 24",style:ec}))}em.displayName="IconFdsCloseO";let ef=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("defs",null,i.createElement("linearGradient",{x1:12.343,y1:1,x2:12.343,y2:22.951,id:"fds-gosuslugi-colored-o_svg__b",gradientUnits:"userSpaceOnUse"},i.createElement("stop",{offset:.329,stopColor:"#0F67B1"}),i.createElement("stop",{offset:.636,stopColor:"#EF3E58"})),i.createElement("clipPath",{id:"fds-gosuslugi-colored-o_svg__a"},i.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),i.createElement("g",{clipPath:"url(#fds-gosuslugi-colored-o_svg__a)"},i.createElement("path",{d:"M22.23 14.65c0 .03 0 .11-.02.13-.03.4-.06.69-.06.71 0 .03 0 .07-.01.11-.01.07-.03.17-.04.24-.18.84-.65 1.8-1.23 2.49-.23.27-.47.51-.72.7l-.77.55c-.7.48-1.41.93-2.14 1.37-1.52.89-2.89 1.52-3.07 1.6-.39.18-.9.31-1.43.37-.1.01-.21.02-.31.02-.09.01-.19.01-.28.01h-.14c-.71-.02-1.37-.16-1.88-.39-.07-.04-1.35-.62-2.83-1.47-.09-.04-.17-.09-.26-.14a39.02 39.02 0 01-2.91-1.92c-.39-.29-.75-.67-1.07-1.14-.07-.11-.07-.38.24-.38h.79c.34 0 .42.21.81.49.42.31 1.25.94 2.8 1.85.84.49 1.7.95 2.58 1.36.01 0 .09.05.1.05l.28.13c.35.17.85.26 1.38.27h.2c.16 0 .32-.01.46-.03.32-.04.61-.11.85-.21l.11-.05c1.75-.81 3.42-1.77 5-2.86.44-.31.71-.52.72-.52.2-.15.4-.34.58-.58.47-.6.85-1.42.92-2.05 0 0 .03-.26.06-.69l.01-.14c0-.04.01-.08.01-.12.01-.02.01-.08.01-.11 0-.05.01-.11.01-.16l.01-.11c.01-.04.01-.07.01-.12.07-1.23.07-2.55 0-3.79-.01-.04-.01-.16-.01-.2-.01-.03-.01-.08-.01-.11 0-.05-.01-.1-.01-.16l-.01-.11c0-.04-.01-.07-.01-.12-.01-.03-.01-.11-.01-.14-.03-.43-.06-.67-.06-.68-.07-.64-.45-1.46-.92-2.06a3.18 3.18 0 00-.58-.58c-.9-.66-1.83-1.28-2.79-1.84-.97-.57-1.95-1.09-2.97-1.56-.24-.1-.6-.2-.92-.24-.14-.02-.3-.03-.46-.03h-.2c-.53.01-1.03.12-1.38.27 0 0-.08.03-.21.09-.01 0-.09.06-.1.06-.5.23-1.54.74-2.64 1.4-1.54.91-2.38 1.53-2.8 1.84-.39.28-.47.49-.81.49h-.8c-.31 0-.31-.27-.24-.38.32-.48.68-.86 1.07-1.15.94-.68 1.91-1.33 2.91-1.92 1.57-.92 3.01-1.58 3.09-1.61.52-.24 1.17-.37 1.89-.38h.14c.1 0 .19.01.28.01.11 0 .21.01.31.02.53.05 1.02.17 1.42.35.18.08 1.56.71 3.08 1.62 1 .58 1.98 1.22 2.91 1.91.25.19.49.43.72.7.58.69 1.04 1.62 1.22 2.46.02.06.04.17.05.24 0 .03.01.1.01.14.01.02.03.27.06.67 0 .05.01.12.01.16.01.02.01.09.01.11l.08 1.39c.01.37.02.8.02 1.21l-.02 1.16c-.02.54-.05 1.12-.09 1.5zM9.86 10.21c-.16.07-.52.09-.72.09-.47 0-.69-.13-.69-.83 0-.57.06-.83.69-.83.17 0 .33.02.53.08l.32-.56c-.29-.09-.61-.18-.91-.19-.96 0-1.39.46-1.39 1.49s.43 1.5 1.39 1.5c.24 0 .73-.05.96-.15l-.18-.6zM5.87 7.98c-.95 0-1.32.42-1.32 1.47 0 1.06.37 1.48 1.32 1.48.97 0 1.34-.42 1.34-1.48 0-1.05-.37-1.47-1.34-1.47zm-3.49.09l-.04 2.77.7.04.04-2.16h1.03c.08-.19.19-.4.27-.6l-2-.05zm3.49 2.26c-.43 0-.57-.12-.57-.86 0-.79.15-.86.57-.86.44 0 .58.07.58.86 0 .73-.13.86-.58.86zm1.63 3.99c-.17.06-.52.08-.73.08-.46 0-.68-.12-.68-.83 0-.57.07-.83.68-.83.18 0 .33.02.54.09l.31-.56c-.28-.09-.6-.19-.9-.19-.96 0-1.4.46-1.4 1.48 0 1.04.44 1.51 1.4 1.51.24 0 .73-.06.95-.15l-.17-.6zm3.05-2.15H8.51c-.05.93-.27 1.94-.51 2.75l.73.04c.2-.62.39-1.45.45-2.13h.66v2.1l.71.04v-2.8zm5.75 0h-1.96l-.04 2.77.7.04.04-2.15h1.03c.08-.19.14-.46.23-.66zm2.84 0h-.67l-.04 2.15c-.14.04-.29.06-.45.06-.44 0-.54-.13-.54-.71v-1.46l-.71-.04-.04 1.57c0 .95.32 1.32 1.14 1.32.47 0 1-.13 1.31-.24v-2.65zm-14.06.01h-.67c-.1.42-.35 1.15-.64 1.89l-.68-1.87-.71-.02.98 2.83c-.09.19-.18.38-.29.56-.07.13-.13.25-.19.39l.76.05c.16-.3.33-.62.46-.93.43-1.02.72-2.03.98-2.9zm8.73 0h-.67c-.11.43-.36 1.15-.65 1.89l-.67-1.87-.72-.02.99 2.83c-.09.19-.19.38-.29.56-.07.13-.14.25-.2.39l.77.05c.15-.3.32-.62.46-.93.42-1.02.72-2.03.98-2.9z",fill:"url(#fds-gosuslugi-colored-o_svg__b)",fillRule:"evenodd"})));function eg({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...ea,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&ed(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(ef,{viewBox:"0 0 24 24",style:ec}))}eg.displayName="IconFdsGosuslugiColoredO";let ew=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M9.913 2.416A4.747 4.747 0 0111.855 2h.29c.67 0 1.331.142 1.943.416l5.287 2.373A2.752 2.752 0 0121 7.3v4.712c0 3.694-1.854 6.116-3.84 7.63-1.965 1.497-4.086 2.131-4.766 2.308a1.558 1.558 0 01-.792-.002 13.032 13.032 0 01-4.788-2.492C4.819 17.79 3 15.121 3 11.011V7.3c0-1.086.637-2.068 1.625-2.512l5.288-2.373zm1.942 1.086c-.458 0-.91.097-1.329.285L5.24 6.16A1.25 1.25 0 004.5 7.3v3.71c0 3.598 1.566 5.866 3.275 7.293 1.732 1.448 3.625 2.037 4.212 2.193a.058.058 0 00.03 0c.596-.155 2.497-.726 4.235-2.05 1.717-1.309 3.248-3.326 3.248-6.434V7.3a1.25 1.25 0 00-.739-1.14l-5.287-2.373a3.245 3.245 0 00-1.33-.285h-.289zM15.78 9.22a.75.75 0 010 1.06l-4 4a.75.75 0 01-1.06 0l-2-2a.75.75 0 111.06-1.06l1.47 1.47 3.47-3.47a.75.75 0 011.06 0z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function ev({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...ea,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&ed(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(ew,{viewBox:"0 0 24 24",style:ec}))}ev.displayName="IconFdsShieldCheckO";let ex={"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"},eb=(0,i.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 ey(){return(0,i.useContext)(eb)}let e_=e=>{let[t,n]=(0,i.useState)(!1),[o,s]=(0,i.useState)(!1),[r,a]=(0,i.useState)(!!e.isMainBannerPage),{isChatModalOpen:c,setIsChatModalOpen:d,isChatLoading:h}=(()=>{let[e,t]=(0,i.useState)(!1),[n,l]=(0,i.useState)(!1),o=(0,i.useRef)(!1),s=e=>{o.current=e,l(e)};return(0,i.useEffect)(()=>{if(typeof window>"u")return;let e=(()=>{let{hostname:e}=window.location;return Object.prototype.hasOwnProperty.call(ex,e)?ex[e]:ex["finuslugi.ru"]})(),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 l=null;window.supportWidget&&window.supportWidget.craftTalk&&(window.supportWidget.craftTalk.open=()=>new Promise((i,r)=>{var a,c;let d,u;o.current?r(Error("chat is already opened")):l?(l.openWidget(),t(!1),i()):(s(!0),window.getWebChatCraftTalkExternalControl=e=>{var n;l=e;let o=document.querySelector(".webchat");o&&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)}})}).observe(o,{attributes:!0,attributeFilter:["style"]}),null!=(n=window.supportWidget)&&n.craftTalk&&(window.supportWidget.craftTalk.close=l.closeWidget),null==l||l.openWidget(),s(!1),t(!1),i()},a=e,c=n,(d=document.createElement("link")).rel="stylesheet",d.type="text/css",d.href=`${a}/assets/css/${c}`,document.head.appendChild(d),(u=document.createElement("script")).src=`${a}/get-bootstrap/${c}`,u.defer=!0,document.body.appendChild(u))}),window.supportWidget.craftTalk.toggle=()=>{var e,t,n,l;null!=(t=null==(e=window.supportWidget)?void 0:e.craftTalk)&&t.isOpened?window.supportWidget.craftTalk.close():null==(l=null==(n=window.supportWidget)?void 0:n.craftTalk)||l.open()})},[]),{isChatModalOpen:e,setIsChatModalOpen:t,isChatLoading:n}})(),[m,f]=(0,i.useState)(null),[g,w]=(0,i.useState)(null),[v,x]=(0,i.useState)(!1),[b,y]=(0,i.useState)(!1),[_,C]=(0,i.useState)(!1),j=(0,i.useRef)(null),$=(0,u.u)(v),N=(0,i.useRef)(null),k=(0,i.useRef)(null),S=(0,i.useRef)(null),E=(0,i.useRef)(null),O=(0,i.useCallback)(()=>{$.current&&$.current.scrollTo({top:0})},[$]),z=(0,i.useCallback)(e=>{w(e),O()},[O]),I=(0,i.useCallback)(e=>{N.current&&clearTimeout(N.current),e&&y(!0),e||(N.current=setTimeout(()=>{y(!1),z(null)},300))},[z]),A=(0,i.useCallback)((e,t,n)=>{if(t&&z(t),!n&&e===m||!e){I(!v),x(!v);return}f(e),I(!0),x(!0)},[m,z,v,I]),R=(0,i.useCallback)(()=>{k.current&&clearTimeout(k.current),C(!0),k.current=setTimeout(()=>{C(!1)},650)},[]);return(0,i.useEffect)(()=>{n(!!document.cookie.includes("auth.gtm_customer_id"));let t=(0,p.s)(s,a,e.isMainBannerPage);return(0,p.i)(),t},[]),(0,l.jsx)("header",{children:(0,l.jsx)(eb.Provider,{value:{isAuth:t,isHeaderHidden:o,isHeaderTransparent:r,openedBlock:m,setOpenedBlock:A,openedSection:g,setOpenedSection:z,isNavigationOpen:v,isNavigationMounted:b,navMenuItemsRef:j,navigationRef:$,ignoreClicks:_,setIgnoreClicks:R,isChatModalOpen:c,setIsChatModalOpen:d,isChatLoading:h,fixedContainerRef:S,headerRef:E},children:e.children})})},eC=(0,m.g)("certificates-warning-banner","sc"),ej=(0,m.g)("certificates-warning-popup","sc"),e$=Object.freeze({wrapper:`${eC}`,container:`${eC}__container`,content:`${eC}__content`,info:`${eC}__info`,image:`${eC}__image`,text:`${eC}__text`,title:`${eC}__title`,description:`${eC}__description`,details:`${eC}__details`,buttons:`${eC}__buttons`,button:`${eC}__button`,closeButton:`${eC}__close-button`,mobileActivator:`${eC}__mobile-activator`}),eN=Object.freeze({modal:`${ej}__modal`,desktopCloseButton:`${ej}__desktop-close-button`,mobilePopup:`${ej}__mobile-popup`,mobileContentContainer:`${ej}__mobile-content-container`,mobileCloseButton:`${ej}__mobile-close-button`,mobileDialog:`${ej}__mobile-dialog`,content:`${ej}__content`,image:`${ej}__image`,text:`${ej}__text`,title:`${ej}__title`,description:`${ej}__description`,actions:`${ej}__actions`,primaryActions:`${ej}__primary-actions`,divider:`${ej}__divider`,explanation:`${ej}__explanation`,button:`${ej}__button`,gosuslugiButton:`${ej}__gosuslugi-button`,gosuslugiIcon:`${ej}__gosuslugi-icon`}),ek="fu_certificates_access_confirmed",eS="fu_certificates_banner_dismissed",eE="fu_external_link_warning_shown",eO={bannerShown:{eventActionType:c.D.show,eventActionText:"certificates_banner"},bannerDetails:{eventActionType:c.D.banner,eventActionText:"certificates_details"},bannerInstall:{eventActionType:c.D.button,eventActionText:"certificates_banner_install"},bannerYandex:{eventActionType:c.D.button,eventActionText:"certificates_banner_yandex"},bannerClose:{eventActionType:c.D.icon,eventActionText:"certificates_banner_close"},popupShown:{eventActionType:c.D.popup,eventActionText:"certificates_warning"},popupInstall:{eventActionType:c.D.button,eventActionText:"certificates_popup_install"},popupYandex:{eventActionType:c.D.button,eventActionText:"certificates_popup_yandex"},popupContinue:{eventActionType:c.D.button,eventActionText:"certificates_popup_continue"},popupCloseButton:{eventActionType:c.D.icon,eventActionText:"certificates_popup_close"},popupClosed:{eventActionType:c.D.close,eventActionText:"certificates_popup"}},ez=(e,t,n)=>{let l="banner"===t.source?"":`;host=${t.host}`;try{(0,c.h)({eventCategory:h.H,...eO[e],eventLabel:`source=${t.source};layout=${n?"desktop":"mobile"}${l}`})}catch{}},eI=["--banner-header-height","--fixed-header-height","--new-header-height-desktop","--new-header-height-mobile","--static-new-header-height-mobile","--static-new-header-height-desktop","--header-height"],eA=({onDismiss:e,onClosed:t,onOpenDetails:n,onOpenCertificatesPage:r,onOpenYandexBrowserPage:a})=>{let{fixedContainerRef:c,headerRef:u}=ey(),m=(0,d.qF)("l"),f=(0,i.useRef)(null),g=(0,i.useRef)(!1),w=(0,i.useRef)(!1),v=(0,i.useRef)(!1),[x,b]=(0,i.useState)(!1),[y,_]=(0,i.useState)(!1);(0,i.useEffect)(()=>{w.current||(w.current=!0,ez("bannerShown",{source:"banner"},m))},[m]);let C=(e,t)=>()=>{ez(e,{source:"banner"},m),t()},j=(0,i.useCallback)(()=>{let e=f.current,t=c.current;if(!e||!t)return;let n=e.getBoundingClientRect().height,l=n+(window.innerWidth<768?h.F.mobile:h.F.desktop),i=document.documentElement.style;i.setProperty("--banner-header-height",`${n}px`),i.setProperty("--fixed-header-height",`${l}px`),i.setProperty("--new-header-height-desktop",`${l}px`),i.setProperty("--new-header-height-mobile",`${l}px`),i.setProperty("--static-new-header-height-mobile",`${l}px`),i.setProperty("--static-new-header-height-desktop",`${l}px`),i.setProperty("--header-height",`${n+108}px`),t.style.transform=g.current?"translateY(0)":`translateY(-${n}px)`,window.dispatchEvent(new Event(p.H))},[c]),$=(0,i.useCallback)(()=>{let e=c.current;eI.forEach(e=>document.documentElement.style.removeProperty(e)),e&&(e.style.transform=""),window.dispatchEvent(new Event(p.H))},[c]),N=(0,i.useCallback)(()=>{let e=c.current;if(!e)return;let t=window.innerWidth<768?h.F.mobile:h.F.desktop,n=document.documentElement.style;n.setProperty("--fixed-header-height",`${t}px`),n.setProperty("--new-header-height-desktop",`${t}px`),n.setProperty("--new-header-height-mobile",`${t}px`),n.setProperty("--static-new-header-height-mobile",`${t}px`),n.setProperty("--static-new-header-height-desktop",`${t}px`),n.setProperty("--header-height","108px"),e.style.transform="",window.dispatchEvent(new Event(p.H))},[c]);return(0,i.useEffect)(()=>{let e=u.current;if(!e)return;let n=()=>{_(!1),x&&t()};return e.addEventListener("transitionend",n),()=>e.removeEventListener("transitionend",n)},[u,x,t]),(0,i.useLayoutEffect)(()=>{var e;let t=f.current;if(!t)return;j();let n=window.matchMedia("(prefers-reduced-motion: reduce)").matches,l=null;n?(g.current=!0,null==(e=c.current)||e.style.setProperty("transform","translateY(0)")):l=window.requestAnimationFrame(()=>{var e;g.current=!0,null==(e=c.current)||e.style.setProperty("transform","translateY(0)"),_(!0)});let i=new ResizeObserver(j);return i.observe(t),window.addEventListener("resize",j),()=>{null!==l&&window.cancelAnimationFrame(l),i.disconnect(),window.removeEventListener("resize",j),$()}},[$,j]),(0,l.jsxs)("div",{id:"headerNotice",ref:f,role:"region","aria-label":"Сертификаты Минцифры","data-opening":y,className:e$.wrapper,children:[(0,l.jsx)("button",{className:e$.mobileActivator,type:"button","aria-label":"Подробнее о сертификатах Минцифры",onClick:C("bannerDetails",n)}),(0,l.jsx)(s.m,{children:(0,l.jsxs)("div",{className:e$.container,children:[(0,l.jsxs)("div",{className:e$.content,children:[(0,l.jsxs)("div",{className:e$.info,children:[(0,l.jsx)("div",{className:e$.image,children:(0,l.jsx)(ev,{size:32})}),(0,l.jsxs)("div",{className:e$.text,children:[(0,l.jsx)("h2",{className:e$.title,children:"Для работы российских сайтов нужны сертификаты Минцифры"}),(0,l.jsx)("p",{className:e$.description,children:"Установите их, чтобы пользоваться всеми функциями сайта и оплачивать услуги без сбоев. Или откройте страницу через Яндекс Браузер — в него всё уже встроено"}),(0,l.jsxs)("span",{className:e$.details,children:["Подробнее",(0,l.jsx)(ep,{size:16})]})]})]}),(0,l.jsxs)("div",{className:e$.buttons,children:[(0,l.jsx)(o.$,{className:e$.button,label:"Установить сертификаты",iconLeft:(0,l.jsx)(eg,{size:16}),size:"xs",variant:"white",onClick:C("bannerInstall",r)}),(0,l.jsx)(o.$,{className:e$.button,label:"Открыть в Яндекс Браузере",iconLeft:(0,l.jsx)("img",{src:"https://assets.finuslugi.ru/mp-assets/widgets/CertificatesWarning/yandex-browser.svg",alt:"",loading:"lazy"}),size:"xs",variant:"white",appearance:"outline",onClick:C("bannerYandex",a)})]})]}),(0,l.jsx)("button",{className:e$.closeButton,type:"button","aria-label":"Закрыть",onClick:()=>{if(!v.current){if(v.current=!0,ez("bannerClose",{source:"banner"},m),e(),window.matchMedia("(prefers-reduced-motion: reduce)").matches){$(),t();return}N(),b(!0)}},children:(0,l.jsx)(em,{size:24})})]})})]})},eR={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},eT={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},eP=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function eL({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...eR,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(eP,{viewBox:"0 0 24 24",style:eT}))}eL.displayName="IconFdsCloseO";let eB={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},eM={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"};function eF(e){return{width:`${e}px`,height:`${e}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}}let eD=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("defs",null,i.createElement("linearGradient",{x1:12.343,y1:1,x2:12.343,y2:22.951,id:"fds-gosuslugi-colored-o_svg__b",gradientUnits:"userSpaceOnUse"},i.createElement("stop",{offset:.329,stopColor:"#0F67B1"}),i.createElement("stop",{offset:.636,stopColor:"#EF3E58"})),i.createElement("clipPath",{id:"fds-gosuslugi-colored-o_svg__a"},i.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),i.createElement("g",{clipPath:"url(#fds-gosuslugi-colored-o_svg__a)"},i.createElement("path",{d:"M22.23 14.65c0 .03 0 .11-.02.13-.03.4-.06.69-.06.71 0 .03 0 .07-.01.11-.01.07-.03.17-.04.24-.18.84-.65 1.8-1.23 2.49-.23.27-.47.51-.72.7l-.77.55c-.7.48-1.41.93-2.14 1.37-1.52.89-2.89 1.52-3.07 1.6-.39.18-.9.31-1.43.37-.1.01-.21.02-.31.02-.09.01-.19.01-.28.01h-.14c-.71-.02-1.37-.16-1.88-.39-.07-.04-1.35-.62-2.83-1.47-.09-.04-.17-.09-.26-.14a39.02 39.02 0 01-2.91-1.92c-.39-.29-.75-.67-1.07-1.14-.07-.11-.07-.38.24-.38h.79c.34 0 .42.21.81.49.42.31 1.25.94 2.8 1.85.84.49 1.7.95 2.58 1.36.01 0 .09.05.1.05l.28.13c.35.17.85.26 1.38.27h.2c.16 0 .32-.01.46-.03.32-.04.61-.11.85-.21l.11-.05c1.75-.81 3.42-1.77 5-2.86.44-.31.71-.52.72-.52.2-.15.4-.34.58-.58.47-.6.85-1.42.92-2.05 0 0 .03-.26.06-.69l.01-.14c0-.04.01-.08.01-.12.01-.02.01-.08.01-.11 0-.05.01-.11.01-.16l.01-.11c.01-.04.01-.07.01-.12.07-1.23.07-2.55 0-3.79-.01-.04-.01-.16-.01-.2-.01-.03-.01-.08-.01-.11 0-.05-.01-.1-.01-.16l-.01-.11c0-.04-.01-.07-.01-.12-.01-.03-.01-.11-.01-.14-.03-.43-.06-.67-.06-.68-.07-.64-.45-1.46-.92-2.06a3.18 3.18 0 00-.58-.58c-.9-.66-1.83-1.28-2.79-1.84-.97-.57-1.95-1.09-2.97-1.56-.24-.1-.6-.2-.92-.24-.14-.02-.3-.03-.46-.03h-.2c-.53.01-1.03.12-1.38.27 0 0-.08.03-.21.09-.01 0-.09.06-.1.06-.5.23-1.54.74-2.64 1.4-1.54.91-2.38 1.53-2.8 1.84-.39.28-.47.49-.81.49h-.8c-.31 0-.31-.27-.24-.38.32-.48.68-.86 1.07-1.15.94-.68 1.91-1.33 2.91-1.92 1.57-.92 3.01-1.58 3.09-1.61.52-.24 1.17-.37 1.89-.38h.14c.1 0 .19.01.28.01.11 0 .21.01.31.02.53.05 1.02.17 1.42.35.18.08 1.56.71 3.08 1.62 1 .58 1.98 1.22 2.91 1.91.25.19.49.43.72.7.58.69 1.04 1.62 1.22 2.46.02.06.04.17.05.24 0 .03.01.1.01.14.01.02.03.27.06.67 0 .05.01.12.01.16.01.02.01.09.01.11l.08 1.39c.01.37.02.8.02 1.21l-.02 1.16c-.02.54-.05 1.12-.09 1.5zM9.86 10.21c-.16.07-.52.09-.72.09-.47 0-.69-.13-.69-.83 0-.57.06-.83.69-.83.17 0 .33.02.53.08l.32-.56c-.29-.09-.61-.18-.91-.19-.96 0-1.39.46-1.39 1.49s.43 1.5 1.39 1.5c.24 0 .73-.05.96-.15l-.18-.6zM5.87 7.98c-.95 0-1.32.42-1.32 1.47 0 1.06.37 1.48 1.32 1.48.97 0 1.34-.42 1.34-1.48 0-1.05-.37-1.47-1.34-1.47zm-3.49.09l-.04 2.77.7.04.04-2.16h1.03c.08-.19.19-.4.27-.6l-2-.05zm3.49 2.26c-.43 0-.57-.12-.57-.86 0-.79.15-.86.57-.86.44 0 .58.07.58.86 0 .73-.13.86-.58.86zm1.63 3.99c-.17.06-.52.08-.73.08-.46 0-.68-.12-.68-.83 0-.57.07-.83.68-.83.18 0 .33.02.54.09l.31-.56c-.28-.09-.6-.19-.9-.19-.96 0-1.4.46-1.4 1.48 0 1.04.44 1.51 1.4 1.51.24 0 .73-.06.95-.15l-.17-.6zm3.05-2.15H8.51c-.05.93-.27 1.94-.51 2.75l.73.04c.2-.62.39-1.45.45-2.13h.66v2.1l.71.04v-2.8zm5.75 0h-1.96l-.04 2.77.7.04.04-2.15h1.03c.08-.19.14-.46.23-.66zm2.84 0h-.67l-.04 2.15c-.14.04-.29.06-.45.06-.44 0-.54-.13-.54-.71v-1.46l-.71-.04-.04 1.57c0 .95.32 1.32 1.14 1.32.47 0 1-.13 1.31-.24v-2.65zm-14.06.01h-.67c-.1.42-.35 1.15-.64 1.89l-.68-1.87-.71-.02.98 2.83c-.09.19-.18.38-.29.56-.07.13-.13.25-.19.39l.76.05c.16-.3.33-.62.46-.93.43-1.02.72-2.03.98-2.9zm8.73 0h-.67c-.11.43-.36 1.15-.65 1.89l-.67-1.87-.72-.02.99 2.83c-.09.19-.19.38-.29.56-.07.13-.14.25-.2.39l.77.05c.15-.3.32-.62.46-.93.42-1.02.72-2.03.98-2.9z",fill:"url(#fds-gosuslugi-colored-o_svg__b)",fillRule:"evenodd"})));function eH({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...eB,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&eF(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(eD,{viewBox:"0 0 24 24",style:eM}))}eH.displayName="IconFdsGosuslugiColoredO";let eU=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M9.913 2.416A4.747 4.747 0 0111.855 2h.29c.67 0 1.331.142 1.943.416l5.287 2.373A2.752 2.752 0 0121 7.3v4.712c0 3.694-1.854 6.116-3.84 7.63-1.965 1.497-4.086 2.131-4.766 2.308a1.558 1.558 0 01-.792-.002 13.032 13.032 0 01-4.788-2.492C4.819 17.79 3 15.121 3 11.011V7.3c0-1.086.637-2.068 1.625-2.512l5.288-2.373zm1.942 1.086c-.458 0-.91.097-1.329.285L5.24 6.16A1.25 1.25 0 004.5 7.3v3.71c0 3.598 1.566 5.866 3.275 7.293 1.732 1.448 3.625 2.037 4.212 2.193a.058.058 0 00.03 0c.596-.155 2.497-.726 4.235-2.05 1.717-1.309 3.248-3.326 3.248-6.434V7.3a1.25 1.25 0 00-.739-1.14l-5.287-2.373a3.245 3.245 0 00-1.33-.285h-.289zM15.78 9.22a.75.75 0 010 1.06l-4 4a.75.75 0 01-1.06 0l-2-2a.75.75 0 111.06-1.06l1.47 1.47 3.47-3.47a.75.75 0 011.06 0z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function eW({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...eB,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&eF(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(eU,{viewBox:"0 0 24 24",style:eM}))}eW.displayName="IconFdsShieldCheckO";let eV=({onOpenCertificatesPage:e,onOpenYandexBrowserPage:t,onContinue:n})=>{let s=(0,i.useRef)(null),r=`certificates-warning-gosuslugi-${(0,i.useId)().replaceAll(":","")}`;return(0,i.useLayoutEffect)(()=>{var e,t;let n=null==(e=s.current)?void 0:e.querySelector("linearGradient"),l=null==(t=s.current)?void 0:t.querySelector('path[fill^="url("]');n&&l&&(n.id=r,l.setAttribute("fill",`url(#${r})`))},[r]),(0,l.jsxs)("div",{className:eN.content,children:[(0,l.jsx)("div",{className:eN.image,children:(0,l.jsx)(eW,{size:64})}),(0,l.jsxs)("div",{className:eN.text,children:[(0,l.jsx)("h2",{className:eN.title,children:"Установите сертификаты Минцифры"}),(0,l.jsx)("p",{className:eN.description,children:"Без них российские сайты и оплата услуг могут не работать. Или откройте страницу через Яндекс Браузер — в него всё уже встроено"})]}),(0,l.jsxs)("div",{className:eN.actions,children:[(0,l.jsxs)("div",{className:eN.primaryActions,children:[(0,l.jsx)(o.$,{className:`${eN.button} ${eN.gosuslugiButton}`,label:"Установить сертификаты",iconLeft:(0,l.jsx)("span",{ref:s,className:eN.gosuslugiIcon,children:(0,l.jsx)(eH,{size:20})}),size:"m",stretch:!0,onClick:e}),(0,l.jsx)(o.$,{className:eN.button,label:"Открыть в Яндекс Браузере",iconLeft:(0,l.jsx)("img",{src:"https://assets.finuslugi.ru/mp-assets/widgets/CertificatesWarning/yandex-browser.svg",alt:"",loading:"lazy",width:24,height:24}),size:"m",stretch:!0,variant:"secondary",onClick:t})]}),n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x,{className:eN.divider}),(0,l.jsx)(o.$,{className:eN.button,label:"Продолжить в текущем браузере",size:"m",stretch:!0,variant:"secondary",appearance:"outline",onClick:n}),(0,l.jsx)("p",{className:eN.explanation,children:"Можно продолжить и без установки. Браузер покажет предупреждение о незащищенном соединении — пропустите его и нажмите \xabПерейти на сайт\xbb"})]})]})]})},eq=({isOpen:e,analyticsContext:t,onClose:n,onOpenCertificatesPage:o,onOpenYandexBrowserPage:s,onContinue:r})=>{let a=(0,d.qF)("l"),c=(0,i.useRef)(null),p=(0,i.useRef)(!1),h=(0,i.useRef)(!1),m=(0,i.useRef)(!1),g=(0,i.useRef)(t);(0,i.useEffect)(()=>(p.current=!0,()=>{p.current=!1}),[]),(0,i.useEffect)(()=>{if(g.current=e?t:null,!e){h.current=!1,m.current=!0;return}h.current||(m.current=!1,t&&(h.current=!0,ez("popupShown",t,a)))},[t,a,e]);let w=(0,i.useCallback)(()=>p.current&&e&&!m.current&&g.current===t,[t,e]),v=(0,i.useCallback)(()=>{w()&&(m.current=!0,t&&ez("popupClosed",t,a),n())},[t,w,a,n]),x=()=>{w()&&(t&&ez("popupCloseButton",t,a),v())},b=(e,n)=>()=>{w()&&(t&&ez(e,t,a),n())},y=(0,l.jsx)(eV,{onOpenCertificatesPage:b("popupInstall",o),onOpenYandexBrowserPage:b("popupYandex",s),onContinue:r?b("popupContinue",r):void 0});return(0,i.useEffect)(()=>{if(!e)return;let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=window.setTimeout(()=>{var e;if(!a){null==(e=c.current)||e.focus();return}let t=document.querySelector(`.${eN.desktopCloseButton}`);null==t||t.focus()},120),l=e=>{a||"Escape"===e.key&&v()};return document.addEventListener("keydown",l),()=>{window.clearTimeout(n),document.removeEventListener("keydown",l),null==t||t.focus()}},[v,a,e]),a?(0,l.jsxs)(f.a,{className:eN.modal,open:e,size:"m",noPadding:!0,header:{withoutCloseBtn:!0},"aria-label":"Установите сертификаты Минцифры",onClose:v,children:[(0,l.jsx)("button",{className:eN.desktopCloseButton,type:"button","aria-label":"Закрыть",onClick:x,children:(0,l.jsx)(eL,{size:24})}),y]}):(0,l.jsx)(u.P,{children:(0,l.jsx)(u.U,{className:eN.mobilePopup,contentClassName:eN.mobileContentContainer,isOpen:e,isSmallPopup:!0,onClose:v,closeButton:(0,l.jsx)("button",{className:eN.mobileCloseButton,type:"button","aria-label":"Закрыть",onClick:x,children:(0,l.jsx)(eL,{size:24})}),children:(0,l.jsx)("div",{ref:c,className:eN.mobileDialog,role:"dialog","aria-modal":"true","aria-label":"Установите сертификаты Минцифры",tabIndex:-1,children:y})})})},eG=new Map,eY=e=>{if(typeof window>"u")return"1"===eG.get(e);try{return"1"===window.localStorage.getItem(e)||"1"===eG.get(e)}catch{return"1"===eG.get(e)}},eJ=e=>{if(eG.set(e,"1"),!(typeof window>"u"))try{window.localStorage.setItem(e,"1")}catch{}},eQ=(e,t)=>{if(!e)return null;try{let n,l,i=new URL(e.toString(),t.href);return"http:"!==i.protocol&&"https:"!==i.protocol||(n=i.hostname,l=t.hostname,n===l||"finuslugi.ru"===n||n.endsWith(".finuslugi.ru"))?null:i}catch{return null}},eK={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},eX={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},eZ=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M3 9.998a9 9 0 0118 0c0 2.08-.89 4.273-2.029 6.249-1.148 1.991-2.6 3.844-3.826 5.262a4.123 4.123 0 01-6.29 0c-1.227-1.418-2.678-3.271-3.826-5.262C3.889 14.27 3 12.077 3 9.998zm9-7.5a7.5 7.5 0 00-7.5 7.5c0 1.688.737 3.607 1.828 5.5 1.083 1.877 2.468 3.65 3.661 5.029 1.084 1.251 2.938 1.251 4.022 0 1.193-1.379 2.578-3.152 3.66-5.03 1.092-1.893 1.829-3.81 1.829-5.499a7.5 7.5 0 00-7.5-7.5zm-4 7.5a4 4 0 118 0 4 4 0 01-8 0zm4-2.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function e0({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...eK,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(eZ,{viewBox:"0 0 24 24",style:eX}))}e0.displayName="IconFdsLocationO";let e1={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},e2={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"};function e7(e){return{width:`${e}px`,height:`${e}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}}let e4=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("defs",null,i.createElement("clipPath",{id:"fds-close-circle-o_svg__a"},i.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h24v24H0z"}))),i.createElement("g",{clipPath:"url(#fds-close-circle-o_svg__a)"},i.createElement("path",{d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12zm1.5 0a8.5 8.5 0 1117 0 8.5 8.5 0 01-17 0zm12.28-2.72L13.06 12l2.72 2.72a.743.743 0 010 1.06.742.742 0 01-1.06 0L12 13.06l-2.72 2.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 8.22 9.28a.743.743 0 010-1.06.743.743 0 011.06 0L12 10.94l2.72-2.72a.743.743 0 011.06 0 .743.743 0 010 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"})));function e3({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...e1,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&e7(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(e4,{viewBox:"0 0 24 24",style:e2}))}e3.displayName="IconFdsCloseCircleO";let e5=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10a9.971 9.971 0 007.071-2.929A9.97 9.97 0 0022 12c0-5.523-4.477-10-10-10zM3.5 12a8.5 8.5 0 1117 0 8.5 8.5 0 01-17 0zm8.872-4.977C13.657 7.18 15 8.15 15 9.761c0 .698-.179 1.238-.504 1.665-.307.401-.704.644-.98.812-.313.191-.477.293-.595.43-.083.096-.17.246-.17.584a.75.75 0 01-1.5 0c0-.66.193-1.164.531-1.558.28-.326.64-.544.89-.695l.062-.037c.287-.175.452-.29.568-.442.096-.126.198-.335.198-.759 0-.633-.532-1.158-1.309-1.252-.716-.087-1.454.236-1.717 1.2a.75.75 0 01-1.447-.394c.486-1.78 1.998-2.454 3.345-2.292zM11.999 15a1 1 0 10.002 2 1 1 0 00-.002-2z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function e6({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...e1,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&e7(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(e5,{viewBox:"0 0 24 24",style:e2}))}e6.displayName="IconFdsQuestionCircleO";let e8=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M10.5 2a8.5 8.5 0 105.456 15.018l4.763 4.762a.75.75 0 001.06-1.06l-4.762-4.763A8.5 8.5 0 0010.5 2zm-7 8.5a7 7 0 1114 0 7 7 0 01-14 0z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function e9({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...e1,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&e7(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(e8,{viewBox:"0 0 24 24",style:e2}))}e9.displayName="IconFdsSearchO";let te=O(),tt=I(te),tn={regions:te,towns:tt,region:null,town:null,startPopupVisible:!1,setStartPopupVisible:()=>null,popupVisible:!1,handleToggleModal:()=>null,selectCity:()=>null,handleButtonClick:()=>null,startRegion:null,startTown:null},tl=(0,i.createContext)(tn);function ti(){return(0,i.useContext)(tl)}let to=({children:e,initialRegion:t,initialTown:n,showStartGeoPopup:o=!0,lastRegionsUpdateUnixTimestamp:s,dadataUrl:r="https://finuslugi.ru/backend/money/dadata",showcaseUrl:a="",useNewCitiesApi:d=!1})=>{let u=$(d),p=Number(E(u.lastRegionsUpdateUnixTimestamp)||0),h=Number(s||0)>p,[m,f]=(0,i.useState)(O(d)),g=(0,i.useRef)(m),[{startRegion:w,startTown:v},x]=(0,i.useState)({startRegion:tn.startRegion,startTown:tn.startTown}),b=t??tn.region,y=n??tn.town,[{region:_,town:C},j]=(0,i.useState)({region:b,town:y}),[N,A]=(0,i.useState)(tn.startPopupVisible),[R,T]=(0,i.useState)(tn.popupVisible),B=(0,i.useRef)(""),M=(0,i.useRef)(!1),U=(0,i.useMemo)(()=>I(m),[m]);(0,i.useEffect)(()=>{g.current=m},[m]);let W=(0,i.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)||""),A(!0),x({startRegion:e,startTown:t})},[A,x]),V=(0,i.useCallback)((e,t)=>{window.sessionStorage.getItem("start_popup_opened")||W(e,t)},[W]),q=(0,i.useCallback)(()=>{if(B.current&&!_&&!C){let e=U.find(e=>e.name===B.current)??null;return V(m.find(t=>t.id===(null==e?void 0:e.parentId))??null,e)}V(_,C)},[_,C,U,m,V]),G=(0,i.useCallback)(e=>{T(e)},[T]),Y=(0,i.useCallback)((e,t)=>{if(!e&&!t){window.localStorage.setItem(u.allRussiaSelected,"1"),window.localStorage.setItem(u.userRegion,""),window.localStorage.setItem(u.userTown,""),k(null,null,d);return}window.localStorage.setItem(u.allRussiaSelected,"0"),window.localStorage.setItem(u.userRegion,JSON.stringify(e)||""),window.localStorage.setItem(u.userTown,JSON.stringify(t)||""),k(e||null,t||null,d)},[u,d]),J=(0,i.useCallback)(e=>{e?H(c.D.icon,"location"):H(c.D.button,(null==C?void 0:C.name)||"Вся Россия"),!o||window.sessionStorage.getItem("start_popup_opened")?G(!0):q()},[o,C,G,q]),Q=(0,i.useCallback)((e,t)=>{Y(e,t),j({region:e||null,town:t||null}),A(!1),G(!1);let n=new CustomEvent("onRegionChange",{detail:{region:e,town:t}});document.dispatchEvent(n)},[G,Y]),K=()=>{let e=S(u.userRegion)??E(u.userRegion),t=S(u.userTown)??E(u.userTown),n=P(g.current,e,t),l=d&&(!!e||!!t)&&!(null!=e&&e.newId)&&!(null!=e&&e.fiasId)&&!(null!=t&&t.newId)&&!(null!=t&&t.fiasId);l&&(M.current=!0),l&&L(n.region,n.town)&&(Y(n.region,n.town),M.current=!1),j(n);let i=async({coords:{latitude:e,longitude:t}})=>{let n=`${r}?lat=${e}&lon=${t}`,l=await D(n);null!=l&&l.location&&(B.current=l.location.data.city)};if(!window.localStorage.getItem("dadata")&&navigator.geolocation&&o)try{navigator.geolocation.getCurrentPosition(i,()=>null)}catch{}};return(0,i.useEffect)(()=>{(!((e,t=!1)=>!(e.length<1)&&(!t||z(e)))(m,d)||h)&&F({showcaseUrl:a,useNewCitiesApi:d}).then(e=>{e.length<1||f(e)})},[]),(0,i.useEffect)(()=>{if(!d)return;let e=P(m,_,C);M.current&&L(e.region,e.town)&&(Y(e.region,e.town),M.current=!1),j(e)},[m,_,Y,C,d]),(0,i.useEffect)(()=>{if(window.innerWidth<1024){let e=()=>{K(),window.removeEventListener("scroll",e)};window.addEventListener("scroll",e)}else setTimeout(()=>{K()},0)},[]),(0,l.jsx)(tl.Provider,{value:{regions:m,towns:U,region:_,town:C,startPopupVisible:N,setStartPopupVisible:A,popupVisible:R,handleToggleModal:G,selectCity:Q,handleButtonClick:J,startRegion:w,startTown:v},children:e})},ts=(0,m.g)("city-select-modal-body","sc"),tr=Object.freeze({wrapper:`${ts}__wrapper`,subtitle:`${ts}__subtitle`,hintWrapper:`${ts}__hint-wrapper`,hintText:`${ts}__hint-text`,input:`${ts}__input`,chips:`${ts}__chips`,townsListWrapper:`${ts}__towns-list-wrapper`,townsList:`${ts}__towns-list`,townsGroup:`${ts}__towns-group`,townsGroupLabel:`${ts}__towns-group-label`,townsGroupList:`${ts}__towns-group-list`,townsName:`${ts}__towns-name`,regionName:`${ts}__region-name`}),ta=({groupedTowns:e,chips:t,query:n,setQuery:o,isDrawer:s})=>{var r;let a=ti(),d=(0,i.useRef)(null),[u,p]=(0,i.useState)("10000px");(0,i.useEffect)(()=>{if(!s||!d.current)return;let e=e=>e.reduce((e,t)=>e+t,0),t=(n,l)=>{let i=n.map(e=>[...e]),o=i.map(e),s=o.reduce((e,t,n)=>t<o[e]?n:e,0);0===s&&i[0].push(i[1].shift()),2===s&&i[2].unshift(i[1].pop()),1===s&&o[0]>o[2]&&i[1].unshift(i[0].pop()),1===s&&o[0]<o[2]&&i[1].push(i[2].shift());let r=Math.max(...i.map(e));return r>=l?l:t(i,r)};new ResizeObserver(()=>{var e;if(!(null!=(e=d.current)&&e.children))return;let n=Array.from(d.current.children,e=>e.offsetHeight+32);if(0===n.length)return;let l=0;try{l=t([[],n,[]],1/0)}catch{l=0}l>0&&p(`${l}px`)}).observe(d.current)},[]);let h=e=>{if(H(c.D.button,(null==e?void 0:e.name)||"Вся Россия"),!(null!=e&&e.id))return a.selectCity();let t=a.regions.find(t=>t.id===Number(e.parentId))||null;a.selectCity(t,e)};return(0,l.jsxs)("div",{className:tr.wrapper,children:[(0,l.jsxs)("div",{className:tr.subtitle,children:["Покажем предложения рядом с вами",(0,l.jsxs)("div",{className:tr.hintWrapper,children:[(0,l.jsx)(e6,{size:24}),(0,l.jsx)("div",{className:tr.hintText,children:"Укажите свой город, чтобы увидеть предложения, доступные в вашем регионе"})]})]}),(0,l.jsx)(y.O,{className:tr.input,value:n,onChange:o,size:"s",placeholder:"Введите название города",icon:n?(0,l.jsx)(e3,{size:24,onClick:()=>o("")}):(0,l.jsx)(e9,{size:24})}),(0,l.jsx)(b.C,{className:tr.chips,chips:t,value:(null==(r=a.town)?void 0:r.id)||0,onChipClick:e=>{h(a.towns.find(t=>t.id===e))}}),(0,l.jsx)("div",{className:tr.townsListWrapper,children:(0,l.jsx)("div",{ref:d,className:tr.townsList,style:{maxHeight:u},children:e.map(e=>(0,l.jsxs)("div",{className:tr.townsGroup,children:[(0,l.jsx)("div",{className:tr.townsGroupLabel,children:e.letter}),(0,l.jsx)("div",{className:tr.townsGroupList,children:e.towns.map(e=>(0,l.jsxs)("button",{type:"button",onClick:()=>h(e),children:[(0,l.jsx)("div",{className:tr.townsName,children:e.name}),(0,l.jsx)("div",{className:tr.regionName,children:e.parentName})]},e.id))})]},e.letter))})})]})},tc=[1095,1096,134,720,189,180],td=()=>{var e;let t=ti(),n=(0,d.qF)("l"),[o,s]=(0,i.useState)(""),r=`Ваш выбор: ${(null==(e=t.town)?void 0:e.name)||"Вся Россия"}`,a=(0,i.useMemo)(()=>t.towns.filter(e=>-1!==String(e.name).toLocaleLowerCase().indexOf(o.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},[]),[o,t.towns.length]),p=(0,i.useMemo)(()=>[{id:0,label:"Вся Россия"},...tc.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=()=>{H(c.D.button,"close"),t.handleToggleModal(!1)};return(0,l.jsxs)(u.P,{children:[!n&&(0,l.jsx)(u.U,{title:r,isOpen:t.popupVisible,onClose:h,full:!0,children:(0,l.jsx)(ta,{groupedTowns:a,chips:p,query:o,setQuery:s})}),n&&(0,l.jsx)(u.D,{title:r,isOpen:t.popupVisible,onClose:h,width:"856px",rowTitle:!0,titleAlign:"left",children:(0,l.jsx)(ta,{groupedTowns:a,chips:p,query:o,setQuery:s,isDrawer:!0})})]})},tu=({label:e,onClick:t,eventActionText:n,eventLabel:i,...s})=>(0,l.jsx)(o.$,{label:e,onClick:e=>{null==t||t(e),(0,c.h)({eventCategory:h.H,eventActionType:c.D.button,eventActionText:n||"",eventLabel:i||""})},...s}),tp={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},th={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},tm=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function tf({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...tp,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(tm,{viewBox:"0 0 24 24",style:th}))}tf.displayName="IconFdsCloseO";let tg=(0,m.g)("header-popup","sc"),tw=Object.freeze({popup:`${tg}__popup`,popupHeader:`${tg}__popup-header`,popupClose:`${tg}__popup-close`,body:`${tg}__body`}),tv=({isOpen:e,onClose:t,children:n,title:i})=>{let o=(0,d.qF)("l");return(0,l.jsxs)(u.P,{children:[!o&&(0,l.jsx)(u.U,{title:i,isOpen:e,onClose:t,children:n}),o&&e&&(0,l.jsxs)("div",{className:tw.popup,children:[(0,l.jsxs)("div",{className:tw.popupHeader,children:[i,(0,l.jsx)(tu,{className:tw.popupClose,iconLeft:(0,l.jsx)(tf,{}),shape:"icon",appearance:"ghost",size:"xs",onClick:t,eventActionText:"IconFdsCloseO"})]}),(0,l.jsx)("div",{className:tw.body,children:n})]})]})},tx=(0,m.g)("start-choice-popup","sc"),tb=Object.freeze({top:`${tx}__top`,progress:`${tx}__progress`,innerCircle:`${tx}__inner-circle`,title:`${tx}__title`,subtitle:`${tx}__subtitle`,actions:`${tx}__actions`}),ty=()=>{var e,t;let n=ti(),[o,s]=(0,i.useState)(10),[r,a]=(0,i.useState)(0),d=(0,i.useRef)(void 0),u=()=>{H(c.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,i.useEffect)(()=>{let e,t,l,i;n.startPopupVisible?(t=1e3*(e=Number((" "+o).slice(1)))/100,l=0,i=0,d.current=setInterval(()=>{l++,i+=t,a(3.6*l);let n=e-Math.floor(i/1e3);n<o&&s(n),100===l&&(clearInterval(d.current),u())},t)):(clearInterval(d.current),s(10),a(0))},[n.startPopupVisible]),(0,l.jsxs)(tv,{isOpen:n.startPopupVisible,onClose:u,title:(0,l.jsx)("button",{type:"button",className:tb.progress,style:{background:`conic-gradient(#ff0508 ${r}deg, #e3e7ec 0deg)`},onClick:u,children:(0,l.jsx)("div",{className:tb.innerCircle,children:o})}),children:[(0,l.jsxs)("div",{className:tb.top,children:[(0,l.jsxs)("div",{className:tb.title,children:["Ваш город ",(null==(e=n.startTown)?void 0:e.name)||(null==(t=n.startRegion)?void 0:t.name)||"Вся Россия","?"]}),(0,l.jsx)("div",{className:tb.subtitle,children:"Это поможет вам увидеть выгодные предложения в вашем городе"})]}),(0,l.jsxs)("div",{className:tb.actions,children:[(0,l.jsx)(tu,{size:"s",stretch:!0,eventActionText:"Да, все верно",onClick:()=>{H(c.D.button,"Да, все верно"),n.selectCity(n.startRegion,n.startTown)},children:"Да, все верно"}),(0,l.jsx)(tu,{variant:"secondary",size:"s",stretch:!0,eventActionText:"Нет, изменить",onClick:()=>{H(c.D.button,"Нет, изменить"),n.setStartPopupVisible(!1),n.handleToggleModal(!0)},children:"Нет, изменить"})]})]})},t_=(0,m.g)("city-select","sc"),tC=Object.freeze({button:`${t_}__button`,minimal:`${t_}__minimal`,full:`${t_}__full`}),tj=({initialTown:e})=>{var t;let n=ti(),s=(null==(t=n.town)?void 0:t.name)||e||"Вся Россия",{setIsChatModalOpen:a,isChatModalOpen:c}=ey(),{startPopupVisible:d,setStartPopupVisible:u,popupVisible:p}=n,h=(0,i.useRef)();(0,i.useEffect)(()=>{p&&(h.current="popup")},[p]),(0,i.useEffect)(()=>{c&&(h.current="chat")},[c]),(0,i.useEffect)(()=>{d&&(h.current="startPopup")},[d]),(0,i.useEffect)(()=>{h.current&&("chat"===h.current&&d?u(!1):["startPopup","popup"].includes(h.current)&&c&&a(!1))},[p,c,d,u,a]);let m={appearance:"ghost",size:"xs",onClick:()=>n.handleButtonClick(!1),iconLeft:(0,l.jsx)(e0,{size:24})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.$,{...m,className:(0,r.A)(tC.button,tC.full),label:s}),(0,l.jsx)(o.$,{...m,className:(0,r.A)(tC.button,tC.minimal),shape:"icon"}),(0,l.jsx)(td,{}),(0,l.jsx)(ty,{})]})},t$=({onClick:e,eventActionType:t,eventActionText:n,eventLabel:i,...o})=>(0,l.jsx)(U.N,{onClick:l=>{null==e||e(l),(0,c.h)({eventCategory:h.H,eventActionType:t||c.D.link,eventActionText:n||"",eventLabel:i||""})},...o}),tN={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},tk={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},tS=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function tE({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...tN,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(tS,{viewBox:"0 0 24 24",style:tk}))}tE.displayName="IconFdsCloseO";let tO=(0,m.g)("header-mobile-app-banner","sc"),tz=Object.freeze({wrapper:`${tO}__wrapper`,container:`${tO}__container`,closeButton:`${tO}__close-button`,innerWrapper:`${tO}__inner-wrapper`,imageWrapper:`${tO}__image-wrapper`,image:`${tO}__image`,title:`${tO}__title`,description:`${tO}__description`,callToAction:`${tO}__call-to-action`,scanQr:`${tO}__scan-qr`}),tI=Object.freeze({mobile:56,desktop:68}),tA="headerBannerShownAt",tR=({minioUrl:e,className:t,mobileAppUrl:n})=>{let{fixedContainerRef:d,headerRef:u}=ey(),[m,f]=(0,i.useState)(!1),[g,w]=(0,i.useState)(!1),[v,x]=(0,i.useState)(!1),b=(0,i.useCallback)((e="desktop")=>{let t=d.current;t&&(t.style.transform="translateY(0)",document.documentElement.style.setProperty("--fixed-header-height",`${tI[e]+h.F[e]}px`),document.documentElement.style.setProperty("--new-header-height-desktop",`${tI.desktop+h.F.desktop}px`),document.documentElement.style.setProperty("--new-header-height-mobile",`${tI.mobile+h.F.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-mobile",`${tI.mobile+h.F.mobile}px`),document.documentElement.style.setProperty("--static-new-header-height-desktop",`${tI.desktop+h.F.desktop}px`),document.documentElement.style.setProperty("--header-height",`${tI[e]+108}px`))},[]),y=(0,i.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,i.useEffect)(()=>{let e=u.current;if(!e)return;let t=()=>{g&&f(!1),x(!1)};return e.addEventListener("transitionend",t),()=>{e.removeEventListener("transitionend",t)}},[g]),(0,i.useEffect)(()=>{let e;(!(e=(()=>{let e=localStorage.getItem(tA);if(!e)return null;let t=new Date(e);return isNaN(t.getTime())?null:t})())||Math.floor((e.getTime()-new Date().getTime())/864e5)>5)&&f(!0)},[]),(0,i.useEffect)(()=>{let e=window.innerWidth<768;m&&(b(e?"mobile":"desktop"),window.matchMedia("(prefers-reduced-motion: reduce)").matches?f(!0):x(!0));let t=()=>{if(!m)return null;b(window.innerWidth<768?"mobile":"desktop")};return window.addEventListener("resize",t),()=>{y(),window.removeEventListener("resize",t)}},[m,b,y]),m?(0,l.jsx)("div",{id:"headerNotice",role:"region","aria-label":"Мобильное приложение","data-opening":v,className:(0,r.A)(tz.wrapper,t),children:(0,l.jsx)(s.m,{children:(0,l.jsxs)("div",{className:tz.container,children:[(0,l.jsxs)("div",{className:tz.innerWrapper,children:[(0,l.jsxs)("picture",{className:tz.imageWrapper,children:[(0,l.jsx)("source",{srcSet:(0,a.oq)(e,"/widgets/header/qr-mobile-app.svg"),media:"(min-width: 768px)"}),(0,l.jsx)("img",{className:tz.image,src:(0,a.oq)(e,"/logo/finuslugi/default-regular.svg"),loading:"lazy"})]}),(0,l.jsxs)("div",{className:tz.scanQr,children:[(0,l.jsx)("div",{className:tz.title,children:"Скачайте приложение Финуслуги"}),(0,l.jsx)("div",{className:tz.description,children:"Сканируйте QR-код"})]}),(0,l.jsxs)("div",{className:tz.callToAction,children:[(0,l.jsxs)("div",{children:["Приложение",(0,l.jsx)("br",{}),"Финуслуги"]}),(0,l.jsx)(o.$,{onClick:()=>{(0,p.h)(c.D.button,"skachat_mob_prilozheniye_fu"),window.open(n,"_blank","noreferrer")},variant:"white",size:"xs",children:"Скачать"})]})]}),(0,l.jsx)("div",{"aria-label":"Закрыть",role:"button",className:tz.closeButton,onClick:()=>{localStorage.setItem(tA,new Date().toISOString()),y(),window.matchMedia("(prefers-reduced-motion: reduce)").matches?f(!1):w(!0)},children:(0,l.jsx)(tE,{size:"100%"})})]})})}):null},tT={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},tP={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"};function tL(e){return{width:`${e}px`,height:`${e}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"}}let tB=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 12.53a.75.75 0 010-1.06l6.5-6.5a.75.75 0 111.06 1.06L8.81 12l5.97 5.97a.75.75 0 11-1.06 1.06l-6.5-6.5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function tM({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...tT,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&tL(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(tB,{viewBox:"0 0 24 24",style:tP}))}tM.displayName="IconFdsChevronLeftO";let tF=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M11.28 17.03l4.5-4.5a.75.75 0 000-1.06l-4.5-4.5a.75.75 0 10-1.06 1.06L14.19 12l-3.97 3.97a.75.75 0 101.06 1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function tD({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...tT,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&tL(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(tF,{viewBox:"0 0 24 24",style:tP}))}tD.displayName="IconFdsChevronRightSmallO";let tH=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M3 9.998a9 9 0 0118 0c0 2.08-.89 4.273-2.029 6.249-1.148 1.991-2.6 3.844-3.826 5.262a4.123 4.123 0 01-6.29 0c-1.227-1.418-2.678-3.271-3.826-5.262C3.889 14.27 3 12.077 3 9.998zm9-7.5a7.5 7.5 0 00-7.5 7.5c0 1.688.737 3.607 1.828 5.5 1.083 1.877 2.468 3.65 3.661 5.029 1.084 1.251 2.938 1.251 4.022 0 1.193-1.379 2.578-3.152 3.66-5.03 1.092-1.893 1.829-3.81 1.829-5.499a7.5 7.5 0 00-7.5-7.5zm-4 7.5a4 4 0 118 0 4 4 0 01-8 0zm4-2.5a2.5 2.5 0 100 5 2.5 2.5 0 000-5z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function tU({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...tT,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&tL(n),...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(tH,{viewBox:"0 0 24 24",style:tP}))}tU.displayName="IconFdsLocationO";let tW=(0,m.g)("header-chat-modal-body","sc"),tV=Object.freeze({wrapper:`${tW}__wrapper`,cardButton:`${tW}__card-button`,card:`${tW}__card`,cardTitle:`${tW}__card-title`,cardSubtitle:`${tW}__card-subtitle`,button:`${tW}__button`}),tq=()=>{let e=ey();return(0,l.jsxs)("div",{className:tV.wrapper,children:[(0,l.jsx)(tu,{className:tV.cardButton,variant:"secondary",pending:e.isChatLoading,onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},eventActionText:"Напишите в чат",children:(0,l.jsxs)(W.Z,{className:tV.card,variant:"secondary",children:[(0,l.jsxs)("div",{className:tV.cardTitle,children:[(0,l.jsx)("img",{src:"https://finuslugi.ru/icons/chaticons/new/chat_icon_hover.svg",alt:"chat",width:24,height:24,loading:"lazy"}),"Напишите в чат"]}),(0,l.jsxs)("p",{className:tV.cardSubtitle,children:["Виртуальный ассистент доступен\xa024/7, ",(0,l.jsx)("br",{}),"операторы\xa0—\xa0с\xa06:00 до\xa023:59\xa0мск"]})]})}),!1]})},tG={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},tY={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},tJ=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M9 8a.75.75 0 000 1.5h4.44l-5.22 5.22a.75.75 0 101.06 1.06l5.22-5.22v4.445a.75.75 0 101.5 0V8.75a.75.75 0 00-.75-.75H9z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function tQ({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...tG,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(tJ,{viewBox:"0 0 24 24",style:tY}))}tQ.displayName="IconFdsArrowUpRightSmallO";let tK=({data:e,isMobile:t})=>{let n=ey();return(0,l.jsx)("div",{className:V.s.contentWrapper,children:e.map(e=>(0,l.jsx)(i.Fragment,{children:e.sections.map(e=>{var i;return(0,l.jsxs)("div",{className:(0,r.A)(V.s.content,{[V.s.hidden]:n.openedSection!==e.id,[V.s.contentOpen]:!!n.openedSection}),children:[(0,l.jsx)("div",{className:V.s.contentHeader,children:(0,l.jsx)("label",{children:e.title})}),null==(i=e.content)?void 0:i.map((n,i)=>{var o,s;return(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{children:(0,l.jsx)("a",{className:(0,r.A)(V.s.contentTitle,{[V.s.removed]:!n.title,[V.s.contentTitleUrl]:!!n.url,[V.s.contentTitleLink]:!!e.isSeeAllLinkAvailable,[V.s.contentTitleNew]:!!n.new}),href:e.isSeeAllLinkAvailable?n.url:void 0,children:(0,l.jsxs)("span",{children:[e.isSeeAllLinkAvailable&&(0,l.jsx)("div",{className:V.s.arrowIcon,children:(0,l.jsx)(tQ,{})}),n.title]})})}),!(null!=(o=n.links)&&o.length)&&(0,l.jsx)(V.N,{items:n.chips||[],maxNumberOfLines:e.content.length<=1?99:t?3:2}),!!(null!=(s=n.links)&&s.length)&&(0,l.jsx)("div",{className:(0,r.A)(V.s.links,{[V.s.linksColumns]:!!n.columns,[V.s.linksTitleless]:!n.title}),children:n.links.map(e=>(0,l.jsxs)("a",{href:e.url,onClick:()=>(0,p.h)(c.D.link,e.title,`${e.title}_${e.url}`),children:[(0,l.jsx)("div",{className:V.s.arrowIcon,children:(0,l.jsx)(tQ,{})}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{children:e.title}),!!e.new&&(0,l.jsx)("span",{className:(0,r.A)({[V.s.newInline]:!!e.new})})]})]},e.url))})]},`${n.url}_${i}`)})]},e.id)})},e.id))})},tX=(0,m.g)("navigation-section-icon","sc"),tZ=Object.freeze({icon:`${tX}`}),t0=()=>n.e(284).then(n.bind(n,284)),t1={IconFdsAcademicCapO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsAcademicCapO),IconFdsBankO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsBankO),IconFdsBookOpenO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsBookOpenO),IconFdsCalculatorO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsCalculatorO),IconFdsCardO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsCardO),IconFdsChatDotsCircleO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsChatDotsCircleO),IconFdsCoinMultipleO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsCoinMultipleO),IconFdsDotsHorizontalO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsDotsHorizontalO),IconFdsFlashO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsFlashO),IconFdsGraphO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsGraphO),IconFdsLayoutHorizontalO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsLayoutHorizontalO),IconFdsPortfolioO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsPortfolioO),IconFdsRubleCircleO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsRubleCircleO),IconFdsSafeO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsSafeO),IconFdsShieldCheckO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsShieldCheckO),IconFdsWalletO:()=>t0().then(({navigationSectionIcons:e})=>e.IconFdsWalletO)},t2=e=>Object.prototype.hasOwnProperty.call(t1,e),t7=({name:e,background:t})=>{let[n,o]=(0,i.useState)(null);if((0,i.useEffect)(()=>{if(!e||!t2(e))return void o(null);let t=!0;return t1[e]().then(n=>{t&&o({name:e,component:n})}).catch(()=>{t&&o(null)}),()=>{t=!1}},[e]),!e||!t2(e))return null;let s=(null==n?void 0:n.name)===e?n.component:null;return(0,l.jsx)("div",{className:tZ.icon,style:{background:t},children:s&&(0,l.jsx)(s,{})})},t4=(0,m.g)("navigation","sc"),t3=Object.freeze({navigation:`${t4}`,navigationOpening:`${t4}--opening`,navigationClosing:`${t4}--closing`,wrapper:`${t4}__wrapper`,container:`${t4}__container`,containerOpen:`${t4}__container--open`,sections:`${t4}__sections`,sectionsOpen:`${t4}__sections--open`,citySelectButton:`${t4}__city-select-button`,sectionsTitle:`${t4}__sections-title`,sectionsWrapper:`${t4}__sections-wrapper`,section:`${t4}__section`,sectionArrow:`${t4}__section-arrow`,sectionExtra:`${t4}__section--extra`,sectionActive:`${t4}__section--active`,sectionTitle:`${t4}__section-title`,chatWrapper:`${t4}__chat-wrapper`,chatHeader:`${t4}__chat-header`,backButton:`${t4}__back-button`,useful:`${t4}__useful`,usefulOpen:`${t4}__useful--open`,usefulTitle:`${t4}__useful-title`,usefulGrid:`${t4}__useful-grid`,removed:`${t4}__removed`}),t5=({data:e})=>{var t;let n=ey(),a=ti(),u=(0,d.nu)("m"),[m,f]=(0,i.useState)(!0);(0,i.useEffect)(()=>{f(u)},[u]);let g=(0,i.useRef)(null),w=(0,i.useCallback)(()=>{g.current&&clearTimeout(g.current),g.current=setTimeout(()=>n.openedSection?n.setOpenedSection(null):n.isNavigationOpen?n.setOpenedBlock(null):void 0,50)},[n]),v=(0,i.useRef)(!1),x=(0,i.useRef)(null),b=(0,i.useCallback)(()=>{m&&(v.current=!0,x.current=window.onpopstate||null,window.onpopstate=function(){window.history.forward(),w()},window.history.pushState(null,"",window.location.href))},[w,m]),y=(0,i.useCallback)(()=>{v.current=!1,window.onpopstate=x.current,window.history.go(-1)},[]),_=(0,i.useRef)(null),C=(0,i.useCallback)(e=>{if(m||!n.navMenuItemsRef.current||!n.navigationRef.current)return;let t=e.target,l=!n.navMenuItemsRef.current.contains(t)&&!n.navigationRef.current.contains(t);if(l&&!_.current){n.setIgnoreClicks(),_.current=setTimeout(()=>n.setOpenedBlock(null),300);return}!l&&_.current&&(clearTimeout(_.current),_.current=null)},[m,n]),j=(0,i.useRef)(null),$=(0,i.useCallback)(e=>{typeof window>"u"||(e?(j.current=C,window.addEventListener("mousemove",j.current)):j.current&&window.removeEventListener("mousemove",j.current))},[C]);(0,i.useEffect)(()=>{$(n.isNavigationOpen),n.isNavigationOpen&&!v.current&&b(),!n.isNavigationOpen&&v.current&&y()},[n.isNavigationOpen]);let N=(e,t)=>()=>{(0,p.h)(c.D.button,t),n.setOpenedSection(e)},{start:k,clear:S}=er(),E=()=>{m||S()};return(0,l.jsx)("div",{ref:n.navigationRef,className:(0,r.A)(t3.navigation,{[t3.removed]:!n.isNavigationMounted,[t3.navigationOpening]:n.isNavigationOpen,[t3.navigationClosing]:!n.isNavigationOpen}),children:(0,l.jsx)("div",{className:t3.wrapper,children:(0,l.jsxs)(s.m,{className:(0,r.A)(t3.container,{[t3.containerOpen]:!!n.openedSection}),children:[(0,l.jsxs)("div",{className:(0,r.A)(t3.sections,{[t3.sectionsOpen]:!!n.openedSection}),children:[(0,l.jsx)(o.$,{className:t3.citySelectButton,variant:"violet",appearance:"ghost",size:"xs",onClick:()=>a.handleButtonClick(!1),iconLeft:(0,l.jsx)(tU,{size:24}),label:(null==(t=a.town)?void 0:t.name)||"Вся Россия"}),e.map(e=>(0,l.jsxs)("ul",{className:(0,r.A)(t3.sectionsWrapper,{[t3.removed]:n.openedBlock!==e.id&&!m}),children:[(0,l.jsx)("div",{className:t3.sectionsTitle,children:h.a[e.id]}),e.sections.map(e=>{let t,i;return(0,l.jsxs)("li",{className:(0,r.A)(t3.section,{[t3.sectionExtra]:!!e.extra,[t3.sectionActive]:n.openedSection===e.id}),onClick:N(e.id,e.title),onMouseEnter:(t=e.id,i=e.title,()=>{m||k(N(t,i),150)}),onMouseLeave:E,children:[n.isNavigationMounted&&(0,l.jsx)(t7,{name:e.uikitIcon,background:e.uikitIconBg}),(0,l.jsx)("span",{className:t3.sectionTitle,children:e.title}),(0,l.jsx)("div",{className:t3.sectionArrow,children:(0,l.jsx)(tD,{size:24})})]},e.id)})]},e.id)),(0,l.jsxs)("div",{className:t3.chatWrapper,children:[(0,l.jsx)("div",{className:t3.chatHeader,children:"Нужна помощь?"}),(0,l.jsx)(tq,{})]})]}),(0,l.jsxs)("button",{type:"button",className:(0,r.A)(t3.backButton,{[t3.removed]:!n.openedSection}),onClick:()=>{(0,p.h)(c.D.button,"Назад"),n.setOpenedSection(null)},children:[(0,l.jsx)(tM,{size:24}),(0,l.jsx)("span",{children:"Назад"})]}),(0,l.jsx)(tK,{data:e,isMobile:m}),(0,l.jsxs)("div",{className:(0,r.A)(t3.useful,{[t3.usefulOpen]:!!n.openedSection}),children:[(0,l.jsx)("div",{className:t3.usefulTitle,children:"Полезное на Финуслугах"}),e.map(e=>(0,l.jsx)(i.Fragment,{children:e.sections.map(e=>{var t;return(0,l.jsx)("div",{className:(0,r.A)(t3.usefulGrid,{[t3.removed]:n.openedSection!==e.id}),children:null==(t=e.useful)?void 0:t.map((e,t)=>(0,l.jsxs)("a",{href:e.url,onClick:()=>(0,p.h)(c.D.link,e.title,`${e.title}_${e.url}`),children:[(0,l.jsx)("div",{children:(0,l.jsx)("img",{src:e.icon,srcSet:e.icon2?`${e.icon}, ${e.icon2} 2x`:void 0,alt:e.title,loading:"lazy"})}),(0,l.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}})]},`${e.title}_${t}`))},e.id)})},e.id))]})]})})})},t6=({data:e,showcaseUrl:t="https://finuslugi.ru",minioUrl:n="https://assets.finuslugi.ru/mp-assets",lkUrl:d="https://lk.finuslugi.ru/registration",initialTown:u,isMainBannerPage:m,enableAppHeaderBanner:f=!1,enableCertificatesBanner:g=!1,enableExternalLinkWarning:w=!1,news:v,className:x})=>{let b=ey(),y=(0,i.useMemo)(()=>((e,t,n)=>{var l,i,o,s,r,c,d;let u=(null==(i=null==(l=null==e?void 0:e.NAVIGATOR)?void 0:l.findIndex)?void 0:i.call(l,({id:e})=>"news"===e))||-1,p=(null==(s=null==(o=null==e?void 0:e.NAVIGATOR)?void 0:o[u])?void 0:s.content)||[];if(null!=(d=null==(c=null==(r=null==e?void 0:e.NAVIGATOR)?void 0:r[u])?void 0:c.content)&&d[0]&&Array.isArray(n)&&p.length){let l=n.map(({title:e,url:n})=>({title:e,url:(0,a.oq)(t||"",n),new:0}));e.NAVIGATOR[u].content[0].links=l}return[{id:"FINPRODUCTS",sections:Array.isArray(null==e?void 0:e.FINPRODUCTS)?null==e?void 0:e.FINPRODUCTS:[]},{id:"NAVIGATOR",sections:Array.isArray(null==e?void 0:e.NAVIGATOR)?null==e?void 0:e.NAVIGATOR:[]},{id:"ABOUT",sections:Array.isArray(null==e?void 0:e.ABOUT)?null==e?void 0:e.ABOUT:[]}]})(e,t,v),[e,t,v]),_=null==e?void 0:e.config,C=!!e&&g&&!!m,j=(({enableCertificatesBanner:e,enableExternalLinkWarning:t,isMainBannerPage:n})=>{let[l,o]=(0,i.useState)("checking"),[s,r]=(0,i.useState)(!1),[a,c]=(0,i.useState)(!1),[d,u]=(0,i.useState)(!1),[p,h]=(0,i.useState)(!1),m=(0,i.useRef)(),f=(0,i.useRef)(!1),g=(0,i.useRef)(!1),w=(0,i.useRef)(!1);(0,i.useRef)(null);let v=(0,i.useRef)(null),x=(0,i.useRef)(null),b=(0,i.useRef)(null),y=e&&n,_=y||t,C=(0,i.useCallback)(e=>{let t=m.current;t?t.call(window,e,"_blank","noopener,noreferrer"):window.open(e,"_blank","noopener,noreferrer")},[]),j=(0,i.useCallback)(()=>{r(!1),w.current=!1,v.current=null,x.current=null,b.current=null,h(!1)},[]),$=(0,i.useCallback)(e=>{eJ(eE),g.current=!0,w.current=!1,v.current=e,h("external"===e&&null!==x.current),r(!0)},[]),N=(0,i.useCallback)(()=>!f.current&&("external"===v.current&&!w.current||!g.current),[]),k=(0,i.useCallback)(()=>{"external"!==v.current&&$("external")},[$]);(0,i.useEffect)(()=>{m.current=window.open;let e=window.navigator.userAgent.includes("YaBrowser/");return e&&eJ(ek),f.current=e||eY(ek),g.current=eY(eE),u(f.current),c(!0),()=>{x.current=null,b.current=null}},[]),(0,i.useEffect)(()=>{if(a){if(!y)return void o("skipped");o(e=>"shown"===e||"closing"===e||"dismissed"===e?e:d||eY(eS)?"skipped":"shown")}},[d,y,a]),(0,i.useEffect)(()=>{},[j,_,a]),(0,i.useEffect)(()=>{if(!a||!t)return;let e=m.current;if(!e)return;let n=!0,l=e=>{if(0!==e.button&&1!==e.button||!(e.target instanceof Element))return;let t=e.target.closest("a[href]");if(!t||e.defaultPrevented)return;let l=eQ(t.href,window.location);if(!l||!N())return;e.preventDefault(),null===x.current&&(x.current=l.href,b.current={source:"external_anchor",host:l.hostname});let i=x.current;queueMicrotask(()=>{n&&N()&&x.current===i&&k()})},i=(t,n="_blank",l)=>{let i=eQ(t,window.location);return i&&N()?(null===x.current&&(x.current=i.href,b.current={source:"external_window_open",host:i.hostname}),k(),null):e.call(window,t,n,l)};return window.open=i,document.addEventListener("click",l,!0),document.addEventListener("auxclick",l,!0),()=>{n=!1,document.removeEventListener("click",l,!0),document.removeEventListener("auxclick",l,!0),window.open===i&&(window.open=e)}},[t,a,N,k]),(0,i.useEffect)(()=>{var e;t||(x.current=null,(null==(e=b.current)?void 0:e.source)!=="banner"&&(b.current=null),h(!1),"external"===v.current&&j())},[j,t]),(0,i.useEffect)(()=>{y||"banner"===v.current&&j()},[j,y]),(0,i.useEffect)(()=>{_||j()},[j,_]);let S=(0,i.useCallback)(()=>{eJ(eS),o("closing")},[]),E=(0,i.useCallback)(()=>{o("dismissed")},[]),O=(0,i.useCallback)(()=>{x.current=null,b.current={source:"banner"},$("banner")},[$]),z=(0,i.useCallback)(()=>{C("https://www.gosuslugi.ru/crt")},[C]),I=(0,i.useCallback)(()=>{C("https://browser.yandex.ru/")},[C]),A=(0,i.useCallback)(()=>{let e=x.current;e&&(eJ(eE),g.current=!0,w.current=!0,C(e))},[C]);return{bannerStatus:l,isPopupOpen:s,popupAnalyticsContext:b.current,dismissBanner:S,finishBannerClosing:E,openPopupFromBanner:O,closePopup:j,openCertificatesPage:z,openYandexBrowserPage:I,continueToExternalPage:p?A:void 0}})({enableCertificatesBanner:C,enableExternalLinkWarning:w,isMainBannerPage:!!m}),$="shown"===j.bannerStatus||"closing"===j.bannerStatus,N=!C||"skipped"===j.bannerStatus,k=(0,i.useMemo)(()=>y.reduce((e,t)=>{var n;return e[t.id]=null==(n=t.sections[0])?void 0:n.id,e},{}),[y]),S=b.isAuth?"Личный кабинет":"Войти",E=m&&b.isHeaderTransparent,O=(e,t,n,l)=>()=>{e!==b.openedBlock?(0,p.h)(c.D.toggle,t,"on"):(0,p.h)(c.D.button,"menu_close","on");let i=n?k[e]:"";b.setOpenedBlock(e,i,!!l)},{start:z,clear:I}=er(),A=e=>()=>{b.ignoreClicks||e()},R=(0,l.jsx)(eq,{isOpen:j.isPopupOpen,analyticsContext:j.popupAnalyticsContext,onClose:j.closePopup,onOpenCertificatesPage:j.openCertificatesPage,onOpenYandexBrowserPage:j.openYandexBrowserPage,onContinue:j.continueToExternalPage});return e?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{ref:b.headerRef,className:(0,r.A)(h.s.header,x,{[h.s.transparent]:E}),children:(0,l.jsxs)("div",{ref:b.fixedContainerRef,className:(0,r.A)(h.s.fixed,{[h.s.hidden]:b.isHeaderHidden,[h.s.navigationOpen]:b.isNavigationOpen}),children:[$&&(0,l.jsx)(eA,{onDismiss:j.dismissBanner,onClosed:j.finishBannerClosing,onOpenDetails:j.openPopupFromBanner,onOpenCertificatesPage:j.openCertificatesPage,onOpenYandexBrowserPage:j.openYandexBrowserPage}),N&&!!(null!=_&&_.appBannerUrl)&&f&&(0,l.jsx)(tR,{mobileAppUrl:_.appBannerUrl,minioUrl:n}),(0,l.jsxs)(s.m,{className:h.s.container,children:[(0,l.jsxs)("div",{className:h.s.leftRow,children:[(0,l.jsx)(t$,{className:h.s.logo,href:t,eventActionType:c.D.icon,eventActionText:"finuslugi_logo",eventLabel:`finuslugi_logo_${t}`,children:(0,l.jsxs)("picture",{children:[(0,l.jsx)("source",{srcSet:(0,a.oq)(n,"/widgets/header/logo/d.webp"),media:"(min-width: 768px)"}),(0,l.jsx)("img",{src:(0,a.oq)(n,"/widgets/header/logo/m.webp"),alt:"Финуслуги",loading:"eager"})]})}),(0,l.jsx)("nav",{ref:b.navMenuItemsRef,className:h.s.menuItems,children:(0,l.jsx)("ul",{children:h.b.map(({id:e,label:t})=>(0,l.jsx)("li",{children:(0,l.jsx)(o.$,{className:(0,r.A)({[h.s.menuItemActive]:b.openedBlock===e&&b.isNavigationOpen}),label:t,variant:"white",size:"xs",onClick:A(O(e,t,!0)),onMouseEnter:()=>{b.isNavigationOpen&&e===b.openedBlock||b.setIgnoreClicks(),z(O(e,t,!0,!0),200)},onMouseLeave:I})},e))})}),(0,l.jsx)(tu,{className:(0,r.A)(h.s.tabletMenuButton,{[h.s.menuItemActive]:b.isNavigationOpen}),eventActionText:"Меню сайта",variant:"white",size:"xs",iconRight:(0,l.jsx)(ee,{size:24}),onClick:O("FINPRODUCTS","Меню сайта"),children:"Меню сайта"})]}),(0,l.jsxs)("div",{className:(0,r.A)(h.s.buttonGroup,{[h.s.whiteIcons]:(null==_?void 0:_.iconColorOnMobileMainBanner)==="white"}),children:[(0,l.jsxs)("div",{className:h.s.chips,children:[(0,l.jsx)(tu,{as:"a",href:d,size:"xs",shape:"icon",appearance:"ghost",eventActionText:"profile",eventLabel:`profile_${d}`,iconLeft:(0,l.jsx)(es,{size:20})}),(0,l.jsx)(tu,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",shape:"icon",appearance:"ghost",eventActionText:"IconFdsChatDotsCircleO",iconLeft:(0,l.jsx)(Q,{size:24})})]}),(0,l.jsx)(tu,{className:h.s.menuButton,size:"xs",shape:E?"icon":"default",appearance:E?"ghost":"fill",label:"Меню",onClick:O("FINPRODUCTS","Меню"),eventActionText:"Меню",iconLeft:(0,l.jsx)(ei,{size:24})}),(0,l.jsxs)("div",{className:h.s.moreButtons,children:[(0,l.jsx)(tj,{initialTown:u}),(0,l.jsx)(tu,{onClick:()=>{var e,t,n;return null==(n=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)?void 0:n.call(t)},size:"xs",appearance:"ghost",eventActionText:"IconFdsChatDotsSquareAddO",iconLeft:(0,l.jsx)(X,{size:24}),children:"Онлайн чат"}),(0,l.jsx)(tu,{as:"a",href:d,size:"xs",eventActionText:S,eventLabel:`${S}_${d}`,label:S})]})]}),(0,l.jsxs)(t$,{className:h.s.auth,href:d,eventActionText:S,eventLabel:`${S}_${d}`,children:[(0,l.jsx)(tu,{size:"xs",shape:"circle-icon",iconLeft:(0,l.jsx)(es,{}),eventActionText:S,eventLabel:`${S}_${d}`}),(0,l.jsx)("p",{children:S})]}),(0,l.jsx)("div",{className:h.s.close,children:(0,l.jsx)(tu,{className:h.s.close,size:"xs",variant:"secondary",shape:"circle-icon",iconLeft:(0,l.jsx)(en,{}),onClick:()=>b.setOpenedBlock(null),eventActionText:"IconFdsCloseO"})})]})]})}),(0,l.jsx)("div",{className:(0,r.A)(h.s.overlay,{[h.s.removed]:!b.isNavigationMounted,[h.s.overlayOpening]:b.isNavigationOpen,[h.s.overlayClosing]:!b.isNavigationOpen}),onClick:A(()=>b.setOpenedBlock(null))}),(0,l.jsx)(t5,{data:y,minioUrl:n}),R]}):w?R:null},t8=e=>(0,l.jsx)(e_,{isMainBannerPage:e.isMainBannerPage,children:(0,l.jsx)(t6,{...e})})},37206:(e,t,n)=>{"use strict";n.d(t,{default:()=>i.a});var l=n(75707),i=n.n(l)},39041:()=>{},41112:(e,t,n)=>{"use strict";function l({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}}),n(1980)},49735:()=>{},51768:(e,t,n)=>{"use strict";n.d(t,{D:()=>z,P:()=>U,U:()=>H,u:()=>w});var l=n(95155),i=n(12115),o=n(29722),s=n(7596),r=n(47650);let a=300,c=({opened:e})=>{let[t,n]=(0,i.useState)(!1),l=(0,i.useRef)(null),o=(0,i.useRef)(!1);return(0,i.useEffect)(()=>(e&&!o.current?(o.current=!0,n(!0)):!e&&o.current&&(l.current=setTimeout(()=>{o.current=!1,n(!1)},a)),()=>{l.current&&clearTimeout(l.current)}),[e]),{mounted:t}},d=(0,s.g)("click-outside","sc"),u=Object.freeze({overlay:`${d}__overlay`,open:`${d}--open`,close:`${d}--close`}),p=({onClose:e,onToucheMove:t,isOpen:n,delay:s=a})=>{let r=(0,i.useRef)(null),c=(0,i.useCallback)(()=>{e&&(r.current=setTimeout(()=>{e()},s))},[s,e]),d=(0,i.useCallback)(e=>{"Escape"===e.key&&c()},[c]);return(0,i.useEffect)(()=>(n&&window.addEventListener("keydown",d),()=>{r.current&&clearTimeout(r.current),window.removeEventListener("keydown",d)}),[n,d]),(0,l.jsx)("div",{className:(0,o.A)(u.overlay,{[u.open]:n,[u.close]:!n}),onTouchStart:t,onClick:c})},h=(e,t)=>{e&&(t?e.setAttribute("data-portal",""):e.removeAttribute("data-portal"))},m=(e,t)=>{t.style.removeProperty("overflow-y"),e.classList.toggle("scroll-disable-windows",!1),e.style.removeProperty("overflow"),e.style.removeProperty("height"),e.style.removeProperty("width"),e.style.removeProperty("top")},f=()=>{void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)},g=()=>document.querySelectorAll("[data-portal]").length>1,w=e=>{let t=(0,i.useRef)(null),n=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{if(n.current===e)return;n.current=e;let l=t.current,i=document.body,o=document.documentElement,s=window.innerWidth-o.clientWidth;if(e&&s>0)i.style.top||(window.prevScrollPosition=window.scrollY),o.style.setProperty("overflow-y","scroll"),i.classList.toggle("scroll-disable-windows",!0),i.style.setProperty("width",`calc(100vw - ${s}px)`),i.style.setProperty("top",`-${window.prevScrollPosition}px`),h(l,!0);else if(e)i.style.setProperty("overflow","hidden"),i.style.setProperty("height","100vh"),h(l,!0);else{let e=!g();e&&m(i,o),e&&f(),h(l,!1)}return()=>{let e=!g();e&&m(i,o),e&&f()}},[e]),t},v={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},x={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},b=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function y({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...v,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(b,{viewBox:"0 0 24 24",style:x}))}y.displayName="IconFdsCloseO";let _=(0,s.g)("drawer-footer","sc"),C=Object.freeze({footer:`${_}__footer`,hasScroll:`${_}__footer--has-scroll`}),j=({footer:e,hasScroll:t,className:n})=>(0,l.jsx)("div",{className:(0,o.A)(C.footer,{[C.hasScroll]:t},n),children:"function"==typeof e?e():e}),$=(0,s.g)("drawer-content","sc"),N=Object.freeze({container:`${$}__container`,open:`${$}--open`,close:`${$}--close`,header:`${$}__header`,rowHeader:`${$}__header--row`,title:`${$}__title`,center:`${$}__title--center`,left:`${$}__title--left`,right:`${$}__title--right`,controlContainer:`${$}__control-container`,content:`${$}__content`,footer:`${$}__footer`}),k=({onClose:e,onContentClick:t,children:n,title:s,rowTitle:r,titleAlign:a,isCloseable:c,footer:d,closeButton:u,isOpen:p,contentClassName:h,footerClassName:m,contentStyle:f,width:g})=>{let w=(0,i.useRef)(null),v=(0,i.useRef)(null),[x,b]=(0,i.useState)(!1);(0,i.useEffect)(()=>{var e;if(!v.current||!w.current)return;let t=(null==(e=null==v?void 0:v.current)?void 0:e.getBoundingClientRect().top)||0,n=null==w?void 0:w.current,l=()=>{let e=null==v?void 0:v.current;e&&b(()=>e.getBoundingClientRect().top!==t)};return n&&n.addEventListener("scroll",l,!1),()=>{null==n||n.removeEventListener("scroll",l,!1)}},[]);let _=f||g?{width:g,...f||{}}:void 0;return(0,l.jsxs)("div",{ref:w,style:_,className:(0,o.A)(N.container,{[N.open]:p,[N.close]:!p},h),children:[s||c?(0,l.jsxs)("div",{className:(0,o.A)(N.header,{[N.rowHeader]:r}),children:[c?u?"function"==typeof u?u():u:(0,l.jsx)("button",{type:"button",className:N.controlContainer,onClick:e,children:(0,l.jsx)(y,{size:24})}):null,s?(0,l.jsx)("h3",{className:(0,o.A)(N.title,{[N[a]]:!0}),children:s}):null]}):null,(0,l.jsx)("div",{ref:v,className:N.content,onClick:t,children:n}),d&&(0,l.jsx)(j,{className:(0,o.A)(N.footer,m),footer:d,hasScroll:x})]})},S=(0,s.g)("drawer-layout","sc"),E=Object.freeze({window:`${S}__window`}),O=({onClose:e,isOpen:t,children:n,withDisabledScroll:s,className:r,...a})=>{let c=(0,i.useCallback)(e=>e.stopPropagation(),[]);return w(t&&s),(0,l.jsxs)("div",{"data-portal":!0,className:(0,o.A)(E.window,r),children:[(0,l.jsx)(p,{onClose:e,isOpen:t,delay:0}),(0,l.jsx)(k,{onContentClick:c,onClose:e,isOpen:t,...a,children:n})]})},z=({isOpen:e=!1,children:t,titleAlign:n="center",isCloseable:i=!0,withDisabledScroll:o=!0,...s})=>{let{mounted:r}=c({opened:e});return r?(0,l.jsx)(O,{titleAlign:n,isCloseable:i,isOpen:e,withDisabledScroll:o,...s,children:t}):null};z.displayName="Drawer";let I={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},A={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},R=e=>i.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{d:"M7.22 7.22a.743.743 0 011.06 0L12 10.94l3.72-3.72a.743.743 0 011.06 0 .742.742 0 010 1.06L13.061 12l3.72 3.72a.743.743 0 010 1.06.743.743 0 01-1.061 0L12 13.06l-3.72 3.72a.743.743 0 01-1.06 0 .743.743 0 010-1.06L10.94 12 7.22 8.28a.743.743 0 010-1.06z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function T({className:e,style:t,boxSize:n,size:l,onClick:o}){return i.createElement("span",{className:e,style:{...I,...o&&{cursor:"pointer"},...l&&{fontSize:`${l}px`},...n&&{width:`${n}px`,height:`${n}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...o?{role:"button",tabIndex:"0",onClick:o}:{}},i.createElement(R,{viewBox:"0 0 24 24",style:A}))}T.displayName="IconFdsCloseO";let P=(0,s.g)("mobile-modal-footer","sc"),L=Object.freeze({footer:`${P}__footer`,footerWithoutShadow:`${P}__footer--without-shadow`}),B=({footer:e,isSmallPopup:t=!1,footerClassName:n})=>(0,l.jsx)("div",{className:(0,o.A)(L.footer,t&&L.footerWithoutShadow,n),children:"function"==typeof e?e():e}),M=(0,s.g)("mobile-popup","sc"),F=Object.freeze({mobilePopup:`${M}`,mobilePopupOpen:`${M}--open`,content:`${M}__content`,contentFull:`${M}__content--full`,contentTransition:`${M}__content--transition`,contentTransitionOpen:`${M}__content--transition-open`,contentLine:`${M}__content-line`,contentContainer:`${M}__content-container`,smallContentContainer:`${M}__content-container--small`,min:`${M}__content-container--min`,title:`${M}__title`,closeContainer:`${M}__close-container`,closeButton:`${M}__close-button`}),D=({children:e,footer:t,isOpen:n,isSmallPopup:s,onClose:r,hasCloseButton:a=!0,full:c,touchDistance:d=100,withDisabledScroll:u=!0,contentClassName:h,className:m,title:f,closeButton:g,footerClassName:v})=>{let[x,b]=(0,i.useState)(!1),[y,_]=(0,i.useState)(!1),[C,j]=(0,i.useState)(!0),[$,N]=(0,i.useState)("120%"),k=(0,i.useRef)(null),S=(0,i.useRef)(0),E=(0,i.useRef)(!1),O=e=>{var t,n,l;let i=null==(t=k.current)?void 0:t.offsetTop,o=null==(n=k.current)?void 0:n.offsetHeight;if(E.current=!0,j(!1),i&&o){let t=(null==(l=null==e?void 0:e.touches[0])?void 0:l.clientY)-i,n=0;t>=0&&t<=o+30&&(n=t),t>o+30&&(n=o+30),N(`${n}px`),S.current=n}},z=()=>{E.current&&(S.current>d&&r?null==r||r():N("0"),j(!0),E.current=!1),window.removeEventListener("touchmove",O),window.removeEventListener("touchend",z)};return(0,i.useEffect)(()=>{n&&setTimeout(()=>{b(!0),_(!0),N("0")},100),!n&&y&&(N("120%"),b(!1),_(!1))},[y,n]),w(n&&u),(0,l.jsxs)("div",{"data-portal":!0,className:(0,o.A)(F.mobilePopup,y&&F.mobilePopupOpen,m),children:[(0,l.jsx)(p,{onClose:()=>{n&&(null==r||r())},onToucheMove:()=>{n&&(b(!1),window.addEventListener("touchmove",O),window.addEventListener("touchend",z))},isOpen:n,delay:0}),(0,l.jsxs)("div",{className:(0,o.A)(F.content,c&&F.contentFull,C&&F.contentTransition,C&&x&&F.contentTransitionOpen),ref:k,style:{transform:`translateY(${$})`},children:[(0,l.jsx)("div",{className:F.contentLine}),(0,l.jsxs)("div",{className:(0,o.A)(F.contentContainer,s&&F.smallContentContainer,{[F.min]:!f&&!a},h),children:[!!f&&(0,l.jsx)("div",{className:F.title,children:f}),a?(0,l.jsx)("div",{className:F.closeContainer,children:a?g?"function"==typeof g?g():g:(0,l.jsx)("button",{onClick:r,className:F.closeButton,children:(0,l.jsx)(T,{size:24})}):null}):null,e]}),t&&(0,l.jsx)(B,{footerClassName:v,isSmallPopup:s,footer:t})]})]})},H=({children:e,isSmallPopup:t=!1,isOpen:n=!1,...i})=>{let{mounted:o}=c({opened:n});return o?(0,l.jsx)(D,{isSmallPopup:t,isOpen:n,...i,children:e}):null};H.displayName="UiMobilePopup";let U=({children:e,id:t="portal-root"})=>{let[n,l]=(0,i.useState)(null);return(0,i.useEffect)(()=>{let e=document.getElementById(t);if(e)return void l(e);let n=document.createElement("div");return n.id=t,document.body.appendChild(n),l(n),()=>{document.body.removeChild(n)}},[t]),n?(0,r.createPortal)(e,n):null}},53730:(e,t,n)=>{"use strict";n.d(t,{a:()=>l});let l={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 l=`${encodeURIComponent(e)}=${encodeURIComponent(t)}`;for(let e in n){if(!n.hasOwnProperty(e))continue;l+=`; ${e}`;let t=n[e];!0!==t&&(l+=`=${t}`)}document.cookie=l},removeItem:e=>{l.setItem(e,"",{"max-age":-1})}}},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return a},createAsyncLocalStorage:function(){return r},createSnapshot:function(){return c}};for(var l in n)Object.defineProperty(t,l,{enumerable:!0,get:n[l]});let i=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class o{disable(){throw i}getStore(){}run(){throw i}exit(){throw i}enterWith(){throw i}static bind(e){return e}}let s="u">typeof globalThis&&globalThis.AsyncLocalStorage;function r(){return s?new s:new o}function a(e){return s?s.bind(e):o.bind(e)}function c(){return s?s.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let l=n(95155),i=n(12115),o=n(41112);function s(e){return{default:e&&"default"in e?e.default:e}}n(21957);let r={loader:()=>Promise.resolve(s(()=>null)),loading:null,ssr:!0},a=function(e){let t={...r,...e},n=(0,i.lazy)(()=>t.loader().then(s)),a=t.loading;function c(e){let s=a?(0,l.jsx)(a,{isLoading:!0,pastDelay:!0,error:null}):null,r=!t.ssr||!!t.loading,c=r?i.Suspense:i.Fragment,d=t.ssr?(0,l.jsxs)(l.Fragment,{children:[null,(0,l.jsx)(n,{...e})]}):(0,l.jsx)(o.BailoutToCSR,{reason:"next/dynamic",children:(0,l.jsx)(n,{...e})});return(0,l.jsx)(c,{...r?{fallback:s}:{},children:d})}return c.displayName="LoadableComponent",c}},68990:(e,t,n)=>{"use strict";n.d(t,{a:()=>v});var l=n(95155),i=n(12115),o=n(76701),s=n(29722),r=n(37370),a=n(92681),c=n(83640),d=n(87978),u=n(78012),p=n(62849),h=n(26048);n(39041);let m=(0,c.g)("modal"),f=Object.freeze({modal:m,overlay:`${m}__overlay`,withoutFooter:`${m}--without-footer`,noContent:`${m}--no-content`,open:`${m}--open`,overlayOpen:`${m}__overlay--open`,height:{medium:`${m}--height-medium`,full:`${m}--height-full`},size:{s:`${m}--s`,m:`${m}--m`,l:`${m}--l`,xl:`${m}--xl`},header:`${m}__header`,headerText:`${m}__header-text`,headerTitle:`${m}__header-title`,headerSubtitle:`${m}__header-subtitle`,closeIcon:`${m}__close-icon`,backButton:`${m}__back-button`,backButtonText:`${m}__back-button-text`,headerStates:{centered:`${m}__header--centered`,withLongBtn:`${m}__header--with-long-btn`,defaultHeight:`${m}__header--default-height`},content:`${m}__content`,withoutPadding:`${m}__content--without-padding`,withScroll:`${m}__content--with-scroll`,footer:`${m}__footer`,footerContainer:`${m}__footer-container`,footerBtn:`${m}__footer-btn`,footerDescription:`${m}__footer-description`,divider:`${m}__divider`,dividerTop:`${m}__divider--top`,dividerBottom:`${m}__divider--bottom`}),g=({primaryBtnText:e,onPrimary:t,secondaryBtnText:n,onSecondary:i,thirdBtnText:o,onThird:r,description:c,children:u,noContent:p,dataQa:h})=>(0,l.jsxs)("div",{"data-qa":(0,a.g)(`${h}-footer`,!!h),className:(0,s.A)(f.footer,{[f.noContent]:p}),children:[!p&&(0,l.jsx)("div",{className:(0,s.A)(f.divider,f.dividerTop)}),u||(0,l.jsxs)("div",{className:f.footerContainer,children:[o&&(0,l.jsx)(d.a,{dataQa:(0,a.g)(`${h}-footer-third-btn`,!!h),label:o,variant:"secondary",size:"s",className:f.footerBtn,onClick:r}),n&&(0,l.jsx)(d.a,{dataQa:(0,a.g)(`${h}-footer-secondary-btn`,!!h),label:n,variant:"secondary",size:"s",className:f.footerBtn,onClick:i}),e&&(0,l.jsx)(d.a,{dataQa:(0,a.g)(`${h}-footer-primary-btn`,!!h),label:e,size:"s",className:f.footerBtn,onClick:t})]}),c&&(0,l.jsx)("span",{"data-qa":(0,a.g)(`${h}-footer-description`,!!h),className:f.footerDescription,children:c})]}),w=({text:e,title:t,subtitle:n,align:i="left",backBtnVariant:o,onBack:r,onClose:c,noContent:d,dataQa:m,withoutCloseBtn:g=!1})=>(0,l.jsxs)("div",{"data-qa":(0,a.g)(`${m}-header`,!!m),className:(0,s.A)(f.header,{[f.headerStates.centered]:"center"===i||!!o,[f.headerStates.withLongBtn]:"long"===o,[f.headerStates.defaultHeight]:!e&&!t&&!n}),children:[e&&(0,l.jsx)("span",{"data-qa":(0,a.g)(`${m}-header-text`,!!m),className:f.headerText,children:e}),t&&(0,l.jsx)("span",{"data-qa":(0,a.g)(`${m}-header-title`,!!m),className:f.headerTitle,children:t}),n&&(0,l.jsx)("span",{"data-qa":(0,a.g)(`${m}-header-subtitle`,!!m),className:f.headerSubtitle,children:n}),!g&&(0,l.jsx)("button",{"data-qa":(0,a.g)(`${m}-header-close`,!!m),type:"button",className:f.closeIcon,onClick:c,children:(0,l.jsx)(h.P,{children:(0,l.jsx)(p.S,{})})}),o&&(0,l.jsxs)("button",{"data-qa":(0,a.g)(`${m}-header-back`,!!m),type:"button",className:f.backButton,onClick:r,children:[(0,l.jsx)(h.P,{children:(0,l.jsx)(u.S,{})}),"long"===o&&(0,l.jsx)("span",{className:f.backButtonText,children:"Назад"})]}),!d&&(0,l.jsx)("div",{className:(0,s.A)(f.divider,f.dividerBottom)})]}),v=(0,i.forwardRef)(({header:e,footer:t,open:n=!1,size:c="m",noPadding:d=!1,height:u="full",onClose:p,children:h,className:m,style:v,dataQa:x,dataId:b,dismissDisabled:y=!1,..._},C)=>{let[j,$]=(0,i.useState)(!1),[N,k]=(0,i.useState)(!1),S=(0,i.useRef)(null);(0,i.useEffect)(()=>()=>{S.current&&cancelAnimationFrame(S.current)},[]),(0,i.useEffect)(()=>{if(S.current&&cancelAnimationFrame(S.current),n)return $(!0),S.current=requestAnimationFrame(()=>{requestAnimationFrame(()=>{k(!0)})}),()=>{S.current&&cancelAnimationFrame(S.current)};{k(!1);let e=setTimeout(()=>{$(!1)},300);return()=>{clearTimeout(e),S.current&&cancelAnimationFrame(S.current)}}},[n]);let E=()=>{k(!1);let e=setTimeout(()=>{null==p||p(),$(!1)},300);return()=>clearTimeout(e)},{context:O}=(0,o.we)({open:j,onOpenChange:e=>{e||E()}}),z=(0,o.s9)(O,{outsidePressEvent:"mousedown",outsidePress:!y,escapeKey:!y}),I=(0,o.It)(O,{role:"dialog"}),{getFloatingProps:A}=(0,o.bv)([z,I]),[R,T]=(0,i.useState)(!1),P=(0,i.useCallback)(e=>{e&&new ResizeObserver(()=>{T(e.scrollHeight>e.clientHeight)}).observe(e)},[]);return j?(0,l.jsx)(o.XF,{id:r.M,children:(0,l.jsx)(o.zR,{lockScroll:!0,className:(0,s.A)(f.overlay,{[f.overlayOpen]:N}),children:(0,l.jsx)(o.s3,{context:O,children:(0,l.jsxs)("div",{ref:C,className:(0,s.A)(f.modal,f.size[c],f.height[u],{[f.withoutFooter]:!(null==t?void 0:t.primaryBtnText)&&!(null==t?void 0:t.children),[f.open]:N},m),style:v,...A(),..._,"data-id":b,"data-qa":x,children:[(0,l.jsx)(w,{...e,dataQa:x,noContent:!h,onClose:E}),h&&(0,l.jsx)("div",{"data-qa":(0,a.g)(`${x}-content`,!!x),ref:P,className:(0,s.A)(f.content,{[f.withoutFooter]:!(null==t?void 0:t.primaryBtnText)&&!(null==t?void 0:t.children),[f.withoutPadding]:d,[f.withScroll]:R}),children:h}),((null==t?void 0:t.primaryBtnText)||(null==t?void 0:t.children))&&(0,l.jsx)(g,{...t,dataQa:x,noContent:!h})]})})})}):null});v.displayName="Modal"},73302:(e,t,n)=>{"use strict";n.d(t,{O:()=>l.I});var l=n(37637)},75707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let l=n(73623)._(n(68635));function i(e,t){let n={};"function"==typeof e&&(n.loader=e);let i={...n,...t};return(0,l.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]);