(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[434],{9677:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/avtokredity/[[...segments]]",function(){return l(10605)}])},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 a}});let a=e=>{let t=Number(e.split(" ")[0]);return e&&!Number.isNaN(t)?t:0}},51858:function(e,t,l){"use strict";l.d(t,{p:function(){return k}});var a,n,i=l(85893),o=l(34588),r=l(86010),s=l(67294),c=l(59457);function u(){return(u=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)}var d=function(e){return s.createElement("svg",u({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"})))},p=l(30082),v=l.n(p);let m=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?void 0:a.contains(n))&&e()};return window.addEventListener("click",l),()=>{window.removeEventListener("click",l)}},[e]),t},_=e=>{let{content:t,children:l,disabled:a,isNewSortRadios:n}=e,[o,c]=(0,s.useState)(!1),u=(0,s.useCallback)(()=>c(!0),[c]),d=(0,s.useCallback)(()=>c(!1),[c]);return(0,i.jsxs)("div",{className:(0,r.Z)(v().wrap,n&&v().newSortRadioWrap),onClick:u,ref:m(d),children:[l,o&&!a&&(0,i.jsx)("div",{className:v().content,children:t})]})};function h(){return(h=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)}var b=function(e){return s.createElement("svg",h({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"})))},g=l(58177),f=l.n(g);let x=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.Z)(f().sortTypeHead,t&&f().newSortRadioSortTypeHead),children:[(0,i.jsx)("button",{style:{marginLeft:"0px",marginRight:l?"0px":"8px"},className:(0,r.Z)(f().sortTypeButton,t&&f().newSortRadioSortTypeButton),onClick:a,children:(0,i.jsx)(d,{className:(0,r.Z)(!n&&f().iconInverted)})}),"Сортировать"]}),t&&(0,i.jsx)("div",{className:f().divider})]})},C=(0,s.memo)(e=>{let{isMobile:t,onChangeSort:l,isIncreaseSort:a,onChangeSortType:n,sortTypeItems:s,sortTypeValue:c,isNewSortRadios:u}=e;return(0,i.jsxs)(i.Fragment,{children:[!u&&t&&(0,i.jsx)(x,{onChangeSort:l,isMobile:t,isIncreaseSort:a,isNewSortRadios:u}),(0,i.jsxs)("div",{className:(0,r.Z)(f().sortTypeContainer,u&&f().newSortRadioSortTypeContainer),onClick:e=>e.stopPropagation(),children:[u&&(0,i.jsx)(x,{onChangeSort:l,isMobile:t,isIncreaseSort:a,isNewSortRadios:u}),s.map(e=>(0,i.jsxs)("div",{"data-qa":"".concat(e.value,"_radio"),className:f().sortType,children:[u?(0,i.jsx)(o.Y8,{name:e.value,value:c,checked:e.value===c,label:e.label,onChange:()=>n(e.value)}):(0,i.jsx)(o.Y8,{name:e.value,label:e.label,checked:e.value===c,className:f().sortTypeRadio,value:e.value,onChange:()=>n(e.value)}),e.description&&(0,i.jsx)(o.u,{text:e.description,className:(0,r.Z)(f().sortTypeButton,u&&f().newSortRadioSortTypeButton),children:(0,i.jsx)(b,{})})]},e.value))]})]})});C.displayName="SortRadios";var y=l(19438),j=l(5257),N=l.n(j);let k=(0,s.memo)(e=>{let{chips:t,onClickParams:l,isIncreaseSort:a,onChangeIncreaseSort:n,sortTypeItems:u,sortTypeValue:p,onChangeSortType:v,isMobile:m,isFixed:h,portalId:b,onClickChip:g,className:f,onClickSortType:x,isNewSortRadios:j}=e,k=(0,s.useCallback)(()=>null==n?void 0:n(!a),[a,n]),T=(0,i.jsx)("div",{style:{padding:"8px",borderRadius:j?"20px":"8px",background:"white"},className:(0,r.Z)(!m&&j&&N().sortTypeDesktop),children:(0,i.jsx)(C,{isMobile:m,isIncreaseSort:a,onChangeSort:k,onChangeSortType:v,sortTypeItems:u,sortTypeValue:p,isNewSortRadios:j,portalId:b})}),A=u.find(e=>e.value===p);return(0,i.jsx)("div",{className:(0,r.Z)(N().filter,j&&N().newSortRadiosFilter,h&&N().stuck,f),children:(0,i.jsx)(y.t,{className:N().mainContainer,children:(0,i.jsxs)("div",{className:N().container,children:[(0,i.jsx)(o.cL,{className:N().chipsContainer,chips:t,value:t.map(e=>e.id),multiple:!0,activeVariant:"secondary",onChipClick:g}),(0,i.jsxs)("div",{className:N().actionsWrapper,children:[(0,i.jsxs)("button",{className:(0,r.Z)(N().action,N().actionButton),onClick:l,children:[(0,i.jsx)(c.Z,{className:N().icon}),(0,i.jsx)("span",{className:N().actionText,children:"Все параметры"})]}),(0,i.jsxs)("div",{className:N().action,children:[(0,i.jsx)("button",{className:(0,r.Z)(N().icon,N().iconButton,!a&&N().iconInverted),onClick:k,children:(0,i.jsx)(d,{})}),(0,i.jsx)(_,{content:T,disabled:m,isNewSortRadios:j,children:(0,i.jsx)("button",{onClick:x,className:(0,r.Z)(N().actionText,N().actionButton),"data-qa":"".concat(p,"_order"),children:(null==A?void 0:A.shortLabel)||(null==A?void 0:A.label)||"Сортировка"})})]})]})]})})})});k.displayName="ListFilter"},58484:function(e,t,l){"use strict";l.d(t,{V:function(){return p}});var a=l(85893),n=l(44076),i=l(86010),o=l(67294),r=l(65737),s=l(21308),c=l(94347),u=l(83226),d=l.n(u);let p=(0,o.memo)(e=>{let{region:t,town:l,subtitle:o,title:u,mainPageUrl:p}=e,{town:v,region:m}=(0,c.T)(),{handleToggleModal:_}=(0,n.ar)(),h=e=>{(0,r.l)({event:"data-event",eventAction:e,eventCategory:p})};return(0,a.jsxs)("div",{className:(0,i.Z)(d().titleWrapper,d().newTitle),children:[(0,a.jsxs)("h1",{className:d().title,children:[u," ",((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),h("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,a.jsx)(s.N,{tag:"p",className:d().subtitle,children:o})]})});p.displayName="RegionTitle"},77624:function(e,t,l){"use strict";l.d(t,{n:function(){return a}});let a=(e,t)=>{var l;let a=null!==(l=null==t?void 0:t.map(e=>+e))&&void 0!==l?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}))}},37220:function(e,t,l){"use strict";l.d(t,{z:function(){return a}});let a=(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 i},b:function(){return n}});var a=l(67294);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,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{r(!0),e().then(i).catch(c).then(()=>{r(!1)})},t),[n,o,s]}},10605:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSP:function(){return t9},default:function(){return le}});var a=l(85893),n=l(44076),i=l(67294),o=l(34588),r=l(41664),s=l.n(r),c=l(73172),u=l(84444),d=l(19438),p=l(72335),v=l(54663),m=l(20070),_=l(57696);let h=[{id:1,label:"Условия",name:_.cQ.conditions},{id:2,label:"Требования к заемщику",name:_.cQ.requirements},{id:3,label:"Требование к ТС",name:_.cQ.requirementsVehicles},{id:4,label:"Погашение",name:_.cQ.redemption}];var b=l(44727);let g=e=>{let{data:t}=e,l=(0,i.useMemo)(()=>(0,m.m8)(t),[t]),a=(0,i.useMemo)(()=>h.filter(e=>l[e.name].some(e=>(0,b.B)(e.value))),[l]);return{tabsContent:l,tabsList:a}},f=(0,i.memo)(e=>{var t,l;let{data:n,bank:i,offerType:o,pageUrl:r}=e,{tabsContent:s,tabsList:c}=g({data:n});return(0,a.jsx)(p.z,{scrollBlockId:v.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:c,tabsContent:s,aboutCompanyLabel:"О банке",site:null!==(l=null==i?void 0:i.site.title)&&void 0!==l?l:void 0})});f.displayName="AutoCreditAbout";var x=l(17722),C=l(94781),y=l(93842),j=l(64062),N=l(54636),k=l(73897),T=l(5753),A=l.n(T);let S=e=>{let{url:t,offerType:l,isMobile:n,className:o}=e,r=(0,i.useMemo)(()=>[{id:3,image:y.Z,text:"Перейдите на сайт банка,<br /> чтобы оформить заявку",types:[N.A.LEAD],buttonText:"Оформить на сайте банка",link:t},{id:4,image:x.Z,text:N.A.LEAD?"Этот кредит нельзя открыть через Финуслуги":"Этот автокредит сейчас нельзя открыть онлайн на Финуслугах",types:[N.A.LEAD,N.A.MASS],buttonText:"Выбрать другой автокредит",link:"/avtokredity"},{id:5,image:C.Z,text:"Чтобы оформить автокредит, обратитесь в банк",types:[N.A.MASS]}].filter(e=>e.types.find(e=>e===l)),[t,l]);return(0,a.jsx)("div",{className:A().container,children:(0,a.jsx)(j.B,{className:o,title:"Где оформить автокредит",pageUrl:k.u.AUTOCREDIT,id:v.VT,isMobile:n,slides:r})})};var w=l(86010),L=l(77019),R=l(24443),I=l(28644),D=l(48766),F=l(26024),M=l(90999),P=l(72798),E=l(17950),O=l(41262),U=l(66566),$=l(39918),B=l(37220),W=l(6584),Z=l(94466),V=l(93478),H=l(21172),z=l.n(H);let q="Оформить на сайте банка",Q="Где оформить автокредит",J=e=>{var t,l,n,r;let{offerType:s,bank:c,data:u,isMobile:p,calculator:m}=e,[_,h]=(0,i.useState)(!1),b=(0,i.useRef)(null),g=(0,i.useMemo)(()=>{let{domestic_new:e,domestic_old:t,foreign_new:l,foreign_old:a}=u.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?"Любое б/у":"Любое":"Отечественная новая":"Отечественная б/у":"Иномарка б/у":"Иномарка новая"},[u.vehicle_state]),f=(0,i.useCallback)(()=>{b.current&&b.current.focus()},[]),x=(0,i.useCallback)(e=>{e&&((0,$.D)({eventCategory:k.u.AUTOCREDIT,eventAction:$.i.filterCatalog,eventLabel:"Платеж",eventValue:e.label}),m.setPaymentTypeValue(e.value))},[m]),C=(0,i.useMemo)(()=>({value:m.period,max:m.periodMax,min:m.periodMin===m.periodMax?m.periodMin-1:m.periodMin,onChange:e=>{e=null!=e?e:m.periodMin,m.periodMin!==m.periodMax&&m.setPeriod(e)},step:1,ticks:[{label:(0,O.H3)(m.periodMin),value:m.periodMin},{label:(0,O.H3)(m.periodMax),value:m.periodMax}],unit:[W.mp.ONE,W.mp.FEW,W.mp.MANY]}),[m]),y=(0,i.useMemo)(()=>m.paymentTypeOptions.filter(e=>e.value===m.paymentTypeValue),[m.paymentTypeOptions,m.paymentTypeValue]),j=(0,i.useMemo)(()=>[{id:1,label:(0,O.S_)(m.period)},{id:2,label:"".concat(m.amount)}],[m.amount,m.period]),T=(0,i.useMemo)(()=>{var e;let t=(null===(e=u.application_term.custom_text)||void 0===e?void 0:e.from)!==void 0?(0,D.B)(u.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,U.$)("".concat(n,"-").concat(a,"-").concat(i)))},[null===(t=u.application_term.custom_text)||void 0===t?void 0:t.from]),A=m.amount,S=(0,i.useMemo)(()=>{let e=m.firstPayment,t=m.period,l=u.vehicle_type.text,n=m.paymentTypeValue,i=[],o=Number(e)/(Number(A)/100);Number.isInteger(o)||(o=Number(o.toFixed(5)));let r=A?(0,B.z)(o,1):0;i.push({label:"Первый взнос",value:"".concat(r,"%").replace(".",",")}),i.push({label:"Срок погашения",value:(0,O.S_)(t)});let s=u.full_price;if(s){let e=u.interest_rate;i.push({label:"ПСК",value:(0,L.W)(s),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n    Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,Z.sz)(Number(e.from),Number(e.to))})}return i.push({label:"Тип&#160;ТС",value:l},{label:"Состояние&#160;ТС",value:g,description:"Некоторые банки указывают, что получить кредит можно только на новый автомобиль, а для других это не принципиально."}),n&&i.push({label:"Тип платежа",value:n===E.T.annuity?"Аннуитетный":"Дифференцированный",description:(0,a.jsx)("div",{className:z().tooltipContent,children:(0,a.jsx)(F.a,{type:n})})}),i},[m.firstPayment,m.period,m.paymentTypeValue,u.vehicle_type.text,u.full_price,u.interest_rate,g,A]);return(0,a.jsxs)(d.t,{className:(0,w.Z)(z().container,z().containerFull),children:[(0,a.jsx)(M.F,{url:u.url,bank:{logoMob:null==c?void 0:c.logo_mob,url:"/banki/".concat(null==c?void 0:c.url),name:null!==(n=null==c?void 0:c.name)&&void 0!==n?n:u.bank_name},pageUrl:k.u.AUTOCREDIT,title:"Автокредит \xab".concat(u.title,"\xbb от ").concat(null!==(r=null==c?void 0:c.name)&&void 0!==r?r:u.bank_name),isSmall:l,isMobile:p,tagTheme:"red",className:z().promo}),(0,a.jsxs)("div",{className:z().left,children:[(0,a.jsx)(R.y,{isMobile:p,title:"Настройка автокредита",pageUrl:k.u.AUTOCREDIT,infoLink:{isShow:!p,text:"Подробнее об автокредите",idScrollBlock:v.q6,offPadding:!0,widthMaxContent:!0},items:[{elements:[{type:"moneyInput",props:{label:"Сумма",value:m.amount,onChange:m.setAmount,onFocus:()=>h(!0)}}]},{elements:[{type:"moneyInput",props:{label:"Первый взнос",value:m.firstPayment,onChange:m.setFirstPayment,onFocus:()=>h(!0)}}]},{elements:[{type:"inputRange",props:{label:"Срок погашения",...C}}]},{elements:[{type:"select",isHidden:!m.paymentTypeValue||m.paymentTypeOptions.length<=1,desription:m.paymentTypeValue&&(0,a.jsx)(F.a,{className:z().typeDescription,type:m.paymentTypeValue}),props:{label:"Платеж",options:m.paymentTypeOptions,onChange:x,value:y}}]}],chips:j,isShowChips:p&&!!(null==j?void 0:j.length)&&!_,isExpandSettings:_,onToggleSettings:()=>h(e=>!e)}),(0,a.jsx)(P.S,{isSmall:!0,className:z().qrDesc})]}),(0,a.jsxs)("div",{className:z().right,children:[(0,a.jsx)(I.y,{captionTitle:T,pageUrl:k.u.AUTOCREDIT,onEdit:f,amount:Number(m.amount),disclaimer:"Предварительные условия. Не оферта",tag:u.online_application.commercial_desc,footerActions:(0,a.jsxs)(a.Fragment,{children:[s===N.A.LEAD&&(0,a.jsx)(o.zx,{as:"a",onClick:()=>{(0,$.D)({eventCategory:k.u.AUTOCREDIT,eventAction:$.i.link,eventActionText:q,eventLabel:u.id})},href:u.online_application.url,target:"_blank",className:z().button,children:q}),(0,a.jsx)(o.zx,{onClick:()=>{(0,$.D)({eventCategory:k.u.AUTOCREDIT,eventAction:$.i.button,eventActionText:Q}),(0,V.l)(v.VT,{offset:p?0:-100,position:"top"})},className:z().button,variant:"secondary",children:Q})]}),valuesList:S}),(0,a.jsx)(P.S,{isSmall:!0,className:z().qrMobile})]})]})};var X=l(25675),G=l.n(X),K=l(65737),Y=l(40741),ee=l(30976),et=l(73654),el=l.n(et);let ea=(0,i.memo)(e=>{var t,l;let{data:n,detailData:o,className:r,onDetailInfoClick:s,onClick:c}=e,u=[],d=(0,i.useRef)(null),p=(0,i.useRef)(!1),v=(0,i.useRef)(null),m={text:"",caption:""},[_,h]=(null==o?void 0:null===(t=o.data)||void 0===t?void 0:t.online_application.commercial)===1?["Оформить",o.data.online_application.url]:["Подробнее",n.url],b=null==o?void 0:null===(l=o.data)||void 0===l?void 0:l.full_price;b&&(m.caption="ПСК",m.text=(0,L.W)(b),m.tooltipText="ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n        Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре.");let g={text:(0,Z.dN)({from:n.amountFrom,to:n.amountTo},{currency:n.currency}),caption:"Сумма"},f={text:"от ".concat((0,Z.uf)(n.payment),"%"),caption:"Первый взнос"};u.push({label:"Заявка через сайт банка",variant:"primary"}),n.isKascko&&u.push({label:"Потребуется каско",variant:"primary"}),n.isPermanentRegistation&&u.push({label:"Постоянная регистрация",variant:"primary"});let x=e=>{(0,K.l)({event:"data-event",eventAction:e,eventCategory:k.u.AUTOCREDIT,eventLabel:n.id,eventValue:n.eventValue}),null==c||c(n)},C=(0,i.useCallback)(e=>{let[t]=e;1===t.intersectionRatio&&!p.current&&((0,K.l)({event:"data-event",eventAction:"show_in_catalog",eventCategory:k.u.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:()=>x("click_button_".concat((0,Y.b)("Подать заявку"))),children:(0,a.jsx)(ee.J,{icon:n.logo?(0,a.jsx)("div",{className:el().logo,children:(0,a.jsx)(G(),{width:56,height:56,src:n.logo,alt:"logo"})}):(0,a.jsx)("div",{className:el().placeholderLogo}),companyName:n.bankName,productName:n.title,productUrl:n.url,buttonText:_,buttonUrl:h,tags:u,advantageAmountFrom:m,advantageAmountTo:f,advantageBonus:g,onDetailInfoClick:()=>{s(n),(0,$.D)({eventCategory:k.u.AUTOCREDIT,eventAction:$.i.button,eventActionText:"open_modal"})},className:el().plate})})});ea.displayName="AutoCreditListItem";var en=l(13442),ei=l(84135),eo=l(89504),er=l(32244);let es=e=>(null==e?void 0:e.online_application.commercial)===1?N.A.LEAD:N.A.MASS,ec=e=>{var t,l,a,n,i,o;let{banks:r,autoCredit:s,period:c}=e,u="/".concat(k.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!==(a=null==v?void 0:v.id)&&void 0!==a?a:"",isCard:!1,logo:null!==(n=null==v?void 0:v.logo_mob)&&void 0!==n?n:"",title:s.title,url:u,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:c||+s.period.to,rate:+s.interest_rate.from,rateTo:+s.interest_rate.to,payment:+s.first_payment.from||0,currency:"₽",detailUrl:"/".concat(k.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:es(s),site:{title:null!==(i=null==v?void 0:v.site.title)&&void 0!==i?i:null,url:null!==(o=null==v?void 0:v.site.url)&&void 0!==o?o:null}}};var eu=l(84053),ed=l(94347),ep=l(5569),ev=l.n(ep);let em=(0,i.memo)(e=>{let{bank:t,banks:l,currentCardId:n,autocredits:o,autocreditsFinuslugi:r,className:s}=e,{town:c}=(0,ed.T)(),[u,p]=(0,i.useState)(),[v,m]=(0,i.useState)(null),_=(0,i.useCallback)(()=>{p(void 0)},[]),h=(0,i.useCallback)(e=>{(0,$.D)({eventCategory:k.u.AUTOCREDIT,eventAction:$.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},[]),b=(0,i.useMemo)(()=>{let e=o?o.filter(e=>e.id!==n):[];return(0,er.$)({productList:e,anotherList:e,count:eo.NU})},[o,n]),g=(0,i.useMemo)(()=>{let e=r||[];return(0,er.$)({productList:e,anotherList:e,count:eo.wo-b.length})},[b.length,r]),f=(0,i.useMemo)(()=>({bankList:b.map(e=>ec({banks:[t],autoCredit:e})),finuslugiList:g.map(e=>ec({banks:l,autoCredit:e}))}),[t,l,b,g]),x=(0,i.useCallback)(e=>{if(!e)return;let t=[b,g].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)&&void 0!==l?l:"",logo:e.logo,url:null!==(a=e.url)&&void 0!==a?a:""}}},[b,g]),C=(0,i.useCallback)(e=>{var t;p(x(e)),m(null!==(t=null==e?void 0:e.type)&&void 0!==t?t:null),e&&(0,$.D)({eventCategory:k.u.AUTOCREDIT,eventAction:$.i.popup,eventActionText:e.title,eventLabel:e.id})},[x]),y="".concat((0,eu.ZR)().mainBaseUrl,"/banki/").concat(t.url,"/avtokredity").concat((null==c?void 0:c.url.length)?"/reg_"+c.url:"");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("section",{className:(0,w.Z)(ev().container,s),children:[(0,a.jsx)("h3",{className:ev().title,children:"Другие автокредиты"}),(0,a.jsxs)(d.t,{children:[!!f.bankList.length&&(0,a.jsxs)("section",{className:ev().offersListContainer,children:[(0,a.jsxs)("p",{className:ev().listTitle,children:["Автокредиты от ",t.name]}),f.bankList.map(e=>(0,a.jsx)(ea,{onDetailInfoClick:C,className:ev().listItem,data:e,onClick:h,text:"Подать заявку",detailData:{data:x(e),mainPageUrl:k.u.AUTOCREDIT}},e.url)),(0,a.jsx)(en.j,{offPadding:!0,text:"Bсе предложения от банка",href:y,target:"_blank",iconColor:"light",mainPageUrl:k.u.AUTOCREDIT})]}),!!f.finuslugiList.length&&(0,a.jsxs)("section",{className:ev().offersListContainer,children:[(0,a.jsx)("p",{className:ev().listTitle,children:"Автокредиты на Финуслугах"}),f.finuslugiList.map(e=>(0,a.jsx)(ea,{onDetailInfoClick:C,className:ev().listItem,data:e,onClick:h,text:"Подать заявку",detailData:{data:x(e),mainPageUrl:k.u.AUTOCREDIT}},e.url)),(0,a.jsx)(en.j,{offPadding:!0,text:"Bсе предложения на Финуслугах",href:"/avtokredity",target:"_blank",iconColor:"light",mainPageUrl:k.u.AUTOCREDIT})]})]})]}),(0,a.jsx)(ei.h,{data:u,isOpen:!!u,onClose:_,mainPageUrl:k.u.AUTOCREDIT,offerType:v})]})});em.displayName="AutoCreditsList";var e_=l(11163),eh=l(82080);let eb=e=>Array.isArray(e)?e[0]:e,eg=e=>{var t,l,a,n,o,r;let{asPath:s}=(0,e_.useRouter)(),[c,u]=(0,i.useState)(Number(null!==(l=e.amount.from)&&void 0!==l?l:0)),[d,p]=(0,i.useState)(0),[v,m]=(0,i.useState)(Number(null!==(a=e.period.to)&&void 0!==a?a:1)),_=Number(null!==(n=e.period.from)&&void 0!==n?n:1),h=Number(null!==(o=e.period.to)&&void 0!==o?o:1),b=(0,i.useMemo)(()=>{let t=[];return 0!==e.repayment_procedure.annuity&&t.push({label:"Аннуитетный",value:E.T.annuity}),void 0!==e.repayment_procedure.differentiated&&0!==e.repayment_procedure.differentiated&&t.push({label:"Дифференцированный",value:E.T.differentiated}),t},[e.repayment_procedure]),[g,f]=(0,i.useState)(null!==(r=null===(t=b[0])||void 0===t?void 0:t.value)&&void 0!==r?r:null),x=(0,i.useCallback)(e=>{u(null!=e?e:0)},[]),C=(0,i.useCallback)(e=>{p(null!=e?e:0)},[]),y=(0,i.useMemo)(()=>({value:c,onChange:x}),[c,x]),j=(0,i.useMemo)(()=>({value:d,onChange:C}),[d,C]);return(0,i.useEffect)(()=>{let e=(0,eh.p)(s,"#"),t=eb(e.amount),l=eb(e.first_payment),a=eb(e.period);void 0!==t&&u(+t),void 0!==l&&p(+l);let n=Number(a);!Number.isNaN(n)&&n>=_&&n<=h&&m(n)},[]),(0,i.useMemo)(()=>({amount:c,setAmount:u,amountInputProperties:y,firstPayment:d,setFirstPayment:p,firstPaymentInputProperties:j,period:v,setPeriod:m,periodMin:_,periodMax:h,paymentTypeOptions:b,paymentTypeValue:g,setPaymentTypeValue:f}),[c,y,d,j,v,_,h,b,g])};var ef=l(54228),ex=l(51469),eC=l(71276),ey=l(53487),ej=l(37502),eN=l(44215),ek=l(56381),eT=l.n(ek);function eA(e){var t;let{offer:l,posts:n,questions:i,description:r,banks:p,refererTag:v,offers:m,offersFinuslugi:_,support:h}=e,b=es(l),g=(0,ef.S0)(),x=eg(l),{region:C,town:y}=(0,ed.T)(),j=p.find(e=>Number(e.id)===l.bank_id),N=(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,c.MK)(e.data.html)).join("").trim()})))||[],T="Автокредит \xab".concat(l.title,"\xbb от ").concat(null!==(t=null==j?void 0:j.name_r)&&void 0!==t?t:"");return(0,a.jsxs)("main",{className:eT().page,children:[(0,a.jsx)(u.N,{productId:String(l.id),title:T,description:null!=r?r:""}),(0,a.jsx)(eC.o,{}),(0,a.jsx)(ex.g,{questions:N}),(0,a.jsx)("div",{className:eT().navigationWrapper,children:(0,a.jsx)(d.t,{children:(0,a.jsx)(o.Oo,{className:eT().breadcrumbs,items:(()=>{var e;let t=(null==y?void 0:y.name_p)||(null==C?void 0:C.name_p)?" в ".concat((null==y?void 0:y.name_p)||(null==C?void 0:C.name_p)):"",a="".concat((null==C?void 0:C.url)?"/reg_".concat(null==C?void 0:C.url):"").concat((null==y?void 0:y.url)?"/".concat(null==y?void 0:y.url):""),n=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(t),href:"/".concat(k.u.AUTOCREDIT).concat(a)}];return v&&n.push({label:"".concat(v.name).concat(t),href:"/".concat(k.u.AUTOCREDIT,"/teg_").concat(v.url).concat(a)}),n.push({label:"".concat(null!==(e=null==j?void 0:j.name)&&void 0!==e?e:l.bank_name," Автокредит ").concat(l.title)}),n})()})})}),(0,a.jsx)(J,{calculator:x,bank:j,offerType:b,data:l,isMobile:g}),(0,a.jsx)(d.t,{className:eT().about,children:(0,a.jsx)(f,{data:l,bank:j,offerType:b,pageUrl:k.u.AUTOCREDIT})}),(0,a.jsx)(S,{isMobile:g,offerType:b,url:l.online_application.url}),void 0!==j&&(0,a.jsx)(em,{bank:j,banks:p,currentCardId:l.id,autocredits:m,autocreditsFinuslugi:_}),n.length>0&&(0,a.jsx)(ey.t,{posts:n,eventCategory:k.u.AUTOCREDIT}),(0,a.jsxs)("div",{className:eT().supportSection,children:[(0,a.jsx)(ej.B,{value:h}),(0,a.jsx)(eN.B,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,a.jsx)(s(),{...e}),dataLayerPush:K.l,questions:N,eventCategory:"cards_support_block",href:"".concat((0,eu.ZR)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про автокредиты"})]})]})}var eS=l(98670);l(93188);var ew=l(53850),eL=l(22504);let eR={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"},eI=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}];k.u.AUTOCREDIT;let eD=[{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:"Другое"}],eM=[{value:"moto",labelShort:"Мототранспорт"},{value:"car",labelShort:"Легковое ТС"},{value:"track",labelShort:"Грузовое ТС"},{value:"commercial",labelShort:"Коммерческое ТС"},{value:"water",labelShort:"Водное ТС"},{value:"custom",labelShort:"Другое"}],eP=[{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:"Иное"}],eO=[{value:"not_required",label:"Не требуется"},{value:"pledge",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"full",label:"Залог и поручительство"}],eU=[{label:"По ставке",value:"rate"},{label:"По первому взносу",value:"firstPayment"}],e$="Указали больше чем запрашиваете кредитных денег";var eB=l(51858),eW={src:"/kredity/assets/_next/static/media/adv-auto-desktop.6c981f82.svg",height:132,width:1110,blurWidth:0,blurHeight:0},eZ={src:"/kredity/assets/_next/static/media/adv-auto-mobile.07d07b83.svg",height:132,width:343,blurWidth:0,blurHeight:0},eV=l(41172),eH=l.n(eV);let ez=(0,i.memo)(e=>{let{className:t}=e,{mainBaseUrl:l}=(0,eu.ZR)();return(0,a.jsxs)(s(),{href:"".concat(l,"/osago"),target:"_blank",className:(0,w.Z)(eH().wrapper,t),children:[(0,a.jsx)(G(),{className:(0,w.Z)(eH().bg,eH().bgDesktop),src:eW,alt:""}),(0,a.jsx)(G(),{className:(0,w.Z)(eH().bg,eH().bgMobile),src:eZ,alt:""}),(0,a.jsx)(o.zx,{className:eH().button,size:"s",children:"Оформить"})]})});ez.displayName="OsagoAd";var eq=l(65848);let eQ=[],eJ=(e,t)=>{let{amount:l,firstPayment:a,period:n,payment:i,incomeProof:o,vehicleType:r,vehicleState:s,banks:c,insuranceNeed:u,stateCoFinancing:d,notFirstPayment:p}=e,v=[{id:eR.amount,label:"Сумма кредита: ".concat(l?"".concat((0,Z.uf)(l)," ₽"):"не имеет значения")},{id:eR.firstPayment,label:"Первый взнос: ".concat(a?"".concat((0,Z.uf)(a)," ₽"):"не имеет значения")}];if("number"==typeof n){let e=eD.find(e=>e.value===n);void 0!==e&&v.push({id:eR.period,label:0===e.value?"Срок: ".concat(e.label):e.label})}if(void 0!==i&&0!==i&&v.push({id:eR.payment,label:"До ".concat((0,Z.uf)(i)," ₽ в мес")}),void 0!==o&&0!==o.length){let e=eI.filter(e=>o.includes(e.value)),t=1===e.length?e[0].label:"Подтверждение дохода: (".concat(e.length,")");v.push({id:eR.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:eR.vehicleType,label:t})}if(void 0!==s&&0!==s.length){let e=eP.filter(e=>s.includes(e.value)),t=1===e.length?e[0].label:"Состояние транспорта: (".concat(e.length,")");v.push({id:eR.vehicleState,label:t})}if(void 0!==c&&0!==c.length){let e=t.filter(e=>c.includes(+e.value)),l=1===e.length?e[0].label:"Банки: (".concat(e.length,")");v.push({id:eR.bank,label:l})}return(u&&v.push({id:eR.insuranceNeed,label:"Без каско"}),d&&v.push({id:eR.stateCoFinancing,label:"С господдержкой"}),p&&v.push({id:"notFirstPayment",label:"Без первого взноса"}),eQ.length===v.length&&v.every((e,t)=>e.label===eQ[t].label&&e.id===eQ[t].id))?eQ:(eQ=v,v)},eX=e=>e?56:80;var eG=l(71147),eK=l(6252),eY=l(50586),e0=l.n(eY),e1=l(75340),e2=l(29023),e4=l(88060),e3=l(10034),e5=l.n(e3);let e8=e=>{(0,$.D)({eventCategory:k.u.AUTOCREDIT,eventAction:$.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},e6=e=>{let{filter:t,className:l,isMobile:n,bankOptions:o,banks:r,town:s,region:c}=e,u=(0,e1.lJ)(),p=(0,i.useRef)(null),v=(0,i.useRef)(()=>null),[m,_]=(0,i.useState)(!1),[h,b]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),{count:x,totalCount:C,increaseSort:y,sort:j,handleToggleModal:N,setIncreaseSort:T,setSort:A,isPageLoading:S,handleLoadMore:L,autoCredits:R,isLoading:I,amount:D,firstPayment:F,period:M}=t,[P,E]=(0,i.useState)(),O=(0,i.useMemo)(()=>eJ(t,o),[o,t]),U=(0,i.useCallback)(()=>{N()},[N]),B=(0,i.useMemo)(()=>R.map(e=>{let t=ec({banks:r,autoCredit:e}),l={};void 0!==D&&0!==D&&(l.amount=D),void 0!==F&&0!==F&&(l.first_payment=F),void 0!==M&&0!==M&&(l.period=M);let a=(0,eK.R)(l);return Object.keys(l).length&&(t.url="".concat(t.url,"#").concat(a)),t}),[D,R,r,F,M]),W=(0,i.useCallback)(e=>{if(null===e)return;let t=R.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)&&void 0!==l?l:"",logo:e.logo,url:null!==(a=e.url)&&void 0!==a?a:""}}},[R]),Z=(0,i.useCallback)(()=>{E(void 0)},[]),V=(0,i.useCallback)(e=>{var t;E(W(e)),f(null!==(t=null==e?void 0:e.type)&&void 0!==t?t:null),null!==e&&(0,$.D)({eventCategory:k.u.AUTOCREDIT,eventAction:$.i.popup,eventActionText:e.title,eventLabel:e.id})},[W]);(0,i.useEffect)(()=>{window.removeEventListener("scroll",v.current);let e=eX(n);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 H=(null==c?void 0:c.name_p)!==void 0?(null==s?void 0:s.name_p)?"в ".concat(null==s?void 0:s.name_p):"в ".concat(null==c?void 0:c.name_p):null,z=10*t.page<x;return(0,a.jsxs)("section",{className:(0,w.Z)(e5().section,l),children:[(0,a.jsx)(d.t,{children:(0,a.jsxs)("p",{className:e5().title,children:["Найдено ",x," ",(0,a.jsx)("span",{className:e5().titleHide,children:(0,eG.s)(x)})," ",H,x===C||0===x?"":"из ".concat(C)]})}),(0,a.jsx)("div",{ref:p,className:(0,w.Z)(e5().filter,e5().newLayout,{[e5().filterBottom]:m}),children:(0,a.jsx)(eB.p,{chips:O,onChangeIncreaseSort:T,onChangeSortType:A,onClickChip:U,onClickParams:N,sortTypeItems:eU,sortTypeValue:j,isIncreaseSort:y,isMobile:n,isFixed:h})}),(0,a.jsxs)(d.t,{children:[(0,a.jsx)("p",{className:e5().listTitle,ref:u,children:"Предложения рынка кредитов"}),(0,a.jsx)("div",{children:!I&&B.map((e,t)=>(0,a.jsxs)(i.Fragment,{children:[(0,a.jsx)(ea,{onDetailInfoClick:V,className:e5().listItem,data:e,onClick:e8,text:"Подать заявку",detailData:{data:W(e),mainPageUrl:k.u.AUTOCREDIT}},e.url),2===t&&(0,a.jsx)(ez,{className:e5().adv})]},e.id))}),I&&Array.from({length:6},(e,t)=>(0,a.jsx)(eq.O,{className:e5().listItem},t)),z&&(0,a.jsx)(e4.f,{page:t.page,loading:S,onClick:L}),(0,a.jsx)(e2.i,{tag:"p",className:e0().subtitle,children:t.subtitle})]}),(0,a.jsx)(ei.h,{data:P,isOpen:!!P,onClose:Z,mainPageUrl:k.u.AUTOCREDIT,offerType:g})]})};function e7(e){let t=(0,L.b)(e.full_price);return{...e,full_price:t}}async function e9(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:c,insuranceNeed:u,vehicleState:d,vehicleType:p,stateCoFinancing:v,bank:m,sort:_,order:h,payment:b,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!==a&&x.set("region",a),void 0!==n&&x.set("town",n),void 0!==i&&x.set(eR.amount,i),void 0!==o&&x.set(eR.firstPayment,String(o)),void 0!==r&&x.set(eR.period,String(r)),void 0!==s&&x.set(eR.loan,s.join(",")),void 0!==c&&x.set(eR.incomeProof,Array.isArray(c)?c.join(","):c),void 0!==u&&x.set(eR.insuranceNeed,u?"1":"0"),void 0!==d&&x.set(eR.vehicleState,d.join(",")),void 0!==p&&x.set(eR.vehicleType,p.join(",")),void 0!==v&&x.set(eR.stateCoFinancing,v?"1":"0"),void 0!==m&&x.set(eR.bank,m.join(",")),void 0!==_&&x.set(eR.sort,_),void 0!==h&&x.set(eR.order,h),void 0!==b&&x.set(eR.payment,b),void 0!==g&&x.set(eR.page,String(g)),void 0!==f&&x.set(eR.borrower,f.join(",")),x.set("archive","0"),x.toString()}({limit:i,regionUrl:a,tagUrl:l,townUrl:n,...o}),{data:s,error:c}=await (0,eS.D)("/money_data/AutoCredits.json?".concat(r),{signal:t});if(c||null===s)throw Error(null!=c?c:"Ошибка загрузки данных");if(void 0!==o.page&&1!==o.page&&0===s.autoCredits.length)throw new ew.dR("Invalid autocredits page: ".concat(o.page));return{offers:s.autoCredits.map(e7),count:s.autoCredits_count,totalCount:s.autoCredits_total_count,title:s.title,subtitle:s.subtitle,description:s.description}}var te=l(65709),tt=l(32368),tl=l(60007),ta=l(44735);async function tn(){return(await (0,te.$u)("AutoCredits.json?tags&short=1")).autoCredit_tags.reduce((e,t)=>(t.name!==ta.V4&&e.set(t.url,function(e){let{name:t,url:l,url_redirect:a}=e,n={name:t,url:l},i=(0,tl.d)(a);return void 0!==i&&(n.url_redirect=i),n}(t)),e),new Map)}new tt.$(tn),l(51138),l(96202);var ti=l(37171);function to(e){let{banks:t,layout:l,refererTag:n,description:i,offer:o,posts:r,questions:s,offers:c,offersFinuslugi:u,support:d}=e;return(0,a.jsx)(ti.A,{data:l,children:(0,a.jsx)(eA,{offer:o,posts:r,questions:s,description:i,banks:t,refererTag:n,offers:c,offersFinuslugi:u,support:d})})}l(48206);var tr=l(423),ts=l(66535),tc={src:"/kredity/assets/_next/static/media/filter.0c02ec9e.svg",height:16,width:16,blurWidth:0,blurHeight:0},tu=l(65594),td=l.n(tu);let tp=(0,i.memo)(e=>{let{count:t,onClickParams:l,onClickShow:n,isLoading:i,className:r}=e;return(0,a.jsxs)("div",{className:(0,w.Z)(td().buttons,r),children:[(0,a.jsx)(o.zx,{variant:"secondary",pending:i,disabled:i,onClick:e=>l(e),iconLeft:(0,a.jsx)(G(),{src:tc,alt:""}),children:"Все параметры"}),(0,a.jsxs)(o.zx,{pending:i,disabled:i,onClick:n,children:["Показать ",t]})]})});tp.displayName="FilterActions";var tv=l(58484),tm=l(91646),t_=l(98028),th=l(7835),tb=l.n(th);let tg=(0,i.memo)(e=>{let{checkedState:t,onChange:l,className:n}=e;return(0,a.jsxs)("ul",{className:(0,w.Z)(tb().wrapper,n),children:[(0,a.jsxs)("li",{className:tb().item,children:[(0,a.jsx)(o.XZ,{className:tb().checkbox,onChange:()=>l("insuranceNeed",!t.insuranceNeed),checked:t.insuranceNeed,value:t.insuranceNeed,label:"Без каско"}),(0,a.jsx)(t_.J,{content:"По закону, каско покупать необязательно, но такая страховка компенсирует вам ущерб, даже если вы виновны в ДТП. Каско можно включить в стоимость кредита.",children:(0,a.jsx)(t_.L,{className:tb().detailIcon})})]}),(0,a.jsxs)("li",{className:tb().item,children:[(0,a.jsx)(o.XZ,{className:tb().checkbox,onChange:()=>l("stateCoFinancing",!t.stateCoFinancing),checked:t.stateCoFinancing,value:t.stateCoFinancing,label:"С господдержкой"}),(0,a.jsx)(t_.J,{content:"Поддержка, при которой часть средств предоставляет государство. Их можно потратить только на автомобили определенных марок.",children:(0,a.jsx)(t_.L,{className:tb().detailIcon})})]}),(0,a.jsx)("li",{children:(0,a.jsx)(o.XZ,{className:tb().checkbox,onChange:()=>l("notFirstPayment",!t.notFirstPayment),checked:t.notFirstPayment,value:t.notFirstPayment,label:"Без первого взноса"})})]})});tg.displayName="AutoCreditsFilterDops";var tf=l(4645),tx=l.n(tf);let tC=(0,i.memo)(e=>{let{activeIds:t=[],items:l,onChange:n,className:i}=e,r=(e,l)=>{n(l?t.filter(t=>String(e)!==t):[...t,String(e)])};return(0,a.jsx)("div",{className:(0,w.Z)(tx().tagsWrapper,i),children:l.map(e=>{let l=t.some(t=>t===e.value);return(0,a.jsx)(o.zx,{className:tx().tag,variant:l?"primary":"secondary",onClick:()=>r(e.value,l),children:e.labelShort},e.value)})})});tC.displayName="AutoCreditsTags";var ty=l(45117),tj=l(86992),tN=l(30715),tk=l.n(tN);let tT=e=>{(0,K.l)({event:"data-event",eventAction:e,eventCategory:k.u.AUTOCREDIT})},tA=e=>{var t;let l=null!==(t=e.currentTarget.textContent)&&void 0!==t?t:"";tT("click_button_".concat((0,Y.b)(l)))},tS=e=>{let{region:t,town:l,className:n,tag:o,isMobile:r,filter:s,subtitle:c,adFoxConfig:u}=e,{scrollSmooth:d}=(0,e1.vO)(),{count:p,isLoading:v,amount:m,firstPayment:_,vehicleType:h,setVehicleType:b,insuranceNeed:g,stateCoFinancing:f,notFirstPayment:x,setInsuranceNeed:C,setStateCoFinancing:y,setNotFirstPayment:j,handleToggleModal:N,firstPaymentPercent:T,handleChangeFirstPayment:A,handleChangeAmount:S}=s,L=(0,i.useCallback)(e=>{tA(e),N()},[N]),R=(0,i.useCallback)(e=>{tA(e),d({offset:-90})},[d]),I=(0,i.useMemo)(()=>({insuranceNeed:g,stateCoFinancing:f,notFirstPayment:x}),[g,x,f]),D=(0,i.useCallback)((e,t)=>{switch(e){case"insuranceNeed":C(t);break;case"notFirstPayment":j(t),A(t?0:void 0);break;case"stateCoFinancing":y(t)}},[A,C,j,y]);return(0,a.jsxs)("div",{className:(0,w.Z)(n),children:[(0,a.jsxs)("div",{className:tk().pageHeadingWrap,children:[(0,a.jsx)(tv.V,{region:t,town:l,title:o&&"DEFAULT"!==o.tag_name?null==o?void 0:o.name:"Автокредиты",subtitle:c,mainPageUrl:k.u.AUTOCREDIT}),(0,a.jsx)("div",{className:tk().banner,children:(0,a.jsx)(tm.Z,{config:u,params:ty.P3})})]}),(0,a.jsxs)(ts.W2,{className:tk().container,children:[(0,a.jsxs)("div",{className:tk().filter,children:[(0,a.jsxs)("div",{className:tk().fields,children:[(0,a.jsx)(tj.P,{className:tk().field,label:"Сумма кредита",value:m,onChange:S}),(0,a.jsx)(tj.P,{className:tk().field,label:"Первый взнос",value:_,rightLabel:"".concat(T,"%").replace(".",","),caption:T>100?e$:void 0,state:T>100?"error":void 0,onChange:A})]}),!r&&(0,a.jsx)(tp,{count:p,onClickParams:L,onClickShow:R,isLoading:v})]}),(0,a.jsx)(tC,{className:tk().tagsWrapper,items:eM,activeIds:h,onChange:b}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:tk().dopsTitle,children:"Дополнительно"}),(0,a.jsx)(tg,{className:tk().dops,onChange:D,checkedState:I})]}),r&&(0,a.jsx)(tp,{count:p,onClickParams:L,onClickShow:R,isLoading:v})]})]})};var tw=l(7766);let tL=(e,t)=>{(0,K.l)({event:"data-event",eventAction:k.u.AUTOCREDIT,eventCategory:"filter_catalog",eventLabel:(0,Y.b)(e),eventValue:t})},tR=(e,t)=>{tL(e,(null!=t?t:[]).map(e=>e.label).join(","))};var tI=l(10622),tD=l.n(tI);let tF=e=>{let{filter:t,isMobile:l,bankOptions:n}=e,{handleToggleModal:r,resetFilter:s,amount:c,firstPayment:u,setPeriod:d,period:p,payment:m,incomeProof:_,setIncomeProof:h,vehicleType:b,setVehicleType:g,vehicleState:f,setVehicleState:x,borrower:C,setBorrower:y,loan:j,setLoan:N,banks:T,setBank:A,isLoading:S,insuranceNeed:L,stateCoFinancing:R,setInsuranceNeed:I,setStateCoFinancing:D,setSort:F,sort:M,notFirstPayment:P,setNotFirstPayment:E,firstPaymentPercent:O,handleChangeAmount:U,handleChangeFirstPayment:$,handleChangePayment:B}=t,W=(0,i.useMemo)(()=>eD.find(e=>e.value===p),[p]),Z=(0,i.useMemo)(()=>eI.filter(e=>null==_?void 0:_.includes(e.value)),[_]),H=(0,i.useMemo)(()=>eF.filter(e=>null==b?void 0:b.includes(e.value)),[b]),z=(0,i.useMemo)(()=>eP.filter(e=>null==f?void 0:f.includes(e.value)),[f]),q=(0,i.useMemo)(()=>eE.filter(e=>null==C?void 0:C.includes(e.value)),[C]),Q=(0,i.useMemo)(()=>eO.filter(e=>null==j?void 0:j.includes(e.value)),[j]),J=(0,i.useMemo)(()=>n.filter(e=>null==T?void 0:T.includes(Number(e.value))),[n,T]),X=(0,i.useCallback)(()=>{r(),(0,V.l)(v.Tm,{offset:l?0:-140,position:"top"})},[r,l]),{handleChangePeriod:G,handleChangeIncomeProf:K,handleChangeVehicleType:Y,handleChangeVehicleState:ee,handleChangeBorrower:et,handleChangeLoan:el,handleChangeBanks:ea}=(0,i.useMemo)(()=>({handleChangePeriod:e=>{d(null==e?void 0:e.value),tR("Срок",eD)},handleChangeIncomeProf:e=>{var t;h(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Подтверждение дохода",e)},handleChangeVehicleType:e=>{var t;g(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Тип транспорта",e)},handleChangeVehicleState:e=>{var t;x(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Состояние транспорта",e)},handleChangeBorrower:e=>{var t;y(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Категория заемщикаа",e)},handleChangeLoan:e=>{var t;N(null!==(t=null==e?void 0:e.map(e=>String(e.value)))&&void 0!==t?t:[]),tR("Обеспечение",e)},handleChangeBanks:e=>{var t;A(null!==(t=null==e?void 0:e.map(e=>Number(e.value)))&&void 0!==t?t:[]),tR("Банки",e)}}),[A,y,h,N,d,x,g]),en=(0,i.useMemo)(()=>({insuranceNeed:L,stateCoFinancing:R,notFirstPayment:P}),[L,P,R]),ei=(0,i.useCallback)((e,t)=>{switch(e){case"insuranceNeed":I(t);break;case"notFirstPayment":E(t);break;case"stateCoFinancing":D(t)}},[I,E,D]);return(0,a.jsx)(tw.D,{count:t.count,isMobile:l,isOpen:t.isOpenModal,pageUrl:k.u.AUTOCREDIT,title:"Все параметры",onCLickShow:X,onClose:r,onClickReset:s,isLoading:S,children:(0,a.jsxs)("div",{className:tD().wrapper,children:[(0,a.jsxs)("div",{className:tD().fields,children:[(0,a.jsx)(tj.P,{className:tD().field,label:"Сумма кредита",value:c,onChange:U}),(0,a.jsx)(tj.P,{label:"Первый взнос",value:u,rightLabel:"".concat(O,"%").replace(".",","),caption:O>100?e$:void 0,state:O>100?"error":void 0,onChange:$}),(0,a.jsx)(o.Ph,{value:W,onChange:G,label:"Срок",optionValue:"value",optionLabel:"label",options:eD}),(0,a.jsx)(tj.P,{label:"Ежемесячный платеж до",value:m,onChange:B}),(0,a.jsx)(o.Ph,{value:Z.length>0?Z:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,onChange:K,multiple:!0,label:"Подтверждение дохода",optionValue:"value",optionLabel:"label",options:eI}),(0,a.jsx)(o.Ph,{value:H.length>0?H:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:Y,optionValue:"value",optionLabel:"label",label:"Тип транспорта",options:eF}),(0,a.jsx)(o.Ph,{value:z.length>0?z:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,onChange:ee,optionValue:"value",optionLabel:"label",label:"Состояние транспорта",options:eP}),(0,a.jsx)(o.Ph,{value:q.length>0?q: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.Ph,{value:Q.length>0?Q:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,multiple:!0,optionValue:"value",optionLabel:"label",onChange:el,label:"Обеспечение",options:eO}),(0,a.jsx)(o.Ph,{value:J.length>0?J: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:tD().checkboxWrapper,children:[(0,a.jsx)("p",{className:tD().title,children:"Дополнительно:"}),(0,a.jsx)(tg,{className:tD().dops,checkedState:en,onChange:ei}),(0,a.jsx)("p",{className:(0,w.Z)(tD().title,tD().titleSort),children:"Сортировать"}),eU.map(e=>(0,a.jsx)(o.Y8,{label:e.label,name:e.value,value:e.value,checked:e.value===M,onChange:()=>F(e.value)},e.value))]})]})})};async function tM(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,eS.D)("/money_data/AutoCreditRegion.json?".concat(a));if(i||null===n)throw Error(null!=i?i:"Ошибка загрузки данных");return{...n,posts:(0,eL.yb)(n.posts)}}var tP=l(91886);async function tE(e){let t=await (0,te.$u)("AutoCredits.json?".concat("url","=").concat(encodeURIComponent(e)));if(1!==t.length)throw new ew.dR("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 tt.n(tE);let tO=(e,t)=>{var l,a,n,i,o,r,s;let c=(0,eh.p)(e),{page:u}=c,d=String(null!==(a=null!==(l=c.amount)&&void 0!==l?l:null==t?void 0:t.filter.amount)&&void 0!==a?a:""),p=String(null!==(i=null!==(n=c.first_payment)&&void 0!==n?n:null==t?void 0:t.filter.first_payment)&&void 0!==i?i:""),v=String(null!==(r=null!==(o=c.period)&&void 0!==o?o:null==t?void 0:t.filter.period)&&void 0!==r?r:""),m=String(null!==(s=c.payment)&&void 0!==s?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(u)||1}},tU=(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 tB=e=>{var t,l,a,n;let{region:o,tag:r,town:s,init:c}=e,{asPath:u}=(0,e_.useRouter)(),d=(0,i.useMemo)(()=>tO(u,r),[u,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=tU(null!=v?v:0,null!=_?_:0),x=v&&v>0?(0,B.z)(null!=f?f:0,1):0,{query:C}=(0,e_.useRouter)(),[y,j]=(0,i.useState)(Number(C.page)||1),[N,k]=(0,i.useState)(c.title),[T,A]=(0,i.useState)(c.subtitle),[S,w]=(0,i.useState)(c.description),[L,R]=(0,i.useState)(!1),[I,D]=(0,i.useState)(!1),[F,M]=(0,i.useState)(null!==(t=c.count)&&void 0!==t?t:0),[P,E]=(0,i.useState)(null!==(l=c.count)&&void 0!==l?l:0),[O,U]=(0,i.useState)(!1),[$,W]=(0,i.useState)(null!==(a=c.list)&&void 0!==a?a:[]),[Z,V]=(0,i.useState)(d.period),[H,z]=(0,i.useState)(d.vehicleType),[q,Q]=(0,i.useState)(d.vehicleState),[J,X]=(0,i.useState)(d.borrower),[G,K]=(0,i.useState)(d.loan),[Y,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),[ec,eu]=(0,i.useState)(null!==(n=null==r?void 0:r.filter.proof_income)&&void 0!==n?n:void 0),[ed,ep]=(0,i.useState)(!1),ev=(0,i.useRef)(!0),em=(0,i.useCallback)(()=>{U(e=>!e)},[]),eh=(0,i.useCallback)(async e=>{var t,l,a,n,i,c;p.current&&p.current.abort(),p.current=new AbortController;let u={amount:void 0!==v?String(v):"",firstPayment:void 0!==v?f:void 0,period:Z,loan:G,incomeProof:ec,insuranceNeed:et,stateCoFinancing:ea,vehicleState:q,vehicleType:H,bank:Y,order:ed?"desc":"asc",sort:ei,payment:void 0!==b?String(b):void 0,borrower:J};e>1?(u.page=e,D(!0)):R(!0);let d=await e9({tagUrl:null==r?void 0:r.url,regionUrl:null==o?void 0:o.url,townUrl:null==s?void 0:s.url,...u},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:"",h=null!==(a=null==d?void 0:d.subtitle)&&void 0!==a?a:"",g=null!==(n=null==d?void 0:d.description)&&void 0!==n?n:"";M(null!==(i=null==d?void 0:d.count)&&void 0!==i?i:0),E(null!==(c=null==d?void 0:d.totalCount)&&void 0!==c?c:0),k(_),A(h),w(g),W(t=>e>1?[...t,...m]:m),D(!1),R(!1)},[v,Y,J,f,ec,ed,et,G,b,Z,o,ei,ea,r,s,q,H]),eb=(0,i.useCallback)(()=>{j(e=>{let t=e+1;return eh(t),t})},[eh]),eg=(0,i.useCallback)(e=>{m(void 0!==e&&0!==e?Math.abs(e):void 0)},[]),ef=(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)(()=>{eg(void 0!==d.amount?Number(d.amount):void 0),ef(void 0!==d.firstPayment?Number(d.firstPayment):void 0),ex(void 0!==d.payment?Number(d.payment):void 0),z(d.vehicleType),Q(d.vehicleState),V(d.period),X(d.borrower),K(d.loan),el(d.insuranceNeed),en(d.stateCoFinancing),eu(d.incomeProof)},[d.amount,d.borrower,d.firstPayment,d.incomeProof,d.insuranceNeed,d.loan,d.payment,d.period,d.stateCoFinancing,d.vehicleState,d.vehicleType,eg,ef,ex,r]),(0,i.useEffect)(()=>{es(0===_)},[_]);let eC=(0,i.useCallback)(()=>{m(void 0),h(void 0),g(void 0),V(void 0),W([]),z(void 0),Q(void 0),X(void 0),K(void 0),ee([]),el(void 0),en(void 0),eu(void 0),ep(!1)},[]);return(0,t$.b)(()=>{ev.current?ev.current=!1:eh(y)},[eh],300),{isLoading:L,isPageLoading:I,title:N,subtitle:T,description:S,handleLoadMore:eb,autoCredits:$,count:F,totalCount:P,page:y,period:Z,setPeriod:V,amount:v,firstPayment:_,isOpenModal:O,setIsOpenModal:U,vehicleType:H,setVehicleType:z,insuranceNeed:et,stateCoFinancing:ea,setInsuranceNeed:el,setStateCoFinancing:en,handleToggleModal:em,resetFilter:eC,payment:b,incomeProof:ec,setIncomeProof:eu,vehicleState:q,setVehicleState:Q,borrower:J,setBorrower:X,loan:G,setLoan:K,banks:Y,setBank:ee,sort:ei,setSort:eo,increaseSort:ed,setIncreaseSort:ep,notFirstPayment:er,setNotFirstPayment:es,firstPaymentPercent:x,handleChangeFirstPayment:ef,handleChangeAmount:eg,handleChangePayment:ex}};var tW=l(61929),tZ=l(77624),tV=l(93259),tH=l(42968),tz=l(23259),tq=l(30942),tQ=l(93890),tJ=l(12261),tX=l(27480),tG=l(30975),tK=l(38090),tY=l(78575),t0=l(91500),t1=l(97647),t2=l.n(t1);let t4=e=>{var t;let l=(null==e?void 0:null===(t=e.currentTarget)||void 0===t?void 0:t.textContent)?(0,Y.b)(e.currentTarget.textContent):"glavnaya";(0,K.l)({event:"data-event",eventAction:"click_link_".concat(l),eventCategory:k.u.AUTOCREDIT})},t3=[(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)],t5=e=>{var t,l,n,r,c;let{offers:p,count:v,tag:m,tags:_,townDublicates:h,posts:b,regions:g,banks:f,title:x,subtitle:C,description:y,expertQuote:j,support:N}=e,T=(0,ef.S0)(),{region:A,town:S}=(0,ed.T)(),[L,R]=(0,i.useState)(j),{asPath:I}=(0,e_.useRouter)(),D=null!==(l=null===(t=I.split("/").find(e=>e.includes("teg_")))||void 0===t?void 0:t.slice(4))&&void 0!==l?l:"DEFAULT",F=function(e,t){let[l,a]=(0,i.useState)(e);return(0,tP.rf)(()=>{(0,te.m6)("autocredits/tag?".concat("url","=").concat(t)).then(a)},[a,t]),l}(m,D),M=function(e,t,l,a){let[n,o]=(0,i.useState)(e);return(0,tP.rf)(()=>{tM(t,l,a).then(e=>{let{posts:t}=e;return o(t)})},[t,l,a]),n}(b,D,null==A?void 0:A.url,null==S?void 0:S.url),P=tB({region:A,town:S,tag:F,init:{count:v,list:p,subtitle:C,title:x,description:y}}),E=(0,tJ.iN)(I);(0,tP.rf)(()=>{(0,tK.r5)(E).then(R)},[E]);let O=(0,tz.I)(),U=(0,tq.U)(),$=(0,i.useMemo)(()=>(0,tZ.n)(f,P.banks),[f,P.banks]),{mainBaseUrl:B}=(0,eu.ZR)(),W=(0,i.useMemo)(()=>{var e;let{autoCredits:t}=P,{lowPrice:l,highPrice:a}=t.reduce((e,t)=>{let{amount:l}=t,a=""!==l.from?Number(l.from):1e4,n=void 0!==l.to&&""!==l.to?Number(l.to):void 0;return e.lowPrice=Math.min(e.lowPrice,a),void 0!==n&&(e.highPrice=Math.max(e.highPrice,n)),e},{lowPrice:1/0,highPrice:0}),n=null!==(e=P.description)&&void 0!==e?e:"",i='"offers":{"@type":"AggregateOffer","url":"'.concat(B).concat(I,'","priceCurrency":"').concat("RUB",'","lowPrice":"').concat((0,Z.uf)(l),'","highPrice":"').concat((0,Z.uf)(a),'"}');return'{"@context":"https://schema.org","@type":"Product","name":"'.concat(P.title,'","image":"').concat(B).concat(tr.oQ,'","description":"').concat(n,'",').concat(i,"}")},[P,B,I]),V=F&&"DEFAULT"!==F.tag_name?null==F?void 0:F.name:"Автокредиты",H=(null==S?void 0:S.name_p)||(null==A?void 0:A.name_p)?" в ".concat((null==S?void 0:S.name_p)||(null==A?void 0:A.name_p)):"",z="".concat((null==A?void 0:A.url)?"/reg_".concat(null==A?void 0:A.url):"").concat((null==S?void 0:S.url)?"/".concat(null==S?void 0:S.url):""),q=(()=>{let e=F&&"DEFAULT"!==F.tag_name?',{"@type":"ListItem","position":3,"name":"&#128181 '.concat(V).concat(H,'","item":"').concat(B).concat(I,'"}'):"",t='{"@type":"ListItem","position":1,"name":"Финуслуги","item":"'.concat(B,'"}'),l='{"@type":"ListItem","position":2,"name":"Автокредиты'.concat(H,'","item":"').concat(B,"/").concat(k.u.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,t0.a)(k.u.AUTOCREDIT,g,F,A,S,{nominativeCase:"Автокредиты",genitiveCase:"автокредитов"}));let t=_.reduce((e,t)=>{if(void 0===t.url_redirect){let l=(0,tH.h)(k.u.AUTOCREDIT,t,A,S),a=(0,tQ.q9)(l,t.name);e.push(a)}return e},[]);if(e.push({title:"Виды автокредитов",text:(0,a.jsx)(tQ.oP,{children:t})}),A){var l,n;e.push(...null!==(n=null===(l=F.region_page)||void 0===l?void 0:l.town_content.map(e=>({title:(0,tV.Q)(e.title,A,S,h,void 0,F),text:(0,tV.Q)(e.content.map(tW.Rp).join(""),A,S,h,void 0,F)})))&&void 0!==n?n:[])}else e.push(...F.text.map(e=>({title:(0,tV.Q)(e.title,A,S,h,void 0,F),text:(0,tV.Q)(e.content.map(tW.Rp).join(""),A,S,h,void 0,F)})));return e},[A,_,g,F,S,h]);return(0,a.jsxs)("main",{className:t2().page,children:[(0,a.jsx)(u.N,{title:null!==(n=P.title)&&void 0!==n?n:"",description:null!==(r=P.description)&&void 0!==r?r:""}),(0,a.jsx)(eC.o,{}),(0,a.jsx)("div",{className:(0,w.Z)(t2().background,"bg-".concat(U))}),(0,a.jsx)("div",{className:t2().navigationWrapper,children:(0,a.jsxs)(d.t,{children:[(0,a.jsx)(o.Oo,{className:t2().breadcrumbs,items:(()=>{let e=[{label:"Главная",href:"/"},{label:"Автокредиты".concat(H),href:"/".concat(k.u.AUTOCREDIT).concat(z)}];return"DEFAULT"!==D&&e.push({label:"".concat(V).concat(H),href:"/".concat(k.u.AUTOCREDIT,"/teg_").concat(D).concat(z)}),e.pop(),e.push({label:"".concat(V).concat((null==F?void 0:F.default)?H:"")}),e})(),onClick:t4}),(0,a.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:q}})]})}),(0,a.jsx)(d.t,{children:(0,a.jsx)(tS,{region:null!=A?A:null,town:null!=S?S:null,isMobile:T,tag:F,filter:P,subtitle:null!==(c=P.subtitle)&&void 0!==c?c:"",adFoxConfig:O})}),(0,a.jsx)(e6,{banks:f,bankOptions:$,filter:P,isMobile:T,town:S,region:A}),(0,a.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:W}}),(0,a.jsx)(tX.C,{steps:t3,variant:"secondary"}),void 0!==L&&(0,a.jsx)(tY.c,{quote:L}),(0,a.jsx)(tG.n,{type:"bank"}),(0,a.jsx)(eN.B,{isAllExpanded:!0,faqBlockTitle:"",Link:e=>(0,a.jsx)(s(),{...e}),dataLayerPush:K.l,questions:Q,eventCategory:"cards_support_block",href:"".concat(B,"/help"),checkAllText:"Читать все вопросы про автокредиты"}),(0,a.jsx)(tF,{bankOptions:$,isMobile:T,filter:P}),M.length>0&&(0,a.jsx)(ey.t,{posts:M,eventCategory:k.u.AUTOCREDIT}),(0,a.jsx)(ej.B,{value:N})]})};function t8(e){let{layout:t,root:l,banks:n,offers:i,posts:o,tags:r,tag:s,expertQuote:c,support:u}=e;return(0,a.jsx)(ti.A,{data:t,withLocationConfirm:!0,children:(0,a.jsx)(t5,{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!=c?c:void 0,support:u})})}l(35388),l(45522);var t6=l(28254),t7=l(80330),t9=!0,le=(0,i.memo)(function(e){var t,l;return(0,a.jsx)(n.sM,{children:e.isShowcase?(0,a.jsx)(t6.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)(t8,{...e})}):(0,a.jsx)(t7.M,{children:(0,a.jsx)(to,{...e})})})})},73654:function(e){e.exports={logo:"AutoCreditListItem_logo__KzLbz",placeholderLogo:"AutoCreditListItem_placeholderLogo__9xMXP"}},65594:function(e){e.exports={buttons:"FilterActions_buttons__M1NwR"}},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",field:"AutoCreditsFilter_field__YsbeF",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"}},83343:function(e,t,l){"use strict";l.d(t,{c:function(){return c}});var a=l(85893),n=l(66535),i=l(86010),o=l(67294);let r=(0,l(84941).g)("expert-quote","sc"),s=Object.freeze({expertQuote:r,wrapper:`${r}__wrapper`,title:`${r}__title`,card:`${r}__card`,content:`${r}__content`,aboutText:`${r}__aboutText`,about:`${r}__about`,img:`${r}__img`,name:`${r}__name`,position:`${r}__position`,text:`${r}__text`}),c=(0,o.memo)(({className:e,quote:t})=>(0,a.jsx)("section",{className:(0,i.Z)(s.wrapper,e),children:(0,a.jsxs)(n.W2,{children:[(0,a.jsx)(n.X6,{as:"h2",type:"display",weight:"bold",className:(0,i.Z)(s.title,"mb-6"),children:"Мнение эксперта"}),(0,a.jsx)("div",{className:s.card,children:(0,a.jsxs)("div",{className:s.content,children:[(0,a.jsxs)("div",{className:s.about,children:[t.expert.photo&&(0,a.jsx)("a",{href:t.expert.url,children:(0,a.jsx)("div",{className:s.img,style:{backgroundImage:`url(${t.expert.photo})`}})}),(0,a.jsxs)("div",{className:s.aboutText,children:[(0,a.jsx)("a",{href:t.expert.url,className:s.name,children:t.expert.name}),(0,a.jsx)("p",{className:s.position,children:t.expert.position})]})]}),(0,a.jsx)("p",{className:s.text,dangerouslySetInnerHTML:{__html:t.content}})]})})]})}));c.displayName="ExpertQuote"},29329:function(e,t,l){"use strict";l.d(t,{t:function(){return N}});var a=l(85893),n=l(66535),i=l(34588),o=l(86010),r=l(67294),s=l(43803),c=l(81069),u=l(59194),d=l(84941);let p=(0,d.g)("check-all","sc"),v=Object.freeze({wrapper:`${p}__wrapper`,link:`${p}__link`,icon:`${p}__icon`,iconGray:`${p}__icon--gray`}),m=({children:e,className:t,linkClassName:l,iconGrayBackground:n,Link:r,event:s,href:c,dataLayerPush:d})=>{let p=r??i.rU;return(0,a.jsx)("div",{className:(0,o.Z)(v.wrapper,t),onClick:()=>{s&&d(s)},children:(0,a.jsxs)(p,{className:(0,o.Z)(v.link,l),href:c,children:[e,(0,a.jsx)("span",{className:(0,o.Z)(v.icon,{[v.iconGray]:n}),children:(0,a.jsx)(u.IconFdsArrowUpRightSmallO,{size:24})})]})})},_=e=>{if(!e||!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e))return"";let t=new Date(e.replace(" ","T"));if(isNaN(t.getTime()))return"";let l=t.getDate(),a=t.getMonth();return`${l} ${["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"][a]}`},h=e=>!!e&&/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e),b=(0,d.g)("subscribe-block","sc"),g=Object.freeze({block:`${b}__block`,title:`${b}__title`,form:`${b}__form`,input:`${b}__input`,button:`${b}__button`,checkbox:`${b}__checkbox`,checkboxLabel:`${b}__checkbox-label`,success:`${b}__success`,error:`${b}__error`}),f=({data:e,eventCategory:t})=>{var l,n,c,u;let[d,p]=(0,r.useState)(!1),[v,m]=(0,r.useState)(!1),[_,b]=(0,r.useState)(""),[f,x]=(0,r.useState)(""),[C,y]=(0,r.useState)(!1),[j,N]=(0,r.useState)(!1),[k,T]=(0,r.useState)(!1),A=(null==e?void 0:e.title)||"Подписка на рассылку",S=(null==(l=null==e?void 0:e.params)?void 0:l.inputPlaceholder)||"Электронная почта",w=!v&&!_;return(0,a.jsxs)("div",{className:(0,o.Z)(g.block),children:[(0,a.jsx)("div",{className:g.title,children:A}),w&&(0,a.jsxs)("div",{className:g.form,children:[(0,a.jsx)(i.MA,{className:g.input,label:S,variant:"secondary",size:"s",value:f,onChange:e=>{C&&y(!(h(e)||!e)),x(e)},onClick:()=>{(0,s.h)({eventCategory:t,eventActionType:s.D.block,eventActionText:S})},state:C?"error":void 0,caption:C?"Неверный e-mail":void 0}),(0,a.jsx)(i.zx,{className:g.button,label:(null==(n=null==e?void 0:e.buttons)?void 0:n.tile)||"Подписаться",style:{background:null==(c=null==e?void 0:e.buttons)?void 0:c.background},size:"xs",onClick:()=>{var l;(0,s.h)({eventCategory:t,eventActionType:s.D.button,eventActionText:(null==(l=null==e?void 0:e.buttons)?void 0:l.tile)||"Подписаться"}),y(!h(f)),T(!j),h(f)&&j&&(p(!0),fetch("https://forms.dashamail.ru/subscribe.php?list_id=56713Embedded",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({merge_:f})}).then(e=>{!e||200===e.status||e.ok?(window.localStorage.setItem("subscribed","1"),m(!0)):b(409===e.status?'Кажется, вы уже подписаны на нашу рассылку. Если письма не приходят, рекомендуем обратиться в поддержу по телефону <span class="nowrap">8\xa0800\xa0505-32-32</span>.':401===e.status?"Неверный формат e-mail адреса":"Возникла ошибка, повторите попытку позднее")}).catch(()=>b("Возникла ошибка, повторите попытку позднее")))},disabled:C,pending:d}),(0,a.jsx)(i.XZ,{className:g.checkbox,checked:j,onChange:e=>{(0,s.d)({eventCategory:t,eventAction:"click_check_box_soglashenie_blok_check_box_soglashenie"}),k&&T(!1),N(e)},state:k?"error":"default",children:(0,a.jsx)("span",{className:g.checkboxLabel,dangerouslySetInnerHTML:{__html:(null==(u=null==e?void 0:e.params)?void 0:u.agreement)||'Я принимаю <a href="https://assets.finuslugi.ru/mp-assets/privacy-policy.pdf">условия политики</a> обработки моих данных и даю <a href="https://assets.finuslugi.ru/mp-assets/privacy-policy.pdf">согласие</a> ПАО Московская биржа на их обработку'},onClick:e=>{let l=e.target;if(!(null!=l&&l.href))return;let a=l.textContent||"";a.includes("условия")&&(a="politiki_obrabotki_personalnyh_dannyh_pao_moskovskaya_birzha"),a.includes("согласие")&&(a="dayu_soglasie_na_obrabotku_pao_moskovskaya_birzha_moih_personalnyh_dannyh"),(0,s.h)({eventCategory:t,eventActionType:s.D.link,eventActionText:a,eventLabel:l.href})}})})]}),v&&(0,a.jsx)("div",{className:g.success,children:"Подтвердите подписку по ссылке, отправленной на указанную электронную почту."}),_&&(0,a.jsx)("div",{className:g.error,dangerouslySetInnerHTML:{__html:_}})]})},x=(0,d.g)("journal","sc"),C=Object.freeze({wrapper:`${x}__wrapper`,title:`${x}__title`,subtitle:`${x}__subtitle`,scrollableWrapper:`${x}__scrollable-wrapper`,chipsWrapper:`${x}__chips-wrapper`,sliderWrapper:`${x}__slider-wrapper`,slider:`${x}__slider`,sliderItem:`${x}__slider-item`,fixed:`${x}__slider-item--fixed`,article:`${x}__article`,imgWrapper:`${x}__img-wrapper`,articleBody:`${x}__article-body`,articleTitle:`${x}__article-title`,articleDate:`${x}__article-date`,checkAllLink:`${x}__check-all-link`}),y="finkit-widgets-sc-journal",j="https://assets.finuslugi.ru/mp-assets/pl-common-blocks-renderer/journal/default_post_image.png",N=({data:e,eventCategory:t=y,className:l})=>{var u;let d=(0,i._m)("xl"),[p,v]=(0,r.useState)(!0),[h,b]=(0,r.useState)(0),g=e.chips||[],x=(null==(u=null==g?void 0:g[Number(h)])?void 0:u.items)||[];if((0,r.useEffect)(()=>{v(!d)},[d]),0===g.length||0===x.length)return null;let N=(e,l)=>()=>{(0,s.h)({eventCategory:t,eventActionType:s.D.block,eventActionText:e||"",eventLabel:l})},k=e=>{e.target.src!==j&&(e.target.src=j)};return(0,a.jsxs)("div",{className:(0,o.Z)(C.wrapper,l),children:[(0,a.jsxs)(n.W2,{children:[(0,a.jsx)("h2",{className:C.title,children:null==e?void 0:e.title}),(0,a.jsx)("div",{className:C.subtitle,children:null==e?void 0:e.description})]}),(0,a.jsx)("div",{className:C.scrollableWrapper,children:(0,a.jsx)(n.W2,{children:(0,a.jsx)("div",{className:C.chipsWrapper,children:g.length>1&&(0,a.jsx)(i.cL,{chips:g,value:h,variant:"secondary",size:p?"m":"l",onChipClick:e=>{var l;let a=(null==(l=g[Number(e)])?void 0:l.label)||"";(0,s.h)({eventCategory:t,eventActionType:s.D.tab,eventActionText:a}),b(e)}})})})}),(0,a.jsxs)(n.W2,{children:[e.subscribeBlock&&(0,a.jsx)("div",{className:C.sliderWrapper,children:(0,a.jsx)(i.wI,{className:(0,o.Z)(C.sliderItem,C.fixed),children:(0,a.jsx)("div",{className:C.article,children:(0,a.jsx)(f,{data:e.subscribeBlock,eventCategory:t})})})}),(0,a.jsxs)(i.iR,{className:C.slider,options:{slidesPerView:"auto",spaceBetween:0,autoplay:{delay:3500,disableOnInteraction:!0},loop:!0},pagination:!0,navigation:!0,navigationVariant:"secondary",navigationSize:"s",children:[x.map(e=>(0,a.jsx)(i.wI,{className:C.sliderItem,children:(0,a.jsxs)("a",{className:C.article,href:e.url,onClick:N(e.title,e.url),children:[(0,a.jsx)("div",{className:C.imgWrapper,children:(0,a.jsx)("img",{src:e.img,alt:`изображение: ${e.title}`,onError:k})}),(0,a.jsxs)("div",{className:C.articleBody,children:[(0,a.jsx)("div",{className:C.articleTitle,children:e.title}),(0,a.jsx)("div",{className:C.articleDate,children:_(e.dt)})]})]})},e.title)),e.subscribeBlock&&p&&(0,a.jsx)(i.wI,{className:C.sliderItem,children:(0,a.jsx)("div",{className:C.article,children:(0,a.jsx)(f,{data:e.subscribeBlock,eventCategory:t})})})]},h),(0,a.jsx)(m,{href:(null==e?void 0:e.url)||"",event:{event:"data-event",eventCategory:t,eventAction:`link_${(0,c.t)((null==e?void 0:e.urlText)||"Показать все статьи")}`,eventLabel:(null==e?void 0:e.url)||""},dataLayerPush:s.d,className:C.checkAllLink,children:(null==e?void 0:e.urlText)||"Показать все статьи"})]})]})}},6024:function(e,t,l){"use strict";l.d(t,{B:function(){return x}});var a=l(85893),n=l(66535),i=l(86010),o=l(59194),r=l(34588),s=l(43803),c=l(84941),u=l(67294);let d=(0,c.g)("support","sc"),p=Object.freeze({support:d,title:`${d}__title`,cardsContainer:`${d}__cards-container`}),v="cb-support",m=(0,c.g)("support-app-card","sc"),_=Object.freeze({supportAppCard:m,textWrapper:`${m}__text-wrapper`,imageContainer:`${m}__image-container`,title:`${m}__title`,description:`${m}__description`,icon:`${m}__icon`,imageWrapper:`${m}__image-wrapper`,image:`${m}__image`}),h=({title:e,linkUrl:t,s3Assets:l,description:n})=>{let i=(0,r.aF)("s");return(0,a.jsxs)("div",{className:_.supportAppCard,onClick:()=>{i&&((0,s.h)({eventCategory:v,eventActionType:s.D.banner,eventActionText:e,eventLabel:t}),window.open(t,"_blank","noreferrer"))},children:[(0,a.jsx)(o.IconFdsArrowUpRightSmallO,{className:_.icon,size:32}),(0,a.jsxs)("div",{className:_.textWrapper,children:[(0,a.jsx)("div",{className:_.title,children:e}),!!n&&(0,a.jsx)("div",{className:_.description,children:n})]}),(0,a.jsx)("div",{className:_.imageContainer,children:(0,a.jsxs)("picture",{className:_.imageWrapper,children:[(0,a.jsx)("source",{media:"(max-width: 767px)",srcSet:`${l}/mp-assets/widgets/SupportBlock/mobile-app.png 1x, ${l}/mp-assets/widgets/SupportBlock/mobile-app@2x.png 2x`}),(0,a.jsx)("img",{className:_.image,loading:"lazy",src:`${l}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg`,srcSet:`${l}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg 1x, ${l}/mp-assets/widgets/SupportBlock/qr-code-mobile-app@2x.jpg 2x`})]})})]})},b=(0,c.g)("support-phone-card","sc"),g=Object.freeze({supportPhoneCard:b,contacts:`${b}__contacts`,phone:`${b}__phone`,chat:`${b}__chat`,info:`${b}__info`,image:`${b}__image`}),f=({phones:e,description:t,s3Assets:l})=>{let n=(0,u.useCallback)(()=>{var e,t,l;null==(l=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)||l.call(t),(0,s.h)({eventCategory:v,eventActionType:s.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),i=e=>{let t=e.replace(/[\s-]/g,"");(0,s.h)({eventCategory:v,eventActionType:s.D.link,eventActionText:"phone",eventLabel:t})};return(0,a.jsxs)("div",{className:g.supportPhoneCard,children:[(0,a.jsxs)("div",{className:g.contacts,children:[e.map(e=>(0,a.jsx)("a",{className:g.phone,href:e.href,onClick:()=>i(e.label),children:e.label},e.label)),(0,a.jsx)("span",{className:g.chat,onClick:n,children:"Онлайн чат"})]}),(0,a.jsx)("div",{className:g.info,children:t}),(0,a.jsx)("img",{className:g.image,src:`${l}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},x=({className:e,phoneCard:t,appCard:l,s3Assets:o})=>(0,a.jsx)("section",{className:(0,i.Z)(p.support,e),children:(0,a.jsxs)(n.W2,{children:[(0,a.jsx)(n.X6,{as:"h2",type:"display",weight:"bold",className:(0,i.Z)(p.title,"mb-6"),children:"Поддержка"}),(0,a.jsxs)("div",{className:p.cardsContainer,children:[(0,a.jsx)(f,{s3Assets:o,...t}),(0,a.jsx)(h,{s3Assets:o,...l})]})]})});x.displayName="Support"}},function(e){e.O(0,[5249,2935,6832,4275,5675,1261,7359,3996,293,4152,2286,3808,1399,3520,3091,2888,9774,179],function(){return e(e.s=9677)}),_N_E=e.O()}]);