(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3969],{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 B}});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),C=(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]),j=(0,u.useCallback)(e=>{A&&(e.preventDefault(),e.stopPropagation(),A(l.detail))},[A]),L=(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)(C,{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:j,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:L})]}),(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:L}),(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:()=>L(l.button,!1),children:T}),D&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f,{href:D,onClick:L}),(0,o.jsx)(f,{href:D,isMobile:!0,onClick:L})]})]})]})})})]})})},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),C=n(64554),j=n(94445),L=n.n(j),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)},B=(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:j=!1,events:B={},buttonText:E="Подробнее",partnerId:z=null,wide:O=!1,paramsType:w="hash",isTermInDays:U=!1,showOpenButton:Z=!1}=e,H=p?"offers":"lidgen",{eventCategory:W="deposits_vklady",clickItemAction:Y="click__card__".concat(H),showItemAction:G="show__card__".concat(H),openModalAction:V="view",clickMoreButtonAction:Q}=B,J=(0,C.G)({productId:m.id,optionId:m.optionId,amount:null!==(l=m.rateAmount)&&void 0!==l?l:0,durationValue:(0,k.Am)(U,null===(t=m.computeData)||void 0===t?void 0:t.termDays,null!==(d=m.term)&&void 0!==d?d:void 0),passAggregatorId:!0}),K=(0,b.p)(z),q=null==K?void 0:null===(n=K.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:W,eventAction:G,eventLabel:String(m.id)});let et=e=>(S(m.id,W,H,V,e),null==_?void 0:_({isPlatform:p,href:el,depositItem:m})),en=(0,u.useCallback)(()=>{I("oformit_seychas",W,"click_button"),window.open(J,"_blank")},[W,J]),ei=(0,u.useMemo)(()=>(0,x.Z)({data:m,hideBonusTooltip:j,discountState:ee}),[m,ee,j]),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)(U,null===(e=m.computeData)||void 0===e?void 0:e.termDays,m.term),baseUrl:f,isBound:m.isBound,paramsType:w,isTermInDays:U})},[f,q,null===(i=m.computeData)||void 0===i?void 0:i.termDays,m.id,m.isBound,m.rateAmount,m.term,m.url,U,T,w]),{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,z,eo,{links:z&&X[z].links||{},id:m.id}),er=(0,u.useMemo)(()=>(0,A.Z)({data:m,isPlatform:p,renderTip:e=>(0,o.jsx)(s.C,{className:L().detail,icon:(0,o.jsx)(a.IconFdsQuestionCircleO,{size:16}),text:e.description,iconClassName:L().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,W,H,Y)},children:(0,o.jsx)(h,{type:"deposit",icon:eu?(0,o.jsx)("div",{className:L().logo,children:(0,o.jsx)(r.default,{unoptimized:!0,width:56,height:56,src:eu,alt:"logo"})}):(0,o.jsx)("div",{className:L().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)(Q,()=>I(m.id,W,null!=Q?Q:""),void 0),tags:er,target:"_self",advantageAmountFrom:ei[0],advantageBonus:ei[1],advantageAmountTo:ei[2],advantageInterestAccrual:ei[3],buttonText:E,wide:O,lkUrl:(0,k.Am)(Z,J,void 0),onOpenClick:en})}):null});B.displayName="DepositsItem"},65621:function(e,t,n){"use strict";n.d(t,{p:function(){return s}});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;return{...e.interest_payment,text:"DAILY"===a?"Ежедневно":"MONTHLY"===a?"Ежемесячно":"QUARTERLY"===a?"Ежеквартально":"IN_THE_END"===a?"В конце срока":"",daily:"DAILY"===a?1:0,monthly:"MONTHLY"===a?1:0,quarterly:"QUARTERLY"===a?1:0,end:"IN_THE_END"===a?1:0}},r=(e,t)=>({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:"saving_account"===e.productType?1:0,seasonal:"seasonal"===e.productType?1:0}),u=e=>e?String(e).padStart(9,"0"):"",s=e=>{var t,n,s,d,c,m,v,p,_,h,g,f,b,y,x,A,P,N,k,T,I,D,R,C,j;let{deposit:L,bank:M,oldDeposit:S}=e,F=null!=S?S:(0,i.MP)(!!(null==L?void 0:null===(t=L.attributes)||void 0===t?void 0:t.asSavingAccount)),B=null===(s=L.attributes)||void 0===s?void 0:null===(n=s.options)||void 0===n?void 0:n[0],E=(0,i.I7)(M),{rates:z,amountFrom:O,amountTo:w,termFrom:U,termTo:Z}=(0,i.HP)(null!==(k=null===(d=L.attributes)||void 0===d?void 0:d.options)&&void 0!==k?k:[],null==L?void 0:null===(c=L.attributes)||void 0===c?void 0:c.isLadderDeposit);return{...F,...L,id:L.id,url:null!==(T=null==L?void 0:null===(m=L.contentAttributes)||void 0===m?void 0:m.url)&&void 0!==T?T:"",title:L.name,active_to:L.visibleTo,active_from:L.visibleFrom,archive:(null===(v=L.contentAttributes)||void 0===v?void 0:v.archive)?1:0,m_updated_at:null!==(I=null===(_=L.contentAttributes)||void 0===_?void 0:null===(p=_.updatedAt)||void 0===p?void 0:p.slice(0,10))&&void 0!==I?I:"",bank_id:Number(null==M?void 0:M.id),bank_name:null!==(D=null==M?void 0:M.name)&&void 0!==D?D:"",bank_url:null!==(R=null==M?void 0:M.url)&&void 0!==R?R:"",legal_name:E,currency_id:Number(null===(b=L.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(L),interest_rate:o(F,z,L),amount:{...F.amount,from:O,to:w},term:{...F.term,from:U,to:Z},efficientRate:L.attributes.efficientRate,partial_withdrawal:{...F.partial_withdrawal,has:(0,i.Nx)(B),text:(0,i.UD)(B)},interest_payment:a(F,B),refill:{comment:"",...F.refill,has:(0,i.u0)(B),text:(0,i.VV)(B)},interest_capitalization:{comment:"",...F.interest_capitalization,has:(0,i.xV)(B),text:(0,i.vc)(B)},preferential_termination:{...F.preferential_termination,has:(0,i.vf)(B),text:(0,i.f1)(B)},type:r(L,B),prolongation:{text:(null==B?void 0:B.prolongations)?"Предусмотрена":"Не предусмотрена"},all_russia:(null===(y=L.contentAttributes)||void 0===y?void 0:y.availableAllRussia)?1:0,custom_regions:null!==(C=null===(x=L.attributes)||void 0===x?void 0:x.regionsData)&&void 0!==C?C:[],multicurrency:(null==B?void 0:B.currencies.length)>1?1:0,finuslugiBonusPromotion:{},fin_exclusive:L.attributes.exclusive?1:0,asSavingAccount:null!==(j=L.attributes.asSavingAccount)&&void 0!==j&&j,promo:!1,floatingRateInformations:L.floatingRateInformations,external:{integrationType:null===(P=L.contentAttributes)||void 0===P?void 0:null===(A=P.integration)||void 0===A?void 0:A.integrationType},options:L.attributes.options,bic:u(null===(N=L.contentAttributes)||void 0===N?void 0:N.bic),isLadderDeposit:L.attributes.isLadderDeposit}}},29664:function(e,t,n){"use strict";n.d(t,{O:function(){return S}});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 C=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};var j=n(91342);let L=(e,t,n)=>e.filter(e=>t.length?t.includes(String(e.id)):!!n[e.id]||!e.archive),M=(e,t)=>e.filter(e=>t.length?t.includes(String(e.id)):!e.archive);function S(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:S,banks:F,bounds:B,allExtraInfo:E,isPlusFiveBonus:z,isOldUser:O,anotherDepositsInCount:w=!0,getOnlyInitialData:U=!1,specialDeposits:Z={},leadGenDeposits:H=[],initialAllDepositsLength:W,initialCurrentDepositsLength:Y,calculateFilterAbilities:G=!0,withSavingAccounts:V=!1,shouldFilterByAllOffers:Q=!1,allOffers:J=null}=e,{amount:K,term:q,sortType:X,order:$,importantDeposits:ee=[],filterAdditionalSettings:et=[i.a.bonds,i.a.deposits]}=c;if(U)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:w,initialLeadGenDeposits:d,initialAllDepositsLength:W,initialCurrentDepositsLength:Y});let en=null==A?void 0:A.find(e=>"five_procent"===e.unique_key),ei={...c,amount:K?Number(K):null,term:Number(null!=q?q:0)},el=null==F?void 0:F.reduce((e,t)=>({...e,[Number(t.bic)]:t}),{}),eo=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:ee.length?B.filter(e=>ee.includes(String(e.id))):B,filter:ei,isValid:et.includes(i.a.bonds)}),ea=et.includes(i.a.deposits),{items:er,...eu}=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,C=f,j=Math.round(b*o.F),L=null,M=!!l.options[0].replenishment||l.asSavingAccount,S=!!l.options[0].partialWithdrawal,F="CAPITALISATION"===l.options[0].interestPayments[0].method,B=l.options[0].currencies[0],E=[],z=c[l.internalUrl],O=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)}),w=!1;if(O){let e=l.options.filter(e=>e.active);w=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,z);n.forEach(e=>E.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:j,currentAmount:C});M=l,S=a,F=r,T=u,L=d,j=s,C=c})})}let U=!M&&!S&&F,{finuslugiBonusAllowed:Z,finuslugiBonusPromotion:H,floatingRateInformations:W}=l,Y=(0,I.p)({currentAmount:null!=f?f:0,finuslugiBonusAllowed:Z,finuslugiBonusPromotion:H,isPlusFiveBonus:h,isOldUser:v,terms:Math.round(b*o.F)}),G=Y?v?(0,D.pW)(H):g:null,V=(0,u.ax)({rate:T,depositSum:C,isCapitalization:U,discount:G,term:j,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:W});if(!V)return;let Q=(0,u.PF)(l,M);if(!(0,u.Oh)({computedFlags:Q,currentFilters:{withCapitalization:P,withMonthlyPercent:x,withPreferentialTermination:A,withRefill:N}}))return{...Q};let J={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:C,computeData:V,currencyUnit:y,tag:L,isCapitalization:F,term:b||Math.round(j/o.F),isArchived:!!l.archive,isTermEmpty:0===b,tags:null!==(t=l.tags)&&void 0!==t?t:[],promo:l.promo,finuslugiBonusAllowed:Z,finuslugiBonusPromotion:null!=H?H:null,floatingRateInformations:null!=W?W:null,amount:Math.min(...E),type:l.asSavingAccount?p.kv.SavingAccount:p.kv.Deposit,hasDiscount:Y,currencies:B,asSavingAccount:l.asSavingAccount,isFloating:w,...J},...Q}}({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:L(N,ee,Z),isOldUser:O,isPlusFiveBonus:z,discount:en,filter:ei,banks:el,allExtraInfo:E,region:f,isValid:ea,specialDeposits:Z}),es=Q&&(null==J?void 0:J.length)?J:P,ed=C({deposits:es,region:f,town:b}),{items:ec,...em}=(0,g.Z)({deposits:M(ed,ee),filter:ei,banks:F,bankTowns:S,cityId:null!==(t=null==b?void 0:b.id)&&void 0!==t?t:null==f?void 0:f.id,isValid:ea}),ev={sortType:X,increaseSort:"desc"===$},ep=[...eo,...er].sort((e,t)=>(0,j.Z)({deposit1:e,deposit2:t,isLeadGen:!1,...ev})),e_=[...ec].sort((e,t)=>(0,j.Z)({deposit1:e,deposit2:t,isLeadGen:!0,...ev})),eh=[...m({deposits:H,banks:el,specialDeposits:Z})].sort((e,t)=>(0,j.Z)({deposit1:e,deposit2:t,isLeadGen:!1,...ev})),eg=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:C,optionId:j}=e,{onlyBonusFloatingRate:L}=(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:L},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:C===_.e4.FLOATING,logoMob:(0,h.B)(D),bankName:null!==(t=null==o?void 0:o.name)&&void 0!==t?t:"",specialOrder:null,optionId:j}})}({deposits:null!=k?k:[],banks:el,sum:Number(c.amount),term:c.term,withSavingAccounts:V,isPlusFiveBonus:z}),ef=N.length+(w?es.length:0)+eg.length,eb=null!==(n=null!=W?W:ef)&&void 0!==n?n:0;return{notInitialDeposits:!0,platform:eg.length>0?eg:ep,another:e_,leadGen:eh,allLength:eb,currentLength:ep.length+(w?e_.length:0)+eg.length,boundsIsEmpty:0===eo.length,fitsForMonthlyPercentFilter:!G||eu.hasMonthlyPercent||em.hasMonthlyPercent,fitsForPreferentialTerminationFilter:!G||eu.hasPreferentialTermination||em.hasPreferentialTermination,fitsForCapitalization:!G||eu.hasCapitalization||em.hasCapitalization,fitsForRefill:!G||eu.hasRefill||em.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_"}}}]);