(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52],{8821:function(t,e,n){"use strict";e.Z=function(){for(var t,e,n=0,a="";n<arguments.length;)(t=arguments[n++])&&(e=function t(e){var n,a,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e){if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(a=t(e[n]))&&(r&&(r+=" "),r+=a);else for(n in e)e[n]&&(r&&(r+=" "),r+=n)}return r}(t))&&(a&&(a+=" "),a+=e);return a}},7683:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var a=n(7274),r=n(7458),o=n(2895);function i(t,e){(0,o.Z)(2,arguments);var n=(0,r.Z)(t),i=(0,a.Z)(e);if(isNaN(i))return new Date(NaN);if(!i)return n;var c=n.getDate(),d=new Date(n.getTime());return(d.setMonth(n.getMonth()+i+1,0),c>=d.getDate())?d:(n.setFullYear(d.getFullYear(),d.getMonth(),c),n)}},4572:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var a=n(7274),r=n(7683),o=n(2895);function i(t,e){(0,o.Z)(2,arguments);var n=(0,a.Z)(e);return(0,r.Z)(t,-n)}},6967:function(t,e,n){"use strict";n.d(e,{c:function(){return u},w:function(){return s}});var a=n(4033),r=n(116),o=n(8102),i=n(7503),c=n(5395),d=n(8774),l=n(8697);function u(t){var e,n,a;let{bond:i,isCountShow:l,count:u=0,amount:s=0,cmsData:p}=t,m=(0,r.useTranslations)();return[{key:m("sc-bonds.detail.calculator.conditions.price.key"),value:(0,o.lb)(i.product.productPrice.total),tooltip:null!==(n=null==p?void 0:p.priceHint)&&void 0!==n?n:m("sc-bonds.detail.calculator.conditions.price.hint")},{key:m("sc-bonds.detail.calculator.conditions.rate-with-ndfl.key"),value:(0,d.Q)({couponType:i.product.couponType,minCouponPaymentSizePercent:i.product.couponEventsData.minCouponPaymentSizePercentAfterNdfl,maxCouponPaymentSizePercent:i.product.couponEventsData.maxCouponPaymentSizePercentAfterNdfl,nearestCouponPaymentSizePercent:null===(e=i.product.nearestCoupon)||void 0===e?void 0:e.paymentSizePercentAfterNdfl}),tooltip:null!==(a=null==p?void 0:p.rateWithNdflHint)&&void 0!==a?a:m("sc-bonds.detail.calculator.conditions.rate-with-ndfl.hint")},{key:m("sc-bonds.detail.calculator.conditions.redemption-date.key"),value:(0,c.t)(i.product.redemptionDate)},l?{key:m("sc-bonds.detail.calculator.conditions.order-sum.key"),value:(0,o.lb)(s)}:{key:m("sc-bonds.detail.calculator.conditions.bonds-count.key"),value:"".concat((0,o.lb)(u,{hasCurrencySymbol:!1,decimalCount:0})," шт")}]}function s(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(0,r.useTranslations)(),c=new URLSearchParams((0,a.useSearchParams)().toString()),d={sum:(0,i.a)({bond:t,count:e}),type:"count",amount:e,profit:t.product.couponEventsData.minCouponPaymentSizePercent,date:(0,l.p6)(t.product.redemptionDate),name:t.product.name,code:t.product.issuerCode,label:n("sc-bonds.detail.calculator.registration-state.label")},u=(0,o.If)().setProduct(t=>t.setType("bond").setTitle(d.name).setProvider("bank","",d.code).setLabel(d.label||null).addParam("ставка","".concat((0,o.og)(d.profit))).addParam("сумма","".concat((0,o.lb)(d.sum,{decimalIsWithoutZeros:!0}))).addParam("погашение",d.date)).setContext(d).encode();c.append("context",u);let s="".concat((0,l.SJ)("NEXT_PUBLIC_MARKETPLACE_LK_BASE_URL"),"/investment/bonds/").concat(t.product.productId,"/purchase?").concat(c.toString());return s}},7503:function(t,e,n){"use strict";n.d(e,{U:function(){return r},a:function(){return o}});var a=n(8697);function r(t){let{bond:e,amount:n}=t;if(!n||n<=0)return 0;let{total:r}=e.product.productPrice;return Math.floor((0,a.lt)(n/r))}function o(t){let{bond:e,count:n}=t;if(!n||n<=0)return 0;let{total:r}=e.product.productPrice;return(0,a.lt)(n*r)}},9135:function(t,e,n){"use strict";n.d(e,{T:function(){return o}});var a=n(7437),r=n(9182);function o(t){let{tag:e="div",children:n,dataQa:o,className:i,...c}=t,d=(0,r.J)(),l=d(o),u="string"==typeof e,s={...c,...u?{"data-qa":l}:{dataQa:l}};return(0,a.jsx)(e,{className:i,...s,children:n})}},8022:function(t,e,n){"use strict";n.d(e,{xu:function(){return l},Zb:function(){return h},Sr:function(){return k},TR:function(){return P},zn:function(){return E}});var a,r,o=n(7437),i=n(7042),c=n(5491),d=n.n(c);function l(t){let{className:e,variant:n="primary",children:a}=t;return(0,o.jsx)("div",{className:(0,i.Z)(d().box,{[d()["box--primary"]]:"primary"===n,[d()["box--secondary"]]:"secondary"===n},e),children:a})}(a=r||(r={})).Primary="primary",a.Secondary="secondary";var u=n(6454),s=n(3915),p=n(9135),m=n(8173),x=n(4912),f=n.n(x);function h(t){let{title:e,icon:n,className:a,children:r}=t;return(0,o.jsx)(p.T,{dataQa:{element:m.xJ.Block,name:"card"},children:(0,o.jsxs)(l,{className:(0,i.Z)(f().card,a),children:[(0,o.jsxs)("div",{className:f().titleContainer,children:[n&&(0,o.jsx)(p.T,{dataQa:{element:m.xJ.Icon,name:"cardIcon"},children:(0,o.jsx)(u.xb,{className:f().icon,name:n})}),(0,o.jsx)(p.T,{dataQa:{element:m.xJ.Header,name:"cardTitle"},children:(0,o.jsx)(s.X6,{type:"h3",as:"div",children:e})})]}),r]})})}var _=n(6691),y=n.n(_),g=n(2265),b={src:"/invest/bonds/_next/static/media/no-logo.aee2f188.svg",height:32,width:32,blurWidth:0,blurHeight:0},v=n(4283),C=n.n(v);let P=(0,g.memo)(function(t){let{src:e,alt:n,size:a=46,className:r}=t,[c,d]=(0,g.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g.Suspense,{children:(0,o.jsx)(y(),{"data-qa":"logo-image",className:(0,i.Z)(C().logoImage,!c&&C().hidden,r),src:null!=e?e:b,alt:n,width:a,height:a,onLoad:function(t){let{currentTarget:e}=t;e.naturalWidth>0&&d(!0)},unoptimized:!0})}),(0,o.jsx)(y(),{"data-qa":"logo-no-logo-image",className:(0,i.Z)(C().logoImage,c&&C().notDisplayed,r),src:b,alt:"Логотип не загрузился",width:a,height:a})]})});P.displayName="Logo";var T=n(1518),j=n(9063),N=n.n(j);function k(t){let{text:e,expandedText:n,className:a}=t,[r,c]=(0,g.useState)(!1);return(0,o.jsxs)(p.T,{className:(0,i.Z)(N().wrapper,a),dataQa:{element:m.xJ.Block,name:"expandedContent"},children:[(0,o.jsx)(p.T,{tag:"p",dataQa:{element:m.xJ.Text,name:"text"},children:e}),(0,o.jsx)("div",{className:(0,i.Z)(N().grid,{[N().open]:r}),children:(0,o.jsx)(p.T,{className:N().gridInner,tag:"p",dataQa:{element:m.xJ.Text,name:"expandedText"},children:n})}),(0,o.jsx)(p.T,{dataQa:{element:m.xJ.Button,name:"expandButton"},children:(0,o.jsx)(T.rU,{text:r?"Свернуть":"Показать еще",as:"button",type:"button",onClick:function(){c(t=>!t)}})})]})}var S=n(629),w=n(8814),Z=n.n(w);function E(t){let{text:e,tooltip:n,gap:a=6,hintSize:r=20,hintColor:c="var(--color-gray-800)",className:d}=t;return(0,o.jsxs)(p.T,{className:(0,i.Z)(Z().wrapper,d),style:{gap:"".concat(a,"px")},dataQa:{element:m.xJ.Block,name:"textWithHint"},children:[(0,o.jsx)(p.T,{dataQa:{element:m.xJ.Text,name:"text"},children:e}),n?(0,o.jsx)(p.T,{dataQa:{element:m.xJ.Hint,name:"hint"},children:(0,o.jsx)(T.kW,{className:Z().hint,text:n,position:"top",auto:!1,inverted:!0,children:(0,o.jsx)(S.IconFdsQuestionCircleO,{size:r,style:{fontSize:"".concat(r,"px"),color:c}})})}):null]})}},9182:function(t,e,n){"use strict";n.d(e,{J:function(){return c}});var a=n(4033),r=n(2265),o=n(4601),i=n.n(o);function c(){let t=(0,a.useParams)(),e=(0,a.usePathname)();return(0,r.useCallback)(n=>{let{prefix:a,element:r,name:o,index:c}=n,d=e.split("/").filter(t=>t).map(e=>{var n;return null!==(n=Object.keys(t).find(n=>t[n]===e))&&void 0!==n?n:e});d.unshift("bonds");let l=d.join("-"),u=i()(o),s=void 0!==c?"-".concat(function(t){if(Number.isNaN(t)||t<0)throw Error("Incorrect value '".concat(t,"' for the property 'index'. Must be a number and >= 0}"));return t}(c)):"";return"".concat(a?"".concat(a,"-"):"").concat(l,"-").concat(r,"-").concat(u).concat(s)},[t,e])}},5491:function(t){t.exports={box:"Box_box__U3pTk","box--primary":"Box_box--primary__bmk_7","box--secondary":"Box_box--secondary__E8F3g"}},4912:function(t){t.exports={card:"Card_card__S3kD8",titleContainer:"Card_titleContainer__x03lb",icon:"Card_icon__1OSHf"}},9063:function(t){t.exports={wrapper:"ExpandedContent_wrapper__AHH29",grid:"ExpandedContent_grid__gVwbJ",open:"ExpandedContent_open__IA7BE",gridInner:"ExpandedContent_gridInner__wLPJ_"}},4283:function(t){t.exports={logoImage:"Logo_logoImage__k98yw",notDisplayed:"Logo_notDisplayed__wxRml",hidden:"Logo_hidden__EbuIV"}},8814:function(t){t.exports={wrapper:"TextWithHint_wrapper__37Xpq",hint:"TextWithHint_hint__0_S4x"}}}]);