(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4471],{3891:e=>{e.exports={page:"AutoCredits_page__EqZNI",sectionWrapper:"AutoCredits_sectionWrapper__QwfNp",breadcrumbs:"AutoCredits_breadcrumbs__3OKah",adFox:"AutoCredits_adFox__W0ah4",background:"AutoCredits_background__EAWXM"}},4488: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"}},6606:e=>{e.exports={title:"AutoCreditsList_title__kiemn",offersListContainer:"AutoCreditsList_offersListContainer__44vNc",listTitle:"AutoCreditsList_listTitle__fP1nX",container:"AutoCreditsList_container__aH3my",listItem:"AutoCreditsList_listItem__Y0xBf"}},9507:(e,t,l)=>{"use strict";l.d(t,{F:()=>p});var a=l(37876),n=l(5138),i=l(49995),o=l(14232),r=l(91063),s=l(67347),u=l(92666),c=l(87622),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.z)(),{handleToggleModal:_}=(0,n.u)();return(0,a.jsxs)("div",{className:(0,i.A)(d().titleWrapper,d().newTitle),children:[(0,a.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,a.jsxs)(a.Fragment,{children:["в"," ",(0,a.jsx)("button",{onClick:()=>{_(!0),(0,r.o)({event:"data-event",eventAction:"show_pop_up_city_modal",eventCategory:p})},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,a.jsx)(s.j,{tag:"p",className:d().subtitle,children:o})]})});p.displayName="RegionTitle"},15379:e=>{e.exports={page:"AutoCreditDetail_page__jr_3y",supportSection:"AutoCreditDetail_supportSection__7506m",breadcrumbs:"AutoCreditDetail_breadcrumbs__XrqGb",about:"AutoCreditDetail_about__5FUQp"}},26850:e=>{e.exports={wrapper:"OsagoAd_wrapper__MOwoz",bg:"OsagoAd_bg__m4rki",bgDesktop:"OsagoAd_bgDesktop__13CJL",bgMobile:"OsagoAd_bgMobile__4zRc9",button:"OsagoAd_button__2LK3h"}},27964:(e,t,l)=>{"use strict";function a(e){let{name:t,description:l,image:a,aggregateRating:n,offers:i}=e;return{"@context":"https://schema.org","@type":"Product",name:t,description:l,image:a,aggregateRating:n,offers:i}}l.d(t,{Z:()=>a})},35990:e=>{e.exports={buttons:"FilterActions_buttons__M1NwR"}},39936: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_"}},41329:(e,t,l)=>{"use strict";function a(e){let{url:t,priceCurrency:l,offers:a,getLowPrice:n,getHighPrice:i,offerCount:o}=e,{lowPrice:r,highPrice:s}=function(e,t,l){let a=e.reduce((e,a)=>{e.lowPrice=Math.min(e.lowPrice,t(a));let n=l(a);return void 0!==n&&(e.highPrice=Math.max(e.highPrice,n)),e},{lowPrice:1/0,highPrice:-1/0});return{...Number.isFinite(a.lowPrice)&&{lowPrice:a.lowPrice},...Number.isFinite(a.highPrice)&&{highPrice:a.highPrice}}}(a,n,i);return{"@type":"AggregateOffer",url:t,priceCurrency:l,lowPrice:r,highPrice:s,offerCount:o}}l.d(t,{l:()=>a})},43736: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"}},47278:e=>{e.exports={container:"AutoCreditApplySteps_container__wmZpQ"}},51314:e=>{e.exports={logo:"AutoCreditListItem_logo__KzLbz",placeholderLogo:"AutoCreditListItem_placeholderLogo__9xMXP"}},54926:(e,t,l)=>{"use strict";function a(e){let{ratingValue:t,reviewCount:l,bestRating:a,worstRating:n}=e;return{"@type":"AggregateRating",ratingValue:t,reviewCount:l,bestRating:a,worstRating:n}}l.d(t,{E:()=>a})},55376:e=>{e.exports={pageHeadingWrap:"AutoCreditsFilter_pageHeadingWrap__HPOkm",banner:"AutoCreditsFilter_banner___JorH",container:"AutoCreditsFilter_container__TTHj_",filter:"AutoCreditsFilter_filter__Z6nkX",fields:"AutoCreditsFilter_fields__CUFW0",field:"AutoCreditsFilter_field__YsbeF",fieldIcon:"AutoCreditsFilter_fieldIcon__JjqAx",tagsWrapper:"AutoCreditsFilter_tagsWrapper__AxhCb",tag:"AutoCreditsFilter_tag__LGfem",dopsTitle:"AutoCreditsFilter_dopsTitle__SLwD5",dops:"AutoCreditsFilter_dops__31hQ1"}},55398: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"}},56420:(e,t,l)=>{"use strict";l.d(t,{v:()=>a});let a=e=>{let t=Number(e.split(" ")[0]);return e&&!Number.isNaN(t)?t:0}},63396: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"}},64345: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"}},66295:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});let a={src:"/kredity/assets/_next/static/media/banner-2.9368ea40.svg",height:218,width:318,blurWidth:0,blurHeight:0}},67221:(e,t,l)=>{"use strict";l.d(t,{e:()=>i,s:()=>n});var a=l(14232);let n=(e,t,l)=>{(0,a.useEffect)(()=>{let t=setTimeout(()=>{e()},l);return()=>{clearTimeout(t)}},t)},i=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,[n,i]=(0,a.useState)(l),[o,r]=(0,a.useState)(!1),[s,u]=(0,a.useState)(null);return(0,a.useEffect)(()=>{r(!0),e().then(i).catch(u).then(()=>{r(!1)})},t),[n,o,s]}},67792:e=>{e.exports={wrapper:"AutoCreditsFilterDops_wrapper__8_0qa",checkbox:"AutoCreditsFilterDops_checkbox__8RLWl",item:"AutoCreditsFilterDops_item__GdL_E",detailIcon:"AutoCreditsFilterDops_detailIcon__lVAWv"}},80010:(e,t,l)=>{"use strict";l.d(t,{r:()=>a});let a=(e,t)=>(t>0&&!Number.isInteger(e)&&!Number.isNaN(e)&&String(e).split(".")[1].length>t&&(e=+e.toFixed(t)),e)},80976:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/avtokredity/[[...segments]]",function(){return l(94925)}])},82596:(e,t,l)=>{"use strict";l.d(t,{H:()=>a});let a=(e,t)=>{var l;let a=null!=(l=null==t?void 0:t.map(e=>+e))?l:[];return[...e].sort((e,t)=>{let l=a.includes(Number(e.id)),n=a.includes(Number(t.id));return!l&&n?1:l&&!n?-1:0}).map(e=>({value:e.id,label:e.name}))}},82734:e=>{e.exports={wrap:"Dropdown_wrap__22_5K",newSortRadioWrap:"Dropdown_newSortRadioWrap__N83gl",content:"Dropdown_content__zkeB8"}},87622:e=>{e.exports={title:"RegionTitle_title__ouhKs",link:"RegionTitle_link__r_rJV",titleWrapper:"RegionTitle_titleWrapper__yuBaG",newTitle:"RegionTitle_newTitle__SeVuV",subtitle:"RegionTitle_subtitle__T8Ha1"}},88508:(e,t,l)=>{"use strict";l.d(t,{x:()=>A});var a,n,i=l(37876),o=l(20988),r=l(49995),s=l(14232),u=l(19497);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e}).apply(null,arguments)}let d=function(e){return s.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),a||(a=s.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"})))};var p=l(82734),v=l.n(p);let m=e=>{let{content:t,children:l,disabled:a,isNewSortRadios:n}=e,[o,u]=(0,s.useState)(!1),c=(0,s.useCallback)(()=>u(!0),[u]),d=(0,s.useCallback)(()=>u(!1),[u]);return(0,i.jsxs)("div",{className:(0,r.A)(v().wrap,n&&v().newSortRadioWrap),onClick:c,ref:(e=>{let t=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let l=l=>{var a;let{target:n}=l;n instanceof HTMLElement&&!(null==(a=t.current)?void 0:a.contains(n))&&e()};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[e]),t})(d),children:[l,o&&!a&&(0,i.jsx)("div",{className:v().content,children:t})]})};function _(){return(_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var a in l)({}).hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e}).apply(null,arguments)}let h=function(e){return s.createElement("svg",_({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),n||(n=s.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"})))};var b=l(43736),g=l.n(b);let f=e=>{let{isNewSortRadios:t,isMobile:l,onChangeSort:a,isIncreaseSort:n}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("p",{className:(0,r.A)(g().sortTypeHead,t&&g().newSortRadioSortTypeHead),children:[(0,i.jsx)("button",{style:{marginLeft:"0px",marginRight:l?"0px":"8px"},className:(0,r.A)(g().sortTypeButton,t&&g().newSortRadioSortTypeButton),onClick:a,children:(0,i.jsx)(d,{className:(0,r.A)(!n&&g().iconInverted)})}),"Сортировать"]}),t&&(0,i.jsx)("div",{className:g().divider})]})},C=(0,s.memo)(e=>{let{isMobile:t,onChangeSort:l,isIncreaseSort:a,onChangeSortType:n,sortTypeItems:s,sortTypeValue:u,isNewSortRadios:c}=e;return(0,i.jsxs)(i.Fragment,{children:[!c&&t&&(0,i.jsx)(f,{onChangeSort:l,isMobile:t,isIncreaseSort:a,isNewSortRadios:c}),(0,i.jsxs)("div",{className:(0,r.A)(g().sortTypeContainer,c&&g().newSortRadioSortTypeContainer),onClick:e=>e.stopPropagation(),children:[c&&(0,i.jsx)(f,{onChangeSort:l,isMobile:t,isIncreaseSort:a,isNewSortRadios:c}),s.map(e=>(0,i.jsxs)("div",{"data-qa":"".concat(e.value,"_radio"),className:g().sortType,children:[c?(0,i.jsx)(o.sx,{name:e.value,value:u,checked:e.value===u,label:e.label,onChange:()=>n(e.value)}):(0,i.jsx)(o.sx,{name:e.value,label:e.label,checked:e.value===u,className:g().sortTypeRadio,value:e.value,onChange:()=>n(e.value)}),e.description&&(0,i.jsx)(o.m_,{text:e.description,className:(0,r.A)(g().sortTypeButton,c&&g().newSortRadioSortTypeButton),children:(0,i.jsx)(h,{})})]},e.value))]})]})});C.displayName="SortRadios";var x=l(16891),y=l(63396),j=l.n(y);let A=(0,s.memo)(e=>{let{chips:t,onClickParams:l,isIncreaseSort:a,onChangeIncreaseSort:n,sortTypeItems:c,sortTypeValue:p,onChangeSortType:v,isMobile:_,isFixed:h,portalId:b,onClickChip:g,className:f,onClickSortType:y,isNewSortRadios:A}=e,N=(0,s.useCallback)(()=>null==n?void 0:n(!a),[a,n]),T=(0,i.jsx)("div",{style:{padding:"8px",borderRadius:A?"20px":"8px",background:"white"},className:(0,r.A)(!_&&A&&j().sortTypeDesktop),children:(0,i.jsx)(C,{isMobile:_,isIncreaseSort:a,onChangeSort:N,onChangeSortType:v,sortTypeItems:c,sortTypeValue:p,isNewSortRadios:A,portalId:b})}),k=c.find(e=>e.value===p);return(0,i.jsx)("div",{className:(0,r.A)(j().filter,A&&j().newSortRadiosFilter,h&&j().stuck,f),children:(0,i.jsx)(x.J,{className:j().mainContainer,children:(0,i.jsxs)("div",{className:j().container,children:[(0,i.jsx)(o.C4,{className:j().chipsContainer,chips:t,value:t.map(e=>e.id),multiple:!0,activeVariant:"secondary",onChipClick:g}),(0,i.jsxs)("div",{className:j().actionsWrapper,children:[(0,i.jsxs)("button",{className:(0,r.A)(j().action,j().actionButton),onClick:l,children:[(0,i.jsx)(u.A,{className:j().icon}),(0,i.jsx)("span",{className:j().actionText,children:"Все параметры"})]}),(0,i.jsxs)("div",{className:j().action,children:[(0,i.jsx)("button",{className:(0,r.A)(j().icon,j().iconButton,!a&&j().iconInverted),onClick:N,children:(0,i.jsx)(d,{})}),(0,i.jsx)(m,{content:T,disabled:_,isNewSortRadios:A,children:(0,i.jsx)("button",{onClick:y,className:(0,r.A)(j().actionText,j().actionButton),"data-qa":"".concat(p,"_order"),children:(null==k?void 0:k.shortLabel)||(null==k?void 0:k.label)||"Сортировка"})})]})]})]})})})});A.displayName="ListFilter"},88880:e=>{e.exports={tagsWrapper:"AutoCreditsTags_tagsWrapper___62bH",tag:"AutoCreditsTags_tag__KsRe2"}},94925:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSP:()=>t5,default:()=>t6});var a=l(37876),n=l(5138),i=l(14232),o=l(20988),r=l(48230),s=l.n(r),u=l(97563),c=l(10027),d=l(16891),p=l(83188),v=l(87162),m=l(34199),_=l(5153);let h=[{id:1,label:"Условия",name:_.Cu.conditions},{id:2,label:"Требования к заемщику",name:_.Cu.requirements},{id:3,label:"Требование к ТС",name:_.Cu.requirementsVehicles},{id:4,label:"Погашение",name:_.Cu.redemption}];var b=l(62728);let g=(0,i.memo)(e=>{var t,l;let{data:n,bank:o,pageUrl:r}=e,{tabsContent:s,tabsList:u}=(e=>{let{data:t}=e,l=(0,i.useMemo)(()=>(0,m.S$)(t),[t]),a=(0,i.useMemo)(()=>h.filter(e=>l[e.name].some(e=>(0,b.a)(e.value))),[l]);return{tabsContent:l,tabsList:a}})({data:n});return(0,a.jsx)(p.H,{scrollBlockId:v.uB,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:"Об автокредите",offerUpdateData:null==n?void 0:n.m_updated_at,bank:{logoMobile:null==o?void 0:o.logo_mob,description:null==o?void 0:o.short_description,url:"/banki/".concat(null==o?void 0:o.url),name:null==o?void 0:o.name,creditRating:null==o?void 0:o.credit_rating,netAssetsPlace:null==o||null==(t=o.ratings)?void 0:t.net_assets_place,netProfitRating:null==o?void 0:o.net_profit_rating},tabsList:u,tabsContent:s,aboutCompanyLabel:"О банке",site:null!=(l=null==o?void 0:o.site.title)?l:void 0})});g.displayName="AutoCreditAbout";var f=l(26700),C=l(66295),x=l(99689),y=l(14873),j=function(e){return e.LEAD="lead",e.MASS="mass",e}({}),A=l(37105),N=l(47278),T=l.n(N);let k=e=>{let{url:t,offerType:l,isMobile:n,className:o}=e,r=(0,i.useMemo)(()=>[{id:3,image:x.A,text:"Перейдите на сайт банка,<br /> чтобы оформить заявку",types:[j.LEAD],buttonText:"Оформить на сайте банка",link:t},{id:4,image:f.A,text:j.LEAD?"Этот кредит нельзя открыть через Финуслуги":"Этот автокредит сейчас нельзя открыть онлайн на Финуслугах",types:[j.LEAD,j.MASS],buttonText:"Выбрать другой автокредит",link:"/avtokredity"},{id:5,image:C.A,text:"Чтобы оформить автокредит, обратитесь в банк",types:[j.MASS]}].filter(e=>e.types.find(e=>e===l)),[t,l]);return(0,a.jsx)("div",{className:T().container,children:(0,a.jsx)(y.N,{className:o,title:"Где оформить автокредит",pageUrl:A.h.AUTOCREDIT,id:v.ov,isMobile:n,slides:r})})};var S=l(49995),w=l(30557),L=l(14082),R=l(5219),F=l(56420),I=l(53244),M=l(52841),E=l(63292),D=l(81202),U=l(35415),P=l(21754),O=l(31257),V=l(80010),B=l(89064),H=l(79807),W=l(53172),q=l(4488),J=l.n(q);let K="Оформить на сайте банка",Z="Где оформить автокредит",z=e=>{var t;let{offerType:l,bank:n,data:r,isMobile:s,calculator:u}=e,[c,p]=(0,i.useState)(!1),m=(0,i.useRef)(null),_=(0,i.useMemo)(()=>{let{domestic_new:e,domestic_old:t,foreign_new:l,foreign_old:a}=r.vehicle_state;return!e&&!t&&l&&a?"Иномарка любая":e||t||!l||a?e||t||l||!a?e&&t&&!l&&!a?"Отечественная любая":e||!t||l||a?!e||t||l||a?e&&!t&&l&&!a?"Любое новое":!e&&t&&!l&&a?"Любое б/у":"Любое":"Отечественная новая":"Отечественная б/у":"Иномарка б/у":"Иномарка новая"},[r.vehicle_state]),h=(0,i.useCallback)(()=>{m.current&&m.current.focus()},[]),b=(0,i.useCallback)(e=>{e&&((0,O._)({eventCategory:A.h.AUTOCREDIT,eventAction:O.y.filterCatalog,eventLabel:"Платеж",eventValue:e.label}),u.setPaymentTypeValue(e.value))},[u]),g=(0,i.useMemo)(()=>({value:u.period,max:u.periodMax,min:u.periodMin===u.periodMax?u.periodMin-1:u.periodMin,onChange:e=>{e=null!=e?e:u.periodMin,u.periodMin!==u.periodMax&&u.setPeriod(e)},step:1,ticks:[{label:(0,U.Hb)(u.periodMin),value:u.periodMin},{label:(0,U.Hb)(u.periodMax),value:u.periodMax}],unit:[B.U9.ONE,B.U9.FEW,B.U9.MANY]}),[u]),f=(0,i.useMemo)(()=>u.paymentTypeOptions.filter(e=>e.value===u.paymentTypeValue),[u.paymentTypeOptions,u.paymentTypeValue]),C=(0,i.useMemo)(()=>[{id:1,label:(0,U.l5)(u.period)},{id:2,label:"".concat(u.amount)}],[u.amount,u.period]),x=(0,i.useMemo)(()=>{var e;let t=(null==(e=r.application_term.custom_text)?void 0:e.from)!==void 0?(0,F.v)(r.application_term.custom_text.from):0,l=new Date;l.setDate(l.getDate()+t);let a=l.getDate(),n=l.getMonth()+1,i=l.getFullYear();return"Деньги у вас до ".concat(a," ").concat((0,P.F)("".concat(n,"-").concat(a,"-").concat(i)))},[null==(t=r.application_term.custom_text)?void 0:t.from]),y=u.amount,N=(0,i.useMemo)(()=>{let e=u.firstPayment,t=u.period,l=r.vehicle_type.text,n=u.paymentTypeValue,i=[],o=Number(e)/(Number(y)/100);Number.isInteger(o)||(o=Number(o.toFixed(5)));let s=y?(0,V.r)(o,1):0;i.push({label:"Первый взнос",value:"".concat(s,"%").replace(".",",")}),i.push({label:"Срок погашения",value:(0,U.l5)(t)});let c=r.full_price;if(c){let e=r.interest_rate;i.push({label:"ПСК",value:(0,w.o)(c),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n    Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,H.sP)(Number(e.from),Number(e.to))})}return i.push({label:"Тип&#160;ТС",value:l},{label:"Состояние&#160;ТС",value:_,description:"Некоторые банки указывают, что получить кредит можно только на новый автомобиль, а для других это не принципиально."}),n&&i.push({label:"Тип платежа",value:n===D.w.annuity?"Аннуитетный":"Дифференцированный",description:(0,a.jsx)("div",{className:J().tooltipContent,children:(0,a.jsx)(I.q,{type:n})})}),i},[u.firstPayment,u.period,u.paymentTypeValue,r.vehicle_type.text,r.full_price,r.interest_rate,_,y]);return(0,a.jsxs)(d.J,{className:(0,S.A)(J().container,J().containerFull),children:[(e=>{var t,l;return(0,a.jsx)(M.E,{url:r.url,bank:{logoMob:null==n?void 0:n.logo_mob,url:"/banki/".concat(null==n?void 0:n.url),name:null!=(t=null==n?void 0:n.name)?t:r.bank_name},pageUrl:A.h.AUTOCREDIT,title:"Автокредит \xab".concat(r.title,"\xbb от ").concat(null!=(l=null==n?void 0:n.name)?l:r.bank_name),isSmall:e,isMobile:s,tagTheme:"red",className:J().promo})})(),(0,a.jsxs)("div",{className:J().left,children:[(0,a.jsx)(L.t,{isMobile:s,title:"Настройка автокредита",pageUrl:A.h.AUTOCREDIT,infoLink:{isShow:!s,text:"Подробнее об автокредите",idScrollBlock:v.uB,offPadding:!0,widthMaxContent:!0},items:[{elements:[{type:"moneyInput",props:{label:"Сумма",value:u.amount,onChange:u.setAmount,onFocus:()=>p(!0)}}]},{elements:[{type:"moneyInput",props:{label:"Первый взнос",value:u.firstPayment,onChange:u.setFirstPayment,onFocus:()=>p(!0)}}]},{elements:[{type:"inputRange",props:{label:"Срок погашения",...g}}]},{elements:[{type:"select",isHidden:!u.paymentTypeValue||u.paymentTypeOptions.length<=1,desription:u.paymentTypeValue&&(0,a.jsx)(I.q,{className:J().typeDescription,type:u.paymentTypeValue}),props:{label:"Платеж",options:u.paymentTypeOptions,onChange:b,value:f}}]}],chips:C,isShowChips:s&&!!(null==C?void 0:C.length)&&!c,isExpandSettings:c,onToggleSettings:()=>p(e=>!e)}),(0,a.jsx)(E.P,{isSmall:!0,className:J().qrDesc})]}),(0,a.jsxs)("div",{className:J().right,children:[(0,a.jsx)(R.r,{captionTitle:x,pageUrl:A.h.AUTOCREDIT,onEdit:h,amount:Number(u.amount),disclaimer:"Предварительные условия. Не оферта",tag:r.online_application.commercial_desc,footerActions:(0,a.jsxs)(a.Fragment,{children:[l===j.LEAD&&(0,a.jsx)(o.$n,{as:"a",onClick:()=>{(0,O._)({eventCategory:A.h.AUTOCREDIT,eventAction:O.y.link,eventActionText:K,eventLabel:r.id})},href:r.online_application.url,target:"_blank",className:J().button,children:K}),(0,a.jsx)(o.$n,{onClick:()=>{(0,O._)({eventCategory:A.h.AUTOCREDIT,eventAction:O.y.button,eventActionText:Z}),(0,W.e)(v.ov,{offset:s?0:-100,position:"top"})},className:J().button,variant:"secondary",children:Z})]}),valuesList:N}),(0,a.jsx)(E.P,{isSmall:!0,className:J().qrMobile})]})]})};var Q=l(54587),X=l.n(Q),Y=l(91063),G=l(87087),$=l(44694),ee=l(51314),et=l.n(ee);let el=(0,i.memo)(e=>{var t,l;let{data:n,detailData:o,className:r,onDetailInfoClick:s,onClick:u}=e,c=[],d=(0,i.useRef)(null),p=(0,i.useRef)(!1),v=(0,i.useRef)(null),m={text:"",caption:""},[_,h]=(null==o||null==(t=o.data)?void 0:t.online_application.commercial)===1?["Оформить",o.data.online_application.url]:["Подробнее",n.url],b=null==o||null==(l=o.data)?void 0:l.full_price;b&&(m.caption="ПСК",m.text=(0,w.o)(b),m.tooltipText="ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n        Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре.");let g={text:(0,H.ej)({from:n.amountFrom,to:n.amountTo},{currency:n.currency}),caption:"Сумма"},f={text:"от ".concat((0,H.ZV)(n.payment),"%"),caption:"Первый взнос"};c.push({label:"Заявка через сайт банка",variant:"primary"}),n.isKascko&&c.push({label:"Потребуется каско",variant:"primary"}),n.isPermanentRegistation&&c.push({label:"Постоянная регистрация",variant:"primary"});let C=(0,i.useCallback)(e=>{let[t]=e;1===t.intersectionRatio&&!p.current&&((0,Y.o)({event:"data-event",eventAction:"show_in_catalog",eventCategory:A.h.AUTOCREDIT,eventLabel:n.id}),p.current=!0,d.current&&v.current&&d.current.unobserve(v.current))},[n.id]);return(0,i.useEffect)(()=>{d.current&&v.current&&d.current.unobserve(v.current),!p.current&&v.current&&(d.current=new IntersectionObserver(C,{root:null,threshold:[1]}),d.current.observe(v.current))},[C]),(0,a.jsx)("div",{ref:v,className:r,onClick:()=>{var e;return e="click_button_".concat((0,G.y)("Подать заявку")),void((0,Y.o)({event:"data-event",eventAction:e,eventCategory:A.h.AUTOCREDIT,eventLabel:n.id,eventValue:n.eventValue}),null==u||u(n))},children:(0,a.jsx)($.M,{icon:n.logo?(0,a.jsx)("div",{className:et().logo,children:(0,a.jsx)(X(),{width:56,height:56,src:n.logo,alt:"logo"})}):(0,a.jsx)("div",{className:et().placeholderLogo}),companyName:n.bankName,productName:n.title,productUrl:n.url,buttonText:_,buttonUrl:h,tags:c,advantageAmountFrom:m,advantageAmountTo:f,advantageBonus:g,onDetailInfoClick:()=>{s(n),(0,O._)({eventCategory:A.h.AUTOCREDIT,eventAction:O.y.button,eventActionText:"open_modal"})},className:et().plate})})});el.displayName="AutoCreditListItem";var ea=l(40419),en=l(13394),ei=l(62576),eo=l(96759);let er=e=>(null==e?void 0:e.online_application.commercial)===1?j.LEAD:j.MASS,es=e=>{var t,l,a,n,i,o;let{banks:r,autoCredit:s,period:u}=e,c="/".concat(A.h.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)?l:s.bank_name,bankId:null!=(a=null==v?void 0:v.id)?a:"",isCard:!1,logo:null!=(n=null==v?void 0:v.logo_mob)?n:"",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||null==(t=v.legal_entities)?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(A.h.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:er(s),site:{title:null!=(i=null==v?void 0:v.site.title)?i:null,url:null!=(o=null==v?void 0:v.site.url)?o:null}}};var eu=l(33126),ec=l(92666),ed=l(6606),ep=l.n(ed);let ev=(0,i.memo)(e=>{let{bank:t,banks:l,currentCardId:n,autocredits:o,autocreditsFinuslugi:r,className:s}=e,{town:u}=(0,ec.z)(),[c,p]=(0,i.useState)(),v=(0,i.useCallback)(()=>{p(void 0)},[]),m=(0,i.useCallback)(e=>{(0,O._)({eventCategory:A.h.AUTOCREDIT,eventAction:O.y.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},[]),_=(0,i.useMemo)(()=>{let e=o?o.filter(e=>e.id!==n):[];return(0,eo.q)({productList:e,anotherList:e,count:ei.gx})},[o,n]),h=(0,i.useMemo)(()=>{let e=r||[];return(0,eo.q)({productList:e,anotherList:e,count:ei.a0-_.length})},[_.length,r]),b=(0,i.useMemo)(()=>({bankList:_.map(e=>es({banks:[t],autoCredit:e})),finuslugiList:h.map(e=>es({banks:l,autoCredit:e}))}),[t,l,_,h]),g=(0,i.useCallback)(e=>{if(!e)return;let t=[_,h].reduce((e,t)=>[...e,...t],[]).find(t=>t.id===e.id);if(t){var l,a;return{...t,site:{...e.site},bankName:e.bankName,detailUrl:null!=(l=e.detailUrl)?l:"",logo:e.logo,url:null!=(a=e.url)?a:""}}},[_,h]),f=(0,i.useCallback)(e=>{p(g(e)),e&&(0,O._)({eventCategory:A.h.AUTOCREDIT,eventAction:O.y.popup,eventActionText:e.title,eventLabel:e.id})},[g]),C="".concat((0,eu.UK)().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,S.A)(ep().container,s),children:[(0,a.jsx)("h3",{className:ep().title,children:"Другие автокредиты"}),(0,a.jsxs)(d.J,{children:[!!b.bankList.length&&(0,a.jsxs)("section",{className:ep().offersListContainer,children:[(0,a.jsxs)("p",{className:ep().listTitle,children:["Автокредиты от ",t.name]}),b.bankList.map(e=>(0,a.jsx)(el,{onDetailInfoClick:f,className:ep().listItem,data:e,onClick:m,text:"Подать заявку",detailData:{data:g(e),mainPageUrl:A.h.AUTOCREDIT}},e.url)),(0,a.jsx)(ea.e,{offPadding:!0,text:"Bсе предложения от банка",href:C,target:"_blank",iconColor:"light",mainPageUrl:A.h.AUTOCREDIT})]}),!!b.finuslugiList.length&&(0,a.jsxs)("section",{className:ep().offersListContainer,children:[(0,a.jsx)("p",{className:ep().listTitle,children:"Автокредиты на Финуслугах"}),b.finuslugiList.map(e=>(0,a.jsx)(el,{onDetailInfoClick:f,className:ep().listItem,data:e,onClick:m,text:"Подать заявку",detailData:{data:g(e),mainPageUrl:A.h.AUTOCREDIT}},e.url)),(0,a.jsx)(ea.e,{offPadding:!0,text:"Bсе предложения на Финуслугах",href:"/avtokredity",target:"_blank",iconColor:"light",mainPageUrl:A.h.AUTOCREDIT})]})]})]}),(0,a.jsx)(en.u,{data:c,isOpen:!!c,onClose:v,mainPageUrl:A.h.AUTOCREDIT})]})});ev.displayName="AutoCreditsList";var em=l(89099),e_=l(75464);let eh=e=>Array.isArray(e)?e[0]:e;var eb=l(5552),eg=l(9837),ef=l(66460),eC=l(6980),ex=l(80490),ey=l(99275),ej=l(15379),eA=l.n(ej);function eN(e){var t;let{offer:l,posts:n,questions:r,description:p,banks:v,refererTag:m,offers:_,offersFinuslugi:h,support:b}=e,f=er(l),C=(0,eb.sw)(),x=(e=>{var t,l,a,n,o,r;let{asPath:s}=(0,em.useRouter)(),[u,c]=(0,i.useState)(Number(null!=(l=e.amount.from)?l:0)),[d,p]=(0,i.useState)(0),[v,m]=(0,i.useState)(Number(null!=(a=e.period.to)?a:1)),_=Number(null!=(n=e.period.from)?n:1),h=Number(null!=(o=e.period.to)?o:1),b=(0,i.useMemo)(()=>{let t=[];return 0!==e.repayment_procedure.annuity&&t.push({label:"Аннуитетный",value:D.w.annuity}),void 0!==e.repayment_procedure.differentiated&&0!==e.repayment_procedure.differentiated&&t.push({label:"Дифференцированный",value:D.w.differentiated}),t},[e.repayment_procedure]),[g,f]=(0,i.useState)(null!=(r=null==(t=b[0])?void 0:t.value)?r:null),C=(0,i.useCallback)(e=>{c(null!=e?e:0)},[]),x=(0,i.useCallback)(e=>{p(null!=e?e:0)},[]),y=(0,i.useMemo)(()=>({value:u,onChange:C}),[u,C]),j=(0,i.useMemo)(()=>({value:d,onChange:x}),[d,x]);return(0,i.useEffect)(()=>{let e=(0,e_.$)(s,"#"),t=eh(e.amount),l=eh(e.first_payment),a=eh(e.period);void 0!==t&&c(+t),void 0!==l&&p(+l);let n=Number(a);!Number.isNaN(n)&&n>=_&&n<=h&&m(n)},[]),(0,i.useMemo)(()=>({amount:u,setAmount:c,amountInputProperties:y,firstPayment:d,setFirstPayment:p,firstPaymentInputProperties:j,period:v,setPeriod:m,periodMin:_,periodMax:h,paymentTypeOptions:b,paymentTypeValue:g,setPaymentTypeValue:f}),[u,y,d,j,v,_,h,b,g])})(l),{region:y,town:j}=(0,ec.z)(),N=v.find(e=>Number(e.id)===l.bank_id),T=(null==r?void 0:r.map(e=>({title:e.title,text:e.text.map(e=>e.data.html).join(""),plainText:e.text.map(e=>(0,u.NC)(e.data.html)).join("").trim()})))||[],S="Автокредит \xab".concat(l.title,"\xbb от ").concat(null!=(t=null==N?void 0:N.name_r)?t:"");return(0,a.jsxs)("main",{className:eA().page,children:[(0,a.jsx)(c.I,{productId:String(l.id),title:S,description:null!=p?p:""}),(0,a.jsx)(ef.t,{}),(0,a.jsx)(eg.c,{questions:T}),(0,a.jsx)("div",{className:eA().navigationWrapper,children:(0,a.jsx)(d.J,{children:(0,a.jsx)(o.BI,{className:eA().breadcrumbs,items:(()=>{var e;let t=(null==j?void 0:j.name_p)||(null==y?void 0:y.name_p)?" в ".concat((null==j?void 0:j.name_p)||(null==y?void 0:y.name_p)):"",a="".concat((null==y?void 0:y.url)?"/reg_".concat(null==y?void 0:y.url):"").concat((null==j?void 0:j.url)?"/".concat(null==j?void 0:j.url):""),n=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(t),href:"/".concat(A.h.AUTOCREDIT).concat(a)}];return m&&n.push({label:"".concat(m.name).concat(t),href:"/".concat(A.h.AUTOCREDIT,"/teg_").concat(m.url).concat(a)}),n.push({label:"".concat(null!=(e=null==N?void 0:N.name)?e:l.bank_name," Автокредит ").concat(l.title)}),n})()})})}),(0,a.jsx)(z,{calculator:x,bank:N,offerType:f,data:l,isMobile:C}),(0,a.jsx)(d.J,{className:eA().about,children:(0,a.jsx)(g,{data:l,bank:N,pageUrl:A.h.AUTOCREDIT})}),(0,a.jsx)(k,{isMobile:C,offerType:f,url:l.online_application.url}),void 0!==N&&(0,a.jsx)(ev,{bank:N,banks:v,currentCardId:l.id,autocredits:_,autocreditsFinuslugi:h}),n.length>0&&(0,a.jsx)(eC.C,{posts:n,eventCategory:A.h.AUTOCREDIT}),(0,a.jsxs)("div",{className:eA().supportSection,children:[(0,a.jsx)(ex.E,{value:b}),(0,a.jsx)(ey.m,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,a.jsx)(s(),{...e}),dataLayerPush:Y.o,questions:T,eventCategory:"cards_support_block",href:"".concat((0,eu.UK)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про автокредиты"})]})]})}var eT=l(37397);l(62862);var ek=l(28131),eS=l(3067);let ew={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"},eL=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}];A.h.AUTOCREDIT;let eR=[{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 лет"}],eF=[{value:"moto",label:"Мототранспорт"},{value:"car",label:"Легковое транспорт"},{value:"track",label:"Грузовое транспорт"},{value:"commercial",label:"Коммерческое транспорт"},{value:"water",label:"Водное транспорт"},{value:"custom",label:"Другое"}],eI=[{value:"moto",labelShort:"Мототранспорт"},{value:"car",labelShort:"Легковое ТС"},{value:"track",labelShort:"Грузовое ТС"},{value:"commercial",labelShort:"Коммерческое ТС"},{value:"water",labelShort:"Водное ТС"},{value:"custom",labelShort:"Другое"}],eM=[{value:"foreign_new",label:"Иномарка с завода"},{value:"foreign_old",label:"Иномарка с пробегом"},{value:"domestic_new",label:"Отечественная с завода"},{value:"domestic_old",label:"Отечественная с пробегом"}],eE=[{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:"Иное"}],eD=[{value:"not_required",label:"Не требуется"},{value:"pledge",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"full",label:"Залог и поручительство"}],eU=[{label:"По ставке",value:"rate"},{label:"По первому взносу",value:"firstPayment"}],eP="Указали больше чем запрашиваете кредитных денег";var eO=l(88508);let eV={src:"/kredity/assets/_next/static/media/adv-auto-desktop.6c981f82.svg",height:132,width:1110,blurWidth:0,blurHeight:0},eB={src:"/kredity/assets/_next/static/media/adv-auto-mobile.07d07b83.svg",height:132,width:343,blurWidth:0,blurHeight:0};var eH=l(26850),eW=l.n(eH);let eq=(0,i.memo)(e=>{let{className:t}=e,{mainBaseUrl:l}=(0,eu.UK)();return(0,a.jsxs)(s(),{href:"".concat(l,"/osago"),target:"_blank",className:(0,S.A)(eW().wrapper,t),children:[(0,a.jsx)(X(),{className:(0,S.A)(eW().bg,eW().bgDesktop),src:eV,alt:""}),(0,a.jsx)(X(),{className:(0,S.A)(eW().bg,eW().bgMobile),src:eB,alt:""}),(0,a.jsx)(o.$n,{className:eW().button,size:"s",children:"Оформить"})]})});eq.displayName="OsagoAd";var eJ=l(74356);let eK=[];var eZ=l(60650),ez=l(67642),eQ=l(64345),eX=l.n(eQ),eY=l(35987),eG=l(5435),e$=l(95018),e0=l(39936),e1=l.n(e0);let e2=e=>{(0,O._)({eventCategory:A.h.AUTOCREDIT,eventAction:O.y.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},e3=e=>{let{filter:t,className:l,isMobile:n,bankOptions:o,banks:r,town:s,region:u}=e,c=(0,eY.yX)(),p=(0,i.useRef)(null),v=(0,i.useRef)(()=>null),[m,_]=(0,i.useState)(!1),[h,b]=(0,i.useState)(!1),{count:g,totalCount:f,increaseSort:C,sort:x,handleToggleModal:y,setIncreaseSort:j,setSort:N,isPageLoading:T,handleLoadMore:k,autoCredits:w,isLoading:L,amount:R,firstPayment:F,period:I}=t,[M,E]=(0,i.useState)(),D=(0,i.useMemo)(()=>((e,t)=>{let{amount:l,firstPayment:a,period:n,payment:i,incomeProof:o,vehicleType:r,vehicleState:s,banks:u,insuranceNeed:c,stateCoFinancing:d,notFirstPayment:p}=e,v=[{id:ew.amount,label:"Сумма кредита: ".concat(l?"".concat((0,H.ZV)(l)," ₽"):"не имеет значения")},{id:ew.firstPayment,label:"Первый взнос: ".concat(a?"".concat((0,H.ZV)(a)," ₽"):"не имеет значения")}];if("number"==typeof n){let e=eR.find(e=>e.value===n);void 0!==e&&v.push({id:ew.period,label:0===e.value?"Срок: ".concat(e.label):e.label})}if(void 0!==i&&0!==i&&v.push({id:ew.payment,label:"До ".concat((0,H.ZV)(i)," ₽ в мес")}),void 0!==o&&0!==o.length){let e=eL.filter(e=>o.includes(e.value)),t=1===e.length?e[0].label:"Подтверждение дохода: (".concat(e.length,")");v.push({id:ew.period,label:t})}if(void 0!==r&&0!==r.length){let e=eF.filter(e=>r.includes(e.value)),t=1===e.length?e[0].label:"Тип транспорта: (".concat(e.length,")");v.push({id:ew.vehicleType,label:t})}if(void 0!==s&&0!==s.length){let e=eM.filter(e=>s.includes(e.value)),t=1===e.length?e[0].label:"Состояние транспорта: (".concat(e.length,")");v.push({id:ew.vehicleState,label:t})}if(void 0!==u&&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:ew.bank,label:l})}return(c&&v.push({id:ew.insuranceNeed,label:"Без каско"}),d&&v.push({id:ew.stateCoFinancing,label:"С господдержкой"}),p&&v.push({id:"notFirstPayment",label:"Без первого взноса"}),eK.length===v.length&&v.every((e,t)=>e.label===eK[t].label&&e.id===eK[t].id))?eK:(eK=v,v)})(t,o),[o,t]),U=(0,i.useCallback)(()=>{y()},[y]),P=(0,i.useMemo)(()=>w.map(e=>{let t=es({banks:r,autoCredit:e}),l={};void 0!==R&&0!==R&&(l.amount=R),void 0!==F&&0!==F&&(l.first_payment=F),void 0!==I&&0!==I&&(l.period=I);let a=(0,ez.F)(l);return Object.keys(l).length&&(t.url="".concat(t.url,"#").concat(a)),t}),[R,w,r,F,I]),V=(0,i.useCallback)(e=>{if(null===e)return;let t=w.find(t=>t.id===e.id);if(void 0!==t){var l,a;return{...t,site:{...e.site},bankName:e.bankName,detailUrl:null!=(l=e.detailUrl)?l:"",logo:e.logo,url:null!=(a=e.url)?a:""}}},[w]),B=(0,i.useCallback)(()=>{E(void 0)},[]),W=(0,i.useCallback)(e=>{E(V(e)),null!==e&&(0,O._)({eventCategory:A.h.AUTOCREDIT,eventAction:O.y.popup,eventActionText:e.title,eventLabel:e.id})},[V]);(0,i.useEffect)(()=>{window.removeEventListener("scroll",v.current);let e=n?56:80;return v.current=()=>{if(null===p.current)return;let{top:t}=p.current.getBoundingClientRect();_(t<e-3),b(t<=e+1)},window.addEventListener("scroll",v.current),()=>window.removeEventListener("scroll",v.current)},[n]);let q=(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,J=10*t.page<g;return(0,a.jsxs)("section",{className:(0,S.A)(e1().section,l),children:[(0,a.jsx)(d.J,{children:(0,a.jsxs)("p",{className:e1().title,children:["Найдено ",g," ",(0,a.jsx)("span",{className:e1().titleHide,children:(0,eZ.v)(g)})," ",q,g===f||0===g?"":"из ".concat(f)]})}),(0,a.jsx)("div",{ref:p,className:(0,S.A)(e1().filter,e1().newLayout,{[e1().filterBottom]:m}),children:(0,a.jsx)(eO.x,{chips:D,onChangeIncreaseSort:j,onChangeSortType:N,onClickChip:U,onClickParams:y,sortTypeItems:eU,sortTypeValue:x,isIncreaseSort:C,isMobile:n,isFixed:h})}),(0,a.jsxs)(d.J,{children:[(0,a.jsx)("p",{className:e1().listTitle,ref:c,children:"Предложения рынка кредитов"}),(0,a.jsx)("div",{children:!L&&P.map((e,t)=>(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(el,{onDetailInfoClick:W,className:e1().listItem,data:e,onClick:e2,text:"Подать заявку",detailData:{data:V(e),mainPageUrl:A.h.AUTOCREDIT}},e.url),2===t&&(0,a.jsx)(eq,{className:e1().adv})]},e.id))}),L&&Array.from({length:6},(e,t)=>(0,a.jsx)(eJ.E,{className:e1().listItem},t)),J&&(0,a.jsx)(e$.e,{page:t.page,loading:T,onClick:k}),(0,a.jsx)(eG.h,{tag:"p",className:eX().subtitle,children:t.subtitle})]}),(0,a.jsx)(en.u,{data:M,isOpen:!!M,onClose:B,mainPageUrl:A.h.AUTOCREDIT})]})};function e8(e){let t=(0,w.j)(e.full_price);return{...e,full_price:t}}async function e5(e,t){let{tagUrl:l,regionUrl:a,townUrl:n,limit:i=10,...o}=e,r=function(e){let{limit:t,tagUrl:l,regionUrl:a,townUrl:n,amount:i,firstPayment:o,period:r,loan:s,incomeProof:u,insuranceNeed:c,vehicleState:d,vehicleType:p,stateCoFinancing:v,bank:m,sort:_,order:h,payment:b,page:g,borrower:f}=e,C=new URLSearchParams;return void 0!==t&&C.set("limit",String(t)),void 0!==l&&C.set("tag",l),void 0!==a&&C.set("region",a),void 0!==n&&C.set("town",n),void 0!==i&&C.set(ew.amount,i),void 0!==o&&C.set(ew.firstPayment,String(o)),void 0!==r&&C.set(ew.period,String(r)),void 0!==s&&C.set(ew.loan,s.join(",")),void 0!==u&&C.set(ew.incomeProof,Array.isArray(u)?u.join(","):u),void 0!==c&&C.set(ew.insuranceNeed,c?"1":"0"),void 0!==d&&C.set(ew.vehicleState,d.join(",")),void 0!==p&&C.set(ew.vehicleType,p.join(",")),void 0!==v&&C.set(ew.stateCoFinancing,v?"1":"0"),void 0!==m&&C.set(ew.bank,m.join(",")),void 0!==_&&C.set(ew.sort,_),void 0!==h&&C.set(ew.order,h),void 0!==b&&C.set(ew.payment,b),void 0!==g&&C.set(ew.page,String(g)),void 0!==f&&C.set(ew.borrower,f.join(",")),C.set("archive","0"),C.toString()}({limit:i,regionUrl:a,tagUrl:l,townUrl:n,...o}),{data:s,error:u}=await (0,eT.Q)("/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 ek.m_("Invalid autocredits page: ".concat(o.page));return{offers:s.autoCredits.map(e8),count:s.autoCredits_count,totalCount:s.autoCredits_total_count,title:s.title,subtitle:s.subtitle,description:s.description}}var e6=l(12771),e4=l(73584),e9=l(23517),e7=l(2510);async function te(){return(await (0,e6.zy)("AutoCredits.json?tags&short=1")).autoCredit_tags.reduce((e,t)=>(t.name!==e7.Z2&&e.set(t.url,function(e){let{name:t,url:l,url_redirect:a}=e,n={name:t,url:l},i=(0,e9.Y)(a);return void 0!==i&&(n.url_redirect=i),n}(t)),e),new Map)}new e4.B(te),l(37071),l(81787);var tt=l(23857);function tl(e){let{banks:t,layout:l,refererTag:n,description:i,offer:o,posts:r,questions:s,offers:u,offersFinuslugi:c,support:d}=e;return(0,a.jsx)(tt.P,{data:l,children:(0,a.jsx)(eN,{offer:o,posts:r,questions:s,description:i,banks:t,refererTag:n,offers:u,offersFinuslugi:c,support:d})})}l(7455);var ta=l(25972);let tn={src:"/kredity/assets/_next/static/media/filter.0c02ec9e.svg",height:16,width:16,blurWidth:0,blurHeight:0};var ti=l(35990),to=l.n(ti);let tr=(0,i.memo)(e=>{let{count:t,onClickParams:l,onClickShow:n,isLoading:i,className:r}=e;return(0,a.jsxs)("div",{className:(0,S.A)(to().buttons,r),children:[(0,a.jsx)(o.$n,{variant:"secondary",pending:i,disabled:i,onClick:e=>l(e),iconLeft:(0,a.jsx)(X(),{src:tn,alt:""}),children:"Все параметры"}),(0,a.jsxs)(o.$n,{pending:i,disabled:i,onClick:n,children:["Показать ",t]})]})});tr.displayName="FilterActions";var ts=l(9507),tu=l(62835),tc=l(32266),td=l(67792),tp=l.n(td);let tv=(0,i.memo)(e=>{let{checkedState:t,onChange:l,className:n}=e;return(0,a.jsxs)("ul",{className:(0,S.A)(tp().wrapper,n),children:[(0,a.jsxs)("li",{className:tp().item,children:[(0,a.jsx)(o.Sc,{className:tp().checkbox,onChange:()=>l("insuranceNeed",!t.insuranceNeed),checked:t.insuranceNeed,value:t.insuranceNeed,label:"Без каско"}),(0,a.jsx)(tc.A,{content:"По закону, каско покупать необязательно, но такая страховка компенсирует вам ущерб, даже если вы виновны в ДТП. Каско можно включить в стоимость кредита.",children:(0,a.jsx)(tc.X,{className:tp().detailIcon})})]}),(0,a.jsxs)("li",{className:tp().item,children:[(0,a.jsx)(o.Sc,{className:tp().checkbox,onChange:()=>l("stateCoFinancing",!t.stateCoFinancing),checked:t.stateCoFinancing,value:t.stateCoFinancing,label:"С господдержкой"}),(0,a.jsx)(tc.A,{content:"Поддержка, при которой часть средств предоставляет государство. Их можно потратить только на автомобили определенных марок.",children:(0,a.jsx)(tc.X,{className:tp().detailIcon})})]}),(0,a.jsx)("li",{children:(0,a.jsx)(o.Sc,{className:tp().checkbox,onChange:()=>l("notFirstPayment",!t.notFirstPayment),checked:t.notFirstPayment,value:t.notFirstPayment,label:"Без первого взноса"})})]})});tv.displayName="AutoCreditsFilterDops";var tm=l(88880),t_=l.n(tm);let th=(0,i.memo)(e=>{let{activeIds:t=[],items:l,onChange:n,className:i}=e;return(0,a.jsx)("div",{className:(0,S.A)(t_().tagsWrapper,i),children:l.map(e=>{let l=t.some(t=>t===e.value);return(0,a.jsx)(o.$n,{className:t_().tag,variant:l?"primary":"secondary",onClick:()=>((e,l)=>{n(l?t.filter(t=>String(e)!==t):[...t,String(e)])})(e.value,l),children:e.labelShort},e.value)})})});th.displayName="AutoCreditsTags";var tb=l(40818),tg=l(87057),tf=l(55376),tC=l.n(tf);let tx=e=>{var t,l;let a=null!=(t=e.currentTarget.textContent)?t:"";l="click_button_".concat((0,G.y)(a)),(0,Y.o)({event:"data-event",eventAction:l,eventCategory:A.h.AUTOCREDIT})},ty=e=>{let{region:t,town:l,className:n,tag:o,isMobile:r,filter:s,subtitle:u,adFoxConfig:c}=e,{scrollSmooth:d}=(0,eY.Ll)(),{count:p,isLoading:v,amount:m,firstPayment:_,vehicleType:h,setVehicleType:b,insuranceNeed:g,stateCoFinancing:f,notFirstPayment:C,setInsuranceNeed:x,setStateCoFinancing:y,setNotFirstPayment:j,handleToggleModal:N,firstPaymentPercent:T,handleChangeFirstPayment:k,handleChangeAmount:w}=s,L=(0,i.useCallback)(e=>{tx(e),N()},[N]),R=(0,i.useCallback)(e=>{tx(e),d({offset:-90})},[d]),F=(0,i.useMemo)(()=>({insuranceNeed:g,stateCoFinancing:f,notFirstPayment:C}),[g,C,f]),I=(0,i.useCallback)((e,t)=>{switch(e){case"insuranceNeed":x(t);break;case"notFirstPayment":j(t),k(t?0:void 0);break;case"stateCoFinancing":y(t)}},[k,x,j,y]);return(0,a.jsxs)("div",{className:(0,S.A)(n),children:[(0,a.jsxs)("div",{className:tC().pageHeadingWrap,children:[(0,a.jsx)(ts.F,{region:t,town:l,title:o&&"DEFAULT"!==o.tag_name?null==o?void 0:o.name:"Автокредиты",subtitle:u,mainPageUrl:A.h.AUTOCREDIT}),(0,a.jsx)("div",{className:tC().banner,children:(0,a.jsx)(tu.L,{config:c,params:tb.ZA})})]}),(0,a.jsxs)(ta.mc,{className:tC().container,children:[(0,a.jsxs)("div",{className:tC().filter,children:[(0,a.jsxs)("div",{className:tC().fields,children:[(0,a.jsx)(tg.F,{className:tC().field,label:"Сумма кредита",value:m,onChange:w}),(0,a.jsx)(tg.F,{className:tC().field,label:"Первый взнос",value:_,rightLabel:"".concat(T,"%").replace(".",","),caption:T>100?eP:void 0,state:T>100?"error":void 0,onChange:k})]}),!r&&(0,a.jsx)(tr,{count:p,onClickParams:L,onClickShow:R,isLoading:v})]}),(0,a.jsx)(th,{className:tC().tagsWrapper,items:eI,activeIds:h,onChange:b}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:tC().dopsTitle,children:"Дополнительно"}),(0,a.jsx)(tv,{className:tC().dops,onChange:I,checkedState:F})]}),r&&(0,a.jsx)(tr,{count:p,onClickParams:L,onClickShow:R,isLoading:v})]})]})};var tj=l(87768);let tA=(e,t)=>{var l;l=(null!=t?t:[]).map(e=>e.label).join(","),(0,Y.o)({event:"data-event",eventAction:A.h.AUTOCREDIT,eventCategory:"filter_catalog",eventLabel:(0,G.y)(e),eventValue:l})};var tN=l(55398),tT=l.n(tN);let tk=e=>{let{filter:t,isMobile:l,bankOptions:n}=e,{handleToggleModal:r,resetFilter:s,amount:u,firstPayment:c,setPeriod:d,period:p,payment:m,incomeProof:_,setIncomeProof:h,vehicleType:b,setVehicleType:g,vehicleState:f,setVehicleState:C,borrower:x,setBorrower:y,loan:j,setLoan:N,banks:T,setBank:k,isLoading:w,insuranceNeed:L,stateCoFinancing:R,setInsuranceNeed:F,setStateCoFinancing:I,setSort:M,sort:E,notFirstPayment:D,setNotFirstPayment:U,firstPaymentPercent:P,handleChangeAmount:O,handleChangeFirstPayment:V,handleChangePayment:B}=t,H=(0,i.useMemo)(()=>eR.find(e=>e.value===p),[p]),q=(0,i.useMemo)(()=>eL.filter(e=>null==_?void 0:_.includes(e.value)),[_]),J=(0,i.useMemo)(()=>eF.filter(e=>null==b?void 0:b.includes(e.value)),[b]),K=(0,i.useMemo)(()=>eM.filter(e=>null==f?void 0:f.includes(e.value)),[f]),Z=(0,i.useMemo)(()=>eE.filter(e=>null==x?void 0:x.includes(e.value)),[x]),z=(0,i.useMemo)(()=>eD.filter(e=>null==j?void 0:j.includes(e.value)),[j]),Q=(0,i.useMemo)(()=>n.filter(e=>null==T?void 0:T.includes(Number(e.value))),[n,T]),X=(0,i.useCallback)(()=>{r(),(0,W.e)(v.cA,{offset:l?0:-140,position:"top"})},[r,l]),{handleChangePeriod:Y,handleChangeIncomeProf:G,handleChangeVehicleType:$,handleChangeVehicleState:ee,handleChangeBorrower:et,handleChangeLoan:el,handleChangeBanks:ea}=(0,i.useMemo)(()=>({handleChangePeriod:e=>{d(null==e?void 0:e.value),tA("Срок",eR)},handleChangeIncomeProf:e=>{var t;h(null!=(t=null==e?void 0:e.map(e=>String(e.value)))?t:[]),tA("Подтверждение дохода",e)},handleChangeVehicleType:e=>{var t;g(null!=(t=null==e?void 0:e.map(e=>String(e.value)))?t:[]),tA("Тип транспорта",e)},handleChangeVehicleState:e=>{var t;C(null!=(t=null==e?void 0:e.map(e=>String(e.value)))?t:[]),tA("Состояние транспорта",e)},handleChangeBorrower:e=>{var t;y(null!=(t=null==e?void 0:e.map(e=>String(e.value)))?t:[]),tA("Категория заемщикаа",e)},handleChangeLoan:e=>{var t;N(null!=(t=null==e?void 0:e.map(e=>String(e.value)))?t:[]),tA("Обеспечение",e)},handleChangeBanks:e=>{var t;k(null!=(t=null==e?void 0:e.map(e=>Number(e.value)))?t:[]),tA("Банки",e)}}),[k,y,h,N,d,C,g]),en=(0,i.useMemo)(()=>({insuranceNeed:L,stateCoFinancing:R,notFirstPayment:D}),[L,D,R]),ei=(0,i.useCallback)((e,t)=>{switch(e){case"insuranceNeed":F(t);break;case"notFirstPayment":U(t);break;case"stateCoFinancing":I(t)}},[F,U,I]);return(0,a.jsx)(tj.K,{count:t.count,isMobile:l,isOpen:t.isOpenModal,pageUrl:A.h.AUTOCREDIT,title:"Все параметры",onCLickShow:X,onClose:r,onClickReset:s,isLoading:w,children:(0,a.jsxs)("div",{className:tT().wrapper,children:[(0,a.jsxs)("div",{className:tT().fields,children:[(0,a.jsx)(tg.F,{className:tT().field,label:"Сумма кредита",value:u,onChange:O}),(0,a.jsx)(tg.F,{label:"Первый взнос",value:c,rightLabel:"".concat(P,"%").replace(".",","),caption:P>100?eP:void 0,state:P>100?"error":void 0,onChange:V}),(0,a.jsx)(o.l6,{value:H,onChange:Y,label:"Срок",optionValue:"value",optionLabel:"label",options:eR}),(0,a.jsx)(tg.F,{label:"Ежемесячный платеж до",value:m,onChange:B}),(0,a.jsx)(o.l6,{value:q.length>0?q:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,onChange:G,multiple:!0,label:"Подтверждение дохода",optionValue:"value",optionLabel:"label",options:eL}),(0,a.jsx)(o.l6,{value:J.length>0?J:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:$,optionValue:"value",optionLabel:"label",label:"Тип транспорта",options:eF}),(0,a.jsx)(o.l6,{value:K.length>0?K:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:ee,optionValue:"value",optionLabel:"label",label:"Состояние транспорта",options:eM}),(0,a.jsx)(o.l6,{value:Z.length>0?Z:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,optionValue:"value",optionLabel:"label",onChange:et,label:"Категория заемщика",options:eE}),(0,a.jsx)(o.l6,{value:z.length>0?z:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,optionValue:"value",optionLabel:"label",onChange:el,label:"Обеспечение",options:eD}),(0,a.jsx)(o.l6,{value:Q.length>0?Q:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:ea,optionValue:"value",optionLabel:"label",label:"Банки",options:n})]}),(0,a.jsxs)("div",{className:tT().checkboxWrapper,children:[(0,a.jsx)("p",{className:tT().title,children:"Дополнительно:"}),(0,a.jsx)(tv,{className:tT().dops,checkedState:en,onChange:ei}),(0,a.jsx)("p",{className:(0,S.A)(tT().title,tT().titleSort),children:"Сортировать"}),eU.map(e=>(0,a.jsx)(o.sx,{label:e.label,name:e.value,value:e.value,checked:e.value===E,onChange:()=>M(e.value)},e.value))]})]})})};async function tS(e,t,l){let a=new URLSearchParams;a.set("tag_url",e),void 0!==t&&a.set("region",t),void 0!==l&&a.set("town",l);let{data:n,error:i}=await (0,eT.Q)("/money_data/AutoCreditRegion.json?".concat(a));if(i||null===n)throw Error(null!=i?i:"Ошибка загрузки данных");return{...n,posts:(0,eS.nO)(n.posts)}}var tw=l(48673);async function tL(e){let t=await (0,e6.zy)("AutoCredits.json?".concat("url","=").concat(encodeURIComponent(e)));if(1!==t.length)throw new ek.m_("AutoCredits tag not found: ".concat(e));return function(e){let{url:t,name:l,tag_name:a,text:n,filter:i,default:o,region_page:r}=e,s={url:t,name:l,tag_name:a,text:n,filter:i,default:o};if(null!==r){let{region_titles:e,town_titles:t,region_content:l,town_content:a}=r;s.region_page={region_titles:e,town_titles:t,region_content:l,town_content:a}}return s}(t[0])}new e4.A(tL);var tR=l(67221),tF=l(21921),tI=l(82596),tM=l(50261),tE=l(72080),tD=l(47052),tU=l(38200),tP=l(8868),tO=l(41329),tV=l(54926),tB=l(27964),tH=l(27116);let tW=(0,i.memo)(e=>{let t=function(e){let{name:t,description:l,offers:a,offersCount:n}=e,{mainBaseUrl:i}=(0,eu.UK)(),{asPath:o}=(0,em.useRouter)();if(0===a.length)return;let r=(0,tO.l)({url:"".concat(i).concat(o),priceCurrency:"RUB",offers:a,getLowPrice:e=>{let{amount:t}=e;return""!==t.from?Number(t.from):1e4},getHighPrice:e=>{let{amount:t}=e;return void 0!==t.to&&""!==t.to?Number(t.to):void 0},offerCount:n});return(0,tB.Z)({name:t,description:l,image:"".concat(i).concat(tP.au),offers:r,aggregateRating:(0,tV.E)({ratingValue:4.9,reviewCount:1945,bestRating:5,worstRating:1})})}(e);return void 0===t?null:(0,a.jsx)(tH.S,{schema:t})});tW.displayName="AutoCreditOffersSchema";var tq=l(36012),tJ=l(3187),tK=l(24323),tZ=l(58699),tz=l(162),tQ=l(64998),tX=l(18258),tY=l(3891),tG=l.n(tY);let t$=e=>{var t;let l=(null==e||null==(t=e.currentTarget)?void 0:t.textContent)?(0,G.y)(e.currentTarget.textContent):"glavnaya";(0,Y.o)({event:"data-event",eventAction:"click_link_".concat(l),eventCategory:A.h.AUTOCREDIT})},t0=[(0,a.jsx)(i.Fragment,{children:"Используйте фильтры для указания желаемых параметров: суммы, срока и формы выдачи"},0),(0,a.jsx)(i.Fragment,{children:"Изучите и выберите подходящее предложение"},1),(0,a.jsx)(i.Fragment,{children:"Перейдите к оформлению"},2),(0,a.jsx)(i.Fragment,{children:"Заполните анкету, дождитесь одобрения и получите деньги любым удобным для вас способом"},3)],t1=e=>{var t,l,n,r,u,p,v;let{offers:m,count:_,tag:h,tags:b,townDublicates:g,posts:f,regions:C,banks:x,title:y,subtitle:j,description:N,expertQuote:T,support:k}=e,w=(0,eb.sw)(),{region:L,town:R}=(0,ec.z)(),[F,I]=(0,i.useState)(T),{asPath:M}=(0,em.useRouter)(),E=null!=(l=null==(t=M.split("/").find(e=>e.includes("teg_")))?void 0:t.slice(4))?l:"DEFAULT",D=function(e,t){let[l,a]=(0,i.useState)(e);return(0,tw.w5)(()=>{(0,e6.pY)("autocredits/tag?".concat("url","=").concat(t)).then(a)},[a,t]),l}(h,E),U=function(e,t,l,a){let[n,o]=(0,i.useState)(e);return(0,tw.w5)(()=>{tS(t,l,a).then(e=>{let{posts:t}=e;return o(t)})},[t,l,a]),n}(f,E,null==L?void 0:L.url,null==R?void 0:R.url),P=(e=>{var t,l,a,n;let{region:o,tag:r,town:s,init:u}=e,{asPath:c}=(0,em.useRouter)(),d=(0,i.useMemo)(()=>((e,t)=>{var l,a,n,i,o,r,s;let u=(0,e_.$)(e),{page:c}=u,d=String(null!=(a=null!=(l=u.amount)?l:null==t?void 0:t.filter.amount)?a:""),p=String(null!=(i=null!=(n=u.first_payment)?n:null==t?void 0:t.filter.first_payment)?i:""),v=String(null!=(r=null!=(o=u.period)?o:null==t?void 0:t.filter.period)?r:""),m=String(null!=(s=u.payment)?s:""),_=null==t?void 0:t.default;return{amount:d&&!isNaN(+d)?d:void 0,firstPayment:p&&!isNaN(+p)?p:void 0,period:v&&!isNaN(+v)?+v:void 0,payment:m&&!isNaN(+m)?m:void 0,vehicleType:void 0,vehicleState:!_&&(null==t?void 0:t.filter.vehicle_state)?t.filter.vehicle_state:void 0,borrower:void 0,loan:!_&&(null==t?void 0:t.filter.loans)?t.filter.loans:void 0,insuranceNeed:_||(null==t?void 0:t.filter.insurance)===void 0?void 0:(null==t?void 0:t.filter.insurance)===1,stateCoFinancing:_||(null==t?void 0:t.filter.state_co_financing)===void 0?void 0:(null==t?void 0:t.filter.state_co_financing)===1,incomeProof:!_&&(null==t?void 0:t.filter.proof_income)?t.filter.proof_income:void 0,page:Number(c)||1}})(c,r),[c,r]),p=(0,i.useRef)(null),[v,m]=(0,i.useState)(void 0!==d.amount?Number(d.amount):void 0),[_,h]=(0,i.useState)(void 0!==d.firstPayment?Number(d.firstPayment):void 0),[b,g]=(0,i.useState)(void 0!==d.payment?Number(d.payment):void 0),f=((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})(null!=v?v:0,null!=_?_:0),C=v&&v>0?(0,V.r)(null!=f?f:0,1):0,{query:x}=(0,em.useRouter)(),[y,j]=(0,i.useState)(Number(x.page)||1),[A,N]=(0,i.useState)(u.title),[T,k]=(0,i.useState)(u.subtitle),[S,w]=(0,i.useState)(u.description),[L,R]=(0,i.useState)(!1),[F,I]=(0,i.useState)(!1),[M,E]=(0,i.useState)(null!=(t=u.count)?t:0),[D,U]=(0,i.useState)(null!=(l=u.count)?l:0),[P,O]=(0,i.useState)(!1),[B,H]=(0,i.useState)(null!=(a=u.list)?a:[]),[W,q]=(0,i.useState)(d.period),[J,K]=(0,i.useState)(d.vehicleType),[Z,z]=(0,i.useState)(d.vehicleState),[Q,X]=(0,i.useState)(d.borrower),[Y,G]=(0,i.useState)(d.loan),[$,ee]=(0,i.useState)([]),[et,el]=(0,i.useState)(d.insuranceNeed),[ea,en]=(0,i.useState)(d.stateCoFinancing),[ei,eo]=(0,i.useState)(eU[0].value),[er,es]=(0,i.useState)(!1),[eu,ec]=(0,i.useState)(null!=(n=null==r?void 0:r.filter.proof_income)?n:void 0),[ed,ep]=(0,i.useState)(!1),ev=(0,i.useRef)(!0),eh=(0,i.useCallback)(()=>{O(e=>!e)},[]),eb=(0,i.useCallback)(async e=>{var t,l,a,n,i,u;p.current&&p.current.abort(),p.current=new AbortController;let c={amount:void 0!==v?String(v):"",firstPayment:void 0!==v?f:void 0,period:W,loan:Y,incomeProof:eu,insuranceNeed:et,stateCoFinancing:ea,vehicleState:Z,vehicleType:J,bank:$,order:ed?"desc":"asc",sort:ei,payment:void 0!==b?String(b):void 0,borrower:Q};e>1?(c.page=e,I(!0)):R(!0);let d=await e5({tagUrl:null==r?void 0:r.url,regionUrl:null==o?void 0:o.url,townUrl:null==s?void 0:s.url,...c},p.current.signal),m=null!=(t=null==d?void 0:d.offers)?t:[],_=null!=(l=null==d?void 0:d.title)?l:"",h=null!=(a=null==d?void 0:d.subtitle)?a:"",g=null!=(n=null==d?void 0:d.description)?n:"";E(null!=(i=null==d?void 0:d.count)?i:0),U(null!=(u=null==d?void 0:d.totalCount)?u:0),N(_),k(h),w(g),H(t=>e>1?[...t,...m]:m),I(!1),R(!1)},[v,$,Q,f,eu,ed,et,Y,b,W,o,ei,ea,r,s,Z,J]),eg=(0,i.useCallback)(()=>{j(e=>{let t=e+1;return eb(t),t})},[eb]),ef=(0,i.useCallback)(e=>{m(void 0!==e&&0!==e?Math.abs(e):void 0)},[]),eC=(0,i.useCallback)(e=>{h(void 0!==e&&0!==e?Math.abs(e):void 0)},[]),ex=(0,i.useCallback)(e=>{g(void 0!==e&&0!==e?Math.abs(e):void 0)},[]);(0,i.useEffect)(()=>{ef(void 0!==d.amount?Number(d.amount):void 0),eC(void 0!==d.firstPayment?Number(d.firstPayment):void 0),ex(void 0!==d.payment?Number(d.payment):void 0),K(d.vehicleType),z(d.vehicleState),q(d.period),X(d.borrower),G(d.loan),el(d.insuranceNeed),en(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,ef,eC,ex,r]),(0,i.useEffect)(()=>{es(0===_)},[_]);let ey=(0,i.useCallback)(()=>{m(void 0),h(void 0),g(void 0),q(void 0),H([]),K(void 0),z(void 0),X(void 0),G(void 0),ee([]),el(void 0),en(void 0),ec(void 0),ep(!1)},[]);return(0,tR.s)(()=>{ev.current?ev.current=!1:eb(y)},[eb],300),{isLoading:L,isPageLoading:F,title:A,subtitle:T,description:S,handleLoadMore:eg,autoCredits:B,count:M,totalCount:D,page:y,period:W,setPeriod:q,amount:v,firstPayment:_,isOpenModal:P,setIsOpenModal:O,vehicleType:J,setVehicleType:K,insuranceNeed:et,stateCoFinancing:ea,setInsuranceNeed:el,setStateCoFinancing:en,handleToggleModal:eh,resetFilter:ey,payment:b,incomeProof:eu,setIncomeProof:ec,vehicleState:Z,setVehicleState:z,borrower:Q,setBorrower:X,loan:Y,setLoan:G,banks:$,setBank:ee,sort:ei,setSort:eo,increaseSort:ed,setIncreaseSort:ep,notFirstPayment:er,setNotFirstPayment:es,firstPaymentPercent:C,handleChangeFirstPayment:eC,handleChangeAmount:ef,handleChangePayment:ex}})({region:L,town:R,tag:D,init:{count:_,list:m,subtitle:j,title:y,description:N}}),O=(0,tJ.m)(M);(0,tw.w5)(()=>{(0,tz.Zs)(O).then(I)},[O]);let B=(0,tD.Y)(),H=(0,tU.G)(),W=(0,i.useMemo)(()=>(0,tI.H)(x,P.banks),[x,P.banks]),{mainBaseUrl:q}=(0,eu.UK)(),J=D&&"DEFAULT"!==D.tag_name?null==D?void 0:D.name:"Автокредиты",K=(null==R?void 0:R.name_p)||(null==L?void 0:L.name_p)?" в ".concat((null==R?void 0:R.name_p)||(null==L?void 0:L.name_p)):"",Z="".concat((null==L?void 0:L.url)?"/reg_".concat(null==L?void 0:L.url):"").concat((null==R?void 0:R.url)?"/".concat(null==R?void 0:R.url):""),z=(()=>{let e=D&&"DEFAULT"!==D.tag_name?',{"@type":"ListItem","position":3,"name":"&#128181 '.concat(J).concat(K,'","item":"').concat(q).concat(M,'"}'):"",t='{"@type":"ListItem","position":1,"name":"Финуслуги","item":"'.concat(q,'"}'),l='{"@type":"ListItem","position":2,"name":"Автокредиты'.concat(K,'","item":"').concat(q,"/").concat(A.h.AUTOCREDIT).concat(Z,'"}');return"{".concat('"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":['.concat(t),",").concat(l).concat(e,"]}")})(),Q=(0,i.useMemo)(()=>{let e=[];e.push(...(0,tX.N)(A.h.AUTOCREDIT,C,D,L,R,{nominativeCase:"Автокредиты",genitiveCase:"автокредитов"}));let t=b.reduce((e,t)=>{if(void 0===t.url_redirect){let l=(0,tE.b)(A.h.AUTOCREDIT,t,L,R),a=(0,tq.AP)(l,t.name);e.push(a)}return e},[]);if(e.push({title:"Виды автокредитов",text:(0,a.jsx)(tq.oL,{children:t})}),L){var l,n;e.push(...null!=(n=null==(l=D.region_page)?void 0:l.town_content.map(e=>({title:(0,tM.w)(e.title,L,R,g,void 0,D),text:(0,tM.w)(e.content.map(tF.Zf).join(""),L,R,g,void 0,D)})))?n:[])}else e.push(...D.text.map(e=>({title:(0,tM.w)(e.title,L,R,g,void 0,D),text:(0,tM.w)(e.content.map(tF.Zf).join(""),L,R,g,void 0,D)})));return e},[L,b,C,D,R,g]);return(0,a.jsxs)("main",{className:tG().page,children:[(0,a.jsx)(c.I,{title:null!=(n=P.title)?n:"",description:null!=(r=P.description)?r:""}),(0,a.jsx)(ef.t,{}),(0,a.jsx)("div",{className:(0,S.A)(tG().background,"bg-".concat(H))}),(0,a.jsx)("div",{className:tG().navigationWrapper,children:(0,a.jsxs)(d.J,{children:[(0,a.jsx)(o.BI,{className:tG().breadcrumbs,items:(()=>{let e=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(K),href:"/".concat(A.h.AUTOCREDIT).concat(Z)}];return"DEFAULT"!==E&&e.push({label:"".concat(J).concat(K),href:"/".concat(A.h.AUTOCREDIT,"/teg_").concat(E).concat(Z)}),e.pop(),e.push({label:"".concat(J).concat((null==D?void 0:D.default)?K:"")}),e})(),onClick:t$}),(0,a.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:z}})]})}),(0,a.jsx)(d.J,{children:(0,a.jsx)(ty,{region:null!=L?L:null,town:null!=R?R:null,isMobile:w,tag:D,filter:P,subtitle:null!=(u=P.subtitle)?u:"",adFoxConfig:B})}),(0,a.jsx)(e3,{banks:x,bankOptions:W,filter:P,isMobile:w,town:R,region:L}),(0,a.jsx)(tW,{name:null!=(p=P.title)?p:"",description:null!=(v=P.description)?v:"",offers:P.autoCredits,offersCount:_}),(0,a.jsx)(tK.I,{steps:t0,variant:"secondary"}),void 0!==F&&(0,a.jsx)(tQ.V,{quote:F}),(0,a.jsx)(tZ.f,{type:"bank"}),(0,a.jsx)(ey.m,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,a.jsx)(s(),{...e}),dataLayerPush:Y.o,questions:Q,eventCategory:"cards_support_block",href:"".concat(q,"/help"),checkAllText:"Читать все вопросы про автокредиты"}),(0,a.jsx)(tk,{bankOptions:W,isMobile:w,filter:P}),U.length>0&&(0,a.jsx)(eC.C,{posts:U,eventCategory:A.h.AUTOCREDIT}),(0,a.jsx)(ex.E,{value:k})]})};function t2(e){let{layout:t,root:l,banks:n,offers:i,posts:o,tags:r,tag:s,expertQuote:u,support:c}=e;return(0,a.jsx)(tt.P,{data:t,withLocationConfirm:!0,children:(0,a.jsx)(t1,{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,support:c})})}l(46215),l(7705);var t3=l(48523),t8=l(36612),t5=!0;let t6=(0,i.memo)(function(e){var t,l;return(0,a.jsx)(n.C,{children:e.isShowcase?(0,a.jsx)(t3.N,{region:null!=(t=e.region)?t:void 0,town:null!=(l=e.town)?l:void 0,children:(0,a.jsx)(t2,{...e})}):(0,a.jsx)(t8.K,{children:(0,a.jsx)(tl,{...e})})})})},99689:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});let a={src:"/kredity/assets/_next/static/media/banner-4.fc5b15be.svg",height:222,width:324,blurWidth:0,blurHeight:0}}},e=>{e.O(0,[7492,2224,8325,2970,4587,1758,5695,7586,4743,9544,9903,7279,636,6593,8792],()=>e(e.s=80976)),_N_E=e.O()}]);