"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2852],{9702:function(e,t,n){n.d(t,{f:function(){return r},o:function(){return i}});let r="funds-compare-ids",i="funds-compare-tooltip-closed"},51615:function(e,t,n){n.d(t,{T:function(){return l}});var r=n(2265),i=n(99376),o=n(49090);function a(e){return[...new Set(e.filter(e=>"string"==typeof e))].slice(0,4)}function c(e){let t=new URLSearchParams;return e.forEach(e=>{t.append("productIds",e)}),"/compare?".concat(t.toString())}function l(e){let{enabled:t,storageKey:n,initialCompareIds:l}=e,u=(0,i.useRouter)(),[s,d]=(0,r.useState)([]),[f,p]=(0,r.useState)(!1),[m,g]=(0,r.useState)(!1),h=s.length,v=(0,r.useCallback)(e=>{if(!e.length){p(!1);return}p(!0)},[]);(0,r.useEffect)(()=>{if(t){if(l){let e=a(l);window.localStorage.setItem(n,JSON.stringify(e)),d(e),g(!0);return}d(function(e,t){if(!e)return[];let n=window.localStorage.getItem(t);if(!n)return[];try{let e=JSON.parse(n);if(!Array.isArray(e))return[];return a(e)}catch(e){return window.localStorage.removeItem(t),[]}}(t,n)),g(!0)}},[t,l,n]),(0,r.useEffect)(()=>{m&&v(s)},[s,m,v]);let E=(0,r.useCallback)(()=>{s.length<2||u.push(c(s))},[s,u]),S=(0,r.useCallback)(e=>{d(t=>{let r=t.filter(t=>t!==e);return r.length<2?t:(window.localStorage.setItem(n,JSON.stringify(r)),u.replace(c(r)),r)})},[u,n]),_=(0,r.useCallback)(()=>{window.localStorage.removeItem(n),d([]),p(!1)},[n]);return{compareIds:s,isCompareLimitReached:s.length>=4,isSnackbarClickable:h>1,isSnackbarOpen:f,snackbarDescription:1===h?"Добавьте еще один для сравнения":"Максимум для сравнения - 4",snackbarTitle:"Сравнить: ".concat((0,o._6)(h,["фонд","фонда","фондов"])),closeSnackbar:()=>p(!1),clearCompare:_,onSnackbarClick:E,removeCompare:S,toggleCompare:function(e){d(t=>{let r;return r=t.includes(e)?t.filter(t=>t!==e):t.length>=4?t:[...t,e],window.localStorage.setItem(n,JSON.stringify(r)),r})}}}},1883:function(e,t,n){n.d(t,{_:function(){return a}});var r=n(30631);let i=n(64131).Z.get("auth.gtm_customer_id"),o=e=>{(0,r.AB)(e)};function a(e,t,n){o({event:"data_event",customer_id:i,eventCategory:e,eventAction:t,eventLabel:null==n?void 0:n.eventLabel,eventValue:null==n?void 0:n.eventValue})}},30811:function(e,t,n){var r,i;n.d(t,{x:function(){return r}}),(i=r||(r={})).Form="form",i.Link="link",i.Header="header",i.Breadcrumbs="breadcrumbs",i.Image="image",i.Button="button",i.Dropdown="dropdown",i.Slider="slider",i.Switcher="switcher",i.Banner="banner",i.Checkbox="checkbox",i.Radiobutton="radiobutton",i.Text="text",i.List="list",i.Block="block",i.Collapse="collapse",i.Chart="chart",i.Modal="modal",i.Table="table",i.Icon="icon",i.Chips="chips",i.Tile="tile",i.Caption="caption",i.Input="input",i.Tabs="tabs",i.Tag="tag",i.Toggle="toggle",i.Drawer="drawer",i.Select="select",i.Hint="hint",i.Label="label",i.ProgressBar="progressbar"},34057:function(e,t,n){n.d(t,{xJ:function(){return M.x},nC:function(){return _},al:function(){return C},K7:function(){return I},jV:function(){return S},sM:function(){return g},gQ:function(){return h},X_:function(){return v},xl:function(){return b},Cp:function(){return E}}),(m=g||(g={})).OneMonth="ONE_MONTH",m.ThreeMonths="THREE_MONTHS",m.SixMonth="SIX_MONTH",m.OneYear="ONE_YEAR",m.ThreeYears="THREE_YEARS",m.FiveYears="FIVE_YEARS";var r,i,o,a,c,l,u,s,d,f,p,m,g,h,v,E,S,_,C,b,I,y,A,w,M=n(30811);(r=h||(h={})).High="HIGH",r.Medium="MEDIUM",r.Low="LOW",(i=v||(v={})).Asc="ASC",i.Desc="DESC",(o=E||(E={})).YieldMonth="YIELD_MONTH",o.YieldQuarter="YIELD_QUARTER",o.YieldHalfYear="YIELD_HALF_YEAR",o.YieldYear="YIELD_YEAR",o.YieldThreeYear="YIELD_THREE_YEAR",o.YieldFiveYear="YIELD_FIVE_YEAR",o.YieldAll="YIELD_ALL",(a=S||(S={})).Sca="NET_ASSET_VALUE",a.MinimalPurchaseAmount="MINIMAL_PURCHASE_AMOUNT",(c=_||(_={}))[c.MinValue=100]="MinValue",c[c.IsAuthorFund=1]="IsAuthorFund",(l=C||(C={})).Mixed="MIXED",l.Bond="BOND",l.Stock="STOCK",l.Metal="METAL",l.Money="MONEY",l.Realty="REALTY",l.None="NONE",(u=b||(b={})).Extended="extended",u.Quick="quick",(s=I||(I={}))[s.Yield=0]="Yield",s[s.ManagementCompanies=1]="ManagementCompanies",s[s.Risks=2]="Risks",s[s.Category=3]="Category",(d=y||(y={})).View="view",d.Buy="buy",(f=A||(A={})).Rational="Оптимальный",f.Aggressive="Активный рост",f.Conservative="Минимальный риск",(p=w||(w={})).Archived="ARCHIVED",p.Demo="DEMO",p.Draft="DRAFT",p.Published="PUBLISHED"},93398:function(e,t,n){n.d(t,{tC:function(){return r},pY:function(){return i}});let r=45,i="/invest/funds"},90917:function(e,t,n){n.d(t,{E0:function(){return g},p6:function(){return E},JC:function(){return _},NM:function(){return C},Rz:function(){return m},SJ:function(){return a},kj:function(){return b},j0:function(){return I},ow:function(){return w},ld:function(){return M},lt:function(){return R}});var r=n(1883),i=n(93398),o=n(50666);function a(e){return(0,o.env)(e)}let c=e=>/^https:\/\//gi.test(e),l=e=>["",...e.replace(/^http(s)?:\/\//gi,"").replace(/\/$/,"").split(".").slice(-2)].join("."),u=()=>window.location.host.indexOf("localhost")>=0,s=e=>('"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)),d=e=>encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent),f=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[(]/g,"%28").replace(/[)]/g,"%29"),p=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:365,r=a("NEXT_PUBLIC_SHOWCASE_ORIGIN"),i=u()?"":"; domain=".concat(l(r)),o=new Date(new Date().getTime()+864e5*n).toUTCString();document.cookie="".concat(f(e),"=").concat(d("string"==typeof t?t:JSON.stringify(t)),"; SameSite=None").concat(c(r)?"; Secure":"").concat(i,"; expires=").concat(o,"; path=/;")},m=(e,t,n)=>{if(null==e?void 0:e.aggregator_id){let a={...e,...n&&{platformProductId:n},create_date:new Date().toISOString()},c={payload:[]};try{var o;c=JSON.parse((null===(o=function(){if("undefined"!=typeof document&&document.cookie)return Object.fromEntries(document.cookie.split("; ").map(e=>e.split("=")).map(e=>e.map(e=>s(e))))}())||void 0===o?void 0:o.cpa_click)||"{}")}catch(e){return}c.payload||(c.payload=[]),c.payload.push(a),t[e.aggregator_id]&&(p("cpa_click",c,i.tC),(0,r._)(e.aggregator_id,"CPA_click",{eventLabel:window.location.pathname,eventValue:e.utm_term||e.click_id,utm_source:e.utm_source,utm_campaign:e.utm_campaign,utm_medium:e.utm_medium}))}};function g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"primary";return e.filter(e=>{var t;return null===(t=e.params)||void 0===t?void 0:t.visible}).map(e=>{var n,r;return{...e,params:{visible:e.params.visible,variant:null!==(n=e.params.variant)&&void 0!==n?n:t,priority:null!==(r=e.params.priority)&&void 0!==r?r:Number.MAX_SAFE_INTEGER}}}).toSorted((e,t)=>e.params.priority-t.params.priority).map(e=>({label:e.displayName,variant:e.params.variant,dataQa:e.code,hint:e.description}))}var h=n(67603),v=n(50692);function E(e,t){let{format:n="dd.MM.yy"}=null!=t?t:{};try{if("string"==typeof e)return(0,h.Z)(new Date(e),n,{locale:v.Z});return(0,h.Z)(e,n,{locale:v.Z})}catch(t){return e}}var S=n(49090);function _(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{length:n}=String(Math.floor(e)),r=t?"\xa0₽":"";return n>7&&n<10?"".concat(String(+(e/1e6).toFixed(2)).replace(".",","),"\xa0млн").concat(r):n>=10&&n<13?"".concat(String(+(e/1e9).toFixed(2)).replace(".",","),"\xa0млрд").concat(r):n>=13?"".concat(String(+(e/1e12).toFixed(2)).replace(".",","),"\xa0трлн").concat(r):(0,S.lb)(e,{decimalCount:2,hasCurrencySymbol:t,decimalIsWithoutZeros:!0})}function C(e){if(null===e)return"—";if(0===e)return"0%";let t=e>0?"+":"";return"".concat(t).concat((0,S.lb)(e,{decimalCount:2,hasCurrencySymbol:!1}),"%")}function b(e){let t=a("NEXT_PUBLIC_SHOWCASE_ORIGIN");return{title:"Журнал Финуслуги",description:"Рассказываем о финансах, разбираем новые законы и даем лайфхаки, как приумножить доход",chips:[{id:1,label:"Инвестиции",items:e.articles.map(e=>{let{title:n,url:r,img:i,public_date:o}=e;return{title:n,dt:o,url:"".concat(t,"/").concat(r),img:"".concat(t,"/img/posts/big/").concat(null==i?void 0:i.file)}})}],url:"".concat(t,"/navigator")}}function I(e,t,n){if(e<1||!n.length)return null;let r=Math.min(e-1,n.length);return[...n.slice(0,r),t,...n.slice(r)]}var y=n(59918),A=n(30702);function w(e,t,n){let r="string"==typeof e?(0,y.Z)(e):e,i="string"==typeof t?(0,y.Z)(t):t,o="string"==typeof n?(0,y.Z)(n):n;return(0,A.Z)(r,{start:i,end:o})}function M(e){var t;return null!==(t=null==e?void 0:e.replace(/\sstyle=["\\]+[a-z0-9-:; !\s]*[\\"]+/gm,""))&&void 0!==t?t:""}function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return+e.toFixed(t)}}}]);