(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9485],{20830:(t,e,n)=>{"use strict";n.d(e,{V:()=>r});var i=n(10955);let r=t=>{var e,n,r,l,a,o,u,s,d,c,m,p,f,v,h,g,A,b,y,_,R,T,P,D,S,x,N,L;let{deposit:I,bank:M,oldDeposit:E}=t,C=null!=E?E:(0,i.an)(!!(null==I||null==(e=I.attributes)?void 0:e.asSavingAccount)),F=null==(r=I.attributes)||null==(n=r.options)?void 0:n[0],w=(0,i.O)(M),{rates:O,amountFrom:k,amountTo:U,termFrom:Y,termTo:z}=(0,i.Aq)(null!=(_=null==(l=I.attributes)?void 0:l.options)?_:[],null==I||null==(a=I.attributes)?void 0:a.isLadderDeposit);return{...C,...I,id:I.id,url:null!=(R=null==I||null==(o=I.contentAttributes)?void 0:o.url)?R:"",title:I.name,active_to:I.visibleTo,active_from:I.visibleFrom,archive:+(null!=(u=I.contentAttributes)&&!!u.archive),m_updated_at:null!=(T=null==(d=I.contentAttributes)||null==(s=d.updatedAt)?void 0:s.slice(0,10))?T:"",bank_id:Number(null==M?void 0:M.id),bank_name:null!=(P=null==M?void 0:M.name)?P:"",bank_url:null!=(D=null==M?void 0:M.url)?D:"",legal_name:w,currency_id:Number(null==(f=I.attributes.options)||null==(p=f[0])||null==(m=p.currencies)||null==(c=m[0])?void 0:c.currency),online_application:(t=>{var e,n,i,r,l,a,o,u;let s=(null==(n=t.contentAttributes)||null==(e=n.integration)?void 0:e.integrationType)==="REFERAL"||(null==(r=t.contentAttributes)||null==(i=r.integration)?void 0:i.integrationType)==="INTERNAL_REFERAL";return{type:+!!s,url:null!=(u=null==(a=t.contentAttributes)||null==(l=a.integration)?void 0:l.url)?u:"",commercial:+!!s,order:null==(o=t.contentAttributes)?void 0:o.order}})(I),interest_rate:((t,e,n)=>{var i,r,l,a;return{...null==t?void 0:t.interest_rate,rates:e.length?e:null!=(l=null==(i=t.interest_rate)?void 0:i.rates)?l:[],comment:null!=(a=null==(r=n.contentAttributes)?void 0:r.ratesComment)?a:""}})(C,O,I),amount:{...C.amount,from:k,to:U},term:{...C.term,from:Y,to:z},efficientRate:I.attributes.efficientRate,partial_withdrawal:{...C.partial_withdrawal,has:(0,i.YJ)(F),text:(0,i.vA)(F)},interest_payment:((t,e)=>{var n,i,r;let l=null!=(r=null==e||null==(i=e.interestPayments)||null==(n=i[0])?void 0:n.periods)?r:[],a=l.map(t=>t.type),o=l.map(t=>(t=>{var e;return"DAILY"===t.type?"Ежедневно":"WEEKLY"===t.type?"Еженедельно":"MONTHLY"===t.type?"Ежемесячно":"QUARTERLY"===t.type?"Ежеквартально":"SEMIANNUALLY"===t.type?"Каждые пол года":"ANNUALLY"===t.type?"Ежегодно":"IN_THE_END"===t.type?"В конце срока":"SPECIFIED_PERIOD_IN_DAYS"===t.type?"Каждый ".concat(null!=(e=t.value)?e:0,"-й день"):""})(t)).join("<br/>");return{...t.interest_payment,text:o,daily:+!!a.includes("DAILY"),weekly:+!!a.includes("WEEKLY"),monthly:+!!a.includes("MONTHLY"),quarterly:+!!a.includes("QUARTERLY"),half_year:+!!a.includes("SEMIANNUALLY"),annually:+!!a.includes("ANNUALLY"),end:+!!a.includes("IN_THE_END"),specified_period_in_days:+!!a.includes("SPECIFIED_PERIOD_IN_DAYS")}})(C,F),productFeature:null==(v=I.attributes)?void 0:v.productFeature,refill:{comment:"",...C.refill,has:(0,i.sD)(F),text:(0,i.dl)(F)},interest_capitalization:{comment:"",...C.interest_capitalization,has:(0,i.M0)(F),text:(0,i.Je)(F)},preferential_termination:{...C.preferential_termination,has:(0,i._7)(F),text:(0,i.DD)(F)},type:((t,e)=>{var n,i;let r=null!=(i=null==(n=t.attributes)?void 0:n.asSavingAccount)?i:"saving_account"===t.productType;return{charitable:+("charitable"===t.productType),child:+("child"===t.productType),insurance:+("insurance"===t.productType),investment:+("investment"===t.productType),martgage:+("mortgage"===t.productType),multicurrency:+((null==e?void 0:e.currencies.length)>1),pension:+("pension"===t.productType),salary:+("salary"===t.productType),saving_account:+!!r,seasonal:+("seasonal"===t.productType)}})(I,F),prolongation:{text:(null==F?void 0:F.prolongations)?"Предусмотрена":"Не предусмотрена"},all_russia:+(null!=(h=I.contentAttributes)&&!!h.availableAllRussia),custom_regions:null!=(S=null==(g=I.attributes)?void 0:g.regionsData)?S:[],multicurrency:+((null==F?void 0:F.currencies.length)>1),finuslugiBonusPromotion:{},fin_exclusive:+!!I.attributes.exclusive,asSavingAccount:null!=(x=I.attributes.asSavingAccount)&&x,promo:!1,floatingRateInformations:I.floatingRateInformations,external:{integrationType:null==(b=I.contentAttributes)||null==(A=b.integration)?void 0:A.integrationType},options:I.attributes.options,attributesComments:null!=(N=null==F?void 0:F.attributesComments)?N:[],prolonging:null!=(L=I.attributes.prolonging)&&L,bic:(t=>t?String(t).padStart(9,"0"):"")(null==(y=I.contentAttributes)?void 0:y.bic),isLadderDeposit:I.attributes.isLadderDeposit}}},37465:(t,e,n)=>{"use strict";n.d(e,{Hn:()=>r,Ws:()=>l,Wu:()=>i,w3:()=>a});let i=t=>t&&"object"==typeof t?0===Object.keys(t).length:!t,r=t=>t&&"object"==typeof t?Object.keys(t).length>0:!!t,l=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.every(r)};function a(t,e,n){return t?e:n}},50769:(t,e,n)=>{"use strict";n.d(e,{U:()=>N,F:()=>x});var i=n(5195),r=n(46720),l=n(6425),a=n(19927),o=n(75722),u=n(46828),s=n(96065),d=n(25844),c=n(97390),m=n(2748),p=n(55670),f=n(67028);let v={0:[1,2,3,4,5,6],1:[23,24],2:[8],4:[1,8,9],5:[12],10:[6]},h={INIT_MIN_TERM_DEFAULT:1,END_WORK_DAY_UTC_HOURS:13,isWorkTime(t){return!!t&&t.getUTCHours()<this.END_WORK_DAY_UTC_HOURS},isWeekend:t=>!!t&&[0,6].includes(t.getDay()),isHoliday(t){if(!t)return!1;let e=t.getMonth(),n=t.getDate();return e in v&&v[e].includes(n)}},g=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Number(Number(t).toFixed(e))},A=t=>{let e=new Date(t);return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e.setMilliseconds(0),e};var b=n(40683),y=n(67087),_=n(48188),R=n(89910),T=n(233),P=n(37190);function D(t){var e,n,i,r,l,a,o;let u=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=t.interestPayments,d=null!=(a=s.find(t=>!t.accountFromCustomer&&"CAPITALISATION"===t.method))?a:s.find(t=>"CAPITALISATION"===t.method),c=null!=(o=null==d||null==(n=d.periods)||null==(e=n[0])?void 0:e.type)?o:null==(l=s[0])||null==(r=l.periods)||null==(i=r[0])?void 0:i.type;return u?(0,P.BP)(c):(0,y.v)(null!=c?c:"")}var S=n(35891);let x=t=>{let{deposits:e,banks:n,specialDeposits:i,sortType:r,increaseSort:d}=t;return(t=>{let{deposits:e,banks:n,specialDeposits:i}=t;return e.length?e.map(t=>{var e,r,d;let{contentAttributes:c,provider:m}=t,p=null!=(r=n[c.bic])?r:n[Number(m.bic)];if(!p)return;let f=(t=>{let e=t.filter(t=>t.active);if(!e.length)return null;let n=e[0].currencies[0],i=n.rates[0];return e.reduce((t,e)=>{let r=e.currencies.reduce((t,e)=>{let n=e.rates.reduce((t,e)=>{let{maximumRate:n}=e;return n>t.maximumRate?e:t},e.rates[0]);return n.maximumRate>t.rate.maximumRate?{...e,rate:n}:t},{...n,rate:i});return r.rate.maximumRate>t.currency.rate.maximumRate?{...e,currency:r}:t},{...e[0],currency:{...n,rate:i}})})(t.attributes.options);if(!f)return;let{currency:{rate:v}}=f,h=(0,s.q6)({rate:v.maximumRate,depositSum:v.minimumAmount,isCapitalization:!1,term:(t=>{let{type:e,value:n}=t;switch(!0){case e===l.s.DAY:return n;case e===l.s.MONTH:return Math.round(n*a.L);case e===l.s.YEAR:return Math.round(365*n);default:return 0}})(v.minimumPeriod),period:u.A.Day,paymentFrequency:o.A.InTheEnd});return{name:t.name,url:c.url,id:t.id,logoMob:p.logo_mob,order:c.order,bankName:p.name,bic:String(c.bic),rateAmount:v.minimumAmount,computeData:h,currencyUnit:"₽",isArchived:!1,amount:v.minimumAmount,type:t.attributes.asSavingAccount?"savingAccount":"deposit",specialOrder:null!=(d=null==(e=i[t.id])?void 0:e.order)?d:null,term:(t=>{let{type:e,value:n}=t;switch(!0){case e===l.s.DAY:return Math.round(n/a.L);case e===l.s.MONTH:return n;case e===l.s.YEAR:return 12*n;default:return 0}})(v.minimumPeriod),isNotAmount:!0,isTermEmpty:!0,asSavingAccount:t.attributes.asSavingAccount}}).filter(Boolean):[]})({deposits:e,banks:n,specialDeposits:i}).sort((t,e)=>(0,S.A)({deposit1:t,deposit2:e,isLeadGen:!1,sortType:r,increaseSort:d}))};function N(t){let{initialPlatformDeposits:e=[],initialAnotherDeposits:n=[],initialLeadGenDeposits:l=[],filter:v,region:y,town:N,discounts:L,anotherDeposits:I,platformDeposits:M,newPlatformDeposits:E,banks:C,bounds:F,allExtraInfo:w,isPlusFiveBonus:O,isOldUser:k,anotherDepositsInCount:U=!0,getOnlyInitialData:Y=!1,specialDeposits:z={},leadGenDeposits:H=[],precomputedLeadGenDeposits:W,initialAllDepositsLength:j,initialCurrentDepositsLength:q,calculateFilterAbilities:B=!0,withSavingAccounts:G=!1,shouldFilterByAllOffers:V=!1,allOffers:J=null,showOnlyNonPromo:K=!1}=t,{amount:Q,term:$,sortType:X,order:Z,importantDeposits:tt=[],filterAdditionalSettings:te=[i.G.bonds,i.G.deposits]}=v;if(Y){var tn;let{initialPlatformDeposits:t,initialAnotherDeposits:i,anotherDepositsInCount:r,initialLeadGenDeposits:a,initialAllDepositsLength:o,initialCurrentDepositsLength:u}={initialPlatformDeposits:e,initialAnotherDeposits:n,anotherDepositsInCount:U,initialLeadGenDeposits:l,initialAllDepositsLength:j,initialCurrentDepositsLength:q},s=t.length+(r?i.length:0);return{platform:t,another:i,leadGen:a,allLength:o||s,currentLength:u||s,boundsIsEmpty:!0,fitsForMonthlyPercentFilter:!0,fitsForPreferentialTerminationFilter:!0,fitsForCapitalization:!0,fitsForRefill:!0}}let ti=null==L?void 0:L.find(t=>"five_procent"===t.unique_key),tr={...v,amount:Q?Number(Q):null,term:Number(null!=$?$:0)},tl=(0,r.wf)(null!=C?C:[]),ta=function(t){let{bounds:e,filter:n,isValid:i}=t;if(!i)return[];let{amount:r,term:l,currency:o}=n;return e.reduce((t,e)=>{var n,i;let u=(e&&(null==(n=e.api_data)?void 0:n.product)||{}).minCouponPaymentSizePercent,s={bond:e,depositValue:null!=r?r:0,depositPeriod:l},d=(t=>{let e=Math.round(t.depositPeriod*a.L);return t?((t,e)=>{let n=t.bond&&t.bond.api_data&&t.bond.api_data.product||{},i=n.price&&n.price.base,r=n.price?n.price.total:1e3,l=Math.floor(t.depositValue/r),a=g(l*r),o=(n.eventsData&&n.eventsData.events||[]).filter(t=>"INTR"===t.type),u=o.findIndex(t=>{let n=A(t.eventDate);return n.setHours(23),n.setMinutes(59),n.setSeconds(59),n.setMilliseconds(0),e>=A(t.eventStartDate)&&e<=n}),s=0;if(u>=0){let t=o[u],n=Math.floor((e.getTime()-A(t.eventStartDate).getTime())/864e5),r=g(t.paymentSizePercent*i*n/36500);return u>=1&&(s=o.slice(0,u).reduce((t,e)=>g(t+e.paymentSize),0)),g(l*i+l*r+l*s-a)}return 0})(t,(t=>{let e=A((t=>{for(h.isWorkTime(t)||t.setDate(t.getDate()+1);h.isWeekend(t)||h.isHoliday(t);)t.setDate(t.getDate()+1);return t})(new Date));return e.setDate(e.getDate()+t),e})(e)):0})(s),m=d<=5e6?.87:.85,p=r?g((t=>{let e=t.bond&&t.bond.api_data&&t.bond.api_data.product||{},n=e.minCouponPaymentSizePercent,i=t.income,r=e.price?e.price.total:1e3,l=g(Math.floor(t.depositValue/r)*r),o=Math.round(t.depositPeriod*a.L);return i&&l&&o?g(i/l*365/o*100,1):n})({...s,income:d})*m):u,f=d*m;if(p<=0||f<=0)return t;let v=Math.round(30.4375*s.depositPeriod);return[...t,{name:e.name,url:e.url,id:e.id,logoMob:null!=(i=e.image_url)?i:"",rateAmount:p,computeData:{result:f,profit:f,rate:p,effectiveRate:p,bonus:0,bonusRate:0,termDays:v,onlyBonusFloatingRate:0},currencyUnit:null!=o?o:"₽",tag:e.tag,term:null!=l?l:0,isBound:!0,isArchived:!1,amount:null!=r?r:0,type:c.ch.Bond,specialOrder:null,bic:""}]},[])}({bounds:tt.length?F.filter(t=>tt.includes(String(t.id))):F,filter:tr,isValid:te.includes(i.G.bonds)}),to=te.includes(i.G.deposits),{items:tu,...ts}=function(t){let{deposits:e,banks:n,allExtraInfo:i,filter:r,region:l,discount:p,isOldUser:f,isPlusFiveBonus:v,isValid:h,specialDeposits:g}=t;return h?e.reduce((t,e)=>{var h,A;let y=function(t){var e,n,i,r,l;let p,{deposit:f,normalizedBanks:v,filter:h,allExtraInfo:g,region:A}=t,{amount:y,term:S,currency:x,withMonthlyPercent:N=!1,withPreferentialTermination:L=!1,withCapitalization:I,withRefill:M}=h,E=x||d.bc,C=null==v?void 0:v[Number(f.bic)],F=null,w=y,O="DAY"===h.termUnit?Math.round(S):Math.round(S*a.L),k=O,U=null,Y=null,z=!!f.options[0].replenishment||f.asSavingAccount,H=f.options[0].interestPayments.some(t=>"CAPITALISATION"===t.method),W=D(f.options[0],h.isCalculatorOfferFilter),j=f.options[0].currencies[0],q=[],B=g[f.internalUrl],G=function(t){let{deposit:e,region:n,bankId:i,filter:r,currencyUnit:l}=t,a=!e.regions||!(null==n?void 0:n.region_id)||e.regions.includes(+n.region_id),o=(0,s.Ai)(r,i);return(!l||l===d.bc)&&o&&a}({deposit:f,region:A,currencyUnit:x,filter:h,bankId:String(null==C?void 0:C.id)}),V=(null==(e=f.options.find(t=>t.active))?void 0:e.rateType)===m.Y4.FLOATING;G&&f.options.filter(t=>t.active).forEach(t=>{var e;let n={};if(h.isCalculatorOfferFilter&&(n=(0,P.Rf)(t,{capitalization:I,floatingRate:h.floatingRate})),!n)return;let i=n;null==(e=t.currencies)||e.forEach(e=>{var n,r,l,d;let c=function(t,e){var n;if((null==e||null==(n=e.algo)?void 0:n.id)==="mkb-nakop"){let{algo:t}=e;return t.expenseChips.map(e=>({minimumAmount:t.minAmount,maximumAmount:t.maxAmount,minimumPeriod:{type:"DAY",value:0},maximumPeriod:{type:"DAY",value:1/0},minimumRate:e.rateWithSalary}))}return t.rates}(e,B);c.forEach(t=>q.push(t.minimumAmount));let v=null;if(f.isLadderDeposit)v=function(t){let{option:e,currencyRates:n,currentAmount:i,filterTerm:r,filterTermUnit:l}=t;if(!function(t,e,n){if(!e)return!0;let{minimum:i,maximum:r}=t.duration;if("DAY"===n)return e>=i&&e<=r;let l=Math.round(i/a.L),o=Math.round(r/a.L);return e>=l&&e<=o}(e,r,l))return null;let o=function(t,e,n){let{minimum:i,maximum:r}=t.duration,l="DAY"===n?Math.round(e):Math.round(e*a.L);return(!l||l<i)&&(l=i),r&&l>r&&(l=r),l}(e,r,l),u=Math.min(...n.map(t=>t.minimumAmount)),s=null!=i?i:u,d=n.map(t=>{var e;return{amount_from:t.minimumAmount,amount_to:t.maximumAmount,term_from:t.minimumPeriod?(0,T.i)(t.minimumPeriod):1,term_to:t.maximumPeriod?(0,T.i)(t.maximumPeriod):o,rate:null!=(e=t.maximumRate)?e:t.minimumRate}}),c=(0,_.x)({amount:s,term:o,rates:d});return c?{nextRefill:!!e.replenishment,nextPartialWithdrawal:!!e.partialWithdrawal,nextIsCapitalization:!!e.interestPayments.find(t=>"CAPITALISATION"===t.method),nextRate:c.rate,nextTag:null,nextTerm:o,nextAmount:s}:null}({option:t,currencyRates:c,currentAmount:y,filterTerm:S,filterTermUnit:null!=(n=h.termUnit)?n:"MONTH"});else{let e=(d=null!=(r=h.termUnit)?r:"MONTH",[...c].sort((t,e)=>e.minimumRate-t.minimumRate).find(t=>{let e="number"!=typeof y||t.minimumAmount&&t.minimumAmount<=y&&(!t.maximumAmount||t.maximumAmount>=y),n=t.minimumPeriod?(0,T.i)(t.minimumPeriod):0,i=t.maximumPeriod?(0,T.i)(t.maximumPeriod):1/0,r=!S||("DAY"===d?S>=n&&S<=i:S>=Math.round(n/a.L)&&S<=Math.round(i/a.L));return e&&r}));e&&(v=function(t){var e,n;let{option:i,depositRate:r,currentTerm:l,currentAmount:a}=t;return{nextRefill:!!i.replenishment,nextPartialWithdrawal:!!i.partialWithdrawal,nextIsCapitalization:!!i.interestPayments.find(t=>"CAPITALISATION"===t.method),nextRate:r.minimumRate,nextTag:null!=(n=null==(e=r.tags)?void 0:e.title)?n:null,nextTerm:function(t,e){let n=t,i=e.minimumPeriod&&(0,T.i)(e.minimumPeriod),r=e.maximumPeriod&&(0,T.i)(e.maximumPeriod);return i&&t<i&&(n=i),r&&t>r&&(n=r),n}(l,r),nextAmount:a||r.minimumAmount}}({depositRate:e,option:t,currentTerm:O,currentAmount:y}))}if(!v)return;let{nextRefill:g,nextRate:A,nextTerm:b,nextTag:P,nextAmount:x}=v,E=(0,s.Jc)({...f,options:[t]},g);if(!(0,s.cT)({computedFlags:E,currentFilters:{withCapitalization:I,withMonthlyPercent:N,withPreferentialTermination:L,withRefill:M}}))return;let C=N&&!I&&E.hasMonthlyPercent,j=!C&&(null!=(l=i.isCapitalization)?l:v.nextIsCapitalization),G=C?o.A.OnceAMonth:D(t,h.isCalculatorOfferFilter),J=(0,s.q6)({rate:A,depositSum:x,isCapitalization:j,term:b,period:u.A.Day,dateStart:h.dateStart,paymentFrequency:G,floatingRateInformations:f.floatingRateInformations});if(!J)return;let K=(0,R.rW)(J.effectiveRate,2),Q=(0,R.rW)((0,s.C6)(f,J.effectiveRate,A),2);(0,s.tq)({catalogRate:Q,effectiveRate:J.effectiveRate,productRate:A,filterRate:h.rate,inputRate:h.inputRate,isCalculatorOfferFilter:h.isCalculatorOfferFilter})&&(null!==Y&&K<Y||(Y=K,p=t.id,z=g,h.isCalculatorOfferFilter&&(V=t.rateType===m.Y4.FLOATING),H=j,W=G,F=A,U=P,k=b,w=x))})});let J=H,K=(0,s.Jc)(f,f.asSavingAccount||f.options.some(t=>t.active&&!!t.replenishment)),{finuslugiBonusAllowed:Q,finuslugiBonusPromotion:$,floatingRateInformations:X}=f,Z=(0,s.q6)({rate:F,depositSum:w,isCapitalization:J,term:k,period:u.A.Day,dateStart:h.dateStart,paymentFrequency:W,floatingRateInformations:X}),tt=(0,s.lx)(f,Z,F);if(!tt)return G?K:void 0;if(!(0,s.tq)({catalogRate:tt.effectiveRate,effectiveRate:null!=(n=null==Z?void 0:Z.effectiveRate)?n:tt.effectiveRate,productRate:F,filterRate:h.rate,inputRate:h.inputRate,isCalculatorOfferFilter:h.isCalculatorOfferFilter}))return K;let te={legalName:function(t){if(!t)return"";if("string"==typeof t){var e;return null==(e=JSON.parse(t)[0])?void 0:e.name}return null==t?void 0:t[0].name}(null==C?void 0:C.legal_entities),logoMob:null!=(r=null==C?void 0:C.logo_mob)?r:"",bankName:null!=(l=null==C?void 0:C.name)?l:""},tn=(0,b.Dm)({options:f.options,mkbData:void 0,additionalRate:0});return{deposit:{name:f.name,url:f.internalUrl,id:f.id,bic:f.bic,exclusive:f.exclusive,isNotAmount:!y,isRefill:z,rateAmount:w,computeData:tt,currencyUnit:E,tag:U,isCapitalization:H,...h.isCalculatorOfferFilter?{paymentFrequency:W}:{},optionId:p,term:"DAY"===h.termUnit?k:S||Math.round(k/a.L),isArchived:!!f.archive,isTermEmpty:0===S,isFixedTerm:1===tn.length&&"fixed"===tn[0].termType,isLadderDeposit:f.isLadderDeposit,tags:null!=(i=f.tags)?i:[],promo:f.promo,finuslugiBonusAllowed:Q,finuslugiBonusPromotion:null!=$?$:null,floatingRateInformations:null!=X?X:null,amount:Math.min(...q),type:f.asSavingAccount?c.ch.SavingAccount:c.ch.Deposit,hasDiscount:!1,currencies:j,asSavingAccount:f.asSavingAccount,isFloating:V,...te},...K}}({deposit:e,normalizedBanks:n,filter:r,allExtraInfo:i,region:l,isOldUser:f,isPlusFiveBonus:v,discount:p});return y&&(t.hasMonthlyPercent||(t.hasMonthlyPercent=y.hasMonthlyPercent),t.hasPreferentialTermination||(t.hasPreferentialTermination=y.hasPreferentialTermination),t.hasCapitalization||(t.hasCapitalization=y.hasCapitalization),t.hasRefill||(t.hasRefill=y.hasRefill),y.deposit&&t.items.push({...y.deposit,specialOrder:null!=(A=null==(h=g[e.id])?void 0:h.order)?A:null})),t},{items:[],hasMonthlyPercent:!1,hasPreferentialTermination:!1,hasCapitalization:!1,hasRefill:!1}):{items:[],hasMonthlyPercent:!1,hasPreferentialTermination:!1,hasCapitalization:!1,hasRefill:!1}}({deposits:M.filter(t=>tt.length?tt.includes(String(t.id)):!!z[t.id]||!t.archive),isOldUser:k,isPlusFiveBonus:O,discount:ti,filter:tr,banks:tl,allExtraInfo:w,region:y,isValid:to,specialDeposits:z}),td=V&&(null==J?void 0:J.length)?J:I,tc=(t=>{let e,n,{anotherDeposits:i,region:r,town:l,importantDeposits:a}=t;return e=(t=>{let{deposits:e,region:n,town:i}=t;return(null==n?void 0:n.id)&&((null==n?void 0:n.url)==="moskva"||(null==n?void 0:n.url)==="sankt-peterburg")?e.filter(t=>{var e,i;return t.custom_regions&&(null==(e=t.custom_regions)?void 0:e.length)<1||(null==(i=t.custom_regions)?void 0:i.some(t=>t.regionId===n.region_id))}):(null==i?void 0:i.id)?e.filter(t=>{var e,n;return t.custom_regions&&(null==(e=t.custom_regions)?void 0:e.length)<1||(null==(n=t.custom_regions)?void 0:n.some(t=>t.cities.includes(i.id)))}):e})({deposits:i,region:r,town:l}),n=a,e.filter(t=>n.length?n.includes(String(t.id)):!t.archive)})({anotherDeposits:td,region:y,town:N,filter:tr,importantDeposits:tt}),{items:tm,...tp}=(0,f.A)({deposits:tc,filter:tr,banks:C,isValid:to}),tf={sortType:X,increaseSort:"desc"===Z},tv=[...ta,...tu].sort((t,e)=>(0,S.A)({deposit1:t,deposit2:e,isLeadGen:!1,...tf})),th=[...tm].sort((t,e)=>(0,S.A)({deposit1:t,deposit2:e,isLeadGen:!0,...tf})),tg=null!=W?W:x({deposits:H,banks:tl,specialDeposits:z,...tf}),tA=function(t){let{deposits:e,banks:n,sum:i=0,term:r=0,withSavingAccounts:l,isOldUser:a,showOnlyNonPromo:o}=t;return e.filter(t=>!t.archive&&(!t.asSavingsAccount||l)).map(t=>{let e=n[Number(t.bic)],{name:l,withCapitalization:u,withRefill:f,finuslugiBonusAllowed:v,floatingRateInformations:h,minimumAmount:g,minimumTermInDays:A,rate:b,bonusProfit:y,bonusRate:_,baseProfit:R,tags:T,promo:P,profitTerm:D,internalUrl:S,id:x,bic:N,asSavingsAccount:L,rateType:I,optionId:M,firstDepositPromotionAllowed:E,repeatDepositPromotionAllowed:C}=t,F=!!(!o&&t.firstDepositPromotionAllowed&&!a||t.repeatDepositPromotionAllowed&&a),{onlyBonusFloatingRate:w}=(0,s.$Q)(b,h);return{name:l,url:S,id:x,bic:N,exclusive:t.exclusive,isNotAmount:!i,isRefill:f,rateAmount:i&&r?i:g,computeData:{result:R,bonus:y,profit:R,effectiveRate:b,bonusRate:F?_:0,termDays:D>0?D:A,onlyBonusFloatingRate:w},currencyUnit:d.bc,isCapitalization:u,term:Math.round((D>0?D:A)/30),isArchived:!!t.archive,isTermEmpty:!r,tags:null!=T?T:[],promo:P,finuslugiBonusAllowed:v,amount:i,type:L?c.ch.SavingAccount:c.ch.Deposit,hasDiscount:F,asSavingAccount:L,isFloating:I===m.Y4.FLOATING,logoMob:(0,p.z)(N),bankName:(null==e?void 0:e.name)||t.bankDisplayName||"",specialOrder:null,optionId:M,firstDepositPromotionAllowed:E,repeatDepositPromotionAllowed:C}})}({deposits:null!=E?E:[],banks:tl,sum:Number(v.amount),term:v.term,withSavingAccounts:G,isPlusFiveBonus:O,isOldUser:k,showOnlyNonPromo:K}),tb=M.length+(U?td.length:0)+tA.length,ty=null!=(tn=null!=j?j:tb)?tn:0;return{notInitialDeposits:!0,platform:tA.length>0?tA:tv,another:th,leadGen:tg,allLength:ty,currentLength:tv.length+(U?th.length:0)+tA.length,boundsIsEmpty:0===ta.length,...{fitsForMonthlyPercentFilter:!B||ts.hasMonthlyPercent||tp.hasMonthlyPercent,fitsForPreferentialTerminationFilter:!B||ts.hasPreferentialTermination||tp.hasPreferentialTermination,fitsForCapitalization:!B||ts.hasCapitalization||tp.hasCapitalization,fitsForRefill:!B||ts.hasRefill||tp.hasRefill}}}},75937:(t,e,n)=>{"use strict";n.d(e,{CpaParams:()=>h,default:()=>v});var i=n(95155),r=n(22191),l=n(89069),a=n(22180),o=n(12115),u=n(20447),s=n(99291),d=n(94370),c=n(88992);function m(){return null}function p(t){let{children:e,onError:n}=t;return(0,i.jsx)(c.tH,{FallbackComponent:m,onError:n,children:e})}let f="".concat(u.q.ASSETS_URL,"/mp-assets");function v(t){let{children:e,aggregatorIds:n,headerData:s,footerData:c}=t,m=(0,o.useCallback)((t,e)=>{console.error("Header crashed:",t),console.error("Header component stack:",e.componentStack)},[]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(h,{aggregatorIds:n}),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p,{onError:m,children:s&&(0,i.jsx)(a.Y9,{data:s,showcaseUrl:u.q.BASE_URL,minioUrl:f,lkUrl:u.q.LK_URL,enableExternalLinkWarning:u.q.ENABLE_EXTERNAL_LINK_WARNING})}),e,c&&(0,i.jsx)(l.Footer,{data:c,showcaseUrl:u.q.BASE_URL,minioUrl:f})]}),(0,i.jsx)(d.Z,{children:(0,i.jsx)(r.S,{})})]})}function h(t){return(0,s.A)(t.aggregatorIds),null}},79655:t=>{t.exports={breadcrumbs:"Breadcrumbs_breadcrumbs__wgDQB"}},80333:(t,e,n)=>{"use strict";n.d(e,{s:()=>r});var i=n(19559);let r=(t,e,n)=>{(0,i.oA)({event:"data-event",eventLabel:t,eventCategory:e,eventAction:n})}},83419:(t,e,n)=>{"use strict";n.d(e,{d:()=>v,N:()=>m});var i=n(18991),r=n(28625);let l=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,r.px)("/api/v1/deposit-facets/filtered",{method:"POST",body:JSON.stringify({name:t}),headers:{"Content-Type":"application/json"}},{isProductTagsApi:!0},e)};var a=n(46720),o=n(20830),u=n(99969);async function s(t,e){let{products:n,boundaryValues:{totalPages:r}}=t,l=Array.from({length:r-1},(t,e)=>(0,i.t$)({page:e+1})),a=[...n,...(await Promise.all(l)).flatMap(t=>{var e,n;return null!=(n=null==(e=t.data)?void 0:e.products)?n:[]})];return e?a:a.filter(t=>!t.asSavingAccount)}async function d(t){var e,n;if(!t)return null;let{data:i}=await l(t);return(null==i?void 0:i.content.length)&&null!=(n=null==(e=(await l(t)).data)?void 0:e.content[0])?n:null}async function c(t){if(!(null==t?void 0:t.length))return[];let e=(function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=[];for(let i=0;i<t.length;i+=e)n.push(t.slice(i,i+e));return n})(t).map(t=>(0,i.cp)(t));return(await Promise.all(e)).flatMap(t=>{var e,n;return null!=(n=null==(e=t.data)?void 0:e.products)?n:[]})}async function m(t,e){if(null==e?void 0:e.length)return await c(e);let n=await (0,i.t$)();return(null==n?void 0:n.data)?await s(n.data,t):[]}async function p(t){var e,n;let r=null!=(n=null==(e=(await (0,i.gI)()).data)?void 0:e.content)?n:[];return t?r.filter(e=>t.includes(e.id)):r}async function f(t,e,n){var r;let l=[];if(n&&!e&&(l=await (0,i.a_)(String(n))),!n&&(null==e?void 0:e.length)&&(l=await (0,i.HU)(e)),!(null==l?void 0:l.length))return[];let u=(0,a.wf)(null!=t?t:[]);return null!=(r=null==l?void 0:l.map(t=>{var e;return(0,o.V)({deposit:t,bank:(null==t||null==(e=t.contentAttributes)?void 0:e.bic)?u[t.contentAttributes.bic]:void 0})}))?r:[]}async function v(t){let{withPlatformDeposits:e=!0,withSavingAccounts:n=!1,withAnotherDeposits:r=!0,withLeadGenDeposits:l=!1,facetKey:a,banks:o,nonPlatformProducts:s,platformProducts:c,tagId:v}=null!=t?t:{},h=await d(a),g=[],A=[];if(c||s||v){let[t,e]=await Promise.all([r?f(o,s,v):[],l?p():[]]);g=(0,u._)(t,s),A=e}else{var b,y;let t=r?await (0,i.ae)({oa_type:"1,2"}):{data:{deposits:null}};A=l?await p(null==h?void 0:h.productsIds):[],g=null!=(y=null==t||null==(b=t.data)?void 0:b.deposits)?y:[]}let _=(null==c?void 0:c.length)?c:null==h?void 0:h.depositsIds;return{platform:e?await m(n,_):[],another:g,leadGen:A}}},94586:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var i=n(81637);function r(t){let{params:e,depositUrl:n,amount:r,term:l,isBound:a,baseUrl:o,paramsType:u,isTermInDays:s}=t;if(a)return n;let d="hash"===u?(0,i.p2)("/".concat(n),(0,i._b)({amount:r,...s?{d_period:l}:{period:l}})):(0,i.VL)("/".concat(n),{amount:r,period:l}),c=e?(0,i.VL)(d,e):d;return(0,i.oq)(o,c)}},96918:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var i=n(95155),r=n(14894),l=n(2821),a=n(12115),o=n(79655),u=n.n(o);let s=(0,a.memo)(function(t){let{items:e=[],className:n,disableLastHref:o=!0,...s}=t,d=(0,a.useMemo)(()=>((t,e)=>{if(!t.length)return[];let n=[{label:"Главная",href:"/"},...t];return e&&(n[n.length-1].href=void 0),n})(e,o),[e,o]);return(0,i.jsx)(r.B,{...s,items:d,className:(0,l.A)(u().breadcrumbs,n),isMobile:!1,isFullView:!0})})},99969:(t,e,n)=>{"use strict";n.d(e,{_:()=>i});let i=(t,e)=>{if(!(null==e?void 0:e.length))return t;let n=new Map;return t.forEach(t=>{(null==t?void 0:t.id)!==void 0&&n.set(String(t.id),t)}),e.flatMap(t=>{let e=n.get(String(t));return e?[e]:[]})}}}]);