(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[434],{59457:function(e,t,l){"use strict";var n,i,a=l(67294);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(null,arguments)}t.Z=function(e){return a.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),n||(n=a.createElement("defs",null,a.createElement("clipPath",{id:"a"},a.createElement("path",{fill:"#fff",fillOpacity:0,d:"M0 0h16v16H0z"})))),i||(i=a.createElement("g",{clipPath:"url(#a)"},a.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.115 5.333a2.001 2.001 0 0 0 3.772 0h2.114a.667.667 0 0 0 0-1.333h-2.114a2.001 2.001 0 0 0-3.772 0H2a.667.667 0 0 0 0 1.333zm1.886 0a.667.667 0 1 0 0-1.333.667.667 0 0 0 0 1.333m-4 4a2 2 0 0 0-1.886 1.333H2A.667.667 0 0 0 2 12h2.114a2.001 2.001 0 0 0 3.772 0H14a.667.667 0 1 0 0-1.334H7.887a2 2 0 0 0-1.886-1.333m0 1.333a.667.667 0 1 0 0 1.334.667.667 0 0 0 0-1.334",clipRule:"evenodd"}))))}},9677:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/avtokredity/[[...segments]]",function(){return l(61414)}])},94781:function(e,t){"use strict";t.Z={src:"/kredity/assets/_next/static/media/banner-2.9368ea40.svg",height:218,width:318,blurWidth:0,blurHeight:0}},93842:function(e,t){"use strict";t.Z={src:"/kredity/assets/_next/static/media/banner-4.fc5b15be.svg",height:222,width:324,blurWidth:0,blurHeight:0}},48766:function(e,t,l){"use strict";l.d(t,{B:function(){return n}});let n=e=>{let t=Number(e.split(" ")[0]);return e&&!Number.isNaN(t)?t:0}},58484:function(e,t,l){"use strict";l.d(t,{V:function(){return p}});var n=l(85893),i=l(42147),a=l(86010),o=l(67294),r=l(65737),s=l(21308),u=l(94347),c=l(83226),d=l.n(c);let p=(0,o.memo)(e=>{let{region:t,town:l,subtitle:o,title:c,mainPageUrl:p}=e,{town:v,region:m}=(0,u.T)(),{handleToggleModal:_}=(0,i.ar)(),b=e=>{(0,r.l)({event:"data-event",eventAction:e,eventCategory:p})};return(0,n.jsxs)("div",{className:(0,a.Z)(d().titleWrapper,d().newTitle),children:[(0,n.jsxs)("h1",{className:d().title,children:[c," ",((null==v?void 0:v.name_p)||(null==l?void 0:l.name_p)||(null==m?void 0:m.name_p)||(null==t?void 0:t.name_p))&&(0,n.jsxs)(n.Fragment,{children:["в"," ",(0,n.jsx)("button",{onClick:()=>{_(!0),b("show_pop_up_city_modal")},className:d().link,children:(null==v?void 0:v.name_p)||(null==l?void 0:l.name_p)||(null==m?void 0:m.name_p)||(null==t?void 0:t.name_p)})]})]}),(0,n.jsx)(s.N,{tag:"p",className:d().subtitle,children:o})]})});p.displayName="RegionTitle"},37771:function(e,t,l){"use strict";l.d(t,{$m:function(){return d},F$:function(){return u},Ht:function(){return r},N2:function(){return p},QN:function(){return s},Z3:function(){return c},eT:function(){return a},oA:function(){return i},vw:function(){return o}});var n=l(73897);let i={amount:"amount",firstPayment:"first_payment",period:"period",loan:"loan",incomeProof:"income_proof",insuranceNeed:"insurance_need",vehicleState:"vehicle_state",vehicleType:"vehicle_type",stateCoFinancing:"state_co_financing",bank:"bank",order:"order",sort:"sort",page:"page",payment:"payment",borrower:"borrower"},a=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}];n.u.AUTOCREDIT;let o=[{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 лет"}],r=[{value:"moto",label:"Мототранспорт"},{value:"car",label:"Легковое транспорт",labelShort:"Легковое ТС"},{value:"track",label:"Грузовое транспорт",labelShort:"Грузовое ТС"},{value:"commercial",label:"Коммерческое транспорт",labelShort:"Коммерческое ТС"},{value:"water",label:"Водное транспорт",labelShort:"Водное ТС"},{value:"custom",label:"Другое"}],s=[{value:"foreign_new",label:"Иномарка с завода"},{value:"foreign_old",label:"Иномарка с пробегом"},{value:"domestic_new",label:"Отечественная с завода"},{value:"domestic_old",label:"Отечественная с пробегом"}],u=[{value:"employee_for_hire",label:"Работник по найму"},{value:"soldier",label:"Военнослужащий"},{value:"pensioner",label:"Пенсионер"},{value:"individual_entrepreneur",label:"Индивидуальный предприниматель"},{value:"civil_servant",label:"Госслужащий"},{value:"student",label:"Студент"},{value:"budgetary",label:"Бюджетник"},{value:"personal_farm_owner",label:"Владелец личного подсобного хозяйства"},{value:"nothing",label:"Иное"}],c=[{value:"not_required",label:"Не требуется"},{value:"pledge",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"full",label:"Залог и поручительство"}],d=[{label:"По ставке",value:"rate"},{label:"По первому взносу",value:"firstPayment"}],p="Указали больше чем запрашиваете кредитных денег"},77624:function(e,t,l){"use strict";l.d(t,{n:function(){return n}});let n=(e,t)=>{var l;let n=null!==(l=null==t?void 0:t.map(e=>+e))&&void 0!==l?l:[];return[...e].sort((e,t)=>{let l=n.includes(Number(e.id)),i=n.includes(Number(t.id));return!l&&i?1:l&&!i?-1:0}).map(e=>({value:e.id,label:e.name}))}},37220:function(e,t,l){"use strict";l.d(t,{z:function(){return n}});let n=(e,t)=>(t>0&&!Number.isInteger(e)&&!Number.isNaN(e)&&String(e).split(".")[1].length>t&&(e=+e.toFixed(t)),e)},30292:function(e,t,l){"use strict";l.d(t,{G:function(){return a},b:function(){return i}});var n=l(67294);let i=(e,t,l)=>{(0,n.useEffect)(()=>{let t=setTimeout(()=>{e()},l);return()=>{clearTimeout(t)}},t)},a=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,[i,a]=(0,n.useState)(l),[o,r]=(0,n.useState)(!1),[s,u]=(0,n.useState)(null);return(0,n.useEffect)(()=>{r(!0),e().then(a).catch(u).then(()=>{r(!1)})},t),[i,o,s]}},61414:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSP:function(){return lr},default:function(){return ls}});var n,i,a=l(85893),o=l(42147),r=l(67294),s=l(34588),u=l(25675),c=l.n(u),d=l(41664),p=l.n(d),v=l(44895),m=l(73172),_=l(77868),b=l(84444),h=l(19438),g=l(54663),f=l(72335),x=l(20070),C=l(26576);let y=[{id:1,label:"Условия",name:C.cQ.conditions},{id:2,label:"Требования к заемщику",name:C.cQ.requirements},{id:3,label:"Требование к ТС",name:C.cQ.requirementsVehicles},{id:4,label:"Погашение",name:C.cQ.redemption}];var T=l(44727);let N=e=>{let{data:t}=e,l=(0,r.useMemo)(()=>(0,x.m8)(t),[t]),n=(0,r.useMemo)(()=>y.filter(e=>l[e.name].some(e=>(0,T.B)(e.value))),[l]);return{tabsContent:l,tabsList:n}},j=(0,r.memo)(e=>{var t,l;let{data:n,bank:i,offerType:o,pageUrl:r}=e,{tabsContent:s,tabsList:u}=N({data:n});return(0,a.jsx)(f.z,{scrollBlockId:g.q6,pageUrl:r,seoText:(null==n?void 0:n.short_description)&&(null==n?void 0:n.short_description.length)>5?null==n?void 0:n.short_description:void 0,title:"Об автокредите",offerType:o,offerUpdateData:null==n?void 0:n.m_updated_at,bank:{logoMobile:null==i?void 0:i.logo_mob,description:null==i?void 0:i.short_description,url:"/banki/".concat(null==i?void 0:i.url),name:null==i?void 0:i.name,creditRating:null==i?void 0:i.credit_rating,netAssetsPlace:null==i?void 0:null===(t=i.ratings)||void 0===t?void 0:t.net_assets_place,netProfitRating:null==i?void 0:i.net_profit_rating},tabsList:u,tabsContent:s,aboutCompanyLabel:"О банке",site:null!==(l=null==i?void 0:i.site.title)&&void 0!==l?l:void 0})});j.displayName="AutoCreditAbout";var A=l(17722),k=l(94781),S=l(93842),w=l(64062),R=l(54636),L=l(73897),M=l(5753),F=l.n(M);let I=e=>{let{url:t,offerType:l,isMobile:n,className:i}=e,o=(0,r.useMemo)(()=>[{id:3,image:S.Z,text:"Перейдите на сайт банка,<br /> чтобы оформить заявку",types:[R.A.LEAD],buttonText:"Оформить на сайте банка",link:t},{id:4,image:A.Z,text:R.A.LEAD?"Этот кредит нельзя открыть через Финуслуги":"Этот автокредит сейчас нельзя открыть онлайн на Финуслугах",types:[R.A.LEAD,R.A.MASS],buttonText:"Выбрать другой автокредит",link:"/avtokredity"},{id:5,image:k.Z,text:"Чтобы оформить автокредит, обратитесь в банк",types:[R.A.MASS]}].filter(e=>e.types.find(e=>e===l)),[t,l]);return(0,a.jsx)("div",{className:F().container,children:(0,a.jsx)(w.B,{className:i,title:"Где оформить автокредит",pageUrl:L.u.AUTOCREDIT,id:g.VT,isMobile:n,slides:o})})};var D=l(86010),E=l(77019),U=l(24443),P=l(20760),O=l(48766),B=l(26024),H=l(90999),Z=l(72798),W=l(17950),V=l(41262),q=l(66566),z=l(39918),Q=l(37220),J=l(94466),X=l(93478),K=l(21172),$=l.n(K);let G="Оформить на сайте банка",Y="Где оформить автокредит",ee=e=>{var t,l,n,i;let{offerType:o,bank:u,data:c,isMobile:d,calculator:p}=e,[v,m]=(0,r.useState)(!1),_=(0,r.useRef)(null),b=(0,r.useMemo)(()=>{let{domestic_new:e,domestic_old:t,foreign_new:l,foreign_old:n}=c.vehicle_state;return!e&&!t&&l&&n?"Иномарка любая":e||t||!l||n?e||t||l||!n?e&&t&&!l&&!n?"Отечественная любая":e||!t||l||n?!e||t||l||n?e&&!t&&l&&!n?"Любое новое":!e&&t&&!l&&n?"Любое б/у":"Любое":"Отечественная новая":"Отечественная б/у":"Иномарка б/у":"Иномарка новая"},[c.vehicle_state]),f=(0,r.useCallback)(()=>{_.current&&_.current.focus()},[]),x=(0,r.useCallback)(e=>{e&&((0,z.D)({eventCategory:L.u.AUTOCREDIT,eventAction:z.i.filterCatalog,eventLabel:"Платеж",eventValue:e.label}),p.setPaymentTypeValue(e.value))},[p]),C=(0,V.S_)(p.period),y=(0,r.useMemo)(()=>({values:[p.period],max:p.periodMax,min:p.periodMin===p.periodMax?p.periodMin-1:p.periodMin,onChange:e=>{p.periodMin!==p.periodMax&&p.setPeriod(e[0])},step:1,legend:[p.periodMin,p.periodMax],formatValue:e=>(0,a.jsx)("span",{className:$().legend,children:(0,V.S_)(e)})}),[p]),T=(0,r.useMemo)(()=>p.paymentTypeOptions.filter(e=>e.value===p.paymentTypeValue),[p.paymentTypeOptions,p.paymentTypeValue]),N=(0,r.useMemo)(()=>[{id:1,label:(0,V.S_)(p.period)},{id:2,label:"".concat(p.amount)}],[p.amount,p.period]),j=(0,r.useMemo)(()=>{var e;let t=(null===(e=c.application_term.custom_text)||void 0===e?void 0:e.from)!==void 0?(0,O.B)(c.application_term.custom_text.from):0,l=new Date;l.setDate(l.getDate()+t);let n=l.getDate(),i=l.getMonth()+1,a=l.getFullYear();return"Деньги у вас до ".concat(n," ").concat((0,q.$)("".concat(i,"-").concat(n,"-").concat(a)))},[null===(t=c.application_term.custom_text)||void 0===t?void 0:t.from]),A=p.amount,k=(0,r.useMemo)(()=>{let e=p.firstPayment,t=p.period,l=c.vehicle_type.text,n=p.paymentTypeValue,i=[],o=Number(e)/(Number(A)/100);Number.isInteger(o)||(o=Number(o.toFixed(5)));let r=A?(0,Q.z)(o,1):0;i.push({label:"Первый взнос",value:"".concat(r,"%").replace(".",",")}),i.push({label:"Срок погашения",value:(0,V.S_)(t)});let s=c.full_price;if(s){let e=c.interest_rate;i.push({label:"ПСК",value:(0,E.W)(s),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n    Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,J.sz)(Number(e.from),Number(e.to))})}return i.push({label:"Тип&#160;ТС",value:l},{label:"Состояние&#160;ТС",value:b,description:"Некоторые банки указывают, что получить кредит можно только на новый автомобиль, а для других это не принципиально."}),n&&i.push({label:"Тип платежа",value:n===W.T.annuity?"Аннуитетный":"Дифференцированный",description:(0,a.jsx)("div",{className:$().tooltipContent,children:(0,a.jsx)(B.a,{type:n})})}),i},[p.firstPayment,p.period,p.paymentTypeValue,c.vehicle_type.text,c.full_price,c.interest_rate,b,A]);return(0,a.jsxs)(h.t,{className:(0,D.Z)($().container,$().containerFull),children:[(0,a.jsx)(H.F,{url:c.url,bank:{logoMob:null==u?void 0:u.logo_mob,url:"/banki/".concat(null==u?void 0:u.url),name:null!==(n=null==u?void 0:u.name)&&void 0!==n?n:c.bank_name},pageUrl:L.u.AUTOCREDIT,title:"Автокредит \xab".concat(c.title,"\xbb от ").concat(null!==(i=null==u?void 0:u.name)&&void 0!==i?i:c.bank_name),isSmall:l,isMobile:d,tagTheme:"red",className:$().promo}),(0,a.jsxs)("div",{className:$().left,children:[(0,a.jsx)(U.y,{isMobile:d,title:"Настройка автокредита",pageUrl:L.u.AUTOCREDIT,infoLink:{isShow:!d,text:"Подробнее об автокредите",idScrollBlock:g.q6,offPadding:!0,widthMaxContent:!0},items:[{elements:[{type:"moneyInput",props:{label:"Сумма",value:p.amount,onChange:p.setAmount,onFocus:()=>m(!0)}}]},{elements:[{type:"moneyInput",props:{label:"Первый взнос",value:p.firstPayment,onChange:p.setFirstPayment,onFocus:()=>m(!0)}}]},{elements:[{type:"inputRange",props:{label:"Срок погашения",rangeProps:y,value:C}}]},{elements:[{type:"select",isHidden:!p.paymentTypeValue||p.paymentTypeOptions.length<=1,desription:p.paymentTypeValue&&(0,a.jsx)(B.a,{className:$().typeDescription,type:p.paymentTypeValue}),props:{label:"Платеж",options:p.paymentTypeOptions,onChange:x,value:T}}]}],chips:N,isShowChips:d&&!!(null==N?void 0:N.length)&&!v,isExpandSettings:v,onToggleSettings:()=>m(e=>!e)}),(0,a.jsx)(Z.S,{isSmall:!0,className:$().qrDesc})]}),(0,a.jsxs)("div",{className:$().right,children:[(0,a.jsx)(P.y,{captionTitle:j,pageUrl:L.u.AUTOCREDIT,onEdit:f,amount:Number(p.amount),disclaimer:"Предварительные условия. Не оферта",tag:c.online_application.commercial_desc,footerActions:(0,a.jsxs)(a.Fragment,{children:[o===R.A.LEAD&&(0,a.jsx)(s.zx,{as:"a",onClick:()=>{(0,z.D)({eventCategory:L.u.AUTOCREDIT,eventAction:z.i.link,eventActionText:G,eventLabel:c.id})},href:c.online_application.url,target:"_blank",className:$().button,children:G}),(0,a.jsx)(s.zx,{onClick:()=>{(0,z.D)({eventCategory:L.u.AUTOCREDIT,eventAction:z.i.button,eventActionText:Y}),(0,X.l)(g.VT,{offset:d?0:-100,position:"top"})},className:$().button,variant:"secondary",children:Y})]}),valuesList:k}),(0,a.jsx)(Z.S,{isSmall:!0,className:$().qrMobile})]})]})};var et=l(65737),el=l(40741),en=l(77259),ei=l(73654),ea=l.n(ei);let eo=(0,r.memo)(e=>{var t,l;let{data:n,detailData:i,className:o,onDetailInfoClick:s,onClick:u}=e,d=[],p=(0,r.useRef)(null),v=(0,r.useRef)(!1),m=(0,r.useRef)(null),_={text:"",caption:""},[b,h]=(null==i?void 0:null===(t=i.data)||void 0===t?void 0:t.online_application.commercial)===1?["Оформить",i.data.online_application.url]:["Подробнее",n.url],g=null==i?void 0:null===(l=i.data)||void 0===l?void 0:l.full_price;g&&(_.caption="ПСК",_.text=(0,E.W)(g),_.tooltipText="ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n        Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре.");let f={text:(0,J.dN)({from:n.amountFrom,to:n.amountTo}),caption:"Сумма"},x={text:"от ".concat((0,J.uf)(n.payment),"%"),caption:"Первый взнос"};d.push({label:"Заявка через сайт банка",variant:"primary"}),n.isKascko&&d.push({label:"Потребуется каско",variant:"primary"}),n.isPermanentRegistation&&d.push({label:"Постоянная регистрация",variant:"primary"});let C=e=>{(0,et.l)({event:"data-event",eventAction:e,eventCategory:L.u.AUTOCREDIT,eventLabel:n.id,eventValue:n.eventValue}),null==u||u(n)},y=(0,r.useCallback)(e=>{let[t]=e;1===t.intersectionRatio&&!v.current&&((0,et.l)({event:"data-event",eventAction:"show_in_catalog",eventCategory:L.u.AUTOCREDIT,eventLabel:n.id}),v.current=!0,p.current&&m.current&&p.current.unobserve(m.current))},[n.id]);return(0,r.useEffect)(()=>{p.current&&m.current&&p.current.unobserve(m.current),!v.current&&m.current&&(p.current=new IntersectionObserver(y,{root:null,threshold:[1]}),p.current.observe(m.current))},[y]),(0,a.jsx)("div",{ref:m,className:o,onClick:()=>C("click_button_".concat((0,el.b)("Подать заявку"))),children:(0,a.jsx)(en.J,{icon:n.logo?(0,a.jsx)("div",{className:ea().logo,children:(0,a.jsx)(c(),{width:56,height:56,src:n.logo,alt:"logo"})}):(0,a.jsx)("div",{className:ea().placeholderLogo}),companyName:n.bankName,productName:n.title,productUrl:n.url,buttonText:b,buttonUrl:h,tags:d,advantageAmountFrom:_,advantageAmountTo:x,advantageBonus:f,onDetailInfoClick:()=>{s(n),(0,z.D)({eventCategory:L.u.AUTOCREDIT,eventAction:z.i.button,eventActionText:"open_modal"})},className:ea().plate})})});eo.displayName="AutoCreditListItem";var er=l(13442),es=l(84135),eu=l(89504),ec=l(32244);let ed=e=>(null==e?void 0:e.online_application.commercial)===1?R.A.LEAD:R.A.MASS,ep=e=>{var t,l,n,i,a,o;let{banks:r,autoCredit:s,period:u}=e,c="/".concat(L.u.AUTOCREDIT,"/").concat(s.url),d="",p="",v=r.find(e=>+s.bank_id==+e.id);return 1===s.online_application.commercial&&3!==s.online_application.type&&(d="Подача заявки на сайте банка",p="non_commercial"),3===s.online_application.type?(d="Открытие онлайн на Финуслугах",p="platform"):1!==s.online_application.commercial&&3!==s.online_application.type&&(d="Открытие в банке"),{id:s.id,bankName:null!==(l=null==v?void 0:v.name)&&void 0!==l?l:s.bank_name,bankId:null!==(n=null==v?void 0:v.id)&&void 0!==n?n:"",isCard:!1,logo:null!==(i=null==v?void 0:v.logo_mob)&&void 0!==i?i:"",title:s.title,url:c,legalName:(e=>{if(e)try{let t=JSON.parse(e);if(Array.isArray(t))return t[0].name;return t.name}catch(t){return e}return""})("string"==typeof(null==v?void 0:v.legal_entities)?JSON.parse(null==v?void 0:v.legal_entities)[0].name:null==v?void 0:null===(t=v.legal_entities)||void 0===t?void 0:t[0].name),isKascko:1==+s.insurance_need.need,isPermanentRegistation:1==+s.registration_address.permanent,period:u||+s.period.to,rate:+s.interest_rate.from,rateTo:+s.interest_rate.to,payment:+s.first_payment.from||0,currency:"₽",detailUrl:"/".concat(L.u.AUTOCREDIT,"/").concat(s.url),notLoan:1===s.loan.not_required,incomeProof:0===s.income_proof.not_required,typeText:d,eventValue:p,serviceTooltip:null,amountFrom:Number(s.amount.from),amountTo:Number(s.amount.to),type:ed(s),site:{title:null!==(a=null==v?void 0:v.site.title)&&void 0!==a?a:null,url:null!==(o=null==v?void 0:v.site.url)&&void 0!==o?o:null}}};var ev=l(84053),em=l(94347),e_=l(5569),eb=l.n(e_);let eh=(0,r.memo)(e=>{let{bank:t,banks:l,currentCardId:n,autocredits:i,autocreditsFinuslugi:o,className:s}=e,{town:u}=(0,em.T)(),[c,d]=(0,r.useState)(),[p,v]=(0,r.useState)(null),m=(0,r.useCallback)(()=>{d(void 0)},[]),_=(0,r.useCallback)(e=>{(0,z.D)({eventCategory:L.u.AUTOCREDIT,eventAction:z.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},[]),b=(0,r.useMemo)(()=>{let e=i?i.filter(e=>e.id!==n):[];return(0,ec.$)({productList:e,anotherList:e,count:eu.NU})},[i,n]),g=(0,r.useMemo)(()=>{let e=o||[];return(0,ec.$)({productList:e,anotherList:e,count:eu.wo-b.length})},[b.length,o]),f=(0,r.useMemo)(()=>({bankList:b.map(e=>ep({banks:[t],autoCredit:e})),finuslugiList:g.map(e=>ep({banks:l,autoCredit:e}))}),[t,l,b,g]),x=(0,r.useCallback)(e=>{if(!e)return;let t=[b,g].reduce((e,t)=>[...e,...t],[]).find(t=>t.id===e.id);if(t){var l,n;return{...t,site:{...e.site},bankName:e.bankName,detailUrl:null!==(l=e.detailUrl)&&void 0!==l?l:"",logo:e.logo,url:null!==(n=e.url)&&void 0!==n?n:""}}},[b,g]),C=(0,r.useCallback)(e=>{var t;d(x(e)),v(null!==(t=null==e?void 0:e.type)&&void 0!==t?t:null),e&&(0,z.D)({eventCategory:L.u.AUTOCREDIT,eventAction:z.i.popup,eventActionText:e.title,eventLabel:e.id})},[x]),y="".concat((0,ev.ZR)().mainBaseUrl,"/banki/").concat(t.url,"/avtokredity").concat((null==u?void 0:u.url.length)?"/reg_"+u.url:"");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:(0,D.Z)(eb().container,s),children:[(0,a.jsx)("h3",{className:eb().title,children:"Другие автокредиты"}),(0,a.jsxs)(h.t,{children:[!!f.bankList.length&&(0,a.jsxs)("section",{className:eb().offersListContainer,children:[(0,a.jsxs)("p",{className:eb().listTitle,children:["Автокредиты от ",t.name]}),f.bankList.map(e=>(0,a.jsx)(eo,{onDetailInfoClick:C,className:eb().listItem,data:e,onClick:_,text:"Подать заявку",detailData:{data:x(e),mainPageUrl:L.u.AUTOCREDIT}},e.url)),(0,a.jsx)(er.j,{offPadding:!0,text:"Bсе предложения от банка",href:y,target:"_blank",iconColor:"light",mainPageUrl:L.u.AUTOCREDIT})]}),!!f.finuslugiList.length&&(0,a.jsxs)("section",{className:eb().offersListContainer,children:[(0,a.jsx)("p",{className:eb().listTitle,children:"Автокредиты на Финуслугах"}),f.finuslugiList.map(e=>(0,a.jsx)(eo,{onDetailInfoClick:C,className:eb().listItem,data:e,onClick:_,text:"Подать заявку",detailData:{data:x(e),mainPageUrl:L.u.AUTOCREDIT}},e.url)),(0,a.jsx)(er.j,{offPadding:!0,text:"Bсе предложения на Финуслугах",href:"/avtokredity",target:"_blank",iconColor:"light",mainPageUrl:L.u.AUTOCREDIT})]})]})]}),(0,a.jsx)(es.h,{data:c,isOpen:!!c,onClose:m,mainPageUrl:L.u.AUTOCREDIT,offerType:p})]})});eh.displayName="AutoCreditsList";var eg=l(11163),ef=l(82080);let ex=e=>Array.isArray(e)?e[0]:e,eC=e=>{var t,l,n,i,a,o;let{asPath:s}=(0,eg.useRouter)(),[u,c]=(0,r.useState)(Number(null!==(l=e.amount.from)&&void 0!==l?l:0)),[d,p]=(0,r.useState)(0),[v,m]=(0,r.useState)(Number(null!==(n=e.period.to)&&void 0!==n?n:1)),_=Number(null!==(i=e.period.from)&&void 0!==i?i:1),b=Number(null!==(a=e.period.to)&&void 0!==a?a:1),h=(0,r.useMemo)(()=>{let t=[];return 0!==e.repayment_procedure.annuity&&t.push({label:"Аннуитетный",value:W.T.annuity}),void 0!==e.repayment_procedure.differentiated&&0!==e.repayment_procedure.differentiated&&t.push({label:"Дифференцированный",value:W.T.differentiated}),t},[e.repayment_procedure]),[g,f]=(0,r.useState)(null!==(o=null===(t=h[0])||void 0===t?void 0:t.value)&&void 0!==o?o:null),x=(0,r.useCallback)(e=>{c(null!=e?e:0)},[]),C=(0,r.useCallback)(e=>{p(null!=e?e:0)},[]),y=(0,r.useMemo)(()=>({value:u,onChange:x}),[u,x]),T=(0,r.useMemo)(()=>({value:d,onChange:C}),[d,C]);return(0,r.useEffect)(()=>{let e=(0,ef.p)(s,"#"),t=ex(e.amount),l=ex(e.first_payment),n=ex(e.period);void 0!==t&&c(+t),void 0!==l&&p(+l);let i=Number(n);!Number.isNaN(i)&&i>=_&&i<=b&&m(i)},[]),(0,r.useMemo)(()=>({amount:u,setAmount:c,amountInputProperties:y,firstPayment:d,setFirstPayment:p,firstPaymentInputProperties:T,period:v,setPeriod:m,periodMin:_,periodMax:b,paymentTypeOptions:h,paymentTypeValue:g,setPaymentTypeValue:f}),[u,y,d,T,v,_,b,h,g])};var ey=l(54228),eT=l(51469),eN=l(71276),ej=l(44215),eA=l(89519),ek=l(56381),eS=l.n(ek);function ew(e){var t;let{offer:l,posts:n,questions:i,description:o,banks:r,refererTag:u,offers:d,offersFinuslugi:f}=e,x=ed(l),C=(0,ey.S0)(),y=eC(l),{region:T,town:N}=(0,em.T)(),A=r.find(e=>Number(e.id)===l.bank_id),k=(null==i?void 0:i.map(e=>({title:e.title,text:e.text.map(e=>e.data.html).join(""),plainText:e.text.map(e=>(0,m.MK)(e.data.html)).join("").trim()})))||[],S="Автокредит \xab".concat(l.title,"\xbb от ").concat(null!==(t=null==A?void 0:A.name_r)&&void 0!==t?t:"");return(0,a.jsxs)("main",{className:eS().page,children:[(0,a.jsx)(b.N,{productId:String(l.id),title:S,description:null!=o?o:""}),(0,a.jsx)(eN.o,{}),(0,a.jsx)(eT.g,{questions:k}),(0,a.jsx)("div",{className:eS().navigationWrapper,children:(0,a.jsx)(h.t,{children:(0,a.jsx)(s.Oo,{className:eS().breadcrumbs,items:(()=>{var e;let t=(null==N?void 0:N.name_p)||(null==T?void 0:T.name_p)?" в ".concat((null==N?void 0:N.name_p)||(null==T?void 0:T.name_p)):"",n="".concat((null==T?void 0:T.url)?"/reg_".concat(null==T?void 0:T.url):"").concat((null==N?void 0:N.url)?"/".concat(null==N?void 0:N.url):""),i=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(t),href:"/".concat(L.u.AUTOCREDIT).concat(n)}];return u&&i.push({label:"".concat(u.name).concat(t),href:"/".concat(L.u.AUTOCREDIT,"/teg_").concat(u.url).concat(n)}),i.push({label:"".concat(null!==(e=null==A?void 0:A.name)&&void 0!==e?e:l.bank_name," Автокредит ").concat(l.title)}),i})()})})}),(0,a.jsx)(ee,{calculator:y,bank:A,offerType:x,data:l,isMobile:C}),(0,a.jsx)(h.t,{className:eS().about,children:(0,a.jsx)(j,{data:l,bank:A,offerType:x,pageUrl:L.u.AUTOCREDIT})}),(0,a.jsx)(I,{isMobile:C,offerType:x,url:l.online_application.url}),void 0!==A&&(0,a.jsx)(eh,{bank:A,banks:r,currentCardId:l.id,autocredits:d,autocreditsFinuslugi:f}),n&&(0,a.jsx)(_.S,{posts:n.posts,categories:n.ctgs,pageUrl:L.u.AUTOCREDIT}),(0,a.jsxs)("div",{className:eS().supportSection,children:[(0,a.jsx)(eA.O,{idSupport:g.Je,Image:e=>(0,a.jsx)(c(),{...e,width:555,height:344,src:v.Z,alt:"фоновое изображение"}),dataLayerPush:et.l,eventEmitter:()=>window.supportWidget.craftTalk.open()}),(0,a.jsx)(ej.B,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,a.jsx)(p(),{...e}),dataLayerPush:et.l,questions:k,eventCategory:"cards_support_block",href:"".concat((0,ev.ZR)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про автокредиты"})]})]})}var eR=l(98670);l(93188);var eL=l(53850),eM=l(37771),eF=l(59457);function eI(){return(eI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(null,arguments)}var eD=function(e){return r.createElement("svg",eI({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),n||(n=r.createElement("path",{fill:"#1F242E",fillRule:"evenodd",d:"M2 5a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1M2 12c0-.552.482-1 1.077-1h11.846c.595 0 1.077.448 1.077 1s-.482 1-1.077 1H3.077C2.482 13 2 12.552 2 12M2 19c0-.552.5-1 1-1h6c.5 0 1 .448 1 1s-.352 1-1 1H3c-.5 0-1-.448-1-1",clipRule:"evenodd"})))},eE=l(30082),eU=l.n(eE);let eP=e=>{let t=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let l=l=>{var n;let{target:i}=l;i instanceof HTMLElement&&!(null===(n=t.current)||void 0===n?void 0:n.contains(i))&&e()};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[e]),t},eO=e=>{let{content:t,children:l,disabled:n,isNewSortRadios:i}=e,[o,s]=(0,r.useState)(!1),u=(0,r.useCallback)(()=>s(!0),[s]),c=(0,r.useCallback)(()=>s(!1),[s]);return(0,a.jsxs)("div",{className:(0,D.Z)(eU().wrap,i&&eU().newSortRadioWrap),onClick:u,ref:eP(c),children:[l,o&&!n&&(0,a.jsx)("div",{className:eU().content,children:t})]})};function eB(){return(eB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var n in l)({}).hasOwnProperty.call(l,n)&&(e[n]=l[n])}return e}).apply(null,arguments)}var eH=function(e){return r.createElement("svg",eB({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),i||(i=r.createElement("path",{fill:"#000",d:"M12 11a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-1-1m.38-3.92a1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1.2 1.2 0 0 0-.21.33 1 1 0 0 0 .21 1.09q.147.133.33.21A1 1 0 0 0 13 8a1.05 1.05 0 0 0-.29-.71 1 1 0 0 0-.33-.21M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20m0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20"})))},eZ=l(58177),eW=l.n(eZ);let eV=e=>{let{isNewSortRadios:t,isMobile:l,onChangeSort:n,isIncreaseSort:i}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:(0,D.Z)(eW().sortTypeHead,t&&eW().newSortRadioSortTypeHead),children:[(0,a.jsx)("button",{style:{marginLeft:"0px",marginRight:l?"0px":"8px"},className:(0,D.Z)(eW().sortTypeButton,t&&eW().newSortRadioSortTypeButton),onClick:n,children:(0,a.jsx)(eD,{className:(0,D.Z)(!i&&eW().iconInverted)})}),"Сортировать"]}),t&&(0,a.jsx)("div",{className:eW().divider})]})},eq=(0,r.memo)(e=>{let{isMobile:t,onChangeSort:l,isIncreaseSort:n,onChangeSortType:i,sortTypeItems:o,sortTypeValue:r,isNewSortRadios:u}=e;return(0,a.jsxs)(a.Fragment,{children:[!u&&t&&(0,a.jsx)(eV,{onChangeSort:l,isMobile:t,isIncreaseSort:n,isNewSortRadios:u}),(0,a.jsxs)("div",{className:(0,D.Z)(eW().sortTypeContainer,u&&eW().newSortRadioSortTypeContainer),onClick:e=>e.stopPropagation(),children:[u&&(0,a.jsx)(eV,{onChangeSort:l,isMobile:t,isIncreaseSort:n,isNewSortRadios:u}),o.map(e=>(0,a.jsxs)("div",{"data-qa":"".concat(e.value,"_radio"),className:eW().sortType,children:[u?(0,a.jsx)(s.Y8,{name:e.value,value:r,checked:e.value===r,label:e.label,onChange:()=>i(e.value)}):(0,a.jsx)(s.Y8,{name:e.value,label:e.label,checked:e.value===r,className:eW().sortTypeRadio,value:e.value,onChange:()=>i(e.value)}),e.description&&(0,a.jsx)(s.u,{text:e.description,className:(0,D.Z)(eW().sortTypeButton,u&&eW().newSortRadioSortTypeButton),children:(0,a.jsx)(eH,{})})]},e.value))]})]})});eq.displayName="SortRadios";var ez=l(5257),eQ=l.n(ez);let eJ=(0,r.memo)(e=>{let{chips:t,onClickParams:l,isIncreaseSort:n,onChangeIncreaseSort:i,sortTypeItems:o,sortTypeValue:u,onChangeSortType:c,isMobile:d,isFixed:p,portalId:v,onClickChip:m,className:_,onClickSortType:b,isNewSortRadios:g}=e,f=(0,r.useCallback)(()=>null==i?void 0:i(!n),[n,i]),x=(0,a.jsx)("div",{style:{padding:"8px",borderRadius:g?"20px":"8px",background:"white"},className:(0,D.Z)(!d&&g&&eQ().sortTypeDesktop),children:(0,a.jsx)(eq,{isMobile:d,isIncreaseSort:n,onChangeSort:f,onChangeSortType:c,sortTypeItems:o,sortTypeValue:u,isNewSortRadios:g,portalId:v})}),C=o.find(e=>e.value===u);return(0,a.jsx)("div",{className:(0,D.Z)(eQ().filter,g&&eQ().newSortRadiosFilter,p&&eQ().stuck,_),children:(0,a.jsx)(h.t,{className:eQ().mainContainer,children:(0,a.jsxs)("div",{className:eQ().container,children:[(0,a.jsx)(s.cL,{className:eQ().chipsContainer,chips:t,value:t.map(e=>e.id),multiple:!0,activeVariant:"secondary",onChipClick:m}),(0,a.jsxs)("div",{className:eQ().actionsWrapper,children:[(0,a.jsxs)("button",{className:(0,D.Z)(eQ().action,eQ().actionButton),onClick:l,children:[(0,a.jsx)(eF.Z,{className:eQ().icon}),(0,a.jsx)("span",{className:eQ().actionText,children:"Все параметры"})]}),(0,a.jsxs)("div",{className:eQ().action,children:[(0,a.jsx)("button",{className:(0,D.Z)(eQ().icon,eQ().iconButton,!n&&eQ().iconInverted),onClick:f,children:(0,a.jsx)(eD,{})}),(0,a.jsx)(eO,{content:x,disabled:d,isNewSortRadios:g,children:(0,a.jsx)("button",{onClick:b,className:(0,D.Z)(eQ().actionText,eQ().actionButton),"data-qa":"".concat(u,"_order"),children:(null==C?void 0:C.shortLabel)||(null==C?void 0:C.label)||"Сортировка"})})]})]})]})})})});eJ.displayName="ListFilter";var eX={src:"/kredity/assets/_next/static/media/adv-auto-desktop.6c981f82.svg",height:132,width:1110,blurWidth:0,blurHeight:0},eK={src:"/kredity/assets/_next/static/media/adv-auto-mobile.07d07b83.svg",height:132,width:343,blurWidth:0,blurHeight:0},e$=l(41172),eG=l.n(e$);let eY=(0,r.memo)(e=>{let{className:t}=e,{mainBaseUrl:l}=(0,ev.ZR)();return(0,a.jsxs)(p(),{href:"".concat(l,"/osago"),target:"_blank",className:(0,D.Z)(eG().wrapper,t),children:[(0,a.jsx)(c(),{className:(0,D.Z)(eG().bg,eG().bgDesktop),src:eX,alt:""}),(0,a.jsx)(c(),{className:(0,D.Z)(eG().bg,eG().bgMobile),src:eK,alt:""}),(0,a.jsx)(s.zx,{className:eG().button,size:"s",children:"Оформить"})]})});eY.displayName="OsagoAd";var e0=l(65848);let e1=[],e2=(e,t)=>{let{amount:l,firstPayment:n,period:i,payment:a,incomeProof:o,vehicleType:r,vehicleState:s,banks:u,insuranceNeed:c,stateCoFinancing:d,notFirstPayment:p}=e,v=[{id:eM.oA.amount,label:"Сумма кредита: ".concat(l?"".concat((0,J.uf)(l)," ₽"):"не имеет значения")},{id:eM.oA.firstPayment,label:"Первый взнос: ".concat(n?"".concat((0,J.uf)(n)," ₽"):"не имеет значения")}];if("number"==typeof i){let e=eM.vw.find(e=>e.value===i);void 0!==e&&v.push({id:eM.oA.period,label:0===e.value?"Срок: ".concat(e.label):e.label})}if(void 0!==a&&0!==a&&v.push({id:eM.oA.payment,label:"До ".concat((0,J.uf)(a)," ₽ в мес")}),0!==o.length){let e=eM.eT.filter(e=>o.includes(e.value)),t=1===e.length?e[0].label:"Подтверждение дохода: (".concat(e.length,")");v.push({id:eM.oA.period,label:t})}if(0!==r.length){let e=eM.Ht.filter(e=>r.includes(e.value)),t=1===e.length?e[0].label:"Тип транспорта: (".concat(e.length,")");v.push({id:eM.oA.vehicleType,label:t})}if(0!==s.length){let e=eM.QN.filter(e=>s.includes(e.value)),t=1===e.length?e[0].label:"Состояние транспорта: (".concat(e.length,")");v.push({id:eM.oA.vehicleState,label:t})}if(0!==s.length){let e=eM.QN.filter(e=>s.includes(e.value)),t=1===e.length?e[0].label:"Состояние транспорта: (".concat(e.length,")");v.push({id:eM.oA.vehicleState,label:t})}if(0!==s.length){let e=eM.QN.filter(e=>s.includes(e.value)),t=1===e.length?e[0].label:"Состояние транспорта: (".concat(e.length,")");v.push({id:eM.oA.vehicleState,label:t})}if(0!==u.length){let e=t.filter(e=>u.includes(+e.value)),l=1===e.length?e[0].label:"Банки: (".concat(e.length,")");v.push({id:eM.oA.bank,label:l})}return(c&&v.push({id:eM.oA.insuranceNeed,label:"Без каско"}),d&&v.push({id:eM.oA.stateCoFinancing,label:"С господдержкой"}),p&&v.push({id:"notFirstPayment",label:"Без первого взноса"}),e1.length===v.length&&v.every((e,t)=>e.label===e1[t].label&&e.id===e1[t].id))?e1:(e1=v,v)},e3=e=>e?56:80;var e4=l(71147),e7=l(6252),e6=l(50586),e8=l.n(e6),e5=l(75340),e9=l(29023),te=l(88060),tt=l(10034),tl=l.n(tt);let tn=e=>{(0,z.D)({eventCategory:L.u.AUTOCREDIT,eventAction:z.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},ti=e=>{let{filter:t,className:l,isMobile:n,bankOptions:i,banks:o,town:s,region:u}=e,c=(0,e5.lJ)(),d=(0,r.useRef)(null),p=(0,r.useRef)(()=>null),[v,m]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),[g,f]=(0,r.useState)(null),{count:x,totalCount:C,increaseSort:y,sort:T,handleToggleModal:N,setIncreaseSort:j,setSort:A,isPageLoading:k,handleLoadMore:S,autoCredits:w,isLoading:R,amount:M,firstPayment:F,period:I}=t,[E,U]=(0,r.useState)(),P=(0,r.useMemo)(()=>e2(t,i),[i,t]),O=(0,r.useCallback)(()=>{N()},[N]),B=(0,r.useMemo)(()=>w.map(e=>{let t=ep({banks:o,autoCredit:e}),l={};void 0!==M&&0!==M&&(l.amount=M),void 0!==F&&0!==F&&(l.first_payment=F),void 0!==I&&0!==I&&(l.period=I);let n=(0,e7.R)(l);return Object.keys(l).length&&(t.url="".concat(t.url,"#").concat(n)),t}),[M,w,o,F,I]),H=(0,r.useCallback)(e=>{if(null===e)return;let t=w.find(t=>t.id===e.id);if(void 0!==t){var l,n;return{...t,site:{...e.site},bankName:e.bankName,detailUrl:null!==(l=e.detailUrl)&&void 0!==l?l:"",logo:e.logo,url:null!==(n=e.url)&&void 0!==n?n:""}}},[w]),Z=(0,r.useCallback)(()=>{U(void 0)},[]),W=(0,r.useCallback)(e=>{var t;U(H(e)),f(null!==(t=null==e?void 0:e.type)&&void 0!==t?t:null),null!==e&&(0,z.D)({eventCategory:L.u.AUTOCREDIT,eventAction:z.i.popup,eventActionText:e.title,eventLabel:e.id})},[H]);(0,r.useEffect)(()=>{window.removeEventListener("scroll",p.current);let e=e3(n);return p.current=()=>{if(null===d.current)return;let{top:t}=d.current.getBoundingClientRect();m(t<e-3),b(t<=e+1)},window.addEventListener("scroll",p.current),()=>window.removeEventListener("scroll",p.current)},[n]);let V=(null==u?void 0:u.name_p)!==void 0?(null==s?void 0:s.name_p)?"в ".concat(null==s?void 0:s.name_p):"в ".concat(null==u?void 0:u.name_p):null,q=10*t.page<x;return(0,a.jsxs)("section",{className:(0,D.Z)(tl().section,l),children:[(0,a.jsx)(h.t,{children:(0,a.jsxs)("p",{className:tl().title,children:["Найдено ",x," ",(0,a.jsx)("span",{className:tl().titleHide,children:(0,e4.s)(x)})," ",V,x===C||0===x?"":"из ".concat(C)]})}),(0,a.jsx)("div",{ref:d,className:(0,D.Z)(tl().filter,tl().newLayout,{[tl().filterBottom]:v}),children:(0,a.jsx)(eJ,{chips:P,onChangeIncreaseSort:j,onChangeSortType:A,onClickChip:O,onClickParams:N,sortTypeItems:eM.$m,sortTypeValue:T,isIncreaseSort:y,isMobile:n,isFixed:_})}),(0,a.jsxs)(h.t,{children:[(0,a.jsx)("p",{className:tl().listTitle,ref:c,children:"Предложения рынка кредитов"}),(0,a.jsx)("div",{children:!R&&B.map((e,t)=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsx)(eo,{onDetailInfoClick:W,className:tl().listItem,data:e,onClick:tn,text:"Подать заявку",detailData:{data:H(e),mainPageUrl:L.u.AUTOCREDIT}},e.url),2===t&&(0,a.jsx)(eY,{className:tl().adv})]},e.id))}),R&&Array.from({length:6},(e,t)=>(0,a.jsx)(e0.O,{className:tl().listItem},t)),q&&(0,a.jsx)(te.f,{page:t.page,loading:k,onClick:S}),(0,a.jsx)(e9.i,{tag:"p",className:e8().subtitle,children:t.subtitle})]}),(0,a.jsx)(es.h,{data:E,isOpen:!!E,onClose:Z,mainPageUrl:L.u.AUTOCREDIT,offerType:g})]})};function ta(e){let t=(0,E.b)(e.full_price);return{...e,full_price:t}}async function to(e,t){let{tagUrl:l,regionUrl:n,townUrl:i,limit:a=10,...o}=e,r=function(e){let{limit:t,tagUrl:l,regionUrl:n,townUrl:i,amount:a,firstPayment:o,period:r,loan:s,incomeProof:u,insuranceNeed:c,vehicleState:d,vehicleType:p,stateCoFinancing:v,bank:m,sort:_,order:b,payment:h,page:g,borrower:f}=e,x=new URLSearchParams;return void 0!==t&&x.set("limit",String(t)),void 0!==l&&x.set("tag",l),void 0!==n&&x.set("region",n),void 0!==i&&x.set("town",i),void 0!==a&&x.set(eM.oA.amount,a),void 0!==o&&x.set(eM.oA.firstPayment,String(o)),void 0!==r&&x.set(eM.oA.period,String(r)),void 0!==s&&x.set(eM.oA.loan,s.join(",")),void 0!==u&&x.set(eM.oA.incomeProof,Array.isArray(u)?u.join(","):u),void 0!==c&&x.set(eM.oA.insuranceNeed,c?"1":"0"),void 0!==d&&x.set(eM.oA.vehicleState,d.join(",")),void 0!==p&&x.set(eM.oA.vehicleType,p.join(",")),void 0!==v&&x.set(eM.oA.stateCoFinancing,v?"1":"0"),void 0!==m&&x.set(eM.oA.bank,m.join(",")),void 0!==_&&x.set(eM.oA.sort,_),void 0!==b&&x.set(eM.oA.order,b),void 0!==h&&x.set(eM.oA.payment,h),void 0!==g&&x.set(eM.oA.page,String(g)),void 0!==f&&x.set(eM.oA.borrower,f.join(",")),x.set("archive","0"),x.toString()}({limit:a,regionUrl:n,tagUrl:l,townUrl:i,...o}),{data:s,error:u}=await (0,eR.D)("/money_data/AutoCredits.json?".concat(r),{signal:t});if(u||null===s)throw Error(null!=u?u:"Ошибка загрузки данных");if(void 0!==o.page&&1!==o.page&&0===s.autoCredits.length)throw new eL.dR("Invalid autocredits page: ".concat(o.page));return{offers:s.autoCredits.map(ta),count:s.autoCredits_count,totalCount:s.autoCredits_total_count,title:s.title,subtitle:s.subtitle,description:s.description}}var tr=l(65709),ts=l(32368),tu=l(60007),tc=l(44735);async function td(){return(await (0,tr.$u)("AutoCredits.json?tags&short=1")).autoCredit_tags.reduce((e,t)=>(t.name!==tc.V4&&e.set(t.url,function(e){let{name:t,url:l,url_redirect:n}=e,i={name:t,url:l},a=(0,tu.d)(n);return void 0!==a&&(i.url_redirect=a),i}(t)),e),new Map)}new ts.$(td),l(51138),l(96202);var tp=l(37171);function tv(e){let{banks:t,layout:l,refererTag:n,description:i,offer:o,posts:r,questions:s,offers:u,offersFinuslugi:c}=e;return(0,a.jsx)(tp.A,{data:l,children:(0,a.jsx)(ew,{offer:o,posts:r,questions:s,description:i,banks:t,refererTag:n,offers:u,offersFinuslugi:c})})}var tm=l(423),t_=l(66535),tb={src:"/kredity/assets/_next/static/media/filter.0c02ec9e.svg",height:16,width:16,blurWidth:0,blurHeight:0},th=l(65594),tg=l.n(th);let tf=(0,r.memo)(e=>{let{count:t,onClickParams:l,onClickShow:n,isLoading:i,className:o}=e;return(0,a.jsxs)("div",{className:(0,D.Z)(tg().buttons,o),children:[(0,a.jsx)(s.zx,{variant:"secondary",size:"xs",pending:i,disabled:i,className:(0,D.Z)(tg().filterButton,tg().modalButton),onClick:e=>l(e),iconLeft:(0,a.jsx)(c(),{src:tb,alt:""}),children:"Все параметры"}),(0,a.jsxs)(s.zx,{size:"xs",className:tg().filterButton,pending:i,disabled:i,onClick:n,children:["Показать ",t]})]})});tf.displayName="FilterActions";var tx=l(58484),tC=l(91646),ty=l(98028),tT=l(7835),tN=l.n(tT);let tj=(0,r.memo)(e=>{let{checkedState:t,onChange:l,className:n}=e;return(0,a.jsxs)("ul",{className:(0,D.Z)(tN().wrapper,n),children:[(0,a.jsxs)("li",{className:tN().item,children:[(0,a.jsx)(s.XZ,{className:tN().checkbox,onChange:()=>l("insuranceNeed",!t.insuranceNeed),checked:t.insuranceNeed,value:t.insuranceNeed,label:"Без каско"}),(0,a.jsx)(ty.J,{content:"По закону, каско покупать необязательно, но такая страховка компенсирует вам ущерб, даже если вы виновны в ДТП. Каско можно включить в стоимость кредита.",children:(0,a.jsx)(ty.L,{className:tN().detailIcon})})]}),(0,a.jsxs)("li",{className:tN().item,children:[(0,a.jsx)(s.XZ,{className:tN().checkbox,onChange:()=>l("stateCoFinancing",!t.stateCoFinancing),checked:t.stateCoFinancing,value:t.stateCoFinancing,label:"С господдержкой"}),(0,a.jsx)(ty.J,{content:"Поддержка, при которой часть средств предоставляет государство. Их можно потратить только на автомобили определенных марок.",children:(0,a.jsx)(ty.L,{className:tN().detailIcon})})]}),(0,a.jsx)("li",{children:(0,a.jsx)(s.XZ,{className:tN().checkbox,onChange:()=>l("notFirstPayment",!t.notFirstPayment),checked:t.notFirstPayment,value:t.notFirstPayment,label:"Без первого взноса"})})]})});tj.displayName="AutoCreditsFilterDops";var tA=l(4645),tk=l.n(tA);let tS=(0,r.memo)(e=>{let{activeIds:t,items:l,onChange:n,className:i}=e,o=(e,l)=>{n(l?t.filter(t=>String(e)!==t):[...t,String(e)])};return(0,a.jsx)("div",{className:(0,D.Z)(tk().tagsWrapper,i),children:l.map(e=>{var l;let n=t.some(t=>t===e.value);return(0,a.jsx)(s.zx,{className:tk().tag,variant:n?"primary":"secondary",onClick:()=>o(e.value,n),children:null!==(l=e.labelShort)&&void 0!==l?l:e.label},e.value)})})});tS.displayName="AutoCreditsTags";var tw=l(45117),tR=l(86992),tL=l(30715),tM=l.n(tL);let tF=e=>{(0,et.l)({event:"data-event",eventAction:e,eventCategory:L.u.AUTOCREDIT})},tI=e=>{var t;let l=null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"";tF("click_button_".concat((0,el.b)(l)))},tD=e=>{let{region:t,town:l,className:n,tag:i,isMobile:o,filter:s,subtitle:u,adFoxConfig:c}=e,{scrollSmooth:d}=(0,e5.vO)(),{count:p,isLoading:v,amount:m,firstPayment:_,vehicleType:b,setVehicleType:h,insuranceNeed:g,stateCoFinancing:f,notFirstPayment:x,setInsuranceNeed:C,setStateCoFinancing:y,setNotFirstPayment:T,handleToggleModal:N,firstPaymentPercent:j,handleChangeFirstPayment:A,handleChangeAmount:k}=s,S=(0,r.useCallback)(e=>{tI(e),N()},[N]),w=(0,r.useCallback)(e=>{tI(e),d({offset:-90})},[d]),R=(0,r.useMemo)(()=>({insuranceNeed:g,stateCoFinancing:f,notFirstPayment:x}),[g,x,f]),M=(0,r.useCallback)((e,t)=>{switch(e){case"insuranceNeed":C(t);break;case"notFirstPayment":T(t),A(t?0:void 0);break;case"stateCoFinancing":y(t)}},[A,C,T,y]);return(0,a.jsxs)("div",{className:(0,D.Z)(n),children:[(0,a.jsxs)("div",{className:tM().pageHeadingWrap,children:[(0,a.jsx)(tx.V,{region:t,town:l,title:i&&"DEFAULT"!==i.tag_name?null==i?void 0:i.name:"Автокредиты",subtitle:u,mainPageUrl:L.u.AUTOCREDIT}),(0,a.jsx)("div",{className:tM().banner,children:(0,a.jsx)(tC.Z,{config:c,params:tw.P3})})]}),(0,a.jsxs)(t_.W2,{className:tM().container,children:[(0,a.jsxs)("div",{className:tM().filter,children:[(0,a.jsxs)("div",{className:tM().fields,children:[(0,a.jsx)(tR.P,{label:"Сумма кредита",size:"s",placeholder:"Сумма кредита",value:m,onChange:k}),(0,a.jsx)(tR.P,{label:"Первый взнос",size:"s",value:_,rightLabel:"".concat(j,"%").replace(".",","),caption:j>100?eM.N2:void 0,state:j>100?"error":void 0,onChange:A})]}),!o&&(0,a.jsx)(tf,{count:p,onClickParams:S,onClickShow:w,isLoading:v})]}),(0,a.jsx)(tS,{className:tM().tagsWrapper,items:eM.Ht,activeIds:b,onChange:h}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:tM().dopsTitle,children:"Дополнительно"}),(0,a.jsx)(tj,{className:tM().dops,onChange:M,checkedState:R})]}),o&&(0,a.jsx)(tf,{count:p,onClickParams:S,onClickShow:w,isLoading:v})]})]})};var tE=l(79644),tU=l(56790),tP=l(27685),tO=l.n(tP);let tB=e=>{let{isOpen:t,pageUrl:l,title:n,onCLickShow:i,onClickReset:o,onClose:u,children:c,count:d,isLoading:p}=e;(0,r.useEffect)(()=>{t&&(0,et.l)({event:"data-event",eventAction:"show_pop_up_".concat((0,el.b)(n)),eventCategory:l})},[t,l,n]);let v=e=>{var t;let n=null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"";(0,et.l)({event:"data-event",eventAction:"click_button_".concat((0,el.b)(n)),eventCategory:l})},m=(0,a.jsxs)("div",{className:tO().buttonActions,children:[(0,a.jsxs)(s.zx,{className:tO().button,pending:p,disabled:p,onClick:e=>{v(e),i()},children:["Показать ",d]}),(0,a.jsx)(s.zx,{variant:"secondary",className:tO().button,disabled:p,onClick:e=>{v(e),o()},children:"Сбросить параметры"})]});return(0,a.jsx)(tU.h,{children:(0,a.jsx)(s.u_,{className:tO().mobilePopup,open:t,onClose:u,footer:{children:m},header:{title:"Все параметры"},children:(0,a.jsx)("div",{className:tO().content,children:c})})})},tH=(e,t)=>{(0,et.l)({event:"data-event",eventAction:L.u.AUTOCREDIT,eventCategory:"filter_catalog",eventLabel:(0,el.b)(e),eventValue:t})},tZ=(e,t)=>{tH(e,(null!=t?t:[]).map(e=>e.label).join(","))};var tW=l(10622),tV=l.n(tW);let tq=e=>{let{filter:t,isMobile:l,bankOptions:n}=e,{handleToggleModal:i,resetFilter:o,amount:u,firstPayment:c,setPeriod:d,period:p,payment:v,incomeProof:m,setIncomeProof:_,vehicleType:b,setVehicleType:h,vehicleState:f,setVehicleState:x,borrower:C,setBorrower:y,loan:T,setLoan:N,banks:j,setBank:A,isLoading:k,insuranceNeed:S,stateCoFinancing:w,setInsuranceNeed:R,setStateCoFinancing:M,setSort:F,sort:I,notFirstPayment:E,setNotFirstPayment:U,firstPaymentPercent:P,handleChangeAmount:O,handleChangeFirstPayment:B,handleChangePayment:H}=t,Z=(0,r.useMemo)(()=>eM.vw.filter(e=>e.value===p),[p]),W=(0,r.useMemo)(()=>eM.eT.filter(e=>m.includes(e.value)),[m]),V=(0,r.useMemo)(()=>eM.Ht.filter(e=>b.includes(e.value)),[b]),q=(0,r.useMemo)(()=>eM.QN.filter(e=>f.includes(e.value)),[f]),z=(0,r.useMemo)(()=>eM.F$.filter(e=>C.includes(e.value)),[C]),Q=(0,r.useMemo)(()=>eM.Z3.filter(e=>T.includes(e.value)),[T]),J=(0,r.useMemo)(()=>n.filter(e=>j.includes(Number(e.value))),[n,j]),K=(0,r.useCallback)(()=>{i(),(0,X.l)(g.Tm,{offset:l?0:-140,position:"top"})},[i,l]),{handleChangePeriod:$,handleChangeIncomeProf:G,handleChangeVehicleType:Y,handleChangeVehicleState:ee,handleChangeBorrower:et,handleChangeLoan:el,handleChangeBanks:en}=(0,r.useMemo)(()=>({handleChangePeriod:e=>{var t;d((null==e?void 0:e[0])&&Number(null==e?void 0:null===(t=e[0])||void 0===t?void 0:t.value)),tZ("Срок",e)},handleChangeIncomeProf:e=>{var t;_(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tZ("Подтверждение дохода",e)},handleChangeVehicleType:e=>{var t;h(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tZ("Тип транспорта",e)},handleChangeVehicleState:e=>{var t;x(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tZ("Состояние транспорта",e)},handleChangeBorrower:e=>{var t;y(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tZ("Категория заемщикаа",e)},handleChangeLoan:e=>{var t;N(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tZ("Обеспечение",e)},handleChangeBanks:e=>{var t;A(null!==(t=null==e?void 0:e.map(e=>Number(e.value)))&&void 0!==t?t:[]),tZ("Банки",e)}}),[A,y,_,N,d,x,h]),ei=(0,r.useMemo)(()=>({insuranceNeed:S,stateCoFinancing:w,notFirstPayment:E}),[S,E,w]),ea=(0,r.useCallback)((e,t)=>{switch(e){case"insuranceNeed":R(t);break;case"notFirstPayment":U(t);break;case"stateCoFinancing":M(t)}},[R,U,M]);return(0,a.jsx)(tB,{count:t.count,isMobile:l,isOpen:t.isOpenModal,pageUrl:L.u.AUTOCREDIT,title:"Все параметры",onCLickShow:K,onClose:i,onClickReset:o,isLoading:k,children:(0,a.jsxs)("div",{className:tV().wrapper,children:[(0,a.jsxs)("div",{className:tV().fields,children:[(0,a.jsx)(tR.P,{label:"Сумма кредита",value:u,onChange:O}),(0,a.jsx)(tR.P,{label:"Первый взнос",value:c,rightLabel:"".concat(P,"%").replace(".",","),caption:P>100?eM.N2:void 0,state:P>100?"error":void 0,onChange:B}),(0,a.jsx)(tE.HU,{isMobile:l,value:Z.length>0?Z:null,onChange:$,label:"Срок",options:eM.vw}),(0,a.jsx)(tR.P,{label:"Ежемесячный платеж до",value:v,onChange:H}),(0,a.jsx)(tE.HU,{isMobile:l,value:W.length>0?W:null,onChange:G,multiple:!0,label:"Подтверждение дохода",options:eM.eT}),(0,a.jsx)(tE.HU,{isMobile:l,value:V.length>0?V:null,multiple:!0,onChange:Y,label:"Тип транспорта",options:eM.Ht}),(0,a.jsx)(tE.HU,{isMobile:l,value:q.length>0?q:null,multiple:!0,onChange:ee,label:"Состояние транспорта",options:eM.QN}),(0,a.jsx)(tE.HU,{isMobile:l,value:z.length>0?z:null,multiple:!0,onChange:et,label:"Категория заемщика",options:eM.F$}),(0,a.jsx)(tE.HU,{isMobile:l,value:Q.length>0?Q:null,multiple:!0,onChange:el,label:"Обеспечение",options:eM.Z3}),(0,a.jsx)(tE.HU,{isMobile:l,value:J.length>0?J:null,multiple:!0,onChange:en,label:"Банки",search:!0,options:n})]}),(0,a.jsxs)("div",{className:tV().checkboxWrapper,children:[(0,a.jsx)("p",{className:tV().title,children:"Дополнительно:"}),(0,a.jsx)(tj,{className:tV().dops,checkedState:ei,onChange:ea}),(0,a.jsx)("p",{className:(0,D.Z)(tV().title,tV().titleSort),children:"Сортировать"}),eM.$m.map(e=>(0,a.jsx)(s.Y8,{label:e.label,name:e.value,value:e.value,checked:e.value===I,onChange:()=>F(e.value)},e.value))]})]})})};async function tz(e,t,l){let n=new URLSearchParams;n.set("tag_url",e),void 0!==t&&n.set("region",t),void 0!==l&&n.set("town",l);let{data:i,error:a}=await (0,eR.D)("/money_data/AutoCreditRegion.json?".concat(n));if(a||null===i)throw Error(null!=a?a:"Ошибка загрузки данных");return i}var tQ=l(91886);async function tJ(e){let t=await (0,tr.$u)("AutoCredits.json?".concat("url","=").concat(encodeURIComponent(e)));if(1!==t.length)throw new eL.dR("AutoCredits tag not found: ".concat(e));return function(e){let{url:t,name:l,tag_name:n,text:i,filter:a,default:o,region_page:r}=e,s={url:t,name:l,tag_name:n,text:i,filter:a,default:o};if(null!==r){let{region_titles:e,town_titles:t,region_content:l,town_content:n}=r;s.region_page={region_titles:e,town_titles:t,region_content:l,town_content:n}}return s}(t[0])}new ts.n(tJ);let tX=(e,t)=>{var l,n,i,a,o,r,s,u,c,d;let p=(0,ef.p)(e),{page:v}=p,m=String(null!==(n=null!==(l=p.amount)&&void 0!==l?l:null==t?void 0:t.filter.amount)&&void 0!==n?n:""),_=String(null!==(a=null!==(i=p.first_payment)&&void 0!==i?i:null==t?void 0:t.filter.first_payment)&&void 0!==a?a:""),b=String(null!==(r=null!==(o=p.period)&&void 0!==o?o:null==t?void 0:t.filter.period)&&void 0!==r?r:""),h=String(null!==(s=p.payment)&&void 0!==s?s:"");return{amount:m&&!isNaN(+m)?m:"",firstPayment:_&&!isNaN(+_)?_:"",period:b&&!isNaN(+b)?+b:void 0,payment:h&&!isNaN(+h)?h:"",vehicleType:[],vehicleState:null!==(u=null==t?void 0:t.filter.vehicle_state)&&void 0!==u?u:[],borrower:[],loan:null!==(c=null==t?void 0:t.filter.loans)&&void 0!==c?c:[],insuranceNeed:(null==t?void 0:t.filter.insurance)===1,stateCoFinancing:(null==t?void 0:t.filter.state_co_financing)===1,incomeProof:null!==(d=null==t?void 0:t.filter.proof_income)&&void 0!==d?d:[],page:Number(v)||1}},tK=(e,t)=>{if(isNaN(e)||isNaN(t)||0===e||0===t)return 0;let l=Number(t)/(Number(e)/100);return Number.isInteger(l)||(l=Number(l.toFixed(5))),l};var t$=l(30292);let tG=e=>{var t,l,n,i;let{region:a,tag:o,town:s,init:u}=e,{asPath:c}=(0,eg.useRouter)(),d=(0,r.useMemo)(()=>tX(c,o),[c,o]),p=(0,r.useRef)(null),[v,m]=(0,r.useState)(Number(d.amount)||void 0),[_,b]=(0,r.useState)(Number(d.firstPayment)||void 0),[h,g]=(0,r.useState)(Number(d.payment)||void 0),f=tK(null!=v?v:0,null!=_?_:0),x=v&&v>0?(0,Q.z)(null!=f?f:0,1):0,{query:C}=(0,eg.useRouter)(),[y,T]=(0,r.useState)(Number(C.page)||1),[N,j]=(0,r.useState)(u.title),[A,k]=(0,r.useState)(u.subtitle),[S,w]=(0,r.useState)(u.description),[R,L]=(0,r.useState)(!1),[M,F]=(0,r.useState)(!1),[I,D]=(0,r.useState)(null!==(t=u.count)&&void 0!==t?t:0),[E,U]=(0,r.useState)(null!==(l=u.count)&&void 0!==l?l:0),[P,O]=(0,r.useState)(!1),[B,H]=(0,r.useState)(null!==(n=u.list)&&void 0!==n?n:[]),[Z,W]=(0,r.useState)(d.period),[V,q]=(0,r.useState)(d.vehicleType),[z,J]=(0,r.useState)(d.vehicleState),[X,K]=(0,r.useState)(d.borrower),[$,G]=(0,r.useState)(d.loan),[Y,ee]=(0,r.useState)([]),[et,el]=(0,r.useState)(d.insuranceNeed),[en,ei]=(0,r.useState)(d.stateCoFinancing),[ea,eo]=(0,r.useState)(eM.$m[0].value),[er,es]=(0,r.useState)(!1),[eu,ec]=(0,r.useState)(null!==(i=null==o?void 0:o.filter.proof_income)&&void 0!==i?i:[]),[ed,ep]=(0,r.useState)(!1),ev=(0,r.useRef)(!0),em=(0,r.useCallback)(()=>{O(e=>!e)},[]),e_=(0,r.useCallback)(async e=>{var t,l,n,i,r,u;p.current&&p.current.abort(),p.current=new AbortController;let c={amount:void 0!==v?String(v):"",firstPayment:v?f:void 0,period:Z,loan:$,incomeProof:eu,insuranceNeed:et,stateCoFinancing:en,vehicleState:z,vehicleType:V,bank:Y,order:ed?"desc":"asc",sort:ea,payment:String(h),borrower:X};e>1?(c.page=e,F(!0)):L(!0);let d=await to({tagUrl:null==o?void 0:o.url,regionUrl:null==a?void 0:a.url,townUrl:null==s?void 0:s.url,...c},p.current.signal),m=null!==(t=null==d?void 0:d.offers)&&void 0!==t?t:[],_=null!==(l=null==d?void 0:d.title)&&void 0!==l?l:"",b=null!==(n=null==d?void 0:d.subtitle)&&void 0!==n?n:"",g=null!==(i=null==d?void 0:d.description)&&void 0!==i?i:"";D(null!==(r=null==d?void 0:d.count)&&void 0!==r?r:0),U(null!==(u=null==d?void 0:d.totalCount)&&void 0!==u?u:0),j(_),k(b),w(g),H(t=>e>1?[...t,...m]:m),F(!1),L(!1)},[v,Y,X,f,eu,ed,et,$,h,Z,a,ea,en,o,s,z,V]),eb=(0,r.useCallback)(()=>{T(e=>{let t=e+1;return e_(t),t})},[e_]),eh=(0,r.useCallback)(e=>{m(e)},[]),ef=(0,r.useCallback)(e=>{b(e)},[]),ex=(0,r.useCallback)(e=>{g(e)},[]);(0,r.useEffect)(()=>{eh(""===d.amount?void 0:Number(d.amount)),ef(""===d.firstPayment?void 0:Number(d.firstPayment)),ex(""===d.payment?void 0:Number(d.payment)),q(d.vehicleType),J(d.vehicleState),W(d.period),K(d.borrower),G(d.loan),el(d.insuranceNeed),ei(d.stateCoFinancing),ec(d.incomeProof)},[d.amount,d.borrower,d.firstPayment,d.incomeProof,d.insuranceNeed,d.loan,d.payment,d.period,d.stateCoFinancing,d.vehicleState,d.vehicleType,eh,ef,ex,o]),(0,r.useEffect)(()=>{es(0===_)},[_]);let eC=(0,r.useCallback)(()=>{m(void 0),b(void 0),g(void 0),W(void 0),H([]),q([]),J([]),K([]),G([]),ee([]),el(!1),ei(!1),ec([]),ep(!1)},[]);return(0,t$.b)(()=>{ev.current?ev.current=!1:e_(y)},[e_],300),{isLoading:R,isPageLoading:M,title:N,subtitle:A,description:S,handleLoadMore:eb,autoCredits:B,count:I,totalCount:E,page:y,period:Z,setPeriod:W,amount:v,firstPayment:_,isOpenModal:P,setIsOpenModal:O,vehicleType:V,setVehicleType:q,insuranceNeed:et,stateCoFinancing:en,setInsuranceNeed:el,setStateCoFinancing:ei,handleToggleModal:em,resetFilter:eC,payment:h,incomeProof:eu,setIncomeProof:ec,vehicleState:z,setVehicleState:J,borrower:X,setBorrower:K,loan:$,setLoan:G,banks:Y,setBank:ee,sort:ea,setSort:eo,increaseSort:ed,setIncreaseSort:ep,notFirstPayment:er,setNotFirstPayment:es,firstPaymentPercent:x,handleChangeFirstPayment:ef,handleChangeAmount:eh,handleChangePayment:ex}};var tY=l(61929),t0=l(77624),t1=l(93259),t2=l(42968),t3=l(23259),t4=l(30942),t7=l(93890),t6=l(12261),t8=l(38090),t5=l(22518),t9=l(91500),le=l(97647),lt=l.n(le);let ll=e=>{var t;let l=(null==e?void 0:null===(t=e.currentTarget)||void 0===t?void 0:t.textContent)?(0,el.b)(e.currentTarget.textContent):"glavnaya";(0,et.l)({event:"data-event",eventAction:"click_link_".concat(l),eventCategory:L.u.AUTOCREDIT})},ln=e=>{var t,l,n,i,o;let{offers:u,count:d,tag:m,tags:f,townDublicates:x,posts:C,regions:y,banks:T,title:N,subtitle:j,description:A,expertQuote:k}=e,S=(0,ey.S0)(),{region:w,town:R}=(0,em.T)(),[M,F]=(0,r.useState)(k),{asPath:I}=(0,eg.useRouter)(),E=null!==(l=null===(t=I.split("/").find(e=>e.includes("teg_")))||void 0===t?void 0:t.slice(4))&&void 0!==l?l:"DEFAULT",U=function(e,t){let[l,n]=(0,r.useState)(e);return(0,tQ.rf)(()=>{(0,tr.m6)("autocredits/tag?".concat("url","=").concat(t)).then(n)},[n,t]),l}(m,E),P=function(e,t,l,n){let[i,a]=(0,r.useState)(e);return(0,tQ.rf)(()=>{tz(t,l,n).then(e=>{let{posts:t}=e;return a(t)})},[t,l,n]),i}(C,E,null==w?void 0:w.url,null==R?void 0:R.url),O=tG({region:w,town:R,tag:U,init:{count:d,list:u,subtitle:j,title:N,description:A}}),B=(0,t6.iN)(I);(0,tQ.rf)(()=>{(0,t8.r5)(B).then(F)},[B]);let H=(0,t3.I)(),Z=(0,t4.U)(),W=(0,r.useMemo)(()=>(0,t0.n)(T,O.banks),[T,O.banks]),{mainBaseUrl:V}=(0,ev.ZR)(),q=(0,r.useMemo)(()=>{var e;let{autoCredits:t}=O,l=1/0,n=0;t.forEach(e=>{let{amount:t}=e;if(t){let e=t.from?+t.from:0,i=t.to?+t.to:0;l=Math.min(l,e),n=Math.max(n,i)}});let i=null!==(e=O.description)&&void 0!==e?e:"",a='"offers":{"@type":"AggregateOffer","url":"'.concat(V).concat(I,'","priceCurrency":"').concat("RUB",'","lowPrice":"').concat((0,J.uf)(l!=1/0?l:0),'","highPrice":"').concat((0,J.uf)(n),'"}');return'{"@context":"https://schema.org","@type":"Product","name":"'.concat(O.title,'","image":"').concat(V).concat(tm.oQ,'","description":"').concat(i,'",').concat(a,"}")},[O,V,I]),z=U&&"DEFAULT"!==U.tag_name?null==U?void 0:U.name:"Автокредиты",Q=(null==R?void 0:R.name_p)||(null==w?void 0:w.name_p)?" в ".concat((null==R?void 0:R.name_p)||(null==w?void 0:w.name_p)):"",X="".concat((null==w?void 0:w.url)?"/reg_".concat(null==w?void 0:w.url):"").concat((null==R?void 0:R.url)?"/".concat(null==R?void 0:R.url):""),K=(()=>{let e=U&&"DEFAULT"!==U.tag_name?',{"@type":"ListItem","position":3,"name":"&#128181 '.concat(z).concat(Q,'","item":"').concat(V).concat(I,'"}'):"",t='{"@type":"ListItem","position":1,"name":"Финуслуги","item":"'.concat(V,'"}'),l='{"@type":"ListItem","position":2,"name":"Автокредиты'.concat(Q,'","item":"').concat(V,"/").concat(L.u.AUTOCREDIT).concat(X,'"}');return"{".concat('"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":['.concat(t),",").concat(l).concat(e,"]}")})(),$=(0,r.useMemo)(()=>{let e=[];e.push(...(0,t9.a)(L.u.AUTOCREDIT,y,U,w,R,{nominativeCase:"Автокредиты",genitiveCase:"автокредитов"}));let t=f.reduce((e,t)=>{if(void 0===t.url_redirect){let l=(0,t2.h)(L.u.AUTOCREDIT,t,w,R),n=(0,t7.q9)(l,t.name);e.push(n)}return e},[]);if(e.push({title:"Виды автокредитов",text:(0,a.jsx)(t7.oP,{children:t})}),w){var l,n;e.push(...null!==(n=null===(l=U.region_page)||void 0===l?void 0:l.town_content.map(e=>({title:(0,t1.Q)(e.title,w,R,x,void 0,U),text:(0,t1.Q)(e.content.map(tY.Rp).join(""),w,R,x,void 0,U)})))&&void 0!==n?n:[])}else e.push(...U.text.map(e=>({title:(0,t1.Q)(e.title,w,R,x,void 0,U),text:(0,t1.Q)(e.content.map(tY.Rp).join(""),w,R,x,void 0,U)})));return e},[w,f,y,U,R,x]),G=P?C.map(e=>({...e,id:e.id,name:e.title,ctg_id:e.ctg})):[];return(0,a.jsxs)("main",{className:lt().page,children:[(0,a.jsx)(b.N,{title:null!==(n=O.title)&&void 0!==n?n:"",description:null!==(i=O.description)&&void 0!==i?i:""}),(0,a.jsx)(eN.o,{}),(0,a.jsx)("div",{className:(0,D.Z)(lt().background,"bg-".concat(Z))}),(0,a.jsx)("div",{className:lt().navigationWrapper,children:(0,a.jsxs)(h.t,{children:[(0,a.jsx)(s.Oo,{className:lt().breadcrumbs,items:(()=>{let e=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(Q),href:"/".concat(L.u.AUTOCREDIT).concat(X)}];return"DEFAULT"!==E&&e.push({label:"".concat(z).concat(Q),href:"/".concat(L.u.AUTOCREDIT,"/teg_").concat(E).concat(X)}),e.pop(),e.push({label:"".concat(z).concat((null==U?void 0:U.default)?Q:"")}),e})(),onClick:ll}),(0,a.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:K}})]})}),(0,a.jsx)(h.t,{children:(0,a.jsx)(tD,{region:null!=w?w:null,town:null!=R?R:null,isMobile:S,tag:U,filter:O,subtitle:null!==(o=O.subtitle)&&void 0!==o?o:"",adFoxConfig:H})}),(0,a.jsx)(ti,{banks:T,bankOptions:W,filter:O,isMobile:S,town:R,region:w}),(0,a.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:q}}),void 0!==M&&(0,a.jsx)(t5.c,{quote:M}),(0,a.jsx)(ej.B,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,a.jsx)(p(),{...e}),dataLayerPush:et.l,questions:$,eventCategory:"cards_support_block",href:"".concat(V,"/help"),checkAllText:"Читать все вопросы про автокредиты"}),(0,a.jsx)(tq,{bankOptions:W,isMobile:S,filter:O}),G&&(0,a.jsx)(_.S,{posts:G,pageUrl:L.u.AUTOCREDIT,categories:[]}),(0,a.jsx)("div",{className:lt().supportSection,children:(0,a.jsx)(eA.O,{idSupport:g.Je,Image:e=>(0,a.jsx)(c(),{...e,width:555,height:344,src:v.Z,alt:"фоновое изображение"}),dataLayerPush:et.l,eventEmitter:()=>window.supportWidget.craftTalk.open()})})]})};function li(e){let{layout:t,root:l,banks:n,offers:i,posts:o,tags:r,tag:s,expertQuote:u}=e;return(0,a.jsx)(tp.A,{data:t,withLocationConfirm:!0,children:(0,a.jsx)(ln,{regions:l.regions,townDublicates:l.town_dublicates,banks:n,posts:o,description:i.description,offers:i.offers,count:i.count,tags:r,tag:s,totalCount:i.totalCount,title:i.title,subtitle:i.subtitle,expertQuote:null!=u?u:void 0})})}l(35388),l(27714);var la=l(28254),lo=l(80330),lr=!0,ls=(0,r.memo)(function(e){var t,l;return(0,a.jsx)(o.sM,{children:e.isShowcase?(0,a.jsx)(la.p,{region:null!==(t=e.region)&&void 0!==t?t:void 0,town:null!==(l=e.town)&&void 0!==l?l:void 0,children:(0,a.jsx)(li,{...e})}):(0,a.jsx)(lo.M,{children:(0,a.jsx)(tv,{...e})})})})},73654:function(e){e.exports={logo:"AutoCreditListItem_logo__KzLbz",placeholderLogo:"AutoCreditListItem_placeholderLogo__9xMXP"}},65594:function(e){e.exports={buttons:"FilterActions_buttons__M1NwR",filterButton:"FilterActions_filterButton__Nlxda",modalButton:"FilterActions_modalButton__ta3GX"}},27685:function(e){e.exports={buttonActions:"FilterModal_buttonActions__x7_d8",button:"FilterModal_button__wUY6f",content:"FilterModal_content__0T5By",mobilePopup:"FilterModal_mobilePopup__qAuSl"}},5257:function(e){e.exports={filter:"ListFilter_filter__VuF60",newSortRadiosFilter:"ListFilter_newSortRadiosFilter__kKfmj",sortTypeDesktop:"ListFilter_sortTypeDesktop__5LQyN",container:"ListFilter_container__nvtCN",modal:"ListFilter_modal__3ZmvQ",newSortRadioModal:"ListFilter_newSortRadioModal__vNMpD",modalButton:"ListFilter_modalButton__d5V_n",chipsContainer:"ListFilter_chipsContainer__tfgri",actionsWrapper:"ListFilter_actionsWrapper__m04h1",action:"ListFilter_action__WggMr",actionText:"ListFilter_actionText__11VOZ",iconButton:"ListFilter_iconButton__9o3Q7",actionButton:"ListFilter_actionButton__I4ohH",icon:"ListFilter_icon__RsoyT",iconInverted:"ListFilter_iconInverted__1MkEe",stuck:"ListFilter_stuck___Ya2T",mainContainer:"ListFilter_mainContainer__Lb5um",chipsContainerClosed:"ListFilter_chipsContainerClosed__TNa0t"}},30082:function(e){e.exports={wrap:"Dropdown_wrap__22_5K",newSortRadioWrap:"Dropdown_newSortRadioWrap__N83gl",content:"Dropdown_content__zkeB8"}},58177:function(e){e.exports={sortTypeContainer:"SortRadios_sortTypeContainer__8lU5M",newSortRadioSortTypeContainer:"SortRadios_newSortRadioSortTypeContainer__xY7lM",divider:"SortRadios_divider__P8JRR",sortType:"SortRadios_sortType__Ad5sp",sortTypeRadio:"SortRadios_sortTypeRadio__jVmAH",sortTypeTooltip:"SortRadios_sortTypeTooltip__JJNbc",sortTypeTrigger:"SortRadios_sortTypeTrigger__BgRzq",sortTypeHead:"SortRadios_sortTypeHead__VdaJc",newSortRadioSortTypeHead:"SortRadios_newSortRadioSortTypeHead__xKHHj",sortTypeButton:"SortRadios_sortTypeButton__UY3Mp",newSortRadioSortTypeButton:"SortRadios_newSortRadioSortTypeButton__wpRlC"}},41172:function(e){e.exports={wrapper:"OsagoAd_wrapper__MOwoz",bg:"OsagoAd_bg__m4rki",bgDesktop:"OsagoAd_bgDesktop__13CJL",bgMobile:"OsagoAd_bgMobile__4zRc9",button:"OsagoAd_button__2LK3h"}},83226:function(e){e.exports={title:"RegionTitle_title__ouhKs",link:"RegionTitle_link__r_rJV",titleWrapper:"RegionTitle_titleWrapper__yuBaG",newTitle:"RegionTitle_newTitle__SeVuV",subtitle:"RegionTitle_subtitle__T8Ha1"}},56381:function(e){e.exports={page:"AutoCreditDetail_page__jr_3y",supportSection:"AutoCreditDetail_supportSection__7506m",breadcrumbs:"AutoCreditDetail_breadcrumbs__XrqGb",about:"AutoCreditDetail_about__5FUQp"}},5753:function(e){e.exports={container:"AutoCreditApplySteps_container__wmZpQ"}},21172:function(e){e.exports={container:"AutoCreditInfo_container__GOscQ",containerFull:"AutoCreditInfo_containerFull__Vw68s",promo:"AutoCreditInfo_promo__Qx6R9",left:"AutoCreditInfo_left__vBExI",right:"AutoCreditInfo_right__xYmGT",qrDesc:"AutoCreditInfo_qrDesc__u6mDR",qrMobile:"AutoCreditInfo_qrMobile__lHKp1",typeDescription:"AutoCreditInfo_typeDescription__5QoBb"}},5569:function(e){e.exports={title:"AutoCreditsList_title__kiemn",offersListContainer:"AutoCreditsList_offersListContainer__44vNc",listTitle:"AutoCreditsList_listTitle__fP1nX",container:"AutoCreditsList_container__aH3my",listItem:"AutoCreditsList_listItem__Y0xBf"}},97647:function(e){e.exports={page:"AutoCredits_page__EqZNI",sectionWrapper:"AutoCredits_sectionWrapper__QwfNp",breadcrumbs:"AutoCredits_breadcrumbs__3OKah",adFox:"AutoCredits_adFox__W0ah4",background:"AutoCredits_background__EAWXM"}},30715:function(e){e.exports={pageHeadingWrap:"AutoCreditsFilter_pageHeadingWrap__HPOkm",banner:"AutoCreditsFilter_banner___JorH",container:"AutoCreditsFilter_container__TTHj_",filter:"AutoCreditsFilter_filter__Z6nkX",fields:"AutoCreditsFilter_fields__CUFW0",fieldIcon:"AutoCreditsFilter_fieldIcon__JjqAx",tagsWrapper:"AutoCreditsFilter_tagsWrapper__AxhCb",tag:"AutoCreditsFilter_tag__LGfem",dopsTitle:"AutoCreditsFilter_dopsTitle__SLwD5",dops:"AutoCreditsFilter_dops__31hQ1"}},7835:function(e){e.exports={wrapper:"AutoCreditsFilterDops_wrapper__8_0qa",checkbox:"AutoCreditsFilterDops_checkbox__8RLWl",item:"AutoCreditsFilterDops_item__GdL_E",detailIcon:"AutoCreditsFilterDops_detailIcon__lVAWv"}},10622:function(e){e.exports={fields:"AutoCreditsFilterModal_fields__bbPf2",checkboxWrapper:"AutoCreditsFilterModal_checkboxWrapper__LkTSZ",title:"AutoCreditsFilterModal_title__lcyEu",titleSort:"AutoCreditsFilterModal_titleSort__5yrZq",dops:"AutoCreditsFilterModal_dops__qbJ_a",wrapper:"AutoCreditsFilterModal_wrapper__WSPtT"}},10034:function(e){e.exports={title:"AutoCreditsList_title__FbtDC",listTitle:"AutoCreditsList_listTitle__UHGag",section:"AutoCreditsList_section__kDivH",titleHide:"AutoCreditsList_titleHide__AV_Pr",filter:"AutoCreditsList_filter__2OHf2",filterBottom:"AutoCreditsList_filterBottom__1_rnT",newLayout:"AutoCreditsList_newLayout__SXcV7",subtitle:"AutoCreditsList_subtitle__SiUJT",listItem:"AutoCreditsList_listItem__8sUMu",adv:"AutoCreditsList_adv__2T4FG",listContainer:"AutoCreditsList_listContainer__2BZk8","finkit-container--narrow":"AutoCreditsList_finkit-container--narrow__ziFs_"}},4645:function(e){e.exports={tagsWrapper:"AutoCreditsTags_tagsWrapper___62bH",tag:"AutoCreditsTags_tag__KsRe2"}},50586:function(e){e.exports={title:"styles_title__cObN3",list_wrap:"styles_list_wrap__z3_y1",content:"styles_content__tWscR",sort_content:"styles_sort_content__tPWO7",right_block:"styles_right_block__XypvM",viewed_offers_toggle:"styles_viewed_offers_toggle__C0ym7",subtitle:"styles_subtitle__RcERK",sort_label:"styles_sort_label__faPeq",dropdown_wrapper:"styles_dropdown_wrapper__Aj2XD"}}},function(e){e.O(0,[5249,2935,6832,2730,3888,9705,1261,5041,3996,4457,883,8830,2445,2047,6047,3091,2888,9774,179],function(){return e(e.s=9677)}),_N_E=e.O()}]);