(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2587],{67455:function(e,t,n){"use strict";n.d(t,{t:function(){return u}});var l=n(53083),o=n(46295);n(40257);let r={REVALIDATE_REQUEST_VALUE:"300",NEXT_PUBLIC_GTM_ID:"GTM-KPFSBHT",NEXT_PUBLIC_MTM_URL:"https://wa.finuslugi.ru",NEXT_PUBLIC_MTM_ID:"ivMbIHf9",NEXT_PUBLIC_CRAML_DIRTY_FEEDBACK:"http://craml-dirty-feedback.craml-rc.mpddev.moex.com",NEXT_PUBLIC_BASE_URL:"http://dev-rc.beta.moex.com",NEXT_PUBLIC_API_URL:"http://dev-rc.beta.moex.com",NODE_ENV:"production",NEXT_PUBLIC_S3_ASSETS:"https://dev-minio.beta.moex.com",NEXT_PUBLIC_GEO_CONTENT:"http://mp-sc-geo-content.mp-fin-rc.mpddev.moex.com",NEXT_PUBLIC_PAGECONTENT_API:"http://mp-sc-api-page-content.mp-fin-rc.mpddev.moex.com",NEXT_PUBLIC_MP_SC_REDIRECTS_API:"http://mp-sc-redirects.mp-rc.mpddev.moex.com",FEATURE_TOGGLE_SEO_TEXTS:"true",NEXT_PUBLIC_HEADLESS_CMS:"http://dev-rc.beta.moex.com/sc",NEXT_PUBLIC_VERSION:"1.0.0",NEXT_PUBLIC_MICROLOANS_API_URL:"http://mp-credit-showcase-api.mp-fin-rc.mpddev.moex.com",NEXT_PUBLIC_TOGGLE_NEW_MICROLOANS_API:"false"},i=()=>!1,s=()=>i()?{...(0,o.S)(),...r}:(0,o.S)(),c=(e,t)=>{e.NEXT_PUBLIC_HEADLESS_CMS,e.NEXT_PUBLIC_API_URL,e.NEXT_PUBLIC_PAGECONTENT_API;let n=e.NEXT_PUBLIC_BASE_URL,l=e.NEXT_PUBLIC_MP_SC_REDIRECTS_API,o=e.NEXT_PUBLIC_MICROLOANS_API_URL,{isHeadlessCMS:r,isPageContent:i,isProxyOtherService:s,isMpScRedirects:c,isMicroloans:u}=t;return r?"".concat(n,"/sc"):i?"".concat(n,"/page-content"):c?l:s?n:u?o:n},u=async e=>{let{url:t,options:n={},config:o}=e,r=s(),i=c(r,n),u=((null==o?void 0:o.method)||"GET").toUpperCase();try{let e=performance.now(),n=await (0,l.Wg)(t,{baseURL:i,method:u,headers:{...null==o?void 0:o.headers},...o,next:{revalidate:Number(r.REVALIDATE_REQUEST_VALUE)||300}}),s=performance.now()-e;return console.warn("Запрос ".concat(i).concat(t," занял ").concat(s.toFixed(2)," ms")),{data:n,error:null}}catch(e){return console.error("Ошибка запроса","".concat(e,": ").concat(i).concat(t)),{data:null,error:e||"Unknown error"}}}},58560:function(e,t,n){"use strict";n.d(t,{s:function(){return o}});var l=n(67455);let o=async function(){let{regions:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new URLSearchParams;e&&t.append("regions","all");let n="/money_data/Root.json".concat(t.size?"?".concat(t):"");return(await (0,l.t)({url:n})).data}},77493:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});let l=300},66153:function(e,t,n){"use strict";n.d(t,{L:function(){return u}});var l=n(57437),o=n(2265),r=n(61994),i=n(77493),s=n(78582),c=n.n(s);let u=e=>{let{onClose:t,onToucheMove:n,isOpen:s,delay:u=i.z}=e,a=(0,o.useRef)(null),d=(0,o.useCallback)(()=>{t&&(a.current=setTimeout(()=>{t()},u))},[u,t]),p=(0,o.useCallback)(e=>{"Escape"===e.key&&d()},[d]);return(0,o.useEffect)(()=>(s&&window.addEventListener("keydown",p),()=>{a.current&&clearTimeout(a.current),window.removeEventListener("keydown",p)}),[s,p]),(0,l.jsx)("div",{className:(0,r.Z)(c().overlay,{[c().open]:s,[c().close]:!s}),onTouchStart:n,onClick:d})}},49689:function(e,t,n){"use strict";n.d(t,{j:function(){return v}});var l=n(57437),o=n(2265),r=n(61994),i=n(66153),s=n(53582),c=n.n(s);let u=e=>{let{footer:t,isSmallPopup:n=!1,footerClassName:o}=e;return(0,l.jsx)("div",{className:(0,r.Z)(c().footer,n&&c().footerWithoutShadow,o),children:"function"==typeof t?t():t})};var a=n(17868),d=n(73564),p=n(16565),_=n.n(p);let m=e=>{let{children:t,footer:n,isOpen:s,isSmallPopup:c,onClose:d,hasCloseButton:p=!0,full:m,touchDistance:v=100,withDisabledScroll:f=!0,contentClassName:h,className:g,title:b,closeButton:C,footerClassName:w}=e,[S,x]=(0,o.useState)(!1),[y,L]=(0,o.useState)(!1),[k,I]=(0,o.useState)(!0),[E,N]=(0,o.useState)("120%"),P=(0,o.useRef)(null),j=(0,o.useRef)(0),T=(0,o.useRef)(!1),O=e=>{var t,n,l;let o=null===(t=P.current)||void 0===t?void 0:t.offsetTop,r=null===(n=P.current)||void 0===n?void 0:n.offsetHeight;if(T.current=!0,I(!1),o&&r){let t=(null==e?void 0:null===(l=e.touches[0])||void 0===l?void 0:l.clientY)-o,n=0;t>=0&&t<=r+30&&(n=t),t>r+30&&(n=r+30),N("".concat(n,"px")),j.current=n}},A=()=>{T.current&&(j.current>v&&d?null==d||d():N("0"),I(!0),T.current=!1),window.removeEventListener("touchmove",O),window.removeEventListener("touchend",A)};return(0,o.useEffect)(()=>{s&&setTimeout(()=>{x(!0),L(!0),N("0")},100),!s&&y&&(N("120%"),x(!1),L(!1))},[y,s]),(0,a.o)(s&&f),(0,l.jsxs)("div",{"data-portal":!0,className:(0,r.Z)(_().mobilePopup,y&&_().mobilePopupOpen,g),children:[(0,l.jsx)(i.L,{onClose:()=>{s&&(null==d||d())},onToucheMove:()=>{s&&(x(!1),window.addEventListener("touchmove",O),window.addEventListener("touchend",A))},isOpen:s,delay:0}),(0,l.jsxs)("div",{className:(0,r.Z)(_().content,m&&_().contentFull,k&&_().contentTransition,k&&S&&_().contentTransitionOpen),ref:P,style:{transform:"translateY(".concat(E,")")},children:[(0,l.jsx)("div",{className:_().contentLine}),(0,l.jsxs)("div",{className:(0,r.Z)(_().contentContainer,c&&_().smallContentContainer,{[_().min]:!b&&!p},h),children:[!!b&&(0,l.jsx)("div",{className:_().title,children:b}),p?(0,l.jsx)("div",{className:_().closeContainer,children:(0,l.jsx)("div",{className:_().closeContainer,children:p?C?"function"==typeof C?C():C:(0,l.jsx)("button",{onClick:d,className:_().closeButton,children:(0,l.jsx)("img",{src:"https://assets.finuslugi.ru/mp-assets/images/sc/close_gray.svg",alt:"close",loading:"lazy"})}):null})}):null,t]}),n&&(0,l.jsx)(u,{footerClassName:w,isSmallPopup:c,footer:n})]})]})},v=e=>{let{children:t,isSmallPopup:n=!1,isOpen:o=!1,...r}=e,{mounted:i}=(0,d.b)({opened:o});return i?(0,l.jsx)(m,{isSmallPopup:n,isOpen:o,...r,children:t}):null};v.displayName="UiMobilePopup"},24620:function(e,t,n){"use strict";n.d(t,{H:function(){return I}});var l=n(57437),o=n(2265),r=n(80684),i=n(75461),s=n(61994);let c=(e,t)=>{e&&(e.current=t)},u=(e,t)=>{let n=e.value;e.value=t;let l=new Event("input",{bubbles:!0}),o=e._valueTracker;o&&o.setValue(n),e.dispatchEvent(l)};var a=n(15397),d=n.n(a);let p="Обязательное поле",_=(0,o.memo)(e=>{let{onChange:t=()=>null,onFocus:n=()=>null,onBlur:i=()=>null,onKeyDown:a=()=>null,inputClear:_=()=>null,label:m,allowClear:v=!1,addonBefore:f,addonAfter:h,state:g,appearance:b="gray",inputType:C,required:w=!1,infoMessage:S,message:x,innerRef:y=null,disabled:L,id:k,placeholder:I,autoFocus:E=!1,value:N,readOnly:P,className:j,onlyRange:T,size:O="small",maskPlaceholder:A,...M}=e,[R,B]=(0,o.useState)(E);(0,o.useEffect)(()=>B(E),[E]);let U=(0,o.useRef)(null),D=!w||(N||"error"!==g)&&g?x:p,X=(null==S?void 0:S.length)&&!w||(null==S?void 0:S.length)&&N?S:p;return(0,l.jsxs)("div",{className:(0,s.Z)(d().inputRoot,j),children:[(0,l.jsxs)("label",{htmlFor:k,className:(0,s.Z)(d().wrapperInput,d()[b],d()[O],{[d().isFocused]:R&&!L,[d().hasValue]:R||!!N||!!I||A,[d().disabled]:L,[d().success]:"success"===g,[d().error]:"error"===g,[d().readOnly]:P}),children:[f&&(0,l.jsx)("div",{className:(0,s.Z)(d().controlContainer,d().addoneBefore),children:f}),(0,l.jsxs)("div",{className:(0,s.Z)(d().inputContainer,{[d().cover]:"button"===C}),children:[A&&(0,l.jsxs)("div",{className:(0,s.Z)(d().maskPlaceholder,!I&&!m&&d().maskPlaceholderCenter),children:[N&&(0,l.jsx)("span",{className:d().maskPlaceholderHide,children:N}),A.slice(String(null!=N?N:"").length)]}),(0,l.jsx)("input",{id:k,ref:e=>{U.current=e,c(y,e)},value:null!=N?N:"",disabled:L||T,autoFocus:"button"!==C&&R,readOnly:P,onFocus:e=>{R||(B(!0),n(e))},onBlur:e=>{R&&(B(!1),i(e))},onChange:e=>{t(e)},onKeyDown:e=>{a&&a(e)},className:(0,s.Z)(d().input,!m&&d().inputCenter),placeholder:A?void 0:I,...M}),(null==m?void 0:m.length)?(0,l.jsx)("span",{className:(0,s.Z)(d().label,"error"===g&&d().error),children:m}):null]}),v&&(!!N||"string"==typeof N&&!!N.trim().length)&&(0,l.jsx)("button",{type:"button",className:(0,s.Z)(d().controlContainer,d().buttonClear),onClick:e=>{e.preventDefault(),U.current&&(u(U.current,""),"input"===C&&U.current.focus()),_()},children:(0,l.jsx)(r.IconFdsCloseO,{size:20})}),h&&(0,l.jsx)("div",{className:(0,s.Z)(d().controlContainer,d().addoneAfter),children:h})]}),(!!(null==x?void 0:x.length)&&g||w||!!(null==S?void 0:S.length))&&(0,l.jsx)("div",{className:(0,s.Z)(d().message,{[d().successMessage]:"success"===g,[d().errorMessage]:"error"===g,[d().defaultMessage]:w&&!g||!w&&!g&&!!(null==S?void 0:S.length)}),children:g?D:X})]})});_.displayName="UiInput";let m=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,n=(0,o.useRef)(null),l=(0,o.useRef)(null),r=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let o=()=>{n.current&&clearTimeout(n.current),r.current&&(window.removeEventListener("keydown",r.current.keyDown),document.removeEventListener("mousedown",r.current.clickOutside))};return o(),r.current={keyDown(o){"Escape"===o.key&&e&&(n.current=setTimeout(()=>{e(l)},t))},clickOutside(t){0===t.button&&l.current&&!l.current.contains(t.target)&&e(l)}},window.addEventListener("keydown",r.current.keyDown),document.addEventListener("mousedown",r.current.clickOutside),o},[e,t]),l},v=e=>{let{isOpenPopup:t,multiple:n,optionsList:l,defaultPointedIndex:r,onTogglePopup:i,onSelectedItem:s,onClearCallBack:c}=e,[u,a]=(0,o.useState)({index:r,trigger:"key"}),{index:d,trigger:p}=u,_=(0,o.useRef)(l.length);(0,o.useEffect)(()=>{t||null===r||n||(a({index:r,trigger:"key"}),_.current=l.length),_.current!==l.length&&t&&(_.current=l.length,a({index:0,trigger:"key"}))},[l.length,t,r,n]);let m=(0,o.useCallback)(()=>{if(!t){i();return}null!==d&&(s(l[d]),c())},[t,l,d,s,c,i]),v=(0,o.useCallback)(()=>{t&&i(!0)},[t,i]),f=(0,o.useCallback)(()=>{t&&l.length&&(a(e=>{let{index:t}=e;return null===t?{trigger:"key",index:0}:t+1<l.length?{trigger:"key",index:t+1}:t+1===l.length?{trigger:"key",index:0}:{trigger:"key",index:t}}),c())},[t,c,l.length]),h=(0,o.useCallback)(()=>{t&&l.length&&(a(e=>{let{index:t}=e;return null===t?{trigger:"key",index:0}:t+1>l.length?{trigger:"key",index:t-1}:0===t?{trigger:"key",index:l.length-1}:t+1<=l.length?{trigger:"key",index:t-1}:{trigger:"key",index:t}}),c())},[t,c,l.length]);return{pointedItemIndex:d,pointedTrigger:p,setPointedItem:a,handleKeyNavigation:e=>{e.stopPropagation();let t=e||window.event;switch(e.key){case"Escape":v();break;case"Enter":m();break;case"ArrowDown":t.preventDefault(),f();break;case"ArrowUp":t.preventDefault(),h()}}}},f=e=>{let{isOpenPopup:t,isMobile:n=!1,multiple:l,scrollValue:r,selectedItemIndex:i,pointedItemIndex:s,pointedTrigger:c,container:u,element:a}=e,d=(0,o.useCallback)(e=>{u&&e>=0&&a.current&&null!==a.current&&a.current.scrollIntoView({block:"nearest",inline:"nearest"})},[u,a]);return(0,o.useEffect)(()=>{let e;!l&&t&&e!==i&&"number"==typeof i&&(e=i,d(i))},[u,a,t,l,d,i]),(0,o.useEffect)(()=>{let e;!n&&t&&e!==s&&"number"==typeof s&&"key"===c&&(e=s,d(s))},[n,u,a,t,s,c,d]),(0,o.useEffect)(()=>{let e;l&&t&&u.current&&e!==r&&(e=r,u.current.scrollTo({top:r}))},[u,t,l,r]),null};var h=n(38019),g=n.n(h);let b="calc(100% + ".concat(8,"px)"),C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=null;return n=>{t&&clearInterval(t),t=setTimeout(n,e)}}(),w=(0,o.memo)(e=>{let{onSearch:t,onChange:n=()=>null,options:c,optionsEmptyText:u,multiple:a=!1,search:d=!1,defaultOpen:p=!1,autoFocus:h=!1,value:w,popupHeight:S=312,className:x,removeLineHeight:y,onClose:L,onOpen:k,popupDataQa:I,itemDataQa:E,...N}=e,P=(0,o.useRef)(!1),[j,T]=(0,o.useState)(()=>null!=w?w:null),[O,A]=(0,o.useState)(""),[M,R]=(0,o.useState)(h||p),[B,U]=(0,o.useState)(!1),[D,X]=(0,o.useState)(null),[Z,F]=(0,o.useState)(()=>j?c.filter(e=>j.find(t=>String(t.value)===String(e.value))):null),[z,H]=(0,o.useState)(0),[Y,V]=(0,o.useState)({mouseX:void 0,mouseY:void 0,isDisplaced:!0}),G=M&&!!c.length,K=(0,o.useCallback)(e=>{B||(A(""),R(!1),null==L||L()),(null==e?void 0:e.current)&&a&&G&&H(e.current.scrollTop)},[B,G,a,L]),W=(0,o.useRef)(null),q=(0,o.useRef)(null),J=(0,o.useRef)(null),Q=m(K),$=(0,o.useMemo)(()=>d&&O&&""!==O?c.filter(e=>-1!==String(e.label).toLocaleLowerCase().indexOf(O.toLocaleLowerCase())):c,[O,c,d]),ee=(0,o.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(V({mouseX:void 0,mouseY:void 0,isDisplaced:!0}),R(t=>!e&&!t),U(t=>!e&&!t),e){var t;null===(t=W.current)||void 0===t||t.blur()}(null==Q?void 0:Q.current)&&a&&G&&H(Q.current.scrollTop),e&&(null==L||L())},[Q,a,G,L]),et=(0,o.useCallback)(e=>{if(a)F(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t)return[e];let l=t.findIndex(t=>String(t.label).toLocaleLowerCase()===String(e.label).toLocaleLowerCase());if(l>=0){let e=[...t.slice(0,l),...t.slice(l+1)];return e.length||(T(null),X(null),F(null),n(null)),e}return[...t,e]});else{let t=[],l=c.find(t=>String(t.value).trim().toLocaleLowerCase()===String(e.value).trim().toLocaleLowerCase());t=l?[l]:[];let o=c.findIndex(e=>{var n;return e.label.toLocaleLowerCase()===(null===(n=t[0])||void 0===n?void 0:n.label.toLocaleLowerCase())});X(o>=0?o:null),T([e]),F([e]),n(w&&e.value===w[0].value?null:t),ee(!0),A("")}},[ee,a,n,c,w]),en=(0,o.useCallback)(()=>{n(Z),ee(!0)},[ee,n,Z]),{pointedItemIndex:el,pointedTrigger:eo,setPointedItem:er,handleKeyNavigation:ei}=v({isOpenPopup:G,multiple:a,optionsList:$,defaultPointedIndex:D,onTogglePopup:ee,onSelectedItem:et,onClearCallBack:()=>V(e=>({...e,isDisplaced:!1}))}),es=e=>{e.preventDefault(),er(e=>({...e,trigger:"mouse"})),V(t=>{let n=void 0===t.mouseX&&void 0===t.mouseY||!(t.mouseX===e.screenX&&t.mouseY===e.screenY);return{...t,mouseX:e.screenX,mouseY:e.screenY,isDisplaced:n}})},ec=(0,o.useCallback)(()=>{T(null),X(null),er({index:null,trigger:"key"}),H(0),F(null),ee(!0),n(null)},[ee,n,er]);f({isOpenPopup:G,multiple:a,scrollValue:z,selectedItemIndex:D,pointedItemIndex:el,pointedTrigger:eo,container:Q,element:J});let eu=(0,o.useMemo)(()=>(null==Z?void 0:Z.length)&&!G?a?"":Z[0].label:O,[Z,O,a,G]),ea=(0,o.useMemo)(()=>{if(!(null==Z?void 0:Z.length))return O;let{length:e}=Z;return a?1===e?Z[0].label:"Выбрано (".concat(e,")"):G&&!O.length?Z[0].label:O},[G,a,O,Z]),ed={readOnly:!d,addonAfter:(0,l.jsx)("div",{className:(0,s.Z)(g().icon,{[g().iconRotate]:!d&&M}),children:M?(0,l.jsx)(r.IconFdsSearchO,{size:18}):(0,l.jsx)(r.IconFdsChevronDownO,{size:24})}),onChange:e=>{A(e.currentTarget.value)},autoFocus:M,inputType:"select",inputClear:()=>a?A(""):ec(),value:eu,placeholder:ea,onFocus:()=>d&&R(!0),onClick:()=>{d?M||R(!0):R(e=>!e)},autoComplete:"off",innerRef:W,...N};(0,o.useEffect)(()=>{P.current?(T(w),F(w?c.filter(e=>w.find(t=>String(t.value)===String(e.value))):null)):P.current=!0},[c,w]);let[ep,e_]=(0,o.useState)(0),[em,ev]=(0,o.useState)(null),ef=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=()=>{C(()=>e_(window.scrollY))};return G?window.addEventListener("scroll",e,!1):window.removeEventListener("scroll",e,!1),()=>window.removeEventListener("scroll",e,!1)},[G]),(0,o.useEffect)(()=>{if(!ef.current||!W.current)return;let e=W.current.getBoundingClientRect(),t=ef.current.getBoundingClientRect(),n=window.innerHeight,l={top:"unset",right:"0",left:"0",bottom:"unset"},o=n-e.top-8-e.height;!(document.querySelectorAll("[data-portal]").length>0)&&(n<(t.height+8)*2+e.height?e.top>o:o<t.height)?l.bottom="70px":l.top=b,ev(l)},[G,ep]);let eh=em||{top:b,left:"0",right:"0"};return(0,o.useEffect)(()=>{G&&(null==k||k())},[G,k]),(0,o.useEffect)(()=>{null==t||t(O)},[O]),(0,l.jsxs)("div",{className:(0,s.Z)(g().select,x),onMouseEnter:()=>U(!0),onMouseLeave:()=>U(!1),onKeyDown:e=>ei(e),children:[(0,l.jsx)("div",{className:g().inputcontainer,children:(0,l.jsx)(_,{...ed})}),G&&(0,l.jsxs)("div",{className:g().popup,ref:ef,style:{maxHeight:"".concat(S,"px"),...eh},"data-qa":I,children:[(0,l.jsxs)("div",{ref:Q,className:g().popupContent,style:{maxHeight:"".concat(S-(a?100:20),"px")},children:[0===$.length&&(0,l.jsx)("div",{className:g().emptyList,children:u||"Нет совпадений"}),$.length>0&&(0,l.jsx)("ul",{className:g().optionsList,ref:q,children:$.map((e,t)=>{let n=!1;if(a)n=!!(null==Z?void 0:Z.find(t=>String(t.value)===String(e.value)));else if(j){var o;n=String(null===(o=j[0])||void 0===o?void 0:o.value)===String(e.value)}return(0,l.jsx)("li",{onMouseLeave:es,onMouseEnter:e=>{e.stopPropagation(),Y.isDisplaced&&er({index:t,trigger:"mouse"})},ref:el===t?J:void 0,className:(0,s.Z)(g().optionsItem,{[g().targetOptionsItem]:el===t,[g().selectedOptionsItem]:n,[g().removeLineHeight]:y}),"data-qa":E,children:(0,l.jsxs)("button",{onMouseDown:()=>et(e),children:[a&&(0,l.jsx)("span",{className:(0,s.Z)(g().checkbox,{[g().active]:n}),children:n&&(0,l.jsx)(r.IconFdsCheckO,{className:g().marker})}),e.label]})},e.value)})})]}),a&&!!(null==Z?void 0:Z.length)&&(0,l.jsxs)("div",{className:g().popupActions,children:[(0,l.jsx)(i.zx,{size:"xs",iconLeft:(0,l.jsx)(r.IconTrash,{}),shape:"icon",variant:"secondary",onClick:ec}),(0,l.jsx)(i.zx,{size:"xs",onClick:en,label:"Применить (".concat(Z.length,")")})]})]})]})});w.displayName="Desktop";var S=n(13466),x=n(49689),y=n(50197),L=n.n(y);let k=(0,o.memo)(e=>{let{onSearch:t,onChange:n=()=>null,options:c,optionsEmptyText:u,multiple:a=!1,search:d=!1,defaultOpen:p=!1,autoFocus:m=!1,value:v,className:h,removeLineHeight:g,onClose:b,onOpen:C,popupDataQa:w,itemDataQa:y,...k}=e,I=(0,o.useRef)(!1),[E,N]=(0,o.useState)(()=>null!=v?v:null),[P,j]=(0,o.useState)(""),[T,O]=(0,o.useState)(!1),[A,M]=(0,o.useState)(m||p),[R,B]=(0,o.useState)(p),[U,D]=(0,o.useState)(null),[X,Z]=(0,o.useState)(()=>E?c.filter(e=>E.find(t=>String(t.value)===String(e.value))):null),[F,z]=(0,o.useState)(0),H=(0,o.useRef)(null),Y=(0,o.useRef)(null),V=(0,o.useRef)(null),G=(0,o.useMemo)(()=>A&&!!c.length,[A,c.length]),K=(0,o.useMemo)(()=>d&&P&&""!==P?c.filter(e=>-1!==String(e.label).toLocaleLowerCase().indexOf(P.toLocaleLowerCase())):c,[P,c,d]),W=(0,o.useCallback)(e=>{setTimeout(()=>M(t=>!e&&!t),300),O(t=>!e&&!t),B(t=>!e&&!t),R||(O(!1),M(!1),j("")),(null==V?void 0:V.current)&&a&&G&&z(V.current.scrollTop),e&&(null==b||b())},[R,a,G,b]),q=(0,o.useCallback)(()=>{setTimeout(()=>O(!0),600),M(!0),B(!0)},[]),J=(0,o.useCallback)(e=>{if(a)Z(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(!t)return[e];let l=t.findIndex(t=>String(t.label).toLocaleLowerCase()===String(e.label).toLocaleLowerCase());return l>=0?([...t.slice(0,l),...t.slice(l+1)].length||(N(null),D(null),Z(null),n(null)),[...t.slice(0,l),...t.slice(l+1)]):[...t,e]});else{let t=[],l=c.find(t=>String(t.value).trim().toLocaleLowerCase()===String(e.value).trim().toLocaleLowerCase());t=l?[l]:[];let o=c.findIndex(e=>{var n;return e.label.toLocaleLowerCase()===(null===(n=t[0])||void 0===n?void 0:n.label.toLocaleLowerCase())});D(o>=0?o:null),N([e]),Z([e]),n(v&&e.value===v[0].value?null:t),j(""),setTimeout(()=>W(!0),300)}},[W,a,n,c,v]),Q=(0,o.useCallback)(()=>{n(X),W(!0)},[W,n,X]),$=(0,o.useCallback)(()=>{N(null),D(null),z(0),Z(null),W(!0),n(null)},[W,n]);f({isMobile:!0,isOpenPopup:G,multiple:a,scrollValue:F,selectedItemIndex:U,container:V,element:Y});let ee=(0,o.useMemo)(()=>(null==X?void 0:X.length)&&!G?a?"":X[0].label:P,[X,P,a,G]),et=(0,o.useMemo)(()=>(null==X?void 0:X.length)?1===X.length?X[0].label:a?"Выбрано (".concat(X.length,")"):"":"",[a,X]),en=(0,o.useMemo)(()=>{if(!(null==X?void 0:X.length))return P;let{length:e}=X;return 1===e?X[0].label:a?"Выбрано (".concat(e,")"):G&&!P.length?X[0].label:P},[G,a,P,X]);return(0,o.useEffect)(()=>{I.current?(N(v),Z(v?c.filter(e=>v.find(t=>String(t.value)===String(e.value))):null)):I.current=!0},[c,v]),(0,o.useEffect)(()=>{G&&(null==C||C())},[G,C]),(0,o.useEffect)(()=>{null==t||t(P)},[P]),(0,l.jsxs)("div",{className:(0,s.Z)(L().select,h),children:[(0,l.jsx)("div",{className:(0,s.Z)(L().inputcontainer,L().inputButton),children:(0,l.jsx)(_,{readOnly:!d,addonAfter:(0,l.jsx)(r.IconFdsChevronDownO,{size:24,className:L().icon}),inputType:"button",inputClear:$,value:et,onClick:q,autoComplete:"off",type:"button",...k})}),G&&(0,l.jsx)(S.h,{children:(0,l.jsx)(x.j,{full:!0,className:L().popup,isOpen:R,onClose:()=>W(!0),children:(0,l.jsxs)("div",{className:L().window,"data-qa":w,children:[(0,l.jsx)("div",{className:L().safeAreaLine}),(0,l.jsx)("div",{className:(0,s.Z)(L().inputcontainer,L().inputPopup),children:(0,l.jsx)(_,{readOnly:!d,addonAfter:(0,l.jsx)("div",{className:L().icon,children:d?(0,l.jsx)(r.IconFdsSearchO,{size:18}):(0,l.jsx)(r.IconFdsChevronDownO,{size:24})}),onChange:e=>j(e.currentTarget.value),autoFocus:T,inputType:"select",inputClear:()=>j(""),value:ee,placeholder:en,onFocus:()=>O(!0),onClick:()=>!T&&O(!0),autoComplete:"off",...k})}),(0,l.jsxs)("div",{ref:V,className:L().content,children:[0===K.length&&(0,l.jsx)("div",{className:L().empty,children:u||"Нет совпадений"}),K.length>0&&(0,l.jsx)("ul",{className:(0,s.Z)(L().optionsList,{[L().multipleList]:a}),ref:H,children:K.map((e,t)=>{let n=!1;if(a)n=!!(null==X?void 0:X.find(t=>String(t.value)===String(e.value)));else if(E){var o;n=String(null===(o=E[0])||void 0===o?void 0:o.value)===String(e.value)}return(0,l.jsx)("li",{ref:U===t?Y:void 0,className:(0,s.Z)(L().optionsItem,{[L().selectedOptionsItem]:n,[L().removeLineHeight]:g}),"data-qa":y,children:(0,l.jsxs)("button",{onMouseDown:()=>J(e),children:[a&&(0,l.jsx)("span",{className:(0,s.Z)(L().checkbox,{[L().active]:n}),children:n&&(0,l.jsx)(r.IconFdsCheckO,{className:L().marker})}),(0,l.jsx)("p",{children:e.label})]})},e.value)})})]}),a&&!!(null==X?void 0:X.length)&&(0,l.jsxs)("div",{className:L().popupActions,children:[(0,l.jsx)(i.zx,{iconLeft:(0,l.jsx)(r.IconTrash,{}),shape:"icon",variant:"secondary",onClick:$}),(0,l.jsx)(i.zx,{onClick:Q,label:"Применить (".concat(X.length,")")})]})]})})})]})});k.displayName="Mobile";let I=(0,o.memo)(e=>{let{isMobile:t,...n}=e,[r,i]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{i(!0)},[]),r)?t?(0,l.jsx)(k,{...n}):(0,l.jsx)(w,{...n}):(0,l.jsx)(k,{...n})});I.displayName="UiSelect"},13466:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});var l=n(2265),o=n(54887);let r=e=>{let{children:t,id:n="portal-root"}=e,[r,i]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=document.getElementById(n);if(e){i(e);return}let t=document.createElement("div");return t.id=n,document.body.appendChild(t),i(t),()=>{document.body.removeChild(t)}},[n]),r?(0,o.createPortal)(t,r):null}},17868:function(e,t,n){"use strict";n.d(t,{o:function(){return o}});var l=n(2265);let o=e=>{let t=(0,l.useRef)(null),n=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{if(n.current===e)return;n.current=e;let l=t.current,o=window.innerWidth-document.documentElement.clientWidth;e&&o&&!document.body.style.top&&(window.prevScrollPosition=window.scrollY||window.pageYOffset),e&&o&&(document.documentElement.style.setProperty("overflow-y","scroll"),document.body.classList.toggle("scroll-disable-windows",!0),document.body.style.setProperty("width","calc(100vw - ".concat(o,"px)")),document.body.style.setProperty("top","-".concat(window.prevScrollPosition,"px"))),e&&!o&&(document.body.style.setProperty("overflow","hidden"),document.body.style.setProperty("height","100vw")),e&&l&&l.setAttribute("data-portal","");let r=document.querySelectorAll("[data-portal]").length>1;return e||r||(document.body.classList.toggle("scroll-disable-windows",!1),document.body.style.removeProperty("overflow"),document.body.style.removeProperty("height"),document.body.style.removeProperty("width"),document.body.style.removeProperty("top")),e||r||void 0===window.prevScrollPosition||(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0),!e&&l&&l.removeAttribute("data-portal"),()=>{document.body.classList.toggle("scroll-disable-windows",!1),document.body.style.removeProperty("overflow"),document.body.style.removeProperty("height"),void 0!==window.prevScrollPosition&&(window.scrollTo(0,window.prevScrollPosition),window.prevScrollPosition=void 0)}},[e]),t}},73564:function(e,t,n){"use strict";n.d(t,{b:function(){return r}});var l=n(2265),o=n(77493);let r=e=>{let{opened:t}=e,[n,r]=(0,l.useState)(!1),i=(0,l.useRef)(null),s=(0,l.useRef)(!1);return(0,l.useEffect)(()=>(t&&!s.current?(s.current=!0,r(!0)):!t&&s.current&&(i.current=setTimeout(()=>{s.current=!1,r(!1)},o.z)),()=>{i.current&&clearTimeout(i.current)}),[t]),{mounted:n}}},24269:function(e,t,n){"use strict";var l,o;n.d(t,{$:function(){return l}}),(o=l||(l={})).bank="bank",o.mfo="mfo",o.insurance="insurance"},51479:function(e,t,n){"use strict";n.d(t,{D:function(){return s},i:function(){return o}});var l,o,r=n(89487),i=n(54550);(l=o||(o={})).icon="icon",l.chip="chip",l.accordion="accordion",l.button="button",l.checkbox="checkbox",l.radio="radio",l.select="select",l.toggle="toggle",l.tooltip="tooltip",l.link="link",l.banner="banner",l.tag="tag",l.date="date",l.field="field",l.offer="offer",l.tab="tab",l.submit_button="submit_button",l.popup="popup",l.block="block";let s=e=>{let{eventCategory:t,eventActionType:n,eventActionText:l="",eventLabel:o}=e,s={event:"data-event",eventCategory:t,eventAction:{icon:"click_icon_",chip:"click_chip_",accordion:"show_acc_",button:"click_button_",checkbox:"click_check_",radio:"click_radio_",select:"click_sel_",toggle:"click_togg_",tooltip:"click_tip_",link:"click_link_",banner:"click_bnr_",tag:"click_tag_",date:"input_date_",field:"input_field_",offer:"click_offer_",tab:"click_tab_",submit_button:"form_button_",popup:"show_pop_up_",block:"click_block_"}[n]+(0,i.b)(l)};void 0!==o&&(s.eventLabel=(0,i.b)("string"==typeof o?o:o.toString())),(0,r.l)(s)}},89487:function(e,t,n){"use strict";n.d(t,{l:function(){return o}});var l=n(30631);let o=(e,t)=>{let n=sessionStorage.getItem("pushedEvents"),o=n?JSON.parse(n):[];e.event||(e.event="data-event"),"string"==typeof e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_"));let r=o.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!r){if(t){let t={...e};t.url=window.location.pathname,o.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(o))}(0,l.AB)(e)}}},54550:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});let l={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},o=e=>e.replace(/[а-яё]/gi,e=>{let t=e.toLowerCase();return t in l?l[t]:e}).replaceAll(" ","_").replaceAll("\xa0","_")},78582:function(e){e.exports={overlay:"ClickOutside_overlay__YQi9L",open:"ClickOutside_open__bmtsz",fade:"ClickOutside_fade__io1xj",close:"ClickOutside_close__AC078","fade-out":"ClickOutside_fade-out__wJ_pJ"}},15397:function(e){e.exports={inputRoot:"Input_inputRoot__OpQtf",wrapperInput:"Input_wrapperInput__W_Fgs",big:"Input_big__6tH9J",middle:"Input_middle__EejLc",hasValue:"Input_hasValue__vNnNi",label:"Input_label__appbZ",addoneAfter:"Input_addoneAfter__SKvFS",addoneBefore:"Input_addoneBefore__c2BkI",gray:"Input_gray__3TOAb",success:"Input_success__qKGYc",error:"Input_error__dlwf5",white:"Input_white__QAtmB",isFocused:"Input_isFocused__ln1w8",disabled:"Input_disabled__dXsOf",readOnly:"Input_readOnly__VY57j",withRange:"Input_withRange__juSxl",buttonClear:"Input_buttonClear__jgpiV",deleteIcon:"Input_deleteIcon__imUCt",inputContainer:"Input_inputContainer__WDbYX",cover:"Input_cover__peS2N",input:"Input_input__ZcnKW",inputCenter:"Input_inputCenter__Vd7jO",maskPlaceholder:"Input_maskPlaceholder__jH41P",maskPlaceholderCenter:"Input_maskPlaceholderCenter__I7p_d",maskPlaceholderHide:"Input_maskPlaceholderHide__BZ0kM",controlContainer:"Input_controlContainer__qWVWN",message:"Input_message__g6rjt",successMessage:"Input_successMessage__o7JXJ",errorMessage:"Input_errorMessage__nen8r",defaultMessage:"Input_defaultMessage__P9LQz",range:"Input_range___mksh"}},16565:function(e){e.exports={mobilePopup:"MobilePopup_mobilePopup__NCFCK",content:"MobilePopup_content__B5iF0",contentFull:"MobilePopup_contentFull__DBrvo",contentLine:"MobilePopup_contentLine__eykLy",contentContainer:"MobilePopup_contentContainer___ZbOq",min:"MobilePopup_min__D0Hml",contentTransition:"MobilePopup_contentTransition__7_kGL",contentTransitionOpen:"MobilePopup_contentTransitionOpen__GDGpr",title:"MobilePopup_title__IEYZk",closeContainer:"MobilePopup_closeContainer__HSRUL",closeButton:"MobilePopup_closeButton__Bse_M",smallContentContainer:"MobilePopup_smallContentContainer__8jHeS"}},53582:function(e){e.exports={footer:"MobileModalFooter_footer__5dRCK",footerWithoutShadow:"MobileModalFooter_footerWithoutShadow__zHKVO"}},38019:function(e){e.exports={select:"Select_select__0ooqU",inputcontainer:"Select_inputcontainer__BuU_G",popup:"Select_popup__9utOI",popupContent:"Select_popupContent__b24XJ",emptyList:"Select_emptyList__ZelL1",optionsList:"Select_optionsList__UYSue",optionsItem:"Select_optionsItem__ZoWXt",removeLineHeight:"Select_removeLineHeight__kS_JM",checkbox:"Select_checkbox__ktQ17",active:"Select_active__vgO83",marker:"Select_marker__oTsN9",targetOptionsItem:"Select_targetOptionsItem__uKptc",selectedOptionsItem:"Select_selectedOptionsItem__uJeIB",icon:"Select_icon__YG2wf",popupActions:"Select_popupActions__KpN4D"}},50197:function(e){e.exports={select:"Select_select__wUGZD",popup:"Select_popup__2HKJ3",window:"Select_window__WitRz",safeAreaLine:"Select_safeAreaLine__qbM3u",inputcontainer:"Select_inputcontainer__Rodfv",inputPopup:"Select_inputPopup__SPh8Y",inputButton:"Select_inputButton__mq_GY",content:"Select_content__ygf94",empty:"Select_empty__5BzIj",optionsList:"Select_optionsList__XCV9b",optionsItem:"Select_optionsItem__yasBX",checkbox:"Select_checkbox__82QZr",active:"Select_active__zYX1a",marker:"Select_marker__xyw_M",multipleList:"Select_multipleList__uv_Uj",selectedOptionsItem:"Select_selectedOptionsItem__wHDr_",popupActions:"Select_popupActions__sF73Z"}}}]);