(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8508],{6471:function(e,t,n){"use strict";var l,o=n(40257);let r="/directory",i={PORT:o.env.PORT||3e3,HOSTNAME:o.env.HOSTNAME||"localhost",APP_VERSION:null!==(l=o.env.APP_VERSION)&&void 0!==l?l:String(Math.random()).slice(2),REDIS_PORT:o.env.REDIS_PORT||"63739",REDIS_HOST:o.env.REDIS_HOST||"localhost",REDIS_PASSWORD:o.env.REDIS_PASSWORD,CACHE_TTL:o.env.REDIS_TTL||86400};e.exports={APP_PREFIX:r,PREFIX:"",WHITELIST:["".concat(r,"/_next"),"".concat(r,"/api"),"/_next","/api","/favicon.ico","/.well-known"],PAGES_PRELOADING:["/","".concat("","/banki"),"".concat("","/adresa"),"".concat("","/mfo"),"".concat("","/otzyvy"),"".concat("","/strahovanie_kompanija"),"".concat("","/vyrazit_mnenie"),"".concat("","/polzovatelskij_rejting_bankov")],SERVER_CONFIG:i}},59306:function(e,t,n){"use strict";n.d(t,{t9:function(){return _}});var l=n(98645),o=n(84004),r=n(6471),i=n(96434).Buffer;let s=new Map,c=(e,t,n,l)=>{let o="";return null!=l&&(o="string"==typeof l?l:JSON.stringify(l)),"".concat(n,"|").concat(e).concat(t,"|").concat(o)},a=e=>!0!==e,u=(e,t)=>{let n="dev"===e.NEXT_PUBLIC_VERSION,l=e.NEXT_PUBLIC_SKIP_PROXY,o=e.NEXT_PUBLIC_COMMON_BLOCKS_SERVICE_URL,i=e.NEXT_PUBLIC_CRAML_DIRTY_FEEDBACK,s=e.NEXT_PUBLIC_BFF_API_URL,c=e.NEXT_PUBLIC_HEADLESS_CMS,u=e.NEXT_PUBLIC_NEW_API_URL,d=e.NEXT_PUBLIC_BASE_URL;e.NEXT_PUBLIC_API_URL;let _=e.NEXT_PUBLIC_GEO_CONTENT,{isNew:p,isBFF:v,isCommonBlocks:f,isHeadlessCMS:m,isGeo:h,isCramlDirty:g,isInvestment:b}=t,S=n?"":r.APP_PREFIX,w=v?"bff":"";return(h?w="geo":p&&(w="new"),a("true"===l))?"".concat(S,"/api/proxy").concat(w):g?i:f?o:v?s:m?c:p?u:h?_:b?e.NEXT_PUBLIC_INVESTMENT_API:d},d=(e,t)=>{let n=e.COMMON_BLOCKS_SERVICE_USER_NAME,l=e.NEXT_PUBLIC_NEW_USER_NAME,o=e.NEXT_PUBLIC_USER_NAME,r=e.COMMON_BLOCKS_SERVICE_USER_PASSWORD,s=e.NEXT_PUBLIC_NEW_PASSWORD,c=e.NEXT_PUBLIC_PASSWORD,{isCommonBlocks:a,isNew:u,isHeadlessCMS:d}=t,_={common:{userName:n,password:r},new:{userName:l,password:s},default:{userName:o,password:c}},p=_.default;return(a||d)&&(p=_.common),u&&(p=_.new),"Basic ".concat(i.from("".concat(p.userName,":").concat(p.password)).toString("base64"))},_=async e=>{let{url:t,options:n={},config:r}=e,i=await (0,o.S)(),a="dev"===i.NEXT_PUBLIC_VERSION,{isNew:_}=n,p=u(i,n),v=((null==r?void 0:r.method)||"GET").toUpperCase(),f=c(p,t,v,null==r?void 0:r.body),m=s.get(f);if(m)return m;let h=(async()=>{try{let e=performance.now(),o=await (0,l.Wg)(t,{baseURL:p,method:v,headers:{...null==r?void 0:r.headers,Authorization:d(i,n),..._?{"X-Gravitee-Api-Key":i.NEXT_PUBLIC_NEW_API_KEY}:{}},...r,next:{revalidate:Number(i.REVALIDATE_REQUEST_VALUE)||300}}),s=performance.now()-e;return console.log("Запрос ".concat(p).concat(t," занял ").concat(s.toFixed(2)," ms")),{data:o,error:null}}catch(e){return a&&console.error("Ошибка запроса","".concat(e,": ").concat(p).concat(t)),{data:null,error:e||"Unknown error"}}})();s.set(f,h);try{return await h}finally{s.delete(f)}}},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.t9)({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 a}});var l=n(57437),o=n(61994),r=n(2265),i=n(77493),s=n(78582),c=n.n(s);let a=e=>{let{onClose:t,onToucheMove:n,isOpen:s,delay:a=i.z}=e,u=(0,r.useRef)(null),d=(0,r.useCallback)(()=>{t&&(u.current=setTimeout(()=>{t()},a))},[a,t]),_=(0,r.useCallback)(e=>{"Escape"===e.key&&d()},[d]);return(0,r.useEffect)(()=>(s&&window.addEventListener("keydown",_),()=>{u.current&&clearTimeout(u.current),window.removeEventListener("keydown",_)}),[s,_]),(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 f}});var l=n(57437),o=n(61994),r=n(2265),i=n(17868),s=n(73564),c=n(66153),a=n(53582),u=n.n(a);let d=e=>{let{footer:t,isSmallPopup:n=!1,footerClassName:r}=e;return(0,l.jsx)("div",{className:(0,o.Z)(u().footer,n&&u().footerWithoutShadow,r),children:"function"==typeof t?t():t})};var _=n(16565),p=n.n(_);let v=e=>{let{children:t,footer:n,isOpen:s,isSmallPopup:a,onClose:u,hasCloseButton:_=!0,full:v,touchDistance:f=100,withDisabledScroll:m=!0,contentClassName:h,className:g,title:b,closeButton:S,footerClassName:w}=e,[C,y]=(0,r.useState)(!1),[k,x]=(0,r.useState)(!1),[L,I]=(0,r.useState)(!0),[E,N]=(0,r.useState)("120%"),P=(0,r.useRef)(null),j=(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),N("".concat(n,"px")),j.current=n}},T=()=>{O.current&&(j.current>f&&u?null==u||u():N("0"),I(!0),O.current=!1),window.removeEventListener("touchmove",R),window.removeEventListener("touchend",T)};return(0,r.useEffect)(()=>{s&&setTimeout(()=>{y(!0),x(!0),N("0")},100),!s&&k&&(N("120%"),y(!1),x(!1))},[k,s]),(0,i.o)(s&&m),(0,l.jsxs)("div",{"data-portal":!0,className:(0,o.Z)(p().mobilePopup,k&&p().mobilePopupOpen,g),children:[(0,l.jsx)(c.L,{onClose:()=>{s&&(null==u||u())},onToucheMove:()=>{s&&(y(!1),window.addEventListener("touchmove",R),window.addEventListener("touchend",T))},isOpen:s,delay:0}),(0,l.jsxs)("div",{className:(0,o.Z)(p().content,v&&p().contentFull,L&&p().contentTransition,L&&C&&p().contentTransitionOpen),ref:P,style:{transform:"translateY(".concat(E,")")},children:[(0,l.jsx)("div",{className:p().contentLine}),(0,l.jsxs)("div",{className:(0,o.Z)(p().contentContainer,a&&p().smallContentContainer,{[p().min]:!b&&!_},h),children:[!!b&&(0,l.jsx)("div",{className:p().title,children:b}),_?(0,l.jsx)("div",{className:p().closeContainer,children:(0,l.jsx)("div",{className:p().closeContainer,children:_?S?"function"==typeof S?S():S:(0,l.jsx)("button",{onClick:u,className:p().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)(d,{footerClassName:w,isSmallPopup:a,footer:n})]})]})},f=e=>{let{children:t,isSmallPopup:n=!1,isOpen:o=!1,...r}=e,{mounted:i}=(0,s.b)({opened:o});return i?(0,l.jsx)(v,{isSmallPopup:n,isOpen:o,...r,children:t}):null};f.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 a=n(15397),u=n.n(a);let d="Обязательное поле",_=(0,o.memo)(e=>{let{onChange:t=()=>null,onFocus:n=()=>null,onBlur:i=()=>null,onKeyDown:a=()=>null,inputClear:_=()=>null,label:p,allowClear:v=!1,addonBefore:f,addonAfter:m,state:h,appearance:g="gray",inputType:b,required:S=!1,infoMessage:w,message:C,innerRef:y=null,disabled:k,id:x,placeholder:L,autoFocus:I=!1,value:E,readOnly:N,className:P,onlyRange:j,size:O="small",maskPlaceholder:R,...T}=e,[A,M]=(0,o.useState)(I);(0,o.useEffect)(()=>M(I),[I]);let B=(0,o.useRef)(null),D=!S||(E||"error"!==h)&&h?C:d,U=(null==w?void 0:w.length)&&!S||(null==w?void 0:w.length)&&E?w:d;return(0,l.jsxs)("div",{className:(0,s.Z)(u().inputRoot,P),children:[(0,l.jsxs)("label",{htmlFor:x,className:(0,s.Z)(u().wrapperInput,u()[g],u()[O],{[u().isFocused]:A&&!k,[u().hasValue]:A||!!E||!!L||R,[u().disabled]:k,[u().success]:"success"===h,[u().error]:"error"===h,[u().readOnly]:N}),children:[f&&(0,l.jsx)("div",{className:(0,s.Z)(u().controlContainer,u().addoneBefore),children:f}),(0,l.jsxs)("div",{className:(0,s.Z)(u().inputContainer,{[u().cover]:"button"===b}),children:[R&&(0,l.jsxs)("div",{className:(0,s.Z)(u().maskPlaceholder,!L&&!p&&u().maskPlaceholderCenter),children:[E&&(0,l.jsx)("span",{className:u().maskPlaceholderHide,children:E}),R.slice(String(null!=E?E:"").length)]}),(0,l.jsx)("input",{id:x,ref:e=>{B.current=e,y&&e&&(y.current=e)},value:null!=E?E:"",disabled:k||j,autoFocus:"button"!==b&&A,readOnly:N,onFocus:e=>{A||(M(!0),n(e))},onBlur:e=>{A&&(M(!1),i(e))},onChange:e=>{t(e)},onKeyDown:e=>{a&&a(e)},className:(0,s.Z)(u().input,!p&&u().inputCenter),placeholder:R?void 0:L,...T}),(null==p?void 0:p.length)?(0,l.jsx)("span",{className:(0,s.Z)(u().label,"error"===h&&u().error),children:p}):null]}),v&&(!!E||"string"==typeof E&&!!E.trim().length)&&(0,l.jsx)("button",{type:"button",className:(0,s.Z)(u().controlContainer,u().buttonClear),onClick:e=>{e.preventDefault(),B.current&&(c(B.current,""),"input"===b&&B.current.focus()),_()},children:(0,l.jsx)(r.IconFdsCloseO,{size:20})}),m&&(0,l.jsx)("div",{className:(0,s.Z)(u().controlContainer,u().addoneAfter),children:m})]}),(!!(null==C?void 0:C.length)&&h||S||!!(null==w?void 0:w.length))&&(0,l.jsx)("div",{className:(0,s.Z)(u().message,{[u().successMessage]:"success"===h,[u().errorMessage]:"error"===h,[u().defaultMessage]:S&&!h||!S&&!h&&!!(null==w?void 0:w.length)}),children:h?D:U})]})});_.displayName="UiInput";let p=e=>{let{isOpenPopup:t,multiple:n,optionsList:l,defaultPointedIndex:r,onTogglePopup:i,onSelectedItem:s,onClearCallBack:c}=e,[a,u]=(0,o.useState)({index:r,trigger:"key"}),{index:d,trigger:_}=a,p=(0,o.useRef)(l.length);(0,o.useEffect)(()=>{t||null===r||n||(u({index:r,trigger:"key"}),p.current=l.length),p.current!==l.length&&t&&(p.current=l.length,u({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]),f=(0,o.useCallback)(()=>{t&&i(!0)},[t,i]),m=(0,o.useCallback)(()=>{t&&l.length&&(u(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&&(u(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:_,setPointedItem:u,handleKeyNavigation:e=>{e.stopPropagation();let t=e||window.event;switch(e.key){case"Escape":f();break;case"Enter":v();break;case"ArrowDown":t.preventDefault(),m();break;case"ArrowUp":t.preventDefault(),h()}}}},v=e=>{let{isOpenPopup:t,isMobile:n=!1,multiple:l,scrollValue:r,selectedItemIndex:i,pointedItemIndex:s,pointedTrigger:c,container:a,element:u}=e,d=(0,o.useCallback)(e=>{a&&e>=0&&u.current&&null!==u.current&&u.current.scrollIntoView({block:"nearest",inline:"nearest"})},[a,u]);return(0,o.useEffect)(()=>{let e;!l&&t&&e!==i&&"number"==typeof i&&(e=i,d(i))},[a,u,t,l,d,i]),(0,o.useEffect)(()=>{let e;!n&&t&&e!==s&&"number"==typeof s&&"key"===c&&(e=s,d(s))},[n,a,u,t,s,c,d]),(0,o.useEffect)(()=>{let e;l&&t&&a.current&&e!==r&&(e=r,a.current.scrollTo({top:r}))},[a,t,l,r]),null};var f=n(38019),m=n.n(f);let h=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},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)}}(),S=(0,o.memo)(e=>{let{onSearch:t,onChange:n=()=>null,options:c,optionsEmptyText:a,multiple:u=!1,search:d=!1,defaultOpen:f=!1,autoFocus:S=!1,value:w,popupHeight:C=312,className:y,removeLineHeight:k,onClose:x,onOpen:L,popupDataQa:I,itemDataQa:E,...N}=e,P=(0,o.useRef)(!1),[j,O]=(0,o.useState)(()=>null!=w?w:null),[R,T]=(0,o.useState)(""),[A,M]=(0,o.useState)(S||f),[B,D]=(0,o.useState)(!1),[U,X]=(0,o.useState)(null),[F,Z]=(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}),W=A&&!!c.length,K=(0,o.useCallback)(e=>{B||(T(""),M(!1),null==x||x()),(null==e?void 0:e.current)&&u&&W&&H(e.current.scrollTop)},[B,W,u,x]),G=(0,o.useRef)(null),q=(0,o.useRef)(null),J=(0,o.useRef)(null),Q=h(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),D(t=>!e&&!t),e){var t;null===(t=G.current)||void 0===t||t.blur()}(null==Q?void 0:Q.current)&&u&&W&&H(Q.current.scrollTop),e&&(null==x||x())},[Q,u,W,x]),et=(0,o.useCallback)(e=>{if(u)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());if(l>=0){let e=[...t.slice(0,l),...t.slice(l+1)];return e.length||(O(null),X(null),Z(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),O([e]),Z([e]),n(w&&e.value===w[0].value?null:t),ee(!0),T("")}},[ee,u,n,c,w]),en=(0,o.useCallback)(()=>{n(F),ee(!0)},[ee,n,F]),{pointedItemIndex:el,pointedTrigger:eo,setPointedItem:er,handleKeyNavigation:ei}=p({isOpenPopup:W,multiple:u,optionsList:$,defaultPointedIndex:U,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),X(null),er({index:null,trigger:"key"}),H(0),Z(null),ee(!0),n(null)},[ee,n,er]);v({isOpenPopup:W,multiple:u,scrollValue:z,selectedItemIndex:U,pointedItemIndex:el,pointedTrigger:eo,container:Q,element:J});let ea=(0,o.useMemo)(()=>(null==F?void 0:F.length)&&!W?u?"":F[0].label:R,[F,R,u,W]),eu=(0,o.useMemo)(()=>{if(!(null==F?void 0:F.length))return R;let{length:e}=F;return u?1===e?F[0].label:"Выбрано (".concat(e,")"):W&&!R.length?F[0].label:R},[W,u,R,F]),ed={readOnly:!d,addonAfter:(0,l.jsx)("div",{className:(0,s.Z)(m().icon,{[m().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:()=>u?T(""):ec(),value:ea,placeholder:eu,onFocus:()=>d&&M(!0),onClick:()=>{d?A||M(!0):M(e=>!e)},autoComplete:"off",innerRef:G,...N};(0,o.useEffect)(()=>{P.current?(O(w),Z(w?c.filter(e=>w.find(t=>String(t.value)===String(e.value))):null)):P.current=!0},[c,w]);let[e_,ep]=(0,o.useState)(0),[ev,ef]=(0,o.useState)(null),em=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=()=>{b(()=>ep(window.scrollY))};return W?window.addEventListener("scroll",e,!1):window.removeEventListener("scroll",e,!1),()=>window.removeEventListener("scroll",e,!1)},[W]),(0,o.useEffect)(()=>{if(!em.current||!G.current)return;let e=G.current.getBoundingClientRect(),t=em.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,ef(l)},[W,e_]);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)(m().select,y),onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),onKeyDown:e=>ei(e),children:[(0,l.jsx)("div",{className:m().inputcontainer,children:(0,l.jsx)(_,{...ed})}),W&&(0,l.jsxs)("div",{className:m().popup,ref:em,style:{maxHeight:"".concat(C,"px"),...eh},"data-qa":I,children:[(0,l.jsxs)("div",{ref:Q,className:m().popupContent,style:{maxHeight:"".concat(C-(u?100:20),"px")},children:[0===$.length&&(0,l.jsx)("div",{className:m().emptyList,children:a||"Нет совпадений"}),$.length>0&&(0,l.jsx)("ul",{className:m().optionsList,ref:q,children:$.map((e,t)=>{let n=!1;if(u)n=!!(null==F?void 0:F.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)(m().optionsItem,{[m().targetOptionsItem]:el===t,[m().selectedOptionsItem]:n,[m().removeLineHeight]:k}),"data-qa":E,children:(0,l.jsxs)("button",{onMouseDown:()=>et(e),children:[u&&(0,l.jsx)("span",{className:(0,s.Z)(m().checkbox,{[m().active]:n}),children:n&&(0,l.jsx)(r.IconFdsCheckO,{className:m().marker})}),e.label]})},e.value)})})]}),u&&!!(null==F?void 0:F.length)&&(0,l.jsxs)("div",{className:m().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(F.length,")")})]})]})]})});S.displayName="Desktop";var w=n(13466),C=n(49689),y=n(50197),k=n.n(y);let x=(0,o.memo)(e=>{let{onSearch:t,onChange:n=()=>null,options:c,optionsEmptyText:a,multiple:u=!1,search:d=!1,defaultOpen:p=!1,autoFocus:f=!1,value:m,className:h,removeLineHeight:g,onClose:b,onOpen:S,popupDataQa:y,itemDataQa:x,...L}=e,I=(0,o.useRef)(!1),[E,N]=(0,o.useState)(()=>null!=m?m:null),[P,j]=(0,o.useState)(""),[O,R]=(0,o.useState)(!1),[T,A]=(0,o.useState)(f||p),[M,B]=(0,o.useState)(p),[D,U]=(0,o.useState)(null),[X,F]=(0,o.useState)(()=>E?c.filter(e=>E.find(t=>String(t.value)===String(e.value))):null),[Z,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]),G=(0,o.useCallback)(e=>{setTimeout(()=>A(t=>!e&&!t),300),R(t=>!e&&!t),B(t=>!e&&!t),M||(R(!1),A(!1),j("")),(null==V?void 0:V.current)&&u&&W&&z(V.current.scrollTop),e&&(null==b||b())},[M,u,W,b]),q=(0,o.useCallback)(()=>{setTimeout(()=>R(!0),600),A(!0),B(!0)},[]),J=(0,o.useCallback)(e=>{if(u)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());return l>=0?([...t.slice(0,l),...t.slice(l+1)].length||(N(null),U(null),F(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())});U(o>=0?o:null),N([e]),F([e]),n(m&&e.value===m[0].value?null:t),j(""),setTimeout(()=>G(!0),300)}},[G,u,n,c,m]),Q=(0,o.useCallback)(()=>{n(X),G(!0)},[G,n,X]),$=(0,o.useCallback)(()=>{N(null),U(null),z(0),F(null),G(!0),n(null)},[G,n]);v({isMobile:!0,isOpenPopup:W,multiple:u,scrollValue:Z,selectedItemIndex:D,container:V,element:Y});let ee=(0,o.useMemo)(()=>(null==X?void 0:X.length)&&!W?u?"":X[0].label:P,[X,P,u,W]),et=(0,o.useMemo)(()=>(null==X?void 0:X.length)?1===X.length?X[0].label:u?"Выбрано (".concat(X.length,")"):"":"",[u,X]),en=(0,o.useMemo)(()=>{if(!(null==X?void 0:X.length))return P;let{length:e}=X;return 1===e?X[0].label:u?"Выбрано (".concat(e,")"):W&&!P.length?X[0].label:P},[W,u,P,X]);return(0,o.useEffect)(()=>{I.current?(N(m),F(m?c.filter(e=>m.find(t=>String(t.value)===String(e.value))):null)):I.current=!0},[c,m]),(0,o.useEffect)(()=>{W&&(null==S||S())},[W,S]),(0,o.useEffect)(()=>{null==t||t(P)},[P]),(0,l.jsxs)("div",{className:(0,s.Z)(k().select,h),children:[(0,l.jsx)("div",{className:(0,s.Z)(k().inputcontainer,k().inputButton),children:(0,l.jsx)(_,{readOnly:!d,addonAfter:(0,l.jsx)(r.IconFdsChevronDownO,{size:24,className:k().icon}),inputType:"button",inputClear:$,value:et,onClick:q,autoComplete:"off",type:"button",...L})}),W&&(0,l.jsx)(w.h,{children:(0,l.jsx)(C.j,{full:!0,className:k().popup,isOpen:M,onClose:()=>G(!0),children:(0,l.jsxs)("div",{className:k().window,"data-qa":y,children:[(0,l.jsx)("div",{className:k().safeAreaLine}),(0,l.jsx)("div",{className:(0,s.Z)(k().inputcontainer,k().inputPopup),children:(0,l.jsx)(_,{readOnly:!d,addonAfter:(0,l.jsx)("div",{className:k().icon,children:d?(0,l.jsx)(r.IconFdsSearchO,{size:18}):(0,l.jsx)(r.IconFdsChevronDownO,{size:24})}),onChange:e=>j(e.currentTarget.value),autoFocus:O,inputType:"select",inputClear:()=>j(""),value:ee,placeholder:en,onFocus:()=>R(!0),onClick:()=>!O&&R(!0),autoComplete:"off",...L})}),(0,l.jsxs)("div",{ref:V,className:k().content,children:[0===K.length&&(0,l.jsx)("div",{className:k().empty,children:a||"Нет совпадений"}),K.length>0&&(0,l.jsx)("ul",{className:(0,s.Z)(k().optionsList,{[k().multipleList]:u}),ref:H,children:K.map((e,t)=>{let n=!1;if(u)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:D===t?Y:void 0,className:(0,s.Z)(k().optionsItem,{[k().selectedOptionsItem]:n,[k().removeLineHeight]:g}),"data-qa":x,children:(0,l.jsxs)("button",{onMouseDown:()=>J(e),children:[u&&(0,l.jsx)("span",{className:(0,s.Z)(k().checkbox,{[k().active]:n}),children:n&&(0,l.jsx)(r.IconFdsCheckO,{className:k().marker})}),(0,l.jsx)("p",{children:e.label})]})},e.value)})})]}),u&&!!(null==X?void 0:X.length)&&(0,l.jsxs)("div",{className:k().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,")")})]})]})})})]})});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)(S,{...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(6471),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?"":l.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"}}}]);