(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[116],{1506:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/navigator/[[...slug]]",function(){return a(2658)}])},1342:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var a in t)Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}(t,{noSSR:function(){return n},default:function(){return o}});let l=a(8754),r=(a(7294),l._(a(4304)));function s(e){return{default:(null==e?void 0:e.default)||e}}function n(e,t){return delete t.webpack,delete t.modules,e(t)}function o(e,t){let a=r.default,l={loading:e=>{let{error:t,isLoading:a,pastDelay:l}=e;return null}};e instanceof Promise?l.loader=()=>e:"function"==typeof e?l.loader=e:"object"==typeof e&&(l={...l,...e}),l={...l,...t};let o=l.loader;return(l.loadableGenerated&&(l={...l,...l.loadableGenerated},delete l.loadableGenerated),"boolean"!=typeof l.ssr||l.ssr)?a({...l,loader:()=>null!=o?o().then(s):Promise.resolve(s(()=>null))}):(delete l.webpack,delete l.modules,n(a,l))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},43:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return s}});let l=a(8754),r=l._(a(7294)),s=r.default.createContext(null)},4304:function(e,t,a){"use strict";/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
 MIT License
 Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
 The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return p}});let l=a(8754),r=l._(a(7294)),s=a(43),n=[],o=[],i=!1;function u(e){let t=e(),a={loading:!0,loaded:null,error:null};return a.promise=t.then(e=>(a.loading=!1,a.loaded=e,e)).catch(e=>{throw a.loading=!1,a.error=e,e}),a}class d{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}}function c(e){return function(e,t){let a=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),l=null;function n(){if(!l){let t=new d(e,a);l={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return l.promise()}if(!i){let e=a.webpack?a.webpack():a.modules;e&&o.push(t=>{for(let a of e)if(t.includes(a))return n()})}function u(e,t){!function(){n();let e=r.default.useContext(s.LoadableContext);e&&Array.isArray(a.modules)&&a.modules.forEach(t=>{e(t)})}();let o=r.default.useSyncExternalStore(l.subscribe,l.getCurrentValue,l.getCurrentValue);return r.default.useImperativeHandle(t,()=>({retry:l.retry}),[]),r.default.useMemo(()=>{var t;return o.loading||o.error?r.default.createElement(a.loading,{isLoading:o.loading,pastDelay:o.pastDelay,timedOut:o.timedOut,error:o.error,retry:l.retry}):o.loaded?r.default.createElement((t=o.loaded)&&t.default?t.default:t,e):null},[e,o])}return u.preload=()=>n(),u.displayName="LoadableComponent",r.default.forwardRef(u)}(u,e)}function _(e,t){let a=[];for(;e.length;){let l=e.pop();a.push(l(t))}return Promise.all(a).then(()=>{if(e.length)return _(e,t)})}c.preloadAll=()=>new Promise((e,t)=>{_(n).then(e,t)}),c.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let a=()=>(i=!0,t());_(o,e).then(a,a)})),window.__NEXT_PRELOADREADY=c.preloadReady;let p=c},5112:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var l=a(8083);let r={getWidgetsData(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"v1";return(0,l.t)({env:e,url:"/page-content/api/".concat(a,"/widgets/").concat(t),options:{isBased:!0}})}}},1955:function(e,t,a){"use strict";a.d(t,{r:function(){return o}});var l=a(8083);let r={async getLayoutData(e,t){let a=await (0,l.t)({env:e,url:"/api/v1/layout/".concat(t),options:{isHeadlessCMS:!0}});return a.data||null},async getPageData(e,t,a){let r=new URLSearchParams({scLayoutName:t,scPageUrl:a}).toString(),s=await (0,l.t)({env:e,url:"/api/v1/data/page-data?".concat(r),options:{isHeadlessCMS:!0}});return s.data||null},async getPage(e,t){let a=await (0,l.t)({env:e,url:"/api/v1/sc-page/".concat(t),options:{isHeadlessCMS:!0}});return a.data||null}},s=async(e,t,a)=>{let r=a?new URLSearchParams(a).toString():null,s=await (0,l.t)({env:e,url:"/api/v1/blocks/".concat(t).concat(r?"?".concat(r):""),options:{isCommonBlocks:!0}});if(s.error)throw Error(s.error);return s.data||""},n=e=>(0,l.t)({env:e,url:"/api/v1/disclaimers/filtered?showSC=true",options:{isHeadlessCMS:!0}}),o=async e=>{let t=[],a="",l=null,o=null,i=!!e.NEXT_PUBLIC_REACT_HEADER,[u,d,c,_]=await Promise.allSettled([n(e),i?null:s(e,"header"),i?r.getPageData(e,"PageHeaderWidget","homepage"):null,r.getPageData(e,"PageFooter","homepage")]);return"fulfilled"===u.status&&u.value&&(t=Array.isArray(t=u.value.data||[])?t:[]),"fulfilled"===d.status&&d.value&&(a=d.value),"fulfilled"===c.status&&c.value&&(l=c.value.value||null),"fulfilled"===_.status&&_.value&&(o=_.value.value),{layout:{disclaimers:t,header:l,footer:o},commonBlocksData:{header:a}}}},2658:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return f},default:function(){return b},getNavigatorServerSideProps:function(){return k}});var l=a(5893),r=a(5152),s=a.n(r),n=a(5112),o=a(1955),i=a(2853),u=a(4838),d=a(4386);let c={stat_osago_kt:"/stat_osago_koefficienty","zastrahovat/stat_bazovaya_stavka_osago":"/osago/teg-calculator","zastrahovat/stat_realno_li_segodnya_kupit_kasko_bez_franshizy":"/kasko/teg-s-franshizoi","zastrahovat/stat_osago_na_mesyats":"/kasko/teg-na-mesyac","zastrahovat/stat_optimalnoe_kasko":"/kasko/teg-deshevo","zastrahovat/stat_mini_kasko":"/kasko/teg-mini","zastrahovat/stat_kasko_v_rassrochku":"/kasko/teg-v-rassrochku","zastrahovat/stat_kasko_dlya_spectehniki":"/kasko/teg-spectehnika","zastrahovat/stat_50_x_50":"/kasko/teg-50-na-50","zastrahovat/stat_stoimost_kasko_v_2019_2020_godah":"/kasko/teg-calc","zastrahovat/stat_stoimost_2014":"/kasko/teg-calc","zastrahovat/stat_raschet_v_internete":"/kasko/teg-calc","zastrahovat/stat_rasschitat":"/kasko/teg-calc","zastrahovat/stat_raschet_kasko_v_internete_2020":"/kasko/teg-calc","zastrahovat/stat_vyplaty_po_kasko_ot_ugona":"/kasko/teg-ot-ugona","zastrahovat/stat_tolko_ot_ugona":"/kasko/teg-ot-ugona","zastrahovat/stat_otkaz_po_ugonu":"/kasko/teg-ot-ugona","zastrahovat/stat_totalnaya_gibel_avtomobilya_pri_strahovanii_kasko":"/kasko/teg-ugon-i-total","zastrahovat/stat_tolko_usherb":"/kasko/teg-ugon-i-total","zastrahovat/stat_vyplata_po_kreditnomu_avto":"/kasko/teg-credit","zastrahovat/stat_kasko_na_kreditnyi_avtomobil":"/kasko/teg-credit","zastrahovat/stat_avtokredit":"/kasko/teg-credit","zastrahovat/stat_stoit_li_prodlevat_strahovku":"/kasko/teg-prolongation","zastrahovat/stat_prodlit_kasko":"/kasko/teg-prolongation","zastrahovat/stat_polis_kasko":"/kasko","zastrahovat/stat_nevygodnoe_kasko_v_avtosalone":"/kasko","zastrahovat/stat_nazyazyvanie_polisa_kasko":"/kasko","zastrahovat/stat_kak_vybrat_luchshuju_kompaniju_kasko":"/kasko","zastrahovat/stat_":"/kasko"};var _=a(2288);let p=async(e,t)=>{var a;let l=t.filter(e=>{let{url:t}=e;return t!==_.Vf}),r=l.map(e=>{let{url:t}=e;return t}).join(","),s=await (0,i.wg)(e,void 0,void 0,void 0,r,3),n=(null===(a=s.data)||void 0===a?void 0:a.articles)||{},o=Object.keys(n),u=o.reduce((e,a,l)=>{let r=t.find(e=>{let{id:t}=e;return t===Number(a)}),s=(n[a]||[]).slice(0,3);return r&&s.length&&e.push({id:r.id,name:r.name,key:r.url,title:r.title,posts_ids:s,description:"",position:l,url:"".concat(d._n,"/").concat(r.url)}),e},[]);return u};var h=a(8853);let Navigator=s()(()=>Promise.all([a.e(873),a.e(557),a.e(473),a.e(679),a.e(684),a.e(157)]).then(a.bind(a,7157)).then(e=>e.Navigator),{loadableGenerated:{webpack:()=>[7157]}}),v=s()(()=>Promise.all([a.e(873),a.e(386),a.e(189)]).then(a.bind(a,3131)).then(e=>e.Layout),{loadableGenerated:{webpack:()=>[3131]}}),m=s()(()=>Promise.all([a.e(873),a.e(557),a.e(473),a.e(666),a.e(43),a.e(750)]).then(a.bind(a,2995)).then(e=>e.NavigatorDetail),{loadableGenerated:{webpack:()=>[2995]}}),g=s()(()=>Promise.all([a.e(873),a.e(473),a.e(679),a.e(684),a.e(927)]).then(a.bind(a,2060)).then(e=>e.NavigatorTag),{loadableGenerated:{webpack:()=>[2060]}});var f=!0;let k=async e=>{var t,a,l,r,s,v,m,g,f,k,b,y,x,w;let j=String(null==e?void 0:null===(a=e.req)||void 0===a?void 0:null===(t=a.url)||void 0===t?void 0:t.split("?")[0].split("#")[0]).substring(1),$=!!(j.includes("/stat_")||e.isV2),C=j.includes("/str_"),N=j.endsWith("/app"),P=N?j.slice(0,-4):j,z=String(null==e?void 0:null===(l=e.resolvedUrl)||void 0===l?void 0:l.split("?")[0].split("#")[0].split("/str_")[0]).substring(1),T=(0,h.d)(),L=(()=>{var t;let a=null==e?void 0:null===(t=e.resolvedUrl)||void 0===t?void 0:t.match(/\/str_(\d+)/);if(a&&a[1]){let e=parseInt(a[1],10);if(e>0)return e}return -1})();for(let t in c)if(e.resolvedUrl==="/navigator/".concat(t))return{redirect:{destination:"".concat(d._n).concat(c[t]),permanent:!0}};if(e.resolvedUrl.startsWith("/navigator/razvlecheniya"))return{redirect:{destination:"".concat(d._n,"/navigator"),permanent:!0}};let O=null,A=[],S="1",W=[],I=null,E=[],U=[],V=[],R=null,B=[],D=$?null:await (0,i.kr)(T);if(D&&(V=(null===(s=D.data)||void 0===s?void 0:s.ctgs)||[],E=((null===(v=D.data)||void 0===v?void 0:v.groups)||[]).sort((e,t)=>e.position-t.position),R=(U=(null===(m=D.data)||void 0===m?void 0:m.tags)||[]).find(e=>{let{url:t}=e;return t===z})||null),"navigator/all"===z&&(R={id:100,name:"Все статьи",title:"Все статьи - Журнал Финуслуги",description:"Актуальные статьи о финансах, инвестициях и банковских продуктах на Финуслуги.ру. Будьте в курсе всех событий.",modal_title:null,modal_description:null,modal_title_success:null,modal_description_success:null,h1:"Все статьи",url:"navigator/all"}),e.isV2&&(P=(null==P?void 0:null===(r=P.split("/"))||void 0===r?void 0:r.pop())||""),!$&&!R)return{notFound:!0};let Z=!!R&&(R.url!==_.Vf||L>1),F=L>1?_.FY:(null==R?void 0:R.url)!==_.Vf?_.hP:_.ek,G=L>1?(null==R?void 0:R.url)!==_.Vf?_.ew:_.vH:void 0,[M,H,X,J]=await Promise.allSettled([(0,o.r)(T),$?null:(0,i.pW)(T,F,G,L,null==R?void 0:R.url),$||Z?null:(0,i.Jx)(T,18),$?(0,u.vM)(T,P):null]);"fulfilled"===M.status&&M.value&&(O=M.value);let Y=await Promise.allSettled(E.map(e=>{let{key:t}=e;return(0,i.Ik)(T,t,24)})),q=Y.reduce((e,t)=>{var a;return"fulfilled"===t.status&&(null===(a=t.value)||void 0===a?void 0:a.data)&&e.push(t.value.data),e},[]);"fulfilled"===H.status&&H.value&&(A=(null===(g=H.value.data)||void 0===g?void 0:g.articles)||[],S=(null===(f=H.value.data)||void 0===f?void 0:f.total)||"1");let Q=Math.ceil((Number(S)-(G||0))/F);if(C&&(L<0||L>Q||0===A.length))return{redirect:{destination:"/".concat(z),permanent:!0}};if("fulfilled"===X.status&&X.value&&(W=(null===(k=X.value.data)||void 0===k?void 0:k.items.slice(0,18))||[]),"fulfilled"===J.status&&J.value&&(I=(null===(b=J.value.data)||void 0===b?void 0:b.article)||null,U=(null===(y=J.value.data)||void 0===y?void 0:y.tags)||[],V=(null===(x=J.value.data)||void 0===x?void 0:x.ctgs)||[]),e.isV2){let e=await (0,u.AU)(T,P);I=e.data||null}if(!e.isV2&&(null==I?void 0:I.redirect_url)&&I.redirect_url.length>0)return{redirect:{destination:"/".concat(I.redirect_url),permanent:!0}};if(!e.isV2&&(null==I?void 0:I.url)&&I.url!==P)return{redirect:{destination:"/".concat(I.url),permanent:!0}};let K=await p(T,U);return(!$||(null==I?void 0:I.title))&&($||A.length)?($&&(B=(await n.Z.getWidgetsData(T,"bestOffers")).data||[]),I&&(null===(w=I.content)||void 0===w||w.forEach(e=>{"read_more"===e.type&&Array.isArray(e.data)&&e.data.forEach(e=>{e.content=[]})})),{props:{env:T,...O,groupedPosts:q,extraGroups:K,articles:A,news:W,post:I,tags:U,ctgs:V,description:"",isMobileApplication:N,isDetailPage:$,tag:R,str:L>1?L:null,pageCount:Q,bestOffers:B}}):{notFound:!0}};var b=e=>{let{env:t,layout:a,commonBlocksData:r,groupedPosts:s,extraGroups:n,articles:o,news:i,post:u,tags:d,ctgs:c,description:p,isMobileApplication:h,isDetailPage:f,tag:k,str:b,pageCount:y,bestOffers:x}=e;if(f&&h)return(0,l.jsx)(m,{env:t,post:u,tags:d,ctgs:c,description:p,bestPosts:[],newPosts:[],bestOffers:[],isMobileApplication:h});let w=!!k&&(k.url!==_.Vf||!!b);return(0,l.jsxs)(v,{env:t,data:a,sections:r,children:[w&&(0,l.jsx)(g,{env:t,articles:o,news:i,ctgs:c,groupedPosts:s,description:p,tag:k,str:b,pageCount:y,tags:d}),!f&&!w&&(0,l.jsx)(Navigator,{env:t,articles:o,news:i,ctgs:c,tags:d,groupedPosts:s,extraGroups:n,description:p}),f&&(0,l.jsx)(m,{env:t,post:u,tags:d,ctgs:c,description:p,bestPosts:[],newPosts:[],isMobileApplication:h,bestOffers:x})]})}},5152:function(e,t,a){e.exports=a(1342)},9113:function(e,t,a){"use strict";a.d(t,{MJ:function(){return F}});var l,r=a(5893),s=a(6535),n=a(4588),o=a(6010),i=a(7294),u=a(9194),d=a(4941);let c=(0,d.g)("check-all","sc"),_=Object.freeze({wrapper:`${c}__wrapper`,link:`${c}__link`,icon:`${c}__icon`,iconGray:`${c}__icon--gray`}),p=({children:e,className:t,linkClassName:a,iconGrayBackground:l,Link:s,event:i,href:d,dataLayerPush:c})=>{let p=s??n.rU;return(0,r.jsx)("div",{className:(0,o.Z)(_.wrapper,t),onClick:()=>{i&&c(i)},children:(0,r.jsxs)(p,{className:(0,o.Z)(_.link,a),href:d,children:[e,(0,r.jsx)("span",{className:(0,o.Z)(_.icon,{[_.iconGray]:l}),children:(0,r.jsx)(u.IconFdsArrowUpRightSmallO,{size:24})})]})})};var h=a(494),v=a(1069),m=a(7769),g=((l=g||{}).light="light",l.gray="gray",l);let f=e=>"kasko"===e||"osago"===e,k=(0,d.g)("best-offers-banner","sc"),b=Object.freeze({bestOffersBaner:k,wrapper:`${k}__wrapper`,wideWrapper:`${k}__wrapper--wide`,whiteWrapper:`${k}__wrapper--white`,content:`${k}__content`,header:`${k}__header`,title:`${k}__title`,subtitle:`${k}__subtitle`,icon:`${k}__icon`,iconBlack:`${k}__icon--black`,iconWhite:`${k}__icon--white`,image:`${k}__image`}),y=({title:e,image:t,url:a,description:l,backgroundColor:n,textColor:i,wide:d,theme:c,handleBannerDataLayerPush:_,className:p})=>{let h=c===g.gray,v={"--bg-base":(null==n?void 0:n.base)??(h?"var(--color-white)":"var(--color-gray-400)"),"--bg-hover":(null==n?void 0:n.hover)??"var(--color-gray-500)"};return(0,r.jsxs)("div",{className:(0,o.Z)(b.wrapper,p,{[b.wideWrapper]:d}),style:v,onClick:()=>{_(),window.open(a,"_blank")},children:[(0,r.jsxs)("div",{className:b.content,children:[(0,r.jsxs)("div",{className:b.header,children:[(0,r.jsx)(s.xv,{weight:"medium",size:"24",className:b.title,style:{color:i},children:e}),(0,r.jsx)("div",{className:(0,o.Z)(b.icon,{[b.iconBlack]:h&&!(null!=i&&i.includes("color-white")),[b.iconWhite]:h&&!!(null!=i&&i.includes("color-white"))}),children:(0,r.jsx)(u.IconFdsArrowUpRightSmallO,{size:32})})]}),l&&(0,r.jsx)(s.xv,{size:"16",style:{color:i},children:l})]}),(null==t?void 0:t.url)&&(0,r.jsx)("picture",{className:b.image,children:(0,r.jsx)("img",{src:t.url,width:t.width??150,height:t.height??"auto",alt:`Баннер ${e}`,loading:"lazy"})})]})},x=(0,d.g)("offer-card","sc"),w=Object.freeze({offerCard:x,wrapper:`${x}__wrapper`,whiteWrapper:`${x}__wrapper--white`,bankInfo:`${x}__bankInfo`,units:`${x}__units`,unitsColumn:`${x}__units--column`,unit:`${x}__unit`,unitRow:`${x}__unit--row`,unitTitleWrapper:`${x}__unitTitleWrapper`,unitTitle:`${x}__unitTitle`,tooltipIcon:`${x}__tooltipIcon`,unitValue:`${x}__unitValue`,bottomBlock:`${x}__bottomBlock`,tags:`${x}__tags`,tag:`${x}__tag`,button:`${x}__button`,buttonRounded:`${x}__button--rounded`,buttonAdditional:`${x}__button--additional`}),j=e=>{let t=e.split("₽");return t.map((e,a)=>(0,r.jsxs)(i.Fragment,{children:[e,a<t.length-1&&(0,r.jsx)(s.xv,{fontFamily:"primary",weight:"regular",children:"₽"})]},`${e}-${a}`))},$=({title:e,value:t,tooltip:a,textColor:l,unitsAsColumn:i,isTitleUnit:d})=>(0,r.jsxs)("div",{className:(0,o.Z)(w.unit,{[w.unitRow]:i}),children:[(0,r.jsxs)("div",{className:w.unitTitleWrapper,children:[(0,r.jsx)(s.xv,{size:"14",className:w.unitTitle,children:e}),a&&(0,r.jsx)(n.u,{text:a,children:(0,r.jsx)(u.IconFdsQuestionCircleO,{className:w.tooltipIcon})})]}),(0,r.jsx)(s.xv,{weight:"medium",size:d?"18":i?"16":"24",className:w.unitValue,style:{color:l},children:e.includes("Рейтинг")?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.IconFdsStarF,{size:16,style:{color:"var(--color-orange-400)"}}),t]}):j(t)})]}),C=({tags:e,isGrayTheme:t})=>{let a=t?"secondary":"primary";return(0,r.jsx)("div",{className:w.tags,children:e.sort((e,t)=>e.order-t.order).map(e=>(0,r.jsx)(n.Vp,{className:w.tag,label:e.label,variant:e.variant?e.variant:a,rounded:!0},e.label))})},N=({companyName:e,name:t,url:a,logo:l,units:s,tags:i,additionalButton:u,unitsAsColumn:d,dataLayerPush:c,eventCategory:_,productType:p,theme:h,buttonClassName:m,eventValueByUnitTitle:f})=>{let k=h===g.gray,b=a=>{let l={event:"data-event",eventCategory:_,eventAction:`click_button_${(0,v.t)(a)}_${p}`,eventLabel:(0,v.t)(`${e}_${t}`)};if(f){let e=s.find(e=>e.title.toLowerCase()===f.toLowerCase());e&&(l.eventValue=(0,v.t)(e.value))}c(l)};return(0,r.jsxs)("div",{className:(0,o.Z)(w.wrapper,{[w.whiteWrapper]:k}),children:[(0,r.jsxs)("div",{className:w.bankInfo,children:[l&&(0,r.jsx)("img",{src:l,width:56,height:56,alt:`${e} logo`}),(0,r.jsx)($,{title:t,value:e,isTitleUnit:!0})]}),(0,r.jsx)("div",{className:(0,o.Z)(w.units,{[w.unitsColumn]:d}),children:s.map(e=>(0,r.jsx)($,{title:e.title,value:e.value,tooltip:e.tooltip,textColor:e.textColor,unitsAsColumn:d},`${e.title}-${e.value}`))}),(0,r.jsxs)("div",{className:w.bottomBlock,children:[i&&(0,r.jsx)(C,{tags:i,isGrayTheme:k}),u&&u.text.trim().length>0&&(0,r.jsx)(n.zx,{as:"a",className:(0,o.Z)(w.button,w.buttonRounded,w.buttonAdditional),size:"xs",label:u.text,href:null==u?void 0:u.url,variant:k?"secondary":"white",onClick:()=>b(u.text)}),(0,r.jsx)(n.zx,{as:"a",className:(0,o.Z)(w.button,m),size:"xs",label:"Подробнее",href:a,onClick:()=>b("podrobnee_o_kartochke_iz")})]})]})},P=(0,d.g)("offers-list","sc"),z=Object.freeze({offersList:P,wrapper:`${P}__wrapper`,sliderWrapper:`${P}__sliderWrapper`,offerItem:`${P}__offerItem`,compact:`${P}__offerItem--compact`,bannerItem:`${P}__bannerItem`}),T=({offers:e,banner:t,dataLayerPush:a,eventCategory:l,productType:s,theme:i,singleProduct:u})=>{let d=e.length<=2;return(0,r.jsxs)(n.iR,{options:{slidesPerView:"auto",spaceBetween:0,autoplay:{delay:3e3,disableOnInteraction:!1}},breakpoints:{xl:{autoplay:!1}},className:z.sliderWrapper,pagination:!0,children:[e.slice(0,3).map(e=>(0,r.jsx)(n.wI,{className:(0,o.Z)(z.offerItem,{[z.compact]:u}),children:(0,r.jsx)(N,{...e,dataLayerPush:a,eventCategory:l,productType:s,theme:i})},e.id)),t&&(0,r.jsx)(n.wI,{className:z.bannerItem,children:(0,r.jsx)(y,{...t,handleBannerDataLayerPush:()=>{a({event:"data-event",eventCategory:l,eventAction:"click_bnr_banner_top_predlozheniy",eventLabel:s})},wide:d,theme:i})})]},s)},L=(0,d.g)("osago-tab","sc"),O=Object.freeze({osagoTab:L,wrapper:`${L}__wrapper`,card:`${L}__card`,whiteCard:`${L}__card--white`,image:`${L}__image`,content:`${L}__content`,inputWrapper:`${L}__inputWrapper`,select:`${L}__select`,input:`${L}__input`,buttonLinkWrapper:`${L}__buttonLinkWrapper`,button:`${L}__button`,banner:`${L}__banner`}),A={kasko:{title:"Рассчет Каско за минуту",description:"Выберите лучшие условия для оформления полиса",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}},osago:{title:"ОСАГО с экономией до 78%",description:"Предварительная цена после ввода номера ТС",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}}},S=[{label:"Мотоцикл",value:"moto"},{label:"Автомобиль",value:"auto"}],W=Object.fromEntries(S.map(e=>[e.value,e])),I={auto:{mask:"a 000 aa 00",placeholder:"A 000 AA 00"},moto:{mask:"0000 aa 00",placeholder:"0000 AA 00"}},E="АВЕКМНОРСТУХ",U=RegExp(`[${E}]`,"i"),V=RegExp(`[^0-9${E}]`,"gi"),R=({type:e,baseUrl:t,s3Assets:a,banner:l,dataLayerPush:u,eventCategory:d,theme:c})=>{let _="osago"===e,p=(0,m.xn)(t,"osago"),h=(0,m.xn)(p,"step-car"),f=(0,m.xn)(t,"kasko"),k=(0,m.xn)(f,"vehicle"),b=_?h:k,[x,w]=(0,i.useState)(""),[j,$]=(0,i.useState)("auto"),{mask:C,placeholder:N}=I[j],P=c===g.gray,z=`?${new URLSearchParams({type:_?j:"auto",license:x})}`,T=(0,m.xn)(b,z),L=l??{...A[e],url:_?p:f,image:a?{url:(0,m.xn)(a,`pl-common-blocks-renderer/topOffers/${_?"icon_osago":"icons_car"}.png`),width:204,height:160}:void 0},E=W[j].label,R=(t,a)=>{u({event:"data-event",eventCategory:d,eventAction:t,eventLabel:a??e})};return(0,r.jsxs)("div",{className:O.wrapper,children:[(0,r.jsxs)("div",{className:(0,o.Z)(O.card,{[O.whiteCard]:P}),children:[a&&(0,r.jsx)("picture",{children:(0,r.jsx)("img",{src:`${a}/pl-common-blocks-renderer/topOffers/auto_bg.png`,alt:"Автомобиль",loading:"lazy",className:O.image})}),(0,r.jsxs)("div",{className:O.content,children:[(0,r.jsxs)(s.X6,{as:"h3",type:"h3",children:["Онлайн калькулятор ",_?"ОСАГО":"Каско"]}),(0,r.jsxs)("div",{className:O.inputWrapper,children:[_&&(0,r.jsx)(n.Ph,{options:S,value:W[j],label:"Тип транспорта",variant:P?"primary":"secondary",className:O.select,onChange:e=>{w(""),$(e.value),R(`selector_item_${(0,v.t)(e.label)}`)}}),(0,r.jsx)(n.An,{label:"Госномер",variant:P?"primary":"secondary",maskOpts:{mask:C,definitions:{a:U}},maskPlaceholder:N,value:x,className:O.input,onChange:(e,t)=>{let a=t.replace(V,"");w(a.toUpperCase())},onClick:()=>R(`message_field_${(0,v.t)(E)}`),onBlur:()=>R(`on_message_field_${(0,v.t)(E)}`)}),(0,r.jsxs)(s.xv,{children:["У меня"," ",(0,r.jsx)(n.rU,{href:b,onClick:()=>{R("click_link_net_nomera",b)},children:"нет номера"})]})]}),(0,r.jsx)(n.zx,{as:"a",href:T,size:"s",className:O.button,onClick:()=>{R(`click_button_rasschitat_${(0,v.t)(E)}`,T)},children:"Рассчитать"})]})]}),(0,r.jsx)("div",{className:O.banner,children:(0,r.jsx)(y,{...L,theme:c,handleBannerDataLayerPush:()=>{R("click_bnr_banner_top_predlozheniy")}})})]})},B=(0,d.g)("best-offers","sc"),D=Object.freeze({bestOffers:B,graySection:`${B}--gray`,singleProduct:`${B}--singleProduct`,title:`${B}__title`,singleProductTitle:`${B}__title--singleProduct`,chips:`${B}__chips`,warning:`${B}__warning`,allOffersLink:`${B}__allOffersLink`}),Z={вклады:"вкладам",облигации:"облигациям",кредиты:"кредитам",займы:"займам","Кредитные карты":"кредитным картам",каско:"каско",осаго:"ОСАГО","дебетовые карты":"дебетовым картам",ипотека:"ипотеке",автокредиты:"автокредитам"},F=({tabs:e,baseUrl:t,s3Assets:a,eventCategory:l="best-offers",dataLayerPush:u,singleProduct:d=!1,theme:c=g.light,className:_})=>{let v=c===g.gray,m=e.map(e=>({url:e.productType,title:e.name})),[k,b]=(0,i.useState)(m[0].url),y=e.find(e=>e.productType===k)??e[0],x=(0,n._m)("xl"),w=Z[y.name.toLowerCase()],j=w?`по ${w}`:y.name,$=f(null==y?void 0:y.productType)&&t?(0,r.jsx)(R,{type:y.productType,banner:y.banner,baseUrl:t,s3Assets:a,dataLayerPush:u,eventCategory:l,theme:c}):null;return(0,r.jsx)("section",{className:(0,o.Z)(D.bestOffers,_,{[D.singleProduct]:d,[D.graySection]:v}),children:(0,r.jsxs)(s.W2,{children:[(0,r.jsxs)(s.X6,{as:"h2",type:d?"h2":"display",className:(0,o.Z)(D.title,!d&&(x?"mb-8":"mb-6"),d&&(0,o.Z)("mb-0",D.singleProductTitle)),children:["Лучшие предложения ",d?j:"сегодня"]}),!d&&(0,r.jsx)(h.N,{items:m,maxNumberOfLines:2,activeChipId:k,variant:v?"white":"gray",className:D.chips,onClick:t=>{b(t);let a=e.find(e=>e.productType===t);u({event:"data-event",eventCategory:l,eventAction:"click_chip_top_predlozheniy_vybor",eventLabel:null==a?void 0:a.productType})}}),(0,r.jsxs)("div",{children:[$??(0,r.jsx)(T,{offers:y.offers,banner:y.banner,dataLayerPush:u,eventCategory:l,productType:y.productType,theme:c,singleProduct:d}),y.hasWarning&&(0,r.jsx)(s.xv,{as:"p",size:"16",className:D.warning,children:y.warningCustomText??"Оценивайте свои финансовые возможности и риски. Изучите все условия кредита (займа)"})]}),y.checkAllUrl&&(0,r.jsx)(p,{href:y.checkAllUrl,event:{event:"data-event",eventCategory:l,eventAction:"link",eventLabel:`Показать все предложения ${y.productType}`},dataLayerPush:u,iconGrayBackground:!v,className:D.allOffersLink,linkClassName:y.checkAllLinkClassName,children:"Показать все предложения"})]})})}}},function(e){e.O(0,[832,249,342,986,876,573,774,888,179],function(){return e(e.s=1506)}),_N_E=e.O()}]);