PageSourceSearch

https://snowball-analytics.com/_next/static/chunks/pages/manage-portfolios-58fc880ada50bba4.js

js snowball-analytics.com collected 2026-09-24 21:29:10 UTC 344,412 bytes, 14 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[437,2682,8485],{554:e=>{e.exports={textarea:"FeedbackPopup_textarea__Z2qhF",feedbackPopup:"FeedbackPopup_feedbackPopup__uA6Rx",content:"FeedbackPopup_content__JFh8D"}},1383:e=>{e.exports={root:"PromoCompact_root__OJ45w",btn:"PromoCompact_btn__I_yro",title:"PromoCompact_title__lEgTz"}},2587:e=>{e.exports={root:"LastSyncState_root__phvsP",block:"LastSyncState_block__Vogii"}},3859:(e,s,t)=>{"use strict";t.d(s,{A:()=>b});var a=t(26514),n=t(58245),i=t.n(n),l=t(32673);t(75834);var o=t(93760),r=t(23141),c=t(6367),d=t(80315),m=t(48208),h=t(49732),u=t(79104),p=t(63595),x=t(75674),g=t(50905),N=t.n(g);function b(e){let{t:s}=(0,o.B)("promos"),{assignedPromocode:t,isPromoStillRunning:n}=e.data||{},g=[{title:s("TBANK.FAQ_1"),text:s("TBANK.FAQ_1_ANSWER")},{title:s("TBANK.FAQ_5"),text:s("TBANK.FAQ_5_ANSWER")},{title:s("TBANK.FAQ_2"),text:s("TBANK.FAQ_2_ANSWER")},{title:s("TBANK.FAQ_3"),text:s("TBANK.FAQ_3_ANSWER")},{title:s("TBANK.FAQ_4"),text:s("TBANK.FAQ_4_ANSWER")}];return(0,a.jsx)(d.a,{...e,size:"lg",dialogClassName:`${N().modalDialog} ${e.fullScreen?N().fullScreen:""}`,bodyClassName:N().modalBody,title:(0,a.jsx)("div",{className:`pl-4 pl-sm-0 mb-2 ${N().title}`,children:s("TBNK.MODAL.TITLE")}),children:(0,a.jsxs)(l.A,{gap:{xs:2,sm:2},children:[(0,a.jsx)("div",{className:"d-flex justify-content-center align-items-center",children:(0,a.jsxs)("div",{className:`font-size-lg ${N().badge}`,children:[s("TBNK.COLLABORATION_LABEL")," ",(0,a.jsx)(i(),{src:"/media/logos/tbank-long.svg",alt:"tbank.ru",width:80,height:20})]})}),(t||n)&&(0,a.jsx)("div",{className:N().divider}),t&&(0,a.jsx)(p.$,{promocode:t,onPromocodeClaimed:e.onPromocodeClaimed}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"font-size-h3 font-weight-bolder",children:s("TBANK.MODAL.DETAILS.TITLE")}),(0,a.jsxs)("div",{className:"row mb-4",children:[(0,a.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,a.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,a.jsx)(h.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,a.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,a.jsx)(r.x,{i18nKey:"promos:TBNK.MODAL.DETAILS.1"})})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,a.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,a.jsx)(h.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,a.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,a.jsx)(r.x,{i18nKey:"promos:TBNK.MODAL.DETAILS.2",components:[(0,a.jsx)("span",{className:"text-nowrap"})]})})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,a.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,a.jsx)(h.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,a.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,a.jsx)(r.x,{i18nKey:"promos:TBNK.MODAL.DETAILS.3",components:[(0,a.jsx)("span",{className:"text-nowrap"})]})})]})})]}),(0,a.jsx)("div",{className:"font-size-h3 font-weight-bolder",children:s("TBANK.MODAL.HOW.TITLE")}),(0,a.jsxs)(l.A,{gap:1.5,children:[(0,a.jsx)(x.S,{stepNumber:1,title:s("TBANK.MODAL.HOW.STEP_1.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_1.MESSAGE"})}),(0,a.jsx)(x.S,{stepNumber:2,title:s("TBANK.MODAL.HOW.STEP_2.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_2.MESSAGE",components:[(0,a.jsx)(m.o,{href:"/user-profile#subscription"})]})}),(0,a.jsx)(x.S,{stepNumber:3,title:s("TBANK.MODAL.HOW.STEP_3.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_3.MESSAGE"})}),(0,a.jsx)(x.S,{stepNumber:4,title:s("TBANK.MODAL.HOW.STEP_4.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_4.MESSAGE"})}),(0,a.jsx)(x.S,{stepNumber:5,title:s("TBANK.MODAL.HOW.STEP_5.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_5.MESSAGE"})})]}),(0,a.jsx)("div",{className:"w-100 text-center bg-light p-4 rounded-lg",children:(0,a.jsxs)(m.o,{href:"https://www.tbank.ru/invest/form/snowball/",className:"font-weight-bold font-size-lg",target:"_blank",children:[(0,a.jsx)(c.A,{className:"mr-1"})," ",s("TBNK.MODAL.DETAILS.BUTTON_TO_TBANK")]})}),(0,a.jsx)("div",{className:"font-size-h3 font-weight-bolder mt-7",children:s("TBANK.FAQ")}),(0,a.jsx)(u.l,{items:g}),(0,a.jsx)("div",{className:"font-size-h3 font-weight-bolder mt-7",children:s("TBANK.DOCUMENTS")}),(0,a.jsx)("div",{children:(0,a.jsxs)(m.o,{href:"https://cdn.tbank.ru/static/documents/promo-bonus-for-incoming-transfer-of-securities-with-snowball.pdf",target:"_blank",children:["\uD83D\uDCC4 ",s("TBANK.DOCUMENTS_LINK")]})})]})]})})}},4707:(e,s,t)=>{"use strict";t.d(s,{o:()=>c});var a=t(26514);t(75834);var n=t(59757),i=t(28684),l=t(16926),o=t(95965),r=t.n(o);function c(e){let{question:s,label:t,className:o}=e,c=(0,n.wA)(),d=(0,i.h)();return(0,a.jsxs)("button",{type:"button",className:`label label-inline label-light-primary ${r().root} ${o??""}`,onClick:()=>{c((0,l.s6)(s)),d.setOpen(!0)},title:s,children:[(0,a.jsx)("img",{src:"/media/svg/icons/General/ai-sparkle-gradient.svg",className:r().icon}),(0,a.jsx)("span",{children:t})]})}},5771:(e,s,t)=>{"use strict";t.d(s,{J:()=>i,v:()=>l});var a=t(26514);t(75834);var n=t(2782);function i(e){let s=[...Array(e.count??3).keys()],t=e.height??200;return(0,a.jsx)(a.Fragment,{children:s.map((s,i)=>(0,a.jsx)("div",{className:`row ${!e.noPadding&&"gutter-b"}`,children:(0,a.jsx)("div",{className:"col",children:(0,a.jsx)(n.A,{className:"rounded-lg",variant:"rectangular",animation:"wave",height:t})})},i))})}function l(e){let s=[...Array(e.count||3).keys()],t=e.height??200;return(0,a.jsx)("div",{className:"row",children:s.map((e,s)=>(0,a.jsx)("div",{className:"col-lg-4 col-sm-12",children:(0,a.jsx)("div",{className:"row gutter-b",children:(0,a.jsx)("div",{className:"col",children:(0,a.jsx)(n.A,{className:"rounded-lg",variant:"rectangular",animation:"wave",height:t})})})},s))})}},7481:e=>{e.exports={note:"PortfolioListItemNote_note__i4GfO"}},8109:(e,s,t)=>{"use strict";t.d(s,{uW:()=>et,Ge:()=>es,Zb:()=>ea}
1);var a=t(26514),n=t(75834),i=t(23469),l=t.n(i),o=t(59757),r=t(4469),c=t(93760),d=t(64137),m=t(9610),h=t.n(m),u=t(32491),p=t.n(u),x=t(73940),g=t.n(x),N=t(98588),b=t(60008),f=t(52828),j=t(39781),v=t(15269),A=t(36241),T=t(31108),C=t(5771),E=t(78693),_=t(75165),y=t(5625),S=t(47115),I=t(13968),O=t(54253),R=t(96842),w=t(38266),k=t(82401),L=t(49732),D=t(11468),P=t(95638),M=t(3163),B=t(39052),F=t(10140),U=t(48208),G=t(49522),H=t(51524);function $(e){let{portfolio:s,...t}=e,{t:n}=(0,c.B)("portfolio");return s.sharePublicKey?(0,a.jsx)(G.$,{preventEvents:!0,hideDefaults:!0,textSuccess:n("PUBLIC_LINK_COPIED"),textToCopy:(0,H.uJ)(s.sharePublicKey),...t,children:(0,a.jsx)("i",{className:"icon-nm fas fa-link text-muted text-hover-primary"})}):null}let W="cards",K="table",z="default",V="current",Q="DashboardPortfolioList2",Y={view:W,currency:V,sortField:"porder",sortDirection:"asc",includeComposite:!0,includeCommon:!0,includeVirtual:!0};function q(e){let{t:s}=(0,c.B)(["analytics","common","portfolio"]);return(0,a.jsx)("div",{className:"row",children:e.portfolios.map((t,n)=>(0,a.jsx)("div",{className:"col-xl-4 col-lg-4 col-md-6 col-sm-12",onClick:()=>{e.selectPortfolio(t.id)},children:(0,a.jsx)("div",{className:"card card-custom card-sm-stretch card-stretch gutter-b clickable-card card-grow-hover",children:(0,a.jsx)("div",{className:"card-body stats-card ",children:(0,a.jsx)("div",{className:"d-flex flex-column justify-content-between",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"stats-header d-flex align-items-center",children:(0,a.jsxs)("div",{className:"text-dark-50 font-size-sm font-weight-bold d-flex align-items-center",style:{textTransform:"uppercase"},children:[(0,a.jsx)("div",{className:"mr-2 d-flex",children:(0,E.Tb)(t,t.broker)}),(0,a.jsx)("div",{children:t.name}),(0,a.jsx)("div",{children:!0==t.shareIsPublic&&(0,a.jsx)($,{portfolio:t,className:"mt-n1 ml-2 p-0"})})]})}),(0,a.jsx)("div",{className:"stats-subheader mt-1 mb-2",children:(0,a.jsx)("span",{className:"font-weight-bold font-size-h5",children:(0,a.jsx)(_.b,{value:t.stats.currentCost,isMoney:!0,currency:t.currency})})}),(0,a.jsxs)("div",{className:"stats-bottom d-flex justify-content-between align-items-center",children:[(0,a.jsx)("span",{className:"text-dark-50 font-size-sm",children:s("OVERALL.TOTAL_GAIN")}),(0,a.jsxs)("div",{className:"d-flex align-items-center",children:[(0,a.jsx)("span",{className:"text-nowrap",children:(0,a.jsx)(_.b,{className:"font-weight-bold font-size-sm",value:t.stats.incomeTotal,isMoney:!0,currency:t.currency,symbol:"sign",showColors:!0})}),(0,a.jsxs)("span",{className:`IncomePercent text-nowrap ${t.stats.incomePercent<0?"text-danger":"text-success"}`,children:["\xa0(",(0,a.jsx)(_.b,{className:"font-weight-bold font-size-sm",value:t.stats.incomePercent,isPercent:!0,showColors:!0,precision:1,symbol:"triangle"}),")"]})]})]}),(0,a.jsxs)("div",{className:"stats-bottom d-flex justify-content-between align-items-center",children:[(0,a.jsx)("span",{className:"text-dark-50 font-size-sm",children:s("GAIN.DAILY_PL_capital")}),(0,a.jsxs)("div",{className:"d-flex align-items-center",children:[(0,a.jsx)("span",{className:"text-nowrap",children:(0,a.jsx)(_.b,{className:"font-weight-bold font-size-sm",value:t.stats.lastDayGainsAmount,isMoney:!0,currency:t.currency,symbol:"sign",showColors:!0})}),(0,a.jsxs)("span",{className:`IncomePercent text-nowrap ${t.stats.lastDayGainsPercent<0?"text-danger":"text-success"}`,children:["\xa0(",(0,a.jsx)(_.b,{className:"font-weight-bold font-size-sm",value:t.stats.lastDayGainsPercent,isPercent:!0,showColors:!0,precision:1,symbol:"triangle"}),")"]})]})]}),(t.stats.annualReturnWithCash??t.stats.annualReturn)!=0&&(0,a.jsxs)("div",{className:"stats-bottom d-flex justify-content-between align-items-center",children:[(0,a.jsx)("span",{className:"text-dark-50 font-size-sm",children:s("OVERALL.RETURN")}),(0,a.jsx)("div",{className:"d-flex align-items-center",children:(0,a.jsxs)("span",{className:"text-nowrap",children:[0!=t.stats.annualReturn&&!t.stats.annualReturnWithCash&&!t.stats.annualReturnWarning&&(0,a.jsx)(_.b,{value:t.stats.annualReturn,isPercent:!0,precision:2}),!!t.stats.annualReturnWithCash&&!t.stats.annualReturnWarning&&(0,a.jsx)(_.b,{value:t.stats.annualReturnWithCash,isPercent:!0,precision:2})]})})]}),0!=t.stats.divsYield&&(0,a.jsxs)("div",{className:"stats-bottom d-flex justify-content-between align-items-center",children:[(0,a.jsx)("span",{className:"text-dark-50 font-size-sm",children:s("OVERALL.DIVS.TITLE")}),(0,a.jsx)("div",{className:"d-flex align-items-center",children:(0,a.jsxs)("span",{className:"text-nowrap",children:[(0,a.jsx)(_.b,{className:"font-weight-bold font-size-sm",value:t.stats.divsYield,precision:1,isPercent:!0}),"\xa0(",(0,a.jsx)(_.b,{className:"font-weight-bold font-size-sm",value:t.stats.divsIncomeYear,isMoney:!0,currency:t.currency}),")"]})})]})]})})})})},n))})}class X extends n.Component{constructor(e){var s;super(e),s=this,this.isExternalDataMode=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.props;return Array.isArray(e.externalData)||"boolean"==typeof e.externalLoading},this.loadExternalData=e=>e.externalLoading?void this.setState({blocking:!0}):e.externalError?void this.setState({blocking:!1}):void(this.loadData(e.externalData??[],this.state.widgetState.sortField,this.state.widgetState.sortDirection),this.setState({blocking:!1})),this.handleTableChange=async(e,s)=>{let{sortField:t,sortOrder:a}=s;"sort"===e&&this.state.sortField!=t&&this.onStateChange("sortField",t),"sort"===e&&this.state.sortDirection!=a&&this.onStateChange("sortDirection",a),this.loadData(this.state.data,t,a)},this.refresh=async()=>{this.setState({blocking:!0});try{let e=[];
1if(this.state.widgetState.currency==z){for(let s of Object.keys(window.localStorage))if(s.startsWith("portfolio-currency-")){let t=window.localStorage.getItem(s);t=JSON.parse(t);let a=s.substr(19,36);e.push({portfolioId:a,currency:t.code})}}let s=await (0,T.P)({currency:this.state.currency,items:e,inOneCurrency:this.state.widgetState.currency==V});this.loadData(s,this.state.widgetState.sortField,this.state.widgetState.sortDirection),this.setState({blocking:!1})}catch(t){console.error(t);let e=`${this.props.t("ERROR.FAILED_TO_LOAD_DATA",{ns:"common"})} 
2`,s=(0,A.g6)(e,t);v.f1(s),this.setState({blocking:!1})}},this.selectDefaultCurrency=e=>{if(e)if((0,r.Gu)(`portfolio-currency-${e?.id}`).code){let s=(0,r.Gu)(`portfolio-currency-${e?.id}`).code;y.M_.dispatch((0,M.MN)(s))}else e.defaultCurrency&&y.M_.dispatch((0,M.MN)(e.defaultCurrency))},this.getColumns=()=>[{dataField:"porder",text:"#",sort:!0,hidden:!0,headerSortingClasses:O.UJ,style:{width:"40px"}},{dataField:"name",text:this.props.t("COLUMN.NAME",{ns:"portfolio"}),sort:!0,headerSortingClasses:O.UJ,formatter:(e,s)=>(0,a.jsxs)("div",{onClick:()=>{this.props.onRowClick?.(s,"name")},children:[(0,a.jsx)("span",{className:"symbol symbol-25 mr-1 symbol-light",children:(0,a.jsx)("span",{className:"symbol-label",children:(0,E.Tb)(s,s.broker)})}),(0,a.jsx)("span",{className:"text-hover-primary",children:s.name}),!0==s.shareIsPublic&&(0,a.jsx)("span",{children:(0,a.jsx)($,{portfolio:s,className:"mt-n1 ml-2 p-0"})})]})},{dataField:"stats.currentCost",text:this.props.t("OVERALL.BALANCE",{ns:"analytics"}),sort:!0,headerSortingClasses:O.UJ,formatter:R.Hw},{dataField:"stats.incomePercent",text:this.props.t("OVERALL.TOTAL_GAIN",{ns:"analytics"}),secondDataField:"stats.incomeTotal",secondText:this.props.t("OVERALL.TOTAL_GAIN",{ns:"analytics"}),mainValuePercent:!0,headerSortingClasses:O.UJ,sort:!0,formatter:(e,s)=>(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{children:(0,a.jsx)(_.b,{value:s.stats.incomeTotal,currency:s.currency,isMoney:!0,showColors:!0,symbol:"sign"})}),(0,a.jsx)("div",{className:"font-weight-bold",children:(0,a.jsx)(_.b,{showColors:!0,isPercent:!0,symbol:"triangle",value:e})})]})},{dataField:"stats.lastDayGainsPercent",text:this.props.t("GAIN.DAILY_PL_capital",{ns:"analytics"}),secondDataField:"stats.lastDayGainsAmount",secondText:this.props.t("GAIN.DAILY_PL_capital",{ns:"analytics"}),mainValuePercent:!0,headerSortingClasses:O.UJ,sort:!0,formatter:(e,s)=>(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{children:(0,a.jsx)(_.b,{value:s.stats.lastDayGainsAmount,currency:s.currency,isMoney:!0,showColors:!0,symbol:"sign"})}),(0,a.jsx)("div",{className:"font-weight-bold",children:(0,a.jsx)(_.b,{showColors:!0,isPercent:!0,symbol:"triangle",value:e})})]})},{dataField:"stats.annualReturn",text:this.props.t("OVERALL.RETURN",{ns:"analytics"}),headerSortingClasses:O.UJ,sort:!0,formatter:I.px},{dataField:"stats.divsYield",text:this.props.t("OVERALL.DIVS.TITLE",{ns:"analytics"}),secondDataField:"stats.divsIncomeYear",secondText:this.props.t("OVERALL.DIVS.TITLE",{ns:"analytics"}),mainValuePercent:!0,headerSortingClasses:O.UJ,sort:!0,formatter:(e,s)=>0==e?(0,a.jsx)(a.Fragment,{children:"-"}):(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{children:(0,a.jsx)(_.b,{className:"",value:s.stats.divsIncomeYear,isMoney:!0,currency:s.currency})}),(0,a.jsx)("div",{children:(0,a.jsx)(_.b,{className:"font-weight-bold",value:e,precision:1,isPercent:!0})})]})}],this.loadData=(e,s,t)=>{if(e){let a=[...e];this.state.widgetState.includeComposite||(a=h()(a,e=>!e.isComposite)),this.state.widgetState.includeVirtual||(a=h()(a,e=>!(e.viewType==S.Sj.SANDBOX&&!e.isComposite))),this.state.widgetState.includeCommon||(a=h()(a,e=>!(e.viewType==S.Sj.REAL_ACCOUNT&&!e.isComposite))),a.sort((e,a)=>g()(e,s)>g()(a,s)?"asc"===t?1:-1:g()(e,s)<g()(a,s)?"asc"===t?-1:1:0),this.setState({data:e,filtered:a})}}
2,this.getSortOptions=e=>{let s=[];for(let t of e)t.sort&&(s.push({key:t.dataField,name:t.text+(t.mainValuePercent?", %":""),sortProp:t.dataField,allow:"asc,desc"}),t.secondDataField&&s.push({key:t.secondDataField,name:t.secondText,sortProp:t.secondDataField,allow:"asc,desc"}));return s},this.onStateChange=(e,s)=>{let t=this.state.widgetState;t[e]=s,r.LZ(Q,t),this.setState(t=>({widgetState:{...t.widgetState,[e]:s}}),()=>{"currency"==e?this.isExternalDataMode()?this.loadExternalData(this.props):this.refresh():("includeCommon"==e||"includeComposite"==e||"includeVirtual"==e)&&this.loadData(this.state.data,this.state.widgetState.sortField,this.state.widgetState.sortDirection)})};let t=r.Gu(Q,Y);this.isExternalDataMode(e)&&(t.currency=V);let n=this.getColumns(),i=this.getSortOptions(n),l=!this.isExternalDataMode(e);this.state={widgetState:t,currency:e.currency,portfolioId:e.portfolioId,blocking:!this.isExternalDataMode(e)||!!e.externalLoading,data:[],filtered:[],list:e.list,columns:n,sortOptions:i,showCurrencyOption:l,showFilterOption:!0}}componentWillReceiveProps(e){let s=(e.currency||e.portfolioId||e.reload)&&(e.currency!=this.state.currency||e.portfolioId!=this.state.portfolioId||e.reload!=(this.state.reload??"")),t=this.isExternalDataMode(e)&&(e.externalData!==this.props.externalData||e.externalLoading!==this.props.externalLoading||e.externalError!==this.props.externalError);(s||t)&&this.setState(s=>({currency:e.currency||s.currency,portfolioId:e.portfolioId||s.portfolioId,reload:e.reload||s.reload}),()=>{if(this.isExternalDataMode(e)){(s||t)&&this.loadExternalData(e);return}s&&this.refresh()})}componentDidMount(){if(this.isExternalDataMode())return void this.loadExternalData(this.props);this.refresh()}selectPortfolio(e){let s=p()(this.state.list,s=>s.id==e)||p()(this.props.list,s=>s.id==e);s&&(y.M_.dispatch((0,M.Sq)(s)),this.selectDefaultCurrency(s),this.props.onSelect&&this.props.onSelect(s))}render(){let e=this.isExternalDataMode()&&!!this.props.externalError;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"d-md-flex align-items-center justify-content-between mb-3",children:[(0,a.jsx)("div",{className:"flex-grow-1",style:{minWidth:0},children:this.props.header}),(0,a.jsxs)("div",{className:"d-flex align-items-center nav-toolbar-btns",children:[this.state.showCurrencyOption&&(0,a.jsx)(b.A,{className:"form-group col col-auto p-0 mr-2 mb-0",children:(0,a.jsxs)(f.A,{type:"radio",name:"type",className:"widget-toggle-group shadow-sm",onChange:e=>{this.onStateChange("currency",e)},defaultValue:V,value:this.state.widgetState.currency,children:[(0,a.jsx)(j.A,{className:"font-weight-bold mr-2 btn-icon",size:"sm",variant:"white",value:V,title:this.props.t("ALL_PORTFOLIOS.CURRENCY_CURRENT",{currency:this.state.currency,ns:"portfolio"}),children:(0,F.Qn)(this.state.currency)}),(0,a.jsx)(j.A,{className:"font-weight-bold btn-icon",size:"sm",variant:"white",value:z,title:this.props.t("ALL_PORTFOLIOS.CURRENCY_DEFAULT",{ns:"portfolio"}),children:(0,a.jsx)(L.A,{src:"/media/svg/icons/General/portfolio.svg",size:"sm",color:this.state.widgetState.currency==z?"dark":"dark-50"})})]})}),this.state.showFilterOption&&(0,a.jsxs)(P.A,{allowCollapseMobile:!0,useSvgIcon:!0,svgIconClass:"svg-icon svg-icon-md svg-icon-dark-50",indicator:!this.state.widgetState.includeCommon||!this.state.widgetState.includeComposite||!this.state.widgetState.includeVirtual,icon:"Text/Filter.svg",btnClass:"btn btn-clean btn-sm btn-icon font-weight-bold mr-2 position-relative",children:[(0,a.jsxs)("div",{className:"row justify-content-between align-items-center py-2 w-300",children:[(0,a.jsx)("div",{className:"col-auto",children:this.props.t("ALL_PORTFOLIOS.INCLUDE_COMMON",{ns:"portfolio"})}),(0,a.jsx)("div",{className:"col-auto",children:(0,a.jsx)("span",{className:"switch switch-sm",children:(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",id:"includeMarkers",checked:this.state.widgetState.includeCommon,onChange:()=>{this.onStateChange("includeCommon",!this.state.widgetState.includeCommon)}}),(0,a.jsx)("span",{})]})})})]}),(0,a.jsxs)("div",{className:"row justify-content-between align-items-center py-2 w-300",children:[(0,a.jsx)("div",{className:"col-auto",children:this.props.t("ALL_PORTFOLIOS.INCLUDE_VIRTUAL",{ns:"portfolio"})}),(0,a.jsx)("div",{className:"col-auto",children:(0,a.jsx)("span",{className:"switch switch-sm",children:(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",id:"includeVirtual",checked:this.state.widgetState.includeVirtual,onChange:()=>{this.onStateChange("includeVirtual",!this.state.widgetState.includeVirtual)}}),(0,a.jsx)("span",{})]})})})]}),(0,a.jsxs)("div",{className:"row justify-content-between align-items-center py-2 w-300",children:[(0,a.jsx)("div",{className:"col-auto",children:this.props.t("ALL_PORTFOLIOS.INCLUDE_COMPOSITE",{ns:"portfolio"})}),(0,a.jsx)("div",{className:"col-auto",children:(0,a.jsx)("span",{className:"switch switch-sm",children:(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",id:"includeComposite",checked:this.state.widgetState.includeComposite,onChange:()=>{this.onStateChange("includeComposite",!this.state.widgetState.includeComposite)}}),(0,a.jsx)("span",{})]})})})]})]}),(0,a.jsx)(k.J,{btnClass:"btn btn-clean btn-sm btn-icon font-weight-bold mr-2",iconClass:"svg-icon svg-icon-md svg-icon-dark-50",hideText:"true",onSortChanged:(e,s)=>{this.handleTableChange("sort",{sortField:e,sortOrder:s})},options:this.state.sortOptions,sortBy:this.state.widgetState.sortField,sortDirection:this.state.widgetState.sortDirection}),(0,a.jsx)("button",{type:"button",title:this.props.t(this.state.widgetState.view==K?"ALL_PORTFOLIOS.VIEW_CARDS":"ALL_PORTFOLIOS.VIEW_TABLE",{ns:"portfolio"}),className:"btn btn-clean btn-sm btn-icon font-weight-bold mr-2",onClick:()=>{this.onStateChange("view",this.state.widgetState.view==W?K:W)},children:(0,a.jsx)(L.A,{className:"mt-p2",size:"md",color:"dark-50",src:this.state.widgetState.view==K?"/media/svg/icons/Layout/Layout-grid.svg":"/media/svg/icons/Text/Bullet-list.svg"})}),this.props.toolbar??null,(0,a.jsxs)(U.o,{className:"btn btn-clean btn-sm text-dark-50 font-weight-bold",href:"/manage-portfolios",title:this.props.t("MANAGE_PORTFOLIOS",{ns:"portfolio"}),style:{minWidth:"max-content"},children:[this.props.t("MANAGE",{ns:"common"})," ",(0,a.jsx)("i",{className:"text-dark-50 ml-2 fas fa-long-arrow-alt-right icon-nm"})]})]})]}),this.state.blocking&&this.state.widgetState.view!=K&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C.v,{}),(0,a.jsx)(C.v,{})]}),this.state.blocking&&this.state.widgetState.view==K&&(0,a.jsx)(C.J,{}),!this.state.blocking&&this.state.widgetState.currency==z&&(0,a.jsx)(I._c,{currency:this.state.currency,sortField:this.state.widgetState.sortField,data:null===this.state.filtered?[]:this.state.filtered,columns:["stats.currentCost","stats.incomeTotal","stats.lastDayGainsAmount","stats.divsIncomeYear"],setInCurrency:()=>{this.onStateChange("currency",V)}}),!this.state.blocking&&!e&&this.state.filtered&&this.state.filtered.length>0&&(0,a.jsxs)(a.Fragment,{children:[this.state.widgetState.view==W&&(0,a.jsx)(q,{currency:this.state.currency,portfolios:this.state.filtered,currentId:this.state.portfolioId,selectPortfolio:e=>{this.selectPortfolio(e)}}),this.state.widgetState.view==K&&(0,a.jsx)("div",{className:"card card-custom card-sm-stretch card-stretch gutter-b",children:(0,a.jsx)("div",{className:"card-body",children:(0,a.jsx)(B.R,{items:null===this.state.filtered?[]:this.state.filtered,columns:this.state.columns,sortField:this.state.widgetState.sortField,sortDirection:this.state.widgetState.sortDirection,tableId:"portfolio-list-stats-table",children:(0,a.jsx)(N.A,{id:"portfolio-list-stats-table",wrapperClasses:"table-responsive",bordered:!1,classes:"table table-head-custom table-vertical-center overflow-hidden table-hover",bootstrap4:!0,hover:!0,keyField:"id",columns:this.state.columns,data:null===this.state.filtered?[]:this.state.filtered,sort:{dataField:this.state.widgetState.sortField,order:this.state.widgetState.sortDirection,sortCaret:(e,s)=>(0,O.iA)(e,s,this.state.widgetState.sortField,this.state.widgetState.sortDirection)},defaultSorted:[{dataField:this.state.widgetState.sortField,order:this.state.widgetState.sortDirection}],remote:!0,rowEvents:{onClick:(e,s)=>
2{this.selectPortfolio(s.id)}},onTableChange:this.handleTableChange,noDataIndication:()=>(0,a.jsx)(w.k,{})})})})})]}),!this.state.blocking&&e&&(0,a.jsx)("div",{className:"py-10",children:(0,a.jsx)(D.ln,{imageHeight:150,title:this.props.t("ERROR.FAILED_TO_LOAD_DATA",{ns:"common"}),message:this.props.t("ERROR.CONTACT_SUPPORT",{ns:"common"}),imageUrl:"/media/svg/illustrations/system-error.png"})}),!this.state.blocking&&!e&&this.state.filtered&&0===this.state.filtered.length&&(0,a.jsx)("div",{className:"py-10",children:(0,a.jsx)(D.ln,{title:this.props.t("EMPTY_TABLE_MESSAGE"),imageUrl:"/media/svg/illustrations/telescope.png"})})]})}}let J=(0,d.C)(["common","portfolio","analytics"])(X);var Z=t(88267);let ee=l()(()=>Promise.all([t.e(3669),t.e(8014),t.e(2617),t.e(7518),t.e(1958),t.e(6593),t.e(2725),t.e(8868),t.e(2514),t.e(6031),t.e(1352),t.e(8628),t.e(1840),t.e(8996),t.e(1629),t.e(6854),t.e(4080),t.e(1139),t.e(3483),t.e(9056),t.e(9610),t.e(4828),t.e(5840),t.e(8631),t.e(2189),t.e(3344),t.e(9344),t.e(2649),t.e(1709),t.e(226),t.e(7497),t.e(5075),t.e(2177),t.e(6887),t.e(9928),t.e(6416),t.e(5963),t.e(8905),t.e(9710),t.e(9983),t.e(6366),t.e(4400)]).then(t.bind(t,88656)).then(e=>e.Dashboard),{loadableGenerated:{webpack:()=>[88656]},ssr:!1,loading:()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-3 nav-toolbar-btns dashboard-toolbar"}),(0,a.jsx)(C.J,{})]})}),es="MainDashboard",et={tab:Z.g.PORTFOLIO};function ea(e){let{portfolio:s,portfolioId:t="",currency:i,reload:l,list:c,navHeader:d,clientId:m}=e,h=r.Gu(es,et),{showCustomizeTutorialModal:u}=(0,o.d4)(e=>{let{ui:s}=e;return s}),[p,x]=(0,n.useState)(h.tab),g=e=>{r.LZ(es,{...h,tab:e}),x(e)};return(0,n.useEffect)(()=>{u&&p!==Z.g.PORTFOLIO&&g(Z.g.PORTFOLIO)},[u,p]),(0,a.jsxs)("div",{className:"dashboard-tabs",children:[p===Z.g.PORTFOLIO&&(0,a.jsx)(ee,{portfolioId:t,isComposite:s?.isComposite??!1,portfolio:s,reload:l,currency:i,clientId:m,header:d??(0,a.jsx)(Z.c,{activeTab:Z.g.PORTFOLIO,onTabChange:g})}),p===Z.g.PORTFOLIOS&&(0,a.jsx)(J,{portfolioId:t,onSelect:()=>{g(Z.g.PORTFOLIO)},list:c,reload:l,currency:i,header:d??(0,a.jsx)(Z.c,{activeTab:Z.g.PORTFOLIOS,onTabChange:g})})]})}},9353:(e,s,t)=>{"use strict";t.d(s,{A:()=>b});var a=t(26514),n=t(75834),i=t(7086),l=t(68208),o=t.n(l),r=t(74170),c=t(24665),d=t(23141),m=t(64137),h=t(63390),u=t(152),p=t(76510),x=t(15269),g=t(36241);class N extends n.Component{static #e=this.propTypes={portfolioId:o().string,onDelete:o().func,onHide:o().func};constructor(e){super(e),this.open=e=>{this.setState({show:!0,portfolio:{...e,note:e.note??""}},()=>{setTimeout(()=>{let e=document.getElementById("portfolio-note-input");e&&e.focus()},150)})},this.close=()=>{this.setState({show:!1,portfolio:{}}),this.props.onHide&&this.props.onHide(this.state.portfolio.note)},this.updatePortfolioNote=async()=>{this.setState({blocking:!0});try{let e=h.Zeh,s=this.state.portfolio.id??null;await i.A.put(`${e}/${s}`,this.state.portfolio),this.props?.onSave(this.state.portfolio.note),x.uT(this.props.t("NOTES.SUCCESS_MESSAGE")),this.close(this.state.portfolio.note)}catch(s){let e=(0,g.g6)(`${this.props.t("NOTES.ERROR_MESSAGE")}: 
3`,s);x.f1(e)}this.setState({blocking:!1})},this.state={portfolio:{},blocking:!1,show:!1}}componentWillReceiveProps(e){e.portfolioId&&e.portfolioId!==this.state.portfolioId&&this.setState({portfolioId:e.portfolioId})}render(){return(0,a.jsxs)(r.A,{show:this.state.show,onHide:this.close,"aria-labelledby":"example-modal-sizes-title-lg",children:[this.state.blocking&&(0,a.jsx)(u.q3,{}),(0,a.jsx)(r.A.Header,{closeButton:!0,children:(0,a.jsxs)(r.A.Title,{id:"example-modal-sizes-title-lg",children:[this.props.t("NOTES.TITLE")," ",this.state.portfolio.name]})}),(0,a.jsxs)(p.A,{tag:"div",blocking:this.state.blocking,keepInView:!0,children:[(0,a.jsxs)(r.A.Body,{children:[(0,a.jsx)(c.A.Group,{className:"mb-0",children:(0,a.jsx)(c.A.Control,{id:"portfolio-note-input",className:"form-control-solid",size:"lg",placeholder:this.props.t("FORM.NOTE_PLACEHOLDER"),as:"textarea",rows:"6",value:this.state.portfolio.note,onChange:e=>{this.setState({portfolio:{...this.state.portfolio,note:e.target.value}})},name:"note"})}),(0,a.jsx)("div",{className:"form-text text-muted font-size-sm",children:(0,a.jsx)(d.x,{i18nKey:"portfolio:NOTES.MARKDOWN_MESSAGE",components:[(0,a.jsx)("a",{target:"_blank",href:`https://${this.props.i18n.language}.wikipedia.org/wiki/Markdown`,rel:"noreferrer"})]})})]}),(0,a.jsxs)(r.A.Footer,{children:[(0,a.jsx)("button",{type:"button",onClick:this.close,className:"btn btn-light btn-elevate font-weight-bold",children:this.props.t("BUTTON.DISCARD",{ns:"common"})}),(0,a.jsx)("button",{type:"button",onClick:this.updatePortfolioNote,className:"btn btn-primary btn-elevate font-weight-bold",children:this.props.t("BUTTON.SAVE",{ns:"common"})})]})]})]})}}let b=(0,m.C)(["portfolio","common"],{withRef:!0})(N)},10140:(e,s,t)=>{"use strict";t.d(s,{Qn:()=>l}),t(9610);var a=t(32491),n=t.n(a);t(41673),t(75119),t(20983);var i=t(47115);t(55285);let l=(e,s)=>{if(!e)return"";let t=n()(i.b5,s=>s.code===e);
3if(t)return s?t.symbol:t.htmlCode??t.symbol;if(e?.indexOf("-USD")>-1)return e.replace("-USD","");try{return 0..toLocaleString("en-US",{style:"currency",currency:e,minimumFractionDigits:0,maximumFractionDigits:0}).replace(/\d/g,"").trim()}catch{return e?.toUpper()}}},10367:(e,s,t)=>{"use strict";t.d(s,{l:()=>n,m:()=>a});var a=function(e){return e.TBANK="tbank",e.BCS="bcs",e}({}),n=function(e){return e[e.TBANK=1]="TBANK",e[e.BCS=2]="BCS",e}({})},10930:(e,s,t)=>{"use strict";t.d(s,{X:()=>j});var a=t(26514),n=t(7086),i=t(46225),l=t(75834),o=t(93760),r=t(23141),c=t(59757),d=t(63390),m=t(23615),h=t(61139),u=t(55285),p=t(48208),x=t(48174),g=t(49732),N=t(24138),b=t(15269);function f(e){let{t:s}=(0,o.B)(["user","common"]),{user:t}=(0,c.d4)(e=>e.auth),[n,i]=(0,l.useState)(e.counts??{}),[d,h]=(0,l.useState)({});return(0,l.useEffect)(()=>{i(e.counts)},[e.counts]),(0,l.useEffect)(()=>{!function(){if(!t)return;let e=(0,N.sp)(t.subscriptionType);h({portfolios:e,holdings:(0,N.PN)(t.subscriptionType),customHoldings:(0,N.s2)(t.subscriptionType)})}()},[t]),(0,a.jsx)("div",{className:"row align-items-center justify-content-center",children:(0,a.jsx)("div",{className:"col-auto border rounded-lg p-5",children:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"font-weight-bold font-size-lg mb-3",children:[(0,a.jsx)(r.x,{i18nKey:"user:PLAN_LIMITS.TITLE",components:[(0,a.jsx)(x.q,{text:(0,a.jsx)(a.Fragment,{children:s((0,N.gb)(t?.subscriptionType))})})]}),":"]}),(0,a.jsx)(m.R,{text:(0,a.jsxs)(a.Fragment,{children:[s("PLAN_LIMITS.PORTFOLIOS"),":"," ",(0,a.jsxs)("b",{children:[!!n?.portfoliosCount&&(0,a.jsxs)(a.Fragment,{children:[n?.portfoliosCount,"/"]}),d.portfolios??(0,a.jsx)(a.Fragment,{children:"∞"})]})]}),warn:!!(d.portfolios&&n&&n.portfoliosCount&&d.portfolios<n.portfoliosCount)}),(0,a.jsx)(m.R,{text:(0,a.jsxs)(a.Fragment,{children:[s("PLAN_LIMITS.HOLDINGS"),":"," ",(0,a.jsxs)("b",{children:[!!n?.holdingsCount&&(0,a.jsxs)(a.Fragment,{children:[n?.holdingsCount,"/"]}),d.holdings??(0,a.jsx)(a.Fragment,{children:"∞"})]}),!!(d.holdings&&n&&n.holdingsCount&&d.holdings<n.holdingsCount)&&!!n?.soldHoldingsCount&&(0,a.jsxs)("span",{className:"font-size-sm ml-2",children:["(⚠️"," ",s("PLAN_LIMITS.SOLD_HOLDINGS.MESSAGE",{count:n?.soldHoldingsCount}),")"]})]}),warn:!!(d.holdings&&n&&n.holdingsCount&&d.holdings<n.holdingsCount)}),(0,a.jsx)(m.R,{text:(0,a.jsxs)(a.Fragment,{children:[s("PLAN_LIMITS.CUSTOM_HOLDINGS"),":"," ",(0,a.jsxs)("b",{children:[!!n?.customHoldingsCount&&(0,a.jsxs)(a.Fragment,{children:[n?.customHoldingsCount,"/"]}),d.customHoldings??(0,a.jsx)(a.Fragment,{children:"∞"})]})]}),warn:!!(d.customHoldings&&n&&n.customHoldingsCount&&d.customHoldings<n.customHoldingsCount)})]})})})}function j(e){let{t:s}=(0,o.B)(["user","common"]),t=(0,i.useRouter)(),m=(0,c.wA)(),{user:N}=(0,c.d4)(e=>e.auth),[j,v]=(0,l.useState)({});function A(e){m({type:h.QN.StartRefreshAccessToken}),e||b.uT(s("SUBSCRIPTION_ALERT.SUCCESS_MESSAGE"))}return(0,l.useEffect)(()=>{n.A.get(`${d.kn6}/get-counts`).then(e=>{let{data:s}=e;s&&v(s)}).catch(e=>{console.error(e)})},[N]),(0,a.jsxs)("div",{className:"text-center mt-5",children:[(0,a.jsx)("div",{children:(0,a.jsx)("img",{height:"170",src:"/media/svg/illustrations/profit.png"})}),(0,a.jsx)("h1",{children:(0,a.jsx)(r.x,{i18nKey:"user:PAYWALL.LIMITS.TITLE"})}),!e.fromNew&&(0,a.jsx)("div",{className:"text-dark-65 mt-3 mb-5 px-3",children:(0,a.jsxs)("div",{children:["⚠️"," ",(0,a.jsx)(r.x,{i18nKey:"user:PAYWALL.LIMITS.EXCEEDED_MESSAGE",components:[(0,a.jsx)(p.o,{className:"alert-link font-weight-bold",href:"/user-manage-subscription"}),(0,a.jsx)(x.q,{isBold:!0,text:(0,u.VQ)()})]})," ",(0,a.jsx)(r.x,{i18nKey:"user:PAYWALL.LIMITS.EXCEEDED_MESSAGE.REMOVE",components:[(0,a.jsx)("a",{href:void 0,onClick:()=>{A()},className:"font-weight-bold"})]})]})}),e.fromNew&&(0,a.jsxs)("div",{className:"text-dark-65 mt-3 mb-5",children:["⚠️"," ",(0,a.jsx)(r.x,{i18nKey:"user:PAYWALL.LIMITS.NEW_MESSAGE",components:[(0,a.jsx)(p.o,{className:"alert-link font-weight-bold",href:"/user-manage-subscription"}),(0,a.jsx)(x.q,{isBold:!0,text:(0,u.VQ)()})]})]}),(0,a.jsx)(f,{counts:j}),(0,a.jsxs)("div",{className:"mt-7",children:[!e.fromNew&&(0,a.jsxs)("button",{type:"button",onClick:()=>{A()},className:"btn btn-clean btn-elevate btn-lg font-weight-bold mr-2",children:[(0,a.jsx)(g.A,{src:"/media/svg/icons/General/Update.svg",color:"none",size:"md"})," ",s("BUTTON.RELOAD")]}),(0,a.jsxs)("button",{id:"paywall-limit-message-upgrade",type:"button",onClick:function(){t.push("/user-manage-subscription"),e.hide&&e.hide()},className:"btn btn-primary btn-lg font-weight-bold",children:[(0,a.jsx)(g.A,{src:"/media/svg/icons/General/rocket.svg",color:"none",size:"md"})," ",s("BUTTON.UPGRADE")]})]})]})}},11468:(e,s,t)=>{"use strict";t.d(s,{It:()=>o,ln:()=>l});var a=t(26514);t(75834);var n=t(80966),i=t(54253);function l(e){let s=n.Fr?"250px":"400px";return(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("h3",{className:"font-weight-bolder text-dark",children:e.title}),(0,a.jsx)("div",{className:"text-dark-50 font-wight-bold mb-6",children:e.message}),e.btn&&(0,a.jsx)("div",{children:e.btn}),(0,a.jsx)("div",{className:"row justify-content-center",children:(0,a.jsx)("div",{className:"col-md-6 col-sm-12",children:(0,a.jsx)("img",{src:(0,i.oK)(e.imageUrl),alt:"",style:{maxHeight:e.imageHeight?e.imageHeight:s},className:"align-self-center"})})})]})}function o(e){return(0,a.jsx)("div",{className:"card card-custom gutter-b",children:(0,a.jsx)("div",{className:"card-body",children:(0,a.jsx)(l,{...e})})})}},11754:e=>{e.exports={unavailableMessage:"AiChatUnavailableNotice_unavailableMessage__3nud_",unavailableCard:"AiChatUnavailableNotice_unavailableCard__vFIGr",unavailableIcon:"AiChatUnavailableNotice_unavailableIcon__899RB",unavailableBody:"AiChatUnavailableNotice_unavailableBody__0uuNE"}},13285:(e,s,t)=>{"use strict";t.d(s,{F:()=>d});var a=t(75834),n=t(93760),i=t(7086),l=t(36241),o=t(15269),r=t(63390),c=t(32683);function d(e){let{portfolioId:s,userId:t,userRole:d,checkRoles:m}=e,{t:h}=(0,n.B)("common"),[u,p]=(0,a.useState)([]),[x,g]=(0,a.useState)(!1),N=(e,s)=>!0!==s||((e?.includes("headSupport")||e?.includes("support"))??!1),b=(0,a.useCallback)(async()=>
3{if(s&&N(d,m)){g(!0);try{let e=await i.A.get(`${r.Zwb}/${s}`,{portfolioId:s});p(e.data),g(!1)}catch(s){console.error(s);let e=(0,l.g6)(`${h("ERROR.FAILED_TO_LOAD_DATA")}: 
4`,s);o.f1(e),g(!1)}}},[s,d,m]),f=(0,a.useCallback)(async()=>{if(t&&N(d,m)){g(!0);try{let e=await i.A.get(`${c.Vr}/${t}`);p(e.data||[])}catch(s){console.error(s);let e=(0,l.g6)(`${h("ERROR.FAILED_TO_LOAD_DATA")}: 
5`,s);o.f1(e)}finally{g(!1)}}},[t,d,m]);return(0,a.useEffect)(()=>{s?b():t&&f()},[s,t,b,f]),{load:s?b:f,data:u,isLoading:x}}},14498:e=>{e.exports={root:"QuoteCard_root__e_YtM",buttonStar:"QuoteCard_buttonStar__A9N88"}},15124:(e,s,t)=>{"use strict";t.d(s,{N:()=>i,U:()=>n});var a=t(62379);function n(e,s){e&&(e.syncDate=e.syncDate?new Date(e.syncDate):null,e.providerSyncDate=e.providerSyncDate?new Date(e.providerSyncDate):null,(e.providerSyncDate||e.syncDate)&&(e.syncDateDistance=(0,a.A)(e.providerSyncDate??e.syncDate,new Date,{addSuffix:!0,locale:s})))}function i(e,s){if(e?.length)for(let t of e)n(t,s)}},16974:e=>{e.exports={usageBar:"AiChatUsage_usageBar__yww5E",totalUsage:"AiChatUsage_totalUsage__zUcv7"}},17507:(e,s,t)=>{"use strict";t.d(s,{O:()=>j});var a=t(26514),n=t(32673),i=t(59757),l=t(75834),o=t(93760),r=t(23141),c=t(32491),d=t.n(c),m=t(16926),h=t(80315),u=t(95441),p=t(5771),x=t(80170),g=t(37423),N=t(48889),b=t.n(N),f=t(3859);function j(e){let{t:s}=(0,o.B)("promos"),{showBrokerPromosModal:t}=(0,i.d4)(e=>{let{ui:s}=e;return s}),c=(0,i.wA)(),[N,j]=(0,l.useState)(!1),[v,A]=(0,l.useState)(!1),{isLoading:T,data:C,refetch:E}=(0,u.Hg)(),{anyRunningPromo:_,tbankData:y,bcsData:S}=(0,l.useMemo)(()=>{if(!C?.promos?.length)return{anyRunningPromo:!1,tbankData:null,bcsData:null};let e=d()(C.promos,e=>e.type===u.lo.TBANK&&e.isPromoStillRunning),s=d()(C.promos,e=>e.type===u.lo.BCS&&e.isPromoStillRunning);return{anyRunningPromo:!!e||!!s,tbankData:e??null,bcsData:s??null}},[C?.promos]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h.a,{...e,size:"lg",show:t||e.alwaysVisible,onHide:()=>{c((0,m.yi)(!1))},onShow:()=>{(0,u.XB)(),E()},dialogClassName:`${b().modalDialog} ${e.fullScreen?b().fullScreen:""}`,bodyClassName:b().modalBody,title:(0,a.jsx)("div",{className:`pl-4 pl-sm-0 mb-2 ${b().title}`,children:s("PROMOS.MODAL.TITLE")}),children:(0,a.jsxs)(n.A,{gap:{xs:2,sm:2},children:[T&&(0,a.jsx)(p.J,{count:2}),!T&&_&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:b().divider}),(0,a.jsx)("div",{children:!!S&&(0,a.jsx)(x.d,{title:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.COMPACT.TITLE",components:[(0,a.jsx)("span",{className:"text-nowrap"})]}),iconUrl:"/media/brokers/bcs_logo_big.png",onClick:()=>{A(!0)}})})]})]})}),(0,a.jsx)(f.A,{show:N,data:y,onPromocodeClaimed:E,onHide:()=>{j(!1)}}),(0,a.jsx)(g.C,{show:v,data:S,onPromocodeClaimed:E,onHide:()=>{A(!1)}})]})}},17618:(e,s,t)=>{"use strict";t.d(s,{EL:()=>d,OF:()=>N,Rq:()=>h,x2:()=>b,e2:()=>f});var a=t(7086),n=function(e){return e.BASE="{apiUrl}/api/custom-quotes",e}({});async function i(){let{data:e}=await a.A.get(n.BASE);return e}async function l(e){let{data:s}=await a.A.post(n.BASE,e);return s.favoriteQuoteId}async function o(e){await a.A.delete(`${n.BASE}?favoriteQuoteId=${e}`)}async function r(e){await a.A.put(n.BASE,{favoriteQuoteIds:e})}var c=t(33989);function d(e){let{assetInfoId:s,toCurrency:t}=e;return`${s}${t?`:${t}`:""}`}let m="quotes";function h(){return(0,c.I)({queryKey:[m],queryFn:async()=>{let e=await i();return{recommended:e.recommended.map(e=>({...e,quoteId:d(e),isDisabled:!1})),favourites:e.favourites.map(e=>({...e,quoteId:d(e),isDisabled:!1}))}}})}var u=t(85398),p=t(14063),x=t(27188),g=t(46833);function N(){let e=(0,u.jE)(),s=(0,p.n)({mutationFn:e=>l({assetInfoId:e.assetInfoId,quoteCurrency:e.quoteCurrency??""}),onMutate:async s=>{e.cancelQueries({queryKey:[m]});let t=e.getQueryData([m]);if(!t)return;let a=[...t.recommended,...t.favourites].find(e=>e.quoteId===d({...s,toCurrency:s.quoteCurrency}));a&&e.setQueryData([m],e=>e?{favourites:e.favourites.map(e=>e.quoteId===a.quoteId?{...e,isDisabled:!0}:e),recommended:e.recommended.map(e=>e.quoteId===a.quoteId?{...e,isDisabled:!0}:e)}:e)},onSuccess:(e,s)=>{let t=(0,x.eM)().map(t=>t.assetInfoId===s.assetInfoId?{...t,favoriteQuoteId:e}:t);(0,x.hY)(t)},onSettled:()=>
5{e.invalidateQueries({queryKey:[m]}),e.invalidateQueries({queryKey:[g.If]})}});return{...s,addFavouriteQuote:s.mutateAsync}}function b(){let e=(0,u.jE)(),s=(0,p.n)({mutationFn:o,onMutate:s=>{e.cancelQueries({queryKey:[m]});let t=e.getQueryData([m]);if(!t)return;let a=[...t.recommended,...t.favourites].find(e=>e.favoriteQuoteId===s);a&&e.setQueryData([m],e=>e?{favourites:e.favourites.map(e=>e.quoteId===a.quoteId?{...e,isDisabled:!0}:e),recommended:e.recommended.map(e=>e.quoteId===a.quoteId?{...e,isDisabled:!0}:e)}:e)},onSuccess:(e,s)=>{let t=(0,x.eM)().map(e=>e.favoriteQuoteId===s?{...e,favoriteQuoteId:null}:e);(0,x.hY)(t)},onSettled:()=>{e.invalidateQueries({queryKey:[m]}),e.invalidateQueries({queryKey:[g.If]})}});return{...s,removeFavouriteQuote:s.mutateAsync}}function f(){let e=(0,u.jE)(),s=(0,p.n)({mutationFn:r,onMutate:async s=>{e.cancelQueries({queryKey:[m]});let t=e.getQueryData([m]);if(!t)return;let a=[];s.forEach(e=>{let s=t.favourites.find(s=>{let{favoriteQuoteId:t}=s;return t===e});s&&a.push(s)}),e.setQueryData([m],e=>({...e,favourites:a}))},onSettled:()=>{e.invalidateQueries({queryKey:[m]}),e.invalidateQueries({queryKey:[g.If]})}});return{...s,updateFavouriteQuoteOrder:s.mutateAsync}}},19806:e=>{e.exports={footer:"AiChatPanelFooter_footer__HxNax",detailsBtn:"AiChatPanelFooter_detailsBtn__N41C_",feedbackBtn:"AiChatPanelFooter_feedbackBtn__RdVvb"}},23277:e=>{e.exports={modalBody:"BcsModal_modalBody__4a1aX",badge:"BcsModal_badge__LDXrU",content:"BcsModal_content__QuOgz",title:"BcsModal_title__N1_xP",divider:"BcsModal_divider__1uLCr",steps:"BcsModal_steps__hvjuw",step:"BcsModal_step__x2VHx",active:"BcsModal_active__zXEY0",completed:"BcsModal_completed__Xze7f",stepNumber:"BcsModal_stepNumber__LrDYp",stepHeader:"BcsModal_stepHeader__hw7_g",stepText:"BcsModal_stepText__00Qlb",stepButton:"BcsModal_stepButton__2horm"}},23426:(e,s,t)=>{"use strict";t.d(s,{I:()=>g});var a=t(26514);t(75834);var n=t(59757),i=t(46225),l=t(93760),o=t(78231),r=t(33734),c=t(60547),d=t(5625),m=t(45251),h=t(47894),u=t(65119),p=t(83602),x=t(62400);function g(e){let{isDark:s,toggleTheme:t}=(0,p.DP)(),g=(0,i.useRouter)(),N=(0,h.sc)(),{t:b}=(0,l.B)("layout"),{user:f,referral:j,partnerUtm:v}=(0,n.d4)(e=>{let{auth:s,app:t}=e;return{user:s.user,referral:t.referral,partnerUtm:t.partnerUtm}}),A=g.pathname.indexOf("public/portfolios/")>=0,T={pathname:"/auth/registration",query:{...j?{promo:j}:{},...v?{p_utm:v}:{}}};return(0,a.jsxs)("div",{className:"mobile"!=e.view?"topbar":"d-flex align-items-center",children:[(0,a.jsx)(x.l,{isNewPage:!1}),(0,a.jsx)("div",{className:`mx-2 topbar-item ${!N?"d-none d-md-flex":""}`,children:(0,a.jsx)(r.A,{isDark:s,onChange:t})}),A&&(0,a.jsx)(u.J,{view:e.view}),(0,a.jsx)(o.Q,{persistor:d.qj,children:e.isSignedIn||f?(0,a.jsx)("div",{className:"topbar-item ml-3",children:(0,a.jsx)(m.N,{legacyBehavior:!0,href:"/dashboard",children:(0,a.jsx)("a",{className:"btn btn-light-primary font-weight-bold",children:b("mobile"!=e.view?"TOPBAR.TO_MY_PORTFOLIOS":"TOPBAR.TO_PORTFOLIOS")})})}):(0,a.jsx)("div",{className:"topbar-item ml-3",children:(0,a.jsx)(m.N,{legacyBehavior:!0,href:T,children:(0,a.jsx)("a",{onClick:()=>{(0,c.bW)(0x4eb7f82,"try")},className:"btn btn-primary font-weight-bold",children:b("mobile"!=e.view?"TOPBAR.TRY_FOR_FREE":"TOPBAR.TRY")})})})})]})}},23615:(e,s,t)=>{"use strict";t.d(s,{R:()=>p,S:()=>x});var a=t(26514);t(75834);var n=t(93760),i=t(9610),l=t.n(i),o=t(75119),r=t.n(o),c=t(62531),d=t(47115),m=t(55285),h=t(50007),u=t(97043);function p(e){return(0,a.jsxs)("div",{className:`d-flex align-items-top mb-2 ${e.warn&&"text-warning"}`,children:[!e.warn&&(0,a.jsx)(a.Fragment,{children:"✓"}),e.warn&&(0,a.jsx)("span",{children:"✗"}),!!e.description&&(0,a.jsx)(u.o,{title:e.description,nonInteractive:!0,children:(0,a.jsx)("span",{className:"text-left pl-2 hoverable-item",children:e.text})}),!e.description&&(0,a.jsx)("span",{className:"text-left pl-2",children:e.text}),e.isNew&&(0,a.jsx)("span",{className:"ml-2",children:(0,a.jsx)(h.L,{type:"label"})})]})}function x(e){let{t:s}=(0,n.B)(["user","common"]),t=(0,m.de)(),i=[{text:s("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_2"),value:"2",available:t?[d.Qh.TRIAL]:[d.Qh.TRIAL,d.Qh.TIER_1]},{text:s("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_UNLIM"),value:"∞",available:[d.Qh.TIER_1_OLD,d.Qh.TIER_3]},{text:s("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_1"),value:"1",available:t?[d.Qh.TIER_0,d.Qh.TIER_1]:[d.Qh.TIER_0]},{text:s("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_10"),value:"10",available:t?[d.Qh.TIER_2]:[]},{text:s("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_20"),value:"20",available:t?[]:[d.Qh.TIER_2]},{text:s("USER.PRICING.OPTIONS.ASSETS_COUNT_UNLIM"),value:"∞",available:[d.Qh.TRIAL,d.Qh.TIER_1_OLD,d.Qh.TIER_1,d.Qh.TIER_2,d.Qh.TIER_3]},{text:s("USER.PRICING.FEATURES.MCP"),available:[d.Qh.TIER_3],isNew:!0,description:(0,a.jsx)(a.Fragment,{children:s("MCP.DESCRIPTION.USER")})},{text:s("USER.PRICING.OPTIONS.ASSETS_COUNT_10"),value:"10",available:[d.Qh.TIER_0],note:s("USER.PRICING.OPTIONS.ASSETS_COUNT.NOTE")},{text:s("USER.PRICING.OPTIONS.CUSTOM_HOLDINGS_COUNT_1"),value:"1",available:[d.Qh.TIER_0]},{text:s("USER.PRICING.OPTIONS.CUSTOM_HOLDINGS_COUNT_5"),value:"5",available:[d.Qh.TRIAL,d.Qh.TIER_1]},{text:s("USER.PRICING.OPTIONS.CUSTOM_HOLDINGS_COUNT_UNLIM"),value:"∞",available:[d.Qh.TIER_1_OLD,d.Qh.TIER_2,d.Qh.TIER_3]},{text:s("USER.PRICING.OPTIONS.WATCHLIST_COUNT_1"),value:"1",available:[d.Qh.TIER_0,d.Qh.TRIAL]},{text:s("USER.PRICING.OPTIONS.WATCHLIST_COUNT_2"),value:"2",available:[d.Qh.TIER_1]},{text:s("USER.PRICING.OPTIONS.WATCHLIST_COUNT_10"),value:"10",available:[d.Qh.TIER_2]},{text:s("USER.PRICING.OPTIONS.WATCHLIST_COUNT_20"),value:"20",available:[d.Qh.TIER_1_OLD,d.Qh.TIER_3]},{text:s("USER.PRICING.FEATURES.CUSTOM_QUOTES"),available:[d.Qh.TIER_1]},{text:s("USER.PRICING.FEATURES.SYNC_BROKERAGE"),available:[d.Qh.TIER_1],globalOnly:!0},{text:s("USER.PRICING.FEATURES.WHY_IS_IT_MOVING"),available:[d.Qh.TIER_2,d.Qh.TIER_3],globalOnly:!0,description:(0,a.jsx)(a.Fragment,{children:s("USER.PRICING.FEATURES.WHY_IS_IT_MOVING.HELP")})},{text:s("USER.PRICING.OPTIONS.PORTFOLIO_REPORT"),available:[d.Qh.TIER_2]},{text:s("USER.PRICING.FEATURES.ASSET_TYPES"),available:[d.Qh.TIER_0]},{text:s("USER.PRICING.FEATURES.CALENDAR"),available:[d.Qh.TIER_0]},{text:s("USER.PRICING.FEATURES.BROKER_REPORTS"),available:[d.Qh.TIER_0]},{text:s("USER.PRICING.FEATURES.TINKOFF_API_MANUAL"),available:t?[]:[d.Qh.TIER_0]},{text:s("USER.PRICING.FEATURES.TINKOFF_API_FULL"),available:t?[]:[d.Qh.TIER_1]},{text:s("USER.PRICING.FEATURES.BENCHMARK_LIMITED"),available:[d.Qh.TIER_0]},{text:s("USER.PRICING.FEATURES.BENCHMARK_FULL"),available:[d.Qh.TIER_2]},{text:s("USER.PRICING.FEATURES.CASH_FULL"),available:[d.Qh.TIER_0]},{text:s("USER.PRICING.FEATURES.INSIGHTS"),available:t?[]:[d.Qh.TIER_1],isNew:!0}
5,{text:s("USER.PRICING.FEATURES.REBALANCE_LIMITED"),available:[d.Qh.TIER_0]},{text:s("USER.PRICING.FEATURES.REBALANCE_FULL"),available:[d.Qh.TIER_1]},{text:s("USER.PRICING.FEATURES.WEEKLY_UPDATE"),available:[d.Qh.TIER_1]},{text:s("USER.PRICING.FEATURES.DIVIDEND_SCORE"),available:[d.Qh.TIER_1]},{text:s("USER.PRICING.FEATURES.DIVFINDER_5"),available:[d.Qh.TIER_0]},{text:s("USER.PRICING.FEATURES.DIVFINDER_20"),available:[d.Qh.TIER_1]},{text:s("USER.PRICING.FEATURES.DIVFINDER_FULL"),available:[d.Qh.TIER_2]},{text:s("USER.PRICING.FEATURES.FUNDAMENTALS_10Y.NAME"),available:[d.Qh.TIER_2]},{text:s("USER.PRICING.FEATURES.BACKTEST_30Y.NAME"),available:[d.Qh.TIER_2]},{text:s("USER.PRICING.FEATURES.DIV_PUSH_NOTIFICATIONS"),available:[d.Qh.TIER_1]},{text:s("USER.PRICING.FEATURES.DIV_PUSH_AND_EMAIL_NOTIFICATIONS"),available:[d.Qh.TIER_2]}],o=l()(i,s=>(!s.globalOnly||s.globalOnly&&t)&&s.available.indexOf(e.tier)>=0).map(s=>({text:s.text,yes:s.available.indexOf(e.tier)>=0,isNew:s.isNew,description:s.description})),h=e.showCollapsed>0?r()(o,e.showCollapsed):o;return(0,a.jsxs)("div",{className:"pt-4",children:[h.map((e,s)=>(0,a.jsx)(p,{text:e.text,isNew:e.isNew,description:e.description,yesno:!0,yes:e.yes},s)),h.length<o.length&&(0,a.jsx)("div",{children:(0,a.jsxs)("button",{type:"button",className:"btn btn-link-light text-muted text-hover-dark",onClick:()=>{e.onCollapseChange&&e.onCollapseChange(!1)},children:[(0,a.jsx)(c.A,{fontSize:"sm",sx:{marginRight:"2px"}}),s("BUTTON.SEE_MORE_FEATURES",{ns:"common"})]})})]})}},23667:(e,s,t)=>{"use strict";t.d(s,{L2:()=>d,td:()=>c,Dl:()=>m,LO:()=>l,XB:()=>o,Rq:()=>r});var a=t(7086);let n="/api/integrations/public-brokerage";var i=function(e){return e[e.ON_CLOSE_DASHBOARD_NOTIFICATION=`${n}/on-close-dashboard-notification`]="ON_CLOSE_DASHBOARD_NOTIFICATION",e[e.ON_DIALOG_OPENED=`${n}/on-dialog-opened`]="ON_DIALOG_OPENED",e[e.ON_SIGNUP_LINK_CLICKED=`${n}/on-signup-link-clicked`]="ON_SIGNUP_LINK_CLICKED",e[e.GET_DIALOG_INFO=`${n}/get-dialog-info`]="GET_DIALOG_INFO",e[e.RECEIVE_BONUS=`${n}/receive-bonus`]="RECEIVE_BONUS",e[e.GET_CONNECTION_LINK=`{apiUrl}${n}/get-connection-link`]="GET_CONNECTION_LINK",e}({});async function l(){return a.A.post(i.ON_CLOSE_DASHBOARD_NOTIFICATION)}async function o(){return a.A.post(i.ON_DIALOG_OPENED)}async function r(){return a.A.post(i.ON_SIGNUP_LINK_CLICKED)}async function c(){return a.A.get(i.GET_DIALOG_INFO).then(e=>{let{data:s}=e;return s})}async function d(){return a.A.get(i.GET_CONNECTION_LINK).then(e=>{let{data:s}=e;return s.link})}async function m(){return a.A.post(i.RECEIVE_BONUS)}},24138:(e,s,t)=>{"use strict";t.d(s,{Bz:()=>i,PN:()=>r,gb:()=>n,s2:()=>o,sp:()=>l});var a=t(47115);function n(e){switch(e){case a.Qh.TRIAL:return"USER.PRICING.TRIAL_SUBSCRIPTION";case a.Qh.TIER_0:return"USER.PRICING.FREE_SUBSCRIPTION";case a.Qh.TIER_1:return"USER.PRICING.TIER1";case a.Qh.TIER_2:return"USER.PRICING.TIER2";case a.Qh.TIER_3:return"USER.PRICING.TIER3";case a.Qh.TIER_1_OLD:return"USER.PRICING.FULL_SUBSCRIPTION";default:return""}}function i(e){switch(e){case a.Qh.TIER_0:return"USER.PRICING.FREE_SUBSCRIPTION.FOR_WHO";case a.Qh.TIER_1:return"USER.PRICING.TIER1.FOR_WHO";case a.Qh.TIER_2:return"USER.PRICING.TIER2.FOR_WHO";case a.Qh.TIER_3:return"USER.PRICING.TIER3.FOR_WHO";case a.Qh.TIER_1_OLD:return"USER.PRICING.FULL_SUBSCRIPTION.FOR_WHO";case a.Qh.TRIAL:return"USER.PRICING.TRIAL.FOR_WHO";default:return""}}function l(e){switch(e){case a.Qh.TRIAL:return 2;case a.Qh.TIER_0:case a.Qh.TIER_1:return"1";case a.Qh.TIER_2:return"10";default:return null}}function o(e){switch(e){case a.Qh.TIER_0:return 1;case a.Qh.TIER_1:return 5;default:return null}}function r(e){return e===a.Qh.TIER_0?10:null}},25294:e=>{e.exports={root:"SubscriptionExpirationNotification_root__vKbIX",list:"SubscriptionExpirationNotification_list__V1RGB"}},27188:(e,s,t)=>{"use strict";t.d(s,{GK:()=>r,eM:()=>o,hY:()=>c});var a=t(75119),n=t.n(a),i=t(4469);let l="RecentSearchMainTop";function o(){let{items:e}=(0,i.Gu)(l,{items:[]});return e.filter(e=>{let{value:s}=e;return!!s})}function r(e){let s=o().filter(s=>{let{value:t}=s;return t!==e.value});s.unshift(e),s=n()(s,5),(0,i.LZ)(l,{items:s})}function c(e){(0,i.LZ)(l,{items:e})}},27497:e=>{e.exports={panel:"AiChatPanel_panel__X6bd9",header:"AiChatPanel_header__lJl67",clearBtn:"AiChatPanel_clearBtn__3vKCh",clearIcon:"AiChatPanel_clearIcon__oJm6v",messagesContainer:"AiChatPanel_messagesContainer__w2_7z",messages:"AiChatPanel_messages__UPhqn",jumpToLatestBtn:"AiChatPanel_jumpToLatestBtn__SVON7",jumpToLatestIcon:"AiChatPanel_jumpToLatestIcon__6knGv"}},29544:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>ey});var a=t(26514),n=t(38089),i=t(7086),l=t(32491),o=t.n(l),r=t(24322),c=t.n(r),d=t(96456),m=t.n(d),h=t(75834),u=t
5(93760),p=t(59757),x=t(14009),g=t(46225),N=t(53804),b=t(63390),f=t(72164),j=t(82134),v=t(68208),A=t.n(v),T=t(74170),C=t(24665),E=t(60008),_=t(52828),y=t(39781),S=t(93969),I=t(89754),O=t(91394),R=t(23141),w=t(64137),k=t(80824),L=t(152),D=t(5625),P=t(47115),M=t(3163),B=t(75165),F=t(73669),U=t(76510),G=t(15269),H=t(36241),$=t(78693);function W(e){let[s,t]=(0,h.useState)(e.value),{t:n}=(0,u.B)("portfolio");function i(s){t(s),e.onChange&&e.onChange(s)}return(0,h.useEffect)(()=>{t(e.value)}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-2 d-flex align-items-center justify-content-between",children:(0,a.jsxs)("div",{className:"row",children:[(0,a.jsxs)("div",{className:"col-auto",children:[(0,a.jsx)("button",{className:"btn btn-light-primary font-weight-bold btn-sm mr-2",type:"button",onClick:function(){e.options.forEach(e=>{0>s.indexOf(e.id)&&s.push(e.id)}),i(s)},children:n("SELECT_ALL")}),(0,a.jsx)("button",{className:"btn btn-light-danger font-weight-bold btn-sm mr-2",type:"button",onClick:function(){i([])},children:n("DESELECT_ALL")})]}),(0,a.jsx)("span",{className:"col-auto text-muted align-self-center",children:(0,a.jsxs)("small",{children:[n("SELECTED_ITEMS"),": ",s.length]})})]})}),(0,a.jsx)("div",{className:"multi-portfolio-selector d-flex flex-wrap",children:e.options.map(e=>{var t;return(0,a.jsx)("div",{className:`multi-portfolio-selector-item ${s.indexOf(e.id)>=0&&"selected border-primary bg-light-primary"}`,children:(0,a.jsxs)("div",{className:"d-flex align-items-center",onClick:()=>{!function(e){if(s.indexOf(e)>=0){let t=s.indexOf(e);t>-1&&s.splice(t,1),i(s)}else s.push(e),i(s)}(e.id)},children:[(0,a.jsx)("span",{className:"broker-symbol mr-2",children:(t=e.broker??"Other",e.id,(0,$.Tb)(e,t))}),(0,a.jsx)("span",{title:e.name,className:"item-description",children:e.name})]})},`key-${e.id}`)})})]})}var K=t(79598),z=t(56103),V=t(55285),Q=t(73822);class Y extends h.Component{static #e=this.propTypes={portfolioId:A().string,onSave:A().func,onHide:A().func};constructor(e){super(e),this.portfolioSchema=I.Ik().shape({name:I.Yj().min(1,this.props.t("FORM.VALIDATION.NAME_MIN")).max(100,this.props.t("FORM.VALIDATION.NAME_MAX")).required(this.props.t("FORM.VALIDATION.NAME_REQUIRED")),note:I.Yj().nullable(!0).max(2e3,this.props.t("FORM.VALIDATION.NOTE_MAX")),defaultCurrency:I.Yj().nullable(),applyTaxesOnPaidDividends:I.zM(),goalValue:I.ai().min(0,this.props.t("FORM.VALIDATION.GOAL_MIN")).max(0xe8d4a50fff,this.props.t("FORM.VALIDATION.GOAL_MAX")),childPortfolios:I.YO(),doNotAdjustXIRR:I.zM(),sendSummaryUpdateNotifications:I.zM()}),this.open=async e=>{this.setState({show:!0},async()=>{await this.loadPortfolios(),await this.getPortfolio(e)})},this.close=()=>{this.setState({show:!1,portfolio:{name:"",note:"",defaultCurrency:(0,V.de)()?"USD":"RUB",goalType:P.eu.INCOME,goalValue:"",type:P.N$.TRANSACTIONAL,goalCurrency:(0,V.de)()?"USD":"RUB",portfolioId:null,broker:null,applyTaxesOnPaidDividends:!1,dividendTaxPercent:"",isComposite:!0,childPortfolios:[],doNotAdjustXIRR:!1,sendSummaryUpdateNotifications:!1}}),this.props.onHide&&this.props.onHide()},this.updateStore=async(e,s,t)=>{D.M_.dispatch((0,M.lT)(new Date));let a=this.state.portfolio.portfolioId??null,{app:{currentPortfolio:n}}=D.M_.getState();(t||a==n.id)&&D.M_.dispatch((0,M.Sq)(e)),this.props.onSave&&this.props.onSave(),this.setState({blocking:!1}),this.close()},this.save=async(e,s)=>{this.setState({blocking:!0});try{let t=b.kn6,a=this.state.portfolio.portfolioId??null,n=[];e.sendSummaryUpdateNotifications&&n.push({DeliveryMethod:P.JT,NotificationType:P.Ql});let l={Name:e.name,Note:e.note,DefaultCurrency:e.defaultCurrency,GoalType:parseInt(e.goalType),GoalValue:e.goalValue,GoalCurrency:e.goalCurrency,Type:parseInt(e.type),Broker:this.state.portfolio.broker,ApplyTaxesOnPaidDividends:e.applyTaxesOnPaidDividends??!1,DividendTaxPercent:e.dividendTaxPercent??0,IsComposite:!0,ChildPortfolios:e.childPortfolios,TrackCash:!0,DoNotAdjustXIRR:e.doNotAdjustXIRR??!1,PortfolioNotificationSettings:n};""===l.GoalValue&&(l.GoalValue=0),""===l.DividendTaxPercent&&(l.DividendTaxPercent=0);let o={};a?(l.Id=a,o=await i.A.put(`${t}/${a}`,l)):o=await i.A.post(t,l);let{data:r}=o,c=r.portfolioNotificationSettings.filter(e=>e.notificationType===P.Ql&&e.deliveryMethod===P.JT).length>0;this.setState({portfolio:{name:r.name,note:r.note,defaultCurrency:r.defaultCurrency,goalType:r.goalType.toString(),goalValue:r.goalValue,type:r.type.toString(),goalCurrency:r.goalCurrency,portfolioId:this.state.portfolio.portfolioId,broker:r.broker,applyTaxesOnPaidDividends:r.applyTaxesOnPaidDividends,dividendTaxPercent:r.dividendTaxPercent,trackCash:!0,doNotAdjustXIRR:r.doNotAdjustXIRR,sendSummaryUpdateNotifications:c},isNew:!1}),a?G.uT(this.props.t("PORTFOLIO_UPDATED")):G.uT(this.props.t("PORTFOLIO_CREATED")),e.id=r.id,this.updateStore(r,s,!a)}catch(e){console.error(e),(0,H.ZC)(e,s)}this.setState({blocking:!1})},this.getPortfolio=async e=>{if(e)try{let{data:s}=await i.A.get(`${b.kn6}/${e}`),t=s.portfolioNotificationSettings.filter(e=>e.notificationType===P.Ql&&e.deliveryMethod===P.JT).length>0;this.setState({blocking:!1,isNew:!1,portfolio:{name:s.name,note:s.note??"",defaultCurrency:s.defaultCurrency,goalType:s.goalType?.toString(),goalValue:s.goalValue??"",type:s.type?.toString()??"",goalCurrency:s.goalCurrency??"USD",portfolioId:e,broker:s.broker,applyTaxesOnPaidDividends:s.applyTaxesOnPaidDividends,dividendTaxPercent:s.dividendTaxPercent,isComposite:s.isComposite,childPortfolios:s.childPortfolios,trackCash:!0,doNotAdjustXIRR:s.doNotAdjustXIRR,sendSummaryUpdateNotifications:t}})}catch(s){let e=(0,H.g6)(`${this.props.t("ERROR.FAILED_TO_LOAD_DATA",{ns:"common"})}: 
6`,s);G.f1(e),console.error(s)}else null===e&&this.setState({blocking:!1,isNew:!0,portfolio:{name:this.props.t("COMPOSITE_PORTFOLIO"),note:"",defaultCurrency:(0,V.de)()?"USD":"RUB",goalType:P.eu.INCOME,goalValue:"",type:P.N$.TRANSACTIONAL,goalCurrency:(0,V.de)()?"USD":"RUB",portfolioId:null,broker:null,applyTaxesOnPaidDividends:!1,dividendTaxPercent:"",isComposite:!0,trackCash:!0,sendSummaryUpdateNotifications:!1}})},this.loadPortfolios=async()=>{this.setState({blocking:!0});try{let{data:e}=await i.A.get(`${b.N5O}?includeHidden=true`);this.setState(()=>({selectablePortfolios:e}))}catch(s){let e=(0,H.g6)(`${this.props.t("ERROR.FAILED_TO_LOAD_DATA",{ns:"common"})}: 
7`,s);G.f1(e)}},this.setTab=e=>{this.setState({tab:e})},this.state={portfolio:{name:this.props.t("COMPOSITE_PORTFOLIO"),note:"",defaultCurrency:(0,V.de)()?"USD":"RUB",goalCurrency:(0,V.de)()?"USD":"RUB",goalType:P.eu.INCOME,goalValue:"",type:P.N$.TRANSACTIONAL,portfolioId:e.portfolioId??null,broker:null,applyTaxesOnPaidDividends:!1,dividendTaxPercent:"",isComposite:!0,trackCash:!0,doNotAdjustXIRR:!1,sendSummaryUpdateNotifications:!1},selectablePortfolios:[],blocking:!1,show:!1,tab:"basic",view:"compact",isNew:!0}}componentDidMount(){}setView(e){this.setState({view:e})}render(){return(0,a.jsxs)(T.A,{show:this.state.show,onHide:this.close,"aria-labelledby":"example-modal-sizes-title",size:"lg",children:[(0,a.jsxs)(a.Fragment,{children:[this.state.blocking&&(0,a.jsx)(L.q3,{}),(0,a.jsx)(T.A.Header,{closeButton:!0,children:(0,a.jsx)(T.A.Title,{id:"example-modal-sizes-title",children:this.props.t("COMPOSITE_PORTFOLIO")})})]}),(0,a.jsxs)(T.A.Body,{className:"overlay overlay-block cursor-default pt-0",children:[this.state.blocking&&(0,a.jsx)("div",{className:"overlay-layer bg-transparent",children:(0,a.jsx)("div",{className:"spinner spinner-lg spinner-success"})}),(0,a.jsx)(O.l1,{initialValues:this.state.portfolio,validationSchema:this.portfolioSchema,enableReinitialize:!0,onSubmit:(e,s)=>{this.save(e,s)},children:e=>(0,a.jsx)(U.A,{tag:"div",blocking:this.state.blocking,keepInView:!0,children:(0,a.jsxs)(C.A,{onSubmit:e.handleSubmit,children:[!this.state.isNew&&(0,a.jsxs)("ul",{className:"nav nav-tabs nav-tabs-line nav-tabs-line-2x nav-card-header sb-nav nav-bold ",role:"tablist",children:[(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("basic"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"basic"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"tab","aria-selected":("basic"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.COMMON")})})}),(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("tax"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"tax"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"button","aria-selected":("tax"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.TAX")})})}),(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("notifications"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"notifications"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"button","aria-selected":("notifications"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.NOTIFICATIONS")})})}),(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("other"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"other"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"button","aria-selected":("other"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.OTHER")})})})]}),(0,a.jsxs)("div",{className:"mt-4",children:["basic"===this.state.tab&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(C.A.Group,{children:[(0,a.jsx)(C.A.Label,{children:this.props.t("FORM.NAME")}),(0,a.jsx)(C.A.Control,{className:"form-control-solid",size:"lg",type:"text",placeholder:"",onChange:e.handleChange,onBlur:e.handleBlur,value:e.values.name,name:"name"}),e.touched.name&&e.errors.name&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.name})})]}),(0,a.jsxs)(C.A.Group,{children:[(0,a.jsx)(C.A.Label,{children:this.props.t("FORM.ITEMS")}),(0,a.jsx)(W,{value:e.values.childPortfolios??[],onChange:s=>{e.setFieldValue("childPortfolios",s)},options:this.state.selectablePortfolios}),e.errors.childPortfolios&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.childPortfolios})})]}),!this.state.isNew&&(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("div",{className:"col-md-3 col-sm-12",children:(0,a.jsxs)(C.A.Group,{children:[(0,a.jsxs)(C.A.Label,{children:[this.props.t("FORM.CURRENCY")," ",(0,a.jsx)(F.N,{placement:"right",message:this.props.t("FORM.CURRENCY_HELP")})]}),(0,a.jsx)(k.A,{className:"sb-select col form-control",variant:"filled",children:(0,a.jsx)(z.J,{placeholder:this.props.t("FORM.CURRENCY_PLACEHOLDER"),fullWidth:!1,optionDisplay:"full",value:e.values.defaultCurrency,onChange:(s,t)=>{let a=t?t.value:"";e.setFieldValue("defaultCurrency",a,!0),e.values.defaultCurrency=a,!a||this.state.portfolio.portfolioId||e.touched.goalCurrency||(e.setFieldValue("goalCurrency",a,!0),e.values.goalCurrency=a)}})}),e.touched.currency&&e.errors.currency&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.currency})})]})}),(0,a.jsx)("div",{className:"col-md-9 col-sm-12",children:(0,a.jsxs)(C.A.Group,{children:[(0,a.jsxs)(C.A.Label,{children:[this.props.t("FORM.GOAL"),(0,a.jsx)(F.N,{placement:"right",message:this.props.t("FORM.GOAL_HELP")})]}),(0,a.jsxs)(C.A.Row,{className:"justify-content-start ml-0",children:[(0,a.jsx)(E.A,{className:"form-group col col-auto p-0 mr-2 mb-2",children:(0,a.jsxs)(_.A,{type:"radio",name:"goalType",className:"widget-toggle-group toggle-md",onChange:(s,t)=>{e.values.goalType=s,e.handleBlur(t)},onBlur:e.handleBlur,defaultValue:P.eu.INCOME,value:e.values.goalType,children:[(0,a.jsx)(y.A,{size:"md",className:"font-weight-bold mr-2",variant:"primary",value:P.eu.CAPITAL_GAINS,children:this.props.t("FORM.GOAL_TYPE.VALUE")}),(0,a.jsx)(y.A,{size:"md",className:"font-weight-bold",variant:"primary",value:P.eu.INCOME,children:this.props.t("FORM.GOAL_TYPE.PASSIVE_INCOME")})]})}),(0,a.jsxs)(C.A.Group,{as:S.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)(Q.c,{className:"form-control form-control-lg form-control-solid",placeholder:this.props.t("FORM.GOAL.PLACEHOLDER"),name:"goalValue",isAllowed:H.e4,onValueChange:s=>{e.setFieldValue("goalValue",s.value||s.floatValue,!0),e.values.goalValue=s.value||s.floatValue},onBlur:e.handleBlur,value:e.values.goalValue}),(0,a.jsx)(k.A,{className:"sb-select form-control",variant:"filled",style:{position:"absolute",width:"85px",right:0,top:0},children:(0,a.jsx)(z.J,{value:e.values.goalCurrency,onChange:(s,t)=>{let a=t?t.value:"";e.setFieldValue("goalCurrency",a,!0),e.values.goalCurrency=a}})}),e.touched.goalValue&&e.errors.goalValue&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.goalValue})})]})]}),e.values.goalValue>0&&(0,a.jsxs)("span",{className:"text-muted mt-n5",children:["(",e.values.goalType===P.eu.INCOME?(0,a.jsx)(R.x,{i18nKey:"portfolio:FORM.GOAL.MESSAGE_INCOME",components:[(0,a.jsx)(B.b,{value:e.values.goalValue,currency:e.values.goalCurrency,isMoney:!0}),(0,a.jsx)(B.b,{value:e.values.goalValue/12,currency:e.values.goalCurrency,isMoney:!0})]}):(0,a.jsx)(R.x,{i18nKey:"portfolio:FORM.GOAL.MESSAGE_VALUE",components:[(0,a.jsx)(B.b,{value:e.values.goalValue,currency:e.values.goalCurrency,isMoney:!0})]}),")"]})]})})]}),(0,a.jsxs)(C.A.Group,{children:[(0,a.jsx)(C.A.Label,{children:this.props.t("FORM.NOTE")}),(0,a.jsx)(C.A.Control,{id:"holding-note-input",className:"form-control-solid",size:"lg",placeholder:this.props.t("FORM.NOTE_PLACEHOLDER"),as:"textarea",rows:"6",value:e.values.note,onChange:e.handleChange,onBlur:e.handleBlur,name:"note"}),e.touched.name&&e.errors.note&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.note})})]})]}),"tax"===this.state.tab&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsx)(C.A.Group,{as:S.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-success",children:[(0,a.jsx)("input",{type:"checkbox",name:"Checkboxes6",checked:e.values.applyTaxesOnPaidDividends,onChange:s=>{e.setFieldValue("applyTaxesOnPaidDividends",s.target.checked,!0),e.values.applyTaxesOnPaidDividends=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.APPLY_TAX"),(0,a.jsx)(F.N,{placement:"right",message:this.props.t("FORM.APPLY_TAX_HELP")})]})})})}),(0,a.jsxs)(C.A.Label,{children:[this.props.t("FORM.TAX"),(0,a.jsx)(F.N,{placement:"right",message:this.props.t("FORM.TAX_HELP")})]}),(0,a.jsxs)("div",{className:"alert alert-light",children:["\uD83D\uDCA1 ",this.props.t("FORM.TAX.COMPOSITE.MESSAGE")]})]}),"other"===this.state.tab&&(0,a.jsx)(C.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(C.A.Group,{as:S.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-success",children:[(0,a.jsx)("input",{type:"checkbox",name:"Checkboxes6",checked:e.values.doNotAdjustXIRR,onChange:s=>{e.setFieldValue("doNotAdjustXIRR",s.target.checked,!0),e.values.doNotAdjustXIRR=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.DO_NOT_ADJUST_XIRR")]})}),(0,a.jsxs)("span",{className:"text-muted font-size-sm",children:[this.props.t("FORM.DO_NOT_ADJUST_XIRR_HELP")," ",(0,a.jsx)(K.O,{href:"xirr",children:this.props.t("SEE_MORE",{ns:"common"})})]})]})}),"notifications"===this.state.tab&&(0,a.jsx)(C.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(C.A.Group,{as:S.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-success",children:[(0,a.jsx)("input",{type:"checkbox",name:"sendSummaryUpdateNotifications",checked:e.values.sendSummaryUpdateNotifications,onChange:s=>{e.setFieldValue("sen
7dSummaryUpdateNotifications",s.target.checked,!0),e.values.sendSummaryUpdateNotifications=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.SEND_NOTIFICATION.EMAIL.SUMMARY_UPDATE")]})}),(0,a.jsx)("span",{className:"text-muted font-size-sm",children:this.props.t("FORM.SEND_NOTIFICATION.EMAIL.SUMMARY_UPDATE_HELP")})]})})]}),(0,a.jsx)("div",{className:"float-right pt-2",children:(0,a.jsxs)(E.A,{children:[(0,a.jsx)(x.A,{size:"lg",className:"btn btn-light-primary font-weight-bold mr-2",type:"button",disabled:this.state.blocking,onClick:this.close,children:this.props.t("BUTTON.DISCARD",{ns:"common"})}),(0,a.jsx)(x.A,{size:"lg",className:"btn btn-primary font-weight-bold",type:"submit",disabled:this.state.blocking,children:(0,a.jsx)("span",{children:this.props.t("BUTTON.SAVE",{ns:"common"})})})]})})]})})})]})]})}}let q=(0,w.C)(["portfolio","common"],{withRef:!0})(Y);var X=t(37043),J=t(37765);class Z extends h.Component{static #e=this.propTypes={portfolioId:A().string,onSave:A().func,onHide:A().func,isAutoSyncEnabled:A().bool};constructor(e){super(e),this.open=(e,s)=>{this.setState({show:!0,portfolioId:e,isAutoSyncPortfolio:s})},this.close=()=>{this.setState({show:!1,portfolioId:null}),this.props.onHide&&this.props.onHide()},this.save=async e=>{this.setState({blocking:!0}),D.M_.dispatch((0,M.lT)(new Date));let{app:{currentPortfolio:s}}=D.M_.getState();this.state.portfolioId==s.id&&D.M_.dispatch((0,M.Sq)(e)),this.props.onSave&&this.props.onSave(e),this.setState({blocking:!1}),this.close()},this.state={portfolioId:null,blocking:!1,show:!1,isAutoSyncPortfolio:!1}}render(){return(0,a.jsxs)(T.A,{size:"lg",show:this.state.show,onHide:this.close,"aria-labelledby":"example-modal-sizes-title",children:[(0,a.jsxs)(a.Fragment,{children:[this.state.blocking&&(0,a.jsx)(L.q3,{}),(0,a.jsx)(T.A.Header,{closeButton:!0,children:(0,a.jsx)(T.A.Title,{id:"example-modal-sizes-title",children:(0,a.jsx)(R.x,{i18nKey:"portfolio:EDIT.TITLE"})})})]}),(0,a.jsxs)(T.A.Body,{className:"overlay overlay-block cursor-default pt-0",children:[this.state.blocking&&(0,a.jsx)("div",{className:"overlay-layer bg-transparent",children:(0,a.jsx)("div",{className:"spinner spinner-lg spinner-success"})}),(0,a.jsx)(J.y,{saveButtonTitle:(0,a.jsx)(R.x,{i18nKey:"common:BUTTON.SAVE"}),portfolioId:this.state.portfolioId,isCancelButtonVisible:!0,onSave:this.save,onCancel:this.close,isSaveButtonArrowVisible:!1,showAdditionalParams:!0,isAutoSyncPortfolio:this.state.isAutoSyncPortfolio})]})]})}}var ee=t(9353),es=t(51645),et=t(46851),ea=t(51661),en=t.n(ea),ei=t(42197),el=t(60890),eo=t(97043),er=t(7481),ec=t.n(er);function ed(e){let{content:s,onClick:t}=e;return(0,a.jsx)(eo.o,{title:(0,a.jsx)("div",{className:"note-wrapper",children:(0,a.jsx)(el,{children:s})}),children:(0,a.jsx)("div",{className:`pp-description note-wrapper text-dark-65 font-size-sm text-hover-light cursor-pointer ${ec().note}`,onClick:t,children:(0,a.jsx)(el,{children:s})})})}function em(e){let{item:s}=e,{t}=(0,u.B)("portfolio"),{goalValue:n,goalCurrency:i,goalType:l}=s;if(!n)return"-";let o=(0,a.jsx)(B.b,{value:n,currency:i,isMoney:!0});return(0,a.jsxs)(a.Fragment,{children:[1===parseInt(l)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted mr-1",children:t("FORM.GOAL_TYPE.VALUE")})," ",o]}),2===parseInt(l)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted mr-1",children:t("FORM.GOAL_TYPE.PASSIVE_INCOME")})," ",o," ",(0,a.jsx)("span",{className:"text-muted ml-1",children:t("FORM.GOAL.PER_YEAR")})]})]})}function eh(e){let{shareIsPublic:s=!0,onClick:t}=e,{t:n}=(0,u.B)(["portfolio","common"]);return s?(0,a.jsxs)("button",{type:"button",className:"ml-1 btn btn-link-light btn-sm mb-1 text-dark-50 font-weight-bold",title:n("COLUMN.PUBLIC.EDIT_TITLE"),onClick:t,children:[(0,a.jsx)("i",{className:"fas fa-cog icon-nm text-dark-50"})," ",n("BUTTON.SETUP",{ns:"common"})]}):(0,a.jsxs)("button",{type:"button",className:"ml-1 btn btn-link-light text-dark-50 btn-sm font-weight-bold mb-1",onClick:t,children:[(0,a.jsx)("i",{className:"icon-nm fas fa-share-alt text-dark-50"})," ",n("BUTTON.SHARE",{ns:"common"})]})}var eu=t(96842);function ep(e){let{item:s,onClone:t,onHide:n,onDelete:i,onUnhide:l,onEdit:o,onShare:r,isHidden:c=!1}=e,{t:d}=(0,u.B)("common"),m=e=>({onClick:()=>{i(e)},name:d("BUTTON.DELETE"),icon:(0,a.jsx)("i",{className:"far fa-trash-alt text-danger icon-nm dd-item-icon"}),color:"danger"});return(0,a.jsx)(a.Fragment,{children:eu.$t(s.id,s,0,{editButtonIcon:()=>(0,a.jsx)("i",{className:"fas fa-cog icon-nm"}),openEditDialog:()=>o(s),actionItems:c?[{onClick:()=>{l(s)},name:d("BUTTON.UNHIDE"),icon:(0,a.jsx)("i",{className:"icon-nm far fa-eye dd-item-icon"})},m(s)]:[{onClick:()=>t(s),name:d("BUTTON.CLONE"),icon:(0,a.jsx)("i",{className:"icon-nm far fa-copy dd-item-icon"}),hidden:!s.isComposite},r?{onClick:()=>{r(s)},name:d("BUTTON.SHARE"),icon:(0,a.jsx)("i",{className:"icon-nm fas fa-share-alt dd-item-icon"})}:null,{onClick:()=>{n(s)},name:d("BUTTON.HIDE"),icon:(0,a.jsx)("i",{className:"icon-nm far fa-eye-slash dd-item-icon"})},m(s)].filter(e=>null!==e),t:d})})}function ex(e){let{item:s,onNoteEdit:t,onShare:n,onEdit:i,onClone:l,onDelete:o,onUnhide:r,onHide:c,onClick:d,isHidden:m=!1}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("td",{className:"align-middle",children:(0,a.jsxs)("div",{className:d?"text-hover-primary":"",style:{cursor:d?"pointer":"default"},onClick:()=>d?.(s),children:[(0,a.jsx)("span",{className:"symbol symbol-25 mr-2 symbol-light",children:(0,a.jsx)("span",{className:"symbol-label",children:(0,$.Tb)(s,s.broker)})}),(0,a.jsx)("span",{className:"",children:s.name})]})}),(0,a.jsx)("td",{className:"align-middle",children:s?.note?(0,a.jsx)(ed,{content:s.note,onClick:()=>{t(s)}}):(0,a.jsx)("button",{type:"button",className:"btn btn-sm btn-clean btn-h
7over-primary btn-icon",onClick:()=>{t(s)},children:(0,a.jsx)("i",{className:"icon-nm far fa-comment"})})}),(0,a.jsx)("td",{className:"align-middle",children:(0,a.jsx)(em,{item:s})}),(0,a.jsx)("td",{className:"align-middle",children:s.isComposite?(0,a.jsx)("span",{className:"text-muted",children:"-"}):(0,a.jsx)(B.b,{value:s.dividendTaxPercent,isPercent:!0})}),(0,a.jsx)("td",{className:"align-middle",children:(0,a.jsx)(eh,{shareIsPublic:s.shareIsPublic,onClick:()=>n(s)})}),(0,a.jsx)("td",{className:"text-right pr-0 align-middle",children:(0,a.jsx)(ep,{item:s,isHidden:m,onEdit:i,onClone:l,onDelete:o,onUnhide:r,onHide:c,onShare:n})})]})}var eg=t(84865),eN=t.n(eg);function eb(e){let{item:s,onShare:t,onEdit:n,onClone:i,onDelete:l,onUnhide:o,onClick:r,isHidden:c=!1,withCheckbox:d=!1}=e,{t:m}=(0,u.B)("portfolio");return(0,a.jsxs)("div",{className:`pb-3 mb-3 ${d?"pt-3":""} ${eN().root}`,children:[(0,a.jsxs)("div",{className:`d-flex align-items-center justify-content-between ${!c&&!d?"pr-7 pr-md-0":""}`,children:[(0,a.jsxs)("div",{className:`d-flex align-items-center ${r?"text-hover-primary":""}`,style:{flex:1,cursor:r?"pointer":"default"},onClick:()=>r?.(s),children:[(0,a.jsx)("span",{className:"symbol symbol-25 mr-2 symbol-light",children:(0,a.jsx)("span",{className:"symbol-label",children:(0,$.Tb)(s,s.broker)})}),(0,a.jsx)("span",{className:eN().name,children:s.name})]}),(0,a.jsx)("div",{className:"ml-2",children:(0,a.jsx)(ep,{item:s,isHidden:c,onEdit:n,onClone:i,onDelete:l,onUnhide:o,onShare:t})})]}),(0,a.jsxs)("div",{className:"d-flex align-items-center justify-content-between mt-3",children:[(0,a.jsxs)("div",{className:"text-dark-50 font-weight-bold",children:[m("COLUMN.GOAL"),":"]}),(0,a.jsx)("div",{children:(0,a.jsx)(em,{item:s})})]}),(0,a.jsxs)("div",{className:"d-flex align-items-center justify-content-between mt-1",children:[(0,a.jsx)("div",{className:"text-dark-50 font-weight-bold",children:m("COLUMN.TAX")}),s.isComposite?(0,a.jsx)("span",{className:"text-muted",children:"-"}):(0,a.jsx)(B.b,{value:s.dividendTaxPercent,isPercent:!0})]}),!!s.note&&(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(ed,{content:s.note})})]})}var ef=t(52345);function ej(e){let{items:s,isHidden:t=!1,onSort:n,onClone:i,onHide:l,onUnhide:o,onDelete:r,onEdit:c,onShare:d,onNoteEdit:m,selectedItems:x,onToggleItem:g,onToggleAll:N,onClick:b}=e,{t:f}=(0,u.B)(["portfolio","common"]),j=(0,p.d4)(e=>e.auth.user?.roles||[]),{isMobile:v}=(0,ei.l)(),A=s?.length>0&&x?.length===s?.length,T=v?"div":et.A,C=v?"div":"tbody",E=v?"div":"tr",_=v?"div":"td",y=v?eb:ex,S=j.includes("support"),I=e=>{let{item:s,ref:n,attributes:h,listeners:u,style:p,isDragging:N,className:j}=e;return(0,a.jsxs)(E,{...h,ref:n,className:`position-relative ${j}`,style:{...p,cursor:"default",background:N?"var(--card-bg)":"",touchAction:"auto"},children:[S&&(0,a.jsx)(_,{className:"text-center align-middle",children:(0,a.jsxs)("label",{className:"checkbox",children:[(0,a.jsx)("input",{type:"checkbox",checked:x?.includes(s.id),onChange:()=>g(s.id)}),(0,a.jsx)("span",{})]})}),!!u&&(0,a.jsx)(_,{...u,title:f("TABLE.REORDER"),className:`align-middle ${en().dragHandle}`,style:v&&S?{top:-8,touchAction:"none"}:{touchAction:"none"},children:(0,a.jsx)("i",{className:"fas fa-grip-horizontal icon-nm p-3"})}),(0,a.jsx)(y,{item:s,onClone:i,onDelete:r,onEdit:c,onHide:l,onUnhide:o,onShare:d,onNoteEdit:m,onClick:t?null:b,isHidden:t,withCheckbox:S})]})},O=s.map(e=>{let{id:s}=e;return s});return(0,a.jsx)("div",{className:en().root,children:(0,a.jsxs)(T,{responsive:!0,id:"portfolio-table",children:[!v&&(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-muted font-size-sm",children:[S&&(0,a.jsx)("th",{className:"text-center",style:{width:40},children:(0,a.jsxs)("label",{className:"checkbox",children:[(0,a.jsx)("input",{type:"checkbox",onChange:N,checked:A}),(0,a.jsx)("span",{})]})}),!t&&(0,a.jsx)("th",{className:"font-size-sm text-center",style:{width:30},children:"#"}),(0,a.jsx)("th",{className:"font-size-sm",children:f("COLUMN.NAME")}),(0,a.jsx)("th",{className:"font-size-sm"}),(0,a.jsx)("th",{className:"font-size-sm",children:f("COLUMN.GOAL")}),(0,a.jsx)("th",{className:"font-size-sm",children:f("COLUMN.TAX")}),(0,a.jsx)("th",{className:"font-size-sm",children:f("COLUMN.PUBLIC_ACCESS")}),(0,a.jsx)("th",{className:"text-right pr-3",style:{minWidth:"95px"}})]})}),t?(0,a.jsx)(C,{children:s.map((e,s)=>(0,a.jsx)(h.Fragment,{children:I({item:e})},s))}):(0,a.jsx)(C,{children:(0,a.jsx)(ef.bH,{items:O,strategy:ef.mU.VERTICAL_LIST_SORTING,onSort:e=>{n(e.map(e=>s.find(s=>{let{id:t}=s;return e===t})))},children:s.map(e=>(0,a.jsx)(ef.Uq,{id:e.id,strategy:ef.mU.VERTICAL_LIST_SORTING,children:s=>I({item:e,...s})}))})})]})})}var ev=t(5771),eA=t(66243),eT=t(4469),eC=t(8109),eE=t(88267);function e_(){let{t:e}=(0,u.B)(["portfolio","common"]),{load:s,savePortfolioOrder:t,isLoading:l,items:r,hiddenItems:d}=(0,eA.J)(),{isMobile:N}=(0,ei.l)(),v=(0,g.useRouter)(),{currentPortfolio:A}=(0,p.d4)(e=>{let{app:s}=e;return s}),T=(0,p.wA)(),C=(0,h.useRef)(null),E=(0,h.useRef)(null),_=(0,h.useRef)(null),y=(0,h.useRef)(null),S=(0,h.useRef)(null),I=(0,h.useRef)(null),O=(0,h.useRef)(null),R=(0,h.useRef)(null),[w,k]=(0,h.useState)(!1),[L,D]=(0,h.useState)([]),P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;C.current&&C.current.open(e)},B=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];E.current&&E.current.open(e,s)},F=e=>{if(!e?.isComposite)return void B(e?.id,e?.isAutoSyncEnabled);P(e?.id)},U=(0,h.useCallback)(()=>
7{if(!r)return;let{hash:e}=window.location;if(e){if(e.indexOf("#edit-portfolio")>-1){let s=e.replace("#edit-portfolio-",""),t=o()(r,e=>{let{id:t}=e;return t===s});if(!t)return;F(t)}"#add-composite"===e&&P()}},[r]),$=e=>{S.current&&S.current.open(e)},W=e=>{_.current&&_.current.open(e)},K=async()=>{try{await i.A.delete(`${b.kn6}/delete-multiple`,{data:{PortfolioIds:L}}),G.uT("Portfolios deleted successfully!"),s(),D([])}catch(e){console.error("Error deleting portfolios:",e),G.f1("Failed to delete portfolios")}},z=async(t,a)=>{try{let e={hidden:a,Id:t.id};await i.A.post(`${b.kn6}/change-visibility/${t.id}`,e),T((0,M.lT)(new Date)),s()}catch(t){let s=(0,H.g6)("",t);G.f1(s??e("ERROR.CONTACT_SUPPORT",{ns:"common"}))}},V=async()=>{history.replaceState(null,null," "),s()};return(0,h.useEffect)(()=>(U(),window.addEventListener("hashchange",U),()=>{window.removeEventListener("hashchange",U)}),[U]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c(),{children:(0,a.jsxs)("title",{children:[e("APP_NAME",{ns:"common"})," - ",e("MY_PORTFOLIOS")]})}),(0,a.jsx)("h5",{className:"mb-4",children:e("MANAGE_PORTFOLIOS")}),(0,a.jsx)("div",{className:"card card-custom card-sm-stretch",children:(0,a.jsxs)("div",{className:"card-body",children:[(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"d-flex align-items-center flex-wrap mb-8 mb-sm-3",children:[(0,a.jsxs)("div",{className:"d-flex align-items-center",children:[(0,a.jsxs)(m(),{id:"manage-portfolios-add-portfolio",href:"/new-portfolio",className:"btn btn-light-primary font-weight-bold mr-2",children:[(0,a.jsx)("i",{className:"flaticon2-plus"})," ",N?e("BUTTON.ADD_PORTFOLIO_MOBILE"):e("BUTTON.ADD_PORTFOLIO")]}),(0,a.jsxs)("button",{type:"button",id:"add-composite-portfolio",onClick:()=>{window.location.hash="add-composite"},className:"btn btn-light-primary font-weight-bold mr-2",children:[(0,a.jsx)("i",{className:"flaticon2-layers-2"})," ",N?e("BUTTON.ADD_COMPOSITE_MOBILE"):e("BUTTON.ADD_COMPOSITE")]})]}),L.length>0&&(0,a.jsx)(x.A,{type:"button",variant:"danger",className:"ml-0 ml-sm-auto mt-2 mt-sm-0",onClick:()=>{y.current?.open(e("DELETE_PORTFOLIOS.TITLE"),e("DELETE_PORTFOLIOS.BODY",{count:L.length}))},children:(0,a.jsx)("span",{children:e("BUTTON.DELETE_MULTIPLE_PORTFOLIOS")})})]})}),l&&(0,a.jsx)(ev.J,{count:2}),!l&&!!r?.length&&(0,a.jsx)(ej,{items:r,onEdit:F,onSort:t,onClone:$,onHide:s=>{O.current&&O.current.open(e("HIDE_DIALOG.TITLE",{name:s.name}),e("HIDE_DIALOG.MESSAGE"),s)},onDelete:W,onNoteEdit:e=>{R.current&&R.current.open(e)},onShare:e=>{I.current&&I.current.open(e?.id)},onClick:e=>{T((0,M.Sq)(e));let s=(0,eT.Gu)(`portfolio-currency-${e.id}`).code||e.defaultCurrency;T((0,M.MN)(s));let t=(0,eT.Gu)(eC.Ge,eC.uW);(0,eT.LZ)(eC.Ge,{...t,tab:eE.g.PORTFOLIO}),v.push("/dashboard")},selectedItems:L,onToggleItem:e=>{D(s=>s.includes(e)?s.filter(s=>s!==e):[...s,e])},onToggleAll:()=>{L.length?D([]):D(r.map(e=>e.id))}}),!!d?.length&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"cursor-pointer text-size-h5 text-dark-50 font-weight-bold",onClick:()=>{k(e=>!e)},children:[(0,a.jsx)("i",{className:`text-muted text-hover-dark-50 fas ${w?"fa-caret-down":"fa-caret-right"}`})," ",e("HIDDEN_ITEMS")," (",d.length,")"]}),(0,a.jsx)(n.A,{in:w,children:(0,a.jsx)(ej,{isHidden:!0,items:d,onEdit:F,onClone:$,onDelete:W,onUnhide:e=>z(e,!1)})})]}),(0,a.jsx)(Z,{ref:e=>{E.current=e},onSave:e=>{e?.defaultCurrency&&e?.id===A?.id&&((0,eT.LZ)(`portfolio-currency-${e.id}`,{code:e.defaultCurrency}),T((0,M.MN)(e.defaultCurrency)))},onHide:V}),(0,a.jsx)(q,{ref:e=>{C.current=e},onHide:V}),(0,a.jsx)(X.a,{ref:e=>{_.current=e},onHide:s}),(0,a.jsx)(j.P,{ref:e=>{S.current=e},onHide:s}),(0,a.jsx)(es.V,{ref:e=>{I.current=e},onHide:s}),(0,a.jsx)(f.u,{onConfirm:e=>{z(e,!0)},confirmButtonClass:"btn-warning",ref:e=>{O.current=e}}),(0,a.jsx)(ee.A,{ref:e=>{R.current=e},onHide:s}),(0,a.jsx)(f.u,{ref:y,confirmButtonText:e("BUTTON.DELETE_CONFIRM",{ns:"common"}),confirmButtonClass:"btn-danger",onConfirm:K})]})})]})}e_.getLayout=function(e){return(0,a.jsx)(N.P,{children:e})},e_.suspendTrans=["portfolio","common","layout","tour"];let ey=e_},30377:(e,s,t)=>{"use strict";t.d(s,{zP:()=>u,Ws:()=>se,Hl:()=>e8,uG:()=>b.uG});var a=t(26514),n=t(75834),i=t(93760),l=t(28684),o=t(47894),r=t(22871),c=t(67614),d=t(83308),m=t(89139),h=t.n(m);function u(e){let{children:s,className:t,onClick:m,title:u,allowGuide:p,isAnimated:x=!1,...g}=e,{t:N}=(0,i.B)("portfolio"),b=(0,l.h)(),f=(0,o.iT)(r.Y.AI_CHAT),j=(0,d.Mw)(),v=(0,n.useRef)(!1),[A,T]=(0,n.use
7State)(!1);return(0,n.useEffect)(()=>{!p||f.isShown||!j.isEnabled||j.isStarted||j.isRunning||(v.current=!1,f.saveShownState(),j.start(d.Fc.AI_CHAT,d.dG.AI_CHAT_BUTTON))},[p,f.isShown,j.isEnabled,j.isStarted,j.isRunning]),(0,n.useEffect)(()=>{p&&j.scenario===d.Fc.AI_CHAT&&j.status===d.Ne.SKIPPED&&!v.current&&(v.current=!0,f.saveShownState(),(0,c.s9)(c.Mg.AI_MEETFEATURE_SKIP))},[p,j.scenario,j.status]),(0,a.jsx)("button",{className:`btn-icon btn-light font-weight-bold ${h().root} ${x&&!A?h().highlighted:""} ${A?h().pulsed:""} ${!f.isShown?h().animated:""} ${t??""}`,onClick:e=>{m?.(e),f.saveShownState(),b.toggle(),x&&T(!0)},title:u??N("AI_CHAT.BUTTON.TITLE"),type:"button",...g,children:(0,a.jsx)("div",{children:s??(0,a.jsx)("img",{src:"/media/svg/icons/General/ai-sparkle-gradient.svg",className:h().icon})})})}var p=t(53317),x=t(68669),g=t(55909),N=t(59757),b=t(33244),f=t(32781),j=t(23574),v=t(66391),A=t(7086);let T="{apiUrl}/api/ai-chat",C="{apiUrl}/api/admin/ai-chat";var E=function(e){return e[e.CLIENT_STREAM=`${T}/stream`]="CLIENT_STREAM",e[e.PLAYGROUND_STREAM=`${C}/stream`]="PLAYGROUND_STREAM",e[e.CLIENT_FEEDBACK=`${T}/feedback`]="CLIENT_FEEDBACK",e[e.PLAYGROUND_FEEDBACK=`${C}/feedback`]="PLAYGROUND_FEEDBACK",e[e.STARTER_QUESTIONS=`${T}/starter-questions`]="STARTER_QUESTIONS",e[e.AVAILABILITY=`${T}/availability`]="AVAILABILITY",e}({}),_=t(47115),y=t(61674),S=t(61139),I=t(28100),O=t(55285),R=t(5625);class w extends Error{constructor(e,s){super(e),this.name="ChatStreamError",this.code=s}}function k(e){return e.startsWith("{apiUrl}")?e.replace("{apiUrl}","/extapi"):e}async function L(){let e=window.localStorage.getItem("persist:snowball-auth");if(!e)return null;let s=JSON.parse(e),t=s.refreshToken?s.refreshToken.replace(/"/g,""):null;if(!t)return null;let a=await fetch(k(y.Il),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh_token:t})});if(!a.ok)return null;let n=await a.json(),i=n.access_token,l=n.refresh_token;return s.accessToken=i,s.refreshToken=l,window.localStorage.setItem("persist:snowball-auth",JSON.stringify(s)),R.M_.dispatch({type:S.QN.RefreshAccessToken,payload:{accessToken:i,refreshToken:l}}),i}async function D(e,s,t,a){let n=(0,O.ZI)();return fetch(k(e),{method:"POST",headers:{"Content-Type":"application/json","Accept-Language":function(){let e=(0,I.JQ)();return e?.selectedLang??_.xN}(),"X-Instance":"en",Authorization:`Bearer ${s}`,...n?{"X-Device-Type":n}:{}},body:t,signal:a})}async function P(e,s,t){let a,{onToken:n,onDone:i,onError:l,signal:o}=t,r=JSON.stringify(s),c=function(){let{auth:e}=R.M_.getState();return e.accessToken??null}();if(!c)return void l(Error("Not authenticated"));let d=await D(e,c,r,o);if(401===d.status){let s=await L();if(!s)return void l(Error("Session expired"));d=await D(e,s,r,o)}if(!d.ok)return void l(Error(`Chat request failed: ${d.status}`));let m=d.body?.getReader();if(!m)return void l(Error("No response body"));let h=new TextDecoder,u="",p="";try{for(;;){let{done:e,value:s}=await m.read();if(e)break;let t=(u+=h.decode(s,{stream:!0})).split("\n");for(let e of(u=t.pop()??"",t))if(e.startsWith("event: "))p=e.slice(7).trim();else if(e.startsWith("data: ")){let s=e.slice(6);if("token"===p)try{n(JSON.parse(s))}catch{n(s)}else if("usage"===p)try{a=JSON.parse(s)}catch{}else if("error"===p){try{let e=JSON.parse(s);l(new w(e.message,e.code))}catch{l(new w(s,"unknown"))}return}else if("done"===p)return void i(a)}}i()}catch(e){if(o?.aborted)return;l(e)}}async function M(e,s){let{data:t}=await A.A.get(E.STARTER_QUESTIONS,{params:{portfolioId:e,currency:s}});return t??[]}async function B(){let{data:e}=await A.A.get(E.AVAILABILITY);return e}async function F(e){let{logId:s,feedback:t,mode:a,reason:n}=e;await A.A.post(a===b.uG.PLAYGROUND?E.PLAYGROUND_FEEDBACK:E.CLIENT_FEEDBACK,{logId:s,feedback:t,reason:n})}async function U(e){let{portfolioId:s,message:t,history:a,conversationId:n,currency:i,source:l,onToken:o,onDone:r,onError:c,signal:d}=e;await P(E.CLIENT_STREAM,{portfolioId:s,message:t,history:a,conversationId:n||void 0,currency:i||void 0,source:l||void 0},{onToken:o,onDone:r,onError:c,signal:d})}async function G(e){let{portfolioId:s,message:t,history:a,conversationId:n,currency:i,source:l,model:o,systemPrompt:r,promptCache:c,temperature:d,provider:m,useIntentClassifier:h,classifierModel:u,generateSuggestedQuestions:p,onToken:x,onDone:g,onError:N,signal:b}=e;await P(E.PLAYGROUND_STREAM,{portfolioId:s,message:t,history:a,conversationId:n||void 0,currency:i||void 0,source:l||void 0,model:o||void 0,systemPrompt:r||void 0,promptCache:c,temperature:null!=d?Number(d):void 0,provider:m||void 0,useIntentClassifier:h,classifierModel:u||void 0,generateSuggestedQuestions:p},{onToken:x,onDone:g,onError:N,signal:b})}var H=t(33989);function $(e){return{shortText:e,fullText:e}}var W=t(15269),K=t(16926),z=t(4206),V=t(88754);let Q={inputTokens:0,outputTokens:0,estimatedCost:0};function Y(e){return e?.role===b.MW.ASSISTANT&&!!e.quotaStatus}var q=t(20968),X=t(34669),J=t(48208),Z=t(62522),ee=t.n(Z);function es(e){let{variant:s}=e,{t}=(0,i.B)("portfolio");return s===b.J5.NEAR_LIMIT?(0,a.jsxs)("div",{className:ee().nearLimitNotice,role:"status",children:[(0,a.jsx)(q.A,{className:ee().nearLimitIcon}),(0,a.jsx)("span",{children:t("AI_CHAT.QUOTA_NEAR_LIMIT")})]}):(0,a.jsx)("div",{className:ee().limitReachedMessage,role:"status","aria-live":"polite",children:(0,a.jsxs)("div",{className:ee().limitReachedCard,
7children:[(0,a.jsx)("div",{className:ee().limitReachedIcon,children:(0,a.jsx)(q.A,{})}),(0,a.jsxs)("div",{className:ee().limitReachedBody,children:[(0,a.jsx)("h5",{className:"",children:t("AI_CHAT.QUOTA_LIMIT_REACHED.TITLE")}),(0,a.jsx)("p",{className:"text-dark-65",children:t("AI_CHAT.QUOTA_LIMIT_REACHED.TEXT")}),(0,a.jsxs)(J.o,{href:"/user-manage-subscription",className:"btn btn-md btn-dark font-weight-bold",children:[(0,a.jsx)("span",{children:t("AI_CHAT.QUOTA_LIMIT_REACHED.CTA")}),(0,a.jsx)(X.A,{className:ee().limitReachedActionIcon})]})]})]})})}var et=t(60890),ea=t.n(et),en=t(90380),ei=t.n(en),el=t(65569),eo=t(74206),er=t(27474),ec=t(49732),ed=t(11725),em=t(54892),eh=t.n(em);function eu(e){let{questions:s,onSelect:t,disabled:n}=e;return(0,a.jsx)("div",{className:eh().suggestions,children:s.map(e=>{let s="string"==typeof e?e:e.shortText,i="string"==typeof e?e:e.fullText;return(0,a.jsxs)("button",{type:"button",className:"btn btn-light text-dark font-size-sm d-flex align-items-center justify-content-between text-left",onClick:()=>t?.(i),disabled:n,title:i,children:[s,(0,a.jsx)(ed.A,{sx:{marginLeft:"5px"}})]},`${s}:${i}`)})})}var ep=t(60486),ex=t.n(ep);function eg(e){let{role:s,content:t,logId:l,feedback:o,onFeedback:r,onFeedbackReasonOpen:d,onFeedbackReasonClose:m,isStreaming:h,suggestedQuestions:u,onSuggestedQuestion:p,suggestionsDisabled:x,showActions:g=!0}=e,{t:N}=(0,i.B)("portfolio"),f=s===b.MW.USER,j=!!(h&&0===t.trim().length),[v,A]=(0,n.useState)(!1),T=async()=>{await navigator.clipboard.writeText(t),A(!0),(0,c.s9)({event:c.Mg.AI_CHAT_COPY_CLICK,text:t})};(0,n.useEffect)(()=>{if(!v)return;let e=setTimeout(()=>{A(!1)},2e3);return()=>{clearTimeout(e)}},[v]);let C=e=>{if(!l||!r)return;let s=o===e?null:e;return r(l,s),s};return(0,a.jsxs)("div",{className:`${ex().message} ${f?ex().user:ex().assistant}`,children:[!f&&(0,a.jsx)("div",{className:ex().avatar,children:(0,a.jsx)(ec.A,{src:"/media/svg/icons/General/ai-sparkle.svg?v=2",color:"dark",size:"md"})}),(0,a.jsxs)("div",{className:ex().messageContent,children:[(0,a.jsx)("div",{className:ex().bubble,children:f?(0,a.jsx)("div",{className:ex().textContent,children:t}):(0,a.jsx)("div",{className:ex().markdownContent,children:j?(0,a.jsx)("span",{className:ex().thinkingText,role:"status","aria-live":"polite",children:N("AI_CHAT.THINKING")}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ea(),{remarkPlugins:[ei()],children:t}),h&&(0,a.jsx)("span",{className:ex().streamingCursor})]})})}),!f&&t&&!h&&g&&(0,a.jsxs)("div",{className:ex().actions,children:[(0,a.jsx)("button",{type:"button",className:`${ex().actionBtn} ${v?ex().active:""}`,onClick:T,title:N(v?"AI_CHAT.FEEDBACK.COPIED":"AI_CHAT.FEEDBACK.COPY"),children:(0,a.jsx)(el.A,{className:ex().actionIcon})}),(0,a.jsx)("button",{type:"button",className:`${ex().actionBtn} ${1===o?ex().active:""}`,onClick:()=>{C(1),m?.(),(0,c.s9)({event:c.Mg.AI_CHAT_LIKE_CLICK,text:t})},title:N("AI_CHAT.FEEDBACK.GOOD"),children:(0,a.jsx)(eo.A,{className:ex().actionIcon})}),(0,a.jsx)("button",{type:"button",className:`${ex().actionBtn} ${-1===o?ex().active:""}`,onClick:e=>{let s=C(-1);l&&-1===s?d?.(l,e.currentTarget):m?.(),(0,c.s9)({event:c.Mg.AI_CHAT_DISLIKE_CLICK,text:t})},title:N("AI_CHAT.FEEDBACK.BAD"),children:(0,a.jsx)(er.A,{className:ex().actionIcon})})]}),!f&&u?.length?(0,a.jsx)(eu,{questions:u,onSelect:p,disabled:x}):null]})]})}function eN(e){let{content:s}=e;return(0,a.jsxs)("div",{className:ex().systemMessage,role:"status",children:[(0,a.jsx)("span",{className:ex().systemLine,"aria-hidden":"true"}),(0,a.jsx)("span",{className:ex().systemText,children:s}),(0,a.jsx)("span",{className:ex().systemLine,"aria-hidden":"true"})]})}var eb=t(46711),ef=t(10213),ej=t(96418),ev=t(24665),eA=t(77390),eT=t.n(eA);let eC=["AI_CHAT.FEEDBACK.REASON_NO_ANSWER","AI_CHAT.FEEDBACK.REASON_INACCURATE","AI_CHAT.FEEDBACK.REASON_BUG"];function eE(e){let{anchorEl:s,onClose:t,onSubmit:l}=e,{t:o}=(0,i.B)("portfolio"),r=!!s,[c,d]=(0,n.useState)(!1),[m,h]=(0,n.useState)(""),u=()=>{d(!1),h("")},p=()=>{u(),t()},x=e=>{u(),l(e)};return(0,n.useEffect)(()=>{d(!1),h("")},[s]),(0,a.jsxs)(ej.Ay,{open:r,anchorEl:s,onClose:p,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},sx:{zIndex:10001},PaperProps:{sx:{width:360,maxWidth:"calc(100vw - 24px)"}},children:[(0,a.jsxs)(eb.A,{className:eT().header,children:[(0,a.jsx)("div",{className:"font-weight-bold",children:o("AI_CHAT.FEEDBACK.TITLE")}),(0,a.jsx)(ef.A,{size:"small","aria-label":o("AI_CHAT.CLOSE"),onClick:p,children:(0,a.jsx)(g.A,{fontSize:"small"})})]}),(0,a.jsx)(eb.A,{p:2,children:c?(0,a.jsxs)("div",{children:[(0,a.jsx)(ev.A.Control,{as:"textarea",className:"form-control-solid mb-3",maxLength:4e3,placeholder:o("AI_CHAT.FEEDBACK.OTHER_PLACEHOLDER"),"aria-label":o("AI_CHAT.FEEDBACK.OTHER"),value:m,onChange:e=>h(e.target.value),autoFocus:!0}),(0,a.jsx)("div",{className:"d-flex justify-content-end",children:(0,a.jsx)("button",{type:"button",className:"btn btn-dark font-weight-bold btn-sm",onClick:()=>{m&&x(m)},disabled:!m,children:o("AI_CHAT.FEEDBACK.SEND")})})]}):(0,a.jsxs)("div",{className:eT().chips,children:[eC.map(e=>(0,a.jsx)("button",{type:"button",className:"btn btn-outline-secondary btn-sm",onClick:()=>x(o(e)),children:o(e)},e)),(0,a.jsx)("button",{type:"button",className:"btn btn-outline-secondary btn-sm",onClick:()=>d(!0),children:o("AI_CHAT.FEEDBACK.OTHER")})]})})]})}function e_(e){let{message:s,isLastMessage:t,isStreaming:n,onFeedback:i,onFeedbackReasonOpen:l,onFeedbackReasonClose:o,onSuggestedQuestion:r,suggestionsDisabled:c}=e,d=n&&s.role===b.MW.ASSISTANT&&t;
7return s.role===b.MW.SYSTEM?(0,a.jsx)(eN,{content:s.content}):s.quotaStatus===b.J5.LIMIT_REACHED?(0,a.jsx)(es,{variant:b.J5.LIMIT_REACHED}):(0,a.jsx)(eg,{role:s.role,content:s.content,logId:s.logId,feedback:s.feedback,onFeedback:i,onFeedbackReasonOpen:l,onFeedbackReasonClose:o,isStreaming:d,suggestedQuestions:s.suggestedQuestions,onSuggestedQuestion:r,suggestionsDisabled:c})}function ey(e){let{messages:s,isStreaming:t,messagesEndRef:i,onFeedback:l,onFeedbackReason:o,onSuggestedQuestion:r,suggestionsDisabled:c}=e,[d,m]=(0,n.useState)(null);return(0,a.jsxs)(a.Fragment,{children:[s.map((e,n)=>(0,a.jsx)(e_,{message:e,isLastMessage:n===s.length-1,isStreaming:t,onFeedback:l,onFeedbackReasonOpen:(e,s)=>m({logId:e,anchorEl:s}),onFeedbackReasonClose:()=>m(null),onSuggestedQuestion:r,suggestionsDisabled:c},n)),(0,a.jsx)("div",{ref:i}),(0,a.jsx)(eE,{anchorEl:d?.anchorEl??null,onClose:()=>m(null),onSubmit:e=>{d&&o?.(d.logId,e),m(null)}})]})}var eS=t(96039),eI=t(51209),eO=t(50041),eR=t(10164),ew=t(66243),ek=t(83094),eL=t(78693),eD=t(70326),eP=t.n(eD);function eM(e){let{value:s,onChange:t,disabled:n}=e,{t:l}=(0,i.B)("portfolio"),{items:o=[],isLoading:r}=(0,ew.J)();if(r)return;let c=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,a.jsxs)("span",{className:eP().option,children:[(0,a.jsx)("span",{className:"symbol symbol-25 mr-2 symbol-light",children:(0,a.jsx)("span",{className:"symbol-label",children:(0,eL.Tb)(e,e.broker??"Other")})}),(0,a.jsx)("span",{className:s?eP().valueName:eP().optionName,children:e.name})]})};return(0,a.jsx)(eR.Q,{className:eP().select,value:s??"",disabled:n,disableUnderline:!0,displayEmpty:!0,input:(0,a.jsx)(ek.P,{name:"portfolioId",id:"ai-chat-portfolio"}),renderValue:e=>{let s=o.find(s=>s.id===e);return s?c(s,!0):l("AI_CHAT.SELECT_PORTFOLIO")},onChange:e=>{var s;return s=e.target.value,void t(o.find(e=>e.id===s))},items:o.map(e=>({value:e.id,name:e.name,display:c(e)}))})}var eB=t(88308),eF=t.n(eB);function eU(e){let{value:s,onChange:t,onSend:l,onStop:o,disabled:r,isStreaming:d,placeholder:m,portfolioId:h,onPortfolioChange:u}=e,{t:p}=(0,i.B)("portfolio"),x=(0,n.useId)(),g=s.length,N=g>4e3,b=g>=3600,f=!r&&!d&&g>0&&!N,j=`${eF().symbolCounter} ${N?eF().symbolCounterDanger:eF().symbolCounterWarning}`;return(0,a.jsx)("div",{className:eF().inputContainer,children:(0,a.jsxs)("form",{className:eF().composer,onSubmit:e=>{e.preventDefault(),f&&l()},children:[(0,a.jsx)(eO.A,{className:eF().textarea,value:s,onChange:e=>{t(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),f&&l())},onFocus:()=>{(0,c.s9)(c.Mg.AI_CHAT_CHATAREA_CLICK)},maxRows:5,placeholder:m,disabled:r,"aria-describedby":b?x:void 0,"aria-invalid":N}),b&&(0,a.jsxs)("div",{id:x,className:j,"aria-live":"polite",children:[g,"/",4e3]}),(0,a.jsx)("div",{className:eF().divider}),(0,a.jsxs)("div",{className:eF().bottomRow,children:[(0,a.jsx)(eM,{value:h,onChange:u,disabled:d}),(0,a.jsx)("div",{className:eF().actions,children:d?(0,a.jsx)("button",{type:"button",className:`${eF().actionBtn} ${eF().stopBtn}`,onClick:o,title:p("AI_CHAT.STOP_GENERATING"),children:(0,a.jsx)(eS.A,{className:eF().actionIcon})}):(0,a.jsx)("button",{type:"submit",className:`${eF().actionBtn} ${eF().sendBtn}`,disabled:!f,title:p("AI_CHAT.SEND_MESSAGE"),children:(0,a.jsx)(eI.A,{className:eF().actionIcon})})})]})]})})}var eG=t(51898),eH=t.n(eG);function e$(e){let{questions:s,onSelectQuestion:t,disabled:n}=e,{t:l}=(0,i.B)("portfolio"),o=[l("AI_CHAT.WELCOME_INTRO"),"",...Array.from({length:5},(e,s)=>`- ${l(`AI_CHAT.WELCOME_CAP_${s+1}`)}`),"",`> ${l("AI_CHAT.WELCOME_BETA_NOTE")}`].join("\n");return(0,a.jsxs)("div",{className:eH().welcome,children:[(0,a.jsxs)("div",{className:eH().title,children:[(0,a.jsx)("span",{className:eH().previewBadge,children:l("AI_CHAT.PREVIEW_BADGE")}),(0,a.jsx)("span",{className:eH().titleText,children:l("AI_CHAT.WELCOME_TITLE")})]}),(0,a.jsx)(eg,{role:b.MW.ASSISTANT,content:o,showActions:!1,suggestedQuestions:s,onSuggestedQuestion:t,suggestionsDisabled:n})]})}var eW=t(13664),eK=t(11754),ez=t.n(eK);function eV(){let{t:e}=(0,i.B)("portfolio");return(0,a.jsx)("div",{className:ez().unavailableMessage,role:"status","aria-live":"polite",children:(0,a.jsxs)("div",{className:ez().unavailableCard,children:[(0,a.jsx)("div",{className:ez().unavailableIcon,children:(0,a.jsx)(eW.A,{})}
7),(0,a.jsxs)("div",{className:ez().unavailableBody,children:[(0,a.jsx)("h5",{className:"",children:e("AI_CHAT.UNAVAILABLE.TITLE")}),(0,a.jsx)("p",{className:"text-dark-65 mb-0",children:e("AI_CHAT.UNAVAILABLE.TEXT")})]})]})})}var eQ=t(14571);let eY=["AI_CHAT.DISCLOSURE.ACCURACY","AI_CHAT.DISCLOSURE.FINANCIAL_ADVICE","AI_CHAT.DISCLOSURE.DATA_PRIVACY","AI_CHAT.DISCLOSURE.TRAINING","AI_CHAT.DISCLOSURE.LIABILITY"];function eq(e){let{id:s,anchorEl:t,onClose:n}=e,{t:l}=(0,i.B)("portfolio");return(0,a.jsxs)(ej.Ay,{id:s,open:!!t,anchorEl:t,onClose:n,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},sx:{zIndex:10001},PaperProps:{sx:{width:440,maxWidth:"calc(100vw - 24px)",maxHeight:"min(70vh, 560px)",overflowY:"auto"}},children:[(0,a.jsxs)(eb.A,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:3,py:1.5,borderBottom:"1px solid",borderColor:"divider",children:[(0,a.jsx)(eQ.A,{variant:"subtitle1",fontWeight:600,children:l("AI_CHAT.DISCLOSURE.MODAL_TITLE")}),(0,a.jsx)(ef.A,{size:"small","aria-label":l("AI_CHAT.CLOSE"),onClick:n,children:(0,a.jsx)(g.A,{fontSize:"small"})})]}),(0,a.jsx)(eb.A,{component:"ul",sx:{m:0,px:4,py:2},children:eY.map(e=>(0,a.jsxs)(eb.A,{component:"li",sx:{mb:1.5},children:[(0,a.jsx)(eQ.A,{component:"strong",display:"block",fontWeight:600,children:l(`${e}.TITLE`)}),(0,a.jsx)(eQ.A,{component:"span",display:"block",variant:"body2",color:"text.secondary",mt:.5,children:l(`${e}.TEXT`)})]},e))})]})}var eX=t(19806),eJ=t.n(eX);function eZ(){let{t:e}=(0,i.B)("portfolio"),{feedbackProps:s,saveFeedbackShownState:t}
7=(0,o.iT)(r.Y.AI_CHAT),l=(0,n.useId)(),[d,m]=(0,n.useState)(null),[h,u]=(0,n.useState)(!1),p=!!d;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:eJ().footer,children:[(0,a.jsxs)("div",{className:eJ().left,children:[(0,a.jsx)("span",{children:e("AI_CHAT.DISCLOSURE.SUMMARY")}),(0,a.jsx)("button",{id:"ai-chat-more-details",type:"button",className:eJ().detailsBtn,"aria-controls":p?l:void 0,"aria-expanded":p,"aria-haspopup":"dialog",onClick:e=>m(s=>s?null:e.currentTarget),children:e("AI_CHAT.DISCLOSURE.MORE_DETAILS")})]}),(0,a.jsx)("button",{id:"ai-chat-leave-feedback",type:"button",className:eJ().feedbackBtn,onClick:()=>{u(!0),t()},children:e("AI_CHAT.LEAVE_FEEDBACK")})]}),(0,a.jsx)(eq,{id:l,anchorEl:d,onClose:()=>m(null)}),h&&!!s&&(0,a.jsx)(f._,{...s,id:"ai-chat-feedback-manual",show:h,onHide:()=>u(!1),onRatingSubmit:e=>{e&&(0,c.s9)({event:c.Mg.AI_CHAT_FEEDBACK_SUBMIT_CLICK,rating:e})}})]})}var e0=t(75165),e1=t(16974),e2=t.n(e1);function e5(e){let{className:s,label:t,usage:n}=e,{t:l}=(0,i.B)("portfolio");return(0,a.jsxs)("span",{className:s,children:[t," ",(0,a.jsx)(e0.b,{value:n.inputTokens,precision:0,ignoreStealth:!0})," ",l("AI_CHAT.USAGE_IN")," /"," ",(0,a.jsx)(e0.b,{value:n.outputTokens,precision:0,ignoreStealth:!0})," ",l("AI_CHAT.USAGE_OUT")," ="," ",(0,a.jsx)(e0.b,{value:n.estimatedCost,isMoney:!0,currency:"USD",precision:n.estimatedCost<.01?6:4,
7ignoreStealth:!0})]})}function e3(e){let{usage:s,totalUsage:t}=e,{t:n}=(0,i.B)("portfolio"),l=t.inputTokens>0;return s||l?(0,a.jsxs)("div",{className:e2().usageBar,children:[s&&(0,a.jsx)(e5,{label:n("AI_CHAT.USAGE_LAST_LABEL"),usage:s}),l&&(0,a.jsx)(e5,{className:e2().totalUsage,label:n("AI_CHAT.USAGE_SESSION_LABEL"),usage:t})]}):null}var e4=t(27497),e6=t.n(e4);function e8(e){let{t:s}=(0,i.B)("portfolio"),t=function(e){let{t:s}=(0,i.B)("portfolio"),t=(0,N.wA)(),a=(0,N.d4)(e=>{let{app:s}=e;return s.currentPortfolio??null}),l=(0,N.d4)(e=>{let{ui:s}=e;return s.aiChatPendingQuestion}),o=a?.id??null,[r,c]=(0,n.useState)(o),[d,m]=(0,n.useState)([]),[h,u]=(0,n.useState)(""),[p,x]=(0,n.useState)(!1),[g,f]=(0,n.useState)(null),[j,v]=(0,n.useState)(Q),[A,T]=(0,n.useState)(!1),[C,E]=(0,n.useState)(null),[_,y]=(0,n.useState)(!1),S=(0,n.useRef)(null),I=(0,n.useRef)(null),O=(0,n.useRef)(null),R=(0,n.useRef)(crypto.randomUUID()),k=(0,n.useRef)(0),L=(0,n.useRef)(o),D=(0,n.useRef)(!0),P=(0,n.useRef)(0),q=(0,n.useRef)(!1),X=(0,n.useRef)(0),J=(0,n.useRef)(!1),{saveTestResult:Z}=(0,V.H)(z.Vr),ee=e.mode===b.uG.CLIENT,es=ee&&(e.isActive??!0),et=function(e,s,t){let{t:a}=(0,i.B)("portfolio"),{data:n}=(0,H.I)({queryKey:["ai-chat-starter-questions",e,s],enabled:!!t&&!!e&&!!s,staleTime:1/0,queryFn:()=>M(e,s)});if(!e)return[$(a("AI_CHAT.SUGGEST_NO_PORTFOLIO_1")),$(a("AI_CHAT.SUGGEST_NO_PORTFOLIO_2"))];return n??[]}(r,e.currency,es),ea=function(e){let{data:s}=(0,H.I)({queryKey:["ai-chat-availability"],enabled:e,staleTime:6e4,queryFn:B});return s?.isEnabled??!0}(es),en=ee&&!ea,ei=d.some(e=>e.quotaStatus===b.J5.LIMIT_REACHED),el=!r||p||en,eo=r?s("AI_CHAT.PLACEHOLDER_WITH_PORTFOLIO"):s("AI_CHAT.PLACEHOLDER_NO_PORTFOLIO"),er=ee&&!en&&A&&!ei,ec=e.mode===b.uG.PLAYGROUND&&!!e.showUsage,ed=d.filter((e,s)=>e.quotaStatus===b.J5.LIMIT_REACHED||e.role!==b.MW.ASSISTANT||""!==e.content||p&&s===d.length-1),em=(0,n.useCallback)(()=>{let e=S.current;return!e||e.scrollHeight-e.scrollTop-e.clientHeight<=80},[]),eh=(0,n.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"smooth",s=S.current;if(s){s.scrollTo({top:s.scrollHeight,behavior:e}),"auto"===e&&(X.current=s.scrollTop);return}I.current?.scrollIntoView({behavior:e})},[]),eu=(0,n.useCallback)(()=>{let e=S.current;if(!e)return;let s=em(),t=e.scrollTop<X.current;X.current=e.scrollTop,s?D.current=!0:p&&t&&(D.current=!1),y(p&&!D.current&&!s)},[em,p]),ep=(0,n.useCallback)(()=>{D.current=!0,y(!1),eh("smooth")},[eh]);(0,n.useEffect)(()=>{let e=d.length!==P.current,s=q.current&&!p;if(P.current=d.length,q.current=p,0===d.length){D.current=!0,X.current=0,y(!1);return}if(p||y(!1),e){D.current=!0,y(!1),eh("smooth");return}D.current&&(p||s)&&eh("auto")},[p,d,eh]),(0,n.useEffect)(()=>()=>{O.current?.abort()},[]);let ex=(0,n.useCallback)(e=>{let t;x(!1),t=e instanceof w?"rate_limited"===e.code?s("AI_CHAT.ERROR_RATE_LIMITED"):s("AI_CHAT.ERROR_API"):e instanceof Error?e.message:s("AI_CHAT.ERROR_OCCURRED"),W.f1(t)},[]),eg=(0,n.useCallback)((s,t)=>{!J.current&&t?.quotaStatus!==b.J5.LIMIT_REACHED&&(s?.trim().length??0)>=200&&(J.current=!0,e.onFeedbackPromptEligible?.())},[e.onFeedbackPromptEligible]),eN=(0,n.useCallback)((e,s)=>{if(x(!1),s){if(s.quotaStatus===b.J5.LIMIT_REACHED)return void m(t=>{let a=[...t],n=a[e];return n?.role!==b.MW.ASSISTANT?t:(a[e]={...n,role:b.MW.ASSISTANT,content:"",logId:s.logId,quotaStatus:b.J5.LIMIT_REACHED},a)});s.quotaStatus===b.J5.NEAR_LIMIT&&T(!0),f(s),v(e=>({inputTokens:e.inputTokens+s.inputTokens,outputTokens:e.outputTokens+s.outputTokens,estimatedCost:e.estimatedCost+s.estimatedCost})),(s.logId||s.suggestedQuestions?.length)&&m(t=>{let a=[...t],n=a[e];return n?.role!==b.MW.ASSISTANT?t:(a[e]={...n,logId:s.logId??n.logId,suggestedQuestions:s.suggestedQuestions},a)})}},[]),eb=(0,n.useCallback)(async function(s){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b.O5.TYPED,a=s??h,n=a.trim();if(!n||a.length>4e3||!r||p)return;let i={role:b.MW.USER,content:n,date:new Date},l=d.slice(k.current),o=l.filter((e,s)=>{var t;return!((t=e.role)!==b.MW.USER&&t!==b.MW.ASSISTANT||Y(e))&&0!==e.content.trim().length&&!(e.role===b.MW.USER&&Y(l[s+1]))}).map(e=>({role:e.role,content:e.content,date:e.date})),c=d.length+1,g=new AbortController,N="";m(e=>[...e,i,{role:b.MW.ASSISTANT,content:"",date:new Date}]),E(i),u(""),x(!0),f(null),O.current=g;let j={portfolioId:r,message:n,history:o,conversationId:R.current,currency:e.currency,source:t,onToken:e=>{N+=e,m(s=>{let t=[...s],a=t[c];return a?.role!==b.MW.ASSISTANT?s:(t[c]={...a,content:a.content+e},t)})},onDone:e=>{eN(c,e),eg(N,e)},onError:ex,signal:g.signal};if(e.mode===b.uG.PLAYGROUND)return void await G({...j,model:e.model,systemPrompt:e.systemPrompt,promptCache:e.promptCache,temperature:e.temperature,provider:e.provider,useIntentClassifier:e.useIntentClassifier,classifierModel:e.classifierModel,generateSuggestedQuestions:e.generateSuggestedQuestions??!0});Z(z.Vr.resultTried),await U(j)},[eN,ex,h,p,d,e,eg,Z,r]);(0,n.useEffect)(()=>{es&&l&&r&&!p&&(t((0,K.s6)(null)),eb(l,b.O5.STARTER))},[t,eb,es,p,l,r]);let ef=(0,n.useCallback)(()=>{O.current?.abort(),x(!1)},[]),ej=(0,n.useCallback)(()=>{O.current?.abort(),m([]),E(null),x(!1),f(null),v(Q),R.current=crypto.randomUUID(),k.current=0},[]),ev=(0,n.useCallback)(e=>!!e&&e.id!==r&&(c(e.id),R.current=crypto.randomUUID(),m(t=>0===t.length?(k.current=0,t):(k.current=t.length+1,[...t.map(e=>e.role===b.MW.ASSISTANT&&e.suggestedQuestions?.length?{...e,suggestedQuestions:void 0}:e),{role:b.MW.SYSTEM,content:s("AI_CHAT.PORTFOLIO_CHANGED",{portfolioName:e.n
7ame}),date:new Date}])),!0),[r,s]);(0,n.useEffect)(()=>{if(o===L.current)return;let e=L.current;if(L.current=o,!a)return void c(null);(e||!r)&&a.id!==r&&(p&&(O.current?.abort(),x(!1)),ev(a))},[a,o,ev,p,r]);let eA=(0,n.useCallback)(async(s,t)=>{m(e=>e.map(e=>e.role===b.MW.ASSISTANT&&e.logId===s?{...e,feedback:t}:e)),await F({logId:s,feedback:t,mode:e.mode})},[e.mode]),eT=(0,n.useCallback)(async(t,a)=>{await F({logId:t,feedback:-1,mode:e.mode,reason:a}),W.uT(s("AI_CHAT.FEEDBACK.THANKS"))},[e.mode]);return{aiChatDisabled:en,messages:ed,lastUserMessage:C,input:h,setInput:u,selectedPortfolioId:r,handlePortfolioChange:ev,isStreaming:p,inputDisabled:el,inputPlaceholder:eo,showNearLimitNotice:er,showUsage:ec,starterQuestions:et,usage:g,totalUsage:j,messagesContainerRef:S,messagesEndRef:I,showJumpToLatest:_,hasMessages:d.length>0,send:{input:()=>void eb(),starterQuestion:e=>void eb(e,b.O5.STARTER),suggestedQuestion:e=>void eb(e,b.O5.SUGGESTED)},handleMessagesScroll:eu,handleJumpToLatest:ep,handleStop:ef,handleClear:ej,handleFeedback:eA,handleFeedbackReason:eT}}(e),l=t.hasMessages,o=!t.hasMessages;return(0,a.jsxs)("div",{className:`${e6().panel} ${e.className??""}`,children:[l&&(0,a.jsx)("div",{className:e6().header,children:(0,a.jsxs)("button",{id:"ai-chat-clear",type:"button",className:e6().clearBtn,onClick:t.handleClear,title:s("AI_CHAT.CLEAR_CONVERSATION"),children:[(0,a.jsx)(j.A,{className:e6().clearIcon}),(0,a.jsx)("span",{children:s("AI_CHAT.CLEAR")})]})}),(0,a.jsxs)("div",{className:e6().messagesContainer,children:[(0,a.jsxs)("div",{ref:t.messagesContainerRef,className:e6().messages,onScroll:t.handleMessagesScroll,children:[o&&(0,a.jsx)(e$,{questions:t.starterQuestions,onSelectQuestion:e=>{t.send.starterQuestion(e),(0,c.s9)({event:c.Mg.AI_CHAT_FIRSTSLUG_CLICK,element:e})},disabled:t.inputDisabled}),(0,a.jsx)(ey,{messages:t.messages,isStreaming:t.isStreaming,messagesEndRef:t.messagesEndRef,onFeedback:t.handleFeedback,onFeedbackReason:t.handleFeedbackReason,onSuggestedQuestion:e=>{t.send.suggestedQuestion(e),(0,c.s9)({event:c.Mg.AI_CHAT_SLUG_CLICK,element:e})},suggestionsDisabled:t.isStreaming})]}),t.showJumpToLatest&&(0,a.jsx)("button",{type:"button",className:e6().jumpToLatestBtn,onClick:t.handleJumpToLatest,title:s("AI_CHAT.JUMP_TO_LATEST"),"aria-label":s("AI_CHAT.JUMP_TO_LATEST"),children:(0,a.jsx)(v.A,{className:e6().jumpToLatestIcon})})]}),t.showUsage&&(0,a.jsx)(e3,{usage:t.usage,totalUsage:t.totalUsage}),t.aiChatDisabled&&(0,a.jsx)(eV,{}),t.showNearLimitNotice&&(0,a.jsx)(es,{variant:b.J5.NEAR_LIMIT}),(0,a.jsx)(eU,{value:t.input,onChange:t.setInput,onSend:()=>{t.send.input(),(0,c.s9)({event:c.Mg.AI_CHAT_SEND_CLICK,text:t.input})},onStop:()=>{t.handleStop(),t.lastUserMessage&&(0,c.s9)({event:c.Mg.AI_CHAT_STOP_CLICK,text:t.lastUserMessage?.content})},disabled:t.inputDisabled,isStreaming:t.isStreaming,placeholder:t.inputPlaceholder,portfolioId:t.selectedPortfolioId,onPortfolioChange:e=>{e&&t.handlePortfolioChange(e)&&(0,c.s9)({event:c.Mg.AI_CHAT_PORTFOLIO_CLICK,element:e.name})}}),(0,a.jsx)(eZ,{})]})}var e7=t(74381),e9=t.n(e7);function se(){let{t:e}=(0,i.B)("portfolio"),s=(0,l.h)({enableResize:!0}),{feedbackProps:t,isFeedbackShown:d,saveFeedbackShownState:m}=(0,o.iT)(r.Y.AI_CHAT),h=(0,N.d4)(e=>{let{app:s}=e;return s.localCurrency??s.currency}),[u,j]=(0,n.useState)(!1),[v,A]=(0,n.useState)(!1),T=(0,n.useRef)(m),C=!!t;(0,n.useEffect)(()=>{T.current=m},[m]),(0,n.useEffect)(()=>{if(!u||s.isOpen||d||v||!C)return;let e=setTimeout(()=>{A(!0),T.current()},4e3);return()=>clearTimeout(e)},[C,u,s.isOpen,d,v]);let E=(0,n.useCallback)(()=>{j(!0)},[]),_=(0,a.jsxs)(p.Ay,{className:e9().drawer,variant:"persistent",anchor:"right",open:s.isOpen,style:{zIndex:1e4},PaperProps:{className:e9().paper,style:{width:s.isNarrow?"100vw":s.width,zIndex:1e4}},children:[!s.isNarrow&&(0,a.jsx)("button",{type:"button",className:e9().resizeHandle,onPointerDown:s.handleResizeStart,onKeyDown:s.handleResizeKeyDown}),(0,a.jsxs)("div",{className:e9().header,children:[(0,a.jsxs)("div",{className:e9().title,children:[(0,a.jsx)("img",{src:"/media/svg/icons/General/ai-sparkle-gradient.svg",className:e9().aiIcon}),(0,a.jsx)("span",{children:e("AI_CHAT.TITLE")}),(0,a.jsx)("span",{className:e9().previewBadge,children:e("AI_CHAT.PREVIEW_BADGE")})]}),(0,a.jsx)("button",{id:"ai-chat-close",type:"button",className:e9().closeButton,onClick:()=>{s.setOpen(!1)},title:e("AI_CHAT.CLOSE"),"aria-label":e("AI_CHAT.CLOSE"),children:(0,a.jsx)(g.A,{className:e9().closeIcon})})]}),(0,a.jsx)("div",{className:e9().body,children:(0,a.jsx)(e8,{mode:b.uG.CLIENT,currency:h,isActive:s.isOpen,className:e9().chatPanel,onFeedbackPromptEligible:E})})]});return(0,a.jsx)(x.A,{children:(0,a.jsxs)(a.Fragment,{children:[_,!!t&&(0,a.jsx)(f._,{...t,id:"ai-chat-feedback-auto",show:v,onHide:()=>A(!1),onRatingSubmit:e=>{e&&(0,c.s9)({event:c.Mg.AI_CHAT_FEEDBACK_SUBMIT_CLICK,rating:e})}})]})})}t(4707)},31108:(e,s,t)=>{"use strict";t.d(s,{P:()=>o});var a=t(7086),n=t(63390);let i=new Map;function l(e){return{currency:e.currency??null,inOneCurrency:e.inOneCurrency,items:[...e.items??[]].map(e=>({portfolioId:e.portfolioId,currency:e.currency??null})).sort((e,s)=>{let t=e.portfolioId.localeCompare(s.portfolioId);return 0!==t?t:(e.currency??"").localeCompare(s.currency??"")})}}function o(e,s){let t=function(e,s){let t=l(e);return JSON.stringify({endpoint:"DashboardStats/portfolio-list",clientId:s?.clientId??window.location.pathname.match(/\/clients\/([^/]+)/)?.[1]??null,...t})}(e,s),o=i.get(t);if(o)return o;let r=l(e),c=a.A.post(s?.url??n.kLg,r).then(e=>e.data).finally(()=>{i.delete(t)});return i.set(t,c),c}},31614:e=>{e.exports={item:"QuotesListSortable_item__LpDG4",dragHandle:"QuotesListSortable_dragHandle__pqXiy"}},32683:(e,s,t)=>{"use strict";t.d(s,{$4:()=>N,$W:()=>m,Dv:()=>a,KV:()=>c,Ll:()=>r,MV:()=>h,Os:()=>o,Pp:()=>u,Vr:()=>x,bG:()=>p,fU:()=>n,mz:()=>d,tQ:()=>g,tz:()=>l,yq:()=>i});let a="/api/support/user/set-password",n="/api/support/user/get-subscription",i="/api/support/user/update-subscription",l="/api/support/user/unsub
7scribe",o="/api/support/user/get-webhooks",r="/api/support/user/process-webhook",c="/api/support/user/get-card-link",d="{apiUrl}/api/snaptrade/get-user-secret",m="{apiUrl}/api/plaid/get-metadata",h="{apiUrl}/api/IBKRSync/get-metadata",u="{apiUrl}/api/support/sync-portfolio",p="{apiUrl}/api/support/update-sync-settings",x="{apiUrl}/api/support/last-sync-results",g="/api/admin/users/partner-info",N="/api/admin/users/update-referral"},32781:(e,s,t)=>{"use strict";t.d(s,{_:()=>N});var a=t(26514),n=t(75834),i=t(4847),l=t(50216),o=t(24665),r=t(7086),c=t(93760),d=t(23141),m=t(36728),h=t(15269),u=t(63390),p=t(22871),x=t(554),g=t.n(x);function N(e){let{title:s,ratingContent:t,messageContent:x,type:N=p.M.OTHER,onRatingSubmit:b,...f}=e,{t:j}=(0,c.B)(["layout","common"]),[v,A]=(0,n.useState)(!1),[T,C]=(0,n.useState)("rating"),[E,_]=(0,n.useState)(null),[y,S]=(0,n.useState)(""),I=()=>{A(!0),r.A.post(u.Yqn,{stars:E,message:y,feedbackType:N}).then(()=>{C("success")}).catch(()=>{(0,h.f1)("ERROR.FEEDBACK_FAILED")}).finally(()=>{A(!1)})},O=()=>{E&&(E>=4?I():C("message"),b?.(E))};(0,n.useEffect)(()=>{if("success"!==T)return;let e=setTimeout(()=>{f.onHide()},5e3);return()=>clearTimeout(e)},[T]);let R="success"===T?j("FEEDBACK.POPUP.SUCCESS.TITLE"):s,w=E?"btn-primary":"";return(0,a.jsxs)(m.z,{...f,isBlocking:v,rootClassName:g().feedbackPopup,title:R,buttonsComponent:e=>{let{primaryBtnClassName:s}=e;return"rating"===T?(0,a.jsx)("button",{type:"button",className:`${s} ${w}`,onClick:O,disabled:!E,children:j("FEEDBACK.POPUP.SUBMIT")}):"message"===T?(0,a.jsx)("button",{type:"button",className:s,onClick:I,children:j("FEEDBACK.POPUP.SEND")}):(0,a.jsx)("button",{type:"button",className:s,onClick:f.onHide,children:j("common:BUTTON.CLOSE")})},children:["rating"===T&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsx)(d.x,{children:t})}),(0,a.jsx)(i.A,{value:E,onChange:(e,s)=>_(s),max:5,icon:(0,a.jsx)(l.A,{sx:{color:"#F59E0B",fontSize:40}}),emptyIcon:(0,a.jsx)(l.A,{sx:{color:"#7E8299",fontSize:40}})})]}),"message"===T&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:g().content,children:(0,a.jsx)(d.x,{children:x})}),(0,a.jsx)(o.A.Control,{className:`form-control-solid ${g().textarea}`,as:"textarea",placeholder:j("FEEDBACK.POPUP.MESSAGE.PLACEHOLDER"),size:"lg",rows:4,value:y,onChange:e=>S(e.target.value)})]}),"success"===T&&(0,a.jsx)("div",{children:j("FEEDBACK.POPUP.SUCCESS.TEXT")})]})}},33244:(e,s,t)=>{"use strict";t.d(s,{J5:()=>l,MW:()=>n,O5:()=>i,uG:()=>a});var a=function(e){return e.CLIENT="client",e.PLAYGROUND="playground",e}({}),n=function(e){return e.USER="user",e.ASSISTANT="assistant",e.SYSTEM="system",e}({}),i=function(e){return e.TYPED="typed",e.STARTER="starter",e.SUGGESTED="suggested",e}({}),l=function(e){return e.NEAR_LIMIT="near_limit",e.LIMIT_REACHED="limit_reached",e}({})},33502:e=>{e.exports={listItem:"DraggableItem_listItem__dwzHw",listHandle:"DraggableItem_listHandle__zZQmG",dragging:"DraggableItem_dragging__dzbwJ"}},33523:(e,s,t)=>{"use strict";t.d(s,{$:()=>b});var a=t(26514),n=t(75834),i=t(93760),l=t(60890),o=t.n(l),r=t(7086),c=t(46225),d=t(59757),m=t(63390),h=t(5771),u=t(49732),p=t(33807),x=t(16926),g=t(73419);function N(e){let{data:s,...t}=e,{t:n}=(0,i.B)(["layout","common"]),l=(0,c.useRouter)(),d=1==s.status;async function h(){if(d)try{let e=m.EbW;if(await r.A.post(`${e}/${s.id}`,{}),s.actionLink&&(l.push(s.actionLink),t.compact)){let e=p.A.getOffcanvas();e&&e.hide()}t.onRead&&t.onRead()}catch(e){console.error(e)}else s.actionLink&&l.push(s.actionLink)}return(0,a.jsx)("div",{className:`${!t.compact?"py-5 px-8":"py-3 px-5"} bg-hover-light cursor-pointer ${d&&"bg-light"}`,onClick:()=>{h()},children:(0,a.jsxs)("div",{className:"d-flex align-items-start",children:[(0,a.jsx)("div",{className:"mr-5",children:function(){let e="General/Notifications1.svg";switch(s.type){case g.bM:case g.ae:e="Shopping/Gift.svg";break;case g.ZN:case g.PH:e="Home/Bulb1.svg";break;case g.k7:e="Weather/Thunder.svg";break;case g.Wf:case g.Hn:e="Communication/Chat6.svg";break;case g.Jv:case g.SE:e="General/Heart.svg"}return(0,a.jsx)("span",{className:`symbol symbol-light ${!t.compact?"symbol-30":"symbol-20"}`,children:(0,a.jsx)("span",{className:"symbol-label",children:(0,a.jsx)(u.A,{size:t.compact?"sm":"lg",color:"dark",src:`/media/svg/icons/${e}`})})})}()}),(0,a.jsxs)("div",{style:{wordBreak:"break-word"},children:[(0,a.jsxs)("div",{className:"mb-2",children:[d&&(0,a.jsx)("span",{className:"label label-dot label-lg label-danger mr-2"}),(0,a.jsx)("span",{className:"font-weight-bold",children:s?.messageTitle?.replace("#","")?.trim()}),s?.messageTitle&&(0,a.jsx)("span",{className:"px-2 text-dark-50",children:"•"}),(0,a.jsx)("span",{className:"font-size-sm text-dark-50",children:n("DATE_NOTIF_FORMAT",{ns:"common",date:new Date(s.createdDate)})})]}),(0,a.jsx)("div",{className:"text-dark-50 note-wrapper",children:(0,a.jsx)(o(),{children:s?.messageDescription})})]})]})})}function b(e){let{t:s}=(0,i.B)(["layout","common"]),t=(0,c.useRouter)(),l=(0,d.wA)(),[o,u]=(0,n.use
7State)([]),[g,b]=(0,n.useState)(0),[f,j]=(0,n.useState)(1),[v,A]=(0,n.useState)(10),[T,C]=(0,n.useState)(!1),[E,_]=(0,n.useState)(!e.compact),{notificationReload:y}=(0,d.d4)(e=>{let{ui:s}=e;return{notificationReload:s.notificationReload??""}},d.bN);async function S(e){try{if(!E&&!e)return;C(!0);let s=m.T9V,t=(await r.A.get(s,{params:{page:f,pageSize:v}})).data;b(t.totalCount),1==f?u(t.data):u([...o,...t.data])}catch(e){console.error(e)}C(!1)}function I(){l((0,x.ot)()),e.onRead&&e.onRead()}async function O(){try{let e=m.qQ3;await r.A.post(e,{}),I()}catch{}}return(0,n.useEffect)(()=>{1!=f||10!=v?(A(o.length>10?o.length:10),j(1)):S()},[y]),(0,n.useEffect)(()=>{if(e.compact){p.A.getOffcanvas()||p.A.init("kt_quick_notifications");let e=p.A.getOffcanvas();e&&e.on("beforeShow",()=>{_(!0),S(!0)})}},[]),(0,n.useEffect)(()=>{e.compact||S()},[f,v]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-3",children:[(0,a.jsx)("div",{className:"font-size-h5 font-weight-bold mb-2",children:s("MENU.NOTIFICATIONS")}),(0,a.jsx)("div",{className:"d-flex align-items-center",children:(0,a.jsxs)("button",{type:"button",onClick:()=>{O()},className:"btn btn-link-primary btn-md font-weight-bold mb-2",children:[(0,a.jsx)("i",{className:"fas fa-check icon-nm mr-2 mt-n1"}),s("NOTIFICATIONS.MARK_ALL_AS_READ")]})})]}),T&&0==o.length&&(0,a.jsx)(h.J,{}),o.length>0&&(0,a.jsxs)("div",{className:`overlay ${T&&"overlay-block"}`,children:[(0,a.jsx)("div",{className:"card card-custom gutter-b py-3",children:(0,a.jsxs)("div",{className:"card-body p-0",children:[o.map((s,t)=>(0,a.jsx)("div",{className:`${(t<o.length-1||g>o.length)&&"border-bottom border-light"}`,children:(0,a.jsx)(N,{compact:e.compact,data:s,onRead:I})},s.id)),g>o.length&&(0,a.jsx)("div",{className:"py-6 d-flex justify-content-center",children:(0,a.jsx)("button",{type:"button",onClick:()=>{if(e.compact){let e=p.A.getOffcanvas();e&&e.hide(),t.push("/notifications")}else j(f+1)},className:"btn btn-lg btn-light text-dark font-weight-bold",children:s("BUTTON.MORE_ITEMS",{ns:"common"})})})]})}),T&&(0,a.jsx)("div",{className:"overlay-layer"})]})]})}},33689:(e,s,t)=>{"use strict";t.d(s,{zY:()=>es,n6:()=>k,EL:()=>v,Dn:()=>C,Te:()=>y,lo:()=>P});var a=t(26514),n=t(75834),i=t(89098),l=t(42197),o=t(52345),r=t(75165),c=t(54253),d=t(21069),m=t(73311),h=t(14498),u=t.n(h);function p(e){let{item:s,isFavourite:t=!1,isDisabled:n=!1,showFavourite:i=!0,isCompact:l=!1,onToggleFavourite:o}=e,h=s?.primaryLogo?(0,c.oK)(s?.primaryLogo):null,p=s?.logo?(0,c.oK)(s?.logo):null,x=h??p,g=s?.toLogo?(0,c.oK)(s?.toLogo):null,N=s?.fromLogo?(0,c.oK)(s?.fromLogo):null,b=s?.toCurrency?null:(0,d.A)(s.assetType,s.assetInfoId,s.ticker,s.exchange,s.priceCurrency),f=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.b,{isMoney:!0,value:s.price,currency:s.priceCurrency??s.toCurrency,precision:4}),"\xa0\xa0",(0,a.jsx)(r.b,{isPercent:!0,value:s.dayGainPercent,showColors:!0,symbol:"triangle"})]}),j=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{onClick:()=>{b&&window.open(b)},className:`text-nowrap d-flex align-items-center ${!l&&"mb-2"} ${l&&b&&"cursor-pointer"}`,children:[!x&&(g||N)?(0,a.jsx)("span",{className:"mr-2",children:(0,a.jsx)(m.r,{fromLogo:N,toLogo:g,size:l?"sm":"md"})}):(0,a.jsx)(d.hz,{logoUrl:x,name:s.description,ticker:s.ticker}),(0,a.jsx)("b",{children:s.ticker}),l&&(0,a.jsxs)(a.Fragment,{children:["\xa0\xa0",f]})]}),!l&&(0,a.jsx)("div",{className:"text-nowrap",children:f})]});return l?j:(0,a.jsx)("div",{className:`d-flex flex-wrap card card-custom ${u().root} ${b&&"cursor-pointer"}`,children:(0,a.jsxs)("div",{className:"card-body py-4 px-6",children:[j,i&&(0,a.jsx)("button",{type:"button",className:`btn ${u().buttonStar}`,onClick:o,disabled:n,style:n?{opacity:.5}:null,children:(0,a.jsx)("i",{className:t?"fas fa-star text-warning":"far fa-star"})})]})})}var x=t(74406),g=t.n(x);function N(e){let{items:s,showFavourite:t=!0,onToggleFavourite:i,...l}=e,o=l.itemRenderer??(e=>e);return(0,a.jsx)("div",{className:g().root,children:s.map((e,s)=>(0,a.jsx)(n.Fragment,{children:o((0,a.jsx)(p,{isLink:!0,isDisabled:e.isDisabled,isFavourite:!!e.favoriteQuoteId,item:e,showFavourite:t,onToggleFavourite:()=>{i(e)}}),e)},s))})}var b=t(31614),f=t.n(b);function j(e){let{isDisabled:s=!1,onSort:t,items:n,...r}=e,{isMobile:c}=(0,l.l)(),d=n.map(e=>{let{quoteId:s}=e;return s});return(0,a.jsx)(o.bH,{items:d,isDisabled:s,onSort:e=>{let s=e.map(e=>n.find(s=>{let{quoteId:t}=s;return t===e}));t?.(s)}
7,children:(0,a.jsx)(N,{...r,items:n,itemRenderer:(e,s)=>(0,a.jsx)(o.Uq,{id:s.quoteId,children:s=>{let{ref:t,attributes:n,listeners:l,style:o}=s;return(0,a.jsxs)("div",{...!c?l:{},...n,ref:t,className:`position-relative ${f().item}`,style:o,children:[e,(0,a.jsx)("div",{...c?l:{},className:f().dragHandle,children:(0,a.jsx)(i.A,{})})]})}})})})}function v(e){let{isSortable:s=!1,...t}=e,{isDisabled:n,onSort:i,...l}=t;return s?(0,a.jsx)(j,{...l,isDisabled:n,onSort:i}):(0,a.jsx)(N,{...l})}var A=t(52550),T=t.n(A);function C(e){let{items:s}=e;return(0,a.jsx)("div",{className:`row align-items-center ${T().root}`,children:s.map((e,s)=>(0,a.jsx)("div",{className:"col-xl-3 col-lg-4 col-md-auto",children:(0,a.jsx)("div",{className:"py-3",children:(0,a.jsx)(p,{isCompact:!0,item:e})})},s))})}var E=t(93760),_=t(83602);function y(){let{t:e}=(0,E.B)("analytics"),{isDark:s}=(0,_.DP)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:`font-size-lg font-weight-bold d-flex align-center mb-2 ${s?"text-muted":""}`,children:[(0,a.jsx)("i",{className:"far fa-star text-warning mr-3 icon-lg"}),e("QUOTES.FAVOURITES.NOT_FOUND.TITLE")]}),(0,a.jsx)("div",{className:"font-size-sm",children:e("QUOTES.FAVOURITES.NOT_FOUND.TEXT")})]})}var S=t(46225),I=t(83308),O=t(47894),R=t(22871),w=t(32781);function k(){let e=(0,S.useRouter)(),s=(0,O.iT)(R.Y.QUOTES),t=(0,I.Mw)(),{isFree:i}=(0,O.Jd)(),[l,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{if(s.isFeedbackShown||!s.date||e.asPath.includes("/quotes")||t.isRunning||i)return;let a=setTimeout(()=>{o(!0),s.saveFeedbackShownState()},3e4);return()=>{clearInterval(a)}},[s.isFeedbackShown,s.date,e.asPath,t.isRunning]),(0,a.jsx)(a.Fragment,{children:!!s.feedbackProps&&(0,a.jsx)(w._,{...s.feedbackProps,show:l,onHide:()=>{o(!1)}})})}var L=t(96456),D=t.n(L);function P(){let{t:e}=(0,E.B)(["analytics","common"]);return(0,a.jsx)("div",{className:"card card-custom h-md-100",children:(0,a.jsx)("div",{className:"card-body py-8",children:(0,a.jsxs)("div",{className:"d-flex align-items-start align-items-sm-center flex-column flex-sm-row",children:[(0,a.jsx)(D(),{id:"quotes-subscription-link",href:"/user-manage-subscription",className:"btn btn-gradient order-2 order-sm-1",children:e("GET_SUBSCRIPTION",{ns:"common"})}),(0,a.jsxs)("div",{className:"ml-sm-7 mb-6 mb-sm-0 order-1",children:[(0,a.jsx)("div",{className:"font-size-lg font-weight-bold",children:e("QUOTES.SUBSCRIPTION.TITLE")}),(0,a.jsx)("div",{children:e("QUOTES.SUBSCRIPTION.TEXT")})]})]})})})}var M=t(47115),B=t(17618),F=t(67614),U=t(75119),G=t.n(U),H=t(71359),$=t(90952),W=t(38099),K=t(50690),z=t.n(K),V=t(19982),Q=t(14009),Y=t(49732),q=t(70188),X=t.n(q);function J(e){let{searchIcon:s,onChange:t,onSubmit:n,isLoading:i=!1,className:l,...o}=e,{t:r}=(0,E.B)("common");return(0,a.jsx)("form",{onSubmit:e=>{e.preventDefault(),n?.()},children:(0,a.jsxs)(V.A,{className:`${X().root} ${l??""}`,children:[(0,a.jsx)("input",{type:"text",onChange:e=>{t?.(e.target.value)},className:"form-control form-control-solid border-radius-right-0",placeholder:r("SEARCH_PLACEHOLDER"),...o}),!!o.value&&!i&&(0,a.jsx)(V.A.Append,{className:X().close,children:(0,a.jsx)(Q.A,{type:"button",variant:"light btn-icon",onClick:()=>{t?.("")},children:(0,a.jsx)("i",{className:"ki ki-close"})})}),i&&(0,a.jsx)(V.A.Append,{children:(0,a.jsx)(V.A.Text,{className:"border-0",children:(0,a.jsx)("i",{className:"spinner spinner-sm"})})}),(0,a.jsx)(V.A.Append,{children:(0,a.jsx)(Q.A,{type:"submit",variant:"light btn-icon",children:s??(0,a.jsx)(Y.A,{size:"lg",color:"none",src:"/media/svg/icons/General/Search.svg?v=1"})})})]})})}let Z=[M.PW.STOCK,M.PW.BOND,M.PW.ETF,M.PW.REIT,M.PW.COMMODITY,M.PW.CRYPTO_CURRENCY];function ee(e){let{assetTypes:s=Z,visibleItemsCount:t=15,searchViaApi:i=!0,searchIcon:l,renderItemResult:o,onItemClick:r,onDataLoaded:c}=e,{t:d}=(0,E.B)("layout"),[m,h]=(0,n.useState)(""),u=(0,O.d7)(m),{isLoading:p,data:x}=(0,W.ZB)({search:m?u:"",assetTypes:s,searchViaApi:i}),g=t?G()(x,t):x;return(0,n.useEffect)(()=>{x&&c(x)},[x]),(0,a.jsx)(H.x,{onClickAway:()=>{h("")},children:(0,a.jsxs)("div",{style:{position:"relative"},children:[(0,a.jsx)(J,{searchIcon:l,className:`${z().search} ${x?.length?z().searchWithResult:""}`,value:m,onChange:h,isLoading:p,placeholder:d("SEARCH_ASSET.PLACEHOLDER.SHORT")}),!!x?.length&&(0,a.jsx)("div",{className:z().result,children:(0,a.jsx)($.q,{openInNewTab:!0,data:g,renderItem:o,onItemClicked:r})})]})})}function es(){let e=(0,O.Jd)(),s=(0,S.useRouter)(),{addFavouriteQuote:t}=(0,B.OF)(),{removeFavouriteQuote:i}
7=(0,B.x2)(),[l,o]=(0,n.useState)([]),r=async a=>{if(!a.quoteId)return;if(e?.isFree)return void s.push("/user-manage-subscription");if(o(e=>e?.map(e=>e.quoteId===a.quoteId?{...e,isDisabled:!0}:e)),a.favoriteQuoteId)await i(a.favoriteQuoteId),o(e=>e?.map(e=>e.quoteId===a.quoteId?{...e,isDisabled:!1,favoriteQuoteId:null}:e));else{let e=await t({assetInfoId:a.assetInfoId,quoteCurrency:a.secondCurrency??""});o(s=>s?.map(s=>s.quoteId===a.quoteId?{...s,isDisabled:!1,favoriteQuoteId:e}:s))}let n=a.name??a.ticker??"",l=a.favoriteQuoteId?F.Mg.QUOTE_UNFAVORITED:F.Mg.QUOTE_FAVORITED;(0,F.s9)({event:l,asset_name:n})},c=[...Z,M.PW.QUOTE,M.PW.INDEX];return(0,a.jsx)(ee,{searchViaApi:!1,assetTypes:c,renderItemResult:(e,s)=>{let t=(0,B.EL)({assetInfoId:e.assetInfoId,toCurrency:e.secondCurrency}),n=l.find(e=>{let{quoteId:s}=e;return s===t});return(0,a.jsxs)("div",{className:"d-flex align-items-center w-100 cursor-pointer",onClick:e=>{e.stopPropagation(),e.preventDefault(),n&&r(n)},children:[s,(0,a.jsx)("i",{style:n?.isDisabled?{opacity:.5}:{},className:`fa-star icon-md ${n?.favoriteQuoteId?"fas text-warning":"far"}`})]})},onDataLoaded:e=>{o(e.map(e=>({...e,quoteId:(0,B.EL)({assetInfoId:e.assetInfoId,toCurrency:e.secondCurrency}),isDisabled:!1})))},searchIcon:(0,a.jsx)("i",{className:"flaticon2-plus",style:{fontSize:14}})})}},33734:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var a=t(26514);t(75834);let n=function(e){let{isDark:s,onChange:t}=e;return(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"switch switch-icon switch-mode switch-sm",children:(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"checkbox",id:"modeSwitch",checked:s,onChange:t,"aria-label":"Dark mode switch"}),(0,a.jsx)("span",{})]})})})}},33807:(e,s,t)=>{"use strict";t.d(s,{A:()=>i});var a=t(73789),n=t(37786);let i=function(){var e,s,t=function(){var t=a.g.find(e,".offcanvas-header"),i=a.g.find(e,".offcanvas-content");s=new n.A(e,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_quick_notifications_close",toggleBy:"kt_quick_notifications_toggle"}),a.g.scrollInit(i,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var s=parseInt(a.g.getViewPort().height);return t&&(s-=parseInt(a.g.actualHeight(t)),s-=parseInt(a.g.css(t,"marginTop")),s-=parseInt(a.g.css(t,"marginBottom"))),i&&(s-=parseInt(a.g.css(i,"marginTop")),s-=parseInt(a.g.css(i,"marginBottom"))),s-=parseInt(a.g.css(e,"paddingTop")),s-=parseInt(a.g.css(e,"paddingBottom")),s-=2}})};return{init:function(s){(e=a.g.getById(s))&&t()},getElement:function(){return e},getOffcanvas:function(){return s}}}()},37322:(e,s,t)=>{"use strict";t.d(s,{i:()=>v});var a=t(26514),n=t(75834),i=t(62936),l=t.n(i),o=t(46225),r=t(14763),c=t(15712),d=t(30985),m=t(91114),h=t.n(m),u=t(43765),p=t(54253);let x=(0,n.forwardRef)((e,s)=>(0,a.jsxs)("a",{ref:s,href:"#",onClick:s=>{s.preventDefault(),e.onClick(s)},id:"kt_subheader_quick_actions",className:"btn btn-sm btn-clean btn-icon",children:[" ",(0,a.jsx)("span",{className:"svg-icon svg-icon-success svg-icon-lg",children:(0,a.jsx)("span",{className:"svg-icon-success svg-icon-2x",children:(0,a.jsx)(h(),{src:(0,p.oK)("/media/svg/icons/Files/File-plus.svg?v=1")})})})]}));function g(){return(0,a.jsx)(r.A,{placement:"left",overlay:(0,a.jsx)(c.A,{id:"quick-actions-tooltip",children:"Quick actions"}),children:(0,a.jsxs)(d.A,{className:"dropdown-inline",drop:"down",alignRight:!0,children:[(0,a.jsx)(d.A.Toggle,{as:x,id:"dropdown-toggle-quick-actions-subheader"}),(0,a.jsx)(d.A.Menu,{className:"dropdown-menu p-0 m-0 dropdown-menu-md dropdown-menu-right",children:(0,a.jsx)(u.K$,{})})]})})}var N=t(45251);function b(e){let{items:s}=e;return s&&s.length?(0,a.jsxs)("ul",{className:"breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2",children:[(0,a.jsx)("li",{className:"breadcrumb-item",children:(0,a.jsx)(N.N,{legacyBehavior:!0,href:"/dashboard",children:(0,a.jsx)("i",{className:"flaticon2-shelter text-muted icon-1x"})})}),s.map((e,s)=>(0,a.jsx)("li",{className:"breadcrumb-item",children:(0,a.jsx)(N.N,{legacyBehavior:!0,href:{pathname:e.pathname},children:(0,a.jsx)("a",{className:"text-muted",children:e.title})})},`bc${s}`))]}):""}var f=t(32901),j=t(18150);function v(){let e=(0,j.SL)(),s=(0,o.useRouter)(),t=(0,f.ro)(),i=(0,n.useMemo)(()=>({config:e.config,subheaderMobileToggle:l().get(e.config,"subheader.mobile-toggle"),subheaderCssClasse
7s:e.getClasses("subheader",!0),subheaderContainerCssClasses:e.getClasses("subheader_container",!0)}),[e]);return(0,n.useLayoutEffect)(()=>{let e=(0,f.UG)("kt_aside_menu",s.pathname),a=(0,f.UG)("kt_header_menu",s.pathname),n=e&&e.breadcrumbs.length>0?e.breadcrumbs:a.breadcrumbs;t.setBreadcrumbs(n),t.setTitle(e&&e.title&&e.title.length>0?e.title:a.title)},[s.pathname]),(0,n.useEffect)(()=>{},[t]),(0,a.jsx)("div",{id:"kt_subheader",className:`subheader py-2 py-lg-4   ${i.subheaderCssClasses}`,children:(0,a.jsxs)("div",{className:`${i.subheaderContainerCssClasses} d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap`,children:[(0,a.jsxs)("div",{className:"d-flex align-items-center flex-wrap mr-1",children:[i.subheaderMobileToggle&&(0,a.jsx)("button",{type:"button",className:"burger-icon burger-icon-left mr-4 d-inline-block d-lg-none",id:"kt_subheader_mobile_toggle",children:(0,a.jsx)("span",{})}),(0,a.jsx)("div",{className:"d-flex align-items-baseline mr-5",children:(0,a.jsx)("h5",{className:"text-dark font-weight-bold my-2 mr-5",children:(0,a.jsx)(a.Fragment,{children:t.title})})}),(0,a.jsx)(b,{items:t.breadcrumbs})]}),(0,a.jsxs)("div",{className:"d-flex align-items-center",children:[(0,a.jsxs)("a",{href:"#",className:"btn btn-light btn-sm font-weight-bold",id:"kt_dashboard_daterangepicker","data-toggle":"tooltip",title:"Select dashboard daterange","data-placement":"left",children:[(0,a.jsx)("span",{className:"text-muted font-weight-bold mr-2",id:"kt_dashboard_daterangepicker_title",children:"Today"}),(0,a.jsx)("span",{className:"text-primary font-weight-bold",id:"kt_dashboard_daterangepicker_date",children:"Aug 16"})]}),(0,a.jsx)(g,{})]})]})})}},37423:(e,s,t)=>{"use strict";t.d(s,{C:()=>j});var a=t(26514),n=t(58245),i=t.n(n),l=t(32673);t(75834);var o=t(93760),r=t(23141),c=t(6367),d=t(96456),m=t.n(d),h=t(23277),u=t.n(h),p=t(80315),x=t(48208),g=t(75674),N=t(49732),b=t(79104),f=t(64674);function j(e){let{t:s}=(0,o.B)("promos"),{assignedPromocode:t,isPromoStillRunning:n}=e.data||{},d=[{title:s("BCS.FAQ_1"),text:s("BCS.FAQ_1_ANSWER")},{title:s("BCS.FAQ_5"),text:s("BCS.FAQ_5_ANSWER")},{title:s("BCS.FAQ_2"),text:s("BCS.FAQ_2_ANSWER")},{title:s("BCS.FAQ_3"),text:s("BCS.FAQ_3_ANSWER")},{title:s("BCS.FAQ_4"),text:s("BCS.FAQ_4_ANSWER")}];return(0,a.jsx)(p.a,{...e,size:"lg",dialogClassName:`${u().modalDialog} ${e.fullScreen?u().fullScreen:""}`,bodyClassName:u().modalBody,title:(0,a.jsx)("div",{className:`pl-4 pl-sm-0 mb-2 ${u().title}`,children:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.TITLE",components:[(0,a.jsx)("span",{className:"text-nowrap"})]})}),children:(0,a.jsxs)(l.A,{gap:{xs:2,sm:2},children:[(0,a.jsx)("div",{className:"d-flex justify-content-center align-items-center",children:(0,a.jsxs)("div",{className:`font-size-lg ${u().badge}`,children:[s("BCS.COLLABORATION_LABEL")," ",(0,a.jsx)(i(),{className:"ml-2",src:"/media/brokers/bcs_logo_big.png",alt:"bcs.ru",height:25,width:150})]})}),(t||n)&&(0,a.jsx)("div",{className:u().divider}),t&&(0,a.jsx)(f.N,{promocode:t,onPromocodeClaimed:e.onPromocodeClaimed}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"font-size-h3 font-weight-bolder",children:s("BCS.MODAL.DETAILS.TITLE")}),(0,a.jsxs)("div",{className:"row mb-4",children:[(0,a.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,a.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,a.jsx)(N.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,a.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.DETAILS.1"})})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,a.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,a.jsx)(N.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,a.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.DETAILS.2",components:[(0,a.jsx)("span",{className:"text-nowrap"})]})})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,a.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,a.jsx)(N.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,a.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.DETAILS.3",components:[(0,a.jsx)("span",{className:"text-nowrap"})]})})]})})]}),(0,a.jsx)("div",{className:"font-size-h3 font-weight-bolder",children:s("BCS.MODAL.HOW.TITLE")}),(0,a.jsxs)(l.A,{gap:1.5,children:[(0,a.jsx)(g.S,{stepNumber:1,title:s("BCS.MODAL.HOW.STEP_1.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_1.MESSAGE"})}),(0,a.jsx)(g.S,{stepNumber:2,title:s("BCS.MODAL.HOW.STEP_2.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_2.MESSAGE",components:[(0,a.jsx)(x.o,{href:"/user-profile#subscription"})]})}),(0,a.jsx)(g.S,{stepNumber:3,title:s("BCS.MODAL.HOW.STEP_3.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_3.MESSAGE",components:[(0,a.jsx)("span",{className:"text-nowrap font-weight-bold"})]})}),(0,a.jsx)(g.S,{stepNumber:4,title:s("BCS.MODAL.HOW.STEP_4.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_4.MESSAGE",components:[(0,a.jsx)("span",{className:"text-nowrap font-weight-bold"})]})}),(0,a.jsx)(g.S,{stepNumber:5,title:s("BCS.MODAL.HOW.STEP_5.TITLE"),text:(0,a.jsx)(r.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_5.MESSAGE",components:[(0,a.jsx)("span",{className:"text-nowrap font-weight-bold"})]})})]}),(0,a.jsx)("div",{className:"w-100 text-center bg-light p-4 rounded-lg",children:(0,a.jsxs)(x.o,{href:"/docs/bcs-snow-cashback-rules.pdf",className:"font-weight-bold font-size-lg",target:"_blank",children:[(0,a.jsx)(c.A,{className:"mr-1"})," ",s("BCS.MODAL.DETAILS.BUTTON_TO_DOC")]})}),(0,a.jsx)("div",{className:"font-size-h3 font-weight-bolder mt-7",children:s("BCS.FAQ")}),(0,a.jsx)(b.l,{items:d}),(0,a.jsx)("div",{className:"font-size-h3 font-weight-bolder mt-7",children:s("BCS.DOCUMENTS")}),(0,a.jsx)("div",{children:(0,a.jsxs)(x.o,{href:"/docs/bcs-snow-cashback-rules.pdf",target:"_blank",children:["\uD83D\uDCC4 ",s("BCS.DOCUMENTS_LINK")]})}),(0,a.jsxs)("div",{className:"text-muted font-size-xs mt-5",children:["*Приветственный бонус и Кешбэк начисляются в рамках проведения маркетинговой акции \xabКешбэк на миллион. Сноубол Инком\xbb (далее – Акция), проводимой ООО \xabКомпания БКС\xbb в период с 01.10.2025 г. по 30.04.2026 г. включительно. Более подробно с условиями Акции вы можете ознакомиться по"," ",(0,a.jsx)(m(),{target:"_blank",href:"/docs/bcs-snow-cashback-rules.pdf",children:"ссылке"})," ","(далее – Правила Акции).",(0,a.jsx)("br",{}),"Приветственный бонус - денежные средства в размере 4 000 российский рублей, выплачиваемые при выполнении условий раздела 4 Правил акции. Ð
7’ целях акции, Приветственный бонус не является Выплатой.",(0,a.jsx)("br",{}),"Под кешбэком понимается термин \xabВыплата\xbb из правил Акции (п. 2.19). Период выполнения целевых действий - период со дня, в котором было выполнено условие п. 3.1.4 Правил Акции до конца календарного месяца, и следующие за ним 4 календарных месяца.",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"Максимальный размер кешбэка составляет 1 000 000 ₽, до уплаты НДФЛ, на одного участника Акции за весь период проведения Акции.",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"Не является банковским вкладом, на данный продукт не распространяется система страхования вкладов АСВ.",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),"ООО \xabКомпания БКС\xbb. Лицензия на осуществление брокерской деятельности № 154-04434-100000 от 10.01.2001 Выдана ФСФР. Без ограничения срока действия. Подробнее:"," ",(0,a.jsx)(m(),{target:"_blank",href:"https://bcs.ru/regulatory",children:"https://bcs.ru/regulatory"}),".",(0,a.jsx)("br",{}),"БКС Мир инвестиций используется ООО \xabКомпания БКС\xbb в качестве товарного знака."]})]})]})})}},37765:(e,s,t)=>{"use strict";t.d(s,{y:()=>F});var a=t(26514),n=t(38089),i=t(80824),l=t(7086),o=t(91394),r=t(68208),c=t.n(r),d=t(75834),m=t(24665),h=t(60008),u=t(52828),p=t(39781),x=t(93969),g=t(14009),N=t(23141),b=t(64137),f=t(89754),j=t(5625),v=t(63390),A=t(47115),T=t(67614),C=t(56103),E=t(79598),_=t(75165),y=t(73669),S=t(55285);t(49732);var I=t(76510),O=t(36241),R=t(73822),w=t(15269),k=t(1891),L=t(87284),D=t(96337),P=t(4206),M=t(61481);class B extends d.Component{static #e=this.propTypes={onSave:c().func,onCancel:c().func,saveButtonTitle:c().string,cancelButtonTitle:c().string,portfolioId:c().string,showAdditionalParams:c().bool,defaultCurrency:c().string};constructor(e){super(e),this.portfolioSchema=f.Ik().shape({name:f.Yj().min(1,this.props.t("FORM.VALIDATION.NAME_MIN")).max(100,this.props.t("FORM.VALIDATION.NAME_MAX")).required(this.props.t("FORM.VALIDATION.NAME_REQUIRED")),note:f.Yj().nullable(!0).max(2e3,this.props.t("FORM.VALIDATION.NOTE_MAX")),defaultCurrency:f.Yj().nullable(),applyTaxesOnPaidDividends:f.zM(),dividendTaxPercent:f.ai().min(0,this.props.t("FORM.VALIDATION.TAX_MIN")).max(100,this.props.t("FORM.VALIDATION.TAX_MAX")),goalValue:f.ai().min(0,this.props.t("FORM.VALIDATION.GOAL_MIN")).max(0xe8d4a50fff,this.props.t("FORM.VALIDATION.GOAL_MAX")),trackCash:f.zM(),brokerCommission:f.ai().nullable(!0).min(0,this.props.t("EDIT.VALIDATION.COMMISSION_MIN")).max(100,this.props.t("EDIT.VALIDATION.COMMISSION_MAX")),doNotAdjustXIRR:f.zM(),doNotAdjustCashDividendsGoesThroughWithdrawals:f.zM(),sendSummaryUpdateNotifications:f.zM(),automaticallyAddDividend:f.zM(),dividendGoToAnotherAccount:f.zM()}),this.protoSetState=e=>{this._isMounted&&this.setState(e)},this.loadData=async()=>{this.protoSetState({blocking:!0}),await this.getPortfolio(),this.protoSetState({blocking:!1})},this.getPortfolio=async()=>{if(this.state.portfolio.portfolioId)try{let{data:e}=await l.A.get(`${v.kn6}/${this.state.portfolio.portfolioId}`),s=e.portfolioNotificationSettings.filter(e=>e.notificationType===A.Ql&&e.deliveryMethod===A.JT).length>0;this.protoSetState({portfolio:{name:e.name,note:e.note,goalType:e.goalType.toString(),goalValue:e.goalValue??"",type:e.type.toString(),defaultCurrency:e.defaultCurrency,goalCurrency:e.goalCurrency??"USD",portfolioId:this.state.portfolio.portfolioId,broker:e.broker,applyTaxesOnPaidDividends:e.applyTaxesOnPaidDividends,dividendTaxPercent:e.dividendTaxPercent,trackCash:e.trackCash,trackCashType:e.trackCashType,removeCashAssets:!1,brokerCommission:e.brokerCommission,doNotAdjustXIRR:e.doNotAdjustXIRR,doNotAdjustCashDividendsGoesThroughWithdrawals:e.doNotAdjustCashDividendsGoesThroughWithdrawals,sendSummaryUpdateNotifications:s,automaticallyAddDividend:e.automaticallyAddDividend,dividendGoToAnotherAccount:e.dividendGoToAnotherAccount,viewType:e.viewType?e.viewType.toString():A.Sj.REAL_ACCOUNT,isAutoSyncPortfolio:e.isAutoSyncEnabled??!1},originalTrackCashType:e.trackCashType})}catch(s){let e=(0,O.g6)(`${this.props.t("ERROR.FAILED_TO_LOAD_DATA",{ns:"common"})}: 
8`,s);w.f1(e)}},this.save=async(e,s)=>{this.protoSetState({blocking:!0});try{let s=this.state.portfolio.portfolioId??null,t=[];e.sendSummaryUpdateNotifications&&t.push({DeliveryMethod:A.JT,NotificationType:A.Ql});let a={Name:e.name,Note:e.note,DefaultCurrency:e.defaultCurrency,GoalType:parseInt(e.goalType),GoalValue:e.goalValue,GoalCurrency:e.goalCurrency,Type:parseInt(e.type),Broker:this.state.portfolio.broker,ApplyTaxesOnPaidDividends:e.applyTaxesOnPaidDividends??
8!0,DividendTaxPercent:e.dividendTaxPercent??0,TrackCash:e.trackCash,TrackCashType:e.trackCashType,RemoveCashAssets:e.removeCashAssets,BrokerCommission:e.brokerCommission,DoNotAdjustXIRR:e.doNotAdjustXIRR??!1,DoNotAdjustCashDividendsGoesThroughWithdrawals:e.doNotAdjustCashDividendsGoesThroughWithdrawals??!1,automaticallyAddDividend:e.automaticallyAddDividend??!1,dividendGoToAnotherAccount:e.dividendGoToAnotherAccount??!1,PortfolioNotificationSettings:t,ViewType:parseInt(e.viewType)};""===a.GoalValue&&(a.GoalValue=0),""===a.DividendTaxPercent&&(a.DividendTaxPercent=0),""===a.BrokerCommission&&(a.BrokerCommission=null);let n={};if(s){let e=`${v.kn6}/${s}`;a.Id=s,n=await l.A.put(e,a)}else{let[e,s]=this.props.lastRun(),t=e&&s===P.jb.variantA&&j.M_.getState().ui.showDashboardNewPortfolioAlert?v.TKq:v.kn6;n=await l.A.post(t,a)}let{data:i}=n,o=i.portfolioNotificationSettings.filter(e=>e.notificationType===A.Ql&&e.deliveryMethod===A.JT).length>0;this.protoSetState({portfolio:{name:i.name,note:i.note,defaultCurrency:i.defaultCurrency,goalType:i.goalType.toString(),goalValue:i.goalValue,type:i.type.toString(),goalCurrency:i.goalCurrency,portfolioId:this.state.portfolio.portfolioId,broker:i.broker,applyTaxesOnPaidDividends:i.applyTaxesOnPaidDividends,dividendTaxPercent:i.dividendTaxPercent,trackCash:i.trackCash,trackCashType:i.trackCashType,removeCashAssets:!1,brokerCommission:i.brokerCommission,doNotAdjustXIRR:i.doNotAdjustXIRR,doNotAdjustCashDividendsGoesThroughWithdrawals:i.doNotAdjustCashDividendsGoesThroughWithdrawals,automaticallyAddDividend:i.automaticallyAddDividend,dividendGoToAnotherAccount:i.dividendGoToAnotherAccount,sendSummaryUpdateNotifications:o,viewType:i.viewType?i.viewType.toString():A.Sj.REAL_ACCOUNT,isAutoSyncPortfolio:i.isAutoSyncEnabled??!1},originalTrackCash:i.trackCashType}),s?w.uT(this.props.t("PORTFOLIO_UPDATED")):w.uT(this.props.t("PORTFOLIO_CREATED")),this.props.onSave&&this.props.onSave(i)}catch(e){(0,O.ZC)(e,s)}this.protoSetState({blocking:!1})},this.cancel=()=>{this.props.onCancel&&this.props.onCancel()},this.setTab=e=>{this.setState({tab:e})},this._isMounted=!1;let{auth:{user:s}}=j.M_.getState(),t=(0,L.q)(s),a=e.defaultCurrency??((0,S.de)()?"USD":"RUB");this.state={portfolio:{name:this.props.t("MY_PORTFOLIO"),note:"",defaultCurrency:a,goalType:A.eu.INCOME,goalValue:"",type:A.N$.TRANSACTIONAL,goalCurrency:a,portfolioId:e.portfolioId??null,broker:null,applyTaxesOnPaidDividends:!0,dividendTaxPercent:"",trackCash:!0,trackCashType:A.Xc.BALANCE_ONLY,removeCashAssets:!1,viewType:A.Sj.REAL_ACCOUNT,brokerCommission:null,doNotAdjustXIRR:!1,doNotAdjustCashDividendsGoesThroughWithdrawals:!1,sendSummaryUpdateNotifications:!0,automaticallyAddDividend:!1,dividendGoToAnotherAccount:!1,isAutoSyncPortfolio:e.isAutoSyncPortfolio??!1},originalTrackCashType:A.Xc.BALANCE_ONLY,currencies:[],showAdditionalParams:e.showAdditionalParams??!1,showAdvancedSettings:!1,saveButtonTitle:e.saveButtonTitle??this.props.t("BUTTON.SAVE",{ns:"common"}),cancelButtonTitle:e.cancelButtonTitle??this.props.t("BUTTON.DISCARD",{ns:"common"}),isCancelButtonVisible:e.isCancelButtonVisible??!1,isSaveButtonArrowVisible:e.isSaveButtonArrowVisible??!0,blocking:!1,freeUser:t,tab:"basic",view:"compact"}}componentDidMount(){this._isMounted=!0,this.loadData()}componentWillReceiveProps(e){e.portfolioId&&e.portfolioId!==this.state.portfolio?.portfolioId&&this.setState({portfolio:{...this.state.portfolio,portfolioId:e.portfolioId}},async()=>{this.protoSetState({blocking:!0}),await this.getPortfolio(),this.protoSetState({blocking:!1})})}componentWillUnmount(){this._isMounted=!1}setView(e){this.setState({view:e})}render(){return(0,a.jsx)(o.l1,{initialValues:this.state.portfolio,validationSchema:this.portfolioSchema,enableReinitialize:!0,onSubmit:(e,s)=>{this.save(e,s)},children:e=>(0,a.jsx)(I.A,{tag:"div",blocking:this.state.blocking,keepInView:!0,children:(0,a.jsxs)(m.A,{onSubmit:function(){for(var s=arguments.length,t=Array(s),a=0;a<s;a++)t[a]=arguments[a];e.handleSubmit(...t),(0,T.s9)({event:T.Mg.NEW_PORTFOLIO_NEXT_CLICKED})},children:[this.state.showAdditionalParams&&(0,a.jsxs)("ul",{className:"nav nav-card-header nav-tabs nav-tabs-line nav-tabs-line-2x sb-nav nav-bold",role:"tablist",children:[(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("basic"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"basic"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"tab","aria-selected":("basic"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.COMMON")})})}),(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("tax"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"tax"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"button","aria-selected":("tax"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.TAX")})})}),this.state.portfolio.type==A.N$.TRANSACTIONAL&&(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("stats"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"stats"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"button","aria-selected":("stats"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.CASH")})})}),(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("notifications"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"notifications"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"button","aria-selected":("notifications"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.NOTIFICATIONS")})})}),this.state.portfolio.type==A.N$.TRANSACTIONAL&&(0,a.jsx)("li",{className:"nav-item text-nowrap",onClick:()=>this.setTab("other"),children:(0,a.jsx)("a",{className:`nav-link font-weight-bold ${"other"===this.state.tab&&"active"}`,"data-toggle":"tab",role:"button","aria-selected":("other"===this.state.tab).toString(),children:(0,a.jsx)("span",{className:"nav-text",children:this.props.t("FORM.TAB.OTHER")})})})]}),(0,a.jsxs)("div",{className:"mt-4",children:["basic"===this.state.tab&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(m.A.Group,{children:[(0,a.jsx)(m.A.Label,{children:this.props.t("FORM.NAME")}),(0,a.jsx)(m.A.Control,{id:"tour-new-portfolio-name",className:"form-control-solid",size:"lg",type:"text",placeholder:"",onChange:e.handleChange,onBlur:e.handleBlur,value:e.values.name,name:"name"}),e.touched.name&&e.errors.name&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.name})})]}),(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("div",{className:"col-md-3 col-sm-12",children:(0,a.jsxs)(m.A.Group,{children:[(0,a.jsxs)(m.A.Label,{children:[this.props.t("FORM.CURRENCY")," ",(0,a.jsx)(y.N,{placement:"right",message:this.props.t("FORM.CURRENCY_HELP")})]}),(0,a.jsx)(i.A,{className:"sb-select col form-control",variant:"filled",children:(0,a.jsx)(C.J,{placeholder:this.props.t("FORM.CURRENCY_PLACEHOLDER"),fullWidth:!1,optionDisplay:"full",value:e.values.defaultCurrency,onChange:(s,t)=>{let a=t?t.value:"";e.setFieldValue("defaultCurrency",a,!0),e.values.defaultCurrency=a,!a||this.state.portfolio.portfolioId||e.touched.goalCurrency||(e.setFieldValue("goalCurrency",a,!0),e.values.goalCurrency=a)}})}),e.touched.currency&&e.errors.currency&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.currency})})]})}),(0,a.jsx)("div",{className:"col-md-9 col-sm-12",children:(0,a.jsxs)(m.A.Group,{children:[(0,a.jsxs)(m.A.Label,{children:[this.props.t("FORM.GOAL"),(0,a.jsx)(y.N,{placement:"right",message:this.props.t("FORM.GOAL_HELP")})]}),(0,a.jsxs)(m.A.Row,{className:"justify-content-start ml-0",children:[(0,a.jsx)(h.A,{className:"form-group col col-auto p-0 mr-2 mb-2",children:(0,a.jsxs)(u.A,{type:"radio",name:"goalType",className:"widget-toggle-group toggle-md",onChange:(s,t)=>{e.values.goalType=s,e.handleBlur(t)},onBlur:e.handleBlur,defaultValue:A.eu.INCOME,value:e.values.goalType,children:[(0,a.jsx)(p.A,{size:"md",className:"font-weight-bold mr-2",variant:"primary",value:A.eu.CAPITAL_GAINS,children:this.props.t("FORM.GOAL_TYPE.VALUE")}),(0,a.jsx)(p.A,{size:"md",className:"font-weight-bold",variant:"primary",value:A.eu.INCOME,children:this.props.t("FORM.GOAL_TYPE.PASSIVE_INCOME")})]})}),(0,a.jsxs)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)(R.c,{className:"form-control form-control-lg form-control-solid",placeholder:this.props.t("FORM.GOAL.PLACEHOLDER"),name:"goalValue",isAllowed:O.e4,onValueChange:s=>{e.setFieldValue("goalValue",s.value||s.floatValue,!0),e.values.goalValue=s.value||s.floatValue},onBlur:e.handleBlur,value:e.values.goalValue}),(0,a.jsx)(i.A,{className:"sb-select form-control",variant:"filled",style:{position:"absolute",width:"85px",right:0,top:0},children:(0,a.jsx)(C.J,{value:e.values.goalCurrency,onChange:(s,t)=>{let a=t?t.value:"";e.setFieldValue("goalCurrency",a,!0),e.values.goalCurrency=a}})}),e.touched.goalValue&&e.errors.goalValue&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.goalValue})})]})]}),e.values.goalValue>0&&(0,a.jsxs)("span",{className:"text-muted mt-n5",children:["(",e.values.goalType===A.eu.INCOME?(0,a.jsx)(N.x,{i18nKey:"portfolio:FORM.GOAL.MESSAGE_INCOME",components:[(0,a.jsx)(_.b,{value:e.values.goalValue,currency:e.values.goalCurrency,isMoney:!0}),(0,a.jsx)(_.b,{value:e.values.goalValue/12,currency:e.values.goalCurrency,isMoney:!0})]}):(0,a.jsx)(N.x,{i18nKey:"portfolio:FORM.GOAL.MESSAGE_VALUE",components:[(0,a.jsx)(_.b,{value:e.values.goalValue,currency:e.values.goalCurrency,isMoney:!0})]}),")"]})]})})]}),(0,a.jsxs)(m.A.Group,{children:[(0,a.jsx)(m.A.Label,{children:this.props.t("FORM.NOTE")}),(0,a.jsx)(m.A.Control,{id:"holding-note-input",className:"form-control-solid",size:"lg",placeholder:this.props.t("FORM.NOTE_PLACEHOLDER"),as:"textarea",rows:"2",value:e.values.note,onChange:e.handleChange,onBlur:e.handleBlur,name:"note"}),e.touched.name&&e.errors.note&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.note})})]}),(0,a.jsx)(n.A,{in:this.state.showAdvancedSettings,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(m.A.Group,{children:[(0,a.jsx)(m.A.Label,{children:this.props.t("FORM.VIEW_TYPE")}),(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsx)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:(0,a.jsx)("div",{className:"mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(h.A,{className:"form-group col col-auto p-0 mr-2 mb-0",children:(0,a.jsxs)(u.A,{type:"radio",name:"viewT
8ype",className:"widget-toggle-group toggle-md",onChange:s=>{e.setFieldValue("viewType",s,!0),e.values.viewType=s},value:e.values.viewType,defaultValue:A.Sj.REAL_ACCOUNT,children:[(0,a.jsx)(p.A,{size:"sm",className:"font-weight-bold mr-2",variant:"white",value:A.Sj.REAL_ACCOUNT,children:this.props.t("FORM.VIEW_TYPE.REAL_ACCOUNT")}),(0,a.jsx)(p.A,{size:"sm",className:"font-weight-bold",variant:"white",value:A.Sj.SANDBOX,children:this.props.t("FORM.VIEW_TYPE.SANDBOX")})]})}),(0,a.jsxs)("span",{className:"text-muted font-size-sm",children:[e.values.viewType===A.Sj.REAL_ACCOUNT&&(0,a.jsx)(a.Fragment,{children:this.props.t("FORM.VIEW_TYPE.REAL_ACCOUNT_DESCRIPTION")}),e.values.viewType===A.Sj.SANDBOX&&(0,a.jsx)(a.Fragment,{children:this.props.t("FORM.VIEW_TYPE.SANDBOX_DESCRIPTION")})]})]})})})})]}),e.values.viewType!=A.Sj.SANDBOX&&this.state.portfolio.type==A.N$.TRANSACTIONAL&&(0,a.jsxs)(m.A.Group,{children:[(0,a.jsxs)(m.A.Label,{children:[this.props.t("FORM.COMMISSION"),(0,a.jsx)(y.N,{placement:"right",message:this.props.t("FORM.COMMISSION_HELP")})]}),(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)(R.c,{className:"form-control form-control-lg form-control-solid",placeholder:this.props.t("FORM.COMMISSION_PLACEHOLDER"),name:"brokerCommission",suffix:"%",isAllowed:O.UW,onValueChange:s=>{e.setFieldValue("brokerCommission",s.value||s.floatValue,!0),e.values.brokerCommission=s.value||s.floatValue},onBlur:e.handleBlur,value:e.values.brokerCommission}),e.touched.brokerCommission&&e.errors.brokerCommission&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.brokerCommission})})]})})]})]})}),(0,a.jsx)("div",{className:"mb-3",children:(0,a.jsxs)("button",{type:"button",className:`btn btn-link-dark text-dark-50 font-weight-bold ${this.state.showAdvancedSettings&&"open"}`,onClick:e=>{e.preventDefault(),this.setState({showAdvancedSettings:!this.state.showAdvancedSettings})},children:[(0,a.jsx)("i",{className:`pr-2 text-dark-50 icon-sm ${this.state.showAdvancedSettings?"fas fa-minus":"fas fa-plus"}`}),this.props.t(this.state.showAdvancedSettings?"FORM.ADVANCED_SETTINGS.HIDE":"FORM.ADVANCED_SETTINGS")]})})]}),"tax"===this.state.tab&&(0,a.jsxs)(a.Fragment,{children:[this.state.portfolio.type==A.N$.TRANSACTIONAL&&(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsx)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-success",children:[(0,a.jsx)("input",{type:"checkbox",name:"Checkboxes6",checked:e.values.applyTaxesOnPaidDividends,onChange:s=>{e.setFieldValue("applyTaxesOnPaidDividends",s.target.checked,!0),e.values.applyTaxesOnPaidDividends=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.APPLY_TAX"),(0,a.jsx)(y.N,{placement:"right",message:this.props.t("FORM.APPLY_TAX_HELP")})]})})})}),(0,a.jsxs)(m.A.Label,{children:[this.props.t("FORM.TAX"),(0,a.jsx)(y.N,{placement:"right",message:this.props.t("FORM.TAX_HELP")})]}),(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)(R.c,{className:"form-control form-control-lg form-control-solid",placeholder:this.props.t("FORM.TAX_PLACEHOLDER"),name:"dividendTaxPercent",suffix:"%",isAllowed:O.UW,onValueChange:s=>{e.setFieldValue("dividendTaxPercent",s.value||s.floatValue,!0),e.values.dividendTaxPercent=s.value||s.floatValue},onBlur:e.handleBlur,value:e.values.dividendTaxPercent}),e.touched.dividendTaxPercent&&e.errors.dividendTaxPercent&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.dividendTaxPercent})})]})})]}),"stats"===this.state.tab&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.A.Label,{children:this.props.t("FORM.TRACK_CASH_TYPE")}),(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsx)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:(0,a.jsx)("div",{className:"mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(h.A,{className:"form-group col col-auto p-0 mr-2 mb-0",children:(0,a.jsxs)(u.A,{type:"radio",name:"goalType",className:"widget-toggle-group toggle-md",onChange:s=>{e.setFieldValue("trackCashType",s,!0),e.values.trackCashType=s,this.state.originalTrackCashType!==A.Xc.DISABLED&&s===A.Xc.DISABLED&&(e.setFieldValue("removeCashAssets",!0,!0),e.values.removeCashAssets=!0)},value:e.values.trackCashType,defaultValue:A.Xc.BALANCE_ONLY,children:[(0,a.jsx)(p.A,{size:"sm",className:"font-weight-bold mr-2",variant:"white",value:A.Xc.DISABLED,children:this.props.t("FORM.TRACK_CASH_TYPE.NO")}),(0,a.jsx)(p.A,{size:"sm",className:"font-weight-bold mr-2",variant:"white",value:A.Xc.BALANCE_ONLY,children:this.props.t("FORM.TRACK_CASH_TYPE.BALANCE")}),(0,a.jsxs)(p.A,{disabled:!1,size:"sm",className:"font-weight-bold",variant:"white",value:A.Xc.FULL,children:[!1," ",this.props.t("FORM.TRACK_CASH_TYPE.FULL")]})]})}),(0,a.jsxs)("span",{className:"text-muted font-size-sm",children:[e.values.trackCashType===A.Xc.DISABLED&&(0,a.jsx)(a.Fragment,{children:this.props.t("FORM.TRACK_CASH_TYPE.NO_HELP")}),e.values.trackCashType===A.Xc.BALANCE_ONLY&&(0,a.jsx)(a.Fragment,{children:this.props.t("FORM.TRACK_CASH_TYPE.BALANCE_HELP")}),e.values.trackCashType===A.Xc.FULL&&(0,a.jsx)(a.Fragment,{children:this.props.t("FORM.TRACK_CASH_TYPE.FULL_HELP")})]})]})})})}),this.state.originalTrackCashType!==A.Xc.DISABLED&&e.values.trackCashType===A.Xc.DISABLED&&(0,a.jsx)("div",{className:"alert alert-custom alert-light-warning",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsx)(N.x,{i18nKey:"portfolio:FORM.TRACK_CASH_TYPE.DISABLE_MESSAGE"})}),(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsx)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-warning",children:[(0,a.jsx)("input",{type:"checkbox",name:"Checkboxes7",checked:e.values.removeCashAssets,onChange:s=>{e.setFieldValue("removeCashAssets",s.target.checked,!0),e.values.removeCashAssets=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.TRACK_CASH_TYPE.DISABLE_OPTION")]})})})})]})}),this.state.originalTrackCashType!==A.Xc.FULL&&e.values.trackCashType===A.Xc.FULL&&(0,a.jsx)("div",{className:"alert alert-custom alert-light-warning",children:(0,a.jsx)("div",{children:(0,a.jsx)(N.x,{i18nKey:"portfolio:FORM.TRACK_CASH_TYPE.ENABLE_MESSAGE"})})})]}),"other"===this.state.tab&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-success",children:[(0,a.jsx)("input",{type:"checkbox",name:"Checkboxes6",checked:e.values.doNotAdjustXIRR,onChange:s=>{e.setFieldValue("doNotAdjustXIRR",s.target.checked,!0),e.values.doNotAdjustXIRR=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.DO_NOT_ADJUST_XIRR")]})}),(0,a.jsxs)("span",{className:"text-muted font-size-sm",children:[this.props.t("FORM.DO_NOT_ADJUST_XIRR_HELP")," ",(0,a.jsx)(E.O,{href:"xirr",children:this.props.t("SEE_MORE",{ns:"common"})})]})]})}),(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-success",children:[(0,a.jsx)("input",{type:"checkbox",name:"Checkboxes6",checked:e.values.doNotAdjustCashDividendsGoesThroughWithdrawals,onChange:s=>{e.setFieldValue("doNotAdjustCashDividendsGoesThroughWithdrawals",s.target.checked,!0),e.values.doNotAdjustCashDividendsGoesThroughWithdrawals=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.DO_NOT_ADJUST_CASH_AS_WITHDRAWALS")]})}),(0,a.jsx)("span",{className:"text-muted font-size-sm",children:this.props.t("FORM.DO_NOT_ADJUST_CASH_AS_WITHDRAWALS_HELP")})]})}),(0,a.jsx)("hr",{}),(0,a.jsx)("h3",{children:this.props.t("FORM.ADD_DIVIDEND_AUTOMATICALLY_HEADER")}),(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-success",children:[(0,a.jsx)("input",{type:"checkbox",name:"Checkboxes6",checked:e.values.automaticallyAddDividend,onChange:s=>{e.setFieldValue("automaticallyAddDividend",s.target.checked,!0),e.values.automaticallyAddDividend=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.ADD_DIVIDEND_AUTOMATICALLY")]})}),(0,a.jsx)("span",{className:"text-muted font-size-sm",children:this.props.t("FORM.ADD_DIVIDEND_AUTOMATICALLY_HELP")}),(0,a.jsx)("div",{className:"mt-3 mb-0",children:(0,a.jsx)(D.c,{isAutoSyncPortfolio:this.state.portfolio.isAutoSyncPortfolio})})]})}),e.values.trackCashType===A.Xc.FULL&&e.values.automaticallyAddDividend&&(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:"checkbox checkbox-success",children:[(0,a.jsx)("input",{type:"checkbox",name:"Checkboxes6",checked:e.values.dividendGoToAnotherAccount,onChange:s=>{e.setFieldValue("dividendGoToAnotherAccount",s.target.checked,!0),e.values.dividendGoToAnotherAccount=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.DONT_ADJUST_CASH")]})}),(0,a.jsx)("span",{className:"text-muted font-size-sm",children:this.props.t("FORM.DONT_ADJUST_CASH_HELP")})]})})]}),"notifications"===this.state.tab&&(0,a.jsx)(k.e3,{type:k.RL,secured:k.w9,title:this.props.t("FORM.SEND_NOTIFICATION.EMAIL.SUMMARY_UPDATE"),children:(0,a.jsx)(m.A.Row,{className:"justify-content-start ml-0",children:(0,a.jsxs)(m.A.Group,{as:x.A,className:"p-0 mr-2 mb-2",style:{minWidth:"12rem"},children:[(0,a.jsx)("div",{className:"mt-3 mr-2 mb-2 col-auto p-0",children:(0,a.jsxs)("label",{className:`checkbox checkbox-success ${this.state.freeUser&&"text-muted"}`,children:[(0,a.jsx)("input",{type:"checkbox",name:"sendSummaryUpdateNotifications",checked:e.values.sendSummaryUpdateNotifications,disabled:!!this.state.freeUser||null,onChange:s=>{e.setFieldValue("sendSummaryUpdateNotifications",s.target.checked,!0),e.values.sendSummaryUpdateNotifications=s.target.checked}}),(0,a.jsx)("span",{className:"mr-1"}),this.props.t("FORM.SEND_NOTIFICATION.EMAIL.SUMMARY_UPDATE")]})}),(0,a.jsx)("span",{className:"text-muted font-size-sm",children:this.props.t("FORM.SEND_NOTIFICATION.EMAIL.SUMMARY_UPDATE_HELP")})]})})})]}),(0,a.jsx)("div",{className:"float-right pt-2",children:(0,a.jsxs)(h.A,{children:[this.state.isCancelButtonVisible?(0,a.jsx)(g.A,{size:"lg",className:"btn btn-light-primary font-weight-bold mr-2",type:"button",disabled:this.state.blocking,onClick:this.cancel,children:this.state.cancelButtonTitle}):"",(0,a.jsxs)(g.A,{id:"portfolio-editor-submit",size:"lg",className:"btn btn-primary font-weight-bold",type:"submit",disabled:this.state.blocking,children:[(0,a.jsxs)("span",{children:[this.state.saveButtonTitle," "]}),this.state.isSaveButtonArrowVisible&&(0,a.jsx)("i",{className:"icon-sm flaticon2-right-arrow"})]})]})})]})})})}}let F=(0,M.I)((0,b.C)(["portfolio","common"])(B),P.jb)},38099:(e,s,t)=>{"use strict";t.d(s,{Ey:()=>p,ZB:()=>r});var a=t(93760),n=t(33989),i=t(36241),l=t(15269),o=t(88515);function r(e){let{t:s}=(0,a.B)("layout");return(0,n.I)({queryKey:["search-assets",e],queryFn:()=>
8{if(!e.search)return[];try{return(0,o.G)(e)}catch(t){let e=(0,i.g6)(`${s("SEARCH_ASSET.ERROR")}: 
9`,t);return(0,l.f1)(e),[]}},staleTime:0,gcTime:0})}var c=t(21069),d=t(33238),m=t(84534),h=t(5226);let u={key:e=>["assetPosts",e],options:(e,s)=>{let{assetType:t,assetInfoId:a,ticker:n,exchange:i,currency:l}=e,o=(0,c.gW)(t,a,n,i,l);return(0,h.j)({queryKey:u.key(o),queryFn:async()=>{let{data:e}=await (0,d.vL)(o,{page:1,pageSize:2,sortBy:m.FU.Hottest});return e},...s})}};function p(e,s){return(0,n.I)(u.options(e,s))}},38266:(e,s,t)=>{"use strict";t.d(s,{k:()=>l});var a=t(26514);t(75834);var n=t(93760),i=t(49732);function l(e){let{t:s}=(0,n.B)("common");return(0,a.jsxs)("div",{className:"py-4",children:[(0,a.jsx)("div",{children:(0,a.jsx)(i.A,{size:"10x",color:"none",src:"/media/svg/icons/Shopping/Box2.svg?v=1"})}),(0,a.jsxs)("span",{className:"text-muted font-weight-bold",children:[" ",e.message," ",!e.message&&(0,a.jsxs)(a.Fragment,{children:[s("EMPTY_TABLE_MESSAGE")," ",(0,a.jsx)("i",{className:"far fa-sad-tear icon-nm"})," "]})]})]})}},39052:(e,s,t)=>{"use strict";t.d(s,{R:()=>o});var a=t(26514),n=t(75834),i=t(19442);class l{constructor(e){this._onCheckboxClick=e=>{let s=e.target.checked;try{let e=this.originalTableElement.getElementsByClassName("checkbox")[0];e.getElementsByTagName("input")[0].checked!=s&&e.click()}catch(e){console.log(e)}},this.originalTableElement=e,this.wrapperElement=this._wrapTable(),this.originalTableWrapperElement=this._wrapTableBody(),this.fixedTableWrapperElement=this._wrapTableHead(),this.fixedTableElement=this.fixedTableWrapperElement.querySelector("table"),this.scrollLeft=this.originalTableElement.scrollLeft,this._handleWindowScrollThrottled=this._throttle(this._handleWindowScroll.bind(this),20),this._handleWindowResizeThrottled=this._throttle(this._handleWindowResize.bind(this),20),this._handleFixedTableWrapperScrollThrottled=this._throttle(this._handleFixedTableWrapperScroll.bind(this),20),this._handleOriginalTableWrapperScrollThrottled=this._throttle(this._handleOriginalTableWrapperScroll.bind(this),20),this._syncColumnWidth(),this._syncHeadPosition(),this.fixedTableWrapperElement.addEventListener("scroll",this._handleFixedTableWrapperScrollThrottled,!1),this.originalTableWrapperElement.addEventListener("scroll",this._handleOriginalTableWrapperScrollThrottled,!1),window.addEventListener("scroll",this._handleWindowScrollThrottled,!1),window.addEventListener("resize",this._handleWindowResizeThrottled)}_wrapTable(){let e=document.createElement("div");return e.className="sb-table-wrapper",this.originalTableElement&&this.originalTableElement.parentNode&&(this.originalTableElement.parentNode.insertBefore(e,this.originalTableElement),e.appendChild(this.originalTableElement)),e}_wrapTableHead(){let e=this.originalTableElement?this.originalTableElement.tHead:null;if(!e)throw Error("<thead> is missing");let s=e.cloneNode(!0),t=document.createElement("div"),a=document.createElement("table");this._toggleHeadVisibility(e,!1);let n=this.originalTableElement.classList.contains("table-fix-two-col");return t.className="sb-table-head-wrapper react-bootstrap-table",a.className=`table table-header table-head-custom table-fix-first-col mb-0 ${n?"table-fix-two-col":""}`,a.style.marginBottom="0 !important",t.dataset.isFixed="false",t.style.overflowX="auto",t.ariaHidden="true",t.appendChild(a).appendChild(s),this.wrapperElement&&this.originalTableWrapperElement&&this.wrapperElement.insertBefore(t,this.originalTableWrapperElement),t}_wrapTableBody(){let e=document.createElement("div");return e.className="sb-table-body-wrapper",e.style.overflowX="auto",this.originalTableElement&&this.wrapperElement&&(this.wrapperElement.insertBefore(e,this.originalTableElement),e.appendChild(this.originalTableElement)),e}_syncColumnWidth(){let e=this.fixedTableElement,s=this.originalTableElement;if(e&&s&&s.tHead&&e.tHead)for(let t of s.tHead.rows)for(let s of t.cells){let a=e.tHead.rows[t.rowIndex].cells[s.cellIndex],n=window.getComputedStyle(s),l=Number(s.getBoundingClientRect().width.toFixed(2));if("content-box"===n.boxSizing&&(l-=parseFloat(n.paddingLeft),l-=parseFloat(n.paddingRight)),a.style.minWidth=`${l}px`,a.style.maxWidth=`${l}px`,!a.onclick){a.onclick=()=>{s.click()};let e=a.getElementsByClassName("checkbox"),t=e.length>0?e[0]:null;if(t)try{t.getElementsByTagName("input")[0].addEventListener("change",this._onCheckboxClick)}catch(e){console.log(e)}let n=a.getElementsByClassName("hoverable-item"),l=s.getElementsByClassName("hoverable-item"),o=n.length>0?n[0]:null,r=l.length>0?l[0]:null;if(o&&r){let e=r.getAttribute("aria-label");e&&(o.setAttribute("data-tippy-content",e),o.setAttribute("title",""),(0,i.Ay)(o,{duration:0,interactive:!1,maxWidth:300}))}}}}_syncFixedTableWrapperWidth(){if(this.fixedTableWrapperElement&&this.originalTableWrapperElement){let{width:e}=this.fixedTableWrapperElement.getBoundingClientRect(),{width:s}=this.originalTableWrapperElement.getBoundingClientRect();e!==s&&(this.fixedTableWrapperElement.style.width=s+"px")}}_syncHeadPosition(){if(!this.fixedTableWrapperElement||!this.originalTableWrapperElement)return;let e=65;window.innerWidth<992&&(e=55);let s="true"===this.fixedTableWrapperElement.dataset.isFixed,{height:t}=this.fixedTableWrapperElement.getBoundingClientRect(),{top:a,width:n,height:i}=this.originalTableWrapperElement.getBoundingClientRect(),l=s?0:t,o=2*t,r=a>=l,c=i+a-t<=0;s&&(r||c)?(this.fixedTableWrapperElement.style.position="",this.fixedTableWrapperElement.style.top="",this.fixedTableWrapperElement.style.zIndex="",this.fixedTableWrapperElement.style.width="",this.originalTableWrapperElement.style.paddingTop="",this.fixedTableWrapperElement.dataset.isFixed="false",s=!1):s||r||c||(this.fixedTableWrapperElement.style.position="fixed",this.fixedTableWrapperElement.style.top=`${e}px`,this.fixedTableWrapperElement.style.zIndex="2",this.fixedTableWrapperElement.style.width=n+"px",this.originalTableWrapperElement.style.paddingTop=t+"px",this.fixedTableWrapperElement.dataset.isFixed="true",s=!0),this.fixedTableWrapperElement.style.transform=s&&i+a<o?`translate3d(0, ${i+a-o}px, 0)`:""}_syncHorizontalScroll(e,s){let t=e.scrollLeft;this.scrollLeft!==t&&(this.scrollLeft=t,s.scrollLeft=t)}_toggleHeadVisibility(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw Error("<thead> is missing");let t=[].concat(...Array.from(e.rows).map(e=>Array.from(e.cells)));e.style.visibility=s?"":"collapse",e.style.height=s?"":"0",s?e.classList.remove("sb-head-hide-element"):e.classList.add("sb-head-hide-element"),t.forEach(e
9=>{e.style.height=s?"":"0",e.style.maxHeight=s?"":"0",e.style.paddingTop=s?"":"0",e.style.paddingBottom=s?"":"0",e.style.lineHeight=s?"":"0";let t=e.getElementsByClassName("checkbox"),a=e.getElementsByTagName("svg");if(t&&t.length>0)for(let e of t)e.style.height=s?"":"0 !important",e.style.maxHeight=s?"":"0 !important";if(a&&a.length>0)for(let e of a)s?e.setAttribute("height","0px"):e.setAttribute("height","24px")})}_handleFixedTableWrapperScroll(){this.fixedTableWrapperElement&&this.originalTableWrapperElement&&this._syncHorizontalScroll(this.fixedTableWrapperElement,this.originalTableWrapperElement)}_handleOriginalTableWrapperScroll(){this.fixedTableWrapperElement&&this.originalTableWrapperElement&&this._syncHorizontalScroll(this.originalTableWrapperElement,this.fixedTableWrapperElement)}_handleWindowScroll(){this._syncHeadPosition()}_handleWindowResize(){this._syncColumnWidth(),this._syncFixedTableWrapperWidth()}_throttle(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;var t=this;let a=null;return function(){for(var n=arguments.length,i=Array(n),l=0;l<n;l++)i[l]=arguments[l];null===a&&(a=setTimeout(()=>{e.apply(t,i),a=null},s))}}destroy(){if(window.removeEventListener("scroll",this._handleWindowScrollThrottled,!1),window.removeEventListener("resize",this._handleWindowResizeThrottled),this.fixedTableWrapperElement?.removeEventListener("scroll",this._handleFixedTableWrapperScrollThrottled,!1),this.originalTableWrapperElement?.removeEventListener("scroll",this._handleOriginalTableWrapperScrollThrottled,!1),this.fixedTableElement)for(let e of this.fixedTableElement.tHead.rows)for(let s of e.cells){s.onclick=null;let e=s.getElementsByClassName("checkbox"),t=e.length>0?e[0]:null;t&&t.getElementsByTagName("input")[0].removeEventListener("change",this._onCheckboxClick);let a=s.getElementsByClassName("hoverable-item"),n=a.length>0?a[0]:null;if(n){let e=(0,i.Ay)(n);e&&e.destroy()}}for(;this.originalTableWrapperElement?.firstChild;)this.wrapperElement?.insertBefore(this.originalTableWrapperElement?.firstChild,this.originalTableWrapperElement);for(;this.wrapperElement?.firstChild;)this.wrapperElement.parentElement?.insertBefore(this.wrapperElement?.firstChild,this.wrapperElement);this.originalTableElement&&this.originalTableElement.tHead&&this._toggleHeadVisibility(this.originalTableElement.tHead,!0),this.fixedTableWrapperElement?.remove(),this.originalTableWrapperElement?.remove(),this.wrapperElement?.remove(),delete this.originalTableElement,delete this.fixedTableWrapperElement,delete this.fixedTableElement,delete this.originalTableWrapperElement,delete this.wrapperElement,delete this.scrollLeft}}class o extends n.Component{constructor(e){super(e),this.resetTable=()=>{if(!this.props.disabled){let e=document.getElementById(this.props.tableId);e&&(this.table&&this.table.destroy(),this.table=new l(e))}},this.state={items:e.items,columns:e.columns,sortField:e.sortField,sortDirection:e.sortDirection,timerId:null}}componentDidMount(){this.resetTable()}componentDidUpdate(e){(e.items!=this.props.items||e.columns!=this.props.columns||e.sortField!=this.props.sortField||e.sortDirection!=this.props.sortDirection)&&this.resetTable()}componentWillUnmount(){this.table&&this.table.destroy(),this.state.timerId&&clearInterval(this.state.timerId)}render(){return(0,a.jsx)(a.Fragment,{children:this.props.children})}}},39608:(e,s,t)=>{"use strict";t.d(s,{s:()=>l});var a=t(26514),n=t(75834),i=t(14163);function l(e){let{executeRecaptcha:s}=(0,i._Y)(),t=(0,n.useCallback)(async()=>s?await s("submitContactForm"):null,[s]);return(0,a.jsx)(a.Fragment,{children:e.children({handleVerify:t})})}},40945:(e,s,t)=>{"use strict";t.d(s,{b:()=>eo});var a=t(26514),n=t(46225),i=t(62936),l=t.n(i),o=t(75834),r=t(80966),c=t(93760),d=t(59757),m=t(95990),h=t(30377),u=t(47115),p=t(55285),x=t(83308),g=t(33807),N=t(18150),b=t(75877),f=t(65119),j=t(73367),v=t(30985),A=t(61139),T=t(54253),C=t(43765),E=t(28100);let _=[{lang:"ru",name:"Русский",flag:(0,T.oK)("/media/svg/flags/248-russia.svg")},{lang:"en",name:"English",flag:(0,T.oK)("/media/svg/flags/226-united-states.svg")}];function y(){let e=(0,d.wA)(),{i18n:s}=(0,c.B)("layout"),t=s.language,n=_.find(e=>e.lang===t);return(0,a.jsxs)(v.A,{drop:"down",alignRight:!0,children:[(0,a.jsx)(v.A.Toggle,{as:C.rI,id:"dropdown-toggle-my-cart",children:(0,a.jsx)("div",{className:"btn btn-icon btn-clean btn-dropdown btn-lg mr-1",children:(0,a.jsx)("img",{className:"h-20px w-20px rounded",src:n?.flag,alt:n?.name})})}),(0,a.jsx)(v.A.Menu,{className:"p-0 m-0 dropdown-menu-right dropdown-menu-anim dropdown-menu-top-unround",children:(0,a.jsx)("ul",{className:"navi navi-hover py-4",children:_.map(t=>(0,a.jsx)("li",{className:(0,j.A)("navi-item",{active:t.lang===n?.lang}),children:(0,a.jsxs)("div",{onClick:()=>{var a;return a=t.lang,void((0,E.lY)(a,(0,p.Q_)(a),!0),s.changeLanguage(a),setTimeout(()=>{e({type:A.QN.UserRequested})},200))},className:"navi-link",style:{cursor:"pointer"},children:[(0,a.jsx)("span",{className:"symbol symbol-20 mr-3",children:(0,a.jsx)("img",{src:t.flag,alt:t.name})}),(0,a.jsx)("span",{className:`navi-text ${t.lang===n?.lang&&"text-primary"}`,children:t.name})]})},t.lang))})})]})}var S=t(9610),I=t.n(S),O=t(96456),R=t.n(O),w=t(51065),k=t.n(w),L=t(96210),D=t(78693);let P=["/dashboard","/stats","/assets","/transactions","/div-calendar","/my-goal","/cash","/portfolio","/corporate-actions","/rebalancing","/findthedip","/import-transactions","/import-transactions-history"];var M=t(66073),B=t(66243),F=t(4469),U=t(3163),G=t(77938),H=t.n(G);function $(e){let{view:s}=e,t=(0,x.Mw)(),i=(0,n.useRouter)(),{t:l}=(0,c.B)("layout"),m=(0,d.wA)(),{savePortfolioOrder:h,items:u,isLoading:g}=(0,B.J)(),{currentPortfolio:N}=(0,d.d4)(e=>{let{app:s}=e;return s}),{user:b}=(0,d.d4)(e=>{let{auth:s}=e;return s}),[f,j]=(0,o.useState)(""),A=(0,o.useMemo)(()=>I()(u,e=>{let{name:s}=e;return s.toLowerCase().indexOf(f.toLowerCase())>=0}),[f,u]),T=e=>{m((0,U.Sq)(e));let s=(0,F.Gu)(`portfolio-currency-${e.id}
9`).code||e.defaultCurrency;m((0,U.MN)(s))};if((0,o.useEffect)(()=>{if(void 0!==u&&!g){var e;!u.length&&(e=i.route)&&P.indexOf(e)>=0&&"/new-portfolio"!==i.route&&i.push("/new-portfolio")}},[u]),(0,o.useEffect)(()=>{if(u&&!u.length||void 0===u||g)return;let e=u.find(e=>(N?.userId===b.id||(0,p.E8)())&&e.id===N?.id);e&&(e.isAutoSyncEnabled!==N?.isAutoSyncEnabled||e.trackCashType!==N?.trackCashType||e.syncProvider!==N?.syncProvider||e.syncParam!==N?.syncParam||e.broker!==N?.broker)&&T(e),e||T(u[0])},[u,N,g]),!N)return null;let C=r.Fr||A.length<2;return(0,a.jsx)(v.A,{id:"portfolio-selector",drop:"down",className:"topbar-dropdown",alignRight:!0,autoClose:"outside",children:(0,a.jsxs)("div",{className:"topbar-item",children:[(0,a.jsx)(v.A.Toggle,{title:l("MENU.PORTFOLIO_SELECTOR"),id:"dropdown-toggle-top2",variant:"transparent",className:`btn w-auto btn-dark-50 btn-sm font-weight-bold p-2 ${"mobile"===s?"exclude-dropdown-toggle btn-icon":""}`,children:"mobile"===s?(0,a.jsx)("span",{className:"symbol symbol-25 symbol-light",children:(0,a.jsx)("span",{className:"symbol-label",children:(0,D.Tb)(N,N.broker)})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"broker-symbol mr-2",children:(0,D.Tb)(N,N.broker)}),(0,a.jsx)("span",{className:"top-dropdown-item",children:N.name})]})}),(0,a.jsx)(v.A.Menu,{className:"dropdown-menu dropdown-menu-md dropdown-menu-right",children:(0,a.jsxs)("div",{className:"dropdown-menu-wrapper",children:[u?.length>=8&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{value:f,onChange:e=>{j(e.target.value)},type:"text",placeholder:l("SEARCH_PLACEHOLDER",{ns:"common"}),className:"form-control form-control-sm search-input",name:"search-currency"}),(0,a.jsx)("hr",{className:"py-1 my-0"})]}),(0,a.jsxs)("ul",{className:`navi navi-hover ${H().navi}`,children:[(0,a.jsx)("li",{id:"portfolio-selector-menu",className:H().portfolioList,children:(0,a.jsx)(k(),{options:{wheelPropagation:!1},style:{maxHeight:"60vh",flex:"1",WebkitOverflowScrolling:"touch"},className:`${!t.isRunning?"scroll scroll-dnd-fix":""} ${H().scrollbar}`,children:(0,a.jsx)(M.b,{disableDragging:C,onDragEnd:h,usePortal:!0,items:A,droppableId:"portfolio-selector",draggableId:e=>{let{id:s}=e;return s},portalClassName:"navi",renderItem:(e,s,t)=>{let{isDragging:n}=t;return(0,a.jsx)("div",{className:"navi-item",style:{cursor:"pointer"},children:(0,a.jsx)(L.T,{disableDragging:C,component:v.A.Item,as:"div",className:`navi-link portfolio-select-item py-2 pr-2 ${e.id===N.id?"active":""}`,onClick:()=>T(e),isDragging:n,handleProps:{...s.dragHandleProps},children:(0,a.jsxs)("div",{className:"w-100 d-flex align-items-center justify-content-between",children:[(0,a.jsxs)("div",{className:"d-flex align-items-center portfolio-selector-item",children:[(0,a.jsx)("span",{className:"symbol symbol-25 mr-1 symbol-light mr-2",children:(0,a.jsx)("span",{className:"symbol-label",children:(0,D.Tb)(e,e.broker??"Other")})}),(0,a.jsx)("span",{className:"navi-text top-dropdown-item",title:e.name,children:e.name})]}),(0,a.jsx)("button",{type:"button",onClick:s=>{s.stopPropagation();var t=e.id;let a=`/manage-portfolios#edit-portfolio-${t}`;i.asPath.includes("/manage-portfolios")?window.location.href=a:i.push(a)},title:l("PORTFOLIO_SELECT.EDIT"),className:"btn btn-sm btn-icon btn-link-dark btn-link-hover-primary portfolio-edit-btn",children:(0,a.jsx)("i",{className:"fas fa-cog icon-md text-muted text-hover-primary"})})]})})})}})})}),(0,a.jsx)("li",{className:"navi-separator mt-3 opacity-70"}),(0,a.jsxs)("li",{className:"navi-footer",children:[(0,a.jsxs)(R(),{id:"portfolio-selector-add-portfolio",href:"/new-portfolio",className:"btn btn-light-primary font-weight-bold btn-sm mr-1",children:[(0,a.jsx)("i",{className:"fas fa-plus icon-sm text-primary text-hover-white"}),l("PORTFOLIO_SELECT.ADD_PORTFOLIO")]}),(0,a.jsxs)(R(),{id:"portfolio-selector-my-portfolios",href:"/manage-portfolios",className:"btn btn-light-primary font-weight-bold btn-sm",children:[(0,a.jsx)("i",{className:"fas fa-cog icon-sm text-primary text-hover-white"}),l("PORTFOLIO_SELECT.MY_PORTFOLIOS")]})]})]})]})})]})})}var W=t(61392),K=t(91114),z=t.n(K),V=t(60547),Q=t(60608),Y=t(23141),q=t(24138),X=t(33734),J=t(83602),Z=t(47894),ee=t
9(58726),es=t.n(ee);function et(){let{t:e}=(0,c.B)(["layout","common"]),{discount:s}=(0,Z.rU)();return(0,a.jsx)(R(),{id:"topbar-subscribe",href:"/user-manage-subscription",className:`btn btn-sm font-weight-bold align-self-center bgi-no-repeat bgi-size-cover d-flex justify-content-center align-items-center ${s?"px-5":""} ${es().root}`,style:{background:"linear-gradient(var(--card-bg), var(--card-bg)) padding-box, linear-gradient(to right, var(--sb-primary), var(--sb-info)) border-box",border:"2px solid transparent",backgroundClip:"padding-box, border-box",height:s?44:38},children:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("i",{className:"fas fa-gift text-dark"}),(0,a.jsxs)("div",{className:"text-left",children:[e("USER_TOGGLE.SUBSCRIBE")," ",(0,a.jsx)("div",{className:es().text,children:e("DISCOUNT",{ns:"common",value:100*s})})]})]}):(0,a.jsx)(a.Fragment,{children:e("USER_TOGGLE.SUBSCRIBE")})})}function ea(e){let{user:s}=(0,d.d4)(e=>e.auth),{isDark:t,toggleTheme:n}=(0,J.DP)(),{t:i}=(0,c.B)(["layout","common"]);return(0,o.useEffect)(()=>{g.A.init("kt_quick_notifications")},[]),(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsxs)(v.A,{drop:"down",id:"user-profile-dropdown",alignRight:!0,children:[(0,a.jsx)(v.A.Toggle,{as:C.rI,id:"dropdown-toggle-user-profile",children:(0,a.jsxs)("button",{type:"button",className:"btn btn-dark-50 btn-icon btn-sm position-relative p-0 ml-2",children:[(0,a.jsx)("span",{className:"svg-icon svg-icon-xl",children:(0,a.jsx)(z(),{preProcessor:V.xY,src:(0,T.oK)("/media/svg/icons/General/User.svg?v=1")})}),e.pendingNotifications>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:`notification-top-badge ${e.pendingNotifications>9&&"long-badge"}`,children:e.pendingNotifications>10?(0,a.jsx)(a.Fragment,{children:"9+"}):(0,a.jsx)(a.Fragment,{children:e.pendingNotifications})}),e.pendingNotifications>0&&(0,a.jsx)("span",{className:`notification-top-badge ${e.pendingNotifications>9&&"long-badge"}`,children:e.pendingNotifications>10?(0,a.jsx)(a.Fragment,{children:"9+"}):(0,a.jsx)(a.Fragment,{children:e.pendingNotifications})}),!1]})]})}),(0,a.jsx)(v.A.Menu,{className:"p-0 m-0 dropdown-menu-right dropdown-menu-anim dropdown-menu-top-unround dropdown-menu-lg",children:(0,a.jsxs)("div",{className:"dropdown-menu-wrapper",children:[(0,a.jsxs)("div",{className:"border-bottom pb-2",children:[(0,a.jsx)(R(),{href:"/user-profile",legacyBehavior:!0,children:(0,a.jsxs)("a",{className:"d-flex align-items-center justify-content-between flex-wrap px-8 pt-6 pb-2 roun
9ded-top",children:[(0,a.jsx)("div",{className:"symbol symbol-35 symbol-light mr-3",children:(0,a.jsx)("span",{className:"symbol-label text-primary font-weight-bold font-size-h4",children:(s.displayName||s.email)[0].toUpperCase()})}),(0,a.jsxs)("div",{className:"text-body m-0 flex-grow-1 mr-3",children:[(0,a.jsx)("div",{className:"font-size-lg font-weight-bold",children:s.displayName||s.email}),(0,a.jsx)("span",{className:"text-white",children:(0,a.jsx)("small",{children:function(e,s,t){let n=e?.subscriptionType;if(n==u.Qh.CANCELLED||n==u.Qh.EXPIRED)return(0,a.jsx)(R(),{href:"/user-manage-subscription",id:"user-subscription-expired",children:(0,a.jsx)("span",{children:(0,a.jsx)(Q.A,{variant:"danger",className:"mb-2 mr-2",children:t("SUBSCRIPTION.EXPIRED",{ns:"common"})})})});if(n===u.Qh.TRIAL){let s=new Date(e?.expirationDate);return(0,a.jsx)(R(),{href:"/user-manage-subscription",id:"user-subscription-trial",children:(0,a.jsx)("span",{children:(0,a.jsx)(Q.A,{variant:"info",className:"mb-2 mr-2",children:t("SUBSCRIPTION.TRIAL",{ns:"common",date:s})})})})}if(n===u.Qh.TIER_0||n===u.Qh.TIER_1_OLD||n===u.Qh.TIER_1||n===u.Qh.TIER_2||n===u.Qh.TIER_3)return(0,a.jsx)(R(),{href:"/user-manage-subscription",id:"user-subscription-main",children:(0,a.jsx)("span",{children:(0,a.jsx)(Q.A,{variant:"success",className:"mb-2",children:(0,a.jsx)(Y.x,{i18nKey:`user:${(0,q.gb)(n)}`})})})})}(s,0,i)})})]})]})}),r.Fr&&[u.Qh.CANCELLED,u.Qh.EXPIRED,u.Qh.TRIAL,u.Qh.TIER_0].includes(s?.subscriptionType)&&(0,a.jsx)("div",{className:"px-8 mt-2 mb-4",children:(0,a.jsx)(et,{})})]}),(0,a.jsx)(k(),{options:{wheelPropagation:!1,suppressScrollX:!0},className:"scroll",style:{maxHeight:r.Fr?"400px":"auto",position:"relative"},children:(0,a.jsxs)("div",{className:"navi navi-hover py-2",children:[(0,a.jsx)(R(),{href:"/user-profile",legacyBehavior:!0,children:(0,a.jsx)("a",{className:"navi-item",id:"user-profile-account",children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.ACCOUNT")})})})})}),(0,a.jsx)(R(),{href:"/user-profile#subscription",legacyBehavior:!0,children:(0,a.jsx)("a",{className:"navi-item",id:"user-profile-subscription",children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.SUBSCRIPTION")})})})})}),(0,a.jsx)("a",{id:"user-profile-notifications-link",className:"navi-item",href:void 0,onClick:()=>{if(g.A){let e=g.A.getOffcanvas();e&&(document.dispatchEvent(new MouseEvent("click")),e.show())}},children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsxs)("div",{className:"font-weight-bold d-flex align-items-center",children:[i("USER_TOGGLE.NOTIFICATIONS"),e.pendingNotifications>0&&(0,a.jsx)("span",{className:"ml-2 badge badge-pill badge-danger notification-badge text-white d-inline",children:e.pendingNotifications})]})})})}),(0,p.de)()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"navi-separator my-2"}),(0,a.jsx)(R(),{href:"/sync-accounts",legacyBehavior:!0,children:(0,a.jsx)("a",{className:"navi-item",children:(0,a.jsxs)("div",{className:"navi-link px-8",children:[(0,a.jsx)("div",{className:"navi-icon text-dark",children:(0,a.jsx)(W.A,{})}),(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.MANAGE_BROKERAGE_ACCOUNTS")})})]})})})]}),(0,a.jsx)("div",{className:"navi-separator my-2"}),"mobile"!=e.view&&(0,a.jsx)("a",{id:"user-profile-help",className:"navi-item",href:i("HELP.LINK"),target:"_blank",rel:"noreferrer",children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.HELP")})})})}),"mobile"==e.view&&(0,a.jsx)(R(),{href:"/mobile-about",legacyBehavior:!0,children:(0,a.jsx)("a",{className:"navi-item",children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.HELP")})})})})}),(0,a.jsx)("a",{id:"user-profile-changelog",className:"navi-item",href:"https://help.snowball-analytics.com/changelog",target:"_blank",rel:"noreferrer",children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.CHANGELOG")})})})}),(0,a.jsx)("div",{className:"navi-separator my-2"}),(0,a.jsx)(R(),{href:"/user-profile#display-settings",legacyBehavior:!0,children:(0,a.jsx)("a",{className:"navi-item",id:"user-profile-appearance",children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.DISPLAY_SETTINGS")})})})})}),r.Fr&&(0,a.jsx)("div",{className:"navi-item px-8 pt-2 pb-2",children:(0,a.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,a.jsx)("label",{className:"mb-0 font-weight-bold",children:i("DISPLAY_CURRENCY")}),(0,a.jsx)(f.J,{})]})}),(0,a.jsx)("div",{className:"navi-item px-8 pt-2 pb-2",children:(0,a.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,a.jsx)("label",{className:"mb-0 font-weight-bold",children:i("DARK_MODE")}),(0,a.jsx)(X.A,{isDark:t,onChange:n})]})}),(0,p.de)()&&(0,a.jsx)("a",{id:"user-profile-cookies",className:"navi-item",href:void 0,onClick:()=>{let e=document.getElementById("cookiescript_badge");e&&e.click()},children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsxs)("div",{className:"font-weight-bold",children:[i("COOKIE_SETTINGS")," \uD83C\uDF6A"]})})})}),"mobile"==e.view&&(0,a.jsxs)(a.Fragment,{children:[(0,p.de)()&&(0,a.jsxs)("div",{className:"px-6 mt-2 row align-items-center",children:[r.un&&(0,a.jsx)("div",{className:"col-auto mb-2",children:(0,a.jsx)("a",{href:"https://apps.apple.com/us/app/snowball-analytics/id6463484375?ign-itscg=30200&ign-itsct=apps_box_link",target:"_blank",rel:"noreferrer",children:(0,a.jsx)("img",{src:"/media/app/appstore-analytics.svg",height:40,alt:"Download Snowball Analytics on App Store"})})}),!r.un&&(0,a.jsx)("div",{className:"col-auto mb-2",children:(0,a.jsx)("a",{href:"https://play.google.com/store/apps/details?id=com.snowballanalytics",target:"_blank",rel:"noreferrer",children:(0,a.jsx)("img",{src:"/media/app/google-play-analytics.svg",height:40,alt:"Download Snowball Analytics on Google Play"})})})]}),!(0,p.de)()&&(0,a.jsxs)("div",{className:"px-6 mt-2 row align-items-center",children:[r.un&&(0,a.jsx)("div",{className:"col-auto mb-2",children:(0,a.jsx)("a",{href:"https://apps.apple.com/ru/app/snowball-income/id6462722689?ign-itscg=30200&ign-itsct=apps_box_link",target:"_blank",rel:"noreferrer",children:(0,a.jsx)("img",{src:"/media/app/appstore-income.svg",height:40,alt:"Скачать приложение Snowball Income в App Store"})})}),!r.un&&(0,a.jsx)("div",{className:"col-auto mb-2 pt-1",children:(0,a.jsx)("a",{href:"https://play.google.com/store/apps/details?id=com.snowballincome",target:"_blank",rel:"noreferrer",children:(0,a.jsx)("img",{src:"/media/app/google-play-income.svg",height:40,alt:"Скачать приложение Snowball Income в Google Play"})})}),!r.un&&(0,a.jsx)("div",{className:"col-auto mb-2 pt-1",children:(0,a.jsx)("a",{href:"https://www.rustore.ru/catalog/app/com.snowballincome",target:"_blank",rel:"noreferrer",children:(0,a.jsx)("img",{src:"/media/app/rustore-income.svg",height:40,alt:"Скачать приложение Snowball Income в RuStore"})})})]})]}),(0,a.jsx)("div",{className:"navi-separator my-2"}),(0,a.jsx)(R(),{href:"/logout",legacyBehavior:!0,children:(0,a.jsx)("a",{className:"navi-item",id:"user-profile-logout",children:(0,a.jsx)("div",{className:"navi-link px-8",children:(0,a.jsx)("div",{className:"navi-text",children:(0,a.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.SIGN_OUT")})})})})})]})})]})})]})})}function en(e){let s=(0,N.SL)(),t=(0,o.useMemo)(()=>({offcanvas:"offcanvas"===l().get(s.config,"extras.user.layout")}),[s]);return(0,a.jsx)(a.Fragment,{children:!t.offcanvas&&(0,a.jsx)(ea,{pendingNotifications:e.pendingNotifications,view:e.view})})}var ei=t(77232),el=t(62400);function eo(e){let s=(0,N.SL)(),t=(0,x.Mw)(),i=(0,n.useRouter)(),{t:j}=(0,c.B)("layout"),{user:v}=(0,d.d4)(e=>e.auth),{currentPortfolio:A}=(0,d.d4)(e=>{let{app:s}=e;return{currentPortfolio:s.currentPortfolio}}),{portfolios:T,isAiChatBtnAnimated:C}=(0,d.d4)(e=>{let{ui:s}=e;return{portfolios:s.portfolios??null,isAiChatBtnAnimated:s.isAiChatBtnAnimated??!1}}),E=(0,o.useMemo)(()=>({viewSearchDisplay:l().get(s.config,"extras.search.display"),viewNotificationsDisplay:l().get(s.config,"extras.notifications.display"),viewQuickActionsDisplay:l().get(s.config,"extras.quick-actions.display"),viewCartDisplay:l().get(s.config,"extras.cart.dis
9play"),viewQuickPanelDisplay:l().get(s.config,"extras.quick-panel.display"),viewLanguagesDisplay:l().get(s.config,"extras.languages.display"),viewUserDisplay:l().get(s.config,"extras.user.display")}),[s]),_=v?.onboardingState==="completed";return(0,a.jsxs)("div",{className:"mobile"!==e.view?"topbar":"d-flex align-items-center",children:[_&&A&&v?.showAIChat&&(0,a.jsx)("div",{className:"d-flex align-items-center mr-3",children:(0,a.jsx)(h.zP,{id:"mobile"===e.view||r.Fr?"ai-chat-start-button-mobile":"ai-chat-start-button",allowGuide:"mobile"!==e.view&&!r.Fr,isAnimated:C})}),"mobile"!==e.view&&_&&(0,a.jsx)(b.l8,{id:"add-selector",includeSync:!t.isStarted,view:e.view,currentPortfolio:A,type:b.jC}),(0,a.jsx)(el.l,{isNewPage:!0}),(0,a.jsx)(ei.qS,{id:"topbar-watchlist",title:j("MENU.WATCHLIST"),onClick:()=>{i.push("/watchlists")},showPulse:!1,icon:(0,a.jsx)(m.A,{})}),"mobile"===e.view&&_&&(0,a.jsx)(b.l8,{id:"add-selector-mobile",includeSync:!0,view:e.view,currentPortfolio:A,type:b.qw}),_&&(0,a.jsx)($,{view:e.view,portfolios:T,currentPortfolio:A}),_&&"mobile"!==e.view&&(0,a.jsx)(f.J,{view:e.view}),v?.canChangeLanguage&&(0,a.jsx)(y,{}),E.viewUserDisplay&&!(0,p.E8)()&&(0,a.jsx)(en,{pendingNotifications:e.pendingNotifications,view:e.view}),(0,p.E8)()&&(0,a.jsxs)("button",{type:"button",className:"btn btn-icon btn-clean btn-sm ml-2 position-relative",style:{alignSelf:"center"},onClick:()=>{if(g.A){let e=g.A.getOffcanvas();e&&(document.dispatchEvent(new MouseEvent("click")),e.show())}},children:[e.pendingNotifications>0&&(0,a.jsx)("span",{className:`notification-top-badge ${e.pendingNotifications>9&&"long-badge"}`,children:e.pendingNotifications>10?(0,a.jsx)(a.Fragment,{children:"9+"}):(0,a.jsx)(a.Fragment,{children:e.pendingNotifications})}),(0,a.jsx)("i",{className:`flaticon-bell icon-lg ${e.pendingNotifications>0?"text-primary":""}`})]}),_&&!r.Fr&&[u.Qh.CANCELLED,u.Qh.EXPIRED,u.Qh.TRIAL,u.Qh.TIER_0].includes(v?.subscriptionType)&&!(0,p.E8)()&&(0,a.jsx)("div",{className:"d-flex align-items-center ml-2",id:"topbar-subscribe",children:(0,a.jsx)(et,{discount:20})})]})}},42667:e=>{e.exports={promocode:"TbankPromocode_promocode__foUbh"}},43765:(e,s,t)=>{"use strict";t.d(s,{K$:()=>n,rI:()=>i});var a=t(26514);function n(){return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("ul",{className:"navi navi-hover",children:[(0,a.jsxs)("li",{className:"navi-header font-weight-bold py-5",children:[(0,a.jsx)("span",{className:"font-size-lg",children:"Choose Label:"}),(0,a.jsx)("i",{className:"flaticon2-information icon-md text-muted","data-toggle":"tooltip","data-placement":"right",title:"Click to learn more..."})]}),(0,a.jsx)("li",{className:"navi-separator mb-3 opacity-70"}),(0,a.jsx)("li",{className:"navi-item",children:(0,a.jsx)("a",{href:"#",className:"navi-link",children:(0,a.jsx)("span",{className:"navi-text",children:(0,a.jsx)("span",{className:"label label-xl label-inline label-light-success",children:"Customer"})})})}),(0,a.jsx)("li",{className:"navi-item",children:(0,a.jsx)("a",{href:"#",className:"navi-link",children:(0,a.jsx)("span",{className:"navi-text",children:(0,a.jsx)("span",{className:"label label-xl label-inline label-light-danger",children:"Partner"})})})}),(0,a.jsx)("li",{className:"navi-item",children:(0,a.jsx)("a",{href:"#",className:"navi-link",children:(0,a.jsx)("span",{className:"navi-text",children:(0,a.jsx)("span",{className:"label label-xl label-inline label-light-warning",children:"Suplier"})})})}),(0,a.jsx)("li",{className:"navi-item",children:(0,a.jsx)("a",{href:"#",className:"navi-link",children:(0,a.jsx)("span",{className:"navi-text",children:(0,a.jsx)("span",{className:"label label-xl label-inline label-light-primary",children:"Member"})})})}),(0,a.jsx)("li",{className:"navi-item",children:(0,a.jsx)("a",{href:"#",className:"navi-link",children:(0,a.jsx)("span",{className:"navi-text",children:(0,a.jsx)("span",{className:"label label-xl label-inline label-light-dark",children:"Staff"})})})}),(0,a.jsx)("li",{className:"navi-separator mt-3 opacity-70"}),(0,a.jsx)("li",{className:"navi-footer pt-5 pb-4",children:(0,a.jsxs)("a",{className:"btn btn-clean font-weight-bold btn-sm",href:"#",children:[(0,a.jsx)("i",{className:"ki ki-plus icon-sm"}),"Add new"]})})]})})}let i=t(75834).forwardRef((e,s)=>(0,a.jsx)("div",{ref:s,className:"topbar-item",onClick:s=>{s.preventDefault(),e.onClick(s)},children:e.children}));i.displayName="DropdownTopbarItemToggler"},43803:(e,s,t)=>{"use strict";t.d(s,{dN:()=>n,vq:()=>a});let a={Dividends:1,Coupons:2,Split:3,Spinoff:4,Merge:5,Repayment:6}
9,n=[{value:a.Dividends,label:"TRANSACTION_TYPE.DIVIDEND",name:"Dividends",className:"text-success",icon:""},{value:a.Coupons,label:"TRANSACTION_TYPE.COUPON",name:"Coupons",className:"text-danger",icon:""},{value:a.Split,label:"TRANSACTION_TYPE.SPLIT",name:"Split",className:"text-info",icon:""},{value:a.Spinoff,label:"TRANSACTION_TYPE.SPINOFF",name:"Spinoff",className:"text-success",icon:""},{value:a.Merge,label:"TRANSACTION_TYPE.MERGE",name:"Merge",className:"text-success",icon:""},{value:a.Repayment,label:"TRANSACTION_TYPE.REPAYMENT",name:"Merge",className:"text-success",icon:""}]},44730:e=>{e.exports={form:"EditableString_form__01BVA",input:"EditableString_input__LfUny",text:"EditableString_text__MHnXN"}},46109:(e,s,t)=>{"use strict";t.d(s,{a:()=>h});var a=t(26514),n=t(75834),i=t(89077),l=t(7086),o=t(59757),r=t(63390),c=t(15269),d=t(16926),m=function(e){return e[e.None=0]="None",e[e.Modal=1]="Modal",e[e.SimplePopup=2]="SimplePopup",e[e.SubscriptionPricingPopup=3]="SubscriptionPricingPopup",e}({});function h(e){let{onRead:s}=e,{notification:t,readNotification:h}=(e=>{let{onRead:s}=e,t=(0,o.wA)(),[a,i]=(0,n.useState)(null),[m,h]=(0,n.useState)(!1),u=async function(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h(!0);try{await l.A.post(`${r.EbW}/${e}`,{}),c.Tn(),t((0,d.ot)()),a||i(null),s?.()}catch(e){console.error("Error reading notification:",e)}finally{h(!1)}};return(0,n.useEffect)(()=>{setTimeout(async()=>{try{let e=(await l.A.get(r.cPt)).data;if(!e)return;i(e)}catch(e){console.error("Error fetching notifications:",e)}},1500)},[]),{notification:a,isLoading:m,readNotification:u}})({onRead:s});return t?(0,a.jsxs)(a.Fragment,{children:[t.displayType===m.Modal&&(0,a.jsx)(i.z5,{notification:t,onRead:h}),t.displayType===m.SimplePopup&&(0,a.jsx)(i.EI,{notification:t,onRead:h}),t.displayType===m.SubscriptionPricingPopup&&(0,a.jsx)(i.eh,{onRead:()=>h(t.id,!0)})]}):null}},46694:(e,s,t)=>{"use strict";t.d(s,{Gu:()=>n,Ul:()=>l});let a="-state";function n(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=window.localStorage.getItem(e+a);if(!t)return s;try{let e=JSON.parse(t);return{...s,...e}}catch{return s}}var i=t(75834);function l(e,s){let[t,l]=(0,i.useState)(()=>n(e,s));return(0,i.useEffect)(()=>{window.localStorage.setItem(e+a,JSON.stringify(t))},[e,t]),{localState:t,updateLocalState:e=>{l(s=>({...s,...e}))}}}},46833:(e,s,t)=>{"use strict";t.d(s,{If:()=>c,fk:()=>d});var a=t(33989),n=t(7086),i=t(93760),l=t(36241),o=t(15269),r=t(63390);let c="dashboard-stats";function d(e){let{currency:s,portfolioId:t,reload:d}=e,{t:m}=(0,i.B)("common");return(0,a.I)({queryKey:[c,s,t,d],queryFn:async()=>{try{let{data:e}=await n.A.get(r.rf0,{params:{currency:s,portfolioId:t}});return e}catch(s){let e=`${m("ERROR.FAILED_TO_LOAD_DATA")} 
10`;if(s.response?.status===403){let t=(0,l.g6)(e,s);(0,o.f1)(t)}}}})}t(31108)},46851:(e,s,t)=>{"use strict";t.d(s,{A:()=>d});var a=t(62199),n=t(77488),i=t(69001),l=t.n(i),o=t(75834),r=t(76439),c=["bsPrefix","className","striped","bordered","borderless","hover","size","variant","responsive"];let d=o.forwardRef(function(e,s){var t=e.bsPrefix,i=e.className,d=e.striped,m=e.bordered,h=e.borderless,u=e.hover,p=e.size,x=e.variant,g=e.responsive,N=(0,n.A)(e,c),b=(0,r.oU)(t,"table"),f=l()(i,b,x&&b+"-"+x,p&&b+"-"+p,d&&b+"-striped",m&&b+"-bordered",h&&b+"-borderless",u&&b+"-hover"),j=o.createElement("table",(0,a.A)({},N,{className:f,ref:s}));if(g){var v=b+"-responsive";return"string"==typeof g&&(v=v+"-"+g),o.createElement("div",{className:v},j)}return j})},48889:e=>{e.exports={modalBody:"PromosModal_modalBody__PtLEf",title:"PromosModal_title__5Xzrc"}},49522:(e,s,t)=>{"use strict";t.d(s,{$:()=>d});var a=t(26514);t(75834);var n=t(93760),i=t(80966),l=t(74488),o=t.n(l),r=t(97043),c=t(80338);function d(e){let{children:s,component:t="span",textToCopy:l,textSuccess:d,preventEvents:m=!1,hideDefaults:h=!1,className:u,...p}=e,{t:x}=(0,n.B)("common"),g=l||"string"!=typeof s?l:s;if(!g)return(0,a.jsx)(a.Fragment,{children:s});let N=(0,a.jsxs)(t,{...p,className:`${u??""} ${!h&&o().root} ${!h?"bg-hover-light":""}`,onClick:e=>{m&&(e.preventDefault(),e.stopPropagation()),(0,c.C)(g,d||x("COPY.SUCCESS"))},children:[s,!h&&(0,a.jsx)("i",{className:`${o().icon} far fa-copy`})]});return(0,a.jsx)(a.Fragment,{children:i.Fr||h?N:(0,a.jsx)(r.o,{title:x("COPY.ACTION"),children:N})})}},49942:(e,s,t)=>{"use strict";t.d(s,{c:()=>l});var a=t(26514);t(75834);var n=t(60890),i=t.n(n);function l(e){let{title:s,content:t,buttonProps:n,cardProps:l,bodyProps:o,titleProps:r,contentProps:c,onClose:d}=e;return t||s?(0,a.jsx)("div",{onClick:l?.onClick,className:`card card-custom card-stretch bgi-no-repeat bgi-size-cover gutter-b ${l?.className||""}`,style:l?.style||{},children:(0,a.jsxs)("div",{className:`card-body ${o?.className||""}`,style:o?.style||{},children:[(0,a.jsxs)("div",{className:"mr-2",children:[!!s&&(0,a.jsx)("div",{className:`h4 ${r?.className||""}`,style:r?.style||{},children:s}),!!t&&(0,a.jsx)("div",{className:`mt-2 ${c?.className||""}`,style:{whiteSpace:"pre-wrap",...c?.style},children:(0,a.jsx)(i(),{children:t})})]}),(0,a.jsx)("button",{...n,type:"button",className:`btn btn-primary font-weight-bold ${n?.className||""}`,children:n?.text}),!!d&&(0,a.jsx)("button",{onClick:d,type:"button",className:"btn btn-icon btn-white btn-white-bg btn-sm btn-circle btn-close-card",children:(0,a.jsx)("i",{className:"flaticon2-cross icon-sm text-dark-50"})})]})}):null}},50007:(e,s,t)=>{"use strict";t.d(s,{L:()=>o});var a=t(26514);t(75834);
10var n=t(93760),i=t(51667),l=t.n(i);function o(e){let{type:s,className:t=""}=e,{t:i}=(0,n.B)("common");return(0,a.jsx)("span",{className:`${l().root} ${"text"===s?l().text:l().label} ${t}`,children:i("FEATURE.NEW")})}},50062:(e,s,t)=>{"use strict";t.d(s,{HI:()=>n,Zu:()=>i});var a=t(47115);t(21069);var n=function(e){return e.COMMON="common",e.DIVS="dividend-history",e.FINANCIALS="financials",e.NEWS="news",e.COMMUNITY="community",e.FUND_DATA="fund-data",e}({});function i(e,s){let t=s.type??s.assetType;return(e!==n.DIVS||!![a.PW.BOND,a.PW.STOCK,a.PW.ETF].includes(t))&&(e!==n.FUND_DATA||t===a.PW.ETF)&&(e!==n.FINANCIALS||t===a.PW.STOCK)&&(e!==n.NEWS||"MCX"!==s.exchange)}},50690:e=>{e.exports={searchWithResult:"AssetSearch_searchWithResult__NJNsY",result:"AssetSearch_result__TmNiY"}},50905:e=>{e.exports={modalBody:"TbankModal_modalBody__UOlLt",badge:"TbankModal_badge__tZyGK",content:"TbankModal_content__9Gyq5",title:"TbankModal_title__OUZXa",divider:"TbankModal_divider__xbTnh",steps:"TbankModal_steps__2VccL",step:"TbankModal_step__NTgKT",active:"TbankModal_active__ndkza",completed:"TbankModal_completed__RVSsy",stepNumber:"TbankModal_stepNumber__HeBlK",stepHeader:"TbankModal_stepHeader__uHv7t",stepText:"TbankModal_stepText__rvfMt",stepButton:"TbankModal_stepButton__Oz7U1"}},50996:(e,s,t)=>{"use strict";t.d(s,{o:()=>o,H:()=>c});var a=t(14063),n=t(93760),i=t(15269),l=t(63885);function o(){let{t:e}=(0,n.B)("promos"),{mutateAsync:s,isPending:t}=(0,a.n)({mutationFn:l.Um,onError:s=>{console.error(s),i.f1(e("TBANK.PROMOCODE_CLAIM_ERROR"))}});return{claimPromo:s,isPending:t}}var r=t(33989);function c(){return(0,r.I)({queryKey:["brokerage-dialog-info"],queryFn:l.td,enabled:!1})}},51524:(e,s,t)=>{"use strict";function a(e){return e?`https://snowball-analytics.com/public/portfolios/${e.toLowerCase()}`:""}function n(e){return e?`https://snowball-analytics.com/register/${e}`:""}function i(e){return e?`https://snowball-analytics.com/recap25/${e}`:""}function l(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",{pathname:t=""}=new URL(`https://snowball-analytics.com${s}`);return`https://snowball-analytics.com${t}#comment-${e}`}t.d(s,{$8:()=>l,Gz:()=>n,Kb:()=>i,uJ:()=>a})},51661:e=>{e.exports={root:"PortfolioList_root__hinOR",dragHandle:"PortfolioList_dragHandle__rneT_"}},51667:e=>{e.exports={root:"NewFeatureLabel_root__8VAa0",text:"NewFeatureLabel_text__B9gS1",label:"NewFeatureLabel_label__sWY84"}},51898:e=>{e.exports={welcome:"AiChatWelcome_welcome__AzoPd",title:"AiChatWelcome_title__I9PpK",titleText:"AiChatWelcome_titleText___87RJ",previewBadge:"AiChatWelcome_previewBadge__h2CZb"}},52345:(e,s,t)=>{"use strict";t.d(s,{Uq:()=>c,bH:()=>h,mU:()=>o});var a=t(26514),n=t(81593);t(75834);var i=t(60299),l=t.n(i),o=function(e){return e.VERTICAL_LIST_SORTING="verticalListSorting",e.RECT_SWAPPING="rectSwapping",e.RECT_SORTING="rectSorting",e}({});let r={rectSwapping:n.vl,rectSorting:n.kL,verticalListSorting:n._G};function c(e){let{id:s,strategy:t=o.RECT_SWAPPING,children:i,...r}=e,{attributes:c,listeners:d,setNodeRef:m,transform:h,transition:u,isSorting:p,isDragging:x}=(0,n.gl)({id:s}),g={transform:h?`${t===o.RECT_SWAPPING?`translateX(${h.x}px)`:""} translateY(${h.y}px)`:void 0,transition:p?u:void 0,zIndex:x?9999:void 0},N=`${l().root} ${x?"dragging":""} ${r.className??""}`;return"function"==typeof i?i({ref:m,style:g,attributes:c,listeners:d,className:N,isDragging:x}):(0,a.jsx)("div",{ref:m,style:g,...c,...d,className:N,children:i})}var d=t(32162),m=t(66969);function h(e){let{children:s,items:t,isDisabled:i=!1,onSort:l,strategy:c=o.RECT_SORTING}=e,h=(0,d.FR)((0,d.MS)(d.AN,{activationConstraint:{distance:1}}),(0,d.MS)(d.IG));return(0,a.jsx)(d.Mp,{sensors:h,collisionDetection:d.fp,onDragEnd:e=>{let{active:s,over:a}=e;if(!s?.id||!a?.id)return;let n=t.findIndex(e=>e===s.id),i=t.findIndex(e=>e===a.id);if(n<0||i<0||n===i)return;let r=[];if([o.RECT_SORTING,o.VERTICAL_LIST_SORTING].includes(c)){let e=t.filter(e=>e!==s.id),a=e.slice(0,i),l=e.slice(i,t.length);r.push(...a,t[n],...l)}c===o.RECT_SWAPPING&&(r.push(...t),r[n]=t[i],r[i]=t[n]),l?.(r)},modifiers:[m.gj],children:(0,a.jsx)(n.gB,{items:t,strategy:r[c],modifiers:[m.gj],disabled:i,children:s})})}},52550:e=>{e.exports={root:"QuotesListCompact_root__qCsMU"}},53804:(e,s,t)=>{"use strict";t.d(s,{P:()=>eI});var a=t(26514),n=t(62936),i=t.n(n),l=t(75834),o=t(7086),r=t(24322),c=t.n(r),d=t(46225),m=t(93760),h=t(23141),u=t(91114),p=t.n(u),x=t(31653),g=t(59757),N=t(60547),b=t(55285),f=t(48208),j=t(68827),v=t(48174),A=t(49732),T=t(68208),C=t.n(T),E=t(74170),_=t(64137),y=t(10930);class S extends l.Component{static #e=this.propTypes={onHide:C().func};constructor(e){super(e),this.open=()=>{this.setState({show:!0})},this.close=()=>{this.setState({show:!1}),this.props.onHide&&this.props.onHide()},this.state={show:!1}}componentWillReceiveProps(){}render(){return(0,a.jsx)(E.A,{show:this.state.show,onHide:this.close,size:"md","aria-labelledby":"example-modal-sizes-title-md",children:(0,a.jsxs)(E.A.Body,{children:[(0,a.jsx)("div",{className:"d-flex justify-content-end",children:(0,a.jsx)("button",{type:"button",onClick:this.close,className:"btn btn-clean btn-sm btn-icon",children:(0,a.jsx)("i",{className:"flaticon2-cross icon-nm"})})}),this.state.show&&(0,a.jsx)(y.X,{hide:()=>{this.close()}})]})})}}let I=(0,_.C)("common",{withRef:!0})(S);var O=t(63390),R=t(24138),w=t(61139);function k(){let{t:e}=(0,m.B)(["common","user"]),s=(0,g.wA)(),{user:t}=(0,g.d4)(e=>e.auth),n=l.createRef(null);function i(){n&&n.current&&n.current.open()}return(0,l.useEffect)(()=>
10{if(null!=t){let e=(0,R.sp)(t.subscriptionType),a=(0,R.PN)(t.subscriptionType),n=(0,R.s2)(t.subscriptionType);o.A.get(`${O.kn6}/get-counts`).then(t=>{let{data:l}=t;if(l){if(l.portfoliosCount<=e&&l.holdingsCount<=a&&l.customHoldingsCount<=n)return void s({type:w.QN.StartRefreshAccessToken});i()}}).catch(e=>{console.error(e)})}},[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"alert alert-custom alert-outline-2x alert-outline-warning subscription-danger gutter-b d-flex flex-column align-items-start pt-5 pb-5",role:"alert",children:(0,a.jsxs)("div",{className:"row justify-content-between w-100",children:[(0,a.jsxs)("div",{className:"col-sm-12 col-md-auto d-flex align-items-center",children:[(0,a.jsx)(A.A,{className:"mr-2 d-none d-md-block",src:"/media/svg/icons/Code/Warning-2.svg",color:"warning",size:"2x"}),(0,a.jsx)("span",{children:(0,a.jsx)(h.x,{i18nKey:"user:PAYWALL.LIMITS.EXCEEDED_MESSAGE",components:[(0,a.jsx)(f.o,{className:"alert-link font-weight-bold",href:"/user-manage-subscription"}),(0,a.jsx)(v.q,{isBold:!0,text:(0,b.VQ)()})]})})]}),(0,a.jsx)("div",{className:"col-sm-12 col-md-auto mt-1",children:(0,a.jsx)("button",{type:"button",className:"btn btn-warning font-weight-bold",onClick:i,children:e("BUTTON.RELOAD",{ns:"user"})})})]})}),(0,a.jsx)(I,{ref:n})]})}var L=t(66243),D=t(46109),P=t(83308),M=t(72472),B=t(47115),F=t(17507),U=t(33689),G=t(30377),H=t(54253),$=t(66356),W=t(18150),K=t(19717),z=t(83602),V=t(30985),Q=t(97762),Y=t(60881),q=t.n(Y);let X=l.forwardRef((e,s)=>{let{onClick:t}=e;return(0,a.jsx)("div",{className:"feedback-navbar",children:(0,a.jsx)("div",{className:"feedback-trigger",ref:s,onClick:e=>{e.preventDefault(),t(e)},children:(0,a.jsx)("i",{className:"fas fa-question feedback-icon"})})})});function J(){let{t:e}=(0,m.B)("layout"),s=null,{user:t}=(0,g.d4)(e=>e.auth),n=(0,P.Mw)(),[i,o]=(0,l.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(V.A,{className:"dropdown-inline feedback-dd",alignRight:!0,children:[(0,a.jsx)(V.A.Toggle,{id:"dropdown-toggle-help",as:X}),(0,a.jsxs)(V.A.Menu,{className:"dropdown-menu dropdown-menu-top mb-1",children:[(0,a.jsx)(V.A.Header,{className:"font-weight-bold",children:e("HELP_DIALOG.TITLE")}),n.isEnabled&&(0,a.jsx)(V.A.Item,{as:"div",className:q().tourDropdownItem,children:(0,a.jsx)("button",{type:"button",className:`btn btn-primary font-size-sm btn-md text-uppercase ${q().tourBtn}`,onClick:()=>{o(!0)},children:e("HELP_DIALOG.TOUR")})}),(0,a.jsx)(V.A.Item,{eventKey:"2",onClick:()=>{s&&s.open(t.email)},children:(0,a.jsxs)("span",{children:[(0,a.jsx)("i",{className:"far fa-envelope icon-nm mr-1"})," ",e("HELP_DIALOG.SUPPORT")]})}),(0,a.jsx)(V.A.Item,{eventKey:"1",href:e("HELP.LINK"),className:"",target:"_blank",children:(0,a.jsxs)("span",{children:[(0,a.jsx)("i",{className:"far fa-question-circle icon-nm mr-1 mt-1"})," ",e("FOOTER.FAQ")]})}),(0,b.de)()&&(0,a.jsx)(V.A.Item,{eventKey:"3",href:e("HELP.YOUTUBE.LINK"),target:"_blank",children:(0,a.jsxs)("span",{children:[(0,a.jsx)("i",{className:"fab fa-youtube icon-nm mr-2 mt-1"}),e("HELP_DIALOG.GUIDES")]})}),!(0,b.de)()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(V.A.Divider,{}),(0,a.jsx)(V.A.Header,{className:"font-weight-bold",children:"Telegram"}),(0,a.jsxs)(V.A.Item,{eventKey:"4",href:"https://t.me/snowball_income",className:"",rel:"nofollow",target:"_blank",children:[(0,a.jsx)("i",{className:"fab fa-telegram icon-nm mt-1 mr-2"})," ",e("HELP_DIALOG.TELEGRAM_CHANNEL")]}),(0,a.jsxs)(V.A.Item,{eventKey:"4",href:"https://t.me/longovichok",className:"",rel:"nofollow",target:"_blank",children:[(0,a.jsx)("i",{className:"fas fa-snowman icon-nm mt-1 mr-2"})," ",e("HELP_DIALOG.TELEGRAM_2_CHANNEL")]}),(0,a.jsxs)(V.A.Item,{eventKey:"3",href:"https://t.me/joinchat/imLsaazSSww5NTVi",rel:"nofollow",className:"",target:"_blank",children:[(0,a.jsx)("i",{className:"fab fa-telegram icon-nm mt-1 mr-2"})," ",e("HELP_DIALOG.TELEGRAM_CHAT")]}),(0,a.jsx)(V.A.Divider,{}),(0,a.jsx)(V.A.Header,{className:"font-weight-bold",children:e("HELP_DIALOG.MAX_GROUP")}),(0,a.jsxs)(V.A.Item,{eventKey:"3",href:"",rel:"nofollow",className:"",target:"_blank",children:[(0,a.jsx)(A.A,{size:"sm",color:"none",src:"/media/svg/logos/max-1.svg",className:"mr-2"})," ",e("HELP_DIALOG.MAX_CHAT")]})]})]})]}),(0,a.jsx)(Q.a,{t:e,ref:e=>{s=e}}),(0,a.jsx)(P.rD,{show:i,onHide:()=>{o(!1)}})]})}var Z=t(33523),ee=t(33807);function es(){return(0,a.jsxs)("div",{id:"kt_quick_notifications",className:"offcanvas offcanvas-right pt-5 pb-10",children:[(0,a.jsx)("div",{className:"offcanvas-header d-flex align-items-center justify-content-between mb-10",children:(0,a.jsx)("div",{className:"offcanvas-close mt-n1 pr-5",style:{position:"absolute",top:"15p
10x",right:"10px"},children:(0,a.jsx)("a",{href:void 0,onClick:()=>{let e=ee.A.getOffcanvas();e&&e.hide()},className:"btn btn-xs btn-icon btn-light btn-hover-primary",id:"kt_quick_panel_close",children:(0,a.jsx)("i",{className:"ki ki-close icon-xs text-muted"})})})}),(0,a.jsx)("div",{className:"offcanvas-content px-5",children:(0,a.jsx)(Z.$,{compact:!0})})]})}var et=t(65461),ea=t(81221),en=t(66933);function ei(){let e=new Date().getFullYear(),s=(0,W.SL)(),{t}=(0,m.B)(["layout","common"]),n=(0,l.useMemo)(()=>({footerClasses:s.getClasses("footer",!0),footerContainerClasses:s.getClasses("footer_container",!0)}),[s]);return(0,a.jsxs)("div",{className:`footer main-footer bg-white py-4 d-flex flex-lg-column  ${n.footerClasses}`,id:"kt_footer",children:[(0,a.jsxs)("div",{className:`${n.footerContainerClasses} d-flex flex-column flex-md-row align-items-center justify-content-between`,children:[(0,a.jsxs)("div",{className:"text-dark order-2 order-md-1",children:[(0,a.jsx)("span",{className:"text-muted font-weight-bold mr-2",children:e.toString()})," ","\xa9 ",(0,a.jsx)("span",{className:"text-dark-75",children:(0,b.VQ)()}),!(0,b.de)()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("a",{href:"https://t.me/snowball_income",className:"btn btn-icon btn-link-light",target:"_blank",rel:"noreferrer",children:(0,a.jsx)("i",{className:"fab fa-telegram-plane icon-md text-dark-65"})}),(0,a.jsx)("a",{href:"",className:"btn btn-icon btn-link-light",target:"_blank",rel:"noreferrer",children:(0,a.jsx)(A.A,{size:"md",color:"dark-65",src:"/media/svg/logos/max-1.svg"})}),(0,a.jsx)("a",{href:t("HELP.YOUTUBE.LINK"),rel:"nofollow noreferrer",className:"btn btn-icon btn-link-light",target:"_blank",children:(0,a.jsx)("i",{className:"fab fa-youtube icon-md text-dark-65"})})]}),(0,b.de)()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("a",{href:"https://www.reddit.com/r/Snowball_Analytics",rel:"nofollow noreferrer",className:"btn btn-icon btn-link-light btn-sm ml-2",target:"_blank",children:(0,a.jsx)("i",{className:"fab fa-reddit-alien icon-md text-dark-65"})}),(0,a.jsx)("a",{href:"https://x.com/snowballtracker",rel:"nofollow noreferrer",className:"btn btn-icon btn-link-light btn-sm",target:"_blank",children:(0,a.jsx)("span",{className:"text-dark-65 font-size-lg",children:"\uD835\uDD4F"})}),(0,a.jsx)("a",{href:t("HELP.YOUTUBE.LINK"),rel:"nofollow noreferrer",className:"btn btn-icon btn-link-light",target:"_blank",children:(0,a.jsx)("i",{className:"fab fa-youtube icon-md text-dark-65"})})]})]}),(0,a.jsxs)("div",{className:"nav nav-dark order-1 order-md-2",children:[(0,a.jsx)("a",{href:`mailto:${(0,b.SD)()}`,target:"_blank",rel:"noopener noreferrer",className:"nav-link pr-3 pl-0",children:t("FOOTER.SUPPORT")}),(0,a.jsx)("a",{href:"/docs/Terms.pdf",target:"_blank",className:"nav-link pr-3 pl-0",children:t("FOOTER.TERMS")}),(0,a.jsx)("a",{href:"/docs/PrivacyPolicy.pdf",target:"_blank",className:"nav-link pr-3 pl-0",children:t("FOOTER.PRIVACY_POLICY")}),(0,b.de)()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("a",{href:"/docs/Security.pdf",target:"_blank",className:"nav-link pr-3 pl-0",children:t("FOOTER.SECURITY")}),(0,a.jsx)("a",{href:"/docs/Yodlee.pdf",target:"_blank",className:"nav-link pr-3 pl-0",children:t("FOOTER.YODLEE")})]})]})]}),(0,a.jsx)("div",{className:"pt-5 px-2 px-md-8",children:(0,a.jsx)(en.T,{})})]})}var el=t(13865),eo=t(38550),er=t(28714),ec=t(53317),ed=t(80966),em=t(72596),eh=t(12822),eu=t(16926),ep=t(22871),ex=t(47894);let eg=(0,em.Ay)(el.A)(()=>({})),eN=(0,em.Ay)(eo.A)(()=>({minWidth:0,"& .MuiBottomNavigationAction-label.Mui-selected":{fontSize:"10px",color:"var(--body-color)",fontWeight:"500",textTransform:"none"}}));function eb(){let e=(0,d.useRouter)(),{currentPortfolio:s,user:t,analyticsAsOfDate:n}=(0,g.d4)(e=>{let{app:s,auth:t}=e;return{currentPortfolio:s.currentPortfolio,user:t.user,analyticsAsOfDate:s.analyticsAsOfDate}}),i=(0,ex.iT)(ep.Y.TRAINING),o=(0,g.wA)(),{t:r}=(0,m.B)("layout"),[c,h]=l.useState("dashboard"),[u,x]=l.useState(!1),[f,j]=l.useState(!1),[v,T]=l.useState(!1),[C,E]=l.useState(!1);(0,l.useEffect)(()=>{"/dashboard"===e.pathname||"/manage-portfolios"===e.pathname?h(e.pathname.substr(1)):["/portfolio","/assets","/transactions","/corporate-actions","/div-calendar","/my-goal","/cash","/recap25"].indexOf(e.pathname)>=0?h("portfolio-menu"):["/rebalancing","/top-dividend-stocks","/portfoliolab","/findthedip","/calendars/dividend-calendar","/calendars/ex-dividend-calendar"].indexOf(e.pathname)>=0?h("tool-menu"):["/stats","/stats#common","/stats#diversification","/stats#divs","/stats#growth","/stats#scores","/stats#report","/stats#bonds"].indexOf(e.pathname)>=0?h("stats-menu"):["/public/community","/public/portfolios","/public/popular-assets","/public/blog"].indexOf(e.pathname)>
10=0?h("community-menu"):h(""),x(!1),j(!1),T(!1),E(!1)},[e.asPath]);let _=(e,s)=>{"portfolio-menu"!==s&&"tool-menu"!==s&&"stats-menu"!==s&&"community-menu"!==s&&h(s)},y=function(s){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,H.ZY)(e,s,t)?"menu-item-active":""},S=!!t?.showLearnWithSnowball&&!(0,b.de)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:`footer-mobile ${ed.un&&ed.XF?"footer-mobile-up":""}`,children:(0,a.jsxs)(eg,{value:c,children:[(0,a.jsx)(eN,{id:"mobile-footer-dashboard",onKeyPress:()=>{_("dashboard")},component:eh.k,href:"/dashboard",className:"bottom-nav-icon",value:"dashboard",label:r("MENU.DASHBOARD"),icon:(0,a.jsx)("span",{className:`svg-icon svg-icon-lg ${"dashboard"===c&&"svg-icon-dark"}`,children:(0,a.jsx)(p(),{preProcessor:N.xY,src:(0,H.oK)("/media/svg/icons/Home/Home.svg")})})}),(0,a.jsx)(eN,{id:"mobile-footer-stats",onKeyPress:()=>{_("stats-menu")},component:er.A,onClick:()=>{T(!0),j(!1),x(!1),E(!1)},className:"bottom-nav-icon",value:"stats-menu",label:r("MENU.ANALYTICS"),icon:(0,a.jsx)("span",{className:`svg-icon svg-icon-lg ${"stats-menu"===c&&"svg-icon-dark"}`,children:(0,a.jsx)(p(),{preProcessor:N.xY,src:(0,H.oK)("/media/svg/icons/Shopping/Sort3.svg")})})}),(0,a.jsx)(eN,{id:"mobile-footer-portfolio",onKeyPress:()=>{_("portfolio-menu")},component:er.A,onClick:()=>{x(!0),j(!1),T(!1),E(!1)},className:"bottom-nav-icon",value:"portfolio-menu",label:r("MENU.PORTFOLIO"),icon:(0,a.jsxs)("span",{className:`svg-icon svg-icon-lg ${"portfolio-menu"===c&&"svg-icon-dark"}`,children:[(0,a.jsx)(p(),{preProcessor:N.xY,src:(0,H.oK)("/media/svg/icons/General/portfolio.svg")}),B.or&&(0,a.jsx)("i",{className:"btn-indicator text-primary fas fa-snowflake icon-xs"})]})}),!(0,b.E8)()&&(0,a.jsx)(eN,{id:"mobile-footer-tools",onKeyPress:()=>{_("tool-menu")},component:er.A,onClick:()=>{j(!0),x(!1),T(!1),E(!1)},className:"bottom-nav-icon",value:"tool-menu",label:r("MENU.TOOLS"),icon:(0,a.jsx)("span",{className:`svg-icon svg-icon-lg ${"tool-menu"===c&&"svg-icon-dark"}`,children:(0,a.jsx)(p(),{preProcessor:N.xY,src:(0,H.oK)("/media/svg/icons/Tools/Swiss-knife.svg")})})}),!(0,b.E8)()&&(0,a.jsx)(eN,{id:"mobile-footer-community",onKeyPress:()=>{_("community-menu")},onClick:()=>{E(!0),j(!1),x(!1),T(!1)},component:er.A,className:"bottom-nav-icon",value:"community-menu",label:r("MENU.COMMUNITY"),icon:(0,a.jsx)("span",{className:`svg-icon svg-icon-lg ${"community-menu"===c&&"svg-icon-dark"}`,children:(0,a.jsx)(p(),{preProcessor:N.xY,src:(0,H.oK)("/media/svg/icons/Home/Earth.svg")})})}),S&&!(0,b.E8)()&&(0,a.jsx)(eN,{component:eh.k,href:"https://snowball-income.getcourse.ru/div",className:"bottom-nav-icon",value:"training",target:"_blank",label:r("MENU.TRAINING"),onClick:()=>{o((0,eu.hQ)(ep.Y.TRAINING))},icon:(0,a.jsxs)("span",{className:"svg-icon svg-icon-lg",children:[(0,a.jsx)(p(),{preProcessor:N.xY,src:(0,H.oK)("/media/svg/icons/Home/Education.svg")}),!i.isShown&&(0,a.jsx)("span",{className:"btn-indicator label label-md label-dot label-primary"})]})})]})}),(0,a.jsx)(ec.Ay,{anchor:"bottom",open:v,onClose:()=>{T(!1)},children:(0,a.jsx)("div",{className:"header-menu-mobile",children:(0,a.jsxs)("ul",{className:"menu-nav",children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y(["/stats#common","/stats#","/stats"],!0)}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/stats#common",id:"header-menu-mobile-stats-common",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/portfolio.svg"}),(0,a.jsx)("span",{className:"menu-text",children:r("analytics:TABS.COMMON")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/stats#diversification",!0)}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/stats#diversification",id:"header-menu-mobile-stats-diversification",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/pie.svg"}),(0,a.jsx)("span",{className:"menu-text",children:r("analytics:TABS.DIVERSIFICATION")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/stats#divs",!0)}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/stats#divs",id:"header-menu-mobile-stats-divs",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/Chart-bar2.svg"}),(0,a.jsx)("span",{className:"menu-text",children:r("analytics:TABS.DIVIDENDS")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/stats#growth",!0)}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/stats#growth",id:"header-menu-mobile-stats-growth",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/ship.svg"}),(0,a.jsx)("span",{className:"menu-text",children:r("analytics:TABS.GROWTH")})]})}),(0,a.jsx)("hr",{className:"menu-separator"}),!n&&(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/stats#scores",!0)}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/stats#scores",id:"header-menu-mobile-stats-scores",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Devices/Diagnostics.svg"}),(0,a.jsx)("span",{className:"menu-text",children:r("analytics:TABS.METRICS")})]})}),s?.type==B.N$.TRANSACTIONAL?(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/stats#report",!0)}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/stats#report",id:"header-menu-mobile-stats-report",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/report.svg"}),(0,a.jsx)("span",{className:"menu-text",children:r("analytics:TABS.REPORT")})]})}):null,!(0,b.de)()&&(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/stats#bonds",!0)}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/stats#bonds",id:"header-menu-mobile-stats-bonds",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Files/Selected-file.svg"}),(0,a.jsx)("span",{className:"menu-text",children:r("analytics:TABS.BONDS")})]})})]})})}),(0,a.jsx)(ec.Ay,{anchor:"bottom",open:u,onClose:()=>{x(!1)},children:(0,a.jsx)("div",{className:"header-menu-mobile",children:(0,a.jsxs)("ul",{className:"menu-nav",children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/assets")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/assets",id:"header-menu-mobile-portfolio-assets",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/portfolio.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.ASSETS")})]})}),s?.type==B.N$.TRANSACTIONAL?(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/transactions")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/transactions",id:"header-menu-mobile-portfolio-transactions",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Communication/Clipboard-list.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.TRANSACTIONS")})]})}):null,(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/div-calendar")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/div-calendar",id:"header-menu-mobile-portfolio-div-calendar",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/calendar.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.DIV_CALENDAR")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/my-goal")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/my-goal",id:"header-menu-mobile-portfolio-my-goal",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/goal-m.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.MY_GOAL")})]})}),s?.type==B.N$.TRANSACTIONAL?(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/stats#report")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/stats#report",id:"header-menu-mobile-portfolio-report",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/report.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.REPORT")})]})}):null,B.or&&(0,a.jsx)("li",{className:"recap-link menu-item menu-item-rel",children:(0,a.jsx)(eh.k,{className:"menu-link",href:"/recap25",target:"_blank",id:"header-menu-mobile-portfolio-recap",children:(0,a.jsxs)("span",{className:"menu-text",children:["✨ ",r("MENU.RECAP_25")," ✨"]})})}),(0,a.jsx)("hr",{className:"menu-separator"}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/cash")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/cash",id:"header-menu-mobile-portfolio-cash",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/money2.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.CASH")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/portfolio")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/portfolio",id:"header-menu-mobile-portfolio-categories",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/pie.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.CATEGORIES")})]})}),s?.type==B.N$.TRANSACTIONAL?(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/corporate-actions")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/corporate-actions",id:"header-menu-mobile-portfolio-corporate-actions",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Code/Github.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.CORPORATE_ACTIONS")})]})}):null]})})}),!(0,b.E8)()&&(0,a.jsx)(ec.Ay,{anchor:"bottom",open:f,onClose:()=>{j(!1)},children:(0,a.jsx)("div",{className:"header-menu-mobile",children:(0,a.jsxs)("ul",{className:"menu-nav",children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/rebalancing")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/rebalancing",id:"header-menu-mobile-tools-recommendations",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/Chart-pie.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.REBALANCING")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/top-dividend-stocks")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link align-items-center",href:"/top-dividend-stocks",id:"header-menu-mobile-tools-top-dividend-stocks",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/Star.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.DIVFINDER")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/calendars/dividend-calendar")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link align-items-center",target:"_blank",href:"/calendars/dividend-calendar",id:"header-menu-mobile-tools-dividend-calendar",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/calendar.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.PUBLIC_DIVIDEND_CALENDAR")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/portfoliolab")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link align-items-center",href:"/portfoliolab",id:"header-menu-mobile-tools-portfoliolab",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Home/Bulb1.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.BACKTEST")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/findthedip")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/findthedip",id:"header-menu-mobile-tools-findthedip",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Navigation/Angle-double-down.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.FINDTHEDIP")})]})})]})})}),!(0,b.E8)()&&(0,a.jsx)(ec.Ay,{anchor:"bottom",open:C,onClose:()=>{E(!1)},children:(0,a.jsx)("div",{className:"header-menu-mobile",children:(0,a.jsxs)("ul",{className:"menu-nav",children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/public/community")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-mobile-community-hub",className:"menu-link",href:"/public/community",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Communication/users-01.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.COMMUNITY_HUB")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/public/portfolios")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-mobile-community-portfolios",className:"menu-link",href:"/public/portfolios",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Clothes/briefcase-02.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.PUBLIC_PORTFOLIOS")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/public/popular-assets")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-mobile-community-popular-assets",className:"menu-link",href:"/public/popular-assets",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/stars-01.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.POPULAR_ASSETS")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${y("/public/blog")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-mobile-community-blog",className:"menu-link",href:"/public/blog",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Home/lightbulb-05.svg"}),(0,a.jsx)("span",{className:"menu-text text-dark-75",children:r("MENU.BLOG")})]})})]})})})]})}var ef=t(71497),ej=t(152),ev=t(40945),eA=t(96456),eT=t.n(eA);function eC(e){let{layoutProps:s}=e,t=(0,d.useRouter)(),{t:n}=(0,m.B)(["layout","analytics"]),i=(0,ex.iT)(ep.Y.TRAINING),{currentPortfolio:l,user:o,analyticsAsOfDate:r}=(0,g.d4)(e=>{let{app:s,auth:t}=e;return{currentPortfolio:s.currentPortfolio,user:t.user,analyticsAsOfDate:s.analyticsAsOfDate}}),c=(0,g.wA)(),h=function(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,H.ZY)(t,e,s)?"menu-item-active":""},u=!!o?.showLearnWithSnowball&&!(0,b.de)()&&!(0,b.E8)();return(0,a.jsx)("div",{id:"kt_header_menu",className:`header-menu header-menu-mobile header-menu-layout-default ${s.ktMenuClasses}`,...s.headerMenuAttributes,children:(0,a.jsxs)("ul",{className:`menu-nav ${s.ulClasses}`,children:[null!=l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/dashboard")}`,children:(0,a.jsx)(eh.k,{className:"menu-link",href:"/dashboard",id:"header-menu-dashboard",children:(0,a.jsx)("span",{className:"menu-text",children:n("MENU.DASHBOARD")})})}),(0,a.jsxs)("li",{"data-menu-toggle":"click","aria-haspopup":"true",id:"header-analytics-link",className:`menu-item menu-item-submenu menu-item-rel menu-item-click-hover ${h(["/stats"])}`,children:[(0,a.jsxs)(eh.k,{id:"header-menu-analytics",className:"menu-link menu-toggle",href:"/stats",onClick:()=>{t.push("/stats")},children:[(0,a.jsx)("span",{className:"menu-text",children:n("MENU.ANALYTICS")}),(0,a.jsx)("i",{className:"menu-arrow"})]}),(0,a.jsx)("div",{className:"menu-submenu menu-submenu-classic menu-submenu-left",children:(0,a.jsxs)("ul",{className:"menu-subnav",children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h(["/stats#common","/stats#","/stats"],!0)}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-analytics-common",className:"menu-link",href:"/stats#common",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/portfolio.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("analytics:TABS.COMMON")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/stats#diversification",!0)}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-analytics-diver
10sification",className:"menu-link",href:"/stats#diversification",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/pie.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("analytics:TABS.DIVERSIFICATION")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/stats#divs",!0)}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-analytics-divs",className:"menu-link",href:"/stats#divs",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/Chart-bar2.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("analytics:TABS.DIVIDENDS")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/stats#growth",!0)}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-analytics-growth",className:"menu-link",href:"/stats#growth",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/ship.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("analytics:TABS.GROWTH")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),(0,a.jsx)("hr",{className:"menu-separator"}),!r&&(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/stats#scores",!0)}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-analytics-scores",className:"menu-link",href:"/stats#scores",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Devices/Diagnostics.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("analytics:TABS.METRICS")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),l?.type==B.N$.TRANSACTIONAL?(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/stats#report",!0)}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-analytics-report",className:"menu-link",href:"/stats#report",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/report.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("analytics:TABS.REPORT")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}):null,!(0,b.de)()&&(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/stats#bonds",!0)}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-analytics-bonds",className:"menu-link",href:"/stats#bonds",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Files/Selected-file.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("analytics:TABS.BONDS")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})})]})})]}),(0,a.jsxs)("li",{"data-menu-toggle":"click","aria-haspopup":"true",className:`menu-item menu-item-submenu menu-item-rel menu-item-click-hover ${h(["/portfolio","/assets","/transactions","/corporate-actions","/div-calendar","/my-goal","/cash"])}`,children:[(0,a.jsxs)(eh.k,{id:"header-menu-portfolio",className:"menu-link menu-toggle",href:"/portfolio",children:[(0,a.jsx)("span",{className:"menu-text",children:n("MENU.PORTFOLIO")}),B.or&&(0,a.jsx)("i",{className:"btn-indicator text-primary fas fa-snowflake icon-xs"}),(0,a.jsx)("i",{className:"menu-arrow"})]}),(0,a.jsx)("div",{className:"menu-submenu menu-submenu-classic menu-submenu-left",children:(0,a.jsxs)("ul",{className:"menu-subnav",children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/assets")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-portfolio-assets",className:"menu-link",href:"/assets",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/portfolio.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.ASSETS")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),l?.type==B.N$.TRANSACTIONAL?(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/transactions")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-portfolio-transactions",className:"menu-link",href:"/transactions",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Communication/Clipboard-list.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.TRANSACTIONS")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}):null,(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/div-calendar")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-portfolio-div-calendar",className:"menu-link",href:"/div-calendar",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/calendar.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.DIV_CALENDAR")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/my-goal")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-portfolio-my-goal",className:"menu-link",href:"/my-goal",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/goal-m.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.MY_GOAL")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),B.or&&(0,a.jsx)("li",{className:"recap-link menu-item menu-item-rel",children:(0,a.jsx)(eh.k,{id:"header-menu-portfolio-recap",className:"menu-link",href:"/recap25",target:"_blank",children:(0,a.jsxs)("span",{className:"menu-text",children:["✨ ",n("MENU.RECAP_25")," ✨"]})})}),(0,a.jsx)("hr",{className:"menu-separator"}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/cash")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/cash",id:"header-menu-portfolio-cash",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/money2.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.CASH")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/portfolio")}`,children:(0,a.jsx)(eh.k,{className:"menu-link",href:"/portfolio",id:"header-portfolio-link",children:(0,a.jsxs)("div",{className:"d-flex align-items-center flex-grow-1",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/pie.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.CATEGORIES")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})})}),l?.type==B.N$.TRANSACTIONAL?(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/corporate-actions")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-portfolio-corporate-actions",className:"menu-link",href:"/corporate-actions",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Code/Github.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.CORPORATE_ACTIONS")}),s.rootArrowEnabled&&(0,a.jsx)("i",{className:"menu-arrow"})]})}):null]})})]}),(0,a.jsxs)("li",{"data-menu-toggle":"click","aria-haspopup":"true",className:`menu-item menu-item-submenu menu-item-rel menu-item-click-hover ${h(["/rebalancing","/top-dividend-stocks","/portfoliolab","/findthedip"])}`,children:[(0,a.jsxs)(eh.k,{id:"header-menu-tools",className:"menu-link menu-toggle",href:"/rebalancing",children:[(0,a.jsx)("span",{className:"menu-text",children:n("MENU.TOOLS")}),(0,a.jsx)("i",{className:"menu-arrow"})]}),(0,a.jsx)("div",{className:"menu-submenu menu-submenu-classic menu-submenu-left",children:(0,a.jsxs)("ul",{className:"menu-subnav",children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/rebalancing")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-tools-recommendations",className:"menu-link",href:"/rebalancing",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/Chart-pie.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.REBALANCING")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/top-dividend-stocks")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-tools-top-dividend-stocks",className:"menu-link",href:"/top-dividend-stocks",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/Star.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.DIVFINDER")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/calendars/dividend-calendar")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-tools-dividend-calendar",className:"menu-link",href:"/calendars/dividend-calendar",target:"_blank",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/calendar.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.PUBLIC_DIVIDEND_CALENDAR")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/portfoliolab")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-tools-dividend-portfolio-lab",className:"menu-link",href:"/portfoliolab",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Home/Bulb1.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.BACKTEST")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/findthedip")}`,children:(0,a.jsxs)(eh.k,{id:"header-menu-tools-findthedip",className:"menu-link",href:"/findthedip",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Navigation/Angle-double-down.svg?v=1"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.FINDTHEDIP")})]})})]})})]})]}),!(0,b.E8)()&&(0,a.jsxs)("li",{"data-menu-toggle":"click","aria-haspopup":"true",className:`menu-item menu-item-submenu menu-item-rel menu-item-click-hover ${h(["/public/community","/public/portfolios","/public/popular-assets","/public/blog"])}`,children:[(0,a.jsxs)(eh.k,{className:"menu-link menu-toggle",href:"/public/community",children:[(0,a.jsx)("span",{className:"menu-text",children:n("MENU.COMMUNITY")}),(0,a.jsx)("i",{className:"menu-arrow"})]}),(0,a.jsx)("div",{className:"menu-submenu menu-submenu-classic menu-submenu-left",children:(0,a.jsxs)("ul",{className:"menu-subnav",children:[(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/public/community")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/public/community",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Communication/users-01.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.COMMUNITY_HUB")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/public/portfolios")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/public/portfolios",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Clothes/briefcase-02.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.PUBLIC_PORTFOLIOS")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/public/popular-assets")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/public/popular-assets",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/stars-01.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.POPULAR_ASSETS")})]})}),(0,a.jsx)("li",{className:`menu-item menu-item-rel ${h("/public/blog")}`,children:(0,a.jsxs)(eh.k,{className:"menu-link",href:"/public/blog",children:[(0,a.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Home/lightbulb-05.svg"}),(0,a.jsx)("span",{className:"menu-text",children:n("MENU.BLOG")})]})})]})})]}),!!u&&(0,a.jsx)("li",{className:"menu-item menu-item-rel",children:(0,a.jsxs)(eh.k,{target:"_blank",className:"menu-link",href:"https://snowball-income.getcourse.ru/div",onClick:()=>{c((0,eu.hQ)(ep.Y.TRAINING))},children:[(0,a.jsx)("span",{className:"menu-text",children:n("MENU.TRAINING")}),!i.isShown&&(0,a.jsx)("span",{className:"btn-indicator label label-md label-dot label-primary"})]})})]})})}function eE(){let e,s=(0,W.SL)(),t=(0,g.wA)(),n=(0,l.useMemo)(()=>({config:s.config,ktMenuClasses:s.getClasses("header_menu",!0),rootArrowEnabled:i().get(s.config,"header.menu.self.root-arrow"),menuDesktopToggle:i().get(s.config,"header.menu.desktop.toggle"),headerMenuAttributes:s.getAttributes("header_menu"),headerSelfTheme:i().get(s.config,"header.self.theme"),ulClasses:s.getClasses("header_menu_nav",!0),disabledAsideSelfDisplay:!1===i().get(s.config,"aside.self.dis
10play")}),[s]);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"header-menu-wrapper header-menu-wrapper-left",id:"kt_header_menu_wrapper",children:[n.disabledAsideSelfDisplay&&!(0,b.E8)()&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"header-logo",children:(0,a.jsx)(eT(),{soft:!1,legacyBehavior:!0,href:"/",children:(0,a.jsx)("a",{onClick:function(){t((0,eu.Aj)())},children:(0,a.jsx)("img",{className:"cursor-pointer",alt:"logo",src:(e="symbol.svg",n.headerSelfTheme&&"dark"!==n.headerSelfTheme&&(e="symbol.svg"),(0,H.oK)(`/media/logos/${e}`)),style:{height:"40px"}})})})})}),(0,a.jsx)(eC,{layoutProps:n})]})})}function e_(e){let s=(0,W.SL)(),t=(0,l.useMemo)(()=>({headerClasses:s.getClasses("header",!0),headerAttributes:s.getAttributes("header"),headerContainerClasses:s.getClasses("header_container",!0),menuHeaderDisplay:i().get(s.config,"header.menu.self.display")}),[s]),n=(0,P.Mw)();return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"header header-fixed",id:"kt_header",...t.headerAttributes,children:(0,a.jsxs)("div",{className:` ${t.headerContainerClasses} d-flex align-items-stretch justify-content-between`,children:[(0,a.jsx)(ej.aU,{scrollToTop:!n.isStarted||n.status===P.Ne.PAUSED}),t.menuHeaderDisplay&&(0,a.jsx)(eE,{}),!t.menuHeaderDisplay&&(0,a.jsx)("div",{}),(0,a.jsx)(ev.b,{pendingNotifications:e.pendingNotifications})]})})})}var ey=t(85523),eS=t(37322);function eI(e){let{children:s}=e,t=(0,P.Mw)(),n=(0,W.SL)(),[r,u]=(0,l.useState)(!1),{isDark:v}=(0,z.DP)(),A=(0,d.useRouter)(),{t:T}=(0,m.B)("layout"),{load:C,lastPortfoliosUpdateDate:E}=(0,L.J)(),_=(0,l.useMemo)(()=>({layoutConfig:n.config,selfLayout:i().get(n.config,"self.layout"),asideDisplay:i().get(n.config,"aside.self.display"),subheaderDisplay:i().get(n.config,"subheader.display"),desktopHeaderDisplay:i().get(n.config,"header.self.fixed.desktop"),contentCssClasse
10s:n.getClasses("content",!0),contentContainerClasses:n.getClasses("content_container",!0),contentExtended:i().get(n.config,"content.extended")}),[n]),{user:y}=(0,g.d4)(e=>e.auth),{notificationReload:S=""}=(0,g.d4)(e=>{let{ui:s}=e;return s}),[I,R]=(0,l.useState)(0);async function w(){try{let e=O.ipX,s=(await o.A.get(e)).data;R(s.count)}catch(e){console.error(e)}}return(0,l.useEffect)(()=>{C()},[E]),(0,l.useEffect)(()=>{document.body.classList.contains("body-face")&&document.body.classList.remove("body-face"),!v&&document.body.classList.contains("dark")&&document.body.classList.remove("dark")},[]),(0,l.useEffect)(()=>{y?.exceededLimits&&"/user-manage-subscription"!=A.pathname?u(!0):u(!1)},[A.pathname,y?.exceededLimits]),(0,l.useEffect)(()=>{w()},[S]),"blank"!==_.selfLayout?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c(),{children:(0,a.jsx)("meta",{name:"robots",content:"noindex, nofollow"},"robots")}),(0,a.jsx)($.i,{children:(0,a.jsxs)(x.default,{onSSR:(0,a.jsx)(K.e,{}),children:[(0,a.jsx)(ef.M,{pendingNotifications:I,type:"main"}),(0,a.jsx)("div",{className:"d-flex flex-column flex-root main-layout-content-wrap",children:(0,a.jsx)("div",{className:"d-flex flex-row flex-column-fluid page",children:(0,a.jsxs)("div",{className:"d-flex flex-column flex-row-fluid wrapper",id:"kt_wrapper",children:[(0,a.jsx)(e_,{pendingNotifications:I}),(0,a.jsxs)("div",{id:"kt_content",className:`content ${_.contentCssClasse
10s} d-flex flex-column flex-column-fluid`,children:[_.subheaderDisplay&&(0,a.jsx)(eS.i,{}),!_.contentExtended&&(0,a.jsx)("div",{className:"d-flex flex-column-fluid",children:(0,a.jsxs)("div",{className:_.contentContainerClasses,children:[(y?.subscriptionType===B.Qh.CANCELLED||y?.subscriptionType===B.Qh.EXPIRED)&&(0,a.jsxs)("div",{className:"alert alert-custom alert-light-danger gutter-b d-flex pt-5 pb-5 align-items-center justify-content-between",role:"alert",children:[(0,a.jsxs)("div",{className:"d-flex align-items-center",children:[(0,a.jsx)("span",{className:"svg-icon svg-icon-2x svg-icon-danger mr-4",children:(0,a.jsx)(p(),{preProcessor:N.xY,src:(0,H.oK)("/media/svg/icons/General/Sad.svg?v=1")})}),(0,a.jsxs)("div",{className:"alert-text",children:[T("SUBSCRIPTION_ALERT.HEADER"),"\xa0",(0,a.jsxs)(h.x,{i18nKey:"layout:SUBSCRIPTION_ALERT.MESSAGE",children:[(0,a.jsx)(f.o,{href:"/user-manage-subscription",className:"text-danger font-weight-bold"}),(0,a.jsx)("b",{})]})]})]}),(0,a.jsx)(f.o,{href:"/user-manage-subscription",className:"btn btn-white font-weight-bold",children:T("SUBSCRIPTION_ALERT.PRICING_BTN")})]}),r&&(0,a.jsx)(k,{}),(0,a.jsx)(ea.a,{}),s]})}),_.contentExtended&&{children:s}]}),(0,a.jsx)(ei,{})]})})}),!!y&&(0,a.jsx)(U.n6,{}),(0,a.jsx)(J,{}),y?.onboardingState==="completed"&&(0,a.jsx)(eb,{}),(0,a.jsx)(et.l,{}),(0,a.jsx)(ey.L,{}),(0,a.jsx)(es,{}),!t.isStarted&&(0,a.jsx)(D.a,{}),(0,b.de)()&&(0,a.jsx)(M.$,{}),!(0,b.de)()&&(0,a.jsx)(F.O,{}),y?.onboardingState==="completed"&&y?.showAIChat&&(0,a.jsx)(G.Ws,{}),(0,a.jsx)(j.A,{})]})})]}):(0,a.jsx)("div",{className:"d-flex flex-column flex-root",children:s})}},54892:e=>{e.exports={suggestions:"AiChatSuggestedQuestions_suggestions__qt3W3"}},55681:(e,s,t)=>{"use strict";t.d(s,{k:()=>m});var a=t(26514),n=t(75834),i=t(93760),l=t(8393),o=t(91283),r=t(56964),c=t(15124),d=t(45041);function m(e){let{portfolio:s,result:t,withButton:m,withIcons:h,seeMore:u=!1}=e,{t:p,i18n:{language:x}}=(0,i.B)(["import","common"]),g=n.useRef(null),N=(0,n.useMemo)(()=>{let e=(0,o.LV)(x),s=t?.items?.length>0;return t.syncDate=t.syncDate?new Date(t.syncDate):null,t.items&&(0,c.N)(t.items,e),{hasData:s,item:s?t.items[0]:void 0,...t}},[t]);return(0,a.jsxs)(a.Fragment,{children:[N.hasData&&(0,a.jsxs)(a.Fragment,{children:[!s.isComposite&&(0,a.jsx)(r.P,{data:N.item,isCompact:!0,withIcons:h,seeMore:u}),s.isComposite&&(0,a.jsx)(r.s,{data:N,isCompact:!0,withIcons:h,seeMore:u})]}),m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",className:"btn btn-sm btn-link-dark font-weight-bold mx-2 mt-0",onClick:()=>{g&&g.current&&g.current.showPinModal()},children:[!N.hasData&&(0,a.jsx)(l.A,{fontSize:"sm",sx:{marginRight:"0.2rem"}}),p("LAST_SYNC.UPDATE_DATA_NOW",{ns:"import"})]}),(0,a.jsx)(d.J,{ref:g,portfolioId:s.id,portfolio:s})]})]})}},56103:(e,s,t)=>{"use strict";t.d(s,{J:()=>b,O:()=>N});var a=t(26514),n=t(82056),i=t(58303),l=t(22005),o=t(32491),r=t.n(o),c=t(75119),d=t.n(c),m=t(75834),h=t(93760),u=t(21069),p=t(72732);let x=()=>({popper:{width:"fit-content"}});function g(e){return(0,a.jsx)(i.A,{...e,style:x.popper,placement:"bottom-end"})}function N(e){let{item:s,hideIcon:t}=e;return(0,a.jsxs)("div",{className:"row m-0 asset-info-container",children:[!t&&(0,a.jsx)("div",{className:"col-auto p-0 d-flex align-items-center",children:(0,a.jsx)(u.hz,{logoUrl:s.logoURL,primaryLogoUrl:s.primaryLogoURL,size:"sm"})}),(0,a.jsxs)("div",{className:"col p-0 d-flex align-items-center",children:[(0,a.jsx)("span",{className:"label label-light label-inline font-weight-bold p-1 mr-1",children:s.ticker}),(0,a.jsx)("span",{className:"asset-info-description",children:s.description})]})]})}function b(e){let{t:s}=(0,h.B)(["common"]),[t,i]=(0,m.useState)([]),[o,c]=(0,m.useState)([]),[u,x]=(0,m.useState)(e.listViewType??"full"),b=async()=>{let s=await (0,p.kJ)();i(e.sortCurrencies?e.sortCurrencies(s,e.value):s)};(0,m.useEffect)(()=>{b()},[e.sortCurrencies,e.value]),(0,m.useEffect)(()=>{if("full"!=u){let e=d()(t,3);e.push({value:"",moreItems:!0,name:s("BUTTON.MORE_ITEMS")}),c(e)}else c(t)},[u,t]);let f=t.find(s=>s.value===e.value)||null;return(0,a.jsx)(a.Fragment,{children:t&&t.length>0&&(0,a.jsx)(l.A,{placeholder:e.placeholder??"",disabled:e.disabled??!1,value:f,isOptionEqualToValue:(e,s)=>e.value===s?.value,onChange:(s,t)=>{t&&t.moreItems?x("full"):e.onChange(s,t)},PopperComponent:e.fullWidth?void 0:g,noOptionsText:s("NO_DATA"),options:o,getOptionLabel:s=>s?e.optionDisplay&&"string"==typeof s?`${r()(t,e=>e.value==s)?.ticker} - ${r()(t,e=>e.value==s)?.description}`:e.optionDisplay&&"string"!=typeof s?`${s.ticker} - ${s.description}`:s?.value??s:"",disableClearable:!0,renderOption:(s,t)=>(0,a.jsx)("li",{...s,children:"compact"==e.displayType||t.moreItems?(0,a.jsx)("span",{className:"font-weight-bold",children:t.name??t.value}):(0,a.jsx)(N,{item:t})}),renderInput:s=>(0,a.jsx)(n.A,{variant:"filled",placeholder:e.placeholder??"",...s,className:e.inputClassName})})})}},56277:e=>{e.exports={step:"TbankModalStep_step__7YZqr",active:"TbankModalStep_active___1reo",completed:"TbankModalStep_completed___6gre",stepNumber:"TbankModalStep_stepNumber__zJfw2",stepHeader:"TbankModalStep_stepHeader__4yuV3",stepText:"TbankModalStep_stepText__aJz4V",stepButton:"TbankModalStep_stepButton__kfJHK"}},56964:(e,s,t)=>{"use strict";t.d(s,{P:()=>c,s:()=>d});var a=t(26514);t(75834);var n=t(93760),i=t(46711),l=t(4068),o=t(61392),r=t(97043);function c(e){let{data:s,isCompact:t,withIcons:d,seeMore:m}=e,{t:h}=(0,n.B)(["import","common"]),u=t&&!m?r.o:i.A,p=t&&!m?{title:(0,a.jsx)(c,{data:s,isCompact:!1})}:{component:"div"};return(0,a.jsx)(u,{...p,children:(0,a.jsxs)("div",{className:t?"d-inline-flex align-items-center":"",children:[d&&(0,a.jsx)(a.Fragment,{children:s.success?(0,a.jsx)(o.A,{fontSize:"small",sx:{marginRight:"0.5rem"}}):(0,a.jsx)(l.A,{fontSize:"small",sx:{marginRight:"0.5rem"}})}),(0,a.jsxs)("span",{className:`${t&&!m&&"hoverable-item"}`,children:[h("LAST_SYNC.RESULT.TITLE"),":\xa0",s.success&&t&&(s.syncDateDistance?s.syncDateDistance:h("SIMPLE_DATE",{date:new Date(s.syncDate),ns:"common"})),s.success&&!t&&h("SIMPLE_DATETIME",{date:new Date(s.syncDate),ns:"common"}),!s.success&&h("LAST_SYNC.RESULT.FAILED"),!s.success&&!t&&(0,a.jsxs)(a.Fragment,{children:[","," ",h("SIMPLE_DATETIME",{date:new Date(s.syncDate),ns:"common"})]}),m&&(0,a.jsx)(r.o,{onClickOnly:!0,title:(0,a.jsx)(c,{data:s,isCompact:!1}),children:(0,a.jsx)("a",{href:void 0,className:"text-dark-65 ml-1 cursor-pointer",children:(0,a.jsx)("u",{children:h("SEE_MORE",{ns:"common"})})})})]}),!t&&s.providerSyncDate&&(0,a.jsx)("span",{className:"d-block mt-1",children:h("IMPORT.LAST_BROKERAGE_SYNC_DATE",{date:s.providerSyncDate,ns:"import"})}),!t&&!s.success&&s.errorMessage&&(0,a.jsxs)("span",{className:"d-block mt-1",children:[(0,a.jsx)("span",{className:"label label-sm label-light-warning label-inline mr-2 font-weight-bold",children:h("LAST_SYNC.RESULT.ACTION_REQUIRED")}
10),s.errorMessage]})]})})}function d(e){let{data:s,isCompact:t,withIcons:d,seeMore:m}=e,{t:h}=(0,n.B)(["import","common"]);function u(){return(0,a.jsx)("div",{children:s.items.map(e=>(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("div",{className:"font-weight-bold",children:e.portfolioName}),(0,a.jsx)(c,{data:e,isCompact:!1})]}))})}let p=t&&!m?r.o:i.A,x=t&&!m?{title:(0,a.jsx)(u,{})}:{component:"div"};return(0,a.jsx)(p,{...x,children:(0,a.jsxs)("div",{className:t&&!m&&"d-inline-flex align-items-center",children:[d&&(0,a.jsx)(a.Fragment,{children:s.success?(0,a.jsx)(o.A,{fontSize:"small",sx:{marginRight:"0.5rem"}}):(0,a.jsx)(l.A,{fontSize:"small",sx:{marginRight:"0.5rem"}})}),(0,a.jsxs)("span",{className:!m&&"hoverable-item",children:[h("LAST_SYNC.RESULT.TITLE"),":\xa0",h("LAST_SYNC.RESULT.COMPOSITE_COUNT",{success:s.successCount,total:s.items?.length??0}),m&&(0,a.jsx)(r.o,{onClickOnly:!0,title:(0,a.jsx)(u,{}),children:(0,a.jsx)("a",{href:void 0,className:"text-dark-65 ml-1 cursor-pointer",children:(0,a.jsx)("u",{children:h("SEE_MORE",{ns:"common"})})})})]})]})})}},57108:e=>{e.exports={isDraggingOver:"SortableList_isDraggingOver__BjftJ"}},57326:e=>{e.exports={modalDialog:"PublicModal_modalDialog__W0baW",fullScreen:"PublicModal_fullScreen__KHHRE",modalBody:"PublicModal_modalBody__SAWDF",badge:"PublicModal_badge__LhayI",content:"PublicModal_content__Nqklv",title:"PublicModal_title__nBgvs",divider:"PublicModal_divider__0_WXS",steps:"PublicModal_steps__9sCNZ",step:"PublicModal_step__v_xke",active:"PublicModal_active__sl1Zz",completed:"PublicModal_completed__bhOb0",stepNumber:"PublicModal_stepNumber__YdwyZ",stepHeader:"PublicModal_stepHeader__dbgVY",stepText:"PublicModal_stepText__J_h01",stepButton:"PublicModal_stepButton__PIl1d"}},58485:(e,s,t)=>{"use strict";t.d(s,{$:()=>y});var a=t(26514),n=t(58245),i=t.n(n),l=t(32673),o=t(59757),r=t(75834),c=t(46225),d=t(93760),m=t(23141),h=t(75035),u=t(92978),p=t(50514),x=t(80315),g=t(16926),N=t(23667),b=t(5771),f=t(15269),j=t(61139),v=t(48208),A=t(86939),T=t.n(A);function C(e){let{icon:s,title:t,text:n}=e;return(0,a.jsxs)("div",{className:`d-flex ${T().root}`,children:[(0,a.jsx)("div",{className:"mr-3",children:s}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex-root font-weight-bold font-size-lg mb-1",children:t}),(0,a.jsx)("div",{className:"font-size-sm",children:n})]})]})}var E=t(57326),_=t.n(E);function y(e){let{t:s}=(0,d.B)("promos"),t=(0,c.useRouter)(),{showPublicModal:n}=(0,o.d4)(e=>{let{ui:s}=e;return s}),A=(0,o.wA)(),[T,E]=(0,r.useState)(!1),[y,S]=(0,r.useState)(!1),[I,O]=(0,r.useState)(!1),[R,w]=(0,r.useState)(!1),[k,L]=(0,r.useState)(null),[D,P]=(0,r.useState)(!1),[M,B]=(0,r.useState)(!1),[F,U]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{t.query?.showPubliccomDialog&&A((0,g.C6)(!0))},[t.query]),(0,a.jsx)(x.a,{...e,show:n||e.alwaysVisible,onHide:()=>{A((0,g.C6)(!1))},onShow:()=>{(0,N.XB)(),E(!0),(0,N.td)().then(e=>{let{publiccomSignupUrl:s,signupLinkClicked:t,bonusConditionsMet:a,bonusReceived:n}=e;O(t),w(a&&!n),P(t),B(t&&a),U(n),L(s),E(!1)})},dialogClassName:`${_().modalDialog} ${e.fullScreen?_().fullScreen:""}`,bodyClassName:_().modalBody,title:(0,a.jsx)("div",{className:`pl-4 pl-sm-0 ${_().title}`,children:s("PUBLIC.MODAL.TITLE")}),children:(0,a.jsxs)(l.A,{gap:{xs:3,sm:4},children:[(0,a.jsx)("div",{className:"d-flex d-sm-block justify-content-center",children:(0,a.jsxs)("div",{className:`font-size-lg ${_().badge}`,children:[s("PUBLIC.COLLABORATION_LABEL")," ",(0,a.jsx)(i(),{src:"/media/public-logo.png",alt:"public.com",width:103,height:26})]})}),(0,a.jsxs)(l.A,{gap:1.5,children:[(0,a.jsx)(C,{icon:(0,a.jsx)(p.rW,{}),title:s("PUBLIC.MODAL.FEATURE_1.TITLE"),text:s("PUBLIC.MODAL.FEATURE_1.TEXT")}),(0,a.jsx)(C,{icon:(0,a.jsx)(p.RO,{}),title:s("PUBLIC.MODAL.FEATURE_2.TITLE"),text:s("PUBLIC.MODAL.FEATURE_2.TEXT")}),(0,a.jsx)(C,{icon:(0,a.jsx)(p.yE,{}),title:s("PUBLIC.MODAL.FEATURE_3.TITLE"),text:s("PUBLIC.MODAL.FEATURE_3.TEXT")})]}),(0,a.jsx)("div",{className:_().divider}),(0,a.jsxs)("div",{className:_().content,children:[(0,a.jsx)("div",{className:"font-size-h3 mb-5",style:{fontWeight:"500"},children:s("PUBLIC.MODAL.STEPS.TITLE")}),T&&(0,a.jsx)(b.J,{count:2}),!T&&(0,a.jsxs)("div",{className:_().steps,children:[(0,a.jsxs)("div",{className:`${_().step} ${_().active} ${D?_().completed:""}`,onClick:()=>{(0,N.Rq)(),k&&window.open(k),O(!0)},children:[(0,a.jsxs)("div",{className:_().stepHeader,children:[(0,a.jsx)("div",{className:_().stepNumber,children:D?(0,a.jsx)(u.A,{}):"1"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:`${_().stepText} font-size-lg`,children:s("PUBLIC.MODAL.STEPS_1.TEXT")}),(0,a.jsxs)("div",{className:`${_().stepDescription} font-size-sm`,children:[s("PUBLIC.MODAL.STEPS_1.DESCRIPTION")," ",(0,a.jsx)("br",{})," \uD83D\uDC49"," ",s("PUBLIC.MODAL.STEPS_1_2.TEXT")," ",(0,a.jsx)("br",{}),(0,a.jsx)("br",{}),s("PUBLIC.MODAL.STEPS_1_3.TEXT")]})]})]}),(0,a.jsxs)("button",{type:"button",className:`btn btn-link-primary btn-lg ${_().stepButton}`,children:[s("PUBLIC.MODAL.STEPS_1.BUTTON")," ",(0,a.jsx)(h.A,{})]})]}),(0,a.jsxs)("div",{className:`${_().step} ${I?_().active:""} ${M?_().completed:""}`,onClick:()=>{I&&(0,N.L2)().then(e=>{e&&setTimeout(()=>{window.open(e,"_blank")})})},children:[(0,a.jsxs)("div",{className:_().stepHeader,children:[(0,a.jsx)("div",{className:_().stepNumber,children:M?(0,a.jsx)(u.A,{}):"2"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:`${_().stepText} font-size-lg`,children:s("PUBLIC.MODAL.STEPS_2.TEXT")}),(0,a.jsx)("div",{className:`${_().stepDescription} font-size-sm`,children:s("PUBLIC.MODAL.STEPS_2.DESCRIPTION")})]})]}),(0,a.jsxs)("button",{type:"button",className:`btn btn-link-primary btn-lg ${_().stepButton}`,disabled:!I,children:[s("PUBLIC.MODAL.STEPS_2.BUTTON")," ",(0,a.jsx)(h.A,{})]})]}),(0,a.jsxs)("div",{className:`${_().step} ${R?_().active:""} ${F?_().completed:""}`,onClick:()=>{R&&!y&&(S(!0),(0,N.Dl)().then(()=>{S(!1),f.uT(s("PUBLIC.MODAL.STEPS_3.SUCCESS_MESSAGE")),U(!0),w(!1),A({type:j.QN.StartRefreshAccessToken})}).catch(e=>
10{S(!1),console.error(e),f.f1(s("PUBLIC.MODAL.STEPS_3.ERROR_MESSAGE"))}))},children:[(0,a.jsxs)("div",{className:_().stepHeader,children:[(0,a.jsx)("div",{className:_().stepNumber,children:F?(0,a.jsx)(u.A,{}):"3"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:`${_().stepText} font-size-lg`,children:F?s("PUBLIC.MODAL.STEPS_3.TEXT_COMPLETED"):s("PUBLIC.MODAL.STEPS_3.TEXT")}),(0,a.jsx)("div",{className:`${_().stepDescription} font-size-sm`,children:F?s("PUBLIC.MODAL.STEPS_3.DESCRIPTION_COMPLETED"):s("PUBLIC.MODAL.STEPS_3.DESCRIPTION")})]})]}),!F&&(0,a.jsxs)("button",{type:"button",className:`btn btn-dark btn-lg ${_().stepButton}`,disabled:!R||y,children:["\uD83D\uDD25"," ",y?s("PUBLIC.MODAL.STEPS_3.BUTTON_LOADING"):s("PUBLIC.MODAL.STEPS_3.BUTTON")," ","\uD83D\uDD25"]})]})]})]}),(0,a.jsx)("div",{className:"font-size-xs text-dark-50",children:(0,a.jsx)(m.x,{i18nKey:"promos:PUBLIC.MODAL.NOTE",components:[(0,a.jsx)(v.o,{target:"blank",href:"https://public.com/snowballanalytics"})]})})]})})}},58726:e=>{e.exports={root:"TopbarSubscribeButton_root__5W092",text:"TopbarSubscribeButton_text__zP9MR"}},60299:e=>{e.exports={root:"SortableItem_root__0eOXm"}},60486:e=>{e.exports={message:"AiChatMessage_message__OD_bR",user:"AiChatMessage_user__ybCbK",assistant:"AiChatMessage_assistant__o6_TT",systemMessage:"AiChatMessage_systemMessage__EkAXu",systemLine:"AiChatMessage_systemLine__2PMsB",systemText:"AiChatMessage_systemText__V7vRC",avatar:"AiChatMessage_avatar__ISW_H",messageContent:"AiChatMessage_messageContent__eiy0b",bubble:"AiChatMessage_bubble__Kg5iU",actions:"AiChatMessage_actions__AsBlB",actionIcon:"AiChatMessage_actionIcon__4_JuC",actionBtn:"AiChatMessage_actionBtn__HVupN",active:"AiChatMessage_active__k3iI6",textContent:"AiChatMessage_textContent___1wRu",markdownContent:"AiChatMessage_markdownContent__uvx8_",streamingCursor:"AiChatMessage_streamingCursor__W5xaQ",blink:"AiChatMessage_blink__7rgSZ",thinkingText:"AiChatMessage_thinkingText__j1pXG",thinkingShimmer:"AiChatMessage_thinkingShimmer__O0j_l"}},60488:(e,s,t)=>{"use strict";t.d(s,{Y3:()=>v,zN:()=>f});var a=t(26514),n=t(75834),i=t(93760),l=t(89754),o=t(91394),r=t(24665),c=t(97653),d=t(84075),m=t(7086),h=t(14163),u=t(63390),p=t(15269),x=t(39608),g=t(76510),N=t(36241);let b="internal",f="public",j=e=>({message:"",email:e??""});function v(e){let{email:s,onSaved:t,onDiscard:v,type:A=b}=e,{t:T}=(0,i.B)(["layout","common"]),[C,E]=(0,n.useState)(()=>j(s)),[_,y]=(0,n.useState)([]),[S,I]=(0,n.useState)(!1),O=(0,n.createRef)(null);async function R(e,s){let t=await s.handleVerify();e.setFieldValue("verifyToken",t,!0),e.values.verifyToken=t,e.handleSubmit()}async function w(e,s){I(!0);try{let s=A==b?u.T7U:u.L99,a=new FormData;_.forEach(e=>{a.append("Files",e)}),a.append("message",e.message),a.append("email",e.email),e.verifyToken&&a.append("verifyToken",e.verifyToken),await m.A.post(s,a),t&&t(),p.uT(T("FEEDBACK.SUCCESS"))}catch(e){(0,N.ZC)(e,s)}I(!1)}(0,n.useEffect)(()=>{E(j(s)),y([]),A==b&&O&&O.current&&O.current.focus()},[s]);let k=l.Ik().shape({email:l.Yj().email(T("FEEDBACK.VALIDATION.EMAIL")).min(1,T("FEEDBACK.VALIDATION.EMAIL_MIN")).max(128,T("FEEDBACK.VALIDATION.EMAIL_MAX")).required(T("FEEDBACK.VALIDATION.EMAIL_REQUIRED")),message:l.Yj().min(1,T("FEEDBACK.VALIDATION.MESSAGE_MIN")).max(4096,T("FEEDBACK.VALIDATION.MESSAGE_MAX")).required(T("FEEDBACK.VALIDATION.MESSAGE_REQUIRED"))});return(0,a.jsx)(o.l1,{initialValues:C,validationSchema:k,enableReinitialize:!0,onSubmit:(e,s)=>{w(e,s)},children:e=>(0,a.jsxs)(g.A,{tag:"div",blocking:S,keepInView:!0,children:[(0,a.jsxs)("div",{className:"overlay overlay-block cursor-default",children:[S&&(0,a.jsx)("div",{className:"overlay-layer bg-transparent",children:(0,a.jsx)("div",{className:"spinner spinner-lg spinner-success"})}),(0,a.jsxs)(r.A,{onSubmit:e.handleSubmit,children:[e.errors.general&&(0,a.jsx)(c.A,{variant:"danger",children:e.errors.general}),(0,a.jsxs)(r.A.Group,{children:[(0,a.jsx)(r.A.Label,{children:T("FEEDBACK.EMAIL")}),(0,a.jsx)(r.A.Control,{className:"form-control form-control-solid",size:"lg",type:"text",placeholder:"",onChange:e.handleChange,onBlur:e.handleBlur,value:e.values.email,name:"email"}),e.touched.email&&e.errors.email&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.email})})]}),(0,a.jsxs)(r.A.Group,{children:[(0,a.jsxs)(r.A.Label,{children:[T("FEEDBACK.MESSAGE")," ",(0,a.jsx)("span",{className:"text-danger",children:"*"})]}),(0,a.jsx)(r.A.Control,{as:"textarea",type:"text",rows:3,name:"message",className:"form-control-solid",placeholder:T("FEEDBACK.MESSAGE.PLACEHOLDER"),ref:O,onBlur:e.handleBlur,value:e.values.message,onChange:s=>{e.setFieldValue("message",s.target.value,!0),e.values.message=s.target.value}}),e.touched.message&&e.errors.message&&(0,a.jsx)("div",{className:"fv-plugins-message-container",children:(0,a.jsx)("div",{className:"fv-help-block",children:e.errors.message})})]}),A==b&&(0,a.jsxs)(r.A.Group,{children:[(0,a.jsx)(d.Ay,{maxFiles:5,maxSize:0x3200000,onDrop:e=>(function(e){if(_.length+_.length>5)return void p.f1(T("FEEDBACK.VALIDATION.FILES_MAX"));y(_.concat(e))})(e),children:e=>{let{getRootProps:s,getInputProps:t}=e;return(0,a.jsx)("section",{className:"dropzpone",children:(0,a.jsxs)("div",{...s(),className:"text-center text-muted sm",children:[(0,a.jsx)("input",{...t()}),(0,a.jsx)("span",{children:T("FEEDBACK.FILES")}),(0,a.jsxs)("em",{children:["(",T("FEEDBACK.FILES_DESCRIPTION"),")"]})]})})}}),_.length>0&&(0,a.jsx)("div",{className:"mt-2",children:_.map((e,s)=>(0,a.jsxs)("div",{className:"text-dark-65 font-size-sm d-flex align-items-center",children:[(0,a.jsx)("i",{className:"flaticon-attachment icon-nm mr-2"})," ",(0,a.jsx)("span",{className:"file-name-path d-block",children:e.path}),(0,a.jsx)("button",{type:"button",title:T("FEEDBACK.REMOVE_FILE"),className:"btn btn-sm ml-2 mt-n1 btn-link-secondary",onClick:()=>{_.length>=s&&y(_.filter((e,t)=>
10t!==s))},children:(0,a.jsx)("i",{className:"icon-nm fas fa-times text-dark-50"})})]},e.path))})]}),A==f&&(0,a.jsx)("input",{type:"hidden",name:"verifyToken"})]})]}),(0,a.jsxs)("div",{className:`d-flex align-items-center ${A==b?"justify-content-between":"justify-content-end"}`,children:[A==b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:v,className:"btn btn-light btn-elevate font-weight-bold",children:T("FEEDBACK.DISCARD")}),(0,a.jsx)("button",{type:"submit",onClick:()=>{e.handleSubmit()},disabled:!e.isValid,className:"btn btn-primary font-weight-bold",children:T("FEEDBACK.SEND")})]}),A==f&&(0,a.jsx)(h.G3,{reCaptchaKey:"6Ld87woqAAAAAMifeeg0w2TkhHqkNbOjHDuZiJ5A",children:(0,a.jsx)(x.s,{children:s=>(0,a.jsx)("button",{type:"submit",onClick:()=>{R(e,s)},disabled:!e.isValid,className:"btn btn-primary font-weight-bold",children:T("FEEDBACK.SEND")})})})]})]})})}},60881:e=>{e.exports={tourBtn:"FeedbackDropdown_tourBtn__O_kTa",tourDropdownItem:"FeedbackDropdown_tourDropdownItem__esbQY"}},61481:(e,s,t)=>{"use strict";t.d(s,{I:()=>i});var a=t(26514);t(75834);var n=t(88754);let i=(e,s)=>function(t){let{saveTestResult:i,lastRun:l,runTest:o}=(0,n.H)(s);return(0,a.jsx)(e,{...t,saveTestResult:i,lastRun:l,runTest:o})}},62400:(e,s,t)=>{"use strict";t.d(s,{l:()=>w});var a=t(26514),n=t(75834),i=t(46225),l=t(21069),o=t(30985),r=t(91114),c=t.n(r),d=t(7086),m=t(55971),h=t.n(m),u=t(75119),p=t.n(u),x=t(84580),g=t(71359),N=t(93760),b=t(36241),f=t(15269),j=t(60547),v=t(24163),A=t(47115),T=t(63390),C=t(27188),E=t(77232),_=t(43765),y=t(54253),S=t(90952);let I=[A.PW.STOCK,A.PW.BOND,A.PW.ETF,A.PW.REIT,A.PW.COMMODITY,A.PW.CRYPTO_CURRENCY];function O(e){let{t:s}=(0,N.B)("layout"),[t,i]=(0,n.useState)(()=>(0,C.eM)()),[l,r]=(0,n.useState)(!1),[m,u]=(0,n.useState)(!1),[O,R]=(0,n.useState)(null),[w,k]=(0,n.useState)(""),[L,D]=(0,n.useState)(!1),[P,M]=(0,n.useState)(!1),[B,F]=(0,n.useState)(!1),U=(0,n.useRef)(null),G=()=>{R(null),k(""),r(!1)},H=()=>{if(!O?.length)return;let s=O.filter(e=>{let{type:s}=e;return s!==A.PW.QUOTE});if(s?.length){let[t]=s;e.onSubmitAsset?.(t)}},$=(0,n.useCallback)(h()(e=>(e=>{let t=(0,v.F)();if(!e){R([]),r(!1);return}r(!0),d.A.get(T.NwO,{params:{search:e,assetTypes:I,isSignedIn:t}}).then(e=>{let{data:s=[]}=e;s.length||D(!1),R(p()(s,15))}).catch(e=>{let t=(0,b.g6)(`${s("SEARCH_ASSET.ERROR")}: 
11`,e);f.f1(t),R([]),D(!1)}).finally(()=>{r(!1),u(!0)})})(e),350),[]);(0,n.useEffect)(()=>{"form"==e.type&&U&&U.current&&(U.current.addEventListener("focus",()=>{F(!0)}),U.current.addEventListener("blur",()=>{setTimeout(()=>{F(!1)},120)}))},[]),(0,n.useEffect)(()=>{let s=O&&O.length>0||!w&&t.length>0;s&&"form"==e.type&&!B&&(s=!1),M(s)},[O,t,w,B]),(0,n.useEffect)(()=>{L&&H()},[H,L]),(0,n.useEffect)(()=>{u(!1),$(w)},[w]);let W=(0,a.jsx)(S.q,{isRecent:!w,openInNewTab:e.openBlanc,data:w?O:t,onItemClicked:e=>{G(),e&&(0,C.GK)(e),document.dispatchEvent(new MouseEvent("click"))}});return(0,a.jsxs)(a.Fragment,{children:["form"==e.type&&(0,a.jsx)(g.x,{onClickAway:G,children:(0,a.jsxs)("div",{id:"kt_quick_search_dropdown_inline",style:{minWidth:"350px"},className:`quick-search quick-search-dropdown quick-search-inline-form pt-4 ${P?"quick-search-has-result":""}`,children:[(0,a.jsx)("form",{className:"quick-search-form quick-search-form-inline",children:(0,a.jsxs)("div",{className:"input-group",children:[(0,a.jsx)("div",{className:"input-group-prepend",children:(0,a.jsx)("span",{className:"input-group-text",children:(0,a.jsx)("span",{className:"svg-icon svg-icon-lg mt-n1",children:(0,a.jsx)(c(),{preProcessor:j.xY,src:(0,y.oK)("/media/svg/icons/General/Search.svg?v=1")})})})}),(0,a.jsx)("input",{id:"search_assets_form_input",type:"text",placeholder:s("SEARCH_ASSET.PLACEHOLDER"),value:w,onChange:e=>{k(e.target.value)},ref:U,className:"form-control form-control-solid"}),(0,a.jsx)("div",{className:`input-group-append ${l?"spinner spinner-sm spinner-primary":""}")}`,children:(0,a.jsx)("span",{className:"input-group-text",children:(0,a.jsx)("i",{style:{display:w&&w.length>0&&!l?"flex":"none"},onClick:G,className:"quick-search-close ki ki-close icon-sm text-muted"})})})]})}),P&&(0,a.jsx)("div",{className:"setting-dropdown py-2 px-3 rounded-sm",children:W})]})}),"form"!=e.type&&(0,a.jsxs)(o.A,{alignRight:!0,drop:"down",onToggle:()=>{G(),setTimeout(()=>{U.current&&"form"!=e.type&&U.current.focus()},100),i((0,C.eM)())},id:"kt_quick_search_toggle",children:[(0,a.jsx)(o.A.Toggle,{as:_.rI,children:(0,a.jsx)(E.qS,{icon:(0,a.jsx)(x.A,{style:{marginTop:2}})})}),(0,a.jsx)(o.A.Menu,{className:"dropdown-menu p-0 m-0 dropdown-menu-right dropdown-menu-anim-up dropdown-menu-lg",children:(0,a.jsxs)("div",{id:"kt_quick_search_dropdown",className:`quick-search quick-search-dropdown dropdown-menu-wrapper ${!l&&P?"pb-0":""} ${P?"quick-search-has-result":""}`,children:[(0,a.jsx)("form",{className:"quick-search-form",onSubmit:e=>{e.preventDefault(),(()=>{if(!O?.length&&w&&!m)return D(!0);H()})()},children:(0,a.jsxs)("div",{className:"input-group",children:[(0,a.jsx)("div",{className:"input-group-prepend",children:(0,a.jsx)("span",{className:"input-group-text",children:(0,a.jsx)("span",{className:"svg-icon svg-icon-lg",children:(0,a.jsx)(c(),{preProcessor:j.xY,src:(0,y.oK)("/media/svg/icons/General/Search.svg?v=1")})})})}),(0,a.jsx)("input",{name:"search",type:"text",autoFocus:!0,placeholder:s("SEARCH_ASSET.PLACEHOLDER"),value:w,ref:U,onChange:e=>{k(e.target.value)},className:"form-control"}),(0,a.jsx)("div",{className:`input-group-append ${l?"spinner spinner-sm spinner-primary":""}")}`,children:(0,a.jsx)("span",{className:"input-group-text",children:(0,a.jsx)("i",{style:{display:l&&w&&w.length>0?"none":"flex"},onClick:G,className:"quick-search-close ki ki-close icon-sm text-muted"})})})]})}),!L&&(0,a.jsx)(a.Fragment,{children:W}),!O?.length&&w&&m&&(0,a.jsx)("div",{className:"pt-5 pb-3 px-10 text-dark-50",children:s("SEARCH_ASSET.NOT_FOUND")})]})})]})]})}var R=t(19717);function w(e){let{isNewPage:s=!1}
11=e,t=(0,i.useRouter)(),[o,r]=(0,n.useState)(!1);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(O,{type:"dropdown",openBlanc:s,onSubmitAsset:e=>{if(!e)return;let a=(0,l.A)(e.assetType,e.id,e.ticker,e.exchange,e.currency);if(a){if(s)return void window.open(a,"_blank");r(!0),t.push(a).catch(()=>{r(!1)})}}}),o&&(0,a.jsx)(R.e,{})]})}},62522:e=>{e.exports={limitReachedMessage:"AiChatQuotaNotice_limitReachedMessage__xJUVM",limitReachedCard:"AiChatQuotaNotice_limitReachedCard__B86Sb",limitReachedIcon:"AiChatQuotaNotice_limitReachedIcon__uk9oy",limitReachedBody:"AiChatQuotaNotice_limitReachedBody__wAf9L",limitReachedActionIcon:"AiChatQuotaNotice_limitReachedActionIcon__ag9uz",nearLimitNotice:"AiChatQuotaNotice_nearLimitNotice__1UCY9",nearLimitIcon:"AiChatQuotaNotice_nearLimitIcon__6Fc_0"}},62819:(e,s,t)=>{"use strict";t.d(s,{D:()=>x});var a=t(26514),n=t(75834),i=t(46225),l=t(93760),o=t(60890),r=t.n(o),c=t(80966),d=t(7086),m=t(98337),h=t(63390),u=t(73419),p=t(49942);function x(e){let{data:s=[],portfolioId:t,refreshTriggered:o,onNotificationRead:x}=e,g=(0,i.useRouter)(),[N,b]=(0,n.useState)(!1),{t:f}=(0,l.B)("common"),j=e=>!!e.background?.includes("black-01.svg"),v=e=>!!(e.messageDescription?.includes("\uD83C\uDF85\uD83C\uDFFB")||e.messageDescription?.includes("\uD83C\uDF84")),A=async(e,s)=>{b(!0);try{let t=h.mAR;await d.A.post(`${t}/${e}`,{}),s||(x?.(e),b(!1))}catch{b(!1)}},T=async(e,s)=>{s&&await A(e.id,!0),e.actionLink&&g.push(e.actionLink)},C=async(e,s)=>{e.preventDefault(),e.stopPropagation(),await A(s.id,!1)};return(0,a.jsx)(a.Fragment,{children:s.map((e,s)=>((e,s)=>{let n=`notification-${e.id}-${s}`;switch(e.type){case u.Ep:return(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"card card-custom card-stretch gutter-b",children:(0,a.jsxs)("div",{className:"card-body row d-flex align-items-center justify-content-between",children:[(0,a.jsxs)("div",{className:"mr-2 mb-2 col",children:[(0,a.jsx)("div",{className:"h4",children:e.messageTitle}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(r(),{children:e.messageDescription})})]}),(0,a.jsx)("div",{className:"col-lg-auto col-sm-12",children:(0,a.jsx)("button",{type:"button",onClick:()=>T(e,!1),className:"btn btn-primary font-weight-bold",children:e.actionText||f("BUTTON.SEE_MORE")})})]})})},n);case u.m5:return(0,a.jsx)("div",{children:(0,a.jsx)(m.a,{actions:e.payload,portfolioId:t,onUpdated:o,type:"card"})},n);case u.Pw:case u.Wj:return(0,a.jsx)("div",{children:(e=>{let s=e.actionLink?{backgroundImage:e.background?`url(${e.background})`:"url(/media/svg/illustrations/grad-1.svg)",cursor:"pointer",backgroundPosition:j(e)?"bottom right":"auto",minHeight:j(e)?"200px":"auto"}:{},t=v(e)?{backgroundImage:`url(${v(e)?"/media/svg/illustrations/santa.svg":null})`,backgroundRepeat:"no-repeat",backgroundPosition:c.Fr?"bottom 0px right 0px":"bottom 0px right 45px",backgroundSize:c.Fr?"auto 65%":"auto 85%"}:{},n=j(e)?"text-white":"text-dark-color",i=e.actionLink?n:"",l=e.actionLink?{onClick:()=>T(e,!0),text:f("BUTTON.SEE_MORE"),className:"btn btn-white btn-white-bg font-weight-bold"}:{onClick:()=>A(e.id,!1),text:f("BUTTON.CLOSE"),className:"btn btn-light text-dark font-weight-bold mr-2 mb-2 mb-md-0"};return(0,a.jsx)(p.c,{title:e.messageTitle,content:e.messageDescription,onClose:!!e.actionLink&&(s=>C(s,e)),cardProps:{style:s,onClick:()=>!!e.actionLink&&T(e,!0)},bodyProps:{style:t},titleProps:{className:i},contentProps:{className:i},buttonProps:l})})(e)},n);default:return(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"card card-custom card-stretch bgi-no-repeat bgi-size-cover gutter-b",style:{backgroundImage:"url(/media/bg/bg-6.jpg)"},children:(0,a.jsxs)("div",{className:"card-body d-flex align-items-center justify-content-between",children:[(0,a.jsxs)("div",{className:"mr-2",children:[(0,a.jsx)("div",{className:"text-white h4",children:e.messageTitle}),(0,a.jsx)("div",{className:"text-white mt-2",children:e.messageDescription})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("button",{type:"button",onClick:()=>A(e.id,!1),className:"btn btn-transparent-white font-weight-bold mr-2 mb-2 mb-md-0",disabled:N,children:f("BUTTON.CLOSE")}),e.actionLink&&(0,a.jsx)("button",{type:"button",onClick:()=>T(e,!0),className:"btn btn-white font-weight-bold",disabled:N,children:f("BUTTON.SEE_MORE")})]})]})})},n)}})(e,s))})}},63595:(e,s,t)=>{"use strict";t.d(s,{$:()=>g});var a=t(26514),n=t(93760),i=t(23141),l=t(75834),o=t(13850),r=t(58245),c=t.n(r),d=t(49522),m=t(48208),h=t(10367),u=t(50996),p=t(42667),x=t.n(p);function g(e){let{promocode:s,onPromocodeClaimed:t}=e,{t:r}=(0,n.B)(["promos","common"]),{claimPromo:p,isPending:g}
11=(0,u.o)(),[N,b]=(0,l.useState)(s);(0,l.useEffect)(()=>{b(s)},[s]);let f=async()=>{t(await p(h.l.TBANK))};return(0,a.jsxs)("div",{className:"mb-5 bg-light rounded-lg py-4 px-6",children:[(0,a.jsx)(c(),{src:"/media/logos/tbank.svg",width:40,height:40,alt:"tbank.ru",className:"d-block mb-4"}),(0,a.jsx)("div",{className:"font-weight-bold mb-1",children:r(N?.value?"TBANK.YOUR_PROMOCODE":"TBANK.PROMOCODE_NOT_ASSIGNED")}),N?.value?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-1",children:[(0,a.jsx)("code",{className:`${x().promocode} font-size-h4 font-weight-bolder text-uppercase`,children:N.value}),(0,a.jsx)(d.$,{preventEvents:!0,hideDefaults:!0,textSuccess:r("TBANK.PROMOCODE_COPIED"),textToCopy:N.value,children:(0,a.jsx)("button",{type:"button",className:"ml-2 btn btn-sm btn-link-primary font-weight-bold",children:r("common:BUTTON.COPY")})})]}),(0,a.jsx)("hr",{}),(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsx)(i.x,{i18nKey:"promos:TBANK.PROMOCODE_USAGE_DESCRIPTION"})}),(0,a.jsx)("div",{className:"mt-4 mb-2",children:(0,a.jsxs)(m.o,{href:"https://www.tbank.ru/invest/form/snowball/",target:"_blank",className:"btn btn-link-primary font-weight-bold mr-4",children:[(0,a.jsx)(o.A,{className:"mr-1",fontSize:"small"}),r("TBANK.DOCUMENTS_LINK")]})})]}):(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)("button",{type:"button",className:"btn btn-dark font-weight-bold",onClick:f,disabled:g,children:r(g?"TBANK.PROMOCODE_LOADING":"TBANK.PROMOCODE_CLAIM_BUTTON")})})]})}},63760:(e,s,t)=>{"use strict";t.d(s,{C8:()=>m,Lf:()=>h,ZX:()=>u,g:()=>d,qQ:()=>c});var a=t(26514),n=t(93760);t(75834);var i=t(59226),l=t(52025),o=t.n(l);
11let r={"Channel Islands":{en:"Channel Islands",ru:"Нормандские острова"},"British Virgin Islands":{en:"British Virgin Islands",ru:"Британские Виргинские острова"},"Cayman Islands":{en:"Cayman Islands",ru:"Острова Кайман"},Taiwan:{en:"Taiwan",ru:"Тайвань"},Bulgarian:{en:"Bulgaria",ru:"Болгария"},Tanzania:{en:"Tanzania",ru:"Танзания"},Moldova:{en:"Moldova",ru:"Молдова"},Macedonia:{en:"North Macedonia",ru:"Северная Македония"},Macau:{en:"Macau",ru:"Макао"}};function c(e,s){if("-"==e||!e||"NA"==e||"ETF"==e)return"en"==s?"Other":"Прочее";let a=r[e];if(a)return a[s];window.countriesLocalesSet||(i.registerLocale(t(18201)),i.registerLocale(t(35147)),window.countriesLocalesSet=!0);let n=i.getAlpha2Code(e,"en");n||"United States"!=e||(n="US");let l=null;return n&&(l=i.getName(n,s??"en",{select:"official"})),l??e}function d(e){switch(e){case"Mega":return"MARKET_CAP.MEGA";case"Large":return"MARKET_CAP.LARGE";case"Mid":return"MARKET_CAP.MID";case"Small":return"MARKET_CAP.SMALL";case"Micro":return"MARKET_CAP.MICRO";case"Nano":return"MARKET_CAP.NANO";default:return null}}function m(e){let{name:s}=e,{t}=(0,n.B)("common");return(0,a.jsx)("span",{children:s?t(d(s)):null})}function h(e){if(o()(e))switch(e){case 1:return"BOND_TYPE.GOVERMENT";case 2:return"BOND_TYPE.MUNICIPAL";case 3:return"BOND_TYPE.CORPORATE";case 4:return"BOND_TYPE.IFI";default:return e}switch(e){case"Goverment":return"BOND_TYPE.GOVERMENT";case"Municipal":return"BOND_TYPE.MUNICIPAL";case"Corporate":return"BOND_TYPE.CORPORATE";case"Ifi":return"BOND_TYPE.IFI";default:return e}}function u(e){switch(e){case"short":return"BOND_TERM.SHORT";case"mid":return"BOND_TERM.MID";case"long":return"BOND_TERM.LONG";default:return e}}},63885:(e,s,t)=>{"use strict";t.d(s,{lo:()=>d.l,mE:()=>d.m,Um:()=>c,td:()=>r,LO:()=>l,XB:()=>o});var a=t(7086);let n="/api/external-promocodes";var i=function(e){return e[e.ON_CLOSE_DASHBOARD_NOTIFICATION=`${n}/on-close-dashboard-notification`]="ON_CLOSE_DASHBOARD_NOTIFICATION",e[e.ON_DIALOG_OPENED=`${n}/on-dialog-opened`]="ON_DIALOG_OPENED",e[e.GET_DIALOG_INFO=`${n}/get-dialog-info`]="GET_DIALOG_INFO",e[e.CLAIM_BONUS=`${n}/claim-bonus`]="CLAIM_BONUS",e}({});async function l(){return a.A.post(i.ON_CLOSE_DASHBOARD_NOTIFICATION)}async function o(){return a.A.post(i.ON_DIALOG_OPENED)}async function r(){return a.A.get(i.GET_DIALOG_INFO).then(e=>{let{data:s}=e;return s})}async function c(e){return a.A.post(i.CLAIM_BONUS,{},{params:{type:e}}).then(e=>{let{data:s}=e;return s})}var d=t(10367)},64674:(e,s,t)=>{"use strict";t.d(s,{N:()=>u});var a=t(26514),n=t(93760),i=t(75834),l=t(13850),o=t(58245),r=t.n(o),c=t(6367),d=t(10367),m=t(50996),h=t(48208);function u(e){let{promocode:s,onPromocodeClaimed:t}=e,{t:o}=(0,n.B)(["promos","common"]),{claimPromo:u,isPending:p}=(0,m.o)(),[x,g]=(0,i.useState)(s);(0,i.useEffect)(()=>{g(s)},[s]);let N=async()=>{t(await u(d.l.BCS))};return(0,a.jsxs)("div",{className:"mb-5 bg-light rounded-lg py-4 px-6",children:[(0,a.jsx)(r(),{src:"/media/brokers/bks.svg",width:40,height:40,alt:"bcs.ru",className:"d-block mb-4"}),(0,a.jsx)("div",{className:"font-weight-bold mb-1",children:o(x?.value?"BCS.YOUR_LINK":"BCS.PROMOCODE_NOT_ASSIGNED")}),x?.value?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-1",children:(0,a.jsxs)(h.o,{href:x?.value,className:"btn btn-link-primary font-weight-bold btn-lg",children:[(0,a.jsx)(c.A,{className:"mr-1"})," ",o("BCS.GO_TO")]})}),(0,a.jsx)("hr",{}),(0,a.jsx)("div",{className:"mt-4 mb-2",children:(0,a.jsxs)(h.o,{href:"/docs/bcs-snow-cashback-rules.pdf",target:"_blank",className:"btn btn-link-primary font-weight-bold mr-4",children:[(0,a.jsx)(l.A,{className:"mr-1",fontSize:"small"}),o("BCS.DOCUMENTS_LINK")]})})]}):(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)("button",{type:"button",className:"btn btn-dark font-weight-bold",onClick:N,disabled:p,children:o(p?"BCS.PROMOCODE_LOADING":"BCS.PROMOCODE_CLAIM_BUTTON")})})]})}},65119:(e,s,t)=>{"use strict";t.d(s,{J:()=>v,S:()=>j});var a=t(26514),n=t(30985),i=t(51065),l=t.n(i),o=t(9610),r=t.n(o),c=t(93760),d=t(75834),m=t(33989),h=t(59757),u=t(80966),p=t(47115),x=t(4469),g=t(72732),N=t(56103),b=t(3163);let f="RecentCurrenciesSelected";var j=function(e){return e.Compact="compact",e.Mobile="mobile",e}({});function v(e){let{view:s="compact"}=e,{t}=(0,c.B)("common"),{currency:i,localCurrency:o,recentCurrencies:j,currentPortfolio:v}=(0,h.d4)(e=>{let{app:s}=e;return{...s,currency:s.localCurrency??s.currency}}),A=(0,h.wA)(),{data:T=[]}=(0,m.I)({queryKey:["currencyList"],queryFn:g.kJ}),[C,E]=(0,d.useState)("");(0,d.useEffect)(()=>{let e=(0,x.Gu)(f,{list:[]});e?.list?.length&&(A((0,b.LQ)(e?.list)),(0,x.aF)(f))},[]);let _=(0,d.useMemo)(()=>r()(T,e=>{let{ticker:s,description:t}=e;return s.toLowerCase().indexOf(C.toLowerCase())>=0||t.toLowerCase().indexOf(C.toLowerCase())>=0}),[C,T]),y=p.b5.find(e=>{let{code:s}=e;return s===i})?.symbol??"",{finalCurrencyList:S,finalRecentCurrencyList:I}=(0,d.useMemo)(()=>{let e=[],s=[];return _.forEach(t=>{j.includes(t.code)?s.push(t):e.push(t)}),s.sort((e,s)=>j.indexOf(e.code)-j.indexOf(s.code)),{finalCurrencyList:e,finalRecentCurrencyList:s}},[_,j]);return i?(0,a.jsx)(n.A,{className:"topbar-dropdown",drop:"down",alignRight:!0,children:(0,a.jsxs)("div",{className:"topbar-item",children:[(0,a.jsx)(n.A.Toggle,{id:"dropdown-toggle-top2",variant:"transparent",className:`btn w-auto btn-dark-50 btn-sm font-weight-bold p-2 ${"mobile"===s?"exclude-dropdown-toggle":""}`,children:"mobile"===s?(0,a.jsx)("span",{className:"symbol symbol-25 symbol-light",children:(0,a.jsx)("span",{className:"symbol-label font-weight-bold font-size-xs",children:y})}):(0,a.jsx)(a.Fragment,{children:i})}),(0,a.jsxs)(n.A.Menu,{className:"dropdown-menu dropdown-menu-md dropdown-menu-right",children:[(0,a.jsx)("input",{value:C,onChange:e=>E(e.target.value),type:"text",placeholder:t("SEARCH_PLACEHOLDER"),className:"form-control form-control-sm search-input",n
11ame:"search-currency"}),(0,a.jsx)("hr",{className:"py-1 my-0"}),(0,a.jsx)("ul",{className:"navi navi-hover",children:(0,a.jsxs)(l(),{options:{wheelPropagation:!1},className:"scroll",style:{maxHeight:u.Fr?"250px":"400px",position:"relative"},children:[!!I?.length&&(0,a.jsx)("div",{className:"px-6 mb-1 mt-1",children:(0,a.jsx)("strong",{children:t("RECENT")})}),[...I,...S].map((e,s)=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("li",{className:"navi-item",style:{cursor:"pointer"},children:(0,a.jsx)("div",{className:"navi-link",onClick:()=>(e=>{let{code:s}=e;!o&&v&&(0,x.LZ)(`portfolio-currency-${v.id}`,{code:s}),A((0,b.MN)({currency:s,isLocal:!!o})),document.dispatchEvent(new MouseEvent("click"))})(e),children:(0,a.jsx)(N.O,{hideIcon:!1,item:e})})},e.code),s===I.length-1&&(0,a.jsx)("hr",{})]}))]})})]})]})}):null}},66073:(e,s,t)=>{"use strict";t.d(s,{b:()=>d});var a=t(26514),n=t(87245),i=t(75834),l=t(60851);function o(e){let{children:s,provided:t,snapshot:n,portalClassName:o}=e,r=(0,i.useRef)({}).current;(0,i.useEffect)(()=>{let e=document.createElement("div");return e.style.position="absolute",e.style.pointerEvents="none",e.style.top="0",e.style.width="100%",e.style.height="100%",o&&e.classList.add(o),r.el=e,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[r]);let c=(0,a.jsx)("div",{ref:t.innerRef,...t.draggableProps,children:s});return n.isDragging?(0,l.createPortal)(c,r.el):c}var r=t(57108),c=t.n(r);function d(e){let{droppableId:s,items:t,draggableId:l,renderItem:r,portalClassName:d,onDragEnd:m,rootComponent:h="div",usePortal:u=!1,rootRef:p,calculateRootHeight:x=!0,disableDragging:g=!1}=e,N=(0,i.useRef)();return g?(0,a.jsx)(h,{children:t.map((e,s)=>r(e,{dragHandleProps:{},draggableProps:{},innerRef:null},{isDragging:!1},s))}):(0,a.jsx)(n.JY,{onDragEnd:e=>{let s=p?.current||N?.current;if(s&&x&&setTimeout(()=>{s.style.height="inherit"},0),!e.destination)return;let a=[...t];a.splice(e.destination.index,0,a.splice(e.source.index,1)[0]),m(a)},onBeforeDragStart:()=>{if(!x)return;let e=p?.current||N.current;e&&(e.style.height=`${e.clientHeight}px`)},children:(0,a.jsx)(n.gL,{droppableId:s,children:(e,s)=>{let{isDraggingOver:i}=s;return(0,a.jsx)(h,{ref:s=>{e.innerRef(s),N.current=s},...e.droppableProps,className:i&&c().isDraggingOver,children:t.map((e,s)=>(0,a.jsx)(n.sx,{draggableId:l(e),index:s,children:(t,n)=>(0,a.jsx)(a.Fragment,{children:u?(0,a.jsx)(o,{provided:t,snapshot:n,portalClassName:d,children:r(e,t,n,s)}):r(e,t,n,s)})},l(e)))})}})})}},66773:(e,s,t)=>{"use strict";t.d(s,{BY:()=>a.BY,XE:()=>a.XE,im:()=>a.im});var a=t(79844)},70188:e=>{e.exports={root:"Search_root__2mjho",close:"Search_close__p14P3"}},70326:e=>{e.exports={select:"AiChatPortfolioSelect_select__82xWm",option:"AiChatPortfolioSelect_option__70Mq2",optionName:"AiChatPortfolioSelect_optionName__K_gZD",valueName:"AiChatPortfolioSelect_valueName__Q5X3Q"}},70381:(e,s,t)=>{"use strict";t.d(s,{IZ:()=>i,MP:()=>l,ON:()=>o});var a=t(63390),n=t(7086);async function i(e){let{data:s}=await n.A.put(`${a.kn6}/${e.id}`,{...e});return s}async function l(e,s,t){let{data:i}=await n.A.put(`${a.kn6}/update-portfolio-type/${e.id}`,{...e,type:+s},{params:{force:t}});return i}async function o(e){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{data:t}=await n.A.get(a.WRE,{params:{portfolioId:e,compact:s}});return t}},71497:(e,s,t)=>{"use strict";t.d(s,{M:()=>g});var a=t(26514),n=t(75834),i=t(62936),l=t.n(i),o=t(59757),r=t(16926),c=t(45251),d=t(47894),m=t(54253),h=t(18150),u=t(23426),p=t(40945),x=t(65119);function g(e){let s=(0,h.SL)(),t=(0,d.sc)(),i=(0,o.wA)(),g=(0,n.useMemo)(()=>({headerLogo:s.getStickyLogo(),asideDisplay:l().get(s.config,"aside.self.display"),headerMenuSelfDisplay:("public"!=e.type||!!t)&&!0===l().get(s.config,"header.menu.self.display"),headerMobileCssClasses:s.getClasses("header_mobile",!0),headerMobileAttributes:s.getAttributes("header_mobile")}),[s]);return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{id:"kt_header_mobile",className:"header-mobile align-items-center header-mobile-fixed",...g.headerMobileAttributes,children:[(0,a.jsxs)("div",{className:"d-flex align-items-center",children:["public"==e.type&&!t&&(0,a.jsx)("button",{type:"button",className:"btn p-0 burger-icon burger-icon-left mr-4",id:"kt_header_mobile_toggle",children:(0,a.jsx)("span",{})}),("public"==e.type||"main"==e.type)&&(0,a.jsx)(c.N,{legacyBehavior:!0,href:"/",children:(0,a.jsx)("a",{onClick:function(){i((0,r.Aj)())},children:(0,a.jsx)("img",{alt:"logo",src:(0,m.oK)("/media/logos/symbol.svg"),style:{height:"40px"}})})})]}),(0,a.jsxs)("div",{className:"d-flex align-items-center",children:["main"==e.type&&(0,a.jsx)(p.b,{pendingNotifications:e.pendingNotifications,view:x.S.Mobile}),"public"==e.type&&(0,a.jsx)(u.I,{view:x.S.Mobile})]})]})})}},71582:e=>{e.exports={root:"CurrencyPairImage_root__OcZJb","root-sm":"CurrencyPairImage_root-sm__hQz_S","root-md":"CurrencyPairImage_root-md__W1Z3R"}},72164:(e,s,t)=>{"use strict";t.d(s,{u:()=>x});var a=t(26514),n=t(75834),i=t(68208),l=t.n(i),o=t(74170),r=t(23141),c=t(64137),d=t(152),m=t(76510),h=t(15269),u=t(36241);class p extends n.Component{static #e=this.propTypes={onConfirm:l().func,onHide:l().func,confirmButtonClass:l().string};constructor(e){super(e),this.open=(e,s,t)=>{this.setState({show:!0,title:e,text:s,payload:t??null})},this.close=()=>{this.setState({show:!1,payload:null}),this.props.onHide&&this.props.onHide()},this.confirm=async()=>{this.setState({blocking:!0});try{this.props.onConfirm&&await this.props.onConfirm(this.state.payload),this.close()}catch(s){let e=(0,u.g6)(`${this.props.t("ERROR.CONTACT_SUPPORT",{ns:"common"})}: 
12`,s);h.f1(e)}this.setState({blocking:!1})},this.state={blocking:!1,show:!1,confirmButtonClass:e.confirmButtonClass||"btn-primary",payload:null}}componentWillReceiveProps(){}render(){return(0,a.jsxs)(o.A,{show:this.state.show,onHide:this.close,"aria-labelledby":"example-modal-sizes-title-lg",children:[this.state.blocking&&(0,a.jsx)(d.q3,{}),(0,a.jsx)(o.A.Header,{closeButton:!0,children:(0,a.jsx)(o.A.Title,{id:"example-modal-sizes-title-lg",children:this.state.title})}),(0,a.jsxs)(m.A,{tag:"div",blocking:this.state.blocking,keepInView:!0,children:[(0,a.jsxs)(o.A.Body,{children:[!this.state.blocking&&(0,a.jsx)("span",{children:this.state.text}),this.state.blocking&&(0,a.jsx)("span",{children:(0,a.jsx)(r.x,{i18nKey:"common:CONFIRM_MODAL.WAITING"})})]}),(0,a.jsxs)(o.A.Footer,{children:[(0,a.jsx)("button",{type:"button",onClick:this.close,className:"btn btn-light btn-elevate font-weight-bold",children:(0,a.jsx)(r.x,{i18nKey:"common:BUTTON.DISCARD"})}),(0,a.jsx)("button",{type:"button",onClick:this.confirm,className:`btn btn-elevate ${this.state.confirmButtonClass} font-weight-bold`,children:this.props.confirmButtonText??(0,a.jsx)(r.x,{i18nKey:"common:BUTTON.YES"})})]})]})]})}}let x=(0,c.C)("common",{withRef:!0})(p)},72472:(e,s,t)=>{"use strict";t.d(s,{$:()=>a.$});var a=t(58485)},73311:(e,s,t)=>{"use strict";t.d(s,{r:()=>l});var a=t(26514);t(75834);var n=t(71582),i=t.n(n);function l(e){let{toLogo:s,fromLogo:t,size:n="md"}=e;return(0,a.jsxs)("div",{className:`${i().root} ${i()[`root-${n}`]}`,children:[(0,a.jsx)("img",{src:s}),(0,a.jsx)("img",{src:t})]})}},73419:(e,s,t)=>{"use strict";t.d(s,{Ep:()=>d,Hn:()=>u,Jv:()=>p,PH:()=>l,Pw:()=>m,SE:()=>x,Wf:()=>h,Wj:()=>r,ZN:()=>o,ae:()=>i,bM:()=>n,k7:()=>c,m5:()=>a});let a=4,n=5,i=8,l=6,o=7,r=50,c=99,d=100,m=101,h=201,u=202,p=203,x=204},73822:(e,s,t)=>{"use strict";t.d(s,{c:()=>m});var a=t(26514);t(75834);var n=t(73700),i=t(93760),l=t(59757),o=t(80966),r=t(91283),c=t(55285);
12let d={"en-US":{thousand:",",decimal:".",currencyPrefix:!0},"en-GB":{thousand:",",decimal:".",currencyPrefix:!0},"fr-FR":{thousand:" ",decimal:",",currencyPrefix:!1},"en-CA":{thousand:",",decimal:".",currencyPrefix:!0},"en-IN":{thousand:",",decimal:".",currencyPrefix:!0,thousandsGroupStyle:"lakh"},"ru-RU":{thousand:" ",decimal:",",currencyPrefix:!1}};function m(e){var s;let t,{i18n:{language:m}}=(0,i.B)("common"),{locale:h}=(0,l.d4)(e=>{let{auth:s}=e;return{locale:s?.user?.locale??(0,c.Q_)(m)}},l.bN),u=((s=h)||(s=(0,c.Q_)(m)),null==(t=d[s])&&(t=d[(0,r.Tq)(m)]),t),{thousandSeparator:p,decimalSeparator:x,...g}=e,N=o.un?{type:"text",inputMode:"decimal",onInput:e=>{","===e.nativeEvent.data&&"."===u.decimal&&(e.target.value=e.target.value.replace(/,$/,"."))}}:{};return(0,a.jsx)(n.HG,{thousandSeparator:u.thousand,decimalSeparator:u.decimal,thousandsGroupStyle:u.thousandsGroupStyle,...N,...g})}},74381:e=>{e.exports={drawer:"AiChatDrawer_drawer__Kt5RP",paper:"AiChatDrawer_paper__p90dw",header:"AiChatDrawer_header__dIfTt",title:"AiChatDrawer_title__DSNFb",aiIcon:"AiChatDrawer_aiIcon__yFOY4",previewBadge:"AiChatDrawer_previewBadge___Qi0r",closeButton:"AiChatDrawer_closeButton__IUghg",closeIcon:"AiChatDrawer_closeIcon__J1G4l",body:"AiChatDrawer_body__gioki",chatPanel:"AiChatDrawer_chatPanel__PnMBn",resizeHandle:"AiChatDrawer_resizeHandle__KlZNH"}},74406:e=>{e.exports={root:"QuotesListDefault_root__7T0MW"}},74488:e=>{e.exports={root:"CopyToClipboard_root__XFWh0",icon:"CopyToClipboard_icon__fMzDf"}},75165:(e,s,t)=>{"use strict";t.d(s,{b:()=>m});var a=t(26514);t(75834);var n=t(93760),i=t(59757),l=t(47115),o=t(10140),r=t(55285);let c={[l.K4.IT_IT]:l.K4.DE_DE};function d(e,s){return s!=l.K4.FR_FR&&s!=l.K4.IT_IT&&s!=l.K4.RU_RU&&(s==l.K4.EN_CA||s==l.K4.EN_GB||s==l.K4.EN_US||"ru"!=e)}function m(e){let{i18n:{language:s}}=(0,n.B)("common"),t="ru"===s?"ru":"en",{stealthMode:l,locale:m}=(0,i.d4)(e=>{let{ui:t,auth:a}=e;return{stealthMode:!0===t.stealthMode,locale:a?.user?.locale??(0,r.Q_)(s)}},i.bN);m&&(t=m),c[t]&&(t=c[t]);let h=e.value??0,u=e.currency?e.currency:"USD",p=e.isMoney&&!d(s,m)?(0,o.Qn)(u):null,x=e.isMoney&&d(s,m)?(0,o.Qn)(u):null,g="",N=null,b=null;e.showColors&&h>0?g="text-success":e.showColors&&h<0&&(g="text-danger"),e.precision&&e.precision>=0&&(h=(+h).toFixed(e.precision)),e.symbol&&"sign"===e.symbol?(e.value>0&&(N=(0,a.jsx)(a.Fragment,{children:"+"})),e.value<0&&(N=(0,a.jsx)(a.Fragment,{children:"-"}))):e.symbol&&"triangle"===e.symbol?(e.value>0&&(N=(0,a.jsx)("i",{className:`fas fa-caret-up mr-1 ${g}`})),e.value<0&&(N=(0,a.jsx)("i",{className:`fas fa-caret-down mr-1 ${g}`}))):"brackets"==e.symbol?h<0&&(N="(",b=")"):e.symbol&&(N=e.symbol),!N&&e.value<0&&(N=(0,a.jsx)(a.Fragment,{children:"-"}));let f=e.className??"";e.inLabel&&(f+=" label label-lg label-inline font-weight-bold p-1 mr-1",e.showColors&&h>0?f+=" label-light-success":e.showColors&&h<0?f+=" label-light-danger":f+=" label-light");let j=2*!!e.isMoney,v=e.isMoney||e.isPercent?2:3;return null!=e.precision&&void 0!==e.precision&&(v=e.precision),"auto"==e.precision&&(j=0,v=8),v<j&&(v=j),(0,a.jsxs)(a.Fragment,{children:[!isNaN(h)&&(0,a.jsxs)("span",{style:{whiteSpace:"nowrap"},className:`${g} ${f}`,children:[N,x,!e.ignoreStealth&&(l||e.stealthMode)&&(e.isMoney||e.hideWhenMoneyHidden)?"••••":new Intl.NumberFormat(t,{notation:e.isCompact?"compact":"standard",minimumFractionDigits:j,maximumFractionDigits:v}).format(N?Math.abs(h):h).replace(/\s/g," "),p?(0,a.jsxs)(a.Fragment,{children:["\xa0",p]}):null,e.isPercent?"%":"",b]}),isNaN(h)&&(0,a.jsx)("span",{children:"-"})]})}},75674:(e,s,t)=>{"use strict";t.d(s,{S:()=>l});var a=t(26514);t(75834);var n=t(56277),i=t.n(n);function l(e){let{stepNumber:s,title:t,text:n,button:l}=e;return(0,a.jsxs)("div",{className:`${i().step}`,children:[(0,a.jsxs)("div",{className:i().stepHeader,children:[(0,a.jsx)("div",{className:i().stepNumber,children:s}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:`${i().stepText} font-size-lg`,children:t}),(0,a.jsx)("div",{className:`${i().stepDescription} font-size-sm`,children:n})]})]}),l]})}},75877:(e,s,t)=>{"use strict";t.d(s,{Es:()=>S,jC:()=>y,qw:()=>_,l8:()=>R});var a=t(26514),n=t(46225),i=t(75834),l=t(30985),o=t(93760),r=t(2782),c=t(4068),d=t(61392),m=t(47115),h=t(55681),u=t(13285),p=t(2587),x=t.n(p),g=t(45041);function N(e){let{portfolio:s}=e,{t}=(0,o.B)(["import"]),n=i.useRef(null),{data:l,isLoading:p}=(0,u.F)({portfolioId:s.id});return(0,a.jsxs)("div",{className:`rounded-xl p-4 ${x().root} ${x().block}`,children:[(0,a.jsxs)("div",{className:"font-weight-bold",children:[l?.success?(0,a.jsx)(d.A,{sx:{marginRight:"0.5rem"}}):(0,a.jsx)(c.A,{sx:{marginRight:"0.5rem"}}),t(s.syncProvider==m.nK.YODLEE||s.syncProvider==m.nK.SNAPTRADE||s.syncProvider==m.nK.PLAID?"IMPORT.API.YODLEE":s.isComposite?"IMPORT.API.INTEGRATION_MULTIPLE":"IMPORT.API.INTEGRATION",{ns:"import"})," ",(s.broker==m.eC.TINKOFF||s.broker==m.eC.BINANCE||s.broker==m.eC.JETLEND||s.broker==m.eC.FINAM||s.broker==m.eC.BKS)&&(0,a.jsxs)(a.Fragment,{children:[s.broker," API"]})]}),(0,a.jsxs)("div",{className:"text-dark-50 font-size-sm",children:[p&&(0,a.jsx)(r.A,{variant:"text",sx:{fontSize:"1.5rem"}}),!p&&l&&(0,a.jsx)(h.k,{result:l,portfolio:s,withButton:!1,withIcons:!1,seeMore:!0})]}),(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("button",{type:"button",className:"btn btn-sm btn-white btn-white-color shadow-sm font-weight-bold",onClick:()=>{n&&n.current&&n.current.showPinModal()},children:t("LAST_SYNC.UPDATE_DATA_NOW",{ns:"import"})}),(0,a.jsx)(g.J,{ref:n,portfolioId:s.id,portfolio:s})]})]})}var b=t(55285),f=t(49732),j=t(4469),v=t(67614),A=t(50514),T=t(77232);let C="AddActionsSelector",E={showPulse:!1},_="topbar",y="inline",S="compact",I=(0,i.forwardRef)((e,s)=>{let{t}=(0,o.B)("layout"),[n,l]=(0,i.useState)(E);(0,i.useEffect)(()=>
12{l(j.Gu(C,E))},[]);let r=(()=>{switch(e.toggleType){case y:return T.AB;case S:return T.uz;default:return T.qS}})(e.type);return(0,a.jsx)(r,{ref:s,title:t("MENU.QUICK_ACTIONS.ADD"),onClick:s=>{s.preventDefault(),function(){if(n.showPulse){let e={...n};e.showPulse=!1,l(e),j.LZ(C,e)}e.afterToggle&&e.afterToggle()}(),e.onClick(s)},showPulse:n.showPulse,icon:e.showActiveSync?"/media/svg/icons/General/sync-plus.svg":"/media/svg/icons/Code/Plus.svg"})});function O(e){return(0,a.jsxs)(l.A.Item,{id:e.id,className:"dropdown-item font-weight-bold",as:"button",onClick:e.onClick,children:[e.icon&&(0,a.jsx)(f.A,{className:"mt-n1 mr-3",size:"sm",color:"none",src:i.isValidElement(e.icon)?e.icon:`/media/svg/icons/${e.icon}`})," ",e.text]})}function R(e){let{id:s,currentPortfolio:t,includeSync:r,type:c=_}=e,{t:d}=(0,o.B)(["layout","import"]),[h,u]=(0,i.useState)(c===S),p=(0,n.useRouter)();function x(e){document.dispatchEvent(new MouseEvent("click")),p.push(e)}return(0,a.jsx)(a.Fragment,{children:t&&(0,a.jsxs)(l.A,{id:s,className:"align-items-stretch",drop:"down",alignRightc:!0,children:[(0,a.jsx)(l.A.Toggle,{toggleType:c,showActiveSync:t.isAutoSyncEnabled,as:I,id:"dropdown-toggle-quick-actions-subheader"}),(0,a.jsx)(l.A.Menu,{className:"dropdown-menu dropdown-menu-md dropdown-menu-right dropdown-menu-anim quick-actions-dd",children:(0,a.jsxs)("div",{className:"dropdown-menu-wrapper",children:[r&&t.isAutoSyncEnabled&&(0,a.jsxs)(a.Fragment,{children:[(0,b.de)()&&(0,a.jsx)(l.A.Header,{className:"dropdown-header text-muted font-weight-bold",children:d("HOLDINGS.ADD.SYNC_HEADER")}),(0,a.jsx)("div",{className:"mx-3 my-1",children:(0,a.jsx)(N,{portfolio:t})}),(0,b.de)()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(O,{id:"add-selector-sync-accounts",onClick:()=>{x("/sync-accounts")},text:d("QUICK_ACTIONS.MANAGE_SYNC_ACCOUNTS"),icon:(0,a.jsx)(A.Ze,{})}),(0,a.jsx)(l.A.Divider,{className:"dropdown-divider"})]})]}),(0,a.jsx)(l.A.Header,{className:"dropdown-header text-muted font-weight-bold",children:d("HOLDINGS.ADD.HEADER")}),(!t.isComposite&&t.type!=m.N$.HOLDINGS||t.isComposite)&&(0,a.jsx)(O,{id:"add-selector-new-transaction",onClick:()=>{x("/transactions#add-tran")},text:d("QUICK_ACTIONS.NEW_TRANSACTION"),icon:(0,a.jsx)(A.c1,{})}),(!t.isComposite&&t.type!=m.N$.HOLDINGS||t.isComposite)&&(0,a.jsx)(O,{id:"add-selector-new-div",onClick:()=>{x("/transactions#add-div")},text:d("QUICK_ACTIONS.NEW_DIV"),icon:(0,a.jsx)(A.c1,{})}),!t.isComposite&&t.type!=m.N$.HOLDINGS&&(0,a.jsx)(O,{id:"add-selector-import-transactions",onClick:()=>{x("/import-transactions")},text:d("QUICK_ACTIONS.UPLOAD_REPORT_2"),icon:(0,a.jsx)(A.z5,{})}),!t.isComposite&&t.type==m.N$.HOLDINGS&&(0,a.jsx)(O,{id:"add-selector-new-asset",onClick:()=>{x("/assets#add")},text:d("QUICK_ACTIONS.ADD_HOLDING"),icon:(0,a.jsx)(A.c1,{})}),!t.isComposite&&t.type==m.N$.HOLDINGS&&(0,a.jsx)(O,{id:"add-selector-edit-holdings",onClick:()=>{x("/edit-holdings")},text:d("QUICK_ACTIONS.EDIT_HOLDINGS"),icon:(0,a.jsx)(A.qU,{})}),!t.isComposite&&(0,a.jsx)(O,{id:"add-selector-manage-cash",onClick:()=>{x("/cash")},text:d("QUICK_ACTIONS.MANAGE_CASH"),icon:(0,a.jsx)(A.lc,{})}),c!==S&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.A.Divider,{className:"dropdown-divider"}),(0,a.jsx)(l.A.Header,{className:"text-muted font-weight-bold",children:d("HOLDINGS.ADD.PORTFOLIOS")}),(0,a.jsx)(O,{id:"add-selector-add-portfolio",onClick:()=>{x("/new-portfolio")},text:d("QUICK_ACTIONS.NEW_PORTFOLIO"),icon:(0,a.jsx)(A.gi,{})}),(0,a.jsx)(O,{id:"add-selector-add-composite",onClick:()=>{x("/manage-portfolios#add-composite")},text:d("QUICK_ACTIONS.NEW_COMPOSITE_PORTFOLIO"),icon:(0,a.jsx)(A.mL,{})})]}),!t.isComposite&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.A.Divider,{}),!h&&(0,a.jsx)("div",{className:"my-4 px-5",children:(0,a.jsx)("a",{className:"font-weight-bold text-body text-hover-primary",href:void 0,onClick:e=>{e.preventDefault(),e.stopPropagation(),u(!0),(0,v.s9)({event:v.Mg.HEADER_ADD_CLICK,element_name:"more_actions"})},children:d("BUTTON.MORE_ACTIONS",{ns:"common"})})}),h&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.A.Header,{className:"text-muted font-weight-bold",children:d("HOLDINGS.ADD.OTHER")}),(0,a.jsx)(O,{id:"add-selector-new-custom-holding",onClick:()=>{(0,v.s9)({event:v.Mg.ADD_CUSTOM_CLICKED,source:c===S?v.D0.ASSETS_PAGE:v.D0.HEADER}),x("/custom-holding-edit/new")},text:d("QUICK_ACTIONS.ADD_CUSTOM_HOLDING"),icon:(0,a.jsx)(A.sj,{})}),t.type!==m.N$.HOLDINGS&&(0,a.jsx)(O,{id:"add-selector-new-corporate-action",onClick:()=>{x("/corporate-actions")},text:d("QUICK_ACTIONS.ADD_CORPORATE_ACTION"),icon:(0,a.jsx)(A.Nb,{})})]})]}),t.isComposite&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.A.Divi
12der,{}),(0,a.jsx)("div",{className:"p-3 font-size-sm text-dark-50 mx-3",children:d("QUICK_ACTIONS.ADD.COMPOSITE_MESSAGE")})]})]})})]})})}},77232:(e,s,t)=>{"use strict";t.d(s,{AB:()=>c,qS:()=>r,uz:()=>d});var a=t(26514),n=t(75834),i=t(93760),l=t(49732),o=t(83602);let r=(0,n.forwardRef)((e,s)=>{let{isDark:t}=(0,o.DP)();return(0,a.jsxs)("button",{id:e.id,type:"button",title:e.title,ref:s,onClick:e.onClick,className:`btn btn-sm btn-clean btn-icon mr-2 ${e.className} ${e.showPulse?"pulse pulse-primary":""}`,style:{alignSelf:"center"},children:[(0,a.jsx)(l.A,{src:e.icon,size:e.iconSize??"xl",color:e.iconColor??"primary"}),e.showPulse&&(0,a.jsx)("span",{className:"pulse-ring"})]})}),c=(0,n.forwardRef)((e,s)=>{let{t}=(0,i.B)("common");return(0,a.jsxs)("button",{type:"button",title:e.title,ref:s,onClick:e.onClick,className:`btn font-weight-bold d-flex align-items-center ${!e.className?"mr-3 btn-sm btn-light-primary":e.className}`,style:{alignSelf:"center"},children:[(0,a.jsx)(l.A,{src:e.icon,size:e.iconSize??"md",color:"none"}),t("BUTTON.ADD")]})}),d=(0,n.forwardRef)((e,s)=>{let{t}=(0,i.B)("common");return(0,a.jsxs)("button",{type:"button",title:e.title,ref:s,onClick:e.onClick,className:"btn btn-md btn-white shadow-sm font-weight-bold d-flex align-items-center",style:{alignSelf:"center"},children:[(0,a.jsx)(l.A,{src:e.icon,size:e.iconSize??"md",color:"dark"}),t("BUTTON.ADD_INVESTMENTS")]})})},77390:e=>{e.exports={header:"AiChatFeedbackReasonPopover_header__9YXaQ",chips:"AiChatFeedbackReasonPopover_chips___40co"}},77938:e=>{e.exports={navi:"PortfolioSelector_navi__ypKFr",portfolioList:"PortfolioSelector_portfolioList__EmYQl",scrollbar:"PortfolioSelector_scrollbar__vXCFI"}},79104:(e,s,t)=>{"use strict";t.d(s,{l:()=>r});var a=t(26514),n=t(95572),i=t(99751),l=t(75834),o=t(334);function r(e){let{items:s}=e,[t,r]=(0,l.useState)([]);return(0,a.jsx)("div",{children:s.map((e,s)=>(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsxs)("h3",{className:"font-weight-bold cursor-pointer font-size-lg",onClick:()=>{r(e=>e.includes(s)?e.filter(e=>e!==s):[...e,s])},style:{userSelect:"none"},children:[t.includes(s)?(0,a.jsx)(n.A,{}):(0,a.jsx)(i.A,{}),e.title]}),(0,a.jsx)(o.A,{in:t.includes(s),children:(0,a.jsx)("div",{className:"pt-1 pb-2 pl-2",children:(0,a.jsx)("div",{style:{whiteSpace:"break-spaces"},children:e.text})})})]},s))})}},79844:(e,s,t)=>{"use strict";t.d(s,{im:()=>g,XE:()=>i,BY:()=>j});var a=t(59757),n=t(3163);function i(){let{currentPortfolio:e,portfolios:s}=(0,a.d4)(e=>{let{app:s}=e;return{currentPortfolio:s.currentPortfolio??null,portfolios:s.portfolios??[]}}),t=(0,a.wA)();return{currentPortfolio:e,setCurrentPortfolio:e=>{t(n.Sq(e)),t(n.TJ(s.map(s=>s.id===e.id?e:s)))}}}var l=t(4206),o=t(88754),r=t(66243),c=t(63390),d=t(47115),m=t(46694),h=t(14063),u=t(7086),p=t(93760);let x={goalType:+d.eu.INCOME,type:+d.N$.TRANSACTIONAL,goalCurrency:"USD",trackCashType:d.Xc.BALANCE_ONLY,viewType:+d.Sj.REAL_ACCOUNT,sendSummaryUpdateNotifications:!0,applyTaxesOnPaidDividends:!0};function g(e){let{t:s}=(0,p.B)("portfolio"),t=(0,a.d4)(e=>{let{ui:s}=e;return s.showDashboardNewPortfolioAlert}),i=(0,o.H)(l.jb),d=(0,a.wA)(),{load:g}=(0,r.J)(),{mutateAsync:N,...b}=(0,h.n)({mutationFn:async function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,[n,o]=i.lastRun(),r=n&&o===l.jb.variantA&&t&&e?.clearDemo?c.TKq:c.kn6,{data:d}=await u.A.post(r,{name:s("MY_PORTFOLIO"),...a});return d},onSuccess:async s=>{if(await g(),!e?.selectAfterCreation)return;d((0,n.Sq)(s));let t=(0,m.Gu)(`portfolio-currency-${s.id}`);if(!t?.code)return void d((0,n.MN)(s.defaultCurrency));d((0,n.MN)(t.code))}});return{createPortfolio:N,...b}}var N=t(33989),b=t(15269),f=t(70381);function j(e,s){let{portfolioId:t,isCompact:a=!1}=e,{t:n}=(0,p.B)("common"),{enabled:i=!0,...l}=s??{};return(0,N.I)({queryKey:["portoflio-goal",t,a],queryFn:async()=>{try{return(0,f.ON)(t,a)}catch{(0,b.f1)(n("ERROR.CONTACT_SUPPORT"))}},enabled:i&&!!t,...l})}},80170:(e,s,t)=>{"use strict";t.d(s,{d:()=>o});var a=t(26514);t(75834);var n=t(93760),i=t(1383),l=t.n(i);function o(e){let{title:s,iconUrl:t,onClick:i}=e,{t:o}=(0,n.B)("promos");return(0,a.jsxs)("div",{className:`p-10 border border-light rounded-lg bg-hover-light mb-7 ${l().root}`,onClick:i,children:[(0,a.jsx)("div",{className:"mb-6",children:(0,a.jsx)("img",{src:t,height:40})}),(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)("div",{className:`${l().title}`,children:s})}),(0,a.jsx)("div",{children:(0,a.jsxs)("button",{type:"button",className:"btn btn-lg font-weight-bold btn-link-dark",onClick:i,children:[o("PROMO.KNOW_MORE")," →"]})})]})}},81221:(e,s,t)=>{"use strict";t.d(s,{Z:()=>h,a:()=>u});var a=t(26514);t(75834);var n=t(93760),i=t(59757),l=t(38089),o=t(77177),r=t(29622),c=t(49732),d=t(16926),m=t(55285);function h(e){let{t:s}=(0,n.B)("layout"),t=(0,i.wA)(),{stealthMode:l}=(0,i.d4)(e=>{let{ui:s}=e;return{stealthMode:!0===s.stealthMode}});return(0,m.E8)()?null:(0,a.jsx)("button",{type:"button",className:`btn btn-sm btn-link-muted text-hover-primary btn-icon ${e.className??""}`,title:s(l?"QUICK_ACTIONS.STEALTH_OFF":"QUICK_ACTIONS.STEALTH_ON"),onClick:()=>{t((0,d.R8)(!l))},children:l?(0,a.jsx)(o.A,{color:"muted",fontSize:"small"}):(0,a.jsx)(r.A,{color:"muted",fontSize:"small"})})}function u(){let{t:e}=(0,n.B)("layout"),s=(0,i.wA)(),{stealthMode:t}=(0,i.d4)(e=>{let{ui:s}=e;return{stealthMode:!0===s.stealthMode}});return(0,m.E8)()?null:(0,a.jsx)(l.A,{in:t,children:(0,a.jsx)("div",{className:"alert alert-custom alert-outline-2x alert-outline-warning subscription-danger gutter-b d-flex flex-column align-items-start pt-3 pb-1",role:"alert",children:(0,a.jsxs)("div",{className:"row justify-content-between w-100",children:[(0,a.jsxs)("div",{className:"col-sm-12 col-md-auto d-flex align-items-center mb-2",children:[(0,a.jsx)(c.A,{className:"mr-2 d-none d-md-block",src:"/media/svg/icons/General/Hidden.svg",color:"warning",size:"2x"}),(0,a.jsx)("span",{children:e("STEALTH_ENABLED.MESSAGE")})]}),(0,a.jsx)("div",{className:"col-sm-12 col-md-auto mb-2",children:(0,a.jsx)("button",{type:"button",className:"btn btn-warning font-weight-bold",onClick:function(){s((0,d.R8)(!t))},children:e("BUTTON.DISABLE_STEALTH")})})]})})})}},82401:(e,s,t)=>{"use strict";t.d(s,{J:()=>v});var a=t(26514),n=t(75834),i=t(91114),l=t.n(i),o=t(51065),r=t.n(o),c=t(80966),d=t(93760),m=t(32491),h=t.n(m),u=t(71359),p=t(56153),x=t(96731),g=t(98385),N=t(6662),b=t(58303),f=t(54253),j=t(60547);function v(e){let{t:s}=(0,d.B)("common"),[t,i]=n.useState(!1),[o,m]=n.useState(e.sortBy),[v,A]=n.useState(e.sortDirection),T=n.useRef(null),C=e=>{T.current&&T.current.contains(e.target)||i(!1)};function E(s){let t="asc"===v?"desc":"asc";A(t),s&&e.onSortChanged&&e.onSortChanged(o,t)}return(0,n.useEffect)(()=>{m(e.sortBy),A(e.sortDirection)},[e.sortBy,e.sortDirection]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",className:e.btnClass??"text-dark-50 btn btn-white text-dark font-weight-bold sort-by-btn text-left btn-sm mb-2",disabled:e.disabled??!1,onClick:()=>{i(e=>!e)},ref:T,title:s("SORT"),children:[(0,a.jsx)("span",{className:e.iconClass??`svg-icon svg-icon-md mr-2 ${"asc"===v&&"rotate-icon-180"}`,children:(0,a.jsx)(l(),{preProcessor:j.xY,src:(0,f.oK)("/media/svg/icons/Navigation/Up-down.svg")})}),e.hideText?null:function(){let t=h()(e.options,e=>e.sortProp==o);return t?t.name:s("SORT")}()]}),(0,a.jsx)(b.A,{open:t,anchorEl:T.current,role:void 0,placement:"bottom-end",className:"z-10 setting-dropdown",transition:!0,disablePortal:!0,id:e.popperId,children:n=>{let{TransitionProps:i,placement:l}=n;return(0,a.jsx)(p.A,{...i,style:{transformOrigin:"bottom-start"===l?"left top":"left bottom"},children:(0,a.jsx)(N.A,{children:(0,a.jsx)(u.x,{onClickAway:C,children:(0,a.jsx)(r(),{options:{wheelPropagation:!1,wheelSpeed:2},className:"scroll",style:{maxHeight:c.XF?"400px":"500px",position:"relative"},children:(0,a.jsxs)("div",{className:"",children:[(0,a.jsxs)("div",{className:"font-weight-bold d-flex align-items-center px-4 pt-4 pb-3",children:[s("SORT")," ",(0,a.jsx)("button",{type:"button",className:"btn btn-link btn-sm font-weight-bold text-nowrap",onClick:()=>{E(!0)},disabled:function(){let s=h()(e.options,e=>e.sortProp==o);return!(s&&s.allow&&s.allow.indexOf("asc")>=0&&s.allow.indexOf("desc")>=0)}(),children:"asc"===v?s("SORT.ASC"):s("SORT.DESC")})]}),(0,a.jsx)("hr",{className:"my-1"}
12),(0,a.jsx)(g.A,{autoFocusItem:t,"aria-labelledby":"composition-button",children:e.options.map((s,t)=>(0,a.jsx)(x.A,{"data-name":s.sortProp,active:(s.sortProp==o).toString(),onClick:t=>{m(s.sortProp),0>s.allow.indexOf(v)&&E(!1),e.onSortChanged&&e.onSortChanged(s.sortProp,v),C(t)},children:s.name},t))})]})})})})})}})]})}},84865:e=>{e.exports={root:"PortfolioListItemMobile_root__Jft38",name:"PortfolioListItemMobile_name__QqWCI"}},86939:e=>{e.exports={root:"PublicModalFeature_root__psUTJ"}},88267:(e,s,t)=>{"use strict";t.d(s,{c:()=>C,g:()=>T});var a=t(26514),n=t(75834),i=t(63765),l=t(93696),o=t(93760),r=t(66243),c=t(97043),d=t(60890),m=t.n(d),h=t(9353);function u(e){let{portfolio:s,onSave:t}=e,{t:i}=(0,o.B)("portfolio"),l=(0,n.useRef)(null);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.o,{title:(0,a.jsx)("div",{className:"note-wrapper",children:(0,a.jsx)(m(),{children:s.note||i("NOTES.TOOLTIP")})}),children:(0,a.jsx)("div",{style:{maxWidth:"130px"},className:"pp-description note-wrapper text-dark-65 font-size-sm text-hover-dark cursor-pointer ml-2 pr-1",children:(0,a.jsx)("div",{className:"",children:(0,a.jsx)("i",{className:"icon far fa-comment",onClick:()=>{l.current&&l.current.open(s)}})})})}),(0,a.jsx)(h.A,{ref:l,onSave:t})]})}var p=t(66773),x=t(71359),g=t(44730),N=t.n(g);function b(e){let{className:s,placeholder:t,isLoading:i=!1,onSubmit:l,onChange:o,...r}=e,[c,d]=(0,n.useState)(!1),[m,h]=(0,n.useState)(r.value);return(0,n.useEffect)(()=>{h(r.value),d(!1)},[r.value]),(0,a.jsx)(x.x,{onClickAway:()=>{i||(h(r.value),d(!1))},children:(0,a.jsxs)("div",{className:"position-relative",children:[c&&(0,a.jsx)("form",{className:N().form,onSubmit:e=>{e.preventDefault(),r.value===m?d(!1):l?.(m)},children:(0,a.jsx)("input",{...r,ref:e=>{e?.focus()},type:"text",disabled:i,className:`${N().input} ${s??""}`,value:m,placeholder:t,onChange:e=>{h(e.target.value),o?.(e)}})}),(0,a.jsx)("div",{className:N().text,onClick:()=>{d(!0)},children:m||t})]})})}var f=t(15269),j=t(65852),v=t(70381);function A(){let{t:e}=(0,o.B)("portfolio"),[s,t]=(0,n.useState)(!1),{currentPortfolio:i,setCurrentPortfolio:l}=(0,p.XE)(),r=async s=>{if(s!==i?.name){t(!0);try{let t=await (0,v.IZ)({...i,name:s});l(t),(0,f.uT)(e("PORTFOLIO.UPDATE.NAME.SUCCESS"))}catch(t){let s=(0,j.G$)(t);if(s)return void(0,f.f1)(s);t.message&&(0,f.f1)(e("PORTFOLIO.UPDATE.NAME.ERROR"))}finally{t(!1)}}};return(0,a.jsx)(b,{isLoading:s,placeholder:e("portfolio:FORM.NAME"),value:i.name,onSubmit:r})}var T=function(e){return e.PORTFOLIO="portfolio",e.PORTFOLIOS="portfolios",e}({});function C(e){let{activeTab:s,onTabChange:t}=e,{t:n}=(0,o.B)("common"),{items:c}=(0,r.J)(),{currentPortfolio:d,setCurrentPortfolio:m}=(0,p.XE)();return d&&c?(0,a.jsx)("div",{className:"d-flex justify-content-between align-items-baseline",children:(0,a.jsx)(i.A.Container,{defaultActiveKey:"portfolio",activeKey:s,children:(0,a.jsxs)(l.A,{as:"ul",onSelect:e=>t(e),className:"nav nav-dashboard nav-dark-75",children:[("portfolios"===s||c.length>1)&&(0,a.jsx)(l.A.Item,{className:"nav-item",as:"li",style:{minWidth:0},children:(0,a.jsx)(l.A.Link,{eventKey:"portfolios",className:`nav-link pt-0 pb-0 pr-2 pl-0 ${"portfolios"===s?"active":""}`,children:(0,a.jsx)("span",{className:"nav-text",children:n("ALL_PORTFOLIOS")})})}),("portfolios"===s||c.length>1)&&(0,a.jsx)("span",{className:"text-muted",style:{minWidth:0},children:"/"}),(0,a.jsx)(l.A.Item,{className:"nav-item",as:"li",style:{minWidth:0,flex:1},children:"portfolio"!==s?(0,a.jsx)(l.A.Link,{eventKey:"portfolio",className:`nav-link pr-2 pb-0 pl-2 pt-0 ${"portfolio"===s?"active":""}`,children:(0,a.jsx)("span",{className:"nav-text",style:{maxWidth:"9999px"},children:d.name})}):(0,a.jsx)("div",{className:"nav-link active pr-2 pb-0 pl-2 pt-0",children:(0,a.jsx)("div",{className:"nav-text",style:{maxWidth:"9999px"},children:(0,a.jsx)(A,{})})})}),"portfolio"===s&&(0,a.jsx)(u,{portfolio:d,onSave:e=>{m({...d,note:e})}})]})})}):null}},88308:e=>{e.exports={inputContainer:"AiChatForm_inputContainer__Zu3gN",composer:"AiChatForm_composer__kzyGh",textarea:"AiChatForm_textarea__VSMPo",symbolCounter:"AiChatForm_symbolCounter__q3x5P",symbolCounterWarning:"AiChatForm_symbolCounterWarning__IdJhI",symbolCounterDanger:"AiChatForm_symbolCounterDanger__lJ7S4",divi
12der:"AiChatForm_divider__bgT0T",bottomRow:"AiChatForm_bottomRow__HSMrq",actions:"AiChatForm_actions__urZgj",actionBtn:"AiChatForm_actionBtn__oQheU",actionIcon:"AiChatForm_actionIcon__hZTAA",sendBtn:"AiChatForm_sendBtn__eMr_2",stopBtn:"AiChatForm_stopBtn__vgOd4"}},88515:(e,s,t)=>{"use strict";t.d(s,{G:()=>l});var a=t(7086),n=t(24163),i=t(63390);async function l(e){let s=(0,n.F)(),{data:t}=await a.A.get(i.NwO,{params:{...e,isSignedIn:s}});return t}},89077:(e,s,t)=>{"use strict";t.d(s,{EI:()=>p,cg:()=>x.c,z5:()=>u,eh:()=>R}),t(62819);var a=t(26514),n=t(75834),i=t(15269),l=t(60890),o=t(54253),r=t(73419);function c(e){let{item:s,display:t="full",onClick:n}=e;return(0,a.jsxs)("div",{className:n?"cursor-pointer":"",onClick:()=>n?.(s),children:["compact"!==t&&(s.type===r.bM||s.type===r.ae||s.illustrationUrl)&&(0,a.jsx)("div",{className:"d-flex justify-content-center",children:(0,a.jsx)("img",{className:"d-block",style:{height:"230px"},src:(0,o.oK)(s.illustrationUrl??"/media/svg/illustrations/present.png"),alt:"image"})}),s.type!==r.bM&&s.type!==r.ae&&"compact"!==t&&(0,a.jsx)("div",{className:"pt-10"}),(0,a.jsx)("div",{className:`${"compact"===t?"h4":"h3"} message-title`,children:s.messageTitle}),(0,a.jsx)("div",{className:`mt-2 message-content ${"compact"===t?"message-content-compact":"mx-10"}`,children:s.messageDescription&&(0,a.jsx)(l,{children:s.messageDescription})})]})}var d=t(74170),m=t(93760),h=t(46225);function u(e){let{notification:s,onRead:t}
12=e,[i,l]=(0,n.useState)(!0),{t:o}=(0,m.B)("common"),r=(0,h.useRouter)(),u=async()=>{t&&await t(s.id,!0),l(!1)},p=async()=>{await u(),s?.actionLink&&r.push(s.actionLink)};return(0,a.jsxs)(d.A,{backdrop:"static",show:i,onHide:u,children:[(0,a.jsx)("button",{type:"button",onClick:u,className:"btn btn-icon btn-light btn-sm btn-circle btn-close-card",children:(0,a.jsx)("i",{className:"flaticon2-cross icon-sm text-dark-50"})}),(0,a.jsx)(d.A.Body,{className:"overlay overlay-block cursor-default py-10 px-10 text-center",children:(0,a.jsx)(c,{item:s})}),!!s?.actionLink&&(0,a.jsx)(d.A.Footer,{className:"d-flex justify-content-end",children:(0,a.jsx)("button",{type:"button",onClick:p,className:"btn btn-primary btn-elevate font-weight-bold",children:String(o("BUTTON.SEE_MORE"))})})]})}function p(e){let{notification:s,onRead:t}=e,[l,o]=(0,n.useState)(!1),r=()=>{i.Tn(),o(!0),t(s.id,!0)};return n.useEffect(()=>{i.IO((0,a.jsx)("div",{children:(0,a.jsx)(c,{item:s,display:"compact",onClick:r})}),{doNotHide:!0,anchor:{vertical:"bottom",horizontal:"right"},ignoreClickAway:!0,onClose:()=>t(s.id)})},[s]),l?(0,a.jsx)(u,{notification:s}):null}var x=t(49942),g=t(88687),N=t(7086),b=t(33989),f=t(36728),j=t(63390),v=t(55285),A=t(47115),T=t(23141),C=t(96456),E=t.n(C),_=t(91453),y=t.n(_);function S(e){let{currency:s,monthlyPrice:t,yearlyPrice:n,discount:i=0}=e,{i18n:l,t:o}=(0,m.B)(["common","user"]),r={style:"currency",currency:s};"ru"===l.language&&(r.minimumFractionDigits=0,r.maximumFractionDigits=0);let c=`${Intl.NumberFormat(l.language,r).format(t)}`,d=`${Intl.NumberFormat(l.language,r).format(n)}`;return(0,a.jsxs)("div",{className:y().root,children:[!!i&&(0,a.jsxs)("div",{className:`badge badge-gradient ${y().discount}`,children:["-",i,"%"]}),(0,a.jsxs)("div",{className:"d-flex align-items-end justify-content-between mb-5",children:[(0,a.jsx)("div",{className:y().monthly,children:(0,a.jsx)(T.x,{i18nKey:"LABEL.PRICING_FROM_MONTHLY",components:[(0,a.jsx)("span",{},"pricing-from-monthly")],values:{value:c}})}),(0,a.jsx)("div",{className:y().yearly,children:(0,a.jsx)(T.x,{i18nKey:"LABEL.PRICING_YEARLY",components:[(0,a.jsx)("span",{},"pricing-early")],values:{value:d}})})]}),(0,a.jsx)(E(),{id:"subscription-expiration-upgrade",href:"/user-manage-subscription",className:`btn btn-lg w-100 ${y().btn}`,children:o("BUTTON.UPGRADE",{ns:"user"})})]})}var I=t(25294),O=t.n(I);function R(e){let{onRead:s}=e,{t}=(0,m.B)(["layout","common"]),i=(0,h.useRouter)(),{data:l,isLoading:o}=(0,b.I)({queryKey:["subscriptionPricing"],queryFn:()=>N.A.get(j.K4T).then(e=>{let{data:s}=e;return s})}),[r,c]=(0,n.useState)(!0),d=()=>{c(!1),s()};if((0,n.useEffect)(()=>(i.events.on("routeChangeStart",d),()=>{i.events.off("routeChangeStart",d)}),[]),o||!l)return;let u=l.currencuy??((0,v.de)()?"USD":"RUB"),p=l.tier2_1_yearly_price_discounted??l.tier2_1_yearly_price,x=l.tier2_1_yearly_price_final,T=l.personalDiscounts.find(e=>{let{tier:s}=e;return s===A.Qh.TIER_1}),C=T?100*T.discount:0;return(0,a.jsxs)(f.z,{show:r,onHide:d,showButtons:!1,title:t("SUBSCRIPTION_EXPIRING.TITLE"),rootClassName:O().root,children:[(0,a.jsx)("p",{children:t("SUBSCRIPTION_EXPIRING.TEXT")}),(0,a.jsx)("div",{className:"my-4",children:(0,a.jsx)(S,{currency:u,monthlyPrice:p,yearlyPrice:x,discount:C})}),(0,a.jsxs)("ul",{className:O().list,children:[(0,a.jsxs)("li",{children:[(0,a.jsx)(g.A,{})," ",t("SUBSCRIPTION_EXPIRING.LIST_1")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)(g.A,{})," ",t("SUBSCRIPTION_EXPIRING.LIST_2")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)(g.A,{})," ",t("SUBSCRIPTION_EXPIRING.LIST_3")]}),(0,a.jsxs)("li",{children:[(0,a.jsx)(g.A,{})," ",t("SUBSCRIPTION_EXPIRING.LIST_4")]}),(0,a.jsx)("li",{children:t("LABEL.AND_MORE",{ns:"common"})})]})]})}t(33523)},89139:e=>{e.exports={root:"AiChatButton_root__Rk8zd",highlighted:"AiChatButton_highlighted__wW2Pq",rotateConic:"AiChatButton_rotateConic__ciFsR",pulsed:"AiChatButton_pulsed__dqil_","pulse-border":"AiChatButton_pulse-border__1UDNb",icon:"AiChatButton_icon__G_fng","icon-glow":"AiChatButton_icon-glow__rKgK0",animated:"AiChatButton_animated__m08Jn","rotate-border":"AiChatButton_rotate-border__Skv1x"}},90952:(e,s,t)=>{"use strict";t.d(s,{q:()=>b});var a=t(26514),n=t(75834),i=t(93760),l=t(51065),o=t.n(l),r=t(46225),c=t(21069),d=t(47115),m=t(50062),h=t(96456),u=t.n(h),p=t(73311),x=t(10140);function g(e){let{item:s,href:t,openInNewTab:n=!1,onClick:l}=e,{t:o}=(0,i.B)("common"),r=(0,a.jsxs)("div",{className:"d-flex align-items-center justify-content-between pr-3",children:[(0,a.jsxs)("div",{className:"d-flex align-items-center overflow-hidden",style:{maxWidth:"100%"},children:[(0,a.jsx)("div",{className:"py-2",children:s.type===d.PW.QUOTE?(0,a.jsx)("div",{className:"mr-2",children:(0,a.jsx)(p.r,{fromLogo:s.primaryLogoURL,toLogo:s.logoURL})}):(0,a.jsx)(c.hz,{logoUrl:s.logoURL,primaryLogoUrl:s.primaryLogoURL,name:s.description,assetType:s.type,ticker:s.ticker})}),(0,a.jsx)("div",{className:"py-2 flex-grow-1 overflow-hidden",children:(0,a.jsxs)("div",{className:"asset-info-container",children:[(0,a.jsxs)("p",{className:"text-muted asset-info-name link-item",children:[s.ticker," ",!!s.exchange&&(0,a.jsxs)(a.Fragment,{children:["(",s.exchange,")"]}),s.isDelisted&&(0,a.jsx)("span",{className:"label label-sm label-inline label-light-warning ml-2",children:o("ASSET_DELISTED")})]}),(0,a.jsx)("p",{className:"asset-info-description",title:s.description,children:s.description})]})})]}),(0,a.jsx)("div",{className:"ml-2 d-flex align-items-center",children:(0,a.jsx)("span",{className:"font-size-sm text-dark-50",children:(0,a.jsx)("span",{children:(0,x.Qn)(s.currency)})})})]});return t?(0,a.jsx)(u(),{legacyBehavior:!0,href:t,children:(0,a.jsx)("a",{onClick:l,target:n?"_blank":"_self",className:"asset-link text-body flex-grow-1 overflow-hidden","aria-disabled":"true",children:r})}):(0,a.jsx)("div",{className:"text-body flex-grow-1 overflow-hidden",children:r})}let N={wheelSpeed:2,wheelPropagation:!1};function b(e){let{onItemClicked:s,openInNewTab:t,isRecent:l,data:h,renderItem:u=(e,s)=>s}=e,{t:p}
12=(0,i.B)("common"),x=(0,r.useRouter)(),[b,f]=(0,n.useState)(null),j=x.pathname.startsWith("/public/asset"),v=x.pathname.startsWith("/public/asset")?x.query?.tab?.[0]:"";return((0,n.useEffect)(()=>{x.pathname.indexOf("public/asset")>=0&&!window.location.hash.startsWith("#comment")?f(window.location.hash):f(null)},[x]),h)?0===h.length?(0,a.jsx)("div",{style:{maxHeight:"325px",overflow:"hidden"},className:"quick-search-wrapper scroll ps ps--active-y",children:(0,a.jsx)("div",{className:"quick-search-result",children:(0,a.jsx)("div",{className:"text-muted d-none",children:p("ERROR.NOTHING_FOUND")})})}):(0,a.jsx)("div",{style:{maxHeight:"325px",overflow:"hidden"},className:"quick-search-wrapper scroll ps ps--active-y mb-0",children:(0,a.jsx)(o(),{options:N,className:"scroll",style:{maxHeight:"325px",position:"relative"},children:(0,a.jsxs)("div",{className:"quick-search-result pb-4",children:[l&&(0,a.jsx)("div",{className:"text-muted font-weight-bold py-2 font-size-sm",children:p("RECENT_ITEMS")}),h.map((e,n)=>(0,a.jsx)("div",{className:`d-flex align-items-center pr-3 ${n>0?"border-top":""}`,children:u(e,(0,a.jsx)(g,{item:e,href:function(e){if(e?.type===d.PW.QUOTE)return null;let s=(0,c.A)(e.assetType,e.id,e.ticker,e.exchange,e.currency);return j&&v&&(0,m.Zu)(v,e)?`${s}/${v}${b??""}`:`${s}${b??""}`}(e),openInNewTab:t,onClick:()=>{s&&s(e)}}))},`${e.ticker}.${e.exchange}.${e.currency}`))]})})}):null}},91453:e=>{e.exports={root:"SubscriptionExpirationNotificationUpgrade_root__gyYTR",btn:"SubscriptionExpirationNotificationUpgrade_btn__lLbLo",monthly:"SubscriptionExpirationNotificationUpgrade_monthly__V71I3",yearly:"SubscriptionExpirationNotificationUpgrade_yearly__h1bIP",discount:"SubscriptionExpirationNotificationUpgrade_discount__SFD1N"}},95441:(e,s,t)=>{"use strict";t.d(s,{Hg:()=>n.H,LO:()=>a.LO,XB:()=>a.XB,lo:()=>a.lo,mE:()=>a.mE});var a=t(63885),n=t(50996)},95638:(e,s,t)=>{"use strict";t.d(s,{A:()=>f,H:()=>j});var a=t(26514),n=t(75834),i=t(91114),l=t.n(i),o=t(51065),r=t.n(o),c=t(80966),d=t(71359),m=t(56153),h=t(6662),u=t(58303),p=t(30985),x=t(54253),g=t(49732),N=t(60547),b=t(97043);function f(e){let[s,t]=n.useState(!1),i=n.useRef(null),{placement:o="bottom-end"}=e,p=()=>{t(e=>!e)},f=e=>{i.current&&i.current.contains(e.target)||"body"!==e.target.localName&&t(!1)};return(0,a.jsxs)(a.Fragment,{children:[e.tooltip&&(0,a.jsx)(b.o,{title:e.tooltip,children:(0,a.jsx)("span",{children:(0,a.jsxs)("button",{type:"button",className:e.btnClass??"btn btn-clean btn-icon font-weight-bold",disabled:e.disabled??!1,onClick:p,ref:i,children:[e.useSvgIcon&&(0,a.jsx)("span",{className:e.svgIconClass?e.svgIconClass:"svg-icon svg-icon-md svg-icon-dark",children:(0,a.jsx)(l(),{preProcessor:N.xY,src:(0,x.oK)(`/media/svg/icons/${e.icon}`)})}),!e.useSvgIcon&&!e.icon&&!e.text&&(0,a.jsx)(g.A,{color:e.iconColor??"dark-50",size:"md",src:"/media/svg/icons/General/Other2.svg"}),!e.useSvgIcon&&e.icon&&(0,a.jsx)("i",{className:e.icon}),!!e.text&&(0,a.jsx)(a.Fragment,{children:e.text}),e.indicator&&(0,a.jsx)("span",{className:"btn-indicator label label-md label-dot label-success"})]})})}),!e.tooltip&&(0,a.jsxs)("button",{type:"button",className:e.btnClass??"btn btn-clean btn-icon font-weight-bold position-relative",disabled:e.disabled??!1,style:{minWidth:e.btnClass?"auto":"calc(1.5em + 1.3rem + 2px)"},onClick:p,ref:i,children:[e.useSvgIcon&&(0,a.jsx)("span",{className:e.svgIconClass?e.svgIconClass:"svg-icon svg-icon-md svg-icon-dark",children:(0,a.jsx)(l(),{preProcessor:N.xY,src:(0,x.oK)(`/media/svg/icons/${e.icon}`)})}),!e.useSvgIcon&&!e.icon&&!e.text&&(0,a.jsx)(g.A,{color:e.iconColor??"dark-50",size:"md",src:"/media/svg/icons/General/Other2.svg"}),!e.useSvgIcon&&e.icon&&(0,a.jsx)("i",{className:e.icon}),!!e.text&&(0,a.jsx)(a.Fragment,{children:e.text}),e.indicator&&(0,a.jsx)("span",{className:"btn-indicator label label-md label-dot label-success"})]}),(0,a.jsx)(u.A,{id:e.popperId,open:s,anchorEl:i.current,role:void 0,className:`z-10 setting-dropdown ${e.className??""}`,placement:o,transition:!0,disablePortal:!0,children:s=>{let{TransitionProps:t,placement:n}=s;return(0,a.jsx)(m.A,{...t,style:{transformOrigin:"bottom-start"===n?"left top":"left bottom"},children:(0,a.jsx)(h.A,{sx:{boxShadow:"none"},children:(0,a.jsx)(d.x,{onClickAway:f,children:(0,a.jsx)(r(),{options:{wheelPropagation:!1,wheelSpeed:2},className:"scroll",style:{maxHeight:e.menuHeight??(c.XF?"400px":"500px"),position:"relative"},children:(0,a.jsx)("div",{className:`${e?.className?e.className:""} ${!e.selector&&"p-4 setting-dropdown-container"}`,children:e.children})})})})})}})]})}function j(e){let s=!!e.items.find(e=>{let{isNew:s}=e;return s});return(0,a.jsxs)(p.A,{className:"d-inline-block position-static",alignRight:!0,onToggle:e?.onToggle,children:[(0,a.jsxs)(p.A.Toggle,{variant:"transparent",disabled:e.disabled??!1,className:`${e.btnClass??"btn btn-clean btn-icon font-weight-bold"} exclude-dropdown-toggle`,children:[e.useSvgIcon&&(0,a.jsx)("span",{className:e.iconClass??"svg-icon svg-icon-md svg-icon-dark",children:(0,a.jsx)(l(),{preProcessor:N.xY,src:(0,x.oK)(`/media/svg/icons/${e.icon}`)})}),s&&(0,a.jsx)("span",{className:"btn-indicator label label-md label-dot label-primary",style:{right:0,top:10}}),!e.useSvgIcon&&(0,a.jsx)("i",{className:e.icon??"flaticon2-gear"})]}),(0,a.jsx)(p.A.Menu,{className:"w-auto",children:e.items.map((e,s)=>{if("divider"!=e.type&&"text"!=e.type){let t=(0,a.jsxs)(p.A.Item,{id:e.id,variant:e.color??"none",as:"button",className:`position-relative ${e.color?`text-${e.color}`:""} mt-0 py-2 font-weight-bold`,onClick:()=>{e.onClick(),document.dispatchEvent(new MouseEvent("click"))},children:[e.icon,!!e.svgIcon&&(0,a.jsx)(g.A,{className:"button-svg-icon",src:`/media/svg/icons/${e.svgIcon}`,size:"md",color:e.color??"none"}),(0,a.jsxs)("span",{className:"position-relative",children:[e.name,e.isNew&&(0,a.jsx)("span",{className:"btn-indicator label label-md label-dot label-primary",style:{right:-12,top:-2}})]})]}),i=e.renderer?e.renderer:e=>e;return(0,a.jsx)(n.Fragment,{children:i(t)},s)}return"divider"==e.type?(0,a.jsx)(p.A.Divider,{},s):"text"==e.type?(0,a.jsx)(p.A.ItemText,{className:"p-3 text-dark-50 font-size-sm d-inline-block",style:{maxWidth:"200px"},children:e.text},s):null})})]})}},95965:e=>{e.exports={root:"AiChatQuestionBadge_root__lGlSk",icon:"AiChatQuestionBadge_icon__PNRbJ"}},96210:(e,s,t)=>{"use strict";t.d(s,{T:()=>l});var a=t(26514);t(75834);var n=t(33502),i=t.n(n);function l(e){let{children:s,component:t,handleProps:n,isDragging:l=!1,disableDragging:o=!1,className:r="",...c}=e;return(0,a.jsxs)(t??"div",{className:`${l?i().dragging:""} ${i().listItem} ${r}
12`,...c,children:[!o&&(0,a.jsx)("i",{...n,className:`fas fa-grip-horizontal icon-nm p-3 ${i().listHandle}`}),s]})}},96337:(e,s,t)=>{"use strict";t.d(s,{c:()=>l});var a=t(26514);t(75834);var n=t(59757),i=t(93760);function l(e){let{isAutoSyncPortfolio:s}=e,{t}=(0,i.B)("trans"),{isSyncPortfolio:l}=(0,n.d4)(e=>{let{app:s}=e;return{isSyncPortfolio:s.currentPortfolio?.isAutoSyncEnabled??!1}},n.bN);return(null===s?l:s)?(0,a.jsx)("div",{className:"alert alert-custom alert-outline-2x alert-outline-warning subscription-danger d-flex flex-column align-items-start pt-3 pb-1",role:"alert",children:(0,a.jsx)("div",{className:"row justify-content-between w-100",children:(0,a.jsx)("div",{className:"col-sm-12 col-md-auto d-flex align-items-center mb-2",children:(0,a.jsx)("span",{children:t("DIVS_AUTO_CREATE.WARNING")})})})}):null}},96884:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/manage-portfolios",function(){return t(29544)}])},97762:(e,s,t)=>{"use strict";t.d(s,{a:()=>c});var a=t(26514),n=t(75834),i=t(74170),l=t(152),o=t(55285),r=t(60488);class c extends n.Component{constructor(e){super(e),this.open=e=>{this.setState({show:!0,email:e})},this.close=()=>{this.setState({show:!1})},this.state={email:"",show:!1,blocking:!1,files:[]}}render(){return(0,a.jsxs)(i.A,{show:this.state.show,onHide:this.close,"aria-labelledby":"example-modal-sizes-title",children:[(0,a.jsxs)(a.Fragment,{children:[this.state.blocking&&(0,a.jsx)(l.q3,{}),(0,a.jsx)(i.A.Header,{closeButton:!0,children:(0,a.jsxs)(i.A.Title,{id:"example-modal-sizes-title",children:[this.props.t("layout:FEEDBACK.HEADER"),!(0,o.de)()&&(0,a.jsx)("a",{href:"https://t.me/joinchat/imLsaazSSww5NTVi",target:"_blank",className:"font-weight-bold ml-2 font-size-lg",rel:"noreferrer",children:this.props.t("layout:FEEDBACK.ASK_IN_CHAT")})]})})]}),(0,a.jsx)(i.A.Body,{children:this.state.show&&(0,a.jsx)(r.Y3,{email:this.state.email,onSaved:this.close,onDiscard:this.close})})]})}}},98337:(e,s,t)=>{"use strict";t.d(s,{a:()=>E});var a=t(26514),n=t(75834),i=t(7086),l=t(91114),o=t.n(l),r=t(9610),c=t.n(r),d=t(60058),m=t.n(d),h=t(74170),u=t(23141),p=t(64137),x=t(63390),g=t(54253),N=t(152),b=t(76510),f=t(15269),j=t(36241),v=t(60547),A=t(43803),T=t(75165);class C extends n.Component{constructor(e){super(e),this.ignoreActionDialog=e=>{this.setState({showIgnoreActionDialog:!0,currentIgnoreAction:e})},this.closeIgnoreActionDialog=()=>{this.setState({showIgnoreActionDialog:!1,currentIgnoreAction:null})},this.addCorporateActions=async e=>{this.setState({blocking:!0}),"string"!=typeof e&&(e=null);try{let s=x.p9P,t={portfolioId:this.state.portfolioId,commonActionsIds:e?[e]:m()(this.state.suggestActions,e=>e.commonCorporateActionId)};await i.A.post(`${s}/corporate-actions`,t),this.setState(()=>({suggestActions:e?c()(this.state.suggestActions,s=>s.commonCorporateActionId!=e):[]})),f.uT(this.props.t("WARNING.SPLIT.ADDED_MESSAGE")),this.props.onUpdated&&await this.props.onUpdated()}catch(s){let e=(0,j.g6)(`${this.props.t("WARNING.SPLIT.ADD_ERROR")}: 
13`,s);f.f1(e)}this.setState({blocking:!1})},this.ignoreCorporateActions=async()=>{this.setState({blocking:!0});try{let e=x.bHF,s={portfolioId:this.state.portfolioId,commonCorporateActionId:this.state.currentIgnoreAction.commonCorporateActionId,repaymentTicker:this.state.currentIgnoreAction.repaymentTicker};await i.A.post(e,s),this.setState(()=>({suggestActions:c()(this.state.suggestActions,e=>e.commonCorporateActionId!=this.state.currentIgnoreAction.commonCorporateActionId),showIgnoreActionDialog:!1,currentIgnoreAction:null})),f.uT(this.props.t("WARNING.SPLIT.DELETED_MESSAGE"))}catch(s){let e=(0,j.g6)(`${this.props.t("WARNING.SPLIT.DELETE_ERROR")}: 
14`,s);f.f1(e)}this.setState({blocking:!1})},this.getActionIcon=e=>e.type==A.vq.Split?"/media/svg/icons/Code/Github.svg":e.type==A.vq.Merge?"/media/svg/icons/Code/Git3.svg":e.type==A.vq.Repayment?"/media/svg/icons/Text/Undo.svg":"/media/svg/icons/Navigation/Plus.svg",this.getCorpActionDescription=e=>{let[s]=A.dN.filter(s=>s.value==e.type);return e.type==A.vq.Repayment?(0,a.jsxs)("span",{children:[this.props.t(s.label,{ns:"types"})," ",(0,a.jsxs)("span",{className:"",children:[(0,a.jsx)("b",{children:e.description})," (",e.ticker,")"]})," ",this.props.t("FULL_DATE_SHORT_DAY",{ns:"common",date:new Date(e.date)})," ",(0,a.jsxs)("b",{children:[(0,a.jsx)(T.b,{value:e.amount,isMoney:!0,currency:e.currency}),"/",this.props.t("PIECES",{ns:"common",count:1})]})]}):e.type==A.vq.Merge||e.type==A.vq.Spinoff?(0,a.jsxs)("span",{children:[this.props.t(s.label,{ns:"types"})," ",(0,a.jsx)("span",{className:"font-weight-bold",children:(0,a.jsxs)("b",{children:[e.ticker," → ",e.newTicker]})})," ",this.props.t("FULL_DATE_SHORT_DAY",{ns:"common",date:new Date(e.date)})," ",(0,a.jsxs)("b",{children:[e.amount,":1"]})]}):(0,a.jsxs)("span",{children:[this.props.t(s.label,{ns:"types"})," ",(0,a.jsx)("span",{className:"font-weight-bold",children:(0,a.jsx)("b",{children:e.ticker})})," ",this.props.t("FULL_DATE_SHORT_DAY",{ns:"common",date:new Date(e.date)})," ",(0,a.jsxs)("b",{children:[e.amount,":1"]})]})};let{portfolioId:s}=e;this.state={portfolioId:s??"",suggestActions:e.actions??[],showIgnoreActionDialog:!1,currentIgnoreAction:null,blocking:!1}}componentWillReceiveProps(e){(e.portfolioId&&e.portfolioId!==this.state.portfolioId||e.actions&&e.actions!=this.state.suggestActions)&&this.setState({portfolioId:e.portfolioId,suggestActions:e.actions})}render(){return(0,a.jsxs)(a.Fragment,{children:[this.state.suggestActions&&this.state.suggestActions.length>0&&(0,a.jsx)("div",{className:"card"==this.props.type?"card card-custom gutter-b":"mb-4",children:(0,a.jsxs)("div",{className:"card"==this.props.type?"card-body":"bg-light-warning p-8 rounded-xl flex-grow-1",children:[(0,a.jsx)("div",{className:"font-weight-bolder font-size-h5",children:this.props.t("WARNING.CORP_ACTION.TITLE")}),(0,a.jsx)("div",{className:"text-dark-50 font-size-sm",children:this.props.t("WARNING.CORP_ACTION.MESSAGE")}),(0,a.jsx)("div",{className:"mt-5 mb-5",children:this.state.suggestActions.map((e,s)=>(0,a.jsxs)("div",{className:"d-flex align-items-center mb-2",children:[(0,a.jsx)("span",{className:"svg-icon svg-icon-md svg-icon-warning flex-shrink-0 mr-3",children:(0,a.jsx)(o(),{preProcessor:v.xY,src:(0,g.oK)(this.getActionIcon(e))})}),this.getCorpActionDescription(e),(0,a.jsx)("button",{type:"button",className:"ml-2 bt
14n btn-sm btn-link-warning font-weight-bold",onClick:()=>{this.addCorporateActions(e.commonCorporateActionId)},children:this.props.t("BUTTON.ADD",{ns:"common"})}),(0,a.jsx)("button",{type:"button",className:"ml-2 btn btn-sm btn-link-secondary text-dark-50 font-weight-bold",onClick:()=>{this.ignoreActionDialog(e)},children:this.props.t("BUTTON.DELETE",{ns:"common"})})]},s))}),(0,a.jsx)("button",{type:"button",onClick:this.addCorporateActions,className:"btn btn-warning font-weight-bold",children:this.props.t("WARNING.SPLIT.ADD_ALL")})]})}),(0,a.jsxs)(h.A,{show:this.state.showIgnoreActionDialog,onHide:this.closeIgnoreActionDialog,children:[this.state.blocking&&(0,a.jsx)(N.q3,{}),(0,a.jsx)(h.A.Header,{closeButton:!0,children:(0,a.jsx)(h.A.Title,{id:"example-modal-sizes-title-lg",children:this.props.t("WARNING.CORP_ACTION.DELETE.TITLE")})}),(0,a.jsxs)(b.A,{tag:"div",blocking:this.state.blocking,keepInView:!0,children:[(0,a.jsxs)(h.A.Body,{children:[!this.state.blocking&&this.state.currentIgnoreAction&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:(0,a.jsx)(u.x,{i18nKey:"analytics:WARNING.CORP_ACTION.DELETE.MESSAGE",values:{date:new Date(this.state.currentIgnoreAction.date),ticker:this.state.currentIgnoreAction.ticker,amount:this.state.currentIgnoreAction.amount,corporateAction:this.props.t(A.dN.filter(e=>e.value==this.state.currentIgnoreAction.type)[0].label,{ns:"types"})}})}),(0,a.jsx)("div",{className:"alert alert-custom alert-light-warning fade show mb-5",role:"alert",children:(0,a.jsx)("div",{className:"alert-text",children:(0,a.jsx)(u.x,{i18nKey:"analytics:WARNING.SPLIT.DELETE.ALERT"})})})]}),this.state.blocking&&(0,a.jsx)("span",{children:this.props.t("WARNING.SPLIT.DELETE.WAIT")})]}),(0,a.jsxs)(h.A.Footer,{children:[(0,a.jsx)("button",{type:"button",onClick:this.closeIgnoreActionDialog,className:"btn btn-light btn-elevate font-weight-bold",children:this.props.t("BUTTON.DISCARD",{ns:"common"})}),(0,a.jsx)("button",{type:"button",onClick:this.ignoreCorporateActions,className:"btn btn-danger btn-elevate font-weight-bold",children:this.props.t("BUTTON.YES_DELETE",{ns:"common"})})]})]})]})]})}}let E=(0,p.C)(["analytics","common","types"])(C)}},e=>{e.O(0,[3803,6456,4638,8245,6725,1394,9754,5386,7973,5888,1757,1879,7346,1291,6934,6831,8129,2698,4291,8519,7321,5486,2358,3700,9442,5907,5331,7153,6518,6842,3968,6366,636,6593,8792],()=>e(e.s=96884)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.