(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7153],{17722:function(e,a){"use strict";a.Z={src:"/kredity/assets/_next/static/media/banner-1.cbec846c.svg",height:208,width:301,blurWidth:0,blurHeight:0}},93188:function(e,a,t){"use strict";t(98670)},89577:function(e,a,t){"use strict";t.d(a,{$:function(){return s}});var l=t(98670);async function i(){let{data:e,error:a}=await (0,l.D)("/money_data/Fk.json");if(a||null===e)throw Error(null!=a?a:"Ошибка загрузки данных");return e.banks.filter(e=>"1"!==e.archive&&"0"!==e.public)}async function s(){return(await i()).map(e=>{let{id:a,name:t,name_r:l,name_p:i,logo_mob:s,short_description:n,url:r,region_ids:o,legal_entities:c,bic:d,credit_rating:u,net_profit_rating:m,ratings:p,site_title:_,site_url:h}=e;return{id:a,name:t,name_r:l,name_p:i,logo_mob:s,short_description:n,url:r,region_ids:o,legal_entities:c,bic:d,credit_rating:u,net_profit_rating:m,ratings:p,site:{title:_,url:h}}})}},24443:function(e,a,t){"use strict";t.d(a,{y:function(){return x}});var l=t(85893),i=t(79644),s=t(86010),n=t(25675),r=t.n(n),o=t(67294),c=t(79553),d=t.n(c);let u=e=>{switch(e.type){case"input":return(0,l.jsx)("div",{className:(0,s.Z)(d().field),children:(0,l.jsx)(i.lF,{...e.props})});case"divider":return(0,l.jsx)("div",{className:d().divider});case"inputRange":return(0,l.jsx)("div",{className:(0,s.Z)(d().field,d().fieldRange),children:(0,l.jsx)(i.lF,{...e.props,onlyRange:!0})});case"select":return(0,l.jsx)(i.HU,{...e.props,className:(0,s.Z)(d().field,e.props.className)});case"chips":return(0,l.jsx)(i.ev,{...e.props,className:(0,s.Z)(d().chipsForm,e.props.className)});default:return(0,l.jsx)(i.lF,{...e.props,className:(0,s.Z)(d().field,e.props.className)})}};var m=t(13442),p=t(46203),_=t(39918),h=t(30251),f=t(98028),C=t(8344);let x=(0,o.memo)(e=>{let{title:a,pageUrl:t,infoLink:n,chips:c,items:x,additionalItems:v,additionalItemsTitle:g,isMobile:j,isShowChips:N,isExpandSettings:T,onToggleSettings:w}=e,b=e=>{(0,_.D)({eventCategory:t,eventAction:_.i.popup,eventActionText:e}),null==w||w()},k=(0,o.useCallback)(()=>n?(0,i.ld)(n.idScrollBlock,{offset:j?0:-100,position:"top"}):null,[j,n]),[y,R]=(0,o.useState)(()=>x.filter(e=>!!e).reduce((e,a,t)=>a&&a.elements.length>1&&a.isCollapsedElements?{...e,[t]:!0}:e,{}));(0,o.useEffect)(()=>{x.filter(e=>!!e).forEach((e,a)=>{e&&R(t=>({...t,[a]:e.isCollapsedElements}))})},[x]);let L=(0,o.useCallback)(e=>{R(a=>({...a,[e]:!a[e]}))},[]);return(0,l.jsxs)(h.G,{className:(0,s.Z)(d().container),children:[(0,l.jsxs)("button",{className:d().title,onClick:()=>b(a),children:[a,(0,l.jsx)(r(),{className:(0,s.Z)(d().collapseArrow,T&&d().collapseArrowOpened),src:C.Z,alt:""})]}),(0,l.jsxs)(p.u,{className:d().fieldsContainer,isOpen:T||!j,children:[(0,l.jsx)("div",{className:d().fieldsWrapper,children:x.filter(e=>!!e).map((e,a)=>{if(!e)return;let{titleElements:t,elements:n,onToggle:r}=e,o=n.map((e,t)=>{if(e.isHidden)return null;let i=u(e);return(0,l.jsxs)("div",{className:d().fieldWrapper,children:[i,(null==e?void 0:e.desription)&&"inputRange"===e.type?(0,l.jsx)(f.J,{triggerClassName:d().tooltip,content:e.desription}):e.desription]},a+"."+t)});return n.length>1?(0,l.jsxs)("div",{className:d().collapseContainerWrapper,children:[(0,l.jsxs)("div",{className:(0,s.Z)(d().additionalItem,!y[a]&&d().collapsedContainer),children:[(0,l.jsxs)("div",{className:d().additionalItemName,children:[(0,l.jsx)("span",{children:t}),(0,l.jsx)(f.J,{content:"Государство выделяет деньги на поддержку семей с детьми. Эти деньги можно вложить в ипотеку"})]}),(0,l.jsx)(i.jw,{labelPosition:"left",checked:y[a],onChange:()=>{null==r||r(!y[a]),L(a)}})]}),(0,l.jsx)(p.u,{className:(0,s.Z)({[d().collapseContainer]:y[a]}),isOpen:y[a],children:o})]},a):o})}),v&&!!(null==v?void 0:v.length)&&(0,l.jsxs)("div",{className:d().additionalItemsWrapper,children:[!!(null==g?void 0:g.length)&&(0,l.jsx)("h3",{className:d().additionalItemsTitle,children:g}),(0,l.jsx)("ul",{className:d().additionalItemsList,children:v.map((e,a)=>(0,l.jsxs)("li",{className:d().additionalItem,children:[(0,l.jsxs)("div",{className:d().additionalItemName,children:[(0,l.jsx)("span",{children:e.name}),e.tooltip&&(0,l.jsx)(f.J,{content:e.tooltip})]}),(0,l.jsx)(i.jw,{...e})]},a))})]}),n&&(0,l.jsx)(m.j,{offPadding:n.offPadding,widthMaxContent:n.widthMaxContent,text:n.text,iconColor:"light",mainPageUrl:t,className:d().link,onClick:k})]}),N&&(0,l.jsx)(i.ev,{className:d().chips,options:c,selected:c,multiple:!0,theme:"secondary",size:"medium"})]})});x.displayName="Calculator"},84135:function(e,a,t){"use strict";t.d(a,{h:function(){return T}});var l=t(85893),i=t(79644),s=t(86010),n=t(25675),r=t.n(n),o=t(67294),c=t(56790),d=t(65848),u=t(73897),m=t(39918),p=t(85449),_=t(26576);let h=[{id:u.u.AUTOCREDIT,name:"автокредита",name_p:"автокредиту"},{id:u.u.KARTY,name:"карты",name_p:"карте"},{id:u.u.POTREBITELSKIE,name:"кредита",name_p:"кредиту"},{id:u.u.IPOTEKA,name:"ипотеки",name_p:"ипотеки"},{id:u.u.CALCULATOR,name:"калькулятора",name_p:"калькулятору"}],f=e=>{let a={paramsTitle:"",termsTitle:"",companyTitle:"",requirementsVehicleTitle:"",paramsRows:[],termsRows:[],companyRows:[],requirementsVehicleRows:[]};if(!e)return a;let{data:t,cardTypes:i,contactlessCardTypes:s,mainPageUrl:n}=e;if(!t)return a;let r=[],c=[],d=[],m=[];if(a.paramsTitle="Параметры ".concat(h.filter(e=>e.id===n)[0].name),a.termsTitle="Условия по ".concat(h.filter(e=>e.id===n)[0].name_p),a.requirementsVehicleTitle="Требования к ТС",a.companyTitle="О банке",u.u.AUTOCREDIT===n){let{params:e,terms:a,company:l,requirementsVehicle:i}=(0,_.yi)(t);r=e,c=a,d=l,m=i}if(u.u.IPOTEKA===n){let{params:e,terms:a,company:l}=(0,_.ce)(t);r=e,c=a,d=l}if(u.u.KARTY===n&&i&&s){let{params:e,company:a}=(0,_.RT)(t,i,s);r=e,d=a}if([u.u.POTREBITELSKIE,u.u.CALCULATOR].includes(n)){let{params:e,terms:a,company:l}=(0,_.cu)(t);r=e,c=a,d=l}return a.paramsRows=r.map(e=>(0,l.jsx)(o.Fragment,{children:(0,l.jsx)(p.a,{...e})},e.label)),a.termsRows=c.map(e=>(0,l.jsx)(o.Fragment,{children:(0,l.jsx)(p.a,{...e})},e.label)),a.companyRows=d.map(e=>(0,l.jsx)(o.Fragment,{children:(0,l.jsx)(p.a,{...e})},e.label)),a.requirementsVehicleRows=m.map(e=>(0,l.jsx)(o.Fragment,{children:(0,l.jsx)(p.a,{...e})},e.label)),a};var C=t(40741),x=t(54228),v=t(87907),g=t(53568),j=t.n(g);let N=e=>e.loading?(0,l.jsx)("div",{className:j().cards_list,children:Array.from({length:24},(e,a)=>(0,l.jsx)(d.O,{className:(0,s.Z)(j().card,j().skeletonCard)},a))}):e?(0,l.jsxs)("div",{className:j().content,children:[!!e.paramsRows.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:j().listTitle,children:e.paramsTitle}),(0,l.jsx)("ul",{className:j().list,children:e.paramsRows})]}),!!e.termsRows.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:j().listTitle,children:e.termsTitle}),(0,l.jsx)("ul",{className:j().list,children:e.termsRows})]}),!!e.requirementsVehicleRows.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:j().listTitle,children:e.requirementsVehicleTitle}),(0,l.jsx)("ul",{className:j().list,children:e.requirementsVehicleRows})]}),!!e.companyRows.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h3",{className:j().listTitle,children:e.companyTitle}),(0,l.jsx)("ul",{className:j().list,children:e.companyRows})]}),(0,l.jsx)(v.j,{className:j().actualDate,offerType:e.offerType,pageUrl:e.mainPageUrl,offerDate:e.updateDate})]}):null,T=e=>{var a,t,s,n,d,p,_,h,v;let g=(0,x.S0)(),T="Все условия по ".concat(e.mainPageUrl===u.u.AUTOCREDIT?"автокредиту":e.mainPageUrl===u.u.KARTY?"карте":"кредиту"),w=(0,o.useMemo)(()=>f({data:e.data,cardTypes:e.cardTypes,contactlessCardTypes:e.contactlessCardTypes,mainPageUrl:e.mainPageUrl===u.u.CALCULATOR?u.u.POTREBITELSKIE:e.mainPageUrl}),[e.data,e.cardTypes,e.contactlessCardTypes,e.mainPageUrl]),b=a=>{var t;(0,m.D)({eventAction:m.i.link,eventActionText:a,eventCategory:e.mainPageUrl,eventLabel:null===(t=e.data)||void 0===t?void 0:t.id})};(0,o.useEffect)(()=>{var a,t,l,i;(null===(a=e.data)||void 0===a?void 0:a.bankName)&&(null===(t=e.data)||void 0===t?void 0:t.id)&&e.isOpen&&(0,m.D)({eventAction:m.i.popup,eventActionText:null===(l=e.data)||void 0===l?void 0:l.bankName,eventCategory:e.mainPageUrl,eventLabel:null===(i=e.data)||void 0===i?void 0:i.id})},[e.isOpen,e.mainPageUrl,null===(a=e.data)||void 0===a?void 0:a.bankName,null===(t=e.data)||void 0===t?void 0:t.id]);let k=(0,l.jsxs)("div",{className:j().buttons,children:[(0,l.jsx)(i.zx,{as:"a",onClick:()=>b(T),target:"_blank",href:null===(s=e.data)||void 0===s?void 0:s.detailUrl,variant:"secondary",className:j().button,children:"Все ".concat(null==w?void 0:w.termsTitle)}),(0,l.jsx)(i.zx,{as:"a",onClick:()=>b((0,C.b)("Подать заявку")),target:"_blank",href:null===(n=e.data)||void 0===n?void 0:n.url,className:j().button,children:"Подать заявку"})]});return(0,l.jsx)(c.h,{children:g?(0,l.jsx)(i.jr,{className:j().mobilePopup,contentClassName:j().container,isOpen:e.isOpen,onClose:e.onClose,footer:k,children:(0,l.jsx)(N,{...w,loading:e.loading,offerType:e.offerType,mainPageUrl:e.mainPageUrl,updateDate:null===(d=e.data)||void 0===d?void 0:d.m_updated_at})}):(0,l.jsx)(i.dy,{title:(0,l.jsxs)("div",{className:j().title,children:[(null===(p=e.data)||void 0===p?void 0:p.logo)&&(0,l.jsx)("div",{className:j().logoContainer,children:(0,l.jsx)(r(),{className:j().logo,width:50,height:50,src:null===(_=e.data)||void 0===_?void 0:_.logo,alt:"logo"})})," ",null===(h=e.data)||void 0===h?void 0:h.bankName]}),rowTitle:!0,titleAlign:"left",className:j().drawer,contentClassName:j().container,isOpen:e.isOpen,onClose:e.onClose,footer:k,children:(0,l.jsx)(N,{...w,loading:e.loading,offerType:e.offerType,mainPageUrl:e.mainPageUrl,updateDate:null===(v=e.data)||void 0===v?void 0:v.m_updated_at})})})}},423:function(e,a,t){"use strict";t.d(a,{TQ:function(){return s},VZ:function(){return n},jo:function(){return i},oQ:function(){return r}});var l=t(84053);function i(){return"".concat((0,l.iE)().lkBaseUrl,"/credits/new?skipName=true&productType=credit")}function s(){return"".concat((0,l.iE)().lkBaseUrl,"/credits/new?skipName=true&productType=credit_card")}let n=["sberbank","vtb24","sovcombank","rosselhozbank","gazprombank","alfabank","promsvyazbank","tinkoff","vostochnyj_express"],r="/icons/header_logo.svg"},66566:function(e,a,t){"use strict";t.d(a,{$:function(){return l}});let l=(e,a)=>e?["",a?"янв":"января",a?"фев":"февраля","марта",a?"апр":"апреля","мая","июня","июля",a?"авг":"августа",a?"сент":"сентября",a?"окт":"октября",a?"нояб":"ноября",a?"дек":"декабря"][new Date(e.replace(/-/g,"/")).getMonth()+1]:""},1998:function(e,a,t){"use strict";t.d(a,{G:function(){return n}});var l=t(67294),i=t(6584),s=t(94466);let n=function(){let{type:e="text",unit:a,format:t,defaultValue:n="",maxLength:r=-1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[o,c]=(0,l.useState)(n),d=(0,l.useRef)(o),[u,m]=(0,l.useState)(!1),p=(0,l.useCallback)((a,t)=>{"function"==typeof a&&(a=a(d.current));let l=String(a);if(!(r>-1)||!(l.length>r)){if(["int","float"].includes(e)){if(isNaN(+a)||"int"===e&&l.includes(".")||l.includes(" "))return;l=String(""===a?"":+a)}d.current=l,c(l),null==t||t(l)}},[r,e]),_=(0,l.useMemo)(()=>({onChange:e=>{p(e.currentTarget.value)},onFocus:()=>m(!0),onBlur:()=>m(!1)}),[p]),h=(0,l.useMemo)(()=>{let l=o,n=null;switch("currency"===t&&["int","float"].includes(e)&&""!==o&&(l=(0,s.uf)(+o)),a){case"year":n=""===l?"":(0,i.Lk)(+o);break;case"day":n=""===l?"":(0,i.MB)(+o);break;default:n=""!==l&&a?a:""}return n&&["int","float"].includes(e)?"".concat(l," ").concat(n):l},[t,e,a,o]);return(0,l.useMemo)(()=>({events:_,value:o,formattedValue:h,isFocused:u,handleChange:p}),[_,h,p,u,o])}},79553:function(e){e.exports={title:"Calculator_title__aC5Ud",container:"Calculator_container__vQuJ0",collapseArrow:"Calculator_collapseArrow__Fm8Vk",collapseArrowOpened:"Calculator_collapseArrowOpened__Fbqar",fieldsContainer:"Calculator_fieldsContainer__5Rp05",field:"Calculator_field__bwyfM",fieldRange:"Calculator_fieldRange__S3_lR",collapseContainerWrapper:"Calculator_collapseContainerWrapper__j_DVK",collapseContainer:"Calculator_collapseContainer__IoV8G",fieldWrapper:"Calculator_fieldWrapper__rsxlG",tooltip:"Calculator_tooltip__dzU9w",typeDescription:"Calculator_typeDescription__WHZqi",link:"Calculator_link__vCq4i",chips:"Calculator_chips__iGG5T",legend:"Calculator_legend__wV7NN",chipsForm:"Calculator_chipsForm__6FLk3",additionalItemsWrapper:"Calculator_additionalItemsWrapper__1sQJo",additionalItemsTitle:"Calculator_additionalItemsTitle__hVEvZ",additionalItem:"Calculator_additionalItem__lSSkX",divider:"Calculator_divider__hPQxY",additionalItemName:"Calculator_additionalItemName__CCT4N"}},53568:function(e){e.exports={listTitle:"CreditsListModal_listTitle__hforG",container:"CreditsListModal_container__K77Ct",drawer:"CreditsListModal_drawer__XXOxh",content:"CreditsListModal_content__Gz5jC",mobilePopup:"CreditsListModal_mobilePopup__V35Hb",title:"CreditsListModal_title__kxiU0",logo:"CreditsListModal_logo__skx0z",logoContainer:"CreditsListModal_logoContainer__Pud_x",list:"CreditsListModal_list__ryMHP",valueText:"CreditsListModal_valueText__6AnBt",row:"CreditsListModal_row__OVccE",rowLabel:"CreditsListModal_rowLabel__9WsLq",rowValue:"CreditsListModal_rowValue__IGWF0",buttons:"CreditsListModal_buttons__l6SVm",button:"CreditsListModal_button__ZXh6N",actualDate:"CreditsListModal_actualDate__wpq5D",skeletonCard:"CreditsListModal_skeletonCard__xw5zQ",cards_list:"CreditsListModal_cards_list__bM3RU"}}}]);