(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6191],{79369:function(e,t,i){Promise.resolve().then(i.bind(i,53417)),Promise.resolve().then(i.bind(i,69767)),Promise.resolve().then(i.t.bind(i,88003,23)),Promise.resolve().then(i.bind(i,40378))},26225:function(e,t){"use strict";function i(){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},85605:function(e){!function(){"use strict";var t={815:function(e){e.exports=function(e,i,n,r){i=i||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var o=/\+/g;e=e.split(i);var l=1e3;r&&"number"==typeof r.maxKeys&&(l=r.maxKeys);var s=e.length;l>0&&s>l&&(s=l);for(var u=0;u<s;++u){var d,c,m,f,p=e[u].replace(o,"%20"),v=p.indexOf(n);(v>=0?(d=p.substr(0,v),c=p.substr(v+1)):(d=p,c=""),m=decodeURIComponent(d),f=decodeURIComponent(c),Object.prototype.hasOwnProperty.call(a,m))?t(a[m])?a[m].push(f):a[m]=[a[m],f]:a[m]=f}return a};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},577:function(e){var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,a,o,l){return(a=a||"&",o=o||"=",null===e&&(e=void 0),"object"==typeof e)?n(r(e),function(r){var l=encodeURIComponent(t(r))+o;return i(e[r])?n(e[r],function(e){return l+encodeURIComponent(t(e))}).join(a):l+encodeURIComponent(t(e[r]))}).join(a):l?encodeURIComponent(t(l))+o+encodeURIComponent(t(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var i=[],n=0;n<e.length;n++)i.push(t(e[n],n));return i}var r=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t}}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var a=i[e]={exports:{}},o=!0;try{t[e](a,a.exports,n),o=!1}finally{o&&delete i[e]}return a.exports}n.ab="//";var r={};r.decode=r.parse=n(815),r.encode=r.stringify=n(577),e.exports=r}()},38412:function(e,t,i){"use strict";i.d(t,{O:function(){return s}});var n=i(57437),r=i(54365),a=i(2265),o=i(33998),l=i.n(o);let s=(0,a.memo)(e=>{let{className:t}=e;return(0,n.jsx)("div",{className:(0,r.Z)(l().skeleton,t)})});s.displayName="Skeleton"},18674:function(e,t,i){"use strict";i.d(t,{j:function(){return o}});var n=i(76391),r=i(96742),a=i(91220);let o=e=>{var t,i,o,l;let{tag:s,path:u}=e,d=(0,a.p)(u),c=String(d.amount),m=String(d.period),f=String(d.term),p=d.currency?String(d.currency):void 0,v={term:0,amount:"0",currencyCode:"RUB",withRefill:!1,withCapitalization:!1,withMonthlyPercent:!1,withPreferentialTermination:!1,withPartialWithdrawal:!1},h=(0,n.O)(null==s?void 0:null===(t=s.filter)||void 0===t?void 0:t.currency);return(null==s?void 0:s.filter)&&(v.term=null!==(o=null===(i=s.filter.term.values)||void 0===i?void 0:i[0])&&void 0!==o?o:null===s.filter.term.from||isNaN(Number(s.filter.term.from))?v.term:Number(s.filter.term.from),v.currencyCode=(0,r.z)(h).code,v.withRefill=!!s.filter.refill,v.withCapitalization=1===s.filter.interest_capitalization,v.withMonthlyPercent=!!s.filter.interestsMonthly,v.withPreferentialTermination=!!s.filter.earlyTermination,v.amount=String(null!==(l=s.filter.amount)&&void 0!==l?l:v.amount),v.withPartialWithdrawal=!!s.filter.partial_withdrawal),c&&!isNaN(+c)&&(v.amount=c),m&&!isNaN(+m)&&(v.term=+m),f&&!isNaN(+f)&&(v.term=+f),p&&(0,r.z)(p).code&&(v.currencyCode=(0,r.z)(p).code),v}},40378:function(e,t,i){"use strict";i.r(t),i.d(t,{Deposits:function(){return ec}});var n=i(57437),r=i(5426),a=i(26225),o=i.n(a),l=i(2265),s=i(97793),u=i(90716);let d=e=>(0,u.t9)("/money_data/Fk.json".concat(e?"?bic="+e:""));var c=i(28819),m=i(58580),f=i(94943),p=i(64671),v=i(32046),h=i(81237),g=i(78529),_=i(14441),b=i(34039),y=i(92317),x=i(49394),D=i(35291),P=i(90862),A=i(33600),w=i(18674),C=i(33714),N=i(33145),S={src:"/deposits/_next/static/media/filter.3bae2c9e.svg",height:24,width:24,blurWidth:0,blurHeight:0},M=i(37162),k=i(18589),T=i(72151),I=i(31219),j=i(48034),R=i(70805),F=i(19930),O=i.n(F);let L=(0,l.memo)(e=>{let{terms:t,data:i,length:a,withAdditional:o}=e,{amountData:s,handleTermChange:u,term:d,handleToggleModal:c,handleLoad:m,filterAdditionalSettings:f,handleChangeAdditionalSettings:v,handleAmountChange:h}=i,g=(0,l.useRef)((0,p.b)()),_=(0,l.useCallback)(async e=>{await u(null==e?void 0:e[0]),(0,T.lQ)({event:"data-event",eventCategory:"vklady",eventAction:"filter_catalog",eventLabel:"depositPeriod",eventValue:"не имеет значения"})},[u]),b=(0,j.Z)(0,0,!1),y=(0,l.useCallback)(()=>{(0,r.ld)(M.TM,{offset:b,position:"top"}),m()},[m,b]),x=(0,l.useCallback)(e=>{s.handleChange(e.currentTarget.value,e=>{g.current(async()=>{(0,T.lQ)({event:"data-event",eventCategory:"vklady",eventAction:"filter_catalog",eventLabel:"depositValue",eventValue:e}),await h(Number(e))})})},[s,h]),D=(0,l.useCallback)(e=>{var t;let i=null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"";(0,T.lQ)({event:"data-event",eventCategory:"vklady",eventAction:"click_button_".concat((0,I.b)(i))}),y()},[y]),P=(0,l.useMemo)(()=>d&&[d],[d]);return(0,n.jsx)("div",{className:O().wrapper_container,children:(0,n.jsxs)(r.W2,{className:O().container,children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:O().fields,children:[(0,n.jsx)(r.lF,{id:"amountData",label:"Сумма",value:s.isFocused?s.value:s.formattedValue,className:O().field,...s.events,onChange:x,onKeyDown:e=>(0,k.u)(e,y)}),(0,n.jsx)(r.HU,{className:O().field,label:"Срок",onChange:_,options:t,value:P},null==d?void 0:d.label)]}),o&&(0,n.jsx)(R.y,{filterSettings:f,onToggleAdditionalSettings:v})]}),(0,n.jsxs)("div",{className:O().buttons,children:[(0,n.jsxs)(r.zx,{variant:"secondary",className:O().filterButton,onClick:()=>c(),children:[(0,n.jsx)(N.default,{unoptimized:!0,src:S,alt:""}),"Все параметры"]}),(0,n.jsxs)(r.zx,{onClick:D,className:O().filterButton,children:["Показать ",a]})]})]})})});L.displayName="DepositsFilter";var z=i(54365),E=i(29184),U=i(84213),B=i(20772),Z=i(38412),W=i(36578),Y=i(41506),H=i(85605),V=i.n(H),q=i(44587),G=i(11359),K=i(16639),Q=i(13425),X=i(75109),J=i(69784),$=i(99193),ee=i(81531),et=i.n(ee);let ei=(0,l.memo)(e=>{let{className:t,data:i,discount:a,isPlatform:o=!1,onOpenDetailModal:s,isOldUser:u}=e,{query:d}=(0,_.P)(),{frameId:c,utm_medium:m,utm_campaign:f,utm_source:p,utm_term:v,aggregator_id:h}=d,g=(0,l.useRef)(null),b=(0,l.useMemo)(()=>(0,X.D)(u,i.finuslugiBonusPromotion,a),[u,i.finuslugiBonusPromotion,a]);(0,$.Z)({itemRef:g,eventAction:"show_in_catalog",eventCategory:"vklady",eventLabel:String(i.id)});let y=()=>((0,T.lQ)({event:"data-event",eventLabel:i.id,eventCategory:"vklady",eventAction:"open_row_catalog"}),s({isPlatform:o,href:w,depositItem:i})),x=(0,l.useMemo)(()=>(0,K.Z)({data:i,hideBonusTooltip:!1,discountState:b}),[i,b]),D=(0,l.useMemo)(()=>(0,Q.Z)({data:i,isPlatform:o,renderTip:e=>(0,n.jsx)(G.C,{className:et().detail,iconSrc:q.Z,text:e.description,iconClassName:et().detailIcon,children:e.title})}),[i,o]);if(!x[0])return null;let P=(0,J.Y)({utm_campaign:f,utm_medium:m,utm_source:p,utm_term:v,aggregator_id:h}),A=V().stringify(P),w="/".concat(i.url,"?frameId=").concat(c,"#amount=").concat(i.rateAmount,"&period=").concat(i.term).concat(A.length>0?"&":"").concat(A);return(0,n.jsx)("div",{className:t,ref:g,onClick:()=>{(0,T.lQ)({event:"data-event",eventLabel:i.id,eventCategory:"vklady",eventAction:"learn_more_catalog"})},children:(0,n.jsx)(r.Ad,{type:"deposit",icon:i.logoMob?(0,n.jsx)("div",{className:et().logo,children:(0,n.jsx)(N.default,{unoptimized:!0,width:56,height:56,src:i.logoMob,alt:"logo"})}):(0,n.jsx)("div",{className:et().placeholderLogo}),title:i.bankName||i.name,titleCaption:i.bankName?i.name:"",href:"/widget-vklady"+w,onOpenDetailModal:y,onDetailClick:y,tags:D,target:"_self",advantageAmountFrom:x[0],advantageBonus:x[1],advantageAmountTo:x[2],className:et().uiPlate})})});ei.displayName="DepositsItem";var en=i(9506),er=i.n(en);let ea=e=>{var t;let{banks:i,platformDeposits:a,filter:o,isDiscount:s,isOldUser:u,depositLists:d,discount:m,className:f,isMobile:p,isHiddenPromo:v,questions:h,isPlusFiveBonus:g}=e,{amountData:_,term:b,isLoading:y,isEmpty:x}=o,[D,P]=(0,l.useState)(10),{depositData:A,openModal:w,handleOpen:C,handleClose:N}=(0,Y.j)({banks:i,anotherDeposits:[],platformDeposits:a,newPlatformDeposits:[]}),[S,k]=(0,l.useState)(!1);(0,l.useEffect)(()=>{k("1"!==localStorage.getItem("differentIncomeNotificationClosed"))},[]);let I=()=>{(0,T.lQ)({event:"data-event",eventCategory:"vklady",eventAction:"show_more_products"})};(0,l.useEffect)(()=>{y&&P(10)},[y]);let j=e=>!!e.isNotAmount||!!e.isTermEmpty||!!e.computeData,[R,F]=(0,l.useState)(d.platform.filter(e=>j(e)));return(0,l.useEffect)(()=>{F(d.platform.filter(e=>j(e)))},[d]),(0,n.jsxs)("section",{id:M.TM,className:(0,z.Z)(er().container,f),children:[(0,n.jsxs)(c.t,{children:[(0,n.jsxs)("p",{className:er().title,children:[(0,n.jsxs)("span",{children:["Найдено ",d.currentLength,!p&&" "+(0,W._6)(d.currentLength,"предложение","предложения","предложений")]})," ",(0,n.jsxs)("span",{children:[" ",!x&&"из ".concat(d.allLength)," "]})]}),(0,n.jsx)(E.Y,{className:er().disclaimer,text:"Все вклады застрахованы в АСВ"})]}),(0,n.jsx)(B.Z,{isDesktop:!p,filter:o,isDiscount:s,withHeader:!1}),(0,n.jsxs)(c.t,{children:[d.platform.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:er().listTitle,children:"Онлайн вклады от Финуслуг"}),S&&(0,n.jsx)("div",{className:er().notificationBlock,children:(0,n.jsx)(r.P_,{caption:"",description:"Доход по вкладам с одной ставкой может отличаться из-за разницы в количестве дней вклада",isClose:!0,link:"",onClose:()=>{localStorage.setItem("differentIncomeNotificationClosed","1"),k(!1)},size:"XL",status:"info",title:""})})]}),!y&&R.slice(0,D).filter(e=>v?!e.promo:e).map(e=>(0,n.jsx)(l.Fragment,{children:(0,n.jsx)("div",{"data-qa":"platform",children:(0,n.jsx)(ei,{isPlatform:!0,onOpenDetailModal:C,className:er().listItem,isOldUser:u,discount:m,data:e},e.url+e.id)})},e.url)),y&&Array.from({length:6},(e,t)=>(0,n.jsx)(Z.O,{className:er().listItem},t)),!y&&d.platform.length>D&&(0,n.jsx)(r.zx,{size:"s",onClick:()=>{I(),P(e=>e+10)},className:er().button,variant:"secondary",children:"Смотреть еще предложения"})]}),A&&(0,n.jsx)(U.Z,{data:A,discount:m,isOpen:w,isOldUser:u,depositSumm:_.value,depositTerm:null!==(t=null==b?void 0:b.label)&&void 0!==t?t:"Любой",onClose:N,questions:h,isPlusFiveBonus:g,initialAmount:Number(_.value),initialTermInMonths:Number(b.value),eventCategory:"deposits_details_widget-vklady_popup"})]})};var eo=i(34200);let el=[{value:0,label:"Любой"},{value:1,label:"1 месяц"},{value:2,label:"2 месяца"},{value:3,label:"3 месяца"},{value:4,label:"4 месяца"},{value:5,label:"5 месяцев"},{value:6,label:"6 месяцев"},{value:9,label:"9 месяцев"},{value:12,label:"1 год"},{value:18,label:"1,5 года"},{value:24,label:"2 года"},{value:36,label:"3 года"},{value:48,label:"4 года"},{value:60,label:"5 лет"}];eo.a.deposits,eo.a.bonds;var es=i(4905),eu=i.n(es);let ed=(0,p.b)(),ec=e=>{let{depositsControl:t,depositTag:i,currencies:a,discounts:u,bankTowns:p,initialPlatformDeposits:N,questions:S,aggregatorIds:M}=e,k=(0,r._m)("l"),{asPath:T}=(0,_.P)(),{bonuses:I,isPlusFiveBonus:j,isOldUser:R,isHiddenPromo:F}=(0,x.Z)(u),[O,z]=(0,l.useState)(j||R),[E,U]=(0,l.useState)([]),[B,Z]=(0,l.useState)([]),[W,Y]=(0,l.useState)(!0);(0,l.useEffect)(()=>{(async()=>{var e;let[t,n]=await Promise.all([(0,s.vI)(),d()]);if(null==t?void 0:t.data){let e=t.data.products,n=Array.from({length:t.data.boundaryValues.totalPages-1},(e,t)=>(0,s.vI)("active",{page:t+1})),r=[...e,...(await Promise.all(n)).flatMap(e=>{var t,i;return null!==(i=null===(t=e.data)||void 0===t?void 0:t.products)&&void 0!==i?i:[]})];(null==i?void 0:i.url)!==f.z.nakop&&(r=r.filter(e=>!e.asSavingAccount)),Z(r)}(null==n?void 0:null===(e=n.data)||void 0===e?void 0:e.banks)&&U(n.data.banks.filter(e=>Number(e.active))),Y(!1)})()},[null==i?void 0:i.url]);let H=(0,l.useMemo)(()=>(0,w.j)({depositsControl:null==t?void 0:t[0],path:T,tag:i}),[T,t,i]),V=(0,C.L)({tag:i,currencies:a,banks:E,defaultValues:H,isDiscount:O}),q=(0,h.I)(),G=(0,l.useMemo)(()=>({initialAnotherDeposits:[],initialPlatformDeposits:N,platformDeposits:B,anotherDeposits:[],bounds:[],isPlusFiveBonus:j,isOldUser:R,filter:{amount:V.amountData.value,currency:String(V.currencyUnit),withRefill:V.withRefill,filterAdditionalSettings:V.filterAdditionalSettings,importantDeposits:V.importantDeposits,initialSort:V.initialSort,order:V.increaseSort?A.mr.Desc:A.mr.Asc,sortType:V.sortType,isDiscount:O,term:V.term?Number(V.term.value):void 0,withCapitalization:V.withCapitalization,activeBanks:V.activeBanks?V.activeBanks.map(e=>String(e.value)):void 0,withMonthlyPercent:V.withMonthlyPercent,withPreferentialTermination:V.withPreferentialTermination},banks:E,discounts:I,bankTowns:p,town:null,region:null,allExtraInfo:{},getOnlyInitialData:W}),[N,B,j,R,V.amountData.value,V.currencyUnit,V.withRefill,V.filterAdditionalSettings,V.importantDeposits,V.initialSort,V.increaseSort,V.sortType,V.term,V.withCapitalization,V.activeBanks,V.withMonthlyPercent,V.withPreferentialTermination,O,E,I,p,W]),[K,Q]=(0,l.useState)(()=>(0,D.O)(G)),X=null==I?void 0:I.find(e=>"five_procent"===e.unique_key);(0,l.useEffect)(()=>{ed(()=>Q((0,D.O)(G)))},[G]),(0,l.useEffect)(()=>{z(K.platform.some(e=>e.hasDiscount))},[K]);let{fitsForMonthlyPercentFilter:J,fitsForPreferentialTerminationFilter:$,fitsForCapitalization:ee,fitsForRefill:et}=K;return(0,y.z)({showMonthlyPercent:J,showPreferentialTermination:$,showCapitalization:ee,showRefill:et,filter:V}),(0,g.j)(),(0,b.Z)(M),(0,n.jsxs)("main",{className:eu().page,children:[(0,n.jsxs)(o(),{children:[(0,n.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"},"viewport"),(0,n.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,n.jsx)(c.t,{className:eu().filterContainer,children:(0,n.jsx)(L,{length:K.currentLength,data:V,terms:el,withAdditional:!K.boundsIsEmpty})}),(0,n.jsx)(ea,{filter:V,isDiscount:O,isOldUser:R,banks:E,platformDeposits:B,depositLists:K,adFoxConfig:q,discount:X,isMobile:!k,isHiddenPromo:F,questions:S,existTag:!(0,v.L)(i),isPlusFiveBonus:j,pageUrl:m.a.VKLADY}),(0,n.jsx)(P.s,{data:V,isDiscount:O,isMobile:!k,terms:el,depositsLength:K.currentLength,withAdditional:!K.boundsIsEmpty,showMonthlyPercent:J,showPreferentialTermination:$,showCapitalization:ee,showRefill:et,partnerId:null,drawerClassName:eu().filterModal})]})}},94943:function(e,t,i){"use strict";var n,r;i.d(t,{z:function(){return r}}),(n||(n={})).HTML="html",(r||(r={})).nakop="nakopitelnye"},35291:function(e,t,i){"use strict";i.d(t,{O:function(){return j}});var n=i(34200),r=i(6164),a=i(91627),o=i(40309),l=i(44579),s=i(14438);let u=e=>{let{type:t,value:i}=e;switch(!0){case t===r.e.DAY:return Math.round(i/a.F);case t===r.e.MONTH:return i;case t===r.e.YEAR:return 12*i;default:return 0}},d=e=>{let{type:t,value:i}=e;switch(!0){case t===r.e.DAY:return i;case t===r.e.MONTH:return Math.round(i*a.F);case t===r.e.YEAR:return Math.round(365*i);default:return 0}},c=e=>{let t=e.filter(e=>e.active);if(!t.length)return null;let i=t[0].currencies[0],n=i.rates[0];return t.reduce((e,t)=>{let r=t.currencies.reduce((e,t)=>{let i=t.rates.reduce((e,t)=>{let{maximumRate:i}=t;return i>e.maximumRate?t:e},t.rates[0]);return i.maximumRate>e.rate.maximumRate?{...t,rate:i}:e},{...i,rate:n});return r.rate.maximumRate>e.currency.rate.maximumRate?{...t,currency:r}:e},{...t[0],currency:{...i,rate:n}})},m=e=>{let{deposits:t,banks:i,specialDeposits:n}=e;return t.length?t.map(e=>{var t,r,a;let{contentAttributes:m,provider:f}=e,p=null!==(r=i[m.bic])&&void 0!==r?r:i[Number(f.bic)];if(!p)return;let v=c(e.attributes.options);if(!v)return;let{currency:{rate:h}}=v,g=(0,s.ax)({rate:h.maximumRate,depositSum:h.minimumAmount,isCapitalization:!1,term:d(h.minimumPeriod),period:l.Z.Day,paymentFrequency:o.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!==(a=null===(t=n[e.id])||void 0===t?void 0:t.order)&&void 0!==a?a:null,term:u(h.minimumPeriod),isNotAmount:!0,isTermEmpty:!0,asSavingAccount:e.attributes.asSavingAccount}}).filter(Boolean):[]};var f=i(59687),p=i(33600),v=i(91586),h=i(94966),g=i(7913);let _={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(),i=e.getDate();return t in _&&_[t].includes(i)}},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||{},i=t.minCouponPaymentSizePercent,n=e.income,r=t.price?t.price.total:1e3,o=y(Math.floor(e.depositValue/r)*r),l=Math.round(e.depositPeriod*a.F);return n&&o&&l?y(n/o*365/l*100,1):i},D=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},A=(e,t)=>{let i=e.bond&&e.bond.api_data&&e.bond.api_data.product||{},n=i.price&&i.price.base,r=i.price?i.price.total:1e3,a=Math.floor(e.depositValue/r),o=y(a*r),l=(i.eventsData&&i.eventsData.events||[]).filter(e=>"INTR"===e.type),s=l.findIndex(e=>{let i=D(e.eventDate);return i.setHours(23),i.setMinutes(59),i.setSeconds(59),i.setMilliseconds(0),t>=D(e.eventStartDate)&&t<=i}),u=0;if(s>=0){let e=l[s],i=Math.floor((t.getTime()-D(e.eventStartDate).getTime())/864e5),r=y(e.paymentSizePercent*n*i/36500);return s>=1&&(u=l.slice(0,s).reduce((e,t)=>y(e+t.paymentSize),0)),y(a*n+a*r+a*u-o)}return 0},w=e=>{let t=D(P(new Date));return t.setDate(t.getDate()+e),t},C=e=>{let t=Math.round(e.depositPeriod*a.F);return e?A(e,w(t)):0};var N=i(19612),S=i(75109),M=i(84456),k=i(91342);let T=(e,t,i)=>e.filter(e=>t.length?t.includes(String(e.id)):!!i[e.id]||!e.archive),I=(e,t)=>e.filter(e=>t.length?t.includes(String(e.id)):!e.archive);function j(e){var t,i;let{initialPlatformDeposits:r=[],initialAnotherDeposits:u=[],initialLeadGenDeposits:d=[],filter:c,region:_,town:b,discounts:D,anotherDeposits:P,platformDeposits:A,newPlatformDeposits:w,bankTowns:j,banks:R,bounds:F,allExtraInfo:O,isPlusFiveBonus:L,isOldUser:z,anotherDepositsInCount:E=!0,getOnlyInitialData:U=!1,specialDeposits:B={},leadGenDeposits:Z=[],initialAllDepositsLength:W,initialCurrentDepositsLength:Y,calculateFilterAbilities:H=!0,withSavingAccounts:V=!1,shouldFilterByAllOffers:q=!1,allOffers:G=null}=e,{amount:K,term:Q,sortType:X,order:J,importantDeposits:$=[],filterAdditionalSettings:ee=[n.a.bonds,n.a.deposits]}=c;if(U)return function(e){let{initialPlatformDeposits:t,initialAnotherDeposits:i,anotherDepositsInCount:n,initialLeadGenDeposits:r,initialAllDepositsLength:a,initialCurrentDepositsLength:o}=e,l=t.length+(n?i.length:0);return{platform:t,another:i,leadGen:r,allLength:a||l,currentLength:o||l,boundsIsEmpty:!0,fitsForMonthlyPercentFilter:!0,fitsForPreferentialTerminationFilter:!0,fitsForCapitalization:!0,fitsForRefill:!0}}({initialPlatformDeposits:r,initialAnotherDeposits:u,anotherDepositsInCount:E,initialLeadGenDeposits:d,initialAllDepositsLength:W,initialCurrentDepositsLength:Y});let et=null==D?void 0:D.find(e=>"five_procent"===e.unique_key),ei={...c,amount:K?Number(K):null,term:Number(null!=Q?Q:0)},en=null==R?void 0:R.reduce((e,t)=>({...e,[Number(t.bic)]:t}),{}),er=function(e){let{bounds:t,filter:i,isValid:n}=e;if(!n)return[];let{amount:r,term:a,currency:o}=i;return t.reduce((e,t)=>{var i,n;let l=(t&&(null===(i=t.api_data)||void 0===i?void 0:i.product)||{}).minCouponPaymentSizePercent,s={bond:t,depositValue:null!=r?r:0,depositPeriod:a},u=C(s),d=u<=5e6?.87:.85,c=r?y(x({...s,income:u})*d):l,m=u*d;if(c<=0||m<=0)return e;let f=Math.round(30.4375*s.depositPeriod);return[...e,{name:t.name,url:t.url,id:t.id,logoMob:null!==(n=t.image_url)&&void 0!==n?n:"",rateAmount:c,computeData:{result:m,profit:m,rate:c,effectiveRate:c,bonus:0,bonusRate:0,termDays:f,onlyBonusFloatingRate:0},currencyUnit:null!=o?o:"₽",tag:t.tag,term:null!=a?a:0,isBound:!0,isArchived:!1,amount:null!=r?r:0,type:p.kv.Bond,specialOrder:null,bic:""}]},[])}({bounds:$.length?F.filter(e=>$.includes(String(e.id))):F,filter:ei,isValid:ee.includes(n.a.bonds)}),ea=ee.includes(n.a.deposits),{items:eo,...el}=function(e){let{deposits:t,banks:i,allExtraInfo:n,filter:r,region:u,discount:d,isOldUser:c,isPlusFiveBonus:m,isValid:f,specialDeposits:h}=e;return f?t.reduce((e,t)=>{var f,g;let _=function(e){var t,i,n;let{deposit:r,normalizedBanks:u,filter:d,allExtraInfo:c,region:m,isOldUser:f,isPlusFiveBonus:h,discount:g}=e,{amount:_,term:b,currency:y,withMonthlyPercent:x=!1,withPreferentialTermination:D=!1,withCapitalization:P,withRefill:A}=d,w=null==u?void 0:u[Number(r.bic)],C=null,k=_,T=Math.round(b*a.F),I=null,j=!!r.options[0].replenishment||r.asSavingAccount,R=!!r.options[0].partialWithdrawal,F="CAPITALISATION"===r.options[0].interestPayments[0].method,O=r.options[0].currencies[0],L=[],z=c[r.internalUrl],E=function(e){let{deposit:t,region:i,bankId:n,filter:r,currencyUnit:a}=e,o=!t.regions||!(null==i?void 0:i.region_id)||t.regions.includes(+i.region_id),l=(0,s.EP)(r,n);return(!a||"₽"===a)&&l&&o}({deposit:r,region:m,currencyUnit:y,filter:d,bankId:String(null==w?void 0:w.id)}),U=!1;if(E){let e=r.options.filter(e=>e.active);U=e[0].rateType===v.e4.FLOATING,e.forEach(e=>{var t;null===(t=e.currencies)||void 0===t||t.forEach(t=>{let i=function(e,t){var i;if((null==t?void 0:null===(i=t.algo)||void 0===i?void 0:i.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);i.forEach(e=>L.push(e.minimumAmount));let n=[...i].sort((e,t)=>t.minimumRate-e.minimumRate).find(e=>{let t="number"!=typeof _||e.minimumAmount&&e.minimumAmount<=_&&(!e.maximumAmount||e.maximumAmount>=_),i=!b||(!e.minimumPeriod||Math.round((0,M.I)(e.minimumPeriod)/a.F)<=b)&&(!e.maximumPeriod||Math.round((0,M.I)(e.maximumPeriod)/a.F)>=b);return t&&i});if(!n||n.minimumRate<Number(C))return;let{nextRefill:r,nextPartialWithdrawal:o,nextIsCapitalization:l,nextRate:s,nextTerm:u,nextTag:d,nextAmount:c}=function(e){var t,i;let{option:n,depositRate:r,currentTerm:a,currentAmount:o}=e;return{nextRefill:!!n.replenishment,nextPartialWithdrawal:!!n.partialWithdrawal,nextIsCapitalization:!!n.interestPayments.find(e=>!e.accountFromCustomer&&"CAPITALISATION"===e.method),nextRate:r.minimumRate,nextTag:null!==(i=null===(t=r.tags)||void 0===t?void 0:t.title)&&void 0!==i?i:null,nextTerm:function(e,t){let i=e,n=t.minimumPeriod&&(0,M.I)(t.minimumPeriod),r=t.maximumPeriod&&(0,M.I)(t.maximumPeriod);return n&&e<n&&(i=n),r&&e>r&&(i=r),i}(a,r),nextAmount:o||r.minimumAmount}}({depositRate:n,option:e,currentTerm:T,currentAmount:k});j=r,R=o,F=l,C=s,I=d,T=u,k=c})})}let B=!j&&!R&&F,{finuslugiBonusAllowed:Z,finuslugiBonusPromotion:W,floatingRateInformations:Y}=r,H=(0,N.p)({currentAmount:null!=_?_:0,finuslugiBonusAllowed:Z,finuslugiBonusPromotion:W,isPlusFiveBonus:h,isOldUser:f,terms:Math.round(b*a.F)}),V=H?f?(0,S.pW)(W):g:null,q=(0,s.ax)({rate:C,depositSum:k,isCapitalization:B,discount:V,term:T,period:l.Z.Day,paymentFrequency:function(e){var t,i,n,r,a;let l=null===(a=e.options)||void 0===a?void 0:null===(r=a[0].interestPayments)||void 0===r?void 0:null===(n=r[0])||void 0===n?void 0:null===(i=n.periods)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.type;return"MONTHLY"===l?o.Z.OnceAMonth:"DAILY"===l?o.Z.EveryDay:o.Z.InTheEnd}(r),floatingRateInformations:Y});if(!q)return;let G=(0,s.PF)(r,j);if(!(0,s.Oh)({computedFlags:G,currentFilters:{withCapitalization:P,withMonthlyPercent:x,withPreferentialTermination:D,withRefill:A}}))return{...G};let K={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==w?void 0:w.legal_entities),logoMob:null!==(i=null==w?void 0:w.logo_mob)&&void 0!==i?i:"",bankName:null!==(n=null==w?void 0:w.name)&&void 0!==n?n:""};return{deposit:{name:r.name,url:r.internalUrl,id:r.id,bic:r.bic,exclusive:r.exclusive,isNotAmount:!_,isRefill:j,rateAmount:k,computeData:q,currencyUnit:y,tag:I,isCapitalization:F,term:b||Math.round(T/a.F),isArchived:!!r.archive,isTermEmpty:0===b,tags:null!==(t=r.tags)&&void 0!==t?t:[],promo:r.promo,finuslugiBonusAllowed:Z,finuslugiBonusPromotion:null!=W?W:null,floatingRateInformations:null!=Y?Y:null,amount:Math.min(...L),type:r.asSavingAccount?p.kv.SavingAccount:p.kv.Deposit,hasDiscount:H,currencies:O,asSavingAccount:r.asSavingAccount,isFloating:U,...K},...G}}({deposit:t,normalizedBanks:i,filter:r,allExtraInfo:n,region:u,isOldUser:c,isPlusFiveBonus:m,discount:d});return _&&(e.hasMonthlyPercent||(e.hasMonthlyPercent=_.hasMonthlyPercent),e.hasPreferentialTermination||(e.hasPreferentialTermination=_.hasPreferentialTermination),e.hasCapitalization||(e.hasCapitalization=_.hasCapitalization),e.hasRefill||(e.hasRefill=_.hasRefill),_.deposit&&e.items.push({..._.deposit,specialOrder:null!==(g=null===(f=h[t.id])||void 0===f?void 0:f.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:T(A,$,B),isOldUser:z,isPlusFiveBonus:L,discount:et,filter:ei,banks:en,allExtraInfo:O,region:_,isValid:ea,specialDeposits:B}),es=q&&(null==G?void 0:G.length)?G:P,{items:eu,...ed}=(0,g.Z)({deposits:I(es,$),filter:ei,banks:R,bankTowns:j,cityId:null!==(t=null==b?void 0:b.id)&&void 0!==t?t:null==_?void 0:_.id,isValid:ea}),ec={sortType:X,increaseSort:"desc"===J},em=[...er,...eo].sort((e,t)=>(0,k.Z)({deposit1:e,deposit2:t,isLeadGen:!1,...ec})),ef=[...eu].sort((e,t)=>(0,k.Z)({deposit1:e,deposit2:t,isLeadGen:!0,...ec})),ep=[...m({deposits:Z,banks:en,specialDeposits:B})].sort((e,t)=>(0,k.Z)({deposit1:e,deposit2:t,isLeadGen:!1,...ec})),ev=function(e){let{deposits:t,banks:i,sum:n=0,term:r=0,withSavingAccounts:a,isPlusFiveBonus:o}=e;return t.filter(e=>!e.archive&&(!e.asSavingsAccount||a)).map(e=>{var t;let a=i[Number(e.bic)],{name:l,withCapitalization:u,withRefill:d,finuslugiBonusAllowed:c,floatingRateInformations:m,minimumAmount:g,minimumTermInDays:_,rate:b,bonusProfit:y,bonusRate:x,baseProfit:D,tags:P,promo:A,profitTerm:w,internalUrl:C,id:N,bic:S,asSavingsAccount:M,rateType:k,optionId:T}=e,{onlyBonusFloatingRate:I}=(0,s.Pp)(b,m);return{name:l,url:C,id:N,bic:S,exclusive:e.exclusive,isNotAmount:!n,isRefill:d,rateAmount:n&&r?n:g,computeData:{result:D,bonus:y,profit:D,effectiveRate:b,bonusRate:x,termDays:w>0?w:_,onlyBonusFloatingRate:I},currencyUnit:f.rO,isCapitalization:u,term:Math.round((w>0?w:_)/30),isArchived:!!e.archive,isTermEmpty:!r,tags:null!=P?P:[],promo:A,finuslugiBonusAllowed:c,amount:n,type:M?p.kv.SavingAccount:p.kv.Deposit,hasDiscount:c&&o,asSavingAccount:M,isFloating:k===v.e4.FLOATING,logoMob:(0,h.B)(S),bankName:null!==(t=null==a?void 0:a.name)&&void 0!==t?t:"",specialOrder:null,optionId:T}})}({deposits:null!=w?w:[],banks:en,sum:Number(c.amount),term:c.term,withSavingAccounts:V,isPlusFiveBonus:L}),eh=A.length+(E?es.length:0)+ev.length,eg=null!==(i=null!=W?W:eh)&&void 0!==i?i:0;return{notInitialDeposits:!0,platform:ev.length>0?ev:em,another:ef,leadGen:ep,allLength:eg,currentLength:em.length+(E?ef.length:0)+ev.length,boundsIsEmpty:0===er.length,fitsForMonthlyPercentFilter:!H||el.hasMonthlyPercent||ed.hasMonthlyPercent,fitsForPreferentialTerminationFilter:!H||el.hasPreferentialTermination||ed.hasPreferentialTermination,fitsForCapitalization:!H||el.hasCapitalization||ed.hasCapitalization,fitsForRefill:!H||el.hasRefill||ed.hasRefill}}},69784:function(e,t,i){"use strict";function n(e){return Object.fromEntries(Object.entries(e).filter(e=>void 0!==e[1]))}i.d(t,{Y:function(){return n}})},81237:function(e,t,i){"use strict";i.d(t,{I:function(){return r}});var n=i(2265);let r=()=>{let[e,t]=(0,n.useState)();return(0,n.useEffect)(()=>{window&&window.Ya&&window.yaContextCb&&t({ownerId:406293,Ya:window.Ya,yaContextCb:window.yaContextCb})},[]),e}},78529:function(e,t,i){"use strict";i.d(t,{j:function(){return a}});var n=i(2265),r=i(14441);let a=()=>{let{frameId:e}=(0,r.P)().query;(0,n.useEffect)(()=>{new ResizeObserver(t=>{let i=t[0].target;window.parent.postMessage({type:"resize",frameId:e,height:i.scrollHeight},"*")}).observe(document.body)},[e])}},92317:function(e,t,i){"use strict";i.d(t,{z:function(){return o}});var n=i(21652),r=i.n(n),a=i(2265);function o(e){let{filter:t,showCapitalization:i,showMonthlyPercent:n,showPreferentialTermination:o,showRefill:l,disabled:s=!1}=e,{withCapitalization:u,withMonthlyPercent:d,withPreferentialTermination:c,withRefill:m,handleWithCapitalizationChange:f,handleWithMonthlyPercentChange:p,handleWithPreferentialTerminationChange:v,handleWithRefillChange:h}=t,g=(0,a.useMemo)(()=>({withCapitalization:u,withMonthlyPercent:d,withPreferentialTermination:c,withRefill:m}),[u,d,c,m]),_=(0,a.useRef)(g);(0,a.useEffect)(()=>{if(!s){if(!r()(_.current,g)){_.current=g;return}c&&!o&&v(!1),d&&!n&&p(!1),u&&!i&&f(!1),m&&!l&&h(!1)}},[s,g,f,p,v,h,i,n,o,l,u,d,c,m])}},49394:function(e,t,i){"use strict";i.d(t,{Z:function(){return l}});var n=i(2265),r=i(7006),a=i(26876),o=i(53931);function l(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],l=(0,o.$1)(),s=(null==l?void 0:l["auth.gtm_customer_id"])||null,[u]=(0,n.useState)(i&&null!=e?e:[]),[d,c]=(0,n.useState)(!1),[m,f]=(0,n.useState)(!0),[p,v]=(0,n.useState)(!1),[h,g]=(0,n.useState)(t&&!!s);return(0,n.useEffect)(()=>{s&&i&&(g(!0),(0,r.M)(s).then(e=>{let{data:t}=e;(!t||(null==t?void 0:t.features))&&t&&!t.features.includes(a.n.SHOW_ADDITIONAL_PERCENT_BONUS)&&(f(!1),v(!0),c(!0))}).finally(()=>{g(!1)}))},[s,i]),{customerId:s,isOldUser:p,isPlusFiveBonus:m,isHiddenPromo:d,isDiscountsLoading:h,bonuses:u}}},33998:function(e){e.exports={skeleton:"Skeleton_skeleton__QIS3q",move:"Skeleton_move__TZqyh"}},4905:function(e){e.exports={page:"Deposits_page__nEYw7",filterContainer:"Deposits_filterContainer__zDdVw",adFox:"Deposits_adFox__7jlOm",sectionWrapper:"Deposits_sectionWrapper__6VmUe",whiteBackground:"Deposits_whiteBackground__5Oa50",filterModal:"Deposits_filterModal__eAhz6"}},19930:function(e){e.exports={title:"DepositsFilter_title__9nYDh",link:"DepositsFilter_link__H_LKQ",subTitle:"DepositsFilter_subTitle__o7Ruj",hidden:"DepositsFilter_hidden__5WYrL",wrapper_container:"DepositsFilter_wrapper_container__V7K5Z",container:"DepositsFilter_container__4vscy",fields:"DepositsFilter_fields__qtSWn",field:"DepositsFilter_field__o3q_7",buttons:"DepositsFilter_buttons__ducS6",filterButton:"DepositsFilter_filterButton__I_tSX",tags:"DepositsFilter_tags__eWar_",tag:"DepositsFilter_tag__FUNHx"}},81531:function(e){e.exports={logo:"DepositsItem_logo__OIZPS",placeholderLogo:"DepositsItem_placeholderLogo__jxqvV",detailIcon:"DepositsItem_detailIcon__R_dh0",uiPlate:"DepositsItem_uiPlate__yuM7P",detail:"DepositsItem_detail__gUqpH"}},9506:function(e){e.exports={title:"DepositsList_title__xyCoM",listTitle:"DepositsList_listTitle__CytGx",container:"DepositsList_container__9IYCd",disclaimer:"DepositsList_disclaimer__cADCD",listItem:"DepositsList_listItem__EAsw6",button:"DepositsList_button__KLcyG",adFox:"DepositsList_adFox__Ukqvd",bondsInfo:"DepositsList_bondsInfo__PeE6R",bondsLink:"DepositsList_bondsLink__hBfot",adv:"DepositsList_adv__6oR83",subTitle:"DepositsList_subTitle__nPTwd",notificationBlock:"DepositsList_notificationBlock__8RMm_"}}},function(e){e.O(0,[582,6748,8460,1302,5520,97,1448,1576,680,5501,5458,207,3544,3903,5346,871,8401,3145,5234,7634,1792,9066,3963,2462,6041,6149,5939,338,3656,2971,2117,1744],function(){return e(e.s=79369)}),_N_E=e.O()}]);