(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6041],{82619:function(e,t,n){"use strict";n.d(t,{y:function(){return x}});var a=n(57437),i=n(75461),l=n(5426),o=n(54365),r=n(33145),s=n(2265),c=n(76670),u=n(81486),d=n(92449),_=n(75873),m=n(72151),p=n(31219),h=n(48034),f=n(29184),v=n(73927),g=n.n(v);let x=(0,s.memo)(e=>{let{title:t,content:n,pageUrl:v,infoLink:x,chips:D,isMobile:C,isShowChips:b,isExpandSettings:y,onToggleSettings:k,isSavingAccount:A,titleClassName:N,calculatorClassName:P,chevronSrc:j=c.Z,withNewMarkup:T,eventCategory:w,productId:S}=e,I=(0,i.s4)(),L=e=>{(0,_.D)({eventCategory:v,eventAction:_.i.popup,eventActionText:e}),null==k||k()},O=(0,h.Z)(10),M=(0,s.useCallback)(()=>{x&&(T&&(0,m.lQ)({eventCategory:w,eventLabel:S,eventAction:"click_".concat((0,p.b)(x.text))}),(0,l.ld)(x.idScrollBlock,{offset:O,position:"top"}))},[w,x,S,O,T]);return(0,a.jsxs)(l.W2,{className:(0,o.Z)(g().container,P),children:[(0,a.jsxs)("button",{className:(0,o.Z)(g().title,A&&g().marginNone,N),"data-testid":"calculator-settings-button",onClick:()=>L(t),children:[t,(0,a.jsx)(r.default,{className:(0,o.Z)(g().collapseArrow,y&&g().collapseArrowOpened),src:j,alt:""})]}),(0,a.jsxs)(d.u,{className:(0,o.Z)(g().fieldsContainer,!I&&g().initialCollapsed),isOpen:y||!C,children:[(0,a.jsx)("div",{className:g().fieldsWrapper,children:n}),(0,a.jsx)(f.Y,{className:g().disclaimer,text:"Все ".concat(A?"счета":"вклады"," застрахованы в АСВ")})]}),x&&x.isShow&&(0,a.jsx)(u.j,{offPadding:x.offPadding,widthMaxContent:x.widthMaxContent,text:x.text,iconColor:"light",mainPageUrl:v,className:g().link,onClick:M,isCustomMarkup:T}),b&&!A&&(0,a.jsx)(l.ev,{className:(0,o.Z)(g().chips,!I&&g().initialChips),options:D,selected:D,multiple:!0,theme:"secondary",size:"medium"})]})});x.displayName="Calculator"},29184:function(e,t,n){"use strict";n.d(t,{Y:function(){return u}});var a=n(57437),i=n(54365),l=n(33145),o=n(2265),r={src:"/deposits/_next/static/media/ASV-square.dfc8f22f.svg",height:24,width:24,blurWidth:0,blurHeight:0},s=n(82042),c=n.n(s);let u=(0,o.memo)(e=>{let{text:t,className:n,hideIcon:o=!1}=e;return(0,a.jsxs)("p",{className:(0,i.Z)(c().disclaimer,n),children:[!o&&(0,a.jsx)(l.default,{className:c().iconASV,src:r,alt:"Иконка АСВ"}),t]})});u.displayName="DepositDisclaimer"},23468:function(e,t,n){"use strict";n.d(t,{M:function(){return d}});var a=n(57437),i=n(5426),l=n(54365),o=n(50666),r=n(2265),s=n(75873),c=n(33176),u=n.n(c);let d=(0,r.memo)(e=>{let{className:t,url:n,text:r,title:c}=e;return(0,a.jsxs)(i.W2,{className:(0,l.Z)(u().container,t),children:[(0,a.jsx)("h3",{className:u().title,dangerouslySetInnerHTML:{__html:c}}),(0,a.jsx)("h4",{className:u().text,dangerouslySetInnerHTML:{__html:r}}),(0,a.jsx)(i.zx,{as:"a",variant:"purple",href:"/".concat(n),onClick:()=>{(0,s.D)({eventCategory:n,eventAction:s.i.button,eventActionText:"Подобрать предложение",url:"".concat((0,o.env)("NEXT_PUBLIC_BASE_URL"),"/").concat(n)})},className:u().button,children:"Подобрать предложения"})]})});d.displayName="ArchivePromo"},21301:function(e,t,n){"use strict";n.d(t,{V:function(){return c}});var a=n(57437),i=n(54365),l=n(44587),o=n(11359),r=n(281),s=n.n(r);let c=e=>{let{className:t,text:n,tooltipText:r,theme:c="primary",tipIcon:u,onTooltipOpen:d}=e;return(0,a.jsx)("div",{className:(0,i.Z)(s().tag,{[s().tagPrimary]:"primary"===c,[s().tagSecondary]:"secondary"===c,[s().tagPink]:"pink"===c,[s().tagYellow]:"yellow"===c},t),children:r&&(0,a.jsx)(o.C,{className:s().detail,iconSrc:l.Z,text:r,iconClassName:s().detailIcon,icon:u,onOpen:()=>null==d?void 0:d(n),children:(0,a.jsx)("span",{className:s().text,children:n})})})}},91627:function(e,t,n){"use strict";n.d(t,{F:function(){return a}});let a=30.416},72096:function(e,t,n){"use strict";n.d(t,{$k:function(){return i},k5:function(){return l},kJ:function(){return a}});let a=[{label:"Добавлять ко вкладу (капитализация)",value:"add"},{label:"Выплачивать",value:"dont_add"}],i=[{label:"В конце срока",value:"end"},{label:"Ежедневно",value:"daily"},{label:"Раз в месяц",value:"1"},{label:"Раз в квартал",value:"3"},{label:"Раз в полгода",value:"6"},{label:"Раз в год",value:"12"}],l=[{label:"Не предусмотрено",value:"0"},{label:"Раз в месяц",value:"1"},{label:"Раз в 2 месяца",value:"2"},{label:"Раз в квартал",value:"3"},{label:"Раз в 4 месяца",value:"4"},{label:"Раз в полгода",value:"6"},{label:"Раз в год",value:"12"}]},32523:function(e,t,n){"use strict";n.d(t,{n:function(){return z}});var a=n(57437);n(38068);var i=n(53685),l=n(5426),o=n(54365),r=n(2265),s=n(21301),c=n(69589),u=n(14862),d=n(44579),_=n(35563),m=n(32817),p=n.n(m);function h(e){let{loading:t}=e;return(0,a.jsxs)("div",{className:(0,o.Z)(p().skeletonContainer,t&&p().visible),children:[(0,a.jsx)(_.Od,{className:p().skeletonDate}),(0,a.jsx)(_.Od,{className:p().skeletonProfit})]})}var f=n(27648),v=n(11359),g=n(87566),x=n(23e3),D=n.n(x);function C(e){let{rowCount:t,loading:n}=e;return(0,a.jsx)("div",{className:(0,o.Z)(D().skeletonContainer,n&&D().visible),children:Array.from(Array(t).keys()).map(e=>(0,a.jsx)(_.Od,{className:D().skeleton},e))})}var b=n(70104),y=n(72151),k=n(31219),A=n(90297),N=n.n(A);function P(e){var t;let{withNewMarkup:n,rate:i,effectiveRate:o,hideExternalLinks:s,profit:c,unit:u,extraInfo:d,isSavingAccount:_,salaryToggle:m,setSalaryToggle:p,discount:h,bonus:x,firstDepositBonusTitle:D,tipIcon:A,switchRate:P,onSwitchRate:j,isRateSwitched:T,eventCategory:w,productId:S,isCombo:I=!1,isLoading:L}=e,O=(0,r.useCallback)(()=>{j&&(j(!T),(0,y.lQ)({event:"data-event",eventAction:"click_button_perekluchit_stavku",eventCategory:w,eventLabel:S}))},[j,T,w,S]),M=(0,r.useCallback)(e=>()=>{(0,y.lQ)({event:"data-event",eventAction:"click_link_".concat((0,k.b)(e)),eventCategory:w,eventLabel:S})},[w,S]),E=(0,r.useMemo)(()=>{var e;let t=[{label:"Доход от банка",value:"".concat((0,b.Y4)(c,2)," ").concat(u)}];if((null===(e=d.algo)||void 0===e?void 0:e.id)==="mkb-nakop"&&t.push({label:"Открытие дебетовой карты",value:"Да",description:_&&null!=d.karta?d.karta.label:"Открывая счет, Вы соглашаетесь на оформление дебетовой карты банка"},{label:"Действие счета",value:"Бессрочно"},{label:"Зарплата или пенсия на карту МКБ",value:(0,a.jsx)(l.jw,{checked:m,className:N().singleToggle,onChange:()=>null==p?void 0:p(!m)}),description:(0,a.jsx)(a.Fragment,{children:"Процентная ставка применяется при условии зачисления заработной платы от юридических лиц и индивидуальных предпринимателей на картсчет Клиента, открытый в Банке или суммы пенсий от Фонда пенсионного и социального страхования Российской Федерации или иных органов (учреждений) на любой счет Клиента, открытый в Банке, поступивших в течение 60 календарных дней до каждой даты начисления процентов по счету."})}),i&&t.unshift({label:"Ставка",value:"".concat((0,b.Y4)(i,2),"%")}),o&&t.unshift({label:"Эффективная ставка",value:"".concat((0,b.Y4)(o,2),"%"),description:(0,a.jsxs)(a.Fragment,{children:["Иногда у вклада есть особенности — капитализация процентов, возможность пополнения или акция от банка. Дополнительные параметры меняют доход в большую или меньшую сторону, поэтому процент по эффективной ставке отличается от банковской. Он отражает доход корректнее."," ",!s&&(0,a.jsx)(f.default,{className:N().tooltipLink,target:"_self",onClick:M("Подробнее о том, как считать сложный процент"),href:"".concat(g._n,"/navigator/nakopit-i-sohranit/stat_chto_takoe_slozhnyj_procent_po_vkladu_i_kak_ego_poschitat?ysclid=lfmam3zaig67098551%22"),children:"Подробнее о том, как считать сложный процент"})]})}),h&&x){let e=I?"%":" ".concat(u);t.push({label:D?"Бонус за первый вклад":"Бонус от Финуслуг",value:"".concat((0,b.Y4)(x,2)).concat(e),description:null==h?void 0:h.description})}return t},[x,h,o,null===(t=d.algo)||void 0===t?void 0:t.id,d.karta,D,M,s,_,c,i,m,p,u,I]),Z=!!P&&(null==P?void 0:P.difference)>0,B=Z?"+".concat((0,b.Y4)(P.difference,1),"% к ставке"):null,R=(0,r.useCallback)(e=>{(0,y.lQ)({eventAction:"click_question_".concat((0,k.b)(e)),eventCategory:w,eventLabel:S})},[w,S]);return(0,a.jsxs)("ul",{className:N().values,children:[(0,a.jsx)(C,{loading:L,rowCount:E.length}),E.map(e=>(0,a.jsxs)("li",{className:N().value,children:[(0,a.jsx)("div",{children:e.label}),e.description&&(0,a.jsx)(v.C,{text:e.description,className:N().detail,onOpen:()=>n&&R(e.label),icon:A}),(0,a.jsx)("div",{className:N().valueDash}),(0,a.jsx)("div",{children:e.value})]},e.label)),Z&&B&&(0,a.jsxs)("li",{className:N().value,children:[(0,a.jsx)("div",{children:B}),(0,a.jsx)(v.C,{text:"При сумме вклада от ".concat((0,b.Y4)(P.minAmount)," ₽"),className:N().detail,icon:A,onOpen:()=>n&&R(B)}),(0,a.jsx)(l.jw,{onChange:O,checked:T,className:N().toggle,size:"small"})]})]})}var j=n(37162);let T=e=>{let{depositType:t,isHideButtons:n,isShowDepositTip:a,isSavingAccount:i}=e,l=t===c.P.isPlatformDeposit?"Как открыть вклад":"Где открыть вклад",o=t===c.P.isPlatformDeposit?"Как открыть накопительный счет":"Где открыть накопительный счет";return{helpButtonLabel:i?o:l,blockId:t===c.P.isPlatformDeposit?j.a6:j.VT,isShowMainButton:!n&&t===c.P.isPlatformDeposit||t===c.P.isLidgenDeposit,isShowHelpButton:t!==c.P.isArchiveDeposit&&a&&!n,isOfferText:t===c.P.isPlatformDeposit||t===c.P.isLidgenDeposit}};var w=n(2674),S=n(53931),I=n(84948),L=n(32443),O=n(50017),M=n(33145),E={src:"/deposits/_next/static/media/edit.c0611721.svg",height:16,width:16,blurWidth:0,blurHeight:0},Z=n(45198),B=n(97291),R=n(35041),V=n(56924),F=n(28734),H=n.n(F);function Y(e){let{term:t,totalProfit:n,withChart:i,isChartOpen:l,isEditable:o=!0,endingDate:s,onEditButtonClick:c,onToggleChart:u}=e,d=(0,b.Y4)(n,2).split(","),_=(0,r.useMemo)(()=>s?(0,B.f)(s):function(e){let t=new Date;return(0,B.f)(Z.Z.day(t,e))}(t),[s,t]);return(0,a.jsxs)("div",{className:H().head,children:[(0,a.jsxs)("h4",{className:H().title,children:["Накопите к ",_]}),(0,a.jsxs)("h5",{className:H().result,children:[(0,a.jsxs)("span",{className:H().resultText,children:[d[0],d[1]?(0,a.jsxs)(a.Fragment,{children:[",",(0,a.jsxs)("span",{className:H().resultTextFloat,children:[d[1]," ₽"]})]}):" ₽"]}),o&&(0,a.jsx)("button",{className:H().resultButton,onClick:c,children:(0,a.jsx)(M.default,{className:H().resultIcon,src:E,alt:"edit"})})]}),i&&(0,a.jsx)(R.W,{onClick:u,className:H().chartButton,icon:l?V.d.arrowBack:V.d.chart,alt:"chart"})]})}var K=n(56257),U=n.n(K);let Q=(0,r.memo)(e=>{let{href:t,id:n,pageType:i,eventCategory:o,withNewMarkup:r,eventLabel:s}=e;return(0,a.jsx)(l.zx,{as:"a",className:U().button,target:"_blank",href:t,size:"s",disabled:!t,onClick:()=>{(0,y.lQ)({event:"data-event",eventLabel:s,eventCategory:o,eventAction:r?"click_button_open_online":"open_in_bank_product",eventValue:null!=n?n:""})},children:i===c.P.isPlatformDeposit?"Открыть онлайн":"Перейти на сайт банка"})});Q.displayName="MainButton";let W={highlights:null,title:null,description:null,variant:"secondary",primaryAuthProviders:["ALFA","SBER","TINKOFF","VTB","MTS","SOVCOM","PHONE"],additionalAuthProviders:[],extraAuthProviders:[],primaryTextOverride:"Открыть вклад"},z=(0,r.memo)(e=>{var t,n;let{onEdit:_,isMobile:m,rate:p,sum:f,term:v,tag:g,appUrl:x,discount:D,isRateSwitched:C,onSwitchRate:b,switchRate:A,isCapitalization:N,depositType:j,productId:M,unit:E,tags:Z,isSavingAccount:B,extraInfo:R,salaryToggle:V,setSalaryToggle:F,isShowDepositTip:H,isHideButtons:K=!1,paymentFrequency:z,customActions:G,shortChipsList:q=!1,firstDepositBonusTitle:J=!1,scrollOffset:X,computeClassName:$,withChart:ee,tipIcon:et,tagIcon:en,customTagTitle:ea,hideExternalLinks:ei=!1,computeHeader:el,computeTag:eo,eventCategory:er,withNewMarkup:es,totalValues:ec,isEditable:eu=!0,isCombo:ed=!1,calculatedProfit:e_,calculatedTotalProfit:em,calculatedEffectiveRate:ep,calculatedBonus:eh,integrationType:ef,calculatedEndingDate:ev,isLoading:eg=!1}=e,[ex,eD]=(0,r.useState)(!1),eC=new Date;eC.setDate(eC.getDate()+v);let{total:eb,bonus:ey,effectiveRate:ek,profit:eA}=(0,I.Z)({depositSum:f,term:v,rate:p,isCapitalization:N,discount:j===c.P.isPlatformDeposit?D:null,period:d.Z.Day,paymentFrequency:z}),eN=e_||eA,eP=em||eb,ej=eh||ey,eT=function(e){let{integrationType:t}=e,{toggles:{FEATURE_TOGGLE_INTERNAL_REFERAL_LOGIN_ENABLED:n}}=(0,w.ND)(),a=(0,r.useMemo)(()=>(0,S.$1)(),[]),i=(null==a?void 0:a["auth.gtm_customer_id"])||null;return n&&"INTERNAL_REFERAL"===t&&!i}({integrationType:ef}),{helpButtonLabel:ew,blockId:eS,isShowMainButton:eI,isShowHelpButton:eL,isOfferText:eO}=T({depositType:j,isHideButtons:K,isShowDepositTip:H,isSavingAccount:B}),eM=(0,r.useCallback)(()=>{(0,y.lQ)({event:"data-event",eventAction:es?"click_button_how_to_open":"click_button_".concat((0,k.b)(ew)),eventCategory:er,eventLabel:M}),(0,l.ld)(eS,{offset:X,position:"top"})},[eS,er,ew,M,X,es]),eE=(0,r.useCallback)(()=>{eD(e=>!e),(0,y.lQ)({event:"data-event",eventAction:"click_icon_diagramma",eventCategory:er,eventLabel:M})},[er,M]),eZ=(0,r.useCallback)(()=>{_&&(_(),(0,y.lQ)({event:"data-event",eventAction:es?"click_pencil":"click_icon_redactirovanie",eventCategory:er,eventLabel:M}))},[er,_,M,es]),eB=(0,r.useCallback)(e=>{(0,y.lQ)({eventCategory:er,eventLabel:M,eventAction:"click_chips_".concat((0,k.b)(e))})},[er,M]),eR=(0,r.useCallback)(()=>{var e;return g&&g.title?null!==(e=null==eo?void 0:eo(g))&&void 0!==e?e:(0,a.jsx)(s.V,{className:U().tag,text:null!=ea?ea:g.title,tooltipText:g.description,tipIcon:en,onTooltipOpen:e=>es&&eB(e)}):null},[eo,ea,eB,g,en,es]),{widgetConfig:eV,isWidgetDataLoading:eF}=(0,L.B)({disabled:!eT}),eH=(0,r.useCallback)(()=>{if(eI)return eT&&(eV||eF)?(0,a.jsx)(i.U,{baseUrl:u.m.LK_URL,s3AssetsUrl:u.m.ASSETS_URL,skeleton:(0,a.jsx)(l.zx,{pending:!0,className:U().button,size:"s",label:"Открыть вклад",disabled:!0}),className:(0,o.Z)(U().button,U().loginWidget),serverConfig:eV?{...eV,consents:[],legalInfo:null}:void 0,config:W,query:{targetUri:x},isSilent:!0}):(0,a.jsx)(Q,{href:x,id:M,pageType:j,eventCategory:er,withNewMarkup:es,eventLabel:ec})},[eI,eT,eV,eF,x,M,j,er,es,ec]);return(0,a.jsxs)(l.W2,{className:(0,o.Z)(U().container,ex&&U().containerChart,$),children:[null!==(n=null==el?void 0:el(eP,eZ))&&void 0!==n?n:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h,{loading:eg}),(0,a.jsx)(Y,{term:v,totalProfit:eP,withChart:ee&&!ed,isChartOpen:ex,isEditable:eu,endingDate:ev,onEditButtonClick:eZ,onToggleChart:eE})]}),(0,a.jsxs)("div",{className:U().info,children:[(0,a.jsx)(O.H,{isMobile:m,className:(0,o.Z)(U().chart,ex&&U().chartVisible),sum:f,bonus:ey,profit:eN}),(0,a.jsxs)("div",{className:U().tags,children:[!q&&(null==Z?void 0:Z.map(e=>{let{title:t,description:n}=e;return(0,a.jsx)(s.V,{className:U().tag,text:t,tooltipText:n,theme:"pink",onTooltipOpen:eB},t)})),eR(),!q&&(null===(t=R.algo)||void 0===t?void 0:t.id)==="mkb-nakop"&&R.algo.extraTag&&(0,a.jsx)(s.V,{className:U().tag,...R.algo.extraTag,onTooltipOpen:eB})]}),(0,a.jsx)(P,{withNewMarkup:es,rate:p,effectiveRate:ep||ek,hideExternalLinks:ei,profit:eN,unit:E,extraInfo:R,isSavingAccount:B,salaryToggle:V,setSalaryToggle:F,discount:D,bonus:ej,firstDepositBonusTitle:J,tipIcon:et,switchRate:A,onSwitchRate:b,isRateSwitched:C,eventCategory:er,productId:M,isCombo:ed,isLoading:eg}),null==G?void 0:G(v),eH(),eL&&(0,a.jsx)(l.zx,{onClick:eM,className:U().button,size:"s",variant:"secondary",children:ew}),eO&&(0,a.jsx)("h3",{className:U().disclaimer,children:"Предварительный расчет. Не является офертой"})]})]})});z.displayName="DepositDetailCompute"},75217:function(e,t,n){"use strict";var a=n(2265);t.default=(0,a.createContext)(void 0)},60341:function(e,t,n){"use strict";n.d(t,{default:function(){return o}});var a=n(57437),i=n(2265),l=n(75217);function o(e){let{children:t,siteConfig:n}=e,[o]=(0,i.useState)(n);return(0,a.jsx)(l.default.Provider,{value:o,children:t})}},2674:function(e,t,n){"use strict";n.d(t,{ZP:function(){return s.default},ND:function(){return r}}),(a=i||(i={})).Beeline="beeline",a.T2="t2",a.Megafon="megafon",i.Beeline,i.T2,i.Megafon,i.T2,i.Beeline,i.Megafon,i.T2,i.Beeline,i.Megafon;var a,i,l=n(2265),o=n(75217);function r(){let e=(0,l.useContext)(o.default);if(!e)throw Error("Site config was used out of context");return e}var s=n(60341)},45198:function(e,t,n){"use strict";var a=n(92668),i=n(44579);let l={[i.Z.Day]:(e,t)=>(0,a.I)(e,{days:t}),[i.Z.Month]:(e,t)=>(0,a.I)(e,{months:t}),[i.Z.Year]:(e,t)=>(0,a.I)(e,{years:t})};t.Z=l},84948:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var a=n(69775),i=n(89981),l=n(92668),o=n(85873),r=n(53970),s=n(52603),c=n(91627),u=n(40309),d=n(44579),_=n(45198);function m(e){let{nPerYear:t,amount:n,rate:a}=e,i=n*Math.pow(1+a/t,t)-n;return{profit:i,effectiveRate:i/n/t*t*100}}function p(e){let{capitalization:t,paymentFrequency:n,dateStart:a,termByYears:i,amount:l,averageRate:o,termInDays:r}=e;if(t){let e=o/100;if(n===u.Z.EveryDay){let t=i.reduce((t,n)=>t*Math.pow(1+e/n.daysInYear,n.daysInInterval),l)-l,n=t/l/r*(0,s.y)(a)*100;return{profit:t,effectiveRate:n}}if(n===u.Z.Weekly)return m({nPerYear:52,daysPerPeriod:365.25/52,termInDays:r,amount:l,rate:e});if(n===u.Z.OnceAMonth||n===u.Z.InTheEnd)return m({nPerYear:12,daysPerPeriod:c.F,termInDays:r,amount:l,rate:e});if(n===u.Z.Quarterly)return m({nPerYear:4,daysPerPeriod:91.3125,termInDays:r,amount:l,rate:e});if(n===u.Z.Semiannually)return m({nPerYear:2,daysPerPeriod:182.625,termInDays:r,amount:l,rate:e});if(n===u.Z.Annually)return m({nPerYear:1,daysPerPeriod:365.25,termInDays:r,amount:l,rate:e})}return{profit:i.reduce((e,t)=>e+o/100*l/t.daysInYear*t.daysInInterval,0),effectiveRate:o}}function h(e){var t;let{depositSum:n,term:c,rate:u,isCapitalization:m=!1,discount:h,period:f,paymentFrequency:v,dateStart:g=new Date}=e,x=_.Z[f](g,c),D=f===d.Z.Day?c:(0,r.w)(x,g),C=function(e,t,n){let c=(0,a.k)({start:e,end:t});return c.reduce((a,u,d)=>{let _=0===d?e:u,m=d===c.length-1?t:(0,i.u)((0,l.I)(_,{days:n}),{start:_,end:(0,l.I)((0,o.w)(u),{days:1})}),p=(0,r.w)(m,_);return 0===p?a:[...a,{daysInYear:(0,s.y)(u),daysInInterval:p}]},[])}(g,x,D),b={amount:n,paymentFrequency:v,dateEnd:x,dateStart:g,capitalization:m,termByYears:C,termInDays:D,averageRate:u},{profit:y,effectiveRate:k}=p(b),{bonus:A,bonusRate:N}=function(e,t){if(!t)return{bonus:0,bonusRate:0};let n=t.rate;if("fixedBonusAmount"in t&&t.fixedBonusAmount)return{bonus:t.fixedBonusAmount,bonusRate:n};let{profit:a}=p({...e,averageRate:n,capitalization:!1});if(a<t.sum)return{bonus:a,bonusRate:n};let i=t.sum/a;return{bonus:t.sum,bonusRate:n*i}}(b,h);return{total:n+y+A,bonus:A,profit:y,effectiveRate:null!==(t=e.effectiveRate)&&void 0!==t?t:k,bonusRate:N}}},19612:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});class a{get hasKeysExistsSome(){return[...this.amountKeys,...this.termsKeys].some(e=>Object.prototype.hasOwnProperty.call(this.promotion,e))}get hasKeysExistsEvery(){return[...this.amountKeys,...this.termsKeys].every(e=>Object.prototype.hasOwnProperty.call(this.promotion,e))}get hasAmountKeys(){return this.amountKeys.some(e=>Object.prototype.hasOwnProperty.call(this.promotion,e))}get hasTermsKeys(){return this.termsKeys.some(e=>Object.prototype.hasOwnProperty.call(this.promotion,e))}checkMinMax(e,t,n){return(!!n||!!t)&&(n&&!t?e<=n:!n&&t?e>=t:e>=t&&e<=n)}getDiscountByAmount(){return this.checkMinMax(this.currentAmount,this.minAmount,this.maxAmount)}getDiscountByTerms(){return this.checkMinMax(this.terms,this.minTermInDays,this.maxTermInDays)}constructor(e,t){var n,a,i,l;this.promotion=e,this.minAmount=null!==(n=e.minAmount)&&void 0!==n?n:0,this.maxAmount=null!==(a=e.maxAmount)&&void 0!==a?a:0,this.minTermInDays=null!==(i=e.minTermInDays)&&void 0!==i?i:0,this.maxTermInDays=null!==(l=e.maxTermInDays)&&void 0!==l?l:0,this.terms=t.terms,this.currentAmount=t.currentAmount,this.amountKeys=["minAmount","maxAmount"],this.termsKeys=["minTermInDays","maxTermInDays"]}}let i=e=>{let{currentAmount:t,finuslugiBonusAllowed:n,isPlusFiveBonus:i,isOldUser:l,terms:o,finuslugiBonusPromotion:r}=e;if(!n)return!1;if(i)return!0;if(!r||!l)return!1;let s=new a(r,{terms:o,currentAmount:+t});return!s.hasAmountKeys&&!s.hasTermsKeys||(s.terms&&s.currentAmount||!s.hasKeysExistsEvery?!!(s.terms&&s.hasKeysExistsSome&&s.getDiscountByTerms())&&!!(s.currentAmount&&s.hasKeysExistsSome&&s.getDiscountByAmount()):s.getDiscountByTerms()&&s.getDiscountByAmount())}},39402:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var a=n(91220);function i(e){let{asPath:t,firstBaseUrl:n,productId:i,optionId:o,amount:r,durationValue:s,secondBaseUrl:c,passAggregatorId:u=!1,passCombo:d=!1}=e,{utm_campaign:_,utm_medium:m,utm_source:p,utm_term:h,aggregator_id:f}=(0,a.p)(t,"#"),{partner_id:v}=(0,a.p)(t,"?"),g=u?f:v;return{urlFirst:l(new URL("/add-product",n),{aggregatorId:null!=g?g:"moex-mp-new-sc",productId:i,optionId:o,amount:r,durationValue:s,utm_campaign:_,utm_medium:m,utm_source:p,utm_term:h,...d?{from:"combo"}:null}).toString(),urlSecond:c&&l(new URL(c),{amount:r,durationValue:s,utm_campaign:_,utm_medium:m,utm_source:p,utm_term:h,...d?{from:"combo"}:null}).toString()}}function l(e,t){let n=new URL(e);return Object.entries(t).forEach(e=>{let[t,a]=e;if(null!=a){if(Array.isArray(a))return a.forEach(e=>n.searchParams.append(t,String(e)));n.searchParams.set(t,String(a))}}),n}},39666:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});let a=e=>e.length?e[0].toUpperCase()+e.slice(1):""},23769:function(e,t,n){"use strict";n.d(t,{E:function(){return o}});var a=n(91627),i=n(36578);let l=e=>{let t=Math.floor(e/12),n=e%12,a=[];return t&&a.push((0,i.PY)(t,["год","года","лет"])),n&&a.push("".concat(n," мес")),a.join(" ")||"0 мес"},o=e=>l(Math.round(e/a.F))},2493:function(e,t,n){"use strict";n.d(t,{_:function(){return a}});let a=e=>{"Enter"===e.key&&e.currentTarget.blur()}},89911:function(e,t,n){"use strict";n.d(t,{d:function(){return o}});var a=n(75461),i=n(2265),l=n(2938);function o(e,t,n){let{disabled:o=!1,separateLoaders:r=!1,ssrLoader:s=!1,...c}=null!=n?n:{},u=(0,a.s4)(),d=(0,l.ZP)(o?null:e,t,{revalidateOnFocus:!1,...c}),{isLoading:_,isValidating:m}=d,p=_||!!s&&!u&&!o,h=p||m;return(0,i.useMemo)(()=>({...d,isLoading:r?p:h,isValidating:r?m:h}),[h,p,m,r,d])}},32443:function(e,t,n){"use strict";n.d(t,{B:function(){return o}});var a=n(90856),i=n(14862),l=n(89911);function o(e){let{disabled:t}=null!=e?e:{},{data:n,isLoading:o}=(0,l.d)("login-widget",()=>(0,a.g)(i.m.LK_API),{disabled:t});return{widgetConfig:n,isWidgetDataLoading:o}}},50487:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var a=n(2265),i=n(70104),l=n(36578);let o=function(){let{type:e="text",unit:t,format:n,defaultValue:o="",maxLength:r=-1,maxFractionalLength:s=-1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[c,u]=(0,a.useState)(o),d=(0,a.useRef)(c),[_,m]=(0,a.useState)(!1),p=(0,a.useCallback)((t,n)=>{"function"==typeof t&&(t=t(d.current));let a=String(t);if(!(r>-1)||!(a.length>r)){if(["int","float"].includes(e)){var i;if(isNaN(+t)||"int"===e&&a.includes(".")||"0"===a||a.includes(" ")||s>-1&&(null===(i=a.split(".")[1])||void 0===i?void 0:i.length)>s)return}d.current=a,u(a),null==n||n(a)}},[s,r,e]),h=(0,a.useMemo)(()=>({onChange:e=>p(e.currentTarget.value),onFocus:()=>m(!0),onBlur:()=>m(!1)}),[p]),f=(0,a.useMemo)(()=>{let a=c;"currency"===n&&["int","float"].includes(e)&&""!==c&&(a=(0,i.Y4)(+c));let o=(()=>{if(""===a)return"";switch(t){case"year":return(0,l._6)(+c,"год","года","лет");case"day":return(0,l._6)(+c,"день","дня","дней");default:return t||""}})();return o&&["int","float"].includes(e)?"".concat(a," ").concat(o):a},[n,e,t,c]);return(0,a.useMemo)(()=>({events:h,value:c,formattedValue:f,isFocused:_,handleChange:p}),[h,f,p,_,c])}},73927:function(e){e.exports={title:"Calculator_title__aC5Ud",container:"Calculator_container__vQuJ0",marginNone:"Calculator_marginNone__Hjy2l",collapseArrow:"Calculator_collapseArrow__Fm8Vk",collapseArrowOpened:"Calculator_collapseArrowOpened__Fbqar",fieldsContainer:"Calculator_fieldsContainer__5Rp05",initialCollapsed:"Calculator_initialCollapsed__GdleE",typeDescription:"Calculator_typeDescription__WHZqi",link:"Calculator_link__vCq4i",chips:"Calculator_chips__iGG5T",initialChips:"Calculator_initialChips__oiuSI",disclaimer:"Calculator_disclaimer__gr2ty"}},82042:function(e){e.exports={disclaimer:"DepositDisclaimer_disclaimer__pgXpL",iconASV:"DepositDisclaimer_iconASV__Ai2QW"}},33176:function(e){e.exports={title:"ArchivePromo_title__TJIJ7",container:"ArchivePromo_container__5L_r6",text:"ArchivePromo_text__nMo9K",button:"ArchivePromo_button__f_l5V"}},281:function(e){e.exports={tag:"Tag_tag__F7OOH",tagPrimary:"Tag_tagPrimary__avetL",tagSecondary:"Tag_tagSecondary__RMaKP",tagPink:"Tag_tagPink__YGm7U",tagYellow:"Tag_tagYellow__wh7Mz",text:"Tag_text__nOOMV",detail:"Tag_detail__xPW1b",detailIcon:"Tag_detailIcon__LNOTP"}},96024:function(e){e.exports={calculator:"DepositDetailCalculator_calculator__uCc_u",fieldsContainer:"DepositDetailCalculator_fieldsContainer__3ISJQ",input:"DepositDetailCalculator_input__lPHyT",inputError:"DepositDetailCalculator_inputError__9cOsR",inputRange:"DepositDetailCalculator_inputRange__eJR5n",chips:"DepositDetailCalculator_chips__mCKtS",legend:"DepositDetailCalculator_legend__GHEvN",chipsForm:"DepositDetailCalculator_chipsForm__UbRs_",collapseArrow:"DepositDetailCalculator_collapseArrow__zmlRp",collapseArrowOpened:"DepositDetailCalculator_collapseArrowOpened__DhduM",collapseArrowTitle:"DepositDetailCalculator_collapseArrowTitle__0v1_i",disclaimer:"DepositDetailCalculator_disclaimer___flSu",additionalButton:"DepositDetailCalculator_additionalButton__ViyCi",additionalContainer:"DepositDetailCalculator_additionalContainer__8sYDD",container:"DepositDetailCalculator_container__AXiy6",containerFull:"DepositDetailCalculator_containerFull__QUh5a",promo:"DepositDetailCalculator_promo__KDFX3",left:"DepositDetailCalculator_left__V9V0j",right:"DepositDetailCalculator_right__U4ABf",qrDesc:"DepositDetailCalculator_qrDesc__Fixg5",wide:"DepositDetailCalculator_wide__ItjPd",fivePercent:"DepositDetailCalculator_fivePercent__OgP8O",typeDescription:"DepositDetailCalculator_typeDescription__Nynxc",infoIcon:"DepositDetailCalculator_infoIcon__17O3e",expenseHead:"DepositDetailCalculator_expenseHead___7xlC",expenseSub:"DepositDetailCalculator_expenseSub__pnhPg"}},56257:function(e){e.exports={container:"DepositDetailCompute_container__wgV0n",containerChart:"DepositDetailCompute_containerChart__QUao0",info:"DepositDetailCompute_info___pqT7",tags:"DepositDetailCompute_tags__Le8d7",tag:"DepositDetailCompute_tag__DV451",button:"DepositDetailCompute_button__qK6jL",loginWidget:"DepositDetailCompute_loginWidget__3hRgV",detailIcon:"DepositDetailCompute_detailIcon__8lmnN",chart:"DepositDetailCompute_chart__S_HP1",chartVisible:"DepositDetailCompute_chartVisible__STX_r",tooltipLink:"DepositDetailCompute_tooltipLink__4gESn",buttonIcon:"DepositDetailCompute_buttonIcon__Zi3GE",disclaimer:"DepositDetailCompute_disclaimer__ZofBY",singleToggle:"DepositDetailCompute_singleToggle__tFiQ1"}},28734:function(e){e.exports={head:"Header_head__lMUs0",title:"Header_title__r4Wa_",result:"Header_result__SKeZv",resultText:"Header_resultText__UbYRQ",resultTextFloat:"Header_resultTextFloat__D5t0r",resultButton:"Header_resultButton__jXHD7",resultIcon:"Header_resultIcon__dJ1wD",chartButton:"Header_chartButton__AmKiY"}},32817:function(e){e.exports={skeletonContainer:"HeaderSkeleton_skeletonContainer___dhhJ",visible:"HeaderSkeleton_visible__arkXP",skeletonProfit:"HeaderSkeleton_skeletonProfit__PGN7g",skeletonDate:"HeaderSkeleton_skeletonDate__QrnJO"}},23e3:function(e){e.exports={skeletonContainer:"ProfitSkeleton_skeletonContainer__33exZ",visible:"ProfitSkeleton_visible__StSgI",skeleton:"ProfitSkeleton_skeleton___lU6r"}},90297:function(e){e.exports={values:"ValueList_values__mGunQ",value:"ValueList_value__RRvlg",valueDash:"ValueList_valueDash__mwitD",detail:"ValueList_detail__6tgWx",toggle:"ValueList_toggle__tin7w"}},44587:function(e,t){"use strict";t.Z={src:"/deposits/_next/static/media/detailed.37f1b990.svg",height:16,width:16,blurWidth:0,blurHeight:0}}}]);