(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6683],{46536:function(){},45474:function(e,t,n){Promise.resolve().then(n.bind(n,90422)),Promise.resolve().then(n.bind(n,53417)),Promise.resolve().then(n.bind(n,69767)),Promise.resolve().then(n.bind(n,45456))},45456:function(e,t,n){"use strict";n.d(t,{Catalog:function(){return eI}});var a=n(57437),s=n(99376),i=n(45087),l=n(2265),r=n(42586),o=n(35563),c=n(75461),d=n(70187),u=n(61994),m=n(11690),f=n(49074),_=n(6029),h=n(69064),p=n(5083),v=n(9702),x=n(51615),b=n(1883),g=n(34057),A=n(90917);function C(e){return e.map(e=>{switch(e){case g.al.Bond:return{value:e,label:"Облигации"};case g.al.Metal:return{value:e,label:"Драгметаллы"};case g.al.Mixed:return{value:e,label:"Смешанный"};case g.al.Money:return{value:e,label:"Денежный"};case g.al.Realty:return{value:e,label:"Недвижимость"};case g.al.Stock:return{value:e,label:"Акции"};default:return{value:e,label:"Без категории"}}})}function j(e){return e.map(e=>{switch(e){case g.gQ.Low:return{value:e,label:"Низкий"};case g.gQ.Medium:return{value:e,label:"Средний"};case g.gQ.High:return{value:e,label:"Высокий"};default:return{value:e,label:"Ошибка"}}})}var w=n(36904);let k={[g.Cp.YieldMonth]:{field:"yieldMonth",text:"1 мес",fullText:"Доходность: 1 мес"},[g.Cp.YieldQuarter]:{field:"yieldQuarter",text:"3 мес",fullText:"Доходность: 3 мес"},[g.Cp.YieldHalfYear]:{field:"yieldHalfYear",text:"6 мес",fullText:"Доходность: 6 мес"},[g.Cp.YieldYear]:{field:"yieldYear",text:"1 год",fullText:"Доходность: 1 год"},[g.Cp.YieldThreeYear]:{field:"yieldThreeYear",text:"3 года",fullText:"Доходность: 3 года"},[g.Cp.YieldFiveYear]:{field:"yieldFiveYear",text:"5 лет",fullText:"Доходность: 5 лет"},[g.Cp.YieldAll]:{field:"yieldAll",text:"за все время",fullText:"Доходность: за все время"}};function S(e,t,n){var a,s;let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l={[g.K7.Yield]:()=>(function(e){let{value:t}=e;return k[t].fullText||k[g.Cp.YieldAll].fullText})(t),[g.K7.ManagementCompanies]:()=>T(t,n,"Управляющая компания","shortName","Все",i),[g.K7.Risks]:()=>T(t,n,"Риск","label","Любой",i),[g.K7.Category]:()=>T(t,n,"Активы","label","Все",i)};return null!==(s=null===(a=l[e])||void 0===a?void 0:a.call(l))&&void 0!==s?s:""}function T(e,t,n,a,s,i){let l=e.length;if(l===t)return i?s:"".concat(n,": ").concat(s.toLowerCase());if(1===l){let t=e[0][a];return i?t:"".concat(n,": ").concat(t)}return i?"Выбрано: ".concat(l):"".concat(n,": выбрано ").concat(l)}function N(e,t,n){if(!Array.isArray(t)||0!==t.length)return{id:e,label:S(e,t,n)}}function F(e){let{yieldSortingField:t,selectedRisks:n,risksMaxLength:a,selectedManagementCompanies:s,managementCompaniesMaxLength:i}=e,l=N(g.K7.Yield,t),r=N(g.K7.Risks,n,a),o=N(g.K7.ManagementCompanies,s,i);return[...l?[l]:[],...r?[r]:[],...o?[o]:[]]}var y=n(98852);function B(e){let{selectedManagementCompanies:t,managementCompanies:n,updateManagementCompanyIds:s,dataQa:i,gtmEventAction:l,label:r="Управляющая Компания"}=e;return(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Select,name:i},children:(0,a.jsx)(c.Ph,{label:r,multiple:!0,optionLabel:"shortName",optionValue:"id",value:t,options:n,selectedValue:e=>S(g.K7.ManagementCompanies,e,n.length,!0),onChange:e=>{s(e),(0,b._)("investment_funds",l)}})})}function E(e){let{risks:t,selectedRisks:n,updateRisks:s,dataQa:i,gtmEventAction:l,label:r="Риск"}=e;return(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Select,name:i},children:(0,a.jsx)(c.Ph,{label:r,multiple:!0,options:t,value:n,selectedValue:e=>S(g.K7.Risks,e,t.length,!0),onChange:e=>{(0,b._)("investment_funds",l),s(e)}})})}var I=n(96369);function P(e){let{chipses:t,value:n,renderField:s,updateTagFiltersChips:i}=e,l=(0,I.J)(),r=t.filter(e=>!0===e.params[s]).sort((e,t)=>{var n,a,s,i;return(null!==(s=null===(n=e.params)||void 0===n?void 0:n.priority)&&void 0!==s?s:0)-(null!==(i=null===(a=t.params)||void 0===a?void 0:a.priority)&&void 0!==i?i:0)});return(0,a.jsx)(c.cL,{dataQa:l({element:g.xJ.Block,name:s}),chips:r,multiple:!0,value:n,onChipClick:(e,t,n)=>{i(n)}})}var M=n(39145),L=n.n(M);function R(e){let{title:t,subtitle:n,chips:s,onChipClicked:i,value:l,dataQa:r}=e;return(0,a.jsxs)("div",{className:L().minInvestWrapper,children:[(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Text,name:"drawer".concat(r,"Header")},children:(0,a.jsx)(o.xv,{size:"16",weight:"medium",children:t})}),(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Text,name:"drawer".concat(r,"Text")},children:(0,a.jsx)(o.xv,{className:L().text,children:n})})]}),(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Chips,name:"drawer".concat(r)},children:(0,a.jsx)(c.cL,{className:"mt-4",chips:s,value:l,onChipClick:i})})]})}function J(e){let{isDrawerOpen:t,sortTypeOptions:n,categories:s,managementCompanies:i,tags:l,risks:d,yieldSortingField:u,selectedRisks:m,selectedCategories:f,selectedManagementCompanies:_,selectedMinInvest:h,selectedIsClubFund:v,selectedTags:x,sortOrder:C,onClose:j,updateSortBy:k,checkRadio:T,updateRisks:N,updateCategories:F,updateMinInvestChips:y,updateIsClubFundChips:I,updateTagFiltersChips:M,updateSortOrderChips:J,updateYieldSortingField:Q,updateManagementCompanyIds:U,handleSubmitButton:W,handleResetButton:z}=e,V=(0,r.useTranslations)(),D="true"===(0,A.SJ)("NEXT_PUBLIC_FEATURE_TOGGLE_TAGS_AND_BADGES")&&l.length>0;function G(e){0===e&&(0,b._)("investment_funds","investment_funds_filter_minimal_amount_any"),1===e&&(0,b._)("investment_funds","investment_funds_filter_minimal_amount_below_100"),2===e&&(0,b._)("investment_funds","investment_funds_filter_minimal_amount_below_1000"),3===e&&(0,b._)("investment_funds","investment_funds_filter_minimal_amount_below_100000"),y(w.Vq[e])}return(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Drawer,name:"showcase"},children:(0,a.jsxs)(c.u_,{dataQa:"app-filter-modal",header:{title:V("sc-fund.showcase.drawer.title")},size:"l",open:t,onClose:()=>{(0,b._)("investment_funds","investment_funds_filter_close"),j()},footer:{children:(0,a.jsxs)("div",{className:L().modalFooter,children:[(0,a.jsx)(p.T,{className:L().footerButtonWrapper,dataQa:{element:g.xJ.Button,name:"drawerReset"},children:(0,a.jsx)(c.zx,{size:"m",variant:"secondary",label:V("sc-fund.showcase.drawer.button.reset"),stretch:!0,onClick:z})}),(0,a.jsx)(p.T,{className:L().footerButtonWrapper,dataQa:{element:g.xJ.Button,name:"drawerSubmit"},children:(0,a.jsx)(c.zx,{size:"m",label:V("sc-fund.showcase.drawer.button.submit"),stretch:!0,onClick:W})})]})},children:[(0,a.jsxs)("div",{className:L().filters,children:[(0,a.jsxs)("div",{className:L().selectWrapper,children:[(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Select,name:"drawerYield"},children:(0,a.jsx)(c.Ph,{label:"Доходность",options:w.zJ,value:u,onChange:e=>{(0,b._)("investment_funds","investment_funds_filter_profit"),Q(e)}})}),(0,a.jsx)(B,{selectedManagementCompanies:_,managementCompanies:i,updateManagementCompanyIds:U,dataQa:"drawerUk",gtmEventAction:"investment_funds_filter_management_Company"}),(0,a.jsx)(E,{risks:d,selectedRisks:m,updateRisks:N,dataQa:"drawerRisk",gtmEventAction:"investment_funds_filter_risk"}),(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Select,name:"drawerActives"},children:(0,a.jsx)(c.Ph,{label:"Активы фонда",options:s,value:f,multiple:!0,selectedValue:e=>S(g.K7.Category,e,s.length,!0),onChange:e=>{(0,b._)("investment_funds","investment_funds_filter_assets"),F(e)}})})]}),D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:L().tagsBlock,children:[(0,a.jsx)(o.xv,{size:"16",weight:"medium",children:V("sc-fund.showcase.drawer.tag.fiter.title")}),(0,a.jsx)(P,{updateTagFiltersChips:M,chipses:l,value:x,renderField:g.xl.Extended})]}),(0,a.jsx)(R,{title:V("sc-fund.showcase.drawer.filter.title"),subtitle:V("sc-fund.showcase.drawer.filter.text"),chips:w.Vq,value:h.id,onChipClicked:e=>{G(e)},dataQa:"MinInvest"}),(0,a.jsx)(o.iz,{})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(R,{title:V("sc-fund.showcase.drawer.filter.title"),subtitle:V("sc-fund.showcase.drawer.filter.text"),chips:w.Vq,value:h.id,onChipClicked:e=>{G(e)},dataQa:"MinInvest"}),(0,a.jsx)(o.iz,{}),(0,a.jsx)(R,{title:V("sc-fund.showcase.drawer.club-fund.title"),subtitle:V("sc-fund.showcase.drawer.club-fund.text"),chips:w.L8,value:v.id,onChipClicked:e=>{0===e&&(0,b._)("investment_funds","investment_funds_is_club_fund_true"),1===e&&(0,b._)("investment_funds","investment_funds_is_club_fund_false"),I(w.L8[e])},dataQa:"ClubFund"}),(0,a.jsx)(o.iz,{className:"mb-8"})]})]}),(0,a.jsxs)("div",{className:L().sortBlock,children:[(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Form,name:"drawerSortTitle"},children:(0,a.jsx)(o.xv,{size:"16",weight:"medium",children:V("sc-fund.showcase.drawer.sort.title")})}),(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Chips,name:"drawerSortOrder"},children:(0,a.jsx)(c.cL,{chips:w.jW,value:C.id,onChipClick:e=>J(e)})}),(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Block,name:"drawerSortValue"},children:n.map(e=>(0,a.jsx)(c.Y8,{value:e.value,checked:T(e),label:e.label,name:"sortBy",onChange:k},e.value))})]})]})})}var Q=n(80684);function U(e){var t;let{searchValue:n,searchResults:i,onSearchChange:l,isSearchResultsLoading:r}=e,o=(0,I.J)(),d=(0,s.useRouter)(),u=null!==(t=null==i?void 0:i.data.map(e=>{var t;let n=(null===(t=e.name)||void 0===t?void 0:t.trim())||null;return n?{value:e.id,label:n}:null}).filter(Boolean))&&void 0!==t?t:[],m=n.trim().length>0?(0,a.jsx)(Q.IconFdsCloseO,{onClick:function(){l("")}}):(0,a.jsx)(Q.IconFdsSearchO,{});return(0,a.jsx)(c.kn,{dataQa:o({element:g.xJ.Input,name:"search"}),label:"Фонд или УК",pending:r,icon:m,value:n,onChange:l,onSelect:e=>{e&&d.push("/".concat(e.value))},options:u,desktopMaxHeight:256})}var W=n(46075),z=n.n(W),V=n(91373);let D=(0,A.SJ)("NEXT_PUBLIC_MP_SC_INVESTMENT_API_URL"),G={fetchFundsFromSc:async e=>(0,V.Z)("/api/v1/funds",{baseURL:D,params:z()(e,w.op)}),fetchSearchFunds:async e=>(0,V.Z)("/api/v1/funds/search",{baseURL:D,params:e})};var Y=n(38158),O=n.n(Y);function H(e){let{risks:t,tags:n,managementCompanies:s,yieldSortingField:i,selectedTags:d,selectedRisks:u,selectedManagementCompanies:m,filterChipses:f,openAllParams:_,updateRisks:h,updateFilterChips:v,updateTagFiltersChips:x,updateYieldSortingField:C,updateManagementCompanyIds:j,handleSubmitButtonFilterPanel:k}=e,S=(0,r.useTranslations)(),T=(0,c._m)("s"),N="true"===(0,A.SJ)("NEXT_PUBLIC_FEATURE_TOGGLE_TAGS_AND_BADGES")&&n.length>0,F="true"===(0,A.SJ)("NEXT_PUBLIC_FEATURE_TOGGLE_FUNDS_SEARCH_ENABLED"),{searchQuery:y,searchResults:I,isSearchResultsLoading:M,handleSearchChange:L,totalFunds:R}=function(e){var t;let[n,a]=(0,l.useState)(""),[s,i]=(0,l.useState)(!1),[r,o]=(0,l.useState)(),[c,d]=(0,l.useState)(),u=(0,l.useRef)(null),m=(0,l.useCallback)(async()=>{},[e]);return(0,l.useEffect)(()=>{!e&&(a(""),o(void 0),i(!1),u.current&&(clearTimeout(u.current),u.current=null)),m()},[e,m]),{searchQuery:n,searchResults:r,isSearchResultsLoading:s,handleSearchChange:(0,l.useCallback)(t=>{if(!e)return;a(t),u.current&&clearTimeout(u.current);let n=t.trim();if(n.length<1){o(void 0),i(!1);return}u.current=setTimeout(async()=>{i(!0);try{let e=await G.fetchSearchFunds({query:n});o(e)}catch(e){console.error("Ошибка поиска фондов:",e),o(void 0)}finally{i(!1)}},180)},[e]),totalFunds:null!==(t=null==c?void 0:c.total)&&void 0!==t?t:0}}(F);return(0,a.jsx)(o.W2,{className:O().container,children:(0,a.jsxs)(o.Zb,{className:O().card,as:"form",children:[F&&(0,a.jsx)("div",{className:O().searchWrapper,children:(0,a.jsx)(U,{fundsTotal:R,searchValue:y,searchResults:I,onSearchChange:L,isSearchResultsLoading:M})}),(0,a.jsxs)("div",{className:O().contentWrapper,children:[(0,a.jsxs)("div",{className:O().filtersBlock,children:[(0,a.jsxs)("div",{className:O().filters,children:[(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Select,name:"filterPanelYield"},children:(0,a.jsx)(c.Ph,{options:w.zJ,label:"Доходность",value:i,onChange:e=>{(0,b._)("investment_funds","investment_funds_view"),C(e)}})}),(0,a.jsx)(B,{selectedManagementCompanies:m,managementCompanies:s,updateManagementCompanyIds:j,dataQa:"filterPanelManagementCompanies",gtmEventAction:"investment_funds_quick_managementCompany"}),(0,a.jsx)(E,{risks:t,selectedRisks:u,updateRisks:h,dataQa:"filterPanelRisk",gtmEventAction:"investment_funds_quick_risk"})]}),(0,a.jsx)(p.T,{className:O().chipses,dataQa:{element:g.xJ.Chips,name:"filterPanelChips"},children:N?(0,a.jsx)(P,{updateTagFiltersChips:x,chipses:n,value:d,renderField:g.xl.Quick}):(0,a.jsx)(c.cL,{multiple:!0,chips:w.EI,value:f,onChipClick:e=>{e===g.nC.IsAuthorFund&&(0,b._)("investment_funds","investment_funds_quick_author_funds"),e===g.nC.MinValue&&(0,b._)("investment_funds","investment_funds_quick_minimal_amount"),v(e)}})})]}),(0,a.jsxs)("div",{className:O().buttons,children:[(0,a.jsx)(p.T,{className:O().buttonWrapper,dataQa:{element:g.xJ.Button,name:"filterPanelOpenAllFilters"},children:(0,a.jsx)(c.zx,{className:O().allParamsButton,label:S("sc-fund.showcase.filter-panel.button.all-params"),size:T?"m":"s",iconLeft:(0,a.jsx)(Q.IconFdsParametersHorizontalO,{}),variant:"secondary",onClick:()=>{(0,b._)("investment_funds","investment_funds_main_Filter"),_()}})}),(0,a.jsx)(p.T,{className:O().buttonWrapper,dataQa:{element:g.xJ.Button,name:"filterPanelSubmit"},children:(0,a.jsx)(c.zx,{label:S("sc-fund.showcase.filter-panel.button.submit"),size:T?"m":"s",className:O().submitButton,onClick:()=>{(0,b._)("investment_funds","investment_funds_filter_display"),k()}})})]})]})]})})}var X=n(33145),K=n(27648),Z=n(77337),q=n(97448),$=n.n(q),ee={src:"/invest/funds/_next/static/media/banner-card-bg-desktop.e7f4bdc9.png",height:253,width:485,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAACVBMVEVvc/Fmf/JnfewXmjGTAAAAA3RSTlMCGDBdMLhFAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGElEQVR4nGNgYGBgZGRkYoLQjIyMDBgAAAF0AA4HPJrsAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:4},et={src:"/invest/funds/_next/static/media/banner-card-bg-mobile.a3f015ef.png",height:202,width:387,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAACVBMVEVxdvFlfedlfu8RS/ZgAAAAA3RSTlMCGC/QOLWwAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGUlEQVR4nGNgYGBgZGRkYmKAMBgZQQxUAAABXAANppYWPAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:4},en={src:"/invest/funds/_next/static/media/lion-desktop.f87ddd45.png",height:266,width:266,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAS1BMVEVMaXFvSlj/rF7PXDV7Q0fmr3v/4Kb/knHqt4HTknUZGUz8uXDwkUOoYUi+TzDpkEmibmKgVULgl2moSTDneTjRm3r6mUeqc2SqSyg4a6wSAAAAFHRSTlMALD6BcWQhAioRFL7T+eHyLBv36PMFyfIAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA9SURBVHicJYpJEoAgEMSCKA1uKI7L/19qjd5SSUDkToBgsogQw2VrcZNnO3aHVJ/+S6kt4X/O2w2ULYzwAj31AcN+cRhiAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8},ea={src:"/invest/funds/_next/static/media/lion-mobile.f69e8b38.png",height:196,width:197,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAY1BMVEVMaXFyUVk1KU1OOk76lkHDjnLvzKK+mXLqtn//5aamb1+aZV/ns4rUZ0LhdTr5wYKrTzzgiFD8r2CbPyr9vW7kiURxNC/wmlmgSjbatoW3Uzjvhz3NWi7VbTHGUyvZkWqzVTU5gRi5AAAAG3RSTlMA1isN++dCA3EU4sv6Z3FgQ+Xn8cK5jdG1Kqil6FDhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAQUlEQVR4nB2KRxKAIBDAoqJrR7ALlv+/0llyykwCgt1HFFlCHECojYmXyrmG59DU+HuekrhvQxCq/u2KNJdtlvMDX6wCh75RmlUAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8};let es=(0,Z.xn)((0,A.SJ)("NEXT_PUBLIC_PROMO_PAGE_URL"),"/authors_funds");function ei(){let e=(0,c._m)("s"),t=(0,r.useTranslations)(),[n,s]=(0,l.useState)(!0),i=e?266:166;return(0,l.useEffect)(()=>{setTimeout(()=>{s(!1)})},[]),(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Block,name:"bannerCard"},children:(0,a.jsxs)("a",{href:es,className:$().banner,onClick:()=>{(0,b._)("investment_funds","investment_funds_banner_author")},children:[(0,a.jsxs)("div",{className:$().textWrapper,children:[(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Text,name:"bannerTitle"},children:(0,a.jsx)(o.xv,{fontFamily:"primary",className:$().title,children:t("sc-fund.showcase.banner.title")})}),(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Text,name:"bannerText"},children:(0,a.jsx)(o.xv,{as:"p",className:$().text,children:t("sc-fund.showcase.banner.text")})})]}),!n&&(0,a.jsxs)("div",{className:$().images,children:[(0,a.jsx)("div",{className:$().lionWrapper,children:(0,a.jsx)(X.default,{alt:"lion",src:e?en:ea,className:$().lion,unoptimized:!0,width:i,height:i})}),(0,a.jsx)("div",{className:$().backgroundWrapper,children:(0,a.jsx)(X.default,{alt:"lion-background",src:e?ee:et,className:$().background,height:e?253:202,width:e?485:387,unoptimized:!0})}),(0,a.jsx)(p.T,{className:$().buttonWrapper,dataQa:{element:g.xJ.Button,name:"bannerLink"},children:(0,a.jsx)(c.zx,{size:"xs",stretch:!0,variant:"white",label:t("sc-fund.showcase.banner.button"),as:K.default,href:es})})]})]})})}var el=n(49090),er=n(98456),eo=n(61896),ec=n(27829),ed=n(97859),eu=n(16076),em=n(20633),ef=n.n(em);function e_(e){let{children:t,title:n,content:s,open:i,closeAriaLabel:r,placement:o="top-end",withOverlay:d=!1,onClose:u}=e,m=(0,c._m)("s"),[f,_]=(0,l.useState)(null),{refs:h,floatingStyles:p,context:v,middlewareData:x,placement:b}=(0,eo.YF)({open:i,onOpenChange(e){e||u()},placement:o,whileElementsMounted:ec.Me,middleware:[(0,ed.cv)({mainAxis:20,crossAxis:m?24:16}),(0,ed.RR)(),(0,ed.uY)({padding:16}),(0,ed.x7)({element:f})]}),g=(0,eo.bQ)(v,{outsidePress:!d}),{getFloatingProps:A}=(0,eo.NI)([g]),C=b.split("-")[0],j=x.arrow,w=void 0!==j?j.x:void 0,k=void 0!==j?j.y:void 0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{ref:e=>{h.setReference(e)},className:i?ef().referenceActive:void 0,children:t}),i&&(0,a.jsx)(eu.Portal,{children:(0,a.jsxs)(a.Fragment,{children:[d&&(0,a.jsx)("button",{type:"button",className:ef().overlay,onClick:u,"aria-label":r}),(0,a.jsxs)("div",{ref:e=>{h.setFloating(e)},style:p,className:ef().floating,...A(),children:[(0,a.jsx)("div",{ref:_,className:ef().arrow,style:{left:void 0!==w?"".concat(w,"px"):"",top:void 0!==k?"".concat(k,"px"):"",right:"",bottom:"",[({top:"bottom",right:"left",bottom:"top",left:"right"})[C]]:"-6px"}}),(0,a.jsx)("button",{type:"button",className:ef().closeButton,onClick:u,"aria-label":r,children:(0,a.jsx)(Q.IconFdsCloseO,{size:24})}),n,s]})]})})]})}var eh=n(78164),ep=n.n(eh);let ev=(0,A.SJ)("NEXT_PUBLIC_FEATURE_TOGGLE_TAGS_AND_BADGES"),ex=(0,A.SJ)("NEXT_PUBLIC_FEATURE_TOGGLE_FUNDS_COMPARE_ENABLED");function eb(e){let{card:t,cardYieldField:n,promotionsIds:s,isCompared:i=!1,isCompareDisabled:d=!1,showCompareHint:m=!1,onCloseCompareHint:f,onToggleCompare:_}=e,h=(0,r.useTranslations)(),v=(0,A.E0)(t.tags||[]),x=[...(null==s?void 0:s[t.id])?[{label:"Акция",dataQa:"promotion",variant:"red"}]:[]],[C,j]=(0,l.useState)(!1),[w,S]=(0,l.useState)(null),{text:T,field:N}=k[n],F=t[N];return(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Block,name:"fundCard"},children:(0,a.jsxs)(o.Zb,{variant:"secondary",className:ep().card,onClick:()=>{(0,b._)("investment_funds","investment_funds_details_fund")},children:[(0,a.jsxs)("div",{className:ep().contentBlock,children:[(0,a.jsxs)("div",{className:ep().emitent,children:[(0,a.jsx)(p.T,{className:ep().elementLogo,dataQa:{element:g.xJ.Image,name:"fundLogo"},children:(0,a.jsx)(er.G2,{logoKey:t.logoKey,alt:"логотип ".concat(t.displayName),s3MinioUrl:(0,A.SJ)("NEXT_PUBLIC_S3_ASSETS")})}),(0,a.jsxs)("div",{className:ep().emitentInfo,children:[(0,a.jsx)(p.T,{className:ep().subtitle,dataQa:{element:g.xJ.Text,name:"ukTitle"},children:t.managementCompanyName}),(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Text,name:"fundTitle"},children:(0,a.jsx)(o.xv,{as:"p",size:"18",weight:"medium",children:t.displayName})})]})]}),(0,a.jsxs)("div",{className:ep().offerWrapper,children:[(0,a.jsxs)(p.T,{className:ep().offerBlock,dataQa:{element:g.xJ.Text,name:"yield"},children:[(0,a.jsx)("div",{className:ep().subtitle,children:h("sc-fund.showcase.card.yield",{yield:T})}),(0,a.jsx)(o.xv,{className:(0,u.Z)({[ep().green]:F>0,[ep().red]:F<0}),as:"p",size:"24",weight:"medium",children:(0,A.NM)(F)})]}),(0,a.jsxs)(p.T,{className:ep().offerBlock,dataQa:{element:g.xJ.Text,name:"sca"},children:[(0,a.jsx)("div",{className:ep().subtitle,children:h("sc-fund.showcase.card.netAssetValue")}),(0,a.jsx)(o.xv,{as:"p",size:"24",weight:"medium",children:null!==t.netAssetValue?(0,A.JC)(t.netAssetValue,!1):"—"})]}),(0,a.jsxs)(p.T,{className:ep().offerBlock,dataQa:{element:g.xJ.Text,name:"buyFrom"},children:[(0,a.jsx)("div",{className:ep().subtitle,children:h("sc-fund.showcase.card.minimalPurchaseAmount")}),(0,a.jsx)(o.xv,{as:"p",size:"24",weight:"medium",children:null!==t.minimalPurchaseAmount?(0,el.lb)(t.minimalPurchaseAmount,{decimalIsWithoutZeros:!0}):"—"})]})]}),(0,a.jsx)("div",{className:ep().tags,children:("true"===ev?v:x).map(e=>(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Tag,name:e.dataQa},children:(0,a.jsx)(c.Vp,{label:e.label,variant:e.variant,dataQa:e.dataQa,rounded:!0,onIconRightClick:()=>{e.hint&&(S(e),j(!0))},iconRight:e.hint?(0,a.jsx)(Q.IconFdsQuestionCircleO,{className:ep().captionIcon}):void 0})},e.dataQa))})]}),(0,a.jsxs)("div",{className:ep().actions,children:[(0,a.jsx)(p.T,{className:ep().buttonBlock,dataQa:{element:g.xJ.Link,name:"fundDetail"},children:(0,a.jsx)(c.zx,{href:"/".concat(t.id),as:K.default,label:h("sc-fund.showcase.card.button.detail"),size:"xs",stretch:!0,target:"_blank"})}),ex&&(0,a.jsx)(e_,{title:(0,a.jsx)("h3",{className:ep().compareHintTitle,children:h("sc-fund.showcase.compare.hint.title")}),content:(0,a.jsx)("p",{className:ep().compareHintText,children:h("sc-fund.showcase.compare.hint.text")}),closeAriaLabel:h("sc-fund.showcase.compare.hint.close"),onClose:()=>null==f?void 0:f(),open:m,withOverlay:!0,children:(0,a.jsx)(p.T,{className:ep().compareButtonBlock,dataQa:{element:g.xJ.Button,name:"compareFund"},children:(0,a.jsx)(c.zx,{"aria-label":h("sc-fund.showcase.card.button.compare"),label:h("sc-fund.showcase.card.button.compare.label"),iconLeft:(0,a.jsx)(Q.IconFdsCompareO,{}),onClick:e=>{e.preventDefault(),e.stopPropagation(),null==_||_(t.id)},size:"xs",stretch:!0,variant:i?"primary":"secondary",disabled:d})})})]}),(0,a.jsx)(c.u_,{dataQa:"app-tag-hint-modal",header:{title:""},size:"l",open:C,onClose:()=>j(!1),footer:{children:(0,a.jsx)(o.X2,{children:(0,a.jsx)(o.JX,{size:{xs:12,s:5},children:(0,a.jsx)(c.zx,{label:"Понятно",stretch:!0,variant:"secondary",onClick:()=>j(!1)})})})},children:null==w?void 0:w.hint})]})})}var eg=n(63043),eA=n.n(eg);function eC(e){let{funds:t,cardYieldField:n,promotionsIds:s,compareIds:i,isCompareLimitReached:l,showCompareHint:r,onCompareHintCardMount:o,onCloseCompareHint:c,onToggleCompare:d}=e,u=t.map((e,t)=>(0,a.jsx)("div",{ref:e=>{0===t&&o(e)},children:(0,a.jsx)(eb,{card:e,cardYieldField:n,promotionsIds:s,isCompared:i.includes(e.id),isCompareDisabled:l&&!i.includes(e.id),onToggleCompare:d,showCompareHint:0===t&&r,onCloseCompareHint:c})},e.id)),m=(0,a.jsx)(ei,{},"banner");return(0,a.jsx)("div",{className:eA().offer,children:(0,A.j0)(4,m,u)})}var ej=n(20622),ew=n.n(ej);let ek=[{id:0},{id:1},{id:2},{id:3}];function eS(){return(0,a.jsx)(a.Fragment,{children:ek.map(e=>{let{id:t}=e;return(0,a.jsx)(o.Od,{className:ew().offerSkeleton},t)})})}var eT=n(21652),eN=n.n(eT),eF=n(64927),ey=n(30357),eB=n.n(ey);function eE(e){var t;let{filterParams:n,fundsData:i,parsedSelectedParams:k,promotions:S}=e,{funds:T,risks:N,categories:B,pagination:E,tags:I,managementCompanies:P,sortTypeOptions:M,yieldSortingField:L,cardYieldField:R,selectedRisks:Q,selectedCategories:U,selectedManagementCompanies:W,selectedMinInvest:z,selectedIsClubFund:V,selectedTags:D,sortBy:Y,sortOrder:O,filterChipses:X,listFilterChipses:K,isShowOneMoreFundsButton:Z,isDefaultNoDataCard:q,isIncreaseSort:$,isError:ee,isLoading:et,getFunds:en,resetFilter:ea,checkRadio:es,showMoreFundsClick:ei,updateRisks:el,updateSortBy:er,updateCategories:eo,updateFilterChips:ec,updateMinInvestChips:ed,updateIsClubFundChips:eu,updateQuickTagFiltersChips:em,updateModalTagFiltersChips:ef,updateSortOrderChips:e_,updateSortByListFilter:eh,updateYieldSortingField:ep,updateSortOrderListFilter:ev,updateManagementCompanyIds:ex}=function(e,t,n){var a,i,r;let{managementCompanies:o,risks:c,categories:d,tags:u}=e,{selectedManagementCompanies:m,selectedParams:{risk:f,category:_,sortBy:h,sortOrder:p,clubFund:v,minimalPurchaseAmount:x,yieldSortField:b}}=n,A=j(c),k=C(d),S=null!==(r=null==u?void 0:u.filter(e=>null!==e.params&&void 0!==e.params).map(e=>({id:e.code,label:e.displayName,params:e.params})))&&void 0!==r?r:[],[T,N]=(0,l.useState)(t.data),[y,B]=(0,l.useState)(t.pagination),[E,I]=(0,l.useState)({...n.selectedParams}),[P,M]=(0,l.useState)(function(e){switch(e){case w.Pf.oneHundred:return w.Vq[1];case w.Pf.oneThousand:return w.Vq[2];case w.Pf.oneHundredThousand:return w.Vq[3];default:return w.Vq[0]}}(x)),[L,R]=(0,l.useState)(!1===v?w.L8[1]:!0===v?w.L8[2]:w.L8[0]),[J,Q]=(0,l.useState)(j(null!=f?f:[])),[U,W]=(0,l.useState)(C(null!=_?_:[])),[z,V]=(0,l.useState)(m),[D,Y]=(0,l.useState)(null!==(a=n.selectedParams.tags)&&void 0!==a?a:[]),[O,H]=(0,l.useState)(null!==(i=w.zJ.find(e=>e.value===b))&&void 0!==i?i:w.NG),[X,K]=(0,l.useState)(b||w.NG.value),[Z,q]=(0,l.useState)(v?g.nC.IsAuthorFund:void 0),[$,ee]=(0,l.useState)(x===w.Pf.oneHundred?g.nC.MinValue:void 0),[et,en]=(0,l.useState)(p===g.X_.Desc?w.jW[0]:w.jW[1]),[ea,es]=(0,l.useState)(p===g.X_.Desc),[ei,el]=(0,l.useState)((0,w.sJ)(w.NG)),[er,eo]=(0,l.useState)(null!=h?h:ei[0].value),[ec,ed]=(0,l.useState)(!1),[eu,em]=(0,l.useState)(!1),[ef,e_]=(0,l.useState)(t.pagination.total>t.data.length),[eh,ep]=(0,l.useState)(F({yieldSortingField:O,selectedRisks:J,risksMaxLength:A.length,selectedManagementCompanies:z,managementCompaniesMaxLength:o.length})),ev=(0,s.useRouter)(),ex=(0,s.usePathname)();async function eb(e){e===g.nC.IsAuthorFund?Z?(I({...E,clubFund:void 0,offset:0}),q(void 0),eg({...E,clubFund:void 0,offset:0})):(I({...E,clubFund:!0,offset:0}),q(e),eg({...E,clubFund:!0,offset:0})):e===g.nC.MinValue&&($?(eC(w.Vq[0]),I({...E,minimalPurchaseAmount:void 0,offset:0}),ee(void 0),await eg({...E,minimalPurchaseAmount:void 0,offset:0})):(eC(w.Vq[1]),I({...E,minimalPurchaseAmount:100,offset:0}),ee(e),await eg({...E,minimalPurchaseAmount:100,offset:0})))}async function eg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];ed(!0);try{let n=await G.fetchFundsFromSc(e),a=t?[...T,...n.data]:n.data,s=eN()(e,w.f9),i=s?F({yieldSortingField:w.NG,selectedRisks:[],risksMaxLength:A.length,selectedManagementCompanies:[],managementCompaniesMaxLength:o.length}):F({yieldSortingField:O,selectedRisks:J,risksMaxLength:A.length,selectedManagementCompanies:z,managementCompaniesMaxLength:o.length}),l=s?w.NG.value:e.yieldSortField;N(a),B(n.pagination),ep(i),K(l),e_(n.pagination.total>a.length),function(e){let t=(0,eF.stringify)(e,{filter:(e,t)=>{if(!w.$f.includes(e))return t}});ev.replace("".concat(ex,"?").concat(t),{scroll:!1})}(e)}catch(e){console.error(e),em(!0)}finally{ed(!1)}}async function eA(){I({...E,offset:E.offset+1}),await eg({...E,offset:E.offset+1},!0)}function eC(e){M(e),I({...E,minimalPurchaseAmount:e.value,offset:0}),e.value===g.nC.MinValue?$?ee(void 0):ee(e.value):ee(void 0)}async function ej(e){Y(e),I({...E,tags:e,offset:0}),await eg({...E,tags:e,offset:0})}async function ew(){I(w.f9),M(w.Vq[0]),Q([]),W([]),Y([]),V([]),H(w.NG),q(void 0),ee(void 0),en(w.jW[0]),K(w.NG.value),el((0,w.sJ)(w.NG)),eo(ei[0].value),await eg(w.f9)}async function ek(){let e=w.jW[ea?1:0];en(w.jW[ea?1:0]),es(e=>!e),I({...E,sortOrder:e.value,offset:0}),await eg({...E,sortOrder:e.value,offset:0})}let eS=eN()(w.f9,E);return{funds:T,risks:A,categories:k,pagination:y,tags:S,managementCompanies:o,sortTypeOptions:ei,yieldSortingField:O,cardYieldField:X,selectedMinInvest:P,selectedIsClubFund:L,selectedRisks:J,selectedCategories:U,selectedManagementCompanies:z,selectedTags:D,sortOrder:et,sortBy:er,filterState:E,isShowOneMoreFundsButton:ef,filterChipses:[$,Z],listFilterChipses:eh,isDefaultNoDataCard:eS,isIncreaseSort:ea,isLoading:ec,isError:eu,getFunds:eg,resetFilter:ew,checkRadio:function(e){return e.value===er},showMoreFundsClick:eA,updateSortBy:function(e){I({...E,sortBy:e,offset:0}),eo(e)},updateRisks:function(e){let t=e.map(e=>e.value);Q(e),I({...E,risk:t,offset:0})},updateCategories:function(e){let t=e.map(e=>e.value);W(e),I({...E,category:t,offset:0})},updateFilterChips:eb,updateSortOrderChips:function(e){en(w.jW[e]),es(e=>!e),I({...E,sortOrder:w.jW[e].value,offset:0})},updateMinInvestChips:eC,updateModalTagFiltersChips:function(e){Y(e),I({...E,tags:e,offset:0})},updateQuickTagFiltersChips:ej,updateIsClubFundChips:function(e){R(e),I({...E,clubFund:e.value}),e.value?q(g.nC.IsAuthorFund):q(void 0)},updateSortByListFilter:function(e){eo(e),I({...E,sortBy:e,offset:0}),eg({...E,sortBy:e,offset:0})},updateYieldSortingField:function(e){let t=e.value;H(e),el((0,w.sJ)(e)),I({...E,yieldSortField:t,offset:0}),er!==g.jV.MinimalPurchaseAmount&&er!==g.jV.Sca&&(eo(t),I({...E,sortBy:t,yieldSortField:t,offset:0}))},updateSortOrderListFilter:ek,updateManagementCompanyIds:function(e){let t=e.map(e=>e.id);V(e),I({...E,managementCompanyIds:t,offset:0})}}}(n,i,k),[eb,eg]=(0,l.useState)(!1),eA=(0,l.useRef)(null),ej=(0,l.useRef)(null),ew=(0,c._m)("s"),[ek,eT]=(0,l.useState)(!1),ey=(0,r.useTranslations)(),eE=(0,l.useMemo)(()=>(0,_.z6)({promotions:S,type:"SITE"}),[S]),eI="true"===(0,A.SJ)("NEXT_PUBLIC_FEATURE_TOGGLE_FUNDS_COMPARE_ENABLED"),{compareIds:eP,isCompareLimitReached:eM,toggleCompare:eL,isSnackbarOpen:eR,isSnackbarClickable:eJ,snackbarTitle:eQ,snackbarDescription:eU,closeSnackbar:eW,onSnackbarClick:ez}=(0,x.T)({enabled:eI,storageKey:v.f}),{isCompareHintOpen:eV,setCompareHintCardElement:eD,closeCompareHint:eG}=function(e){let{enabled:t,isLoading:n,storageKey:a}=e,[s,i]=(0,l.useState)(!1),[r,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{if(t&&"true"!==window.localStorage.getItem(a)){let e=window.setTimeout(()=>{i(!0)});return()=>{window.clearTimeout(e)}}},[t,a]),(0,l.useEffect)(()=>{if(!t||!s||n||!r)return;let{top:e,height:a}=r.getBoundingClientRect(),i=e+window.scrollY,l=window.innerHeight/2;window.scrollTo({behavior:"smooth",top:Math.max(i-l+a/2,0)})},[r,t,s,n]),{isCompareHintOpen:s,setCompareHintCardElement:o,closeCompareHint:function(){i(!1),window.localStorage.setItem(a,"true")}}}({enabled:eI,isLoading:et,storageKey:v.o});(0,l.useEffect)(()=>{(0,b._)("investment_funds","investment_funds_view")},[]);let eY=(0,l.useCallback)(()=>{if(!ej.current)return;let e=ew?w.GG:w.ei,{top:t}=ej.current.getBoundingClientRect();eT(t<=e+1)},[ew]);(0,l.useEffect)(()=>(window.addEventListener("scroll",eY),()=>{window.removeEventListener("scroll",eY)}),[eY]);let eO=(t=T.length,ee?y.P.Error:0===t?q?y.P.Default:y.P.Custom:null);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.A,{open:eI&&eR,title:eQ,description:eU,isClickable:eJ,onClose:eW,onClick:function(){ez(),(0,b._)("web_investment_funds_comparison","snackbar_click")}}),(0,a.jsx)(p.T,{className:eB().filterContainer,dataQa:{element:g.xJ.Block,name:"filterPanel"},children:(0,a.jsx)(H,{managementCompanies:P,risks:N,tags:I,filterChipses:X,yieldSortingField:L,selectedRisks:Q,selectedTags:D,selectedManagementCompanies:W,handleSubmitButtonFilterPanel:function(){en()},updateRisks:el,updateFilterChips:ec,updateTagFiltersChips:em,updateYieldSortingField:ep,updateManagementCompanyIds:ex,openAllParams:()=>eg(!0)})}),(0,a.jsxs)(p.T,{className:eB().container,ref:eA,dataQa:{element:g.xJ.Block,name:"offers"},children:[(0,a.jsxs)(o.W2,{className:eB().headerWrapper,children:[eE.isVisible&&(0,a.jsx)(h.b,{desktopType:"showcase",bannerKey:eE.bannerWebKey,onClick:function(){eE.analytics&&(0,b._)("investment_funds","web_showcase_click_promobanner",{eventLabel:eE.analytics.eventLabel}),eE.actionUrl?window.open(eE.actionUrl,"_blank"):eE.filters&&(window.location.href="".concat(window.location.origin,"/").concat(window.location.pathname,"/?").concat(eE.filters))}}),!eO&&(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Header,name:"offersTitle"},children:(0,a.jsx)(o.X6,{className:eB().header,type:"h1",as:"p",children:ey("sc-fund.showcase.order.title",{orders:E.total})})})]}),(0,a.jsx)("div",{className:eB().listFilter,ref:ej,children:(0,a.jsx)(p.T,{dataQa:{element:g.xJ.Block,name:"listFilterPanel"},children:(0,a.jsx)(d.p,{chips:K,isIncreaseSort:$,sortTypeItems:M,sortTypeValue:Y,isFixed:ek,onParamsClick:()=>eg(!0),onSortTypeClick:eh,onIncreaseSortClick:ev,onChipClick:()=>{(0,b._)("investment_funds","investment_funds_secondary_Filter"),eg(!0)}})})}),(0,a.jsxs)(o.W2,{className:(0,u.Z)(eB().offers,"py-6","py-m-8"),children:[et&&(0,a.jsx)(eS,{}),!eO&&!et&&(0,a.jsx)(eC,{funds:T,cardYieldField:R,promotionsIds:eE.isVisible?eE.promotionsIds:void 0,compareIds:eP,isCompareLimitReached:eM,showCompareHint:eV,onCompareHintCardMount:eD,onCloseCompareHint:eG,onToggleCompare:eL}),eO&&(0,a.jsx)(m.C,{openModal:()=>eg(!0),state:eO}),(0,a.jsx)(p.T,{className:eB().showMoreButtonWrapper,dataQa:{element:g.xJ.Button,name:"showMore"},children:(0,a.jsx)(c.zx,{size:"s",label:ey("sc-fund.showcase.more-funds.button"),variant:"secondary",onClick:()=>{(0,b._)("investment_funds","investment_funds_show_more"),ei()},className:(0,u.Z)(eB().showMoreButton,!Z&&eB().hideShowMoreButton),disabled:et||!Z})})]}),(0,a.jsx)(J,{isDrawerOpen:eb,sortOrder:O,sortTypeOptions:M,categories:B,managementCompanies:P,risks:N,tags:I,yieldSortingField:L,selectedRisks:Q,selectedCategories:U,selectedManagementCompanies:W,selectedMinInvest:z,selectedIsClubFund:V,selectedTags:D,onClose:()=>eg(!1),updateRisks:el,updateMinInvestChips:ed,updateTagFiltersChips:ef,updateIsClubFundChips:eu,updateCategories:eo,updateYieldSortingField:ep,updateManagementCompanyIds:ex,updateSortOrderChips:e_,checkRadio:es,updateSortBy:er,handleSubmitButton:function(){en(),eg(!1)},handleResetButton:function(){ea(),eg(!1)}})]})]})}function eI(e){let{children:t,fundsData:n,filterParams:l,parsedSelectedParams:r,aggregatorIds:o,promotions:c}=e;return(0,i.Z)(o),l&&n&&r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eE,{filterParams:l,fundsData:n,parsedSelectedParams:r,promotions:c}),t]}):(0,s.notFound)()}},36904:function(e,t,n){"use strict";n.d(t,{$f:function(){return h},EI:function(){return m},GG:function(){return f},L8:function(){return c},NG:function(){return p},Pf:function(){return s},Vq:function(){return o},ei:function(){return _},f9:function(){return v},jW:function(){return d},op:function(){return x},sJ:function(){return u},zJ:function(){return r}});var a,s,i=n(49090),l=n(34057);let r=[{label:"1 месяц",value:l.Cp.YieldMonth},{label:"3 месяца",value:l.Cp.YieldQuarter},{label:"6 месяцев",value:l.Cp.YieldHalfYear},{label:"1 год",value:l.Cp.YieldYear},{label:"3 года",value:l.Cp.YieldThreeYear},{label:"За все время",value:l.Cp.YieldAll}];(a=s||(s={}))[a.oneHundred=100]="oneHundred",a[a.oneThousand=1e3]="oneThousand",a[a.oneHundredThousand=1e5]="oneHundredThousand";let o=[{id:0,label:"Любая",value:void 0},{id:1,label:"До ".concat((0,i.lb)(100,{decimalIsWithoutZeros:!0})),value:100},{id:2,label:"До ".concat((0,i.lb)(1e3,{decimalIsWithoutZeros:!0})),value:1e3},{id:3,label:"До ".concat((0,i.lb)(1e5,{decimalIsWithoutZeros:!0})),value:1e5}],c=[{id:0,label:"Все",value:void 0},{id:1,label:"Исключить авторские",value:!1},{id:2,label:"Только авторские",value:!0}],d=[{id:0,label:"По убыванию",value:l.X_.Desc},{id:1,label:"По возрастанию",value:l.X_.Asc}],u=e=>[{value:e.value,label:"По доходности"},{value:l.jV.MinimalPurchaseAmount,label:"По минимальной покупке"},{value:l.jV.Sca,label:"По СЧА"}],m=[{id:l.nC.MinValue,label:"До ".concat((0,i.lb)(100,{decimalIsWithoutZeros:!0}))},{id:l.nC.IsAuthorFund,label:"Авторские фонды"}],f=80,_=56,h=["limit","offset"],p=r[3],v={sortBy:l.Cp.YieldYear,sortOrder:l.X_.Desc,managementCompanyIds:[],risk:[],category:[],tags:[],limit:10,offset:0,yieldSortField:l.Cp.YieldYear},x=["yieldSortField"]},16076:function(e,t,n){"use strict";n.d(t,{Portal:function(){return l}});var a=n(57437),s=n(2265),i=n(54887);function l(e){let{children:t,id:n="portal-root"}=e,[l,r]=(0,s.useState)(null);return(0,s.useEffect)(()=>(function(){let e=document.getElementById(n);if(e){r(e);return}let t=document.createElement("div");return t.id=n,document.body.appendChild(t),r(t),()=>{document.body.removeChild(t)}})(),[n]),l?(0,a.jsx)(a.Fragment,{children:(0,i.createPortal)(t,l)}):null}},69064:function(e,t,n){"use strict";n.d(t,{b:function(){return h}});var a=n(57437),s=n(2265),i=n(75461),l=n(6029),r=n(61994),o=n(46413),c=n.n(o);let d=e=>{let{width:t,height:n,inline:s,rounded:i,className:l}=e,o={...t&&{width:"".concat(t,"px")},...n&&{height:"".concat(n,"px")}};return(0,a.jsx)("span",{style:o,className:(0,r.Z)(l,c().uiSkeleton,[{[c().inline]:s},{[c().rounded]:i}])})};var u=n(5083),m=n(34057),f=n(46534),_=n.n(f);function h(e){let{bannerKey:t,className:n,desktopType:r,onClick:o}=e,[c,f]=(0,s.useState)(!1),[h,p]=(0,s.useState)(),v=(0,i._m)("l"),x=(0,i.IY)("s","m");return((0,s.useEffect)(()=>{setTimeout(()=>{f(!0)})},[]),(0,s.useEffect)(()=>{let e=setTimeout(()=>{p((0,l.Xj)({key:t,isTablet:x,isDesktop:v,desktopType:r}))});return()=>clearTimeout(e)},[v,x,t]),c)?(0,a.jsx)(u.T,{dataQa:{element:m.xJ.Banner,name:"promotions"},className:n,children:(0,a.jsx)("img",{style:{cursor:"pointer",borderRadius:"16px",minHeight:"125px"},src:h,alt:"Акционный Баннер",width:"100%",onClick:()=>null==o?void 0:o()})}):(0,a.jsx)("div",{className:n,children:(0,a.jsx)(d,{className:_().skeleton,height:125})})}},6029:function(e,t,n){"use strict";n.d(t,{Xj:function(){return l},z6:function(){return s}});var a=n(90917);function s(e){let{promotions:t,type:n,id:s}=e;if(t){var l,r,o,c;let e=null===(r=t.data)||void 0===r?void 0:null===(l=r[0])||void 0===l?void 0:l.custom;if(e){let l=t.data[0],r=null===(o=e.visible)||void 0===o?void 0:o.find(e=>e===n),d=(0,a.ow)(new Date,e.start,e.end),u=!!r&&d&&i(s,e.fundIds);return{isVisible:u,...u&&{isVisible:!!r&&d&&i(s,e.fundIds),bannerWebKey:e.bannerWebKey,filters:e.filterWeb,actionUrl:null==l?void 0:l.actionUrl,promotionsIds:null===(c=e.fundIds)||void 0===c?void 0:c.reduce((e,t)=>({...e,[t]:!0}),{}),analytics:{eventAction:l.analytics.eventAction,eventCategory:l.analytics.eventCategory,eventLabel:l.analytics.eventLabel}}}}}return{isVisible:!1}}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return!e||!!t.find(t=>t===e)}function l(e){let{key:t,isDesktop:n,isTablet:s,desktopType:i}=e;if(!t)return;let l="";return n||s?s?l="_tablet_web":n&&(l="_desktop_".concat(i)):l="_mob_web","".concat((0,a.SJ)("NEXT_PUBLIC_S3_ASSETS"),"/investment/banners/").concat(t).concat(l,".png")}},5083:function(e,t,n){"use strict";n.d(t,{T:function(){return i}});var a=n(57437),s=n(96369);let i=e=>{let{tag:t="div",children:n,dataQa:i,className:l,...r}=e,o=(0,s.J)()(i),c="string"==typeof t,d={...r,...c?{"data-qa":o}:{dataQa:o}};return(0,a.jsx)(t,{className:l,...d,children:n})}},11690:function(e,t,n){"use strict";n.d(t,{C:function(){return b}});var a=n(57437),s=n(33145),i=n(27648),l=n(42586),r=n(35563),o=n(75461),c=n(61994),d=n(98852),u=n(90917);let m="".concat((0,u.SJ)("NEXT_PUBLIC_S3_ASSETS"),"/investment/common/cat-with-plug.png"),f="".concat((0,u.SJ)("NEXT_PUBLIC_S3_ASSETS"),"/investment/common/cat-with-magnifier.png"),_="".concat((0,u.SJ)("NEXT_PUBLIC_S3_ASSETS"),"/investment/common/stub-mobile.png"),h="".concat((0,u.SJ)("NEXT_PUBLIC_S3_ASSETS"),"/investment/common/stub-desktop.png"),p={[d.P.Default]:{title:"sc-fund.showcase.stub.default-filter.title",text:"sc-fund.showcase.stub.default-filter.text",mobileImage:{image:_,height:317,width:328},desktopImage:{image:h,height:330,width:1110},altText:"Фонды не найдены",buttonLabel:"sc-fund.showcase.stub.default-filter.button"},[d.P.Custom]:{title:"sc-fund.showcase.stub.custom-filter.title",text:"sc-fund.showcase.stub.custom-filter.text",mobileImage:{image:f,height:182,width:240},desktopImage:{image:f,height:182,width:240},altText:"Фонды не найдены",buttonLabel:"sc-fund.showcase.stub.custom-filter.button"},[d.P.Error]:{title:"sc-fund.showcase.stub.error.title",text:"sc-fund.showcase.stub.error.text",mobileImage:{image:m,height:166,width:166},desktopImage:{image:m,height:200,width:200},altText:"Ошибка при загрузке",buttonLabel:"sc-fund.showcase.stub.error.button"}};var v=n(85110),x=n.n(v);function b(e){let{state:t,openModal:n}=e,m=(0,l.useTranslations)(),f=(0,o._m)("m"),_=(0,u.SJ)("NEXT_PUBLIC_SHOWCASE_ORIGIN"),{title:h,text:v,desktopImage:b,mobileImage:g,buttonLabel:A,altText:C}=p[t],j=f?b:g;return(0,a.jsxs)("div",{className:x().stub,children:[(0,a.jsx)(r.X6,{className:(0,c.Z)(x().header,"mb-8","mb-m-4"),type:"h2",children:m(h)}),(0,a.jsx)(r.xv,{className:(0,c.Z)(x().text,"mb-8","mb-m-6"),children:m(v)}),(0,a.jsx)(s.default,{className:"mb-8 mb-m-6",height:j.height,width:j.width,src:j.image,alt:C,unoptimized:!0}),function(){switch(t){case d.P.Default:return(0,a.jsx)(o.zx,{className:x().button,size:"s",as:i.default,label:m(A),href:"https://t.me/MoexFinuslugi"});case d.P.Custom:return(0,a.jsx)(o.zx,{className:x().button,size:"s",label:m(A),variant:"secondary",onClick:n});default:return(0,a.jsx)(o.zx,{className:x().button,size:"s",as:i.default,label:m(A),href:_})}}()]})}},98852:function(e,t,n){"use strict";var a,s;n.d(t,{P:function(){return a}}),(s=a||(a={})).Default="Default",s.Custom="Custom",s.Error="Error"},49074:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var a=n(57437),s=n(80684),i=n(75461),l=n(61994),r=n(16076),o=n(93898),c=n.n(o);function d(e){let{open:t,title:n,description:o,isClickable:d,onClose:u,onClick:m}=e;return(0,a.jsx)(r.Portal,{id:"snackbar-root",children:(0,a.jsxs)("div",{className:(0,l.Z)(c().snackbar,t?c().visible:c().hidden,d&&c().clickable),role:d?"button":"status",tabIndex:t&&d?0:-1,"aria-hidden":!t,onClick:function(){d&&m()},onKeyDown:function(e){d&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),m())},children:[(0,a.jsx)(s.IconFdsCheckCircleO,{className:c().statusIcon,size:24}),(0,a.jsxs)("div",{className:c().content,children:[(0,a.jsxs)("div",{className:c().titleRow,children:[(0,a.jsx)("span",{className:c().title,children:n}),d&&(0,a.jsx)(s.IconFdsChevronRightO,{className:c().chevron,size:24})]}),(0,a.jsx)("span",{className:c().description,children:o})]}),(0,a.jsx)(i.zx,{"aria-label":"Закрыть snackbar",iconLeft:(0,a.jsx)(s.IconFdsCloseO,{size:24}),onClick:function(e){e.preventDefault(),e.stopPropagation(),u()},appearance:"ghost",disabled:!t,shape:"circle-icon",size:"xs",variant:"secondary"})]})})}},45087:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var a=n(2265),s=n(99376),i=n(90917);function l(e,t){let n=(0,s.useSearchParams)();(0,a.useEffect)(()=>{n&&(0,i.Rz)(Object.fromEntries(n),e,t)},[])}},96369:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});var a=n(2265),s=n(99376),i=n(42798),l=n.n(i);function r(){let e=(0,s.useParams)(),t=(0,s.usePathname)();return(0,a.useCallback)(n=>{let{prefix:a,element:s,name:i,index:r}=n;if(!t||!e)return"";let o=t.split("/").filter(e=>e).map(t=>{var n;return null!==(n=Object.keys(e).find(n=>e[n]===t))&&void 0!==n?n:t});o.unshift("funds");let c=o.join("-"),d=l()(i),u=void 0!==r?"-".concat(function(e){if(Number.isNaN(e)||e<0)throw Error("Incorrect value '".concat(e,"' for the property 'index'. Must be a number and >= 0}"));return e}(r)):"";return"".concat(a?"".concat(a,"-"):"").concat(c,"-").concat(s,"-").concat(d).concat(u)},[e,t])}},91373:function(e,t,n){"use strict";var a=n(94595),s=n(90917);let i=a.Wg.create({baseURL:(0,s.SJ)("NEXT_PUBLIC_PL_LK_API_INVESTMENT_URL"),next:{revalidate:300}});t.Z=i},39145:function(e){e.exports={modalFooter:"FilterDrawer_modalFooter__lIbCZ",footerButtonWrapper:"FilterDrawer_footerButtonWrapper__r7oU_",filters:"FilterDrawer_filters__OxxaQ",tagsBlock:"FilterDrawer_tagsBlock__l_tbk",selectWrapper:"FilterDrawer_selectWrapper__wTGGv",minInvestWrapper:"FilterDrawer_minInvestWrapper__OXnDT",text:"FilterDrawer_text__Ed9vH",sortBlock:"FilterDrawer_sortBlock__EfKKL"}},38158:function(e){e.exports={card:"FilterPanel_card__7I2kc",searchWrapper:"FilterPanel_searchWrapper__Jzs5n",contentWrapper:"FilterPanel_contentWrapper__93NWZ",filtersBlock:"FilterPanel_filtersBlock__r3G_g",filters:"FilterPanel_filters__ZX9A9",buttons:"FilterPanel_buttons__duIzv",buttonWrapper:"FilterPanel_buttonWrapper__st3ZV",allParamsButton:"FilterPanel_allParamsButton__lUTNT",submitButton:"FilterPanel_submitButton__lR63z",chipses:"FilterPanel_chipses__FatCK"}},30357:function(e){e.exports={filterContainer:"Main_filterContainer___ieLH",container:"Main_container__3R02P",headerWrapper:"Main_headerWrapper__F8LNq",header:"Main_header__v2z_m",offers:"Main_offers__iWRhY",showMoreButtonWrapper:"Main_showMoreButtonWrapper__YJBV5",showMoreButton:"Main_showMoreButton___FmZd",hideShowMoreButton:"Main_hideShowMoreButton__ZargG",listFilter:"Main_listFilter__YbLGn"}},97448:function(e){e.exports={banner:"Banner_banner__2UXMW",title:"Banner_title__8kTT0",text:"Banner_text__UA4mo",buttonWrapper:"Banner_buttonWrapper__HpbER",images:"Banner_images__Aanx4",lionWrapper:"Banner_lionWrapper__taI2d",backgroundWrapper:"Banner_backgroundWrapper__XjjtT"}},78164:function(e){e.exports={card:"FundCard_card__zZMyf",contentBlock:"FundCard_contentBlock__O7roo",emitent:"FundCard_emitent__4XE2t",elementLogo:"FundCard_elementLogo__Vi_c3",emitentInfo:"FundCard_emitentInfo__y4tsv",subtitle:"FundCard_subtitle__tDk7f",offerWrapper:"FundCard_offerWrapper__34dO6",offerBlock:"FundCard_offerBlock__6m3oH",tags:"FundCard_tags__076Og",actions:"FundCard_actions__15DbL",compareButtonBlock:"FundCard_compareButtonBlock__w1UAo",buttonBlock:"FundCard_buttonBlock__GZPCj",green:"FundCard_green__jgq58",red:"FundCard_red__F4CCV",captionIcon:"FundCard_captionIcon___A5gW",compareHintTitle:"FundCard_compareHintTitle__5X5Vx",compareHintText:"FundCard_compareHintText__biQQI"}},63043:function(e){e.exports={offer:"Offer_offer__1BQnE"}},20622:function(e){e.exports={offerSkeleton:"OffersSkeleton_offerSkeleton__qlCLC"}},46534:function(e){e.exports={skeleton:"PromotionsBanner_skeleton__lP64v"}},46413:function(e){e.exports={uiSkeleton:"UiSkeleton_uiSkeleton__5gH0G",rounded:"UiSkeleton_rounded__e2mJS",inline:"UiSkeleton_inline__6UIts"}},20633:function(e){e.exports={referenceActive:"AppHint_referenceActive__ZTjtJ",floating:"AppHint_floating__wZZPa",arrow:"AppHint_arrow___fjMb",closeButton:"AppHint_closeButton__5su6x",overlay:"AppHint_overlay__JlXxh"}},85110:function(e){e.exports={stub:"NoDataCard_stub__mTCMC",header:"NoDataCard_header__yB_iN",text:"NoDataCard_text__46yhI",button:"NoDataCard_button__QezZu"}},93898:function(e){e.exports={snackbar:"Snackbar_snackbar__iKnFj",visible:"Snackbar_visible__w2oa5",hidden:"Snackbar_hidden__sZnfi",clickable:"Snackbar_clickable__PbwDF",statusIcon:"Snackbar_statusIcon__aKejN",content:"Snackbar_content__pMCmt",titleRow:"Snackbar_titleRow__yhA0M",title:"Snackbar_title__GIxD2",description:"Snackbar_description__4_0z1",chevron:"Snackbar_chevron__SmTdB"}}},function(e){e.O(0,[1410,3544,207,5591,1866,5501,4445,5878,5166,9470,5039,9362,6535,2972,22,5395,2852,2971,2117,1744],function(){return e(e.s=45474)}),_N_E=e.O()}]);