(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4762],{30754:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(57437),l=n(75461),o=n(5426),a=n(54365),r=n(2265),u=n(8289),s=n.n(u);let d=(e,t)=>{if(!e.length)return[];let n=[{label:"Главная",href:"/"},...e];return t&&(n[n.length-1].href=void 0),n};var c=(0,r.memo)(function(e){let{items:t=[],isMobile:n,className:u,disableLastHref:c=!0,...m}=e,v=(0,o._m)("l"),p=(0,r.useMemo)(()=>d(t,c),[t,c]);return(0,i.jsx)(l.Oo,{items:p,className:(0,a.Z)(s().breadcrumbs,u),isMobile:null!=n?n:!v,...m})})},22240:function(e,t,n){"use strict";n.d(t,{CpaParams:function(){return m},default:function(){return c}});var i=n(57437),l=n(16715),o=n(27194),a=n(87467),r=n(14862),u=n(34039),s=n(38050);let d="".concat(r.m.ASSETS_URL,"/mp-assets");function c(e){let{children:t,aggregatorIds:n,headerData:u,footerData:c}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m,{aggregatorIds:n}),(0,i.jsxs)(i.Fragment,{children:[u&&(0,i.jsx)(a.H,{data:u,showcaseUrl:r.m.BASE_URL,minioUrl:d,lkUrl:r.m.LK_URL}),t,c&&(0,i.jsx)(o.F,{data:c,showcaseUrl:r.m.BASE_URL,minioUrl:d})]}),(0,i.jsx)(s.h,{children:(0,i.jsx)(l.z,{})})]})}function m(e){return(0,u.Z)(e.aggregatorIds),null}},80925:function(e,t,n){"use strict";n.d(t,{B:function(){return E}});var i,l,o=n(57437),a=n(80684),r=n(33145),u=n(2265),s=n(11359),d=n(75461),c=n(5426),m=n(54365),v=n(77051),p=n.n(v);function _(){}(i=l||(l={})).button="button",i.detail="detail",i.compare="compare",i.favorites="favorites",i.share="share",i.open="open";let h=e=>{let{icon:t,href:n,target:i,title:a,titleCaption:r,advantageAmountFrom:s,advantageBonus:v,advantageAmountTo:h,advantageInterestAccrual:b,tags:y,className:x,onOpenDetailModal:A,onDetailClick:P,onButtonClick:N,onOpenClick:k,buttonText:T="Подробнее",wide:I=!1,lkUrl:D}=e,R=[s,v,h,b].filter(e=>"string"==typeof(null==e?void 0:e.name)?null==e?void 0:e.name.length:null==e?void 0:e.name),L=(0,u.useCallback)(e=>{let{children:t}=e;return(null==n?void 0:n.length)?(0,o.jsx)(d.rU,{href:n||"",target:i,className:(0,m.Z)(p().plate,x),children:t}):(0,o.jsx)("div",{className:(0,m.Z)(p().plate,x),children:t})},[x,n,i]),C=(0,u.useCallback)(e=>{A&&(e.preventDefault(),e.stopPropagation(),A(l.detail))},[A]),j=(0,u.useCallback)(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return n=>{switch(t&&(n.preventDefault(),n.stopPropagation()),e){case l.detail:return null==P?void 0:P(l.detail);case l.button:return null==N?void 0:N(l.button);case l.open:return null==k?void 0:k(l.open)}}},[N,P,k]);return(0,o.jsx)(L,{children:(0,o.jsxs)("div",{className:p().body,children:[(0,o.jsxs)("div",{className:p().left,children:[(0,o.jsxs)("div",{className:p().header,children:[(0,o.jsxs)("div",{className:p().titleWrapper,children:[(0,o.jsx)("div",{className:(0,m.Z)(p().logoIcon),children:t}),(0,o.jsxs)("div",{className:(0,m.Z)(p().title,{[p().noneCaption]:!(null==r?void 0:r.length)}),children:[!!(null==r?void 0:r.length)&&(0,o.jsx)("button",{title:r,onClick:C,className:(0,m.Z)(p().caption,{[p().clickable]:A}),children:r}),(0,o.jsx)("p",{className:p().logoTitle,title:a,children:a})]})]}),!!(null==R?void 0:R.length)&&(0,o.jsx)("div",{className:(0,m.Z)(p().advantagesList,{[p().wide]:I,[p().shortList]:I&&R.length<3}),children:R.map(e=>(0,o.jsxs)("div",{className:(0,m.Z)(p().advantageItem,{[p().longItem]:R.length<3}),children:[(null==e?void 0:e.tooltipText)?(0,o.jsx)(c.qQ,{text:e.tooltipText,keyValue:(null==e?void 0:e.caption)+(null==e?void 0:e.name),iconClassName:p().iconClassName,children:(0,o.jsx)("span",{className:p().advantageItemCaption,children:null==e?void 0:e.caption})}):(0,o.jsx)("span",{className:p().advantageItemCaption,children:null==e?void 0:e.caption}),(0,o.jsx)("div",{className:p().advantageItemTitle,children:e.name})]},e.caption))}),(0,o.jsx)(g,{isMobile:!0,handleButtonClick:j})]}),(0,o.jsx)("div",{className:p().tagsList,children:y.map(e=>{let t="left"===e.position?{iconLeft:e.icon}:{iconRight:e.icon},n=0===e.text.trim().length;return(0,o.jsx)(d.Vp,{className:(0,m.Z)(p().tag,e.backGround&&p()[e.backGround]),label:e.text,onIconRightClick:n?_:void 0,rounded:!0,...t},e.text)})})]}),(0,o.jsx)("div",{className:p().right,children:(0,o.jsx)("div",{className:p().buttonsWrapper,children:(0,o.jsxs)("div",{className:p().block,children:[(0,o.jsx)(g,{isMobile:!1,handleButtonClick:j}),(0,o.jsxs)("div",{className:p().column,children:[(0,o.jsx)(d.zx,{className:(0,m.Z)(p().button,p().appButton,{[p().wide]:I}),size:"xs",onClick:()=>j(l.button,!1),children:T}),D&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f,{href:D,onClick:j}),(0,o.jsx)(f,{href:D,isMobile:!0,onClick:j})]})]})]})})})]})})},g=e=>{let{isMobile:t,handleButtonClick:n}=e;return(0,o.jsx)(d.zx,{className:(0,m.Z)(p().button,p().detailButton,{[p().mobile]:t,[p().desktop]:!t}),onClick:n(l.detail),iconLeft:(0,o.jsx)(a.IconFdsInfoCircleO,{}),shape:"icon",variant:"secondary",size:"xs"})},f=e=>{let{isMobile:t,href:n,onClick:i}=e;return(0,o.jsx)(d.zx,{as:"a",href:n,target:"_blank",size:"xs",variant:t?"secondary":"white",className:(0,m.Z)(p().openButton,t?p().mobile:p().desktop),onClick:i(l.open),children:"Оформить сейчас"})};h.displayName="Plate";var b=n(27023),y=n(2674),x=n(16639),A=n(13425),P=n(94966),N=n(75109),k=n(58864),T=n(72151);let I=(e,t,n)=>{(0,T.lQ)({event:"data-event",eventLabel:e,eventCategory:t,eventAction:n})};var D=n(14441),R=n(99193),L=n(64554),C=n(94445),j=n.n(C),M=n(77337);let S=(e,t,n,i,l)=>{I(e,l?t:"deposits_details_vklady_popup",l?"click_name_deposit__".concat(n):i)},F=(e,t,n,i,l)=>{if(null==e?void 0:e.target){let l=e.target;if(l.classList.contains("finkit-button")||l.classList.contains("finkit-button__label")){I(t,n,"click__button__more__".concat(i));return}}I(t,n,l)},E=(0,u.memo)(e=>{var t,n,i,l,d;let{className:c,data:m,discount:v,isPlatform:p=!1,onOpenDetailModal:_,isOldUser:g,baseUrl:f="/vklady",params:T,hideBonusTooltip:C=!1,events:E={},buttonText:B="Подробнее",partnerId:U=null,wide:z=!1,paramsType:O="hash",isTermInDays:w=!1,showOpenButton:Z=!1}=e,Y=p?"offers":"lidgen",{eventCategory:H="deposits_vklady",clickItemAction:W="click__card__".concat(Y),showItemAction:G="show__card__".concat(Y),openModalAction:V="view",clickMoreButtonAction:K}=E,Q=(0,L.G)({productId:m.id,optionId:m.optionId,amount:null!==(l=m.rateAmount)&&void 0!==l?l:0,durationValue:(0,k.Am)(w,null===(t=m.computeData)||void 0===t?void 0:t.termDays,null!==(d=m.term)&&void 0!==d?d:void 0),passAggregatorId:!0}),J=(0,b.p)(U),q=null==J?void 0:null===(n=J.depositsItem)||void 0===n?void 0:n.depositUrl,{partnerFacetsIds:X}=(0,y.ND)(),$=(0,u.useRef)(null),ee=(0,u.useMemo)(()=>(0,N.D)(g,m.finuslugiBonusPromotion,v),[g,m.finuslugiBonusPromotion,v]);(0,R.Z)({itemRef:$,eventCategory:H,eventAction:G,eventLabel:String(m.id)});let et=e=>(S(m.id,H,Y,V,e),null==_?void 0:_({isPlatform:p,href:el,depositItem:m})),en=(0,u.useCallback)(()=>{I("oformit_seychas",H,"click_button"),window.open(Q,"_blank")},[H,Q]),ei=(0,u.useMemo)(()=>(0,x.Z)({data:m,hideBonusTooltip:C,discountState:ee}),[m,ee,C]),el=(0,u.useMemo)(()=>{var e;return q?q({productId:m.id}):function(e){let{params:t,depositUrl:n,amount:i,term:l,isBound:o,baseUrl:a,paramsType:r,isTermInDays:u}=e;if(o)return n;let s="hash"===r?(0,M.iU)("/".concat(n),(0,M.Oh)({amount:i,...u?{d_period:l}:{period:l}})):(0,M.jb)("/".concat(n),{amount:i,period:l}),d=t?(0,M.jb)(s,t):s;return(0,M.xn)(a,d)}({params:T,depositUrl:m.url,amount:m.rateAmount,term:(0,k.Am)(w,null===(e=m.computeData)||void 0===e?void 0:e.termDays,m.term),baseUrl:f,isBound:m.isBound,paramsType:O,isTermInDays:w})},[f,q,null===(i=m.computeData)||void 0===i?void 0:i.termDays,m.id,m.isBound,m.rateAmount,m.term,m.url,w,T,O]),{query:eo}=(0,D.P)(),ea=function(e,t,n,i){if(!t)return e;let{links:l,id:o}=i,a=Object.entries(n).reduce((e,t)=>-1!==t[0].indexOf("utm")?"".concat(e,"&").concat(t[0],"=").concat(t[1]):e,"");return((null==l?void 0:l[o])?l[o]:e)+a}(el,U,eo,{links:U&&X[U].links||{},id:m.id}),er=(0,u.useMemo)(()=>(0,A.Z)({data:m,isPlatform:p,renderTip:e=>(0,o.jsx)(s.C,{className:j().detail,icon:(0,o.jsx)(a.IconFdsQuestionCircleO,{size:16}),text:e.description,iconClassName:j().detailIcon,iconPlacement:"right",asTrigger:"div",children:e.title}),newDesign:!0}),[m,p]),eu=m.bic?(0,P.B)(m.bic):void 0;return ei[0]||"savingAccount"===m.type||m.rateType?(0,o.jsx)("div",{"data-testid":"deposits-item",className:c,ref:$,onClick:e=>{F(e,m.id,H,Y,W)},children:(0,o.jsx)(h,{type:"deposit",icon:eu?(0,o.jsx)("div",{className:j().logo,children:(0,o.jsx)(r.default,{unoptimized:!0,width:56,height:56,src:eu,alt:"logo"})}):(0,o.jsx)("div",{className:j().placeholderLogo}),title:m.bankName||m.name,titleCaption:(0,k.Am)(m.bankName,m.name,""),href:ea,onOpenDetailModal:()=>et(!0),onDetailClick:()=>et(),onButtonClick:(0,k.Am)(K,()=>I(m.id,H,null!=K?K:""),void 0),tags:er,target:"_self",advantageAmountFrom:ei[0],advantageBonus:ei[1],advantageAmountTo:ei[2],advantageInterestAccrual:ei[3],buttonText:B,wide:z,lkUrl:(0,k.Am)(Z,Q,void 0),onOpenClick:en})}):null});E.displayName="DepositsItem"},65621:function(e,t,n){"use strict";n.d(t,{p:function(){return d}});var i=n(94441);let l=e=>{var t,n,i,l,o,a,r,u;let s=(null===(n=e.contentAttributes)||void 0===n?void 0:null===(t=n.integration)||void 0===t?void 0:t.integrationType)==="REFERAL"||(null===(l=e.contentAttributes)||void 0===l?void 0:null===(i=l.integration)||void 0===i?void 0:i.integrationType)==="INTERNAL_REFERAL";return{type:s?1:0,url:null!==(u=null===(a=e.contentAttributes)||void 0===a?void 0:null===(o=a.integration)||void 0===o?void 0:o.url)&&void 0!==u?u:"",commercial:s?1:0,order:null===(r=e.contentAttributes)||void 0===r?void 0:r.order}},o=(e,t,n)=>{var i,l,o,a;return{...null==e?void 0:e.interest_rate,rates:t.length?t:null!==(o=null===(i=e.interest_rate)||void 0===i?void 0:i.rates)&&void 0!==o?o:[],comment:null!==(a=null===(l=n.contentAttributes)||void 0===l?void 0:l.ratesComment)&&void 0!==a?a:""}},a=(e,t)=>{var n,i,l,o;let a=null==t?void 0:null===(o=t.interestPayments)||void 0===o?void 0:null===(l=o[0])||void 0===l?void 0:null===(i=l.periods)||void 0===i?void 0:null===(n=i[0])||void 0===n?void 0:n.type,u=r(a);return{...e.interest_payment,text:u,daily:"DAILY"===a?1:0,weekly:"WEEKLY"===a?1:0,monthly:"MONTHLY"===a?1:0,quarterly:"QUARTERLY"===a?1:0,half_year:"SEMIANNUALLY"===a?1:0,annually:"ANNUALLY"===a?1:0,end:"IN_THE_END"===a?1:0}},r=e=>"DAILY"===e?"Ежедневно":"WEEKLY"===e?"Еженедельно":"MONTHLY"===e?"Ежемесячно":"QUARTERLY"===e?"Ежеквартально":"SEMIANNUALLY"===e?"Каждые пол года":"ANNUALLY"===e?"Ежегодно":"IN_THE_END"===e?"В конце срока":"",u=(e,t)=>{var n,i;let l=null!==(i=null===(n=e.attributes)||void 0===n?void 0:n.asSavingAccount)&&void 0!==i?i:"saving_account"===e.productType;return{charitable:"charitable"===e.productType?1:0,child:"child"===e.productType?1:0,insurance:"insurance"===e.productType?1:0,investment:"investment"===e.productType?1:0,martgage:"mortgage"===e.productType?1:0,multicurrency:(null==t?void 0:t.currencies.length)>1?1:0,pension:"pension"===e.productType?1:0,salary:"salary"===e.productType?1:0,saving_account:l?1:0,seasonal:"seasonal"===e.productType?1:0}},s=e=>e?String(e).padStart(9,"0"):"",d=e=>{var t,n,r,d,c,m,v,p,_,h,g,f,b,y,x,A,P,N,k,T,I,D,R,L,C,j;let{deposit:M,bank:S,oldDeposit:F}=e,E=null!=F?F:(0,i.MP)(!!(null==M?void 0:null===(t=M.attributes)||void 0===t?void 0:t.asSavingAccount)),B=null===(r=M.attributes)||void 0===r?void 0:null===(n=r.options)||void 0===n?void 0:n[0],U=(0,i.I7)(S),{rates:z,amountFrom:O,amountTo:w,termFrom:Z,termTo:Y}=(0,i.HP)(null!==(T=null===(d=M.attributes)||void 0===d?void 0:d.options)&&void 0!==T?T:[],null==M?void 0:null===(c=M.attributes)||void 0===c?void 0:c.isLadderDeposit);return{...E,...M,id:M.id,url:null!==(I=null==M?void 0:null===(m=M.contentAttributes)||void 0===m?void 0:m.url)&&void 0!==I?I:"",title:M.name,active_to:M.visibleTo,active_from:M.visibleFrom,archive:(null===(v=M.contentAttributes)||void 0===v?void 0:v.archive)?1:0,m_updated_at:null!==(D=null===(_=M.contentAttributes)||void 0===_?void 0:null===(p=_.updatedAt)||void 0===p?void 0:p.slice(0,10))&&void 0!==D?D:"",bank_id:Number(null==S?void 0:S.id),bank_name:null!==(R=null==S?void 0:S.name)&&void 0!==R?R:"",bank_url:null!==(L=null==S?void 0:S.url)&&void 0!==L?L:"",legal_name:U,currency_id:Number(null===(b=M.attributes.options)||void 0===b?void 0:null===(f=b[0])||void 0===f?void 0:null===(g=f.currencies)||void 0===g?void 0:null===(h=g[0])||void 0===h?void 0:h.currency),online_application:l(M),interest_rate:o(E,z,M),amount:{...E.amount,from:O,to:w},term:{...E.term,from:Z,to:Y},efficientRate:M.attributes.efficientRate,partial_withdrawal:{...E.partial_withdrawal,has:(0,i.Nx)(B),text:(0,i.UD)(B)},interest_payment:a(E,B),productFeature:null===(y=M.attributes)||void 0===y?void 0:y.productFeature,refill:{comment:"",...E.refill,has:(0,i.u0)(B),text:(0,i.VV)(B)},interest_capitalization:{comment:"",...E.interest_capitalization,has:(0,i.xV)(B),text:(0,i.vc)(B)},preferential_termination:{...E.preferential_termination,has:(0,i.vf)(B),text:(0,i.f1)(B)},type:u(M,B),prolongation:{text:(null==B?void 0:B.prolongations)?"Предусмотрена":"Не предусмотрена"},all_russia:(null===(x=M.contentAttributes)||void 0===x?void 0:x.availableAllRussia)?1:0,custom_regions:null!==(C=null===(A=M.attributes)||void 0===A?void 0:A.regionsData)&&void 0!==C?C:[],multicurrency:(null==B?void 0:B.currencies.length)>1?1:0,finuslugiBonusPromotion:{},fin_exclusive:M.attributes.exclusive?1:0,asSavingAccount:null!==(j=M.attributes.asSavingAccount)&&void 0!==j&&j,promo:!1,floatingRateInformations:M.floatingRateInformations,external:{integrationType:null===(N=M.contentAttributes)||void 0===N?void 0:null===(P=N.integration)||void 0===P?void 0:P.integrationType},options:M.attributes.options,bic:s(null===(k=M.contentAttributes)||void 0===k?void 0:k.bic),isLadderDeposit:M.attributes.isLadderDeposit}}},36639:function(e,t,n){"use strict";n.d(t,{O:function(){return F}});var i=n(34200),l=n(6164),o=n(91627),a=n(40309),r=n(44579),u=n(14438);let s=e=>{let{type:t,value:n}=e;switch(!0){case t===l.e.DAY:return Math.round(n/o.F);case t===l.e.MONTH:return n;case t===l.e.YEAR:return 12*n;default:return 0}},d=e=>{let{type:t,value:n}=e;switch(!0){case t===l.e.DAY:return n;case t===l.e.MONTH:return Math.round(n*o.F);case t===l.e.YEAR:return Math.round(365*n);default:return 0}},c=e=>{let t=e.filter(e=>e.active);if(!t.length)return null;let n=t[0].currencies[0],i=n.rates[0];return t.reduce((e,t)=>{let l=t.currencies.reduce((e,t)=>{let n=t.rates.reduce((e,t)=>{let{maximumRate:n}=t;return n>e.maximumRate?t:e},t.rates[0]);return n.maximumRate>e.rate.maximumRate?{...t,rate:n}:e},{...n,rate:i});return l.rate.maximumRate>e.currency.rate.maximumRate?{...t,currency:l}:e},{...t[0],currency:{...n,rate:i}})},m=e=>{let{deposits:t,banks:n,specialDeposits:i}=e;return t.length?t.map(e=>{var t,l,o;let{contentAttributes:m,provider:v}=e,p=null!==(l=n[m.bic])&&void 0!==l?l:n[Number(v.bic)];if(!p)return;let _=c(e.attributes.options);if(!_)return;let{currency:{rate:h}}=_,g=(0,u.ax)({rate:h.maximumRate,depositSum:h.minimumAmount,isCapitalization:!1,term:d(h.minimumPeriod),period:r.Z.Day,paymentFrequency:a.Z.InTheEnd});return{name:e.name,url:m.url,id:e.id,logoMob:p.logo_mob,order:m.order,bankName:p.name,bic:String(m.bic),rateAmount:h.minimumAmount,computeData:g,currencyUnit:"₽",isArchived:!1,amount:h.minimumAmount,type:e.attributes.asSavingAccount?"savingAccount":"deposit",specialOrder:null!==(o=null===(t=i[e.id])||void 0===t?void 0:t.order)&&void 0!==o?o:null,term:s(h.minimumPeriod),isNotAmount:!0,isTermEmpty:!0,asSavingAccount:e.attributes.asSavingAccount}}).filter(Boolean):[]};var v=n(59687),p=n(33600),_=n(91586),h=n(94966),g=n(7913);let f={0:[1,2,3,4,5,6],1:[23,24],2:[8],4:[1,8,9],5:[12],10:[6]},b={INIT_MIN_TERM_DEFAULT:1,END_WORK_DAY_UTC_HOURS:13,isWorkTime(e){return!!e&&e.getUTCHours()<this.END_WORK_DAY_UTC_HOURS},isWeekend:e=>!!e&&[0,6].includes(e.getDay()),isHoliday(e){if(!e)return!1;let t=e.getMonth(),n=e.getDate();return t in f&&f[t].includes(n)}},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Number(Number(e).toFixed(t))},x=e=>{let t=e.bond&&e.bond.api_data&&e.bond.api_data.product||{},n=t.minCouponPaymentSizePercent,i=e.income,l=t.price?t.price.total:1e3,a=y(Math.floor(e.depositValue/l)*l),r=Math.round(e.depositPeriod*o.F);return i&&a&&r?y(i/a*365/r*100,1):n},A=e=>{let t=new Date(e);return t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0),t},P=e=>{for(b.isWorkTime(e)||e.setDate(e.getDate()+1);b.isWeekend(e)||b.isHoliday(e);)e.setDate(e.getDate()+1);return e},N=(e,t)=>{let n=e.bond&&e.bond.api_data&&e.bond.api_data.product||{},i=n.price&&n.price.base,l=n.price?n.price.total:1e3,o=Math.floor(e.depositValue/l),a=y(o*l),r=(n.eventsData&&n.eventsData.events||[]).filter(e=>"INTR"===e.type),u=r.findIndex(e=>{let n=A(e.eventDate);return n.setHours(23),n.setMinutes(59),n.setSeconds(59),n.setMilliseconds(0),t>=A(e.eventStartDate)&&t<=n}),s=0;if(u>=0){let e=r[u],n=Math.floor((t.getTime()-A(e.eventStartDate).getTime())/864e5),l=y(e.paymentSizePercent*i*n/36500);return u>=1&&(s=r.slice(0,u).reduce((e,t)=>y(e+t.paymentSize),0)),y(o*i+o*l+o*s-a)}return 0},k=e=>{let t=A(P(new Date));return t.setDate(t.getDate()+e),t},T=e=>{let t=Math.round(e.depositPeriod*o.F);return e?N(e,k(t)):0};var I=n(19612),D=n(75109),R=n(84456);let L=e=>{let{deposits:t,region:n,town:i}=e;return(null==n?void 0:n.id)&&((null==n?void 0:n.url)==="moskva"||(null==n?void 0:n.url)==="sankt-peterburg")?t.filter(e=>{var t,i;return e.custom_regions&&(null===(t=e.custom_regions)||void 0===t?void 0:t.length)<1||(null===(i=e.custom_regions)||void 0===i?void 0:i.some(e=>e.regionId===n.region_id))}):(null==i?void 0:i.id)?t.filter(e=>{var t,n;return e.custom_regions&&(null===(t=e.custom_regions)||void 0===t?void 0:t.length)<1||(null===(n=e.custom_regions)||void 0===n?void 0:n.some(e=>e.cities.includes(i.id)))}):t},C=e=>{let{anotherDeposits:t,region:n,town:i,filter:l,importantDeposits:o}=e,a=L({deposits:t,region:n,town:i});return j((()=>{let e=l.rate;return e?a.filter(t=>t.interest_rate.rates.some(t=>{let n=t.rate;return n>=e&&n<e+1})):a})(),o)},j=(e,t)=>e.filter(e=>t.length?t.includes(String(e.id)):!e.archive);var M=n(91342);let S=(e,t,n)=>e.filter(e=>t.length?t.includes(String(e.id)):!!n[e.id]||!e.archive);function F(e){var t,n;let{initialPlatformDeposits:l=[],initialAnotherDeposits:s=[],initialLeadGenDeposits:d=[],filter:c,region:f,town:b,discounts:A,anotherDeposits:P,platformDeposits:N,newPlatformDeposits:k,bankTowns:L,banks:j,bounds:F,allExtraInfo:E,isPlusFiveBonus:B,isOldUser:U,anotherDepositsInCount:z=!0,getOnlyInitialData:O=!1,specialDeposits:w={},leadGenDeposits:Z=[],initialAllDepositsLength:Y,initialCurrentDepositsLength:H,calculateFilterAbilities:W=!0,withSavingAccounts:G=!1,shouldFilterByAllOffers:V=!1,allOffers:K=null}=e,{amount:Q,term:J,sortType:q,order:X,importantDeposits:$=[],filterAdditionalSettings:ee=[i.a.bonds,i.a.deposits]}=c;if(O)return function(e){let{initialPlatformDeposits:t,initialAnotherDeposits:n,anotherDepositsInCount:i,initialLeadGenDeposits:l,initialAllDepositsLength:o,initialCurrentDepositsLength:a}=e,r=t.length+(i?n.length:0);return{platform:t,another:n,leadGen:l,allLength:o||r,currentLength:a||r,boundsIsEmpty:!0,fitsForMonthlyPercentFilter:!0,fitsForPreferentialTerminationFilter:!0,fitsForCapitalization:!0,fitsForRefill:!0}}({initialPlatformDeposits:l,initialAnotherDeposits:s,anotherDepositsInCount:z,initialLeadGenDeposits:d,initialAllDepositsLength:Y,initialCurrentDepositsLength:H});let et=null==A?void 0:A.find(e=>"five_procent"===e.unique_key),en={...c,amount:Q?Number(Q):null,term:Number(null!=J?J:0)},ei=null==j?void 0:j.reduce((e,t)=>({...e,[Number(t.bic)]:t}),{}),el=function(e){let{bounds:t,filter:n,isValid:i}=e;if(!i)return[];let{amount:l,term:o,currency:a}=n;return t.reduce((e,t)=>{var n,i;let r=(t&&(null===(n=t.api_data)||void 0===n?void 0:n.product)||{}).minCouponPaymentSizePercent,u={bond:t,depositValue:null!=l?l:0,depositPeriod:o},s=T(u),d=s<=5e6?.87:.85,c=l?y(x({...u,income:s})*d):r,m=s*d;if(c<=0||m<=0)return e;let v=Math.round(30.4375*u.depositPeriod);return[...e,{name:t.name,url:t.url,id:t.id,logoMob:null!==(i=t.image_url)&&void 0!==i?i:"",rateAmount:c,computeData:{result:m,profit:m,rate:c,effectiveRate:c,bonus:0,bonusRate:0,termDays:v,onlyBonusFloatingRate:0},currencyUnit:null!=a?a:"₽",tag:t.tag,term:null!=o?o:0,isBound:!0,isArchived:!1,amount:null!=l?l:0,type:p.kv.Bond,specialOrder:null,bic:""}]},[])}({bounds:$.length?F.filter(e=>$.includes(String(e.id))):F,filter:en,isValid:ee.includes(i.a.bonds)}),eo=ee.includes(i.a.deposits),{items:ea,...er}=function(e){let{deposits:t,banks:n,allExtraInfo:i,filter:l,region:s,discount:d,isOldUser:c,isPlusFiveBonus:m,isValid:v,specialDeposits:h}=e;return v?t.reduce((e,t)=>{var v,g;let f=function(e){var t,n,i;let{deposit:l,normalizedBanks:s,filter:d,allExtraInfo:c,region:m,isOldUser:v,isPlusFiveBonus:h,discount:g}=e,{amount:f,term:b,currency:y,withMonthlyPercent:x=!1,withPreferentialTermination:A=!1,withCapitalization:P,withRefill:N}=d,k=null==s?void 0:s[Number(l.bic)],T=null,L=f,C=Math.round(b*o.F),j=null,M=!!l.options[0].replenishment||l.asSavingAccount,S=!!l.options[0].partialWithdrawal,F="CAPITALISATION"===l.options[0].interestPayments[0].method,E=l.options[0].currencies[0],B=[],U=c[l.internalUrl],z=function(e){let{deposit:t,region:n,bankId:i,filter:l,currencyUnit:o}=e,a=!t.regions||!(null==n?void 0:n.region_id)||t.regions.includes(+n.region_id),r=(0,u.EP)(l,i);return(!o||"₽"===o)&&r&&a}({deposit:l,region:m,currencyUnit:y,filter:d,bankId:String(null==k?void 0:k.id)}),O=!1;if(z){let e=l.options.filter(e=>e.active);O=e[0].rateType===_.e4.FLOATING,e.forEach(e=>{var t;null===(t=e.currencies)||void 0===t||t.forEach(t=>{let n=function(e,t){var n;if((null==t?void 0:null===(n=t.algo)||void 0===n?void 0:n.id)==="mkb-nakop"){let{algo:e}=t;return e.expenseChips.map(t=>({minimumAmount:e.minAmount,maximumAmount:e.maxAmount,minimumPeriod:{type:"DAY",value:0},maximumPeriod:{type:"DAY",value:1/0},minimumRate:t.rateWithSalary}))}return e.rates}(t,U);n.forEach(e=>B.push(e.minimumAmount));let i=[...n].sort((e,t)=>t.minimumRate-e.minimumRate).find(e=>{let t="number"!=typeof f||e.minimumAmount&&e.minimumAmount<=f&&(!e.maximumAmount||e.maximumAmount>=f),n=!b||(!e.minimumPeriod||Math.round((0,R.I)(e.minimumPeriod)/o.F)<=b)&&(!e.maximumPeriod||Math.round((0,R.I)(e.maximumPeriod)/o.F)>=b);return t&&n});if(!i||i.minimumRate<Number(T))return;let{nextRefill:l,nextPartialWithdrawal:a,nextIsCapitalization:r,nextRate:u,nextTerm:s,nextTag:d,nextAmount:c}=function(e){var t,n;let{option:i,depositRate:l,currentTerm:o,currentAmount:a}=e;return{nextRefill:!!i.replenishment,nextPartialWithdrawal:!!i.partialWithdrawal,nextIsCapitalization:!!i.interestPayments.find(e=>!e.accountFromCustomer&&"CAPITALISATION"===e.method),nextRate:l.minimumRate,nextTag:null!==(n=null===(t=l.tags)||void 0===t?void 0:t.title)&&void 0!==n?n:null,nextTerm:function(e,t){let n=e,i=t.minimumPeriod&&(0,R.I)(t.minimumPeriod),l=t.maximumPeriod&&(0,R.I)(t.maximumPeriod);return i&&e<i&&(n=i),l&&e>l&&(n=l),n}(o,l),nextAmount:a||l.minimumAmount}}({depositRate:i,option:e,currentTerm:C,currentAmount:L});M=l,S=a,F=r,T=u,j=d,C=s,L=c})})}let w=!M&&!S&&F,{finuslugiBonusAllowed:Z,finuslugiBonusPromotion:Y,floatingRateInformations:H}=l,W=(0,I.p)({currentAmount:null!=f?f:0,finuslugiBonusAllowed:Z,finuslugiBonusPromotion:Y,isPlusFiveBonus:h,isOldUser:v,terms:Math.round(b*o.F)}),G=W?v?(0,D.pW)(Y):g:null,V=(0,u.ax)({rate:T,depositSum:L,isCapitalization:w,discount:G,term:C,period:r.Z.Day,paymentFrequency:function(e){var t,n,i,l,o;let r=null===(o=e.options)||void 0===o?void 0:null===(l=o[0].interestPayments)||void 0===l?void 0:null===(i=l[0])||void 0===i?void 0:null===(n=i.periods)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.type;return"MONTHLY"===r?a.Z.OnceAMonth:"DAILY"===r?a.Z.EveryDay:a.Z.InTheEnd}(l),floatingRateInformations:H});if(!V)return;let K=(0,u.PF)(l,M);if(!(0,u.Oh)({computedFlags:K,currentFilters:{withCapitalization:P,withMonthlyPercent:x,withPreferentialTermination:A,withRefill:N}}))return{...K};let Q={legalName:function(e){if(!e)return"";if("string"==typeof e){var t;return null===(t=JSON.parse(e)[0])||void 0===t?void 0:t.name}return null==e?void 0:e[0].name}(null==k?void 0:k.legal_entities),logoMob:null!==(n=null==k?void 0:k.logo_mob)&&void 0!==n?n:"",bankName:null!==(i=null==k?void 0:k.name)&&void 0!==i?i:""};return{deposit:{name:l.name,url:l.internalUrl,id:l.id,bic:l.bic,exclusive:l.exclusive,isNotAmount:!f,isRefill:M,rateAmount:L,computeData:V,currencyUnit:y,tag:j,isCapitalization:F,term:b||Math.round(C/o.F),isArchived:!!l.archive,isTermEmpty:0===b,tags:null!==(t=l.tags)&&void 0!==t?t:[],promo:l.promo,finuslugiBonusAllowed:Z,finuslugiBonusPromotion:null!=Y?Y:null,floatingRateInformations:null!=H?H:null,amount:Math.min(...B),type:l.asSavingAccount?p.kv.SavingAccount:p.kv.Deposit,hasDiscount:W,currencies:E,asSavingAccount:l.asSavingAccount,isFloating:O,...Q},...K}}({deposit:t,normalizedBanks:n,filter:l,allExtraInfo:i,region:s,isOldUser:c,isPlusFiveBonus:m,discount:d});return f&&(e.hasMonthlyPercent||(e.hasMonthlyPercent=f.hasMonthlyPercent),e.hasPreferentialTermination||(e.hasPreferentialTermination=f.hasPreferentialTermination),e.hasCapitalization||(e.hasCapitalization=f.hasCapitalization),e.hasRefill||(e.hasRefill=f.hasRefill),f.deposit&&e.items.push({...f.deposit,specialOrder:null!==(g=null===(v=h[t.id])||void 0===v?void 0:v.order)&&void 0!==g?g:null})),e},{items:[],hasMonthlyPercent:!1,hasPreferentialTermination:!1,hasCapitalization:!1,hasRefill:!1}):{items:[],hasMonthlyPercent:!1,hasPreferentialTermination:!1,hasCapitalization:!1,hasRefill:!1}}({deposits:S(N,$,w),isOldUser:U,isPlusFiveBonus:B,discount:et,filter:en,banks:ei,allExtraInfo:E,region:f,isValid:eo,specialDeposits:w}),eu=V&&(null==K?void 0:K.length)?K:P,es=C({anotherDeposits:eu,region:f,town:b,filter:en,importantDeposits:$}),{items:ed,...ec}=(0,g.Z)({deposits:es,filter:en,banks:j,bankTowns:L,cityId:null!==(t=null==b?void 0:b.id)&&void 0!==t?t:null==f?void 0:f.id,isValid:eo}),em={sortType:q,increaseSort:"desc"===X},ev=[...el,...ea].sort((e,t)=>(0,M.Z)({deposit1:e,deposit2:t,isLeadGen:!1,...em})),ep=[...ed].sort((e,t)=>(0,M.Z)({deposit1:e,deposit2:t,isLeadGen:!0,...em})),e_=[...m({deposits:Z,banks:ei,specialDeposits:w})].sort((e,t)=>(0,M.Z)({deposit1:e,deposit2:t,isLeadGen:!1,...em})),eh=function(e){let{deposits:t,banks:n,sum:i=0,term:l=0,withSavingAccounts:o,isPlusFiveBonus:a}=e;return t.filter(e=>!e.archive&&(!e.asSavingsAccount||o)).map(e=>{var t;let o=n[Number(e.bic)],{name:r,withCapitalization:s,withRefill:d,finuslugiBonusAllowed:c,floatingRateInformations:m,minimumAmount:g,minimumTermInDays:f,rate:b,bonusProfit:y,bonusRate:x,baseProfit:A,tags:P,promo:N,profitTerm:k,internalUrl:T,id:I,bic:D,asSavingsAccount:R,rateType:L,optionId:C}=e,{onlyBonusFloatingRate:j}=(0,u.Pp)(b,m);return{name:r,url:T,id:I,bic:D,exclusive:e.exclusive,isNotAmount:!i,isRefill:d,rateAmount:i&&l?i:g,computeData:{result:A,bonus:y,profit:A,effectiveRate:b,bonusRate:x,termDays:k>0?k:f,onlyBonusFloatingRate:j},currencyUnit:v.rO,isCapitalization:s,term:Math.round((k>0?k:f)/30),isArchived:!!e.archive,isTermEmpty:!l,tags:null!=P?P:[],promo:N,finuslugiBonusAllowed:c,amount:i,type:R?p.kv.SavingAccount:p.kv.Deposit,hasDiscount:c&&a,asSavingAccount:R,isFloating:L===_.e4.FLOATING,logoMob:(0,h.B)(D),bankName:null!==(t=null==o?void 0:o.name)&&void 0!==t?t:"",specialOrder:null,optionId:C}})}({deposits:null!=k?k:[],banks:ei,sum:Number(c.amount),term:c.term,withSavingAccounts:G,isPlusFiveBonus:B}),eg=N.length+(z?eu.length:0)+eh.length,ef=null!==(n=null!=Y?Y:eg)&&void 0!==n?n:0;return{notInitialDeposits:!0,platform:eh.length>0?eh:ev,another:ep,leadGen:e_,allLength:ef,currentLength:ev.length+(z?ep.length:0)+eh.length,boundsIsEmpty:0===el.length,fitsForMonthlyPercentFilter:!W||er.hasMonthlyPercent||ec.hasMonthlyPercent,fitsForPreferentialTerminationFilter:!W||er.hasPreferentialTermination||ec.hasPreferentialTermination,fitsForCapitalization:!W||er.hasCapitalization||ec.hasCapitalization,fitsForRefill:!W||er.hasRefill||ec.hasRefill}}},58864:function(e,t,n){"use strict";n.d(t,{Am:function(){return a},mA:function(){return i},oA:function(){return l},ur:function(){return o}});let i=e=>e&&"object"==typeof e?0===Object.keys(e).length:!e,l=e=>e&&"object"==typeof e?Object.keys(e).length>0:!!e,o=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(l)};function a(e,t,n){return e?t:n}},64554:function(e,t,n){"use strict";n.d(t,{G:function(){return r}});var i=n(2265),l=n(77337),o=n(14862),a=n(14441);let r=e=>{let{productId:t,optionId:n,amount:r,durationValue:u,passAggregatorId:s=!1,passCombo:d=!1}=e,{query:{utm_campaign:c,utm_medium:m,utm_source:v,utm_term:p,aggregator_id:_},hash:{partner_id:h}}=(0,a.P)(),g=s?_:h;return(0,i.useMemo)(()=>(0,l.jb)((0,l.xn)(o.m.LK_URL,"/add-product"),{aggregatorId:null!=g?g:"moex-mp-new-sc",productId:t,optionId:n,amount:r,durationValue:u,utm_campaign:c,utm_medium:m,utm_source:v,utm_term:p,...d?{from:"combo"}:null}),[g,r,u,n,d,t,c,m,v,p])}},8289:function(e){e.exports={breadcrumbs:"Breadcrumbs_breadcrumbs__wgDQB"}},94445:function(e){e.exports={logo:"DepositsItem_logo__iStbL",placeholderLogo:"DepositsItem_placeholderLogo__UzcOO",detailIcon:"DepositsItem_detailIcon__0dtvC",detail:"DepositsItem_detail__8JOuJ"}},77051:function(e){e.exports={plate:"Plate_plate__S_Sp7",detailButton:"Plate_detailButton__Vlnz_",body:"Plate_body__3Kcou",left:"Plate_left__kERR7",right:"Plate_right__R7QSm",header:"Plate_header__0Jio0",tagsList:"Plate_tagsList__sNF_o",tag:"Plate_tag__CXr0H",primary:"Plate_primary__2nNLK",secondary:"Plate_secondary__rmjTR",red:"Plate_red__G9aAj",green:"Plate_green__29Hcv",orange:"Plate_orange__DGBL9",purple:"Plate_purple__0iafz",blue:"Plate_blue__4EXVf",titleWrapper:"Plate_titleWrapper__J6_mn",title:"Plate_title__5Jf3b",logoIcon:"Plate_logoIcon__VDTTF",noneCaption:"Plate_noneCaption__oA2iC",caption:"Plate_caption__oESgJ",logoTitle:"Plate_logoTitle__oY9wl",clickable:"Plate_clickable__5wv6N",advantagesList:"Plate_advantagesList__4GAWx",wide:"Plate_wide__z6fFB",shortList:"Plate_shortList__r7czJ",advantageItem:"Plate_advantageItem__jlCJf",advantageItemCaption:"Plate_advantageItemCaption__xTm6L",iconClassName:"Plate_iconClassName__cQzY0",advantageItemTitle:"Plate_advantageItemTitle__i_0Gt",longItem:"Plate_longItem__BUIxH",buttonsWrapper:"Plate_buttonsWrapper__T4ELm",block:"Plate_block__HPiKB",column:"Plate_column__0xnQ7",iconButton:"Plate_iconButton__HQSXZ",desktop:"Plate_desktop__8p8d1",mobile:"Plate_mobile__3vHcn",appButton:"Plate_appButton__gTPKF",openButton:"Plate_openButton__uyU5_"}}}]);