(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8508],{59306:function(e,t,n){"use strict";n.d(t,{t:function(){return s}});var l=n(98645),o=n(84004),r=n(97916);let i=(e,t)=>{let n="dev"===e.NEXT_PUBLIC_VERSION,l=e.NEXT_PUBLIC_CRAML_DIRTY_FEEDBACK,o=e.NEXT_PUBLIC_HEADLESS_CMS,i=e.NEXT_PUBLIC_API_URL,s=e.NEXT_PUBLIC_GEO_CONTENT,c=e.NEXT_PUBLIC_PAGECONTENT_API,u=e.NEXT_PUBLIC_BASE_URL,{isHeadlessCMS:a,isGeo:d,isCramlDirty:p,isPageContent:_,isProxyOtherService:v}=t,m=n?"":"/".concat(r.k.APP_PREFIX),f=a?"headless":"";return(d&&(f="geo"),v)?v?u:p?l:a?o:d?s:_?c:i:"".concat(m,"/api/proxy").concat(f)},s=async e=>{let{url:t,options:n={},config:r}=e,s=await (0,o.S)(),c=i(s,n),u=((null==r?void 0:r.method)||"GET").toUpperCase();try{let e=performance.now(),n=await (0,l.Wg)(t,{baseURL:c,method:u,headers:{...null==r?void 0:r.headers},...r,next:{revalidate:Number(s.REVALIDATE_REQUEST_VALUE)||300}}),o=performance.now()-e;return console.log("Запрос ".concat(c).concat(t," занял ").concat(o.toFixed(2)," ms")),{data:n,error:null}}catch(e){return console.error("Ошибка запроса","".concat(e,": ").concat(c).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(59306);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(61994),r=n(2265),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,r.useRef)(null),d=(0,r.useCallback)(()=>{t&&(a.current=setTimeout(()=>{t()},u))},[u,t]),p=(0,r.useCallback)(e=>{"Escape"===e.key&&d()},[d]);return(0,r.useEffect)(()=>(s&&window.addEventListener("keydown",p),()=>{a.current&&clearTimeout(a.current),window.removeEventListener("keydown",p)}),[s,p]),(0,l.jsx)("div",{className:(0,o.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 m}});var l=n(57437),o=n(61994),r=n(2265),i=n(66153),s=n(53582),c=n.n(s);let u=e=>{let{footer:t,isSmallPopup:n=!1,footerClassName:r}=e;return(0,l.jsx)("div",{className:(0,o.Z)(c().footer,n&&c().footerWithoutShadow,r),children:"function"==typeof t?t():t})};var a=n(17868),d=n(73564),p=n(16565),_=n.n(p);let v=e=>{let{children:t,footer:n,isOpen:s,isSmallPopup:c,onClose:d,hasCloseButton:p=!0,full:v,touchDistance:m=100,withDisabledScroll:f=!0,contentClassName:h,className:g,title:b,closeButton:w,footerClassName:S}=e,[y,k]=(0,r.useState)(!1),[C,x]=(0,r.useState)(!1),[L,I]=(0,r.useState)(!0),[E,j]=(0,r.useState)("120%"),P=(0,r.useRef)(null),N=(0,r.useRef)(0),O=(0,r.useRef)(!1),R=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(O.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),j("".concat(n,"px")),N.current=n}},T=()=>{O.current&&(N.current>m&&d?null==d||d():j("0"),I(!0),O.current=!1),window.removeEventListener("touchmove",R),window.removeEventListener("touchend",T)};return(0,r.useEffect)(()=>{s&&setTimeout(()=>{k(!0),x(!0),j("0")},100),!s&&C&&(j("120%"),k(!1),x(!1))},[C,s]),(0,a.o)(s&&f),(0,l.jsxs)("div",{"data-portal":!0,className:(0,o.Z)(_().mobilePopup,C&&_().mobilePopupOpen,g),children:[(0,l.jsx)(i.L,{onClose:()=>{s&&(null==d||d())},onToucheMove:()=>{s&&(k(!1),window.addEventListener("touchmove",R),window.addEventListener("touchend",T))},isOpen:s,delay:0}),(0,l.jsxs)("div",{className:(0,o.Z)(_().content,v&&_().contentFull,L&&_().contentTransition,L&&y&&_().contentTransitionOpen),ref:P,style:{transform:"translateY(".concat(E,")")},children:[(0,l.jsx)("div",{className:_().contentLine}),(0,l.jsxs)("div",{className:(0,o.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?w?"function"==typeof w?w():w:(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:S,isSmallPopup:c,footer:n})]})]})},m=e=>{let{children:t,isSmallPopup:n=!1,isOpen:o=!1,...r}=e,{mounted:i}=(0,d.b)({opened:o});return i?(0,l.jsx)(v,{isSmallPopup:n,isOpen:o,...r,children:t}):null};m.displayName="UiMobilePopup"},30618:function(e,t,n){"use strict";n.d(t,{H:function(){return L}});var l=n(57437),o=n(2265),r=n(80684),i=n(75461),s=n(61994);let c=(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 u=n(15397),a=n.n(u);let d="Обязательное поле",p=(0,o.memo)(e=>{let{onChange:t=()=>null,onFocus:n=()=>null,onBlur:i=()=>null,onKeyDown:u=()=>null,inputClear:p=()=>null,label:_,allowClear:v=!1,addonBefore:m,addonAfter:f,state:h,appearance:g="gray",inputType:b,required:w=!1,infoMessage:S,message:y,innerRef:k=null,disabled:C,id:x,placeholder:L,autoFocus:I=!1,value:E,readOnly:j,className:P,onlyRange:N,size:O="small",maskPlaceholder:R,...T}=e,[A,M]=(0,o.useState)(I);(0,o.useEffect)(()=>M(I),[I]);let D=(0,o.useRef)(null),B=!w||(E||"error"!==h)&&h?y:d,Z=(null==S?void 0:S.length)&&!w||(null==S?void 0:S.length)&&E?S:d;return(0,l.jsxs)("div",{className:(0,s.Z)(a().inputRoot,P),children:[(0,l.jsxs)("label",{htmlFor:x,className:(0,s.Z)(a().wrapperInput,a()[g],a()[O],{[a().isFocused]:A&&!C,[a().hasValue]:A||!!E||!!L||R,[a().disabled]:C,[a().success]:"success"===h,[a().error]:"error"===h,[a().readOnly]:j}),children:[m&&(0,l.jsx)("div",{className:(0,s.Z)(a().controlContainer,a().addoneBefore),children:m}),(0,l.jsxs)("div",{className:(0,s.Z)(a().inputContainer,{[a().cover]:"button"===b}),children:[R&&(0,l.jsxs)("div",{className:(0,s.Z)(a().maskPlaceholder,!L&&!_&&a().maskPlaceholderCenter),children:[E&&(0,l.jsx)("span",{className:a().maskPlaceholderHide,children:E}),R.slice(String(null!=E?E:"").length)]}),(0,l.jsx)("input",{id:x,ref:e=>{D.current=e,k&&e&&(k.current=e)},value:null!=E?E:"",disabled:C||N,autoFocus:"button"!==b&&A,readOnly:j,onFocus:e=>{A||(M(!0),n(e))},onBlur:e=>{A&&(M(!1),i(e))},onChange:e=>{t(e)},onKeyDown:e=>{u&&u(e)},className:(0,s.Z)(a().input,!_&&a().inputCenter),placeholder:R?void 0:L,...T}),(null==_?void 0:_.length)?(0,l.jsx)("span",{className:(0,s.Z)(a().label,"error"===h&&a().error),children:_}):null]}),v&&(!!E||"string"==typeof E&&!!E.trim().length)&&(0,l.jsx)("button",{type:"button",className:(0,s.Z)(a().controlContainer,a().buttonClear),onClick:e=>{e.preventDefault(),D.current&&(c(D.current,""),"input"===b&&D.current.focus()),p()},children:(0,l.jsx)(r.IconFdsCloseO,{size:20})}),f&&(0,l.jsx)("div",{className:(0,s.Z)(a().controlContainer,a().addoneAfter),children:f})]}),(!!(null==y?void 0:y.length)&&h||w||!!(null==S?void 0:S.length))&&(0,l.jsx)("div",{className:(0,s.Z)(a().message,{[a().successMessage]:"success"===h,[a().errorMessage]:"error"===h,[a().defaultMessage]:w&&!h||!w&&!h&&!!(null==S?void 0:S.length)}),children:h?B:Z})]})});p.displayName="UiInput";let _=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 v=(0,o.useCallback)(()=>{if(!t){i();return}null!==d&&(s(l[d]),c())},[t,l,d,s,c,i]),m=(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":m();break;case"Enter":v();break;case"ArrowDown":t.preventDefault(),f();break;case"ArrowUp":t.preventDefault(),h()}}}},m=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 f=n(38019),h=n.n(f);let g="calc(100% + ".concat(8,"px)"),b=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:f=!1,autoFocus:w=!1,value:S,popupHeight:y=312,className:k,removeLineHeight:C,onClose:x,onOpen:L,popupDataQa:I,itemDataQa:E,...j}=e,P=(0,o.useRef)(!1),[N,O]=(0,o.useState)(()=>null!=S?S:null),[R,T]=(0,o.useState)(""),[A,M]=(0,o.useState)(w||f),[D,B]=(0,o.useState)(!1),[Z,F]=(0,o.useState)(null),[U,X]=(0,o.useState)(()=>N?c.filter(e=>N.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}),W=A&&!!c.length,K=(0,o.useCallback)(e=>{D||(T(""),M(!1),null==x||x()),(null==e?void 0:e.current)&&a&&W&&H(e.current.scrollTop)},[D,W,a,x]),q=(0,o.useRef)(null),G=(0,o.useRef)(null),J=(0,o.useRef)(null),Q=_(K),$=(0,o.useMemo)(()=>d&&R&&""!==R?c.filter(e=>-1!==String(e.label).toLocaleLowerCase().indexOf(R.toLocaleLowerCase())):c,[R,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}),M(t=>!e&&!t),B(t=>!e&&!t),e){var t;null===(t=q.current)||void 0===t||t.blur()}(null==Q?void 0:Q.current)&&a&&W&&H(Q.current.scrollTop),e&&(null==x||x())},[Q,a,W,x]),et=(0,o.useCallback)(e=>{if(a)X(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||(O(null),F(null),X(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())});F(o>=0?o:null),O([e]),X([e]),n(S&&e.value===S[0].value?null:t),ee(!0),T("")}},[ee,a,n,c,S]),en=(0,o.useCallback)(()=>{n(U),ee(!0)},[ee,n,U]),{pointedItemIndex:el,pointedTrigger:eo,setPointedItem:er,handleKeyNavigation:ei}=v({isOpenPopup:W,multiple:a,optionsList:$,defaultPointedIndex:Z,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)(()=>{O(null),F(null),er({index:null,trigger:"key"}),H(0),X(null),ee(!0),n(null)},[ee,n,er]);m({isOpenPopup:W,multiple:a,scrollValue:z,selectedItemIndex:Z,pointedItemIndex:el,pointedTrigger:eo,container:Q,element:J});let eu=(0,o.useMemo)(()=>(null==U?void 0:U.length)&&!W?a?"":U[0].label:R,[U,R,a,W]),ea=(0,o.useMemo)(()=>{if(!(null==U?void 0:U.length))return R;let{length:e}=U;return a?1===e?U[0].label:"Выбрано (".concat(e,")"):W&&!R.length?U[0].label:R},[W,a,R,U]),ed={readOnly:!d,addonAfter:(0,l.jsx)("div",{className:(0,s.Z)(h().icon,{[h().iconRotate]:!d&&A}),children:A?(0,l.jsx)(r.IconFdsSearchO,{size:18}):(0,l.jsx)(r.IconFdsChevronDownO,{size:24})}),onChange:e=>{T(e.currentTarget.value)},autoFocus:A,inputType:"select",inputClear:()=>a?T(""):ec(),value:eu,placeholder:ea,onFocus:()=>d&&M(!0),onClick:()=>{d?A||M(!0):M(e=>!e)},autoComplete:"off",innerRef:q,...j};(0,o.useEffect)(()=>{P.current?(O(S),X(S?c.filter(e=>S.find(t=>String(t.value)===String(e.value))):null)):P.current=!0},[c,S]);let[ep,e_]=(0,o.useState)(0),[ev,em]=(0,o.useState)(null),ef=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=()=>{b(()=>e_(window.scrollY))};return W?window.addEventListener("scroll",e,!1):window.removeEventListener("scroll",e,!1),()=>window.removeEventListener("scroll",e,!1)},[W]),(0,o.useEffect)(()=>{if(!ef.current||!q.current)return;let e=q.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=g,em(l)},[W,ep]);let eh=ev||{top:g,left:"0",right:"0"};return(0,o.useEffect)(()=>{W&&(null==L||L())},[W,L]),(0,o.useEffect)(()=>{null==t||t(R)},[R]),(0,l.jsxs)("div",{className:(0,s.Z)(h().select,k),onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),onKeyDown:e=>ei(e),children:[(0,l.jsx)("div",{className:h().inputcontainer,children:(0,l.jsx)(p,{...ed})}),W&&(0,l.jsxs)("div",{className:h().popup,ref:ef,style:{maxHeight:"".concat(y,"px"),...eh},"data-qa":I,children:[(0,l.jsxs)("div",{ref:Q,className:h().popupContent,style:{maxHeight:"".concat(y-(a?100:20),"px")},children:[0===$.length&&(0,l.jsx)("div",{className:h().emptyList,children:u||"Нет совпадений"}),$.length>0&&(0,l.jsx)("ul",{className:h().optionsList,ref:G,children:$.map((e,t)=>{let n=!1;if(a)n=!!(null==U?void 0:U.find(t=>String(t.value)===String(e.value)));else if(N){var o;n=String(null===(o=N[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)(h().optionsItem,{[h().targetOptionsItem]:el===t,[h().selectedOptionsItem]:n,[h().removeLineHeight]:C}),"data-qa":E,children:(0,l.jsxs)("button",{onMouseDown:()=>et(e),children:[a&&(0,l.jsx)("span",{className:(0,s.Z)(h().checkbox,{[h().active]:n}),children:n&&(0,l.jsx)(r.IconFdsCheckO,{className:h().marker})}),e.label]})},e.value)})})]}),a&&!!(null==U?void 0:U.length)&&(0,l.jsxs)("div",{className:h().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(U.length,")")})]})]})]})});w.displayName="Desktop";var S=n(13466),y=n(49689),k=n(50197),C=n.n(k);let x=(0,o.memo)(e=>{let{onSearch:t,onChange:n=()=>null,options:c,optionsEmptyText:u,multiple:a=!1,search:d=!1,defaultOpen:_=!1,autoFocus:v=!1,value:f,className:h,removeLineHeight:g,onClose:b,onOpen:w,popupDataQa:k,itemDataQa:x,...L}=e,I=(0,o.useRef)(!1),[E,j]=(0,o.useState)(()=>null!=f?f:null),[P,N]=(0,o.useState)(""),[O,R]=(0,o.useState)(!1),[T,A]=(0,o.useState)(v||_),[M,D]=(0,o.useState)(_),[B,Z]=(0,o.useState)(null),[F,U]=(0,o.useState)(()=>E?c.filter(e=>E.find(t=>String(t.value)===String(e.value))):null),[X,z]=(0,o.useState)(0),H=(0,o.useRef)(null),Y=(0,o.useRef)(null),V=(0,o.useRef)(null),W=(0,o.useMemo)(()=>T&&!!c.length,[T,c.length]),K=(0,o.useMemo)(()=>d&&P&&""!==P?c.filter(e=>-1!==String(e.label).toLocaleLowerCase().indexOf(P.toLocaleLowerCase())):c,[P,c,d]),q=(0,o.useCallback)(e=>{setTimeout(()=>A(t=>!e&&!t),300),R(t=>!e&&!t),D(t=>!e&&!t),M||(R(!1),A(!1),N("")),(null==V?void 0:V.current)&&a&&W&&z(V.current.scrollTop),e&&(null==b||b())},[M,a,W,b]),G=(0,o.useCallback)(()=>{setTimeout(()=>R(!0),600),A(!0),D(!0)},[]),J=(0,o.useCallback)(e=>{if(a)U(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||(j(null),Z(null),U(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())});Z(o>=0?o:null),j([e]),U([e]),n(f&&e.value===f[0].value?null:t),N(""),setTimeout(()=>q(!0),300)}},[q,a,n,c,f]),Q=(0,o.useCallback)(()=>{n(F),q(!0)},[q,n,F]),$=(0,o.useCallback)(()=>{j(null),Z(null),z(0),U(null),q(!0),n(null)},[q,n]);m({isMobile:!0,isOpenPopup:W,multiple:a,scrollValue:X,selectedItemIndex:B,container:V,element:Y});let ee=(0,o.useMemo)(()=>(null==F?void 0:F.length)&&!W?a?"":F[0].label:P,[F,P,a,W]),et=(0,o.useMemo)(()=>(null==F?void 0:F.length)?1===F.length?F[0].label:a?"Выбрано (".concat(F.length,")"):"":"",[a,F]),en=(0,o.useMemo)(()=>{if(!(null==F?void 0:F.length))return P;let{length:e}=F;return 1===e?F[0].label:a?"Выбрано (".concat(e,")"):W&&!P.length?F[0].label:P},[W,a,P,F]);return(0,o.useEffect)(()=>{I.current?(j(f),U(f?c.filter(e=>f.find(t=>String(t.value)===String(e.value))):null)):I.current=!0},[c,f]),(0,o.useEffect)(()=>{W&&(null==w||w())},[W,w]),(0,o.useEffect)(()=>{null==t||t(P)},[P]),(0,l.jsxs)("div",{className:(0,s.Z)(C().select,h),children:[(0,l.jsx)("div",{className:(0,s.Z)(C().inputcontainer,C().inputButton),children:(0,l.jsx)(p,{readOnly:!d,addonAfter:(0,l.jsx)(r.IconFdsChevronDownO,{size:24,className:C().icon}),inputType:"button",inputClear:$,value:et,onClick:G,autoComplete:"off",type:"button",...L})}),W&&(0,l.jsx)(S.h,{children:(0,l.jsx)(y.j,{full:!0,className:C().popup,isOpen:M,onClose:()=>q(!0),children:(0,l.jsxs)("div",{className:C().window,"data-qa":k,children:[(0,l.jsx)("div",{className:C().safeAreaLine}),(0,l.jsx)("div",{className:(0,s.Z)(C().inputcontainer,C().inputPopup),children:(0,l.jsx)(p,{readOnly:!d,addonAfter:(0,l.jsx)("div",{className:C().icon,children:d?(0,l.jsx)(r.IconFdsSearchO,{size:18}):(0,l.jsx)(r.IconFdsChevronDownO,{size:24})}),onChange:e=>N(e.currentTarget.value),autoFocus:O,inputType:"select",inputClear:()=>N(""),value:ee,placeholder:en,onFocus:()=>R(!0),onClick:()=>!O&&R(!0),autoComplete:"off",...L})}),(0,l.jsxs)("div",{ref:V,className:C().content,children:[0===K.length&&(0,l.jsx)("div",{className:C().empty,children:u||"Нет совпадений"}),K.length>0&&(0,l.jsx)("ul",{className:(0,s.Z)(C().optionsList,{[C().multipleList]:a}),ref:H,children:K.map((e,t)=>{let n=!1;if(a)n=!!(null==F?void 0:F.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:B===t?Y:void 0,className:(0,s.Z)(C().optionsItem,{[C().selectedOptionsItem]:n,[C().removeLineHeight]:g}),"data-qa":x,children:(0,l.jsxs)("button",{onMouseDown:()=>J(e),children:[a&&(0,l.jsx)("span",{className:(0,s.Z)(C().checkbox,{[C().active]:n}),children:n&&(0,l.jsx)(r.IconFdsCheckO,{className:C().marker})}),(0,l.jsx)("p",{children:e.label})]})},e.value)})})]}),a&&!!(null==F?void 0:F.length)&&(0,l.jsxs)("div",{className:C().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(F.length,")")})]})]})})})]})});x.displayName="Mobile";let L=(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)(x,{...n}):(0,l.jsx)(w,{...n}):(0,l.jsx)(x,{...n})});L.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"},84004:function(e,t,n){"use strict";n.d(t,{S:function(){return s}});var l=n(97916),o=n(40257);let r={};o.env.NEXT_PUBLIC_BASE_URL;let i="dev"===o.env.NEXT_PUBLIC_VERSION;async function s(){if(Object.keys(r).length>0)return r;let e=i?"":"/".concat(l.k.APP_PREFIX),t=await fetch("".concat(e,"/api/env"),{cache:"no-store"});return r=await t.json()}},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"}},97916:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var l,o=n(40257);let r={APP_PREFIX:"directory",APP_VERSION:null!==(l=o.env.APP_VERSION)&&void 0!==l?l:String(Math.random()).slice(2),REDIS_PORT:Number(o.env.REDIS_PORT),REDIS_HOST:o.env.REDIS_HOST,REDIS_PASSWORD:o.env.REDIS_PASSWORD,CACHE_TTL:Number(o.env.REDIS_TTL)||300}}}]);