(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[425],{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(468),_=a(3055),v=a(7843),g=a(5352),h=a(7701),m=a(2307),f=a(4386),x=a(1309),N=a(8059),j=a(8114),b=a(7315),I=a(2027),D=a(3627);function w(e){let t=e.match(/^navigator\/([^/]+)\/.+$/);return t?t[1]:null}var y=a(6129),k=a(2864),P=a(2825),T=a(3161),C=a(7771),L=a(9574),W=a(4800),S=a(5131),M=a(1997),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,M.p6)(String(n.public_date),!0),c=(0,M.k2)(n.public_date),d=(0,M.k2)(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})]}),c!==d&&(0,i.jsx)(H,{date:d,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,j,b;let{env:y,post:k,tags:P,description:C,isMobileApplication:L,extra:M,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)(!1);(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,T.Q)((0,T.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=P.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])||P[0],et=()=>{V.current=!0,Y.current=1},ea=async()=>{var e,t;J.current.length||(Y.current++,J.current=await G(y,Y.current,ee.url,V.current,et,B.url));let a=J.current.shift();if(!a){q(!0);return}let i=await (0,u.vM)(y,a),r=null===(e=i.data)||void 0===e?void 0:e.article;if((null==r?void 0:r.best_offers)&&E){let e=await (0,d.x)(y,E,r.best_offers),a=(null==e?void 0:null===(t=e.chips)||void 0===t?void 0:t[0])?(0,p.v)(e.chips[0]):null;a&&(r.bestOffersTab=a)}r.title?K(e=>[...e,r]):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=P[B.tag_ids[0]-1])||void 0===e?void 0:e.name,"” "):" ","в Журнале Финуслуги.")},[P,B]),en=(0,c.useMemo)(()=>""!==C?C:er,[C,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,D.z)({tag:{href:ee.url,label:ee.name},current:{label:B.title}}),es=(0,D.z)({includeBase:!1,tag:{href:ee.url,label:ee.name}}),ec=(0,I.z)(eo),ed=(0,I.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=P[B.tag_ids[0]-1])||void 0===a?void 0:a.name,sameAs:"".concat(f._n,"/").concat(null===(r=P[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=(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:[!M&&(0,i.jsx)(g.N,{env:y,title:B.seo_title||B.custom_title||B.title,description:B.seo_description||en,path:R,noindex:"Дарим 4000 рублей за первый вклад"===eu&&"2022"===ev,image:"img/posts/big/".concat(null==k?void 0:null===(j=k.image)||void 0===j?void 0:j.file),isDetailPage:!0}),(0,i.jsxs)(n.W2,{children:[!L&&!M&&(0,i.jsx)(l.Oo,{items:eo,style:{padding:"16px 0"}}),!L&&!M&&(0,i.jsx)(S.v5,{env:y,isMobile:!0,tags:P,selectedTag:null==ee?void 0:ee.url}),(0,i.jsxs)("div",{className:X().content,children:[(0,i.jsx)(W.F,{env:y,tags:P,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}}),eg&&(0,i.jsx)(v.e,{category:null!==(b=w(k.url))&&void 0!==b?b:"",tab:eg}),!L&&(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=w(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:I,ctgs:D,isMobileApplication:w,extra:W,onReach:M,skeleton:A,handleChangePost:E}=e,{asPath:R,push:B}=(0,s.useRouter)(),[F,O]=(0,c.useState)(x.views||0),[U,G]=(0,c.useState)(!1),J=(0,N.M)(M,.5),Y=(0,c.useRef)(!W),Z=(0,c.useRef)(!1),{overlayClassName:V,overlayStyles:Q}=(0,j.I)({wrapperRef:J}),q=(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}))||[],$=(0,b.I)((0,P.$)(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)||"")),ee=(null===(p=x.content)||void 0===p?void 0:p.filter(e=>!!x.anons||e.type!==_.z.Annotation))||[],et=null===(v=x.tag_ids)||void 0===v?void 0:v.reduce((e,t)=>{let a=I.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},[]),ea=(null==et?void 0:et[0])||I[0],ei=(()=>{switch(ea&&ea.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"}}})(),er=f.NEXT_PUBLIC_BASE_URL;(0,c.useEffect)(()=>{W||A||(Z.current=!0,(0,u.f6)(f,x.url).then(e=>{O((0,y.V)(x.url,e||x.views,1))}))},[]),(0,c.useEffect)(()=>{if(J.current&&!A){let e=J.current,t=()=>{if(!e||!J.current)return;let t=J.current.getBoundingClientRect(),a=t.top+window.scrollY,i=a+J.current.offsetHeight,r=window.scrollY+window.innerHeight/2,n=r>a&&r<i;!n||Y.current||Z.current||(Z.current=!0,(0,u.f6)(f,x.url).then(e=>{O((0,y.V)(x.url,e||x.views,1))})),n&&!Y.current&&(Y.current=!0,E&&E(x),B("/".concat(x.url),void 0,{shallow:!0})),n||(Y.current=!1)};return document.addEventListener("scroll",t),()=>{e&&document.removeEventListener("scroll",t)}}},[]);let en=e=>{let{index:t,post:a}=e;(0,k.I)({eventCategory:"".concat((0,C.b)("журнал"),"_").concat(location.pathname),eventActionType:k.i.link,eventActionText:(0,C.b)(a.title),eventLabel:""});let i=document.getElementById("".concat(a.id,"_content_header_").concat(t));i&&(0,T.Q)((0,T.n)(i)-32)},el=!w&&!!q.length&&0!==x.show_content;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{ref:J,className:(0,o.Z)(X().article,{[X().app]:w,[X().skeleton]:A}),children:[(0,i.jsxs)("div",{className:X().articleContentWrapper,children:[!w&&(0,i.jsxs)("div",{className:X().topInfoWrapper,children:[(0,i.jsx)(S.Yx,{env:f,tag:ea}),(0,i.jsxs)("div",{className:X().rightInfo,children:[(0,i.jsxs)("div",{className:X().share,onClick:()=>{(0,k.I)({eventCategory:"".concat((0,C.b)("журнал"),"_").concat(location.pathname),eventActionType:k.i.button,eventActionText:(0,C.b)("поделиться"),eventLabel:""}),G(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]:U}),title:x.title,url:"/".concat(x.url)})]})]}),(0,i.jsx)(H,{date:x.update_time,variant:"mobile"}),(0,i.jsx)("h1",{dangerouslySetInnerHTML:{__html:(0,b.I)(x.title)}}),(0,i.jsx)("div",{className:X().anons,dangerouslySetInnerHTML:{__html:$}}),(0,i.jsx)(z,{post:x,BASE_URL:er,postViews:F}),!!(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(er,"/img/posts/big/").concat(x.image.file),srcMobile:"".concat(er,"/img/posts/small/").concat(x.image.file),caption:x.cover_title,captionClassName:X().detailImageCaption,className:X().detailImageWrapper}),el&&(0,i.jsxs)("div",{className:X().contentTable,children:[(0,i.jsx)("label",{children:"Содержание статьи"}),(0,i.jsx)("div",{className:X().contentList,children:q.map((e,t)=>(0,i.jsx)("div",{onClick:()=>en({index:t+1,post:x}),children:e},t))})]}),(0,i.jsx)(L.L,{env:f,data:ee,params:ei,post:x,ctgs:D})]}),(0,i.jsx)("div",{className:V,style:{...Q,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"}}}]);