(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[995],{2995:function(e,t,a){"use strict";a.r(t),a.d(t,{NavigatorDetail:function(){return Y}});var i=a(5893),r=a(9194),n=a(6535),l=a(4588),o=a(6010),s=a(1163),c=a(7294),d=a(4249),p=a(5e3),u=a(5646),_=a(3055),v=a(7843),g=a(5352),h=a(7701),m=a(2307),f=a(4386),x=a(1309),N=a(8059),b=a(8114),j=a(7315),I=a(1997),D=a(2027),w=a(3627);function y(e){let t=e.match(/^navigator\/([^/]+)\/.+$/);return t?t[1]:null}var k=a(6129),T=a(2864),L=a(2825),P=a(3161),C=a(7771),S=a(9574),W=a(4800),M=a(5131),A=a(5900),E=a.n(A);let H=e=>{let{date:t,className:a,variant:r="desktop"}=e;return t?(0,i.jsx)("div",{className:(0,o.Z)(E().wrapper,a,E()[r]),children:(0,i.jsxs)("label",{children:["Обновлено ",t]})}):null};var R=a(9298),B=a.n(R);let z=e=>{var t,a;let{post:n,BASE_URL:l,postViews:o}=e,s=(0,I.p6)(String(n.public_date),!0),c=(0,I.k2)(n.update_time),d=(0,I.fx)(n.public_date,n.update_time),p=n.read_time||0;return(0,i.jsxs)("div",{className:B().wrapper,children:[(0,i.jsxs)("div",{className:B().info,children:[(0,i.jsx)("div",{className:B().unit,children:(0,i.jsx)("label",{children:s})}),!!p&&(0,i.jsxs)("div",{className:B().unit,children:[(0,i.jsx)(r.IconFdsClockO,{size:24}),(0,i.jsxs)("label",{children:[p," мин"]})]}),!!o&&(0,i.jsxs)("div",{className:B().unit,children:[(0,i.jsx)(r.IconFdsEyeO,{size:24}),(0,i.jsx)("label",{children:o})]}),d&&(0,i.jsx)(H,{date:c,className:B().right})]}),!!(null==n?void 0:null===(t=n.author)||void 0===t?void 0:t.name)&&(null==n?void 0:null===(a=n.author)||void 0===a?void 0:a.url)&&(0,i.jsxs)("a",{className:B().author,href:"/navigator/author/".concat(null==n?void 0:n.author.url),target:"_self",children:[(null==n?void 0:n.author.photo)&&(0,i.jsx)("img",{className:B().image,src:"".concat(l,"/img/posts/original/").concat(null==n?void 0:n.author.photo),alt:n.author.name}),(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:B().name,children:n.author.name}),(0,i.jsx)("div",{className:B().position,children:n.author.position})]})]})]})};var F=a(2288),O=a(7311),U=a(2853);let G=async(e,t,a,i,r,n)=>{var l;let o=await (0,U.pW)(e,9,void 0,t,i?void 0:a,i?1:void 0),s=new Date;s.setDate(new Date().getDate()-30);let c=((null===(l=o.data)||void 0===l?void 0:l.articles)||[]).filter(e=>e.url!==n).map(e=>{let{url:t}=e;return t});return c.length||i?c:(r(),await G(e,1,"",!0,r,n))};var K=a(2888),J=a(2708),X=a.n(J);let Y=e=>{var t,a,r,o,_,h,b,j;let{env:I,post:k,tags:T,description:L,isMobileApplication:C,extra:S,bestOffersBlock:A,bestOffersBlockPageData:E}=e,H=(0,x.I)(),{asPath:R}=(0,s.useRouter)(),[B,z]=(0,c.useState)(k),[U,K]=(0,c.useState)([]),J=(0,c.useRef)([]),Y=(0,c.useRef)(0),V=(0,c.useRef)(!1),[Q,q]=(0,c.useState)(e.disableInfiniteScroll);(0,c.useEffect)(()=>{let e=()=>{var e;let t=document.getElementById(null===(e=window.location.hash)||void 0===e?void 0:e.slice(1));t&&(0,P.Q)((0,P.n)(t)-32),history.replaceState(null,"",window.location.pathname+window.location.search)};return window.addEventListener("hashchange",e),window.location.hash?e():window.scrollTo(0,0),()=>{window.removeEventListener("hashchange",e)}},[]);let $=null===(t=B.tag_ids)||void 0===t?void 0:t.reduce((e,t)=>{let a=T.find(e=>{let{id:a}=e;return a===t}),i=R.replace("navigator-new/","navigator/"),r=i.includes((null==a?void 0:a.url)||"___");return a&&r&&e.unshift(a),a&&!r&&e.push(a),e},[]),ee=(null==$?void 0:$[0])||T[0],et=()=>{V.current=!0,Y.current=1},ea=async()=>{var t,a;if(e.disableInfiniteScroll)return;J.current.length||(Y.current++,J.current=await G(I,Y.current,ee.url,V.current,et,B.url));let i=J.current.shift();if(!i){q(!0);return}let r=await (0,u.vM)(I,i),n=null===(t=r.data)||void 0===t?void 0:t.article;if((null==n?void 0:n.best_offers)&&E){let e=await (0,d.x)(I,E,n.best_offers),t=(null==e?void 0:null===(a=e.chips)||void 0===a?void 0:a[0])?(0,p.v)(e.chips[0]):null;t&&(n.bestOffersTab=t)}n.title?K(e=>[...e,n]):ea()},ei=(0,N.M)(ea,.5),er=(0,c.useMemo)(()=>{var e;return"Читать статью на тему “".concat(B.title.trimEnd(),"” онлайн на сайте.  Еще больше актуальных статей").concat(B.tag_ids&&B.tag_ids[0]?" по теме “".concat(null===(e=T[Number(B.tag_ids[0])-1])||void 0===e?void 0:e.name,"” "):" ","в Журнале Финуслуги.")},[T,B]),en=(0,c.useMemo)(()=>""!==L?L:er,[L,er]),el=(()=>{switch(ee&&ee.url){case"navigator/investirovat":return{pp:"cfbl",ps:"foam",p2:"hpaj"};case"navigator/kredity":return{pp:"cfbj",ps:"foam",p2:"hpaj"};case"navigator/nakopit-i-sohranit":return{pp:"cfek",ps:"foam",p2:"hpaj"};case"navigator/zastrahovat":return{pp:"cfbk",ps:"foam",p2:"hpaj"};default:return{pp:"i",ps:"foam",p2:"hpaj"}}})(),eo=(0,w.z)({tag:{href:ee.url,label:ee.name},current:{label:B.title}}),es=(0,w.z)({includeBase:!1,tag:{href:ee.url,label:ee.name}}),ec=(0,D.z)(eo),ed=(0,D.z)(es),ep=JSON.stringify({"@context":"https://schema.org","@graph":[{"@type":"Article",name:B.title,headline:"".concat(B.title," - читайте на сайте Финуслуги"),description:en,url:"".concat(f._n,"/").concat(B.url),about:{"@type":"Thing",...B.tag_ids&&{name:null===(a=T[Number(B.tag_ids[0])-1])||void 0===a?void 0:a.name,sameAs:"".concat(f._n,"/").concat(null===(r=T[Number(B.tag_ids[0])-1])||void 0===r?void 0:r.url)}},mainEntityOfPage:{"@type":"WebPage","@id":"".concat(f._n,"/").concat(B.url)},dateCreated:B.public_date||B.publ_date,datePublished:B.public_date||B.publ_date,dateModified:B.update_time||B.public_date,thumbnailUrl:"".concat(f._n,"/img/posts/big/").concat(null==B?void 0:null===(o=B.image)||void 0===o?void 0:o.file),...B.author&&{author:{"@type":"Person",name:null===(_=B.author)||void 0===_?void 0:_.name,url:"".concat(f._n,"/navigator/author/").concat(null===(h=B.author)||void 0===h?void 0:h.url)}},...(null==B?void 0:B.publisher)&&{publisher:{"@type":B.publisher.type,name:B.publisher.name,url:"".concat(f._n),address:{"@type":"PostalAddress",name:B.publisher.address},logo:{"@type":"ImageObject",url:"".concat(f._n,"/icons/header_logo.svg"),width:168,height:42}}}},JSON.parse(ed)]}),{anons:eu,publ_date:e_}=B,ev=e_.split(" ")[0].split("-")[0],eg="Дарим 4000 рублей за первый вклад"===eu&&"2022"===ev||e.noIndex,eh=(null==A?void 0:A.chips[0])?(0,p.v)(A.chips[0]):null;return(0,i.jsxs)("main",{ref:ei,className:X().page,children:[!S&&(0,i.jsx)(g.N,{env:I,title:B.seo_title||B.custom_title||B.title,description:B.seo_description||en,path:R,noindex:eg,image:"img/posts/big/".concat(null==k?void 0:null===(b=k.image)||void 0===b?void 0:b.file),isDetailPage:!0}),(0,i.jsxs)(n.W2,{children:[!C&&!S&&(0,i.jsx)(l.Oo,{items:eo,style:{padding:"16px 0"}}),!C&&!S&&(0,i.jsx)(M.v5,{env:I,isMobile:!0,tags:T,selectedTag:null==ee?void 0:ee.url}),(0,i.jsxs)("div",{className:X().content,children:[(0,i.jsx)(W.F,{env:I,tags:T,selectedTag:null==ee?void 0:ee.url}),(0,i.jsxs)("div",{className:X().main,children:[(0,i.jsx)(Z,{...e,onReach:ea,handleChangePost:e=>z(e)}),(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ep}}),(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ec}}),eh&&(0,i.jsx)(v.e,{category:null!==(j=y(k.url))&&void 0!==j?j:"",tab:eh}),!C&&(0,i.jsx)(m.Z,{config:H,params:el}),U.map(t=>{var a;let{bestOffersTab:r,...n}=t;return(0,i.jsxs)(c.Fragment,{children:[(0,i.jsx)(Z,{extra:!0,handleChangePost:z,...e,onReach:ea,post:n,otherPosts:[]}),r&&(0,i.jsx)(v.e,{category:null!==(a=y(n.url))&&void 0!==a?a:"",tab:r})]},n.url)}),!Q&&(0,i.jsx)(Z,{...e,post:F.Wn,otherPosts:[],extra:!0,skeleton:!0})]})]})]}),(0,i.jsx)(O.w,{articleRef:ei})]})},Z=e=>{var t,a,n,l,d,p,v,g,m;let{env:f,post:x,tags:D,ctgs:w,isMobileApplication:y,extra:W,onReach:A,skeleton:E,handleChangePost:R,disableInfiniteScroll:B}=e,{asPath:F,push:O}=(0,s.useRouter)(),[U,G]=(0,c.useState)(x.views||0),[J,Y]=(0,c.useState)(!1),Z=(0,N.M)(A,.5),V=(0,c.useRef)(!W),Q=(0,c.useRef)(!1),{overlayClassName:q,overlayStyles:$}=(0,b.I)({wrapperRef:Z}),ee=(0,I.fx)(x.public_date,x.update_time),et=(null===(a=x.content)||void 0===a?void 0:null===(t=a.filter(e=>"header"===e.type))||void 0===t?void 0:t.map(e=>{var t;return null===(t=e.data)||void 0===t?void 0:t.text}))||[],ea=(0,j.I)((0,L.$)(x.anons||(null===(d=x.content)||void 0===d?void 0:null===(l=d.find(e=>e.type===_.z.Annotation))||void 0===l?void 0:null===(n=l.data)||void 0===n?void 0:n.text)||"")),ei=(null===(p=x.content)||void 0===p?void 0:p.filter(e=>!!x.anons||e.type!==_.z.Annotation))||[],er=null===(v=x.tag_ids)||void 0===v?void 0:v.reduce((e,t)=>{let a=D.find(e=>{let{id:a}=e;return a===t}),i=F.replace("navigator-new/","navigator/"),r=i.includes((null==a?void 0:a.url)||"___");return a&&r&&e.unshift(a),a&&!r&&e.push(a),e},[]),en=(null==er?void 0:er[0])||D[0],el=(()=>{switch(en&&en.url){case"navigator/investirovat":return{pp:"cfbl",ps:"foam",p2:"hpaj"};case"navigator/kredity":return{pp:"cfbj",ps:"foam",p2:"hpaj"};case"navigator/nakopit-i-sohranit":return{pp:"cfek",ps:"foam",p2:"hpaj"};case"navigator/zastrahovat":return{pp:"cfbk",ps:"foam",p2:"hpaj"};default:return{pp:"i",ps:"foam",p2:"hpaj"}}})(),eo=f.NEXT_PUBLIC_BASE_URL;(0,c.useEffect)(()=>{W||E||(Q.current=!0,(0,u.f6)(f,x.url).then(e=>{G((0,k.V)(x.url,e||x.views,1))}))},[]),(0,c.useEffect)(()=>{if(Z.current&&!E&&!B){let e=Z.current,t=()=>{if(!e||!Z.current)return;let t=Z.current.getBoundingClientRect(),a=t.top+window.scrollY,i=a+Z.current.offsetHeight,r=window.scrollY+window.innerHeight/2,n=r>a&&r<i;!n||V.current||Q.current||(Q.current=!0,(0,u.f6)(f,x.url).then(e=>{G((0,k.V)(x.url,e||x.views,1))})),n&&!V.current&&(V.current=!0,R&&R(x),O("/".concat(x.url),void 0,{shallow:!0})),n||(V.current=!1)};return document.addEventListener("scroll",t),()=>{e&&document.removeEventListener("scroll",t)}}},[]);let es=e=>{let{index:t,post:a}=e;(0,T.I)({eventCategory:"".concat((0,C.b)("журнал"),"_").concat(location.pathname),eventActionType:T.i.link,eventActionText:(0,C.b)(a.title),eventLabel:""});let i=document.getElementById("".concat(a.id,"_content_header_").concat(t));i&&(0,P.Q)((0,P.n)(i)-32)},ec=!y&&!!et.length&&0!==x.show_content;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{ref:Z,className:(0,o.Z)(X().article,{[X().app]:y,[X().skeleton]:E}),children:[(0,i.jsxs)("div",{className:X().articleContentWrapper,children:[!y&&(0,i.jsxs)("div",{className:X().topInfoWrapper,children:[(0,i.jsx)(M.Yx,{env:f,tag:en}),(0,i.jsxs)("div",{className:X().rightInfo,children:[(0,i.jsxs)("div",{className:X().share,onClick:()=>{(0,T.I)({eventCategory:"".concat((0,C.b)("журнал"),"_").concat(location.pathname),eventActionType:T.i.button,eventActionText:(0,C.b)("поделиться"),eventLabel:""}),Y(e=>!e)},children:[(0,i.jsx)(r.IconFdsArrowForwardO,{size:24}),(0,i.jsx)("p",{className:"desktopOnly",children:"Поделиться"})]}),(0,i.jsx)(h.n,{className:(0,o.Z)(X().soc,{[X().show]:J}),title:x.title,url:"/".concat(x.url)})]})]}),ee&&(0,i.jsx)(H,{date:(0,I.k2)(x.update_time),variant:"mobile"}),(0,i.jsx)("h1",{dangerouslySetInnerHTML:{__html:(0,j.I)(x.title)}}),(0,i.jsx)("div",{className:X().anons,dangerouslySetInnerHTML:{__html:ea}}),(0,i.jsx)(z,{post:x,BASE_URL:eo,postViews:U}),!!(null==x?void 0:null===(g=x.image)||void 0===g?void 0:g.file)&&(null==x?void 0:null===(m=x.image)||void 0===m?void 0:m.file)!=="."&&(0,i.jsx)(K.t,{isLazy:!1,srcDesktop:"".concat(eo,"/img/posts/big/").concat(x.image.file),srcMobile:"".concat(eo,"/img/posts/small/").concat(x.image.file),caption:x.cover_title,captionClassName:X().detailImageCaption,className:X().detailImageWrapper}),ec&&(0,i.jsxs)("div",{className:X().contentTable,children:[(0,i.jsx)("label",{children:"Содержание статьи"}),(0,i.jsx)("div",{className:X().contentList,children:et.map((e,t)=>(0,i.jsx)("div",{onClick:()=>es({index:t+1,post:x}),dangerouslySetInnerHTML:{__html:e||""}},t))})]}),(0,i.jsx)(S.L,{env:f,data:ei,params:el,post:x,ctgs:w})]}),(0,i.jsx)("div",{className:q,style:{...$,borderRadius:"20px"}})]})})}},2708:function(e){e.exports={contentTable:"NavigatorDetail_contentTable__KWjgZ",expertName:"NavigatorDetail_expertName__yLbfr",group:"NavigatorDetail_group__vb1OA",popularTitle:"NavigatorDetail_popularTitle__Feft2",popularItemCat:"NavigatorDetail_popularItemCat__traK5",popularItemTitle:"NavigatorDetail_popularItemTitle__L0HFY",article:"NavigatorDetail_article__1H_V4",skeleton:"NavigatorDetail_skeleton__vThIp",anons:"NavigatorDetail_anons__YKy3n",detailImageWrapper:"NavigatorDetail_detailImageWrapper__UWyrX",shine:"NavigatorDetail_shine__gQoSm",page:"NavigatorDetail_page__wU4Bs",content:"NavigatorDetail_content__3OnlR",main:"NavigatorDetail_main__GpWew",articleContentWrapper:"NavigatorDetail_articleContentWrapper__EfqF8",topInfoWrapper:"NavigatorDetail_topInfoWrapper__E1F9k",share:"NavigatorDetail_share__MzvJK",soc:"NavigatorDetail_soc__JTFnl",show:"NavigatorDetail_show__M8HgU",rightInfo:"NavigatorDetail_rightInfo__srdvn",articleBottomCard:"NavigatorDetail_articleBottomCard__xRPhV",catWrapper:"NavigatorDetail_catWrapper__18gpL",cat:"NavigatorDetail_cat__XQbDD",shareButton:"NavigatorDetail_shareButton__rTsxD",detailImageCaption:"NavigatorDetail_detailImageCaption__gkRYA",detailImage:"NavigatorDetail_detailImage__8q77t",detailImageM:"NavigatorDetail_detailImageM__3sJpR",contentList:"NavigatorDetail_contentList__K8JlZ",mobAppAd:"NavigatorDetail_mobAppAd__fihfG",expert:"NavigatorDetail_expert__rpM3K",expertPosition:"NavigatorDetail_expertPosition__AxXGB",shareWrapper:"NavigatorDetail_shareWrapper__weiO3",articleGridWrapper:"NavigatorDetail_articleGridWrapper__tdKxZ",fullInfoLink:"NavigatorDetail_fullInfoLink__2KvDF",popularContentWrapper:"NavigatorDetail_popularContentWrapper__HyLNV",slider:"NavigatorDetail_slider__doGWp",sliderLeftButton:"NavigatorDetail_sliderLeftButton__zcXcA",sliderRightButton:"NavigatorDetail_sliderRightButton__bIRrK",singleItem:"NavigatorDetail_singleItem__tUu90",popularItem:"NavigatorDetail_popularItem__2hyCD",popularItemImage:"NavigatorDetail_popularItemImage__GEEAk",popularItemContent:"NavigatorDetail_popularItemContent__D_aab",popularItemStatUnit:"NavigatorDetail_popularItemStatUnit__uIGqb",popularItemStat:"NavigatorDetail_popularItemStat__cd1qQ",popularItemStatLeft:"NavigatorDetail_popularItemStatLeft__SFtTF",stickySidebar:"NavigatorDetail_stickySidebar__M2MRx",sidebar:"NavigatorDetail_sidebar__4Mv5u"}},9298:function(e){e.exports={wrapper:"PostHeaderInfo_wrapper__iUNGo",info:"PostHeaderInfo_info__9xMwf",unit:"PostHeaderInfo_unit__spJLu",right:"PostHeaderInfo_right__n3D0Z",author:"PostHeaderInfo_author__lo1kv",image:"PostHeaderInfo_image__GCbNH",name:"PostHeaderInfo_name__P7sbO",position:"PostHeaderInfo_position__U6cYP",shine:"PostHeaderInfo_shine__FXTGX"}},5900:function(e){e.exports={wrapper:"PostUpdateTime_wrapper__OXMWr",desktop:"PostUpdateTime_desktop__tYjxz",mobile:"PostUpdateTime_mobile__kzJtb",shine:"PostUpdateTime_shine__G1OcW"}}}]);