1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2071,8485,8588],{554:e=>{e.exports={textarea:"FeedbackPopup_textarea__Z2qhF",feedbackPopup:"FeedbackPopup_feedbackPopup__uA6Rx",content:"FeedbackPopup_content__JFh8D"}},990:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var s=0;s<t.length;s++){var n=t[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,s,n){return s&&e(t.prototype,s),n&&e(t,n),t}}(),a=s(75834),i=o(a),r=o(s(68208));function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}t.default=function(){var e=i.default.createContext(),t=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);function s(){if(!(this instanceof s))throw TypeError("Cannot call a class as a function");for(var e,t,n,a=arguments.length,i=Array(a),r=0;r<a;r++)i[r]=arguments[r];return t=n=l(this,(e=s.__proto__||Object.getPrototypeOf(s)).call.apply(e,[this].concat(i))),n.state={data:n.props.data},n.getData=function(e,t,s,a){return a?a.data:s?s.data:t?t.data:e?e.data:n.props.data},l(n,t)}return s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(s,t):s.__proto__=t),n(s,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.setState(function(){return{data:e.data}})}},{key:"render",value:function(){return i.default.createElement(e.Provider,{value:{data:this.state.data,getData:this.getData}},this.props.children)}}]),s}(a.Component);return t.propTypes={data:r.default.array.isRequired,children:r.default.node.isRequired},{Provider:t,Consumer:e.Consumer}}},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,t,s)=>{"use strict";s.d(t,{A:()=>b});var n=s(26514),a=s(58245),i=s.n(a),r=s(32673);s(75834);
1var o=s(93760),l=s(23141),c=s(6367),d=s(80315),m=s(48208),u=s(49732),h=s(79104),p=s(63595),x=s(75674),g=s(50905),f=s.n(g);function b(e){let{t}=(0,o.B)("promos"),{assignedPromocode:s,isPromoStillRunning:a}=e.data||{},g=[{title:t("TBANK.FAQ_1"),text:t("TBANK.FAQ_1_ANSWER")},{title:t("TBANK.FAQ_5"),text:t("TBANK.FAQ_5_ANSWER")},{title:t("TBANK.FAQ_2"),text:t("TBANK.FAQ_2_ANSWER")},{title:t("TBANK.FAQ_3"),text:t("TBANK.FAQ_3_ANSWER")},{title:t("TBANK.FAQ_4"),text:t("TBANK.FAQ_4_ANSWER")}];return(0,n.jsx)(d.a,{...e,size:"lg",dialogClassName:`${f().modalDialog} ${e.fullScreen?f().fullScreen:""}`,bodyClassName:f().modalBody,title:(0,n.jsx)("div",{className:`pl-4 pl-sm-0 mb-2 ${f().title}`,children:t("TBNK.MODAL.TITLE")}),children:(0,n.jsxs)(r.A,{gap:{xs:2,sm:2},children:[(0,n.jsx)("div",{className:"d-flex justify-content-center align-items-center",children:(0,n.jsxs)("div",{className:`font-size-lg ${f().badge}`,children:[t("TBNK.COLLABORATION_LABEL")," ",(0,n.jsx)(i(),{src:"/media/logos/tbank-long.svg",alt:"tbank.ru",width:80,height:20})]})}),(s||a)&&(0,n.jsx)("div",{className:f().divider}),s&&(0,n.jsx)(p.$,{promocode:s,onPromocodeClaimed:e.onPromocodeClaimed}),a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"font-size-h3 font-weight-bolder",children:t("TBANK.MODAL.DETAILS.TITLE")}),(0,n.jsxs)("div",{className:"row mb-4",children:[(0,n.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,n.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,n.jsx)(u.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,n.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,n.jsx)(l.x,{i18nKey:"promos:TBNK.MODAL.DETAILS.1"})})]})}),(0,n.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,n.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,n.jsx)(u.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,n.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,n.jsx)(l.x,{i18nKey:"promos:TBNK.MODAL.DETAILS.2",components:[(0,n.jsx)("span",{className:"text-nowrap"})]})})]})}),(0,n.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,n.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,n.jsx)(u.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,n.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,n.jsx)(l.x,{i18nKey:"promos:TBNK.MODAL.DETAILS.3",components:[(0,n.jsx)("span",{className:"text-nowrap"})]})})]})})]}),(0,n.jsx)("div",{className:"font-size-h3 font-weight-bolder",children:t("TBANK.MODAL.HOW.TITLE")}),(0,n.jsxs)(r.A,{gap:1.5,children:[(0,n.jsx)(x.S,{stepNumber:1,title:t("TBANK.MODAL.HOW.STEP_1.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_1.MESSAGE"})}),(0,n.jsx)(x.S,{stepNumber:2,title:t("TBANK.MODAL.HOW.STEP_2.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_2.MESSAGE",components:[(0,n.jsx)(m.o,{href:"/user-profile#subscription"})]})}),(0,n.jsx)(x.S,{stepNumber:3,title:t("TBANK.MODAL.HOW.STEP_3.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_3.MESSAGE"})}),(0,n.jsx)(x.S,{stepNumber:4,title:t("TBANK.MODAL.HOW.STEP_4.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_4.MESSAGE"})}),(0,n.jsx)(x.S,{stepNumber:5,title:t("TBANK.MODAL.HOW.STEP_5.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:TBANK.MODAL.HOW.STEP_5.MESSAGE"})})]}),(0,n.jsx)("div",{className:"w-100 text-center bg-light p-4 rounded-lg",children:(0,n.jsxs)(m.o,{href:"https://www.tbank.ru/invest/form/snowball/",className:"font-weight-bold font-size-lg",target:"_blank",children:[(0,n.jsx)(c.A,{className:"mr-1"})," ",t("TBNK.MODAL.DETAILS.BUTTON_TO_TBANK")]})}),(0,n.jsx)("div",{className:"font-size-h3 font-weight-bolder mt-7",children:t("TBANK.FAQ")}),(0,n.jsx)(h.l,{items:g}),(0,n.jsx)("div",{className:"font-size-h3 font-weight-bolder mt-7",children:t("TBANK.DOCUMENTS")}),(0,n.jsx)("div",{children:(0,n.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 ",t("TBANK.DOCUMENTS_LINK")]})})]})]})})}},4707:(e,t,s)=>{"use strict";s.d(t,{o:()=>c});var n=s(26514);s(75834);var a=s(59757),i=s(28684),r=s(16926),o=s(95965),l=s.n(o);function c(e){let{question:t,label:s,className:o}=e,c=(0,a.wA)(),d=(0,i.h)();return(0,n.jsxs)("button",{type:"button",className:`label label-inline label-light-primary ${l().root} ${o??""}`,onClick:()=>{c((0,r.s6)(t)),d.setOpen(!0)},title:t,children:[(0,n.jsx)("img",{src:"/media/svg/icons/General/ai-sparkle-gradient.svg",className:l().icon}),(0,n.jsx)("span",{children:s})]})}},5390:(e,t,s)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},a=function(){function e(e,t){for(var s=0;s<t.length;s++){var n=t[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,s,n){return s&&e(t.prototype,s),n&&e(t,n),t}}(),i=l(s(75834)),r=l(s(68208)),o=l(s(37242));function l(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,s){var l=i.default.createContext(),c=function(r){if("function"!=typeof r&&null!==r)throw TypeError("Super expression must either be null or a function, not "+typeof r);function o(e){if(!(this instanceof o))throw TypeError("Cannot call a class as a function");var t=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));d.call(t);var s=void 0,n=void 0,a=e.defaultSorted,i=e.defaultSortDirection,r=e.sort;return a&&a.length>0?(s=a[0].order||i,n=t.initSort(a[0].dataField,s)):r&&r.dataField&&r.order&&(s=r.order,n=t.initSort(r.dataField,s)),t.state={sortOrder:s,sortColumn:n},t}return o.prototype=Object.create(r&&r.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(o,r):o.__proto__=r),a(o,[{key:"componentDidMount",value:function(){var e=this.state,n=e.sortOrder,a=e.sortColumn;t()&&n&&a&&s(a.dataField,n)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.sort,s=e.columns;t&&t.dataField&&t.order&&this.setState({sortOrder:t.order,sortColumn:s.find(function(e){return e.dataField===t.dataField})})}},{key:"initSort",value:function(e,t){var s=void 0,n=this.props.columns.filter(function(t){return t.dataField===e});return n.length>0&&(s=n[0]).onSort&&s.onSort(e,t),s}},{key:"render",value:function(){var s=this.props.data,a=this.props.sort,r=this.state,o=r.sortOrder,c=r.sortColumn;if(!t()&&c){var d=c.sortFunc?c.sortFunc:a&&a.sortFunc;s=e.sort(s,o,n({},c,{sortFunc:d}))}return i.default.createElement(l.Provider,{value:{data:s,sortOrder:o,onSort:this.handleSort,sortField:c?c.dataField:null}},this.props.children)}}]),o}(i.default.Component);c.propTypes={data:r.default.array.isRequired,columns:r.default.array.isRequired,children:r.default.node.isRequired,defaultSorted:r.default.arrayOf(r.default.shape({dataField:r.default.string.isRequired,order:r.default.oneOf([o.default.SORT_DESC,o.default.SORT_ASC]).isRequired})),sort:r.default.shape({dataField:r.default.string,order:r.default.oneOf([o.default.SORT_DESC,o.default.SORT_ASC]),sortFunc:r.default.func}),defaultSortDirection:r.default.oneOf([o.default.SORT_DESC,o.default.SORT_ASC])};var d=function(){var n=this;this.handleSort=function(a){var i=e.nextOrder(a,n.state,n.props.defaultSortDirection);a.onSort&&a.onSort(a.dataField,i),t()&&s(a.dataField,i),n.setState(function(){return{sortOrder:i,sortColumn:a}})}};return{Provider:c,Consumer:l.Consumer}}},5771:(e,t,s)=>{"use strict";s.d(t,{J:()=>i,v:()=>r});var n=s(26514);s(75834);var a=s(2782);function i(e){let t=[...Array(e.count??3).keys()],s=e.height??200;return(0,n.jsx)(n.Fragment,{children:t.map((t,i)=>(0,n.jsx)("div",{className:`row ${!e.noPadding&&"gutter-b"}`,children:(0,n.jsx)("div",{className:"col",children:(0,n.jsx)(a.A,{className:"rounded-lg",variant:"rectangular",animation:"wave",height:s})})},i))})}function r(e){let t=[...Array(e.count||3).keys()],s=e.height??200;return(0,n.jsx)("div",{className:"row",children:t.map((e,t)=>(0,n.jsx)("div",{className:"col-lg-4 col-sm-12",children:(0,n.jsx)("div",{className:"row gutter-b",children:(0,n.jsx)("div",{className:"col",children:(0,n.jsx)(a.A,{className:"rounded-lg",variant:"rectangular",animation:"wave",height:s})})})},t))})}},10367:(e,t,s)=>{"use strict";s.d(t,{l:()=>a,m:()=>n});var n=function(e){return e.TBANK="tbank",e.BCS="bcs",e}({}),a=function(e){return e[e.TBANK=1]="TBANK",e[e.BCS=2]="BCS",e}({})},10930:(e,t,s)=>{"use strict";s.d(t,{X:()=>j});var n=s(26514),a=s(7086),i=s(46225),r=s(75834),o=s(93760),l=s(23141
1),c=s(59757),d=s(63390),m=s(23615),u=s(61139),h=s(55285),p=s(48208),x=s(48174),g=s(49732),f=s(24138),b=s(15269);function N(e){let{t}=(0,o.B)(["user","common"]),{user:s}=(0,c.d4)(e=>e.auth),[a,i]=(0,r.useState)(e.counts??{}),[d,u]=(0,r.useState)({});return(0,r.useEffect)(()=>{i(e.counts)},[e.counts]),(0,r.useEffect)(()=>{!function(){if(!s)return;let e=(0,f.sp)(s.subscriptionType);u({portfolios:e,holdings:(0,f.PN)(s.subscriptionType),customHoldings:(0,f.s2)(s.subscriptionType)})}()},[s]),(0,n.jsx)("div",{className:"row align-items-center justify-content-center",children:(0,n.jsx)("div",{className:"col-auto border rounded-lg p-5",children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"font-weight-bold font-size-lg mb-3",children:[(0,n.jsx)(l.x,{i18nKey:"user:PLAN_LIMITS.TITLE",components:[(0,n.jsx)(x.q,{text:(0,n.jsx)(n.Fragment,{children:t((0,f.gb)(s?.subscriptionType))})})]}),":"]}),(0,n.jsx)(m.R,{text:(0,n.jsxs)(n.Fragment,{children:[t("PLAN_LIMITS.PORTFOLIOS"),":"," ",(0,n.jsxs)("b",{children:[!!a?.portfoliosCount&&(0,n.jsxs)(n.Fragment,{children:[a?.portfoliosCount,"/"]}),d.portfolios??(0,n.jsx)(n.Fragment,{children:"â"})]})]}),warn:!!(d.portfolios&&a&&a.portfoliosCount&&d.portfolios<a.portfoliosCount)}),(0,n.jsx)(m.R,{text:(0,n.jsxs)(n.Fragment,{children:[t("PLAN_LIMITS.HOLDINGS"),":"," ",(0,n.jsxs)("b",{children:[!!a?.holdingsCount&&(0,n.jsxs)(n.Fragment,{children:[a?.holdingsCount,"/"]}),d.holdings??(0,n.jsx)(n.Fragment,{children:"â"})]}),!!(d.holdings&&a&&a.holdingsCount&&d.holdings<a.holdingsCount)&&!!a?.soldHoldingsCount&&(0,n.jsxs)("span",{className:"font-size-sm ml-2",children:["(â ï¸"," ",t("PLAN_LIMITS.SOLD_HOLDINGS.MESSAGE",{count:a?.soldHoldingsCount}),")"]})]}),warn:!!(d.holdings&&a&&a.holdingsCount&&d.holdings<a.holdingsCount)}),(0,n.jsx)(m.R,{text:(0,n.jsxs)(n.Fragment,{children:[t("PLAN_LIMITS.CUSTOM_HOLDINGS"),":"," ",(0,n.jsxs)("b",{children:[!!a?.customHoldingsCount&&(0,n.jsxs)(n.Fragment,{children:[a?.customHoldingsCount,"/"]}),d.customHoldings??(0,n.jsx)(n.Fragment,{children:"â"})]})]}),warn:!!(d.customHoldings&&a&&a.customHoldingsCount&&d.customHoldings<a.customHoldingsCount)})]})})})}function j(e){let{t}=(0,o.B)(["user","common"]),s=(0,i.useRouter)(),m=(0,c.wA)(),{user:f}=(0,c.d4)(e=>e.auth),[j,v]=(0,r.useState)({});function A(e){m({type:u.QN.StartRefreshAccessToken}),e||b.uT(t("SUBSCRIPTION_ALERT.SUCCESS_MESSAGE"))}return(0,r.useEffect)(()=>{a.A.get(`${d.kn6}/get-counts`).then(e=>{let{data:t}=e;t&&v(t)}).catch(e=>{console.error(e)})},[f]),(0,n.jsxs)("div",{className:"text-center mt-5",children:[(0,n.jsx)("div",{children:(0,n.jsx)("img",{height:"170",src:"/media/svg/illustrations/profit.png"})}),(0,n.jsx)("h1",{children:(0,n.jsx)(l.x,{i18nKey:"user:PAYWALL.LIMITS.TITLE"})}),!e.fromNew&&(0,n.jsx)("div",{className:"text-dark-65 mt-3 mb-5 px-3",children:(0,n.jsxs)("div",{children:["â ï¸"," ",(0,n.jsx)(l.x,{i18nKey:"user:PAYWALL.LIMITS.EXCEEDED_MESSAGE",components:[(0,n.jsx)(p.o,{className:"alert-link font-weight-bold",href:"/user-manage-subscription"}),(0,n.jsx)(x.q,{isBold:!0,text:(0,h.VQ)()})]})," ",(0,n.jsx)(l.x,{i18nKey:"user:PAYWALL.LIMITS.EXCEEDED_MESSAGE.REMOVE",components:[(0,n.jsx)("a",{href:void 0,onClick:()=>{A()},className:"font-weight-bold"})]})]})}),e.fromNew&&(0,n.jsxs)("div",{className:"text-dark-65 mt-3 mb-5",children:["â ï¸"," ",(0,n.jsx)(l.x,{i18nKey:"user:PAYWALL.LIMITS.NEW_MESSAGE",components:[(0,n.jsx)(p.o,{className:"alert-link font-weight-bold",href:"/user-manage-subscription"}),(0,n.jsx)(x.q,{isBold:!0,text:(0,h.VQ)()})]})]}),(0,n.jsx)(N,{counts:j}),(0,n.jsxs)("div",{className:"mt-7",children:[!e.fromNew&&(0,n.jsxs)("button",{type:"button",onClick:()=>{A()},className:"btn btn-clean btn-elevate btn-lg font-weight-bold mr-2",children:[(0,n.jsx)(g.A,{src:"/media/svg/icons/General/Update.svg",color:"none",size:"md"})," ",t("BUTTON.RELOAD")]}),(0,n.jsxs)("button",{id:"paywall-limit-message-upgrade",type:"button",onClick:function(){s.push("/user-manage-subscription"),e.hide&&e.hide()},className:"btn btn-primary btn-lg font-weight-bold",children:[(0,n.jsx)(g.A,{src:"/media/svg/icons/General/rocket.svg",color:"none",size:"md"})," ",t("BUTTON.UPGRADE")]})]})]})}},11754:e=>{e.exports={unavailableMessage:"AiChatUnavailableNotice_unavailableMessage__3nud_",unavailableCard:"AiChatUnavailableNotice_unavailableCard__vFIGr",unavailableIcon:"AiChatUnavailableNotice_unavailableIcon__899RB",unavailableBody:"AiChatUnavailableNotice_unavailableBody__0uuNE"}},13285:(e,t,s)=>{"use strict";s.d(t,{F:()=>d});var n=s(75834),a=s(93760),i=s(7086),r=s(36241),o=s(15269),l=s(63390),c=s(32683);function d(e){let{portfolioId:t,userId:s,userRole:d,checkRoles:m}=e,{t:u}
1=(0,a.B)("common"),[h,p]=(0,n.useState)([]),[x,g]=(0,n.useState)(!1),f=(e,t)=>!0!==t||((e?.includes("headSupport")||e?.includes("support"))??!1),b=(0,n.useCallback)(async()=>{if(t&&f(d,m)){g(!0);try{let e=await i.A.get(`${l.Zwb}/${t}`,{portfolioId:t});p(e.data),g(!1)}catch(t){console.error(t);let e=(0,r.g6)(`${u("ERROR.FAILED_TO_LOAD_DATA")}: 2`,t);o.f1(e),g(!1)}}},[t,d,m]),N=(0,n.useCallback)(async()=>{if(s&&f(d,m)){g(!0);try{let e=await i.A.get(`${c.Vr}/${s}`);p(e.data||[])}catch(t){console.error(t);let e=(0,r.g6)(`${u("ERROR.FAILED_TO_LOAD_DATA")}: 3`,t);o.f1(e)}finally{g(!1)}}},[s,d,m]);return(0,n.useEffect)(()=>{t?b():s&&N()},[t,s,b,N]),{load:t?b:N,data:h,isLoading:x}}},14498:e=>{e.exports={root:"QuoteCard_root__e_YtM",buttonStar:"QuoteCard_buttonStar__A9N88"}},15124:(e,t,s)=>{"use strict";s.d(t,{N:()=>i,U:()=>a});var n=s(62379);function a(e,t){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,n.A)(e.providerSyncDate??e.syncDate,new Date,{addSuffix:!0,locale:t})))}function i(e,t){if(e?.length)for(let s of e)a(s,t)}},16974:e=>{e.exports={usageBar:"AiChatUsage_usageBar__yww5E",totalUsage:"AiChatUsage_totalUsage__zUcv7"}},17507:(e,t,s)=>{"use strict";s.d(t,{O:()=>j});var n=s(26514),a=s(32673),i=s(59757),r=s(75834),o=s(93760),l=s(23141
3),c=s(32491),d=s.n(c),m=s(16926),u=s(80315),h=s(95441),p=s(5771),x=s(80170),g=s(37423),f=s(48889),b=s.n(f),N=s(3859);function j(e){let{t}=(0,o.B)("promos"),{showBrokerPromosModal:s}=(0,i.d4)(e=>{let{ui:t}=e;return t}),c=(0,i.wA)(),[f,j]=(0,r.useState)(!1),[v,A]=(0,r.useState)(!1),{isLoading:_,data:C,refetch:E}=(0,h.Hg)(),{anyRunningPromo:T,tbankData:I,bcsData:S}=(0,r.useMemo)(()=>{if(!C?.promos?.length)return{anyRunningPromo:!1,tbankData:null,bcsData:null};let e=d()(C.promos,e=>e.type===h.lo.TBANK&&e.isPromoStillRunning),t=d()(C.promos,e=>e.type===h.lo.BCS&&e.isPromoStillRunning);return{anyRunningPromo:!!e||!!t,tbankData:e??null,bcsData:t??null}},[C?.promos]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.a,{...e,size:"lg",show:s||e.alwaysVisible,onHide:()=>{c((0,m.yi)(!1))},onShow:()=>{(0,h.XB)(),E()},dialogClassName:`${b().modalDialog} ${e.fullScreen?b().fullScreen:""}`,bodyClassName:b().modalBody,title:(0,n.jsx)("div",{className:`pl-4 pl-sm-0 mb-2 ${b().title}`,children:t("PROMOS.MODAL.TITLE")}),children:(0,n.jsxs)(a.A,{gap:{xs:2,sm:2},children:[_&&(0,n.jsx)(p.J,{count:2}),!_&&T&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:b().divider}),(0,n.jsx)("div",{children:!!S&&(0,n.jsx)(x.d,{title:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.COMPACT.TITLE",components:[(0,n.jsx)("span",{className:"text-nowrap"})]}),iconUrl:"/media/brokers/bcs_logo_big.png",onClick:()=>{A(!0)}})})]})]})}),(0,n.jsx)(N.A,{show:f,data:I,onPromocodeClaimed:E,onHide:()=>{j(!1)}}),(0,n.jsx)(g.C,{show:v,data:S,onPromocodeClaimed:E,onHide:()=>{A(!1)}})]})}},17618:(e,t,s)=>{"use strict";s.d(t,{EL:()=>d,OF:()=>f,Rq:()=>u,x2:()=>b,e2:()=>N});var n=s(7086),a=function(e){return e.BASE="{apiUrl}/api/custom-quotes",e}({});async function i(){let{data:e}=await n.A.get(a.BASE);return e}async function r(e){let{data:t}=await n.A.post(a.BASE,e);return t.favoriteQuoteId}async function o(e){await n.A.delete(`${a.BASE}?favoriteQuoteId=${e}`)}async function l(e){await n.A.put(a.BASE,{favoriteQuoteIds:e})}var c=s(33989);function d(e){let{assetInfoId:t,toCurrency:s}=e;return`${t}${s?`:${s}`:""}`}let m="quotes";function u(){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 h=s(85398),p=s(14063),x=s(27188),g=s(46833);function f(){let e=(0,h.jE)(),t=(0,p.n)({mutationFn:e=>r({assetInfoId:e.assetInfoId,quoteCurrency:e.quoteCurrency??""}),onMutate:async t=>{e.cancelQueries({queryKey:[m]});let s=e.getQueryData([m]);if(!s)return;let n=[...s.recommended,...s.favourites].find(e=>e.quoteId===d({...t,toCurrency:t.quoteCurrency}));n&&e.setQueryData([m],e=>e?{favourites:e.favourites.map(e=>e.quoteId===n.quoteId?{...e,isDisabled:!0}:e),recommended:e.recommended.map(e=>e.quoteId===n.quoteId?{...e,isDisabled:!0}:e)}:e)},onSuccess:(e,t)=>{let s=(0,x.eM)().map(s=>s.assetInfoId===t.assetInfoId?{...s,favoriteQuoteId:e}:s);(0,x.hY)(s)},onSettled:()=>{e.invalidateQueries({queryKey:[m]}),e.invalidateQueries({queryKey:[g.If]})}});return{...t,addFavouriteQuote:t.mutateAsync}}function b(){let e=(0,h.jE)(),t=(0,p.n)({mutationFn:o,onMutate:t=>{e.cancelQueries({queryKey:[m]});let s=e.getQueryData([m]);if(!s)return;let n=[...s.recommended,...s.favourites].find(e=>e.favoriteQuoteId===t);n&&e.setQueryData([m],e=>e?{favourites:e.favourites.map(e=>e.quoteId===n.quoteId?{...e,isDisabled:!0}:e),recommended:e.recommended.map(e=>e.quoteId===n.quoteId?{...e,isDisabled:!0}:e)}:e)},onSuccess:(e,t)=>{let s=(0,x.eM)().map(e=>e.favoriteQuoteId===t?{...e,favoriteQuoteId:null}:e);(0,x.hY)(s)},onSettled:()=>{e.invalidateQueries({queryKey:[m]}),e.invalidateQueries({queryKey:[g.If]})}});return{...t,removeFavouriteQuote:t.mutateAsync}}function N(){let e=(0,h.jE)(),t=(0,p.n)({mutationFn:l,onMutate:async t=>{e.cancelQueries({queryKey:[m]});let s=e.getQueryData([m]);if(!s)return;let n=[];t.forEach(e=>{let t=s.favourites.find(t=>{let{favoriteQuoteId:s}=t;return s===e});t&&n.push(t)}),e.setQueryData([m],e=>({...e,favourites:n}))},onSettled:()=>{e.invalidateQueries({queryKey:[m]}
3),e.invalidateQueries({queryKey:[g.If]})}});return{...t,updateFavouriteQuoteOrder:t.mutateAsync}}},19806:e=>{e.exports={footer:"AiChatPanelFooter_footer__HxNax",detailsBtn:"AiChatPanelFooter_detailsBtn__N41C_",feedbackBtn:"AiChatPanelFooter_feedbackBtn__RdVvb"}},20108:e=>{e.exports={row:"AiChatHistoryRow_row__atlOo",active:"AiChatHistoryRow_active__GG3EW",title:"AiChatHistoryRow_title__G2omh",confirming:"AiChatHistoryRow_confirming__ecouX",rowMain:"AiChatHistoryRow_rowMain__nW85q",rowBody:"AiChatHistoryRow_rowBody__XoxIy",deleteConfirm:"AiChatHistoryRow_deleteConfirm__AT05x",inlineConfirm:"AiChatHistoryRow_inlineConfirm__O7KwK"}},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,t,s)=>{"use strict";s.d(t,{I:()=>g});var n=s(26514);s(75834);var a=s(59757),i=s(46225),r=s(93760),o=s(78231),l=s(33734),c=s(60547),d=s(5625),m=s(45251),u=s(47894),h=s(65119),p=s(83602),x=s(62400);function g(e){let{isDark:t,toggleTheme:s}=(0,p.DP)(),g=(0,i.useRouter)(),f=(0,u.sc)(),{t:b}=(0,r.B)("layout"),{user:N,referral:j,partnerUtm:v}=(0,a.d4)(e=>{let{auth:t,app:s}=e;return{user:t.user,referral:s.referral,partnerUtm:s.partnerUtm}}),A=g.pathname.indexOf("public/portfolios/")>=0,_={pathname:"/auth/registration",query:{...j?{promo:j}:{},...v?{p_utm:v}:{}}};return(0,n.jsxs)("div",{className:"mobile"!=e.view?"topbar":"d-flex align-items-center",children:[(0,n.jsx)(x.l,{isNewPage:!1}),(0,n.jsx)("div",{className:`mx-2 topbar-item ${!f?"d-none d-md-flex":""}`,children:(0,n.jsx)(l.A,{isDark:t,onChange:s})}),A&&(0,n.jsx)(h.J,{view:e.view}),(0,n.jsx)(o.Q,{persistor:d.qj,children:e.isSignedIn||N?(0,n.jsx)("div",{className:"topbar-item ml-3",children:(0,n.jsx)(m.N,{legacyBehavior:!0,href:"/dashboard",children:(0,n.jsx)("a",{className:"btn btn-light-primary font-weight-bold",children:b("mobile"!=e.view?"TOPBAR.TO_MY_PORTFOLIOS":"TOPBAR.TO_PORTFOLIOS")})})}):(0,n.jsx)("div",{className:"topbar-item ml-3",children:(0,n.jsx)(m.N,{legacyBehavior:!0,href:_,children:(0,n.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,t,s)=>{"use strict";s.d(t,{R:()=>p,S:()=>x});var n=s(26514);s(75834);var a=s(93760),i=s(9610),r=s.n(i),o=s(75119),l=s.n(o),c=s(62531),d=s(47115),m=s(55285),u=s(50007),h=s(97043);function p(e){return(0,n.jsxs)("div",{className:`d-flex align-items-top mb-2 ${e.warn&&"text-warning"}`,children:[!e.warn&&(0,n.jsx)(n.Fragment,{children:"â"}),e.warn&&(0,n.jsx)("span",{children:"â"}),!!e.description&&(0,n.jsx)(h.o,{title:e.description,nonInteractive:!0,children:(0,n.jsx)("span",{className:"text-left pl-2 hoverable-item",children:e.text})}),!e.description&&(0,n.jsx)("span",{className:"text-left pl-2",children:e.text}),e.isNew&&(0,n.jsx)("span",{className:"ml-2",children:(0,n.jsx)(u.L,{type:"label"})})]})}function x(e){let{t}=(0,a.B)(["user","common"]),s=(0,m.de)(),i=[{text:t("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_2"),value:"2",available:s?[d.Qh.TRIAL]:[d.Qh.TRIAL,d.Qh.TIER_1]},{text:t("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_UNLIM"),value:"â",available:[d.Qh.TIER_1_OLD,d.Qh.TIER_3]},{text:t("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_1"),value:"1",available:s?[d.Qh.TIER_0,d.Qh.TIER_1]:[d.Qh.TIER_0]},{text:t("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_10"),value:"10",available:s?[d.Qh.TIER_2]:[]},{text:t("USER.PRICING.OPTIONS.PORTFOLIOS_COUNT_20"),value:"20",available:s?[]:[d.Qh.TIER_2]},{text:t("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:t("USER.PRICING.FEATURES.MCP"),available:[d.Qh.TIER_3],isNew:!0,description:(0,n.jsx)(n.Fragment,{children:t("MCP.DESCRIPTION.USER")})},{text:t("USER.PRICING.OPTIONS.ASSETS_COUNT_10"),value:"10",available:[d.Qh.TIER_0],note:t("USER.PRICING.OPTIONS.ASSETS_COUNT.NOTE")},{text:t("USER.PRICING.OPTIONS.CUSTOM_HOLDINGS_COUNT_1"),value:"1",available:[d.Qh.TIER_0]},{text:t("USER.PRICING.OPTIONS.CUSTOM_HOLDINGS_COUNT_5"),value:"5",available:[d.Qh.TRIAL,d.Qh.TIER_1]},{text:t("USER.PRICING.OPTIONS.CUSTOM_HOLDINGS_COUNT_UNLIM"),value:"â",available:[d.Qh.TIER_1_OLD,d.Qh.TIER_2,d.Qh.TIER_3]},{text:t("USER.PRICING.OPTIONS.WATCHLIST_COUNT_1"),value:"1",available:[d.Qh.TIER_0,d.Qh.TRIAL]},{text:t("USER.PRICING.OPTIONS.WATCHLIST_COUNT_2"),value:"2",available:[d.Qh.TIER_1]},{text:t("USER.PRICING.OPTIONS.WATCHLIST_COUNT_10"),value:"10",available:[d.Qh.TIER_2]},{text:t("USER.PRICING.OPTIONS.WATCHLIST_COUNT_20"),value:"20",available:[d.Qh.TIER_1_OLD,d.Qh.TIER_3]},{text:t("USER.PRICING.FEATURES.CUSTOM_QUOTES"),available:[d.Qh.TIER_1]},{text:t("USER.PRICING.FEATURES.SYNC_BROKERAGE"),available:[d.Qh.TIER_1],globalOnly:!0},{text:t("USER.PRICING.FEATURES.WHY_IS_IT_MOVING"),available:[d.Qh.TIER_2,d.Qh.TIER_3],globalOnly:!0,description:(0,n.jsx)(n.Fragment,{children:t("USER.PRICING.FEATURES.WHY_IS_IT_MOVING.HELP")})},{text:t("USER.PRICING.OPTIONS.PORTFOLIO_REPORT"),available:[d.Qh.TIER_2]},{text:t("USER.PRICING.FEATURES.ASSET_TYPES"),available:[d.Qh.TIER_0]},{text:t("USER.PRICING.FEATURES.CALENDAR"),available:[d.Qh.TIER_0]},{text:t("USER.PRICING.FEATURES.BROKER_REPORTS"),available:[d.Qh.TIER_0]},{text:t("USER.PRICING.FEATURES.TINKOFF_API_MANUAL"),available:s?[]:[d.Qh.TIER_0]},{text:t("USER.PRICING.FEATURES.TINKOFF_API_FULL"),available:s?[]:[d.Qh.TIER_1]},{text:t("USER.PRICING.FEATURES.BENCHMARK_LIMITED"),available:[d.Qh.TIER_0]},{text:t("USER.PRICING.FEATURES.BENCHMARK_FULL"),available:[d.Qh.TIER_2]},{text:t("USER.PRICING.FEATURES.CASH_FULL"),available:[d.Qh.TIER_0]},{text:t("USER.PRICING.FEATURES.INSIGHTS"),available:s?[]:[d.Qh.TIER_1],isNew:!0}
3,{text:t("USER.PRICING.FEATURES.REBALANCE_LIMITED"),available:[d.Qh.TIER_0]},{text:t("USER.PRICING.FEATURES.REBALANCE_FULL"),available:[d.Qh.TIER_1]},{text:t("USER.PRICING.FEATURES.WEEKLY_UPDATE"),available:[d.Qh.TIER_1]},{text:t("USER.PRICING.FEATURES.DIVIDEND_SCORE"),available:[d.Qh.TIER_1]},{text:t("USER.PRICING.FEATURES.DIVFINDER_5"),available:[d.Qh.TIER_0]},{text:t("USER.PRICING.FEATURES.DIVFINDER_20"),available:[d.Qh.TIER_1]},{text:t("USER.PRICING.FEATURES.DIVFINDER_FULL"),available:[d.Qh.TIER_2]},{text:t("USER.PRICING.FEATURES.FUNDAMENTALS_10Y.NAME"),available:[d.Qh.TIER_2]},{text:t("USER.PRICING.FEATURES.BACKTEST_30Y.NAME"),available:[d.Qh.TIER_2]},{text:t("USER.PRICING.FEATURES.DIV_PUSH_NOTIFICATIONS"),available:[d.Qh.TIER_1]},{text:t("USER.PRICING.FEATURES.DIV_PUSH_AND_EMAIL_NOTIFICATIONS"),available:[d.Qh.TIER_2]}],o=r()(i,t=>(!t.globalOnly||t.globalOnly&&s)&&t.available.indexOf(e.tier)>=0).map(t=>({text:t.text,yes:t.available.indexOf(e.tier)>=0,isNew:t.isNew,description:t.description})),u=e.showCollapsed>0?l()(o,e.showCollapsed):o;return(0,n.jsxs)("div",{className:"pt-4",children:[u.map((e,t)=>(0,n.jsx)(p,{text:e.text,isNew:e.isNew,description:e.description,yesno:!0,yes:e.yes},t)),u.length<o.length&&(0,n.jsx)("div",{children:(0,n.jsxs)("button",{type:"button",className:"btn btn-link-light text-muted text-hover-dark",onClick:()=>{e.onCollapseChange&&e.onCollapseChange(!1)},children:[(0,n.jsx)(c.A,{fontSize:"sm",sx:{marginRight:"2px"}}),t("BUTTON.SEE_MORE_FEATURES",{ns:"common"})]})})]})}},23667:(e,t,s)=>{"use strict";s.d(t,{L2:()=>d,td:()=>c,Dl:()=>m,LO:()=>r,XB:()=>o,Rq:()=>l});var n=s(7086);let a="/api/integrations/public-brokerage";var i=function(e){return e[e.ON_CLOSE_DASHBOARD_NOTIFICATION=`${a}/on-close-dashboard-notification`]="ON_CLOSE_DASHBOARD_NOTIFICATION",e[e.ON_DIALOG_OPENED=`${a}/on-dialog-opened`]="ON_DIALOG_OPENED",e[e.ON_SIGNUP_LINK_CLICKED=`${a}/on-signup-link-clicked`]="ON_SIGNUP_LINK_CLICKED",e[e.GET_DIALOG_INFO=`${a}/get-dialog-info`]="GET_DIALOG_INFO",e[e.RECEIVE_BONUS=`${a}/receive-bonus`]="RECEIVE_BONUS",e[e.GET_CONNECTION_LINK=`{apiUrl}${a}/get-connection-link`]="GET_CONNECTION_LINK",e}({});async function r(){return n.A.post(i.ON_CLOSE_DASHBOARD_NOTIFICATION)}async function o(){return n.A.post(i.ON_DIALOG_OPENED)}async function l(){return n.A.post(i.ON_SIGNUP_LINK_CLICKED)}async function c(){return n.A.get(i.GET_DIALOG_INFO).then(e=>{let{data:t}=e;return t})}async function d(){return n.A.get(i.GET_CONNECTION_LINK).then(e=>{let{data:t}=e;return t.link})}async function m(){return n.A.post(i.RECEIVE_BONUS)}},24138:(e,t,s)=>{"use strict";s.d(t,{Bz:()=>i,PN:()=>l,gb:()=>a,s2:()=>o,sp:()=>r});var n=s(47115);function a(e){switch(e){case n.Qh.TRIAL:return"USER.PRICING.TRIAL_SUBSCRIPTION";case n.Qh.TIER_0:return"USER.PRICING.FREE_SUBSCRIPTION";case n.Qh.TIER_1:return"USER.PRICING.TIER1";case n.Qh.TIER_2:return"USER.PRICING.TIER2";case n.Qh.TIER_3:return"USER.PRICING.TIER3";case n.Qh.TIER_1_OLD:return"USER.PRICING.FULL_SUBSCRIPTION";default:return""}}function i(e){switch(e){case n.Qh.TIER_0:return"USER.PRICING.FREE_SUBSCRIPTION.FOR_WHO";case n.Qh.TIER_1:return"USER.PRICING.TIER1.FOR_WHO";case n.Qh.TIER_2:return"USER.PRICING.TIER2.FOR_WHO";case n.Qh.TIER_3:return"USER.PRICING.TIER3.FOR_WHO";case n.Qh.TIER_1_OLD:return"USER.PRICING.FULL_SUBSCRIPTION.FOR_WHO";case n.Qh.TRIAL:return"USER.PRICING.TRIAL.FOR_WHO";default:return""}}function r(e){switch(e){case n.Qh.TRIAL:return 2;case n.Qh.TIER_0:case n.Qh.TIER_1:return"1";case n.Qh.TIER_2:return"10";default:return null}}function o(e){switch(e){case n.Qh.TIER_0:return 1;case n.Qh.TIER_1:return 5;default:return null}}function l(e){return e===n.Qh.TIER_0?10:null}},25294:e=>{e.exports={root:"SubscriptionExpirationNotification_root__vKbIX",list:"SubscriptionExpirationNotification_list__V1RGB"}},27188:(e,t,s)=>{"use strict";s.d(t,{GK:()=>l,eM:()=>o,hY:()=>c});var n=s(75119),a=s.n(n),i=s(4469);let r="RecentSearchMainTop";function o(){let{items:e}=(0,i.Gu)(r,{items:[]});return e.filter(e=>{let{value:t}=e;return!!t})}function l(e){let t=o().filter(t=>{let{value:s}=t;return s!==e.value});t.unshift(e),t=a()(t,5),(0,i.LZ)(r,{items:t})}function c(e){(0,i.LZ)(r,{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"}},31108:(e,t,s)=>{"use strict";s.d(t,{P:()=>o});var n=s(7086),a=s(63390);let i=new Map;function r(e){return{currency:e.currency??null,inOneCurrency:e.inOneCurrency,items:[...e.items??[]].map(e=>({portfolioId:e.portfolioId,currency:e.currency??null})).sort((e,t)=>
3{let s=e.portfolioId.localeCompare(t.portfolioId);return 0!==s?s:(e.currency??"").localeCompare(t.currency??"")})}}function o(e,t){let s=function(e,t){let s=r(e);return JSON.stringify({endpoint:"DashboardStats/portfolio-list",clientId:t?.clientId??window.location.pathname.match(/\/clients\/([^/]+)/)?.[1]??null,...s})}(e,t),o=i.get(s);if(o)return o;let l=r(e),c=n.A.post(t?.url??a.kLg,l).then(e=>e.data).finally(()=>{i.delete(s)});return i.set(s,c),c}},31614:e=>{e.exports={item:"QuotesListSortable_item__LpDG4",dragHandle:"QuotesListSortable_dragHandle__pqXiy"}},31778:e=>{e.exports={close:"Alert_close__znLQn"}},32683:(e,t,s)=>{"use strict";s.d(t,{$4:()=>f,$W:()=>m,Dv:()=>n,KV:()=>c,Ll:()=>l,MV:()=>u,Os:()=>o,Pp:()=>h,Vr:()=>x,bG:()=>p,fU:()=>a,mz:()=>d,tQ:()=>g,tz:()=>r,yq:()=>i});let n="/api/support/user/set-password",a="/api/support/user/get-subscription",i="/api/support/user/update-subscription",r="/api/support/user/unsubscribe",o="/api/support/user/get-webhooks",l="/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",u="{apiUrl}/api/IBKRSync/get-metadata",h="{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",f="/api/admin/users/update-referral"},32781:(e,t,s)=>{"use strict";s.d(t,{_:()=>f});var n=s(26514),a=s(75834),i=s(4847),r=s(50216),o=s(24665),l=s(7086),c=s(93760),d=s(23141),m=s(36728),u=s(15269),h=s(63390),p=s(22871),x=s(554),g=s.n(x);function f(e){let{title:t,ratingContent:s,messageContent:x,type:f=p.M.OTHER,onRatingSubmit:b,...N}=e,{t:j}=(0,c.B)(["layout","common"]),[v,A]=(0,a.useState)(!1),[_,C]=(0,a.useState)("rating"),[E,T]=(0,a.useState)(null),[I,S]=(0,a.useState)(""),y=()=>{A(!0),l.A.post(h.Yqn,{stars:E,message:I,feedbackType:f}).then(()=>{C("success")}).catch(()=>{(0,u.f1)("ERROR.FEEDBACK_FAILED")}).finally(()=>{A(!1)})},O=()=>{E&&(E>=4?y():C("message"),b?.(E))};(0,a.useEffect)(()=>{if("success"!==_)return;let e=setTimeout(()=>{N.onHide()},5e3);return()=>clearTimeout(e)},[_]);let R="success"===_?j("FEEDBACK.POPUP.SUCCESS.TITLE"):t,w=E?"btn-primary":"";return(0,n.jsxs)(m.z,{...N,isBlocking:v,rootClassName:g().feedbackPopup,title:R,buttonsComponent:e=>{let{primaryBtnClassName:t}=e;return"rating"===_?(0,n.jsx)("button",{type:"button",className:`${t} ${w}`,onClick:O,disabled:!E,children:j("FEEDBACK.POPUP.SUBMIT")}):"message"===_?(0,n.jsx)("button",{type:"button",className:t,onClick:y,children:j("FEEDBACK.POPUP.SEND")}):(0,n.jsx)("button",{type:"button",className:t,onClick:N.onHide,children:j("common:BUTTON.CLOSE")})},children:["rating"===_&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{children:(0,n.jsx)(d.x,{children:s})}),(0,n.jsx)(i.A,{value:E,onChange:(e,t)=>
3T(t),max:5,icon:(0,n.jsx)(r.A,{sx:{color:"#F59E0B",fontSize:40}}),emptyIcon:(0,n.jsx)(r.A,{sx:{color:"#7E8299",fontSize:40}})})]}),"message"===_&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:g().content,children:(0,n.jsx)(d.x,{children:x})}),(0,n.jsx)(o.A.Control,{className:`form-control-solid ${g().textarea}`,as:"textarea",placeholder:j("FEEDBACK.POPUP.MESSAGE.PLACEHOLDER"),size:"lg",rows:4,value:I,onChange:e=>S(e.target.value)})]}),"success"===_&&(0,n.jsx)("div",{children:j("FEEDBACK.POPUP.SUCCESS.TEXT")})]})}},33244:(e,t,s)=>{"use strict";s.d(t,{J5:()=>r,MW:()=>a,O5:()=>i,uG:()=>n});var n=function(e){return e.CLIENT="client",e.PLAYGROUND="playground",e}({}),a=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}({}),r=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,t,s)=>{"use strict";s.d(t,{$:()=>b});var n=s(26514),a=s(75834),i=s(93760),r=s(60890),o=s.n(r),l=s(7086),c=s(46225),d=s(59757),m=s(63390),u=s(5771),h=s(49732),p=s(33807),x=s(16926),g=s(73419);function f(e){let{data:t,...s}
3=e,{t:a}=(0,i.B)(["layout","common"]),r=(0,c.useRouter)(),d=1==t.status;async function u(){if(d)try{let e=m.EbW;if(await l.A.post(`${e}/${t.id}`,{}),t.actionLink&&(r.push(t.actionLink),s.compact)){let e=p.A.getOffcanvas();e&&e.hide()}s.onRead&&s.onRead()}catch(e){console.error(e)}else t.actionLink&&r.push(t.actionLink)}return(0,n.jsx)("div",{className:`${!s.compact?"py-5 px-8":"py-3 px-5"} bg-hover-light cursor-pointer ${d&&"bg-light"}`,onClick:()=>{u()},children:(0,n.jsxs)("div",{className:"d-flex align-items-start",children:[(0,n.jsx)("div",{className:"mr-5",children:function(){let e="General/Notifications1.svg";switch(t.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,n.jsx)("span",{className:`symbol symbol-light ${!s.compact?"symbol-30":"symbol-20"}`,children:(0,n.jsx)("span",{className:"symbol-label",children:(0,n.jsx)(h.A,{size:s.compact?"sm":"lg",color:"dark",src:`/media/svg/icons/${e}`})})})}()}),(0,n.jsxs)("div",{style:{wordBreak:"break-word"},children:[(0,n.jsxs)("div",{className:"mb-2",children:[d&&(0,n.jsx)("span",{className:"label label-dot label-lg label-danger mr-2"}),(0,n.jsx)("span",{className:"font-weight-bold",children:t?.messageTitle?.replace("#","")?.trim()}),t?.messageTitle&&(0,n.jsx)("span",{className:"px-2 text-dark-50",children:"â¢"}),(0,n.jsx)("span",{className:"font-size-sm text-dark-50",children:a("DATE_NOTIF_FORMAT",{ns:"common",date:new Date(t.createdDate)})})]}),(0,n.jsx)("div",{className:"text-dark-50 note-wrapper",children:(0,n.jsx)(o(),{children:t?.messageDescription})})]})]})})}function b(e){let{t}=(0,i.B)(["layout","common"]),s=(0,c.useRouter)(),r=(0,d.wA)(),[o,h]=(0,a.useState)([]),[g,b]=(0,a.useState)(0),[N,j]=(0,a.useState)(1),[v,A]=(0,a.useState)(10),[_,C]=(0,a.useState)(!1),[E,T]=(0,a.useState)(!e.compact),{notificationReload:I}=(0,d.d4)(e=>{let{ui:t}=e;return{notificationReload:t.notificationReload??""}},d.bN);async function S(e){try{if(!E&&!e)return;C(!0);let t=m.T9V,s=(await l.A.get(t,{params:{page:N,pageSize:v}})).data;b(s.totalCount),1==N?h(s.data):h([...o,...s.data])}catch(e){console.error(e)}C(!1)}function y(){r((0,x.ot)()),e.onRead&&e.onRead()}async function O(){try{let e=m.qQ3;await l.A.post(e,{}),y()}catch{}}return(0,a.useEffect)(()=>{1!=N||10!=v?(A(o.length>10?o.length:10),j(1)):S()},[I]),(0,a.useEffect)(()=>{if(e.compact){p.A.getOffcanvas()||p.A.init("kt_quick_notifications");let e=p.A.getOffcanvas();e&&e.on("beforeShow",()=>{T(!0),S(!0)})}},[]),(0,a.useEffect)(()=>{e.compact||S()},[N,v]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-3",children:[(0,n.jsx)("div",{className:"font-size-h5 font-weight-bold mb-2",children:t("MENU.NOTIFICATIONS")}),(0,n.jsx)("div",{className:"d-flex align-items-center",children:(0,n.jsxs)("button",{type:"button",onClick:()=>{O()},className:"btn btn-link-primary btn-md font-weight-bold mb-2",children:[(0,n.jsx)("i",{className:"fas fa-check icon-nm mr-2 mt-n1"}),t("NOTIFICATIONS.MARK_ALL_AS_READ")]})})]}),_&&0==o.length&&(0,n.jsx)(u.J,{}),o.length>0&&(0,n.jsxs)("div",{className:`overlay ${_&&"overlay-block"}`,children:[(0,n.jsx)("div",{className:"card card-custom gutter-b py-3",children:(0,n.jsxs)("div",{className:"card-body p-0",children:[o.map((t,s)=>(0,n.jsx)("div",{className:`${(s<o.length-1||g>o.length)&&"border-bottom border-light"}`,children:(0,n.jsx)(f,{compact:e.compact,data:t,onRead:y})},t.id)),g>o.length&&(0,n.jsx)("div",{className:"py-6 d-flex justify-content-center",children:(0,n.jsx)("button",{type:"button",onClick:()=>{if(e.compact){let e=p.A.getOffcanvas();e&&e.hide(),s.push("/notifications")}else j(N+1)},className:"btn btn-lg btn-light text-dark font-weight-bold",children:t("BUTTON.MORE_ITEMS",{ns:"common"})})})]})}),_&&(0,n.jsx)("div",{className:"overlay-layer"})]})]})}},33689:(e,t,s)=>{"use strict";s.d(t,{zY:()=>et,n6:()=>k,EL:()=>v,Dn:()=>C,Te:()=>I,lo:()=>P});var n=s(26514),a=s(75834),i=s(89098),r=s(42197),o=s(52345),l=s(75165),c=s(54253),d=s(21069),m=s(73311),u=s(14498),h=s.n(u);
3function p(e){let{item:t,isFavourite:s=!1,isDisabled:a=!1,showFavourite:i=!0,isCompact:r=!1,onToggleFavourite:o}=e,u=t?.primaryLogo?(0,c.oK)(t?.primaryLogo):null,p=t?.logo?(0,c.oK)(t?.logo):null,x=u??p,g=t?.toLogo?(0,c.oK)(t?.toLogo):null,f=t?.fromLogo?(0,c.oK)(t?.fromLogo):null,b=t?.toCurrency?null:(0,d.A)(t.assetType,t.assetInfoId,t.ticker,t.exchange,t.priceCurrency),N=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l.b,{isMoney:!0,value:t.price,currency:t.priceCurrency??t.toCurrency,precision:4}),"\xa0\xa0",(0,n.jsx)(l.b,{isPercent:!0,value:t.dayGainPercent,showColors:!0,symbol:"triangle"})]}),j=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{onClick:()=>{b&&window.open(b)},className:`text-nowrap d-flex align-items-center ${!r&&"mb-2"} ${r&&b&&"cursor-pointer"}`,children:[!x&&(g||f)?(0,n.jsx)("span",{className:"mr-2",children:(0,n.jsx)(m.r,{fromLogo:f,toLogo:g,size:r?"sm":"md"})}):(0,n.jsx)(d.hz,{logoUrl:x,name:t.description,ticker:t.ticker}),(0,n.jsx)("b",{children:t.ticker}),r&&(0,n.jsxs)(n.Fragment,{children:["\xa0\xa0",N]})]}),!r&&(0,n.jsx)("div",{className:"text-nowrap",children:N})]});return r?j:(0,n.jsx)("div",{className:`d-flex flex-wrap card card-custom ${h().root} ${b&&"cursor-pointer"}`,children:(0,n.jsxs)("div",{className:"card-body py-4 px-6",children:[j,i&&(0,n.jsx)("button",{type:"button",className:`btn ${h().buttonStar}`,onClick:o,disabled:a,style:a?{opacity:.5}:null,children:(0,n.jsx)("i",{className:s?"fas fa-star text-warning":"far fa-star"})})]})})}var x=s(74406),g=s.n(x);function f(e){let{items:t,showFavourite:s=!0,onToggleFavourite:i,...r}=e,o=r.itemRenderer??(e=>e);return(0,n.jsx)("div",{className:g().root,children:t.map((e,t)=>(0,n.jsx)(a.Fragment,{children:o((0,n.jsx)(p,{isLink:!0,isDisabled:e.isDisabled,isFavourite:!!e.favoriteQuoteId,item:e,showFavourite:s,onToggleFavourite:()=>{i(e)}}),e)},t))})}var b=s(31614),N=s.n(b);function j(e){let{isDisabled:t=!1,onSort:s,items:a,...l}=e,{isMobile:c}=(0,r.l)(),d=a.map(e=>{let{quoteId:t}=e;return t});return(0,n.jsx)(o.bH,{items:d,isDisabled:t,onSort:e=>{let t=e.map(e=>a.find(t=>{let{quoteId:s}=t;return s===e}));s?.(t)},children:(0,n.jsx)(f,{...l,items:a,itemRenderer:(e,t)=>(0,n.jsx)(o.Uq,{id:t.quoteId,children:t=>{let{ref:s,attributes:a,listeners:r,style:o}=t;return(0,n.jsxs)("div",{...!c?r:{},...a,ref:s,className:`position-relative ${N().item}`,style:o,children:[e,(0,n.jsx)("div",{...c?r:{},className:N().dragHandle,children:(0,n.jsx)(i.A,{})})]})}})})})}function v(e){let{isSortable:t=!1,...s}=e,{isDisabled:a,onSort:i,...r}=s;return t?(0,n.jsx)(j,{...r,isDisabled:a,onSort:i}):(0,n.jsx)(f,{...r})}var A=s(52550),_=s.n(A);function C(e){let{items:t}=e;return(0,n.jsx)("div",{className:`row align-items-center ${_().root}`,children:t.map((e,t)=>(0,n.jsx)("div",{className:"col-xl-3 col-lg-4 col-md-auto",children:(0,n.jsx)("div",{className:"py-3",children:(0,n.jsx)(p,{isCompact:!0,item:e})})},t))})}var E=s(93760),T=s(83602);function I(){let{t:e}=(0,E.B)("analytics"),{isDark:t}=(0,T.DP)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:`font-size-lg font-weight-bold d-flex align-center mb-2 ${t?"text-muted":""}`,children:[(0,n.jsx)("i",{className:"far fa-star text-warning mr-3 icon-lg"}),e("QUOTES.FAVOURITES.NOT_FOUND.TITLE")]}),(0,n.jsx)("div",{className:"font-size-sm",children:e("QUOTES.FAVOURITES.NOT_FOUND.TEXT")})]})}var S=s(46225),y=s(83308),O=s(47894),R=s(22871),w=s(32781);function k(){let e=(0,S.useRouter)(),t=(0,O.iT)(R.Y.QUOTES),s=(0,y.Mw)(),{isFree:i}=(0,O.Jd)(),[r,o]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{if(t.isFeedbackShown||!t.date||e.asPath.includes("/quotes")||s.isRunning||i)return;let n=setTimeout(()=>{o(!0),t.saveFeedbackShownState()},3e4);return()=>{clearInterval(n)}},[t.isFeedbackShown,t.date,e.asPath,s.isRunning]),(0,n.jsx)(n.Fragment,{children:!!t.feedbackProps&&(0,n.jsx)(w._,{...t.feedbackProps,show:r,onHide:()=>{o(!1)}})})}var D=s(96456),L=s.n(D);function P(){let{t:e}=(0,E.B)(["analytics","common"]);return(0,n.jsx)("div",{className:"card card-custom h-md-100",children:(0,n.jsx)("div",{className:"card-body py-8",children:(0,n.jsxs)("div",{className:"d-flex align-items-start align-items-sm-center flex-column flex-sm-row",children:[(0,n.jsx)(L(),{id:"quotes-subscription-link",href:"/user-manage-subscription",className:"btn btn-gradient order-2 order-sm-1",children:e("GET_SUBSCRIPTION",{ns:"common"})}),(0,n.jsxs)("div",{className:"ml-sm-7 mb-6 mb-sm-0 order-1",children:[(0,n.jsx)("div",{className:"font-size-lg font-weight-bold",children:e("QUOTES.SUBSCRIPTION.TITLE")}),(0,n.jsx)("div",{children:e("QUOTES.SUBSCRIPTION.TEXT")})]})]})})})}var M=s(47115),B=s(17618),U=s(67614),F=s(75119),H=s.n(F),G=s(71359),$=s(90952),K=s(38099),Q=s(50690),z=s.n(Q),W=s(19982),q=s(14009),Y=s(49732),V=s(70188),X=s.n(V);function J(e){let{searchIcon:t,onChange:s,onSubmit:a,isLoading:i=!1,className:r,...o}=e,{t:l}=(0,E.B)("common");return(0,n.jsx)("form",{onSubmit:e=>{e.preventDefault(),a?.()},children:(0,n.jsxs)(W.A,{className:`${X().root} ${r??""}
3`,children:[(0,n.jsx)("input",{type:"text",onChange:e=>{s?.(e.target.value)},className:"form-control form-control-solid border-radius-right-0",placeholder:l("SEARCH_PLACEHOLDER"),...o}),!!o.value&&!i&&(0,n.jsx)(W.A.Append,{className:X().close,children:(0,n.jsx)(q.A,{type:"button",variant:"light btn-icon",onClick:()=>{s?.("")},children:(0,n.jsx)("i",{className:"ki ki-close"})})}),i&&(0,n.jsx)(W.A.Append,{children:(0,n.jsx)(W.A.Text,{className:"border-0",children:(0,n.jsx)("i",{className:"spinner spinner-sm"})})}),(0,n.jsx)(W.A.Append,{children:(0,n.jsx)(q.A,{type:"submit",variant:"light btn-icon",children:t??(0,n.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:t=Z,visibleItemsCount:s=15,searchViaApi:i=!0,searchIcon:r,renderItemResult:o,onItemClick:l,onDataLoaded:c}=e,{t:d}=(0,E.B)("layout"),[m,u]=(0,a.useState)(""),h=(0,O.d7)(m),{isLoading:p,data:x}=(0,K.ZB)({search:m?h:"",assetTypes:t,searchViaApi:i}),g=s?H()(x,s):x;return(0,a.useEffect)(()=>{x&&c(x)},[x]),(0,n.jsx)(G.x,{onClickAway:()=>{u("")},children:(0,n.jsxs)("div",{style:{position:"relative"},children:[(0,n.jsx)(J,{searchIcon:r,className:`${z().search} ${x?.length?z().searchWithResult:""}`,value:m,onChange:u,isLoading:p,placeholder:d("SEARCH_ASSET.PLACEHOLDER.SHORT")}),!!x?.length&&(0,n.jsx)("div",{className:z().result,children:(0,n.jsx)($.q,{openInNewTab:!0,data:g,renderItem:o,onItemClicked:l})})]})})}function et(){let e=(0,O.Jd)(),t=(0,S.useRouter)(),{addFavouriteQuote:s}=(0,B.OF)(),{removeFavouriteQuote:i}=(0,B.x2)(),[r,o]=(0,a.useState)([]),l=async n=>{if(!n.quoteId)return;if(e?.isFree)return void t.push("/user-manage-subscription");if(o(e=>e?.map(e=>e.quoteId===n.quoteId?{...e,isDisabled:!0}:e)),n.favoriteQuoteId)await i(n.favoriteQuoteId),o(e=>e?.map(e=>e.quoteId===n.quoteId?{...e,isDisabled:!1,favoriteQuoteId:null}:e));else{let e=await s({assetInfoId:n.assetInfoId,quoteCurrency:n.secondCurrency??""});o(t=>t?.map(t=>t.quoteId===n.quoteId?{...t,isDisabled:!1,favoriteQuoteId:e}:t))}let a=n.name??n.ticker??"",r=n.favoriteQuoteId?U.Mg.QUOTE_UNFAVORITED:U.Mg.QUOTE_FAVORITED;(0,U.s9)({event:r,asset_name:a})},c=[...Z,M.PW.QUOTE,M.PW.INDEX];return(0,n.jsx)(ee,{searchViaApi:!1,assetTypes:c,renderItemResult:(e,t)=>{let s=(0,B.EL)({assetInfoId:e.assetInfoId,toCurrency:e.secondCurrency}),a=r.find(e=>{let{quoteId:t}=e;return t===s});return(0,n.jsxs)("div",{className:"d-flex align-items-center w-100 cursor-pointer",onClick:e=>{e.stopPropagation(),e.preventDefault(),a&&l(a)},children:[t,(0,n.jsx)("i",{style:a?.isDisabled?{opacity:.5}:{},className:`fa-star icon-md ${a?.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,n.jsx)("i",{className:"flaticon2-plus",style:{fontSize:14}})})}},33734:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var n=s(26514);s(75834);let a=function(e){let{isDark:t,onChange:s}=e;return(0,n.jsx)("div",{children:(0,n.jsx)("span",{className:"switch switch-icon switch-mode switch-sm",children:(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{type:"checkbox",id:"modeSwitch",checked:t,onChange:s,"aria-label":"Dark mode switch"}),(0,n.jsx)("span",{})]})})})}},33807:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var n=s(73789),a=s(37786);let i=function(){var e,t,s=function(){var s=n.g.find(e,".offcanvas-header"),i=n.g.find(e,".offcanvas-content");t=new a.A(e,{overlay:!0,baseClass:"offcanvas",placement:"right",closeBy:"kt_quick_notifications_close",toggleBy:"kt_quick_notifications_toggle"}),n.g.scrollInit(i,{disableForMobile:!0,resetHeightOnDestroy:!0,handleWindowResize:!0,height:function(){var t=parseInt(n.g.getViewPort().height);return s&&(t-=parseInt(n.g.actualHeight(s)),t-=parseInt(n.g.css(s,"marginTop")),t-=parseInt(n.g.css(s,"marginBottom"))),i&&(t-=parseInt(n.g.css(i,"marginTop")),t-=parseInt(n.g.css(i,"marginBottom"))),t-=parseInt(n.g.css(e,"paddingTop")),t-=parseInt(n.g.css(e,"paddingBottom")),t-=2}})};return{init:function(t){(e=n.g.getById(t))&&s()},getElement:function(){return e},getOffcanvas:function(){return t}}}()},35791:(e,t,s)=>{"use strict";s.d(t,{Cm:()=>i,c9:()=>r,wh:()=>l});var n=s(26514);s(75834);var a=s(93760);let i=[{dataField:"date",order:"desc"}],r=[{text:"25",value:25},{text:"50",value:50},{text:"100",value:100}];function o(e){let{t}=(0,a.B)("common"),s=e.size>0?t("GRID.PAGINATION",{from:e.from,to:e.to,size:e.size}):t("GRID.PAGINATION.NO_RECORDS");return(0,n.jsx)(n.Fragment,{children:s})}let l=(e,t,s)=>(0,n.jsx)("span",{className:"react-bootstrap-table-pagination-total",children:(0,n.jsx)(o,{from:e,to:t,
3size:s})})},37322:(e,t,s)=>{"use strict";s.d(t,{i:()=>v});var n=s(26514),a=s(75834),i=s(62936),r=s.n(i),o=s(46225),l=s(14763),c=s(15712),d=s(30985),m=s(91114),u=s.n(m),h=s(43765),p=s(54253);let x=(0,a.forwardRef)((e,t)=>(0,n.jsxs)("a",{ref:t,href:"#",onClick:t=>{t.preventDefault(),e.onClick(t)},id:"kt_subheader_quick_actions",className:"btn btn-sm btn-clean btn-icon",children:[" ",(0,n.jsx)("span",{className:"svg-icon svg-icon-success svg-icon-lg",children:(0,n.jsx)("span",{className:"svg-icon-success svg-icon-2x",children:(0,n.jsx)(u(),{src:(0,p.oK)("/media/svg/icons/Files/File-plus.svg?v=1")})})})]}));function g(){return(0,n.jsx)(l.A,{placement:"left",overlay:(0,n.jsx)(c.A,{id:"quick-actions-tooltip",children:"Quick actions"}),children:(0,n.jsxs)(d.A,{className:"dropdown-inline",drop:"down",alignRight:!0,children:[(0,n.jsx)(d.A.Toggle,{as:x,id:"dropdown-toggle-quick-actions-subheader"}),(0,n.jsx)(d.A.Menu,{className:"dropdown-menu p-0 m-0 dropdown-menu-md dropdown-menu-right",children:(0,n.jsx)(h.K$,{})})]})})}var f=s(45251);function b(e){let{items:t}=e;return t&&t.length?(0,n.jsxs)("ul",{className:"breadcrumb breadcrumb-transparent breadcrumb-dot font-weight-bold p-0 my-2",children:[(0,n.jsx)("li",{className:"breadcrumb-item",children:(0,n.jsx)(f.N,{legacyBehavior:!0,href:"/dashboard",children:(0,n.jsx)("i",{className:"flaticon2-shelter text-muted icon-1x"})})}),t.map((e,t)=>(0,n.jsx)("li",{className:"breadcrumb-item",children:(0,n.jsx)(f.N,{legacyBehavior:!0,href:{pathname:e.pathname},children:(0,n.jsx)("a",{className:"text-muted",children:e.title})})},`bc${t}`))]}):""}var N=s(32901),j=s(18150);function v(){let e=(0,j.SL)(),t=(0,o.useRouter)(),s=(0,N.ro)(),i=(0,a.useMemo)(()=>({config:e.config,subheaderMobileToggle:r().get(e.config,"subheader.mobile-toggle"),subheaderCssClasses:e.getClasses("subheader",!0),subheaderContainerCssClasses:e.getClasses("subheader_container",!0)}),[e]);return(0,a.useLayoutEffect)(()=>{let e=(0,N.UG)("kt_aside_menu",t.pathname),n=(0,N.UG)("kt_header_menu",t.pathname),a=e&&e.breadcrumbs.length>0?e.breadcrumbs:n.breadcrumbs;s.setBreadcrumbs(a),s.setTitle(e&&e.title&&e.title.length>0?e.title:n.title)},[t.pathname]),(0,a.useEffect)(()=>{},[s]),(0,n.jsx)("div",{id:"kt_subheader",className:`subheader py-2 py-lg-4 ${i.subheaderCssClasses}`,children:(0,n.jsxs)("div",{className:`${i.subheaderContainerCssClasses} d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap`,children:[(0,n.jsxs)("div",{className:"d-flex align-items-center flex-wrap mr-1",children:[i.subheaderMobileToggle&&(0,n.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,n.jsx)("span",{})}),(0,n.jsx)("div",{className:"d-flex align-items-baseline mr-5",children:(0,n.jsx)("h5",{className:"text-dark font-weight-bold my-2 mr-5",children:(0,n.jsx)(n.Fragment,{children:s.title})})}),(0,n.jsx)(b,{items:s.breadcrumbs})]}),(0,n.jsxs)("div",{className:"d-flex align-items-center",children:[(0,n.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,n.jsx)("span",{className:"text-muted font-weight-bold mr-2",id:"kt_dashboard_daterangepicker_title",children:"Today"}),(0,n.jsx)("span",{className:"text-primary font-weight-bold",id:"kt_dashboard_daterangepicker_date",children:"Aug 16"})]}),(0,n.jsx)(g,{})]})]})})}},37423:(e,t,s)=>{"use strict";s.d(t,{C:()=>j});var n=s(26514),a=s(58245),i=s.n(a),r=s(32673);s(75834);
3var o=s(93760),l=s(23141),c=s(6367),d=s(96456),m=s.n(d),u=s(23277),h=s.n(u),p=s(80315),x=s(48208),g=s(75674),f=s(49732),b=s(79104),N=s(64674);function j(e){let{t}=(0,o.B)("promos"),{assignedPromocode:s,isPromoStillRunning:a}=e.data||{},d=[{title:t("BCS.FAQ_1"),text:t("BCS.FAQ_1_ANSWER")},{title:t("BCS.FAQ_5"),text:t("BCS.FAQ_5_ANSWER")},{title:t("BCS.FAQ_2"),text:t("BCS.FAQ_2_ANSWER")},{title:t("BCS.FAQ_3"),text:t("BCS.FAQ_3_ANSWER")},{title:t("BCS.FAQ_4"),text:t("BCS.FAQ_4_ANSWER")}];return(0,n.jsx)(p.a,{...e,size:"lg",dialogClassName:`${h().modalDialog} ${e.fullScreen?h().fullScreen:""}`,bodyClassName:h().modalBody,title:(0,n.jsx)("div",{className:`pl-4 pl-sm-0 mb-2 ${h().title}`,children:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.TITLE",components:[(0,n.jsx)("span",{className:"text-nowrap"})]})}),children:(0,n.jsxs)(r.A,{gap:{xs:2,sm:2},children:[(0,n.jsx)("div",{className:"d-flex justify-content-center align-items-center",children:(0,n.jsxs)("div",{className:`font-size-lg ${h().badge}`,children:[t("BCS.COLLABORATION_LABEL")," ",(0,n.jsx)(i(),{className:"ml-2",src:"/media/brokers/bcs_logo_big.png",alt:"bcs.ru",height:25,width:150})]})}),(s||a)&&(0,n.jsx)("div",{className:h().divider}),s&&(0,n.jsx)(N.N,{promocode:s,onPromocodeClaimed:e.onPromocodeClaimed}),a&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"font-size-h3 font-weight-bolder",children:t("BCS.MODAL.DETAILS.TITLE")}),(0,n.jsxs)("div",{className:"row mb-4",children:[(0,n.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,n.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,n.jsx)(f.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,n.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.DETAILS.1"})})]})}),(0,n.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,n.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,n.jsx)(f.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,n.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.DETAILS.2",components:[(0,n.jsx)("span",{className:"text-nowrap"})]})})]})}),(0,n.jsx)("div",{className:"col-sm-12 col-md-4 flex-grow mb-3",children:(0,n.jsxs)("div",{className:"d-flex flex-column h-100 bg-light p-4 rounded-lg",children:[(0,n.jsx)(f.A,{src:"/media/svg/icons/Code/Done-circle.svg",size:"xl",color:"dark"}),(0,n.jsx)("div",{className:"font-size-lg font-weight-bolder mt-3",children:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.DETAILS.3",components:[(0,n.jsx)("span",{className:"text-nowrap"})]})})]})})]}),(0,n.jsx)("div",{className:"font-size-h3 font-weight-bolder",children:t("BCS.MODAL.HOW.TITLE")}),(0,n.jsxs)(r.A,{gap:1.5,children:[(0,n.jsx)(g.S,{stepNumber:1,title:t("BCS.MODAL.HOW.STEP_1.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_1.MESSAGE"})}),(0,n.jsx)(g.S,{stepNumber:2,title:t("BCS.MODAL.HOW.STEP_2.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_2.MESSAGE",components:[(0,n.jsx)(x.o,{href:"/user-profile#subscription"})]})}),(0,n.jsx)(g.S,{stepNumber:3,title:t("BCS.MODAL.HOW.STEP_3.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_3.MESSAGE",components:[(0,n.jsx)("span",{className:"text-nowrap font-weight-bold"})]})}),(0,n.jsx)(g.S,{stepNumber:4,title:t("BCS.MODAL.HOW.STEP_4.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_4.MESSAGE",components:[(0,n.jsx)("span",{className:"text-nowrap font-weight-bold"})]})}),(0,n.jsx)(g.S,{stepNumber:5,title:t("BCS.MODAL.HOW.STEP_5.TITLE"),text:(0,n.jsx)(l.x,{i18nKey:"promos:BCS.MODAL.HOW.STEP_5.MESSAGE",components:[(0,n.jsx)("span",{className:"text-nowrap font-weight-bold"})]})})]}),(0,n.jsx)("div",{className:"w-100 text-center bg-light p-4 rounded-lg",children:(0,n.jsxs)(x.o,{href:"/docs/bcs-snow-cashback-rules.pdf",className:"font-weight-bold font-size-lg",target:"_blank",children:[(0,n.jsx)(c.A,{className:"mr-1"})," ",t("BCS.MODAL.DETAILS.BUTTON_TO_DOC")]})}),(0,n.jsx)("div",{className:"font-size-h3 font-weight-bolder mt-7",children:t("BCS.FAQ")}),(0,n.jsx)(b.l,{items:d}),(0,n.jsx)("div",{className:"font-size-h3 font-weight-bolder mt-7",children:t("BCS.DOCUMENTS")}),(0,n.jsx)("div",{children:(0,n.jsxs)(x.o,{href:"/docs/bcs-snow-cashback-rules.pdf",target:"_blank",children:["\uD83D\uDCC4 ",t("BCS.DOCUMENTS_LINK")]})}),(0,n.jsxs)("div",{className:"text-muted font-size-xs mt-5",children:["*ÐÑивеÑÑÑвеннÑй бонÑÑ Ð¸ ÐеÑбÑк наÑиÑлÑÑÑÑÑ Ð² ÑамкаÑ
пÑÐ¾Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¼Ð°ÑкеÑинговой акÑии \xabÐеÑбÑк на миллион. СноÑбол Ðнком\xbb (далее â ÐкÑиÑ), пÑоводимой ÐÐÐ \xabÐÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ñ ÐÐС\xbb в пеÑиод Ñ 01.10.2025 г. по 30.04.2026 г. вклÑÑиÑелÑно. Ðолее подÑобно Ñ ÑÑловиÑми ÐкÑии Ð²Ñ Ð¼Ð¾Ð¶ÐµÑе ознакомиÑÑÑÑ Ð¿Ð¾"," ",(0,n.jsx)(m(),{target:"_blank",href:"/docs/bcs-snow-cashback-rules.pdf",children:"ÑÑÑлке"})," ","(далее â ÐÑавила ÐкÑии).",(0,n.jsx)("br",{}),"ÐÑивеÑÑÑвеннÑй бонÑÑ - денежнÑе ÑÑедÑÑва в ÑазмеÑе 4 000 ÑоÑÑийÑкий ÑÑблей, вÑплаÑиваемÑе пÑи вÑполнении ÑÑловий Ñаздела 4 ÐÑавил акÑии. Ð
3 ÑелÑÑ Ð°ÐºÑии, ÐÑивеÑÑÑвеннÑй бонÑÑ Ð½Ðµ ÑвлÑеÑÑÑ ÐÑплаÑой.",(0,n.jsx)("br",{}),"Ðод кеÑбÑком понимаеÑÑÑ ÑеÑмин \xabÐÑплаÑа\xbb из пÑавил ÐкÑии (п. 2.19). ÐеÑиод вÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ ÑелевÑÑ Ð´ÐµÐ¹ÑÑвий - пеÑиод Ñо днÑ, в коÑоÑом бÑло вÑполнено ÑÑловие п. 3.1.4 ÐÑавил ÐкÑии до конÑа календаÑного меÑÑÑа, и ÑледÑÑÑие за ним 4 календаÑнÑÑ Ð¼ÐµÑÑÑа.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"ÐакÑималÑнÑй ÑÐ°Ð·Ð¼ÐµÑ ÐºÐµÑбÑка ÑоÑÑавлÑÐµÑ 1 000 000 â½, до ÑплаÑÑ ÐÐФÐ, на одного ÑÑаÑÑника ÐкÑии за веÑÑ Ð¿ÐµÑиод пÑÐ¾Ð²ÐµÐ´ÐµÐ½Ð¸Ñ ÐкÑии.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"Ðе ÑвлÑеÑÑÑ Ð±Ð°Ð½ÐºÐ¾Ð²Ñким вкладом, на даннÑй пÑодÑÐºÑ Ð½Ðµ ÑаÑпÑоÑÑÑанÑеÑÑÑ ÑиÑÑема ÑÑÑÐ°Ñ Ð¾Ð²Ð°Ð½Ð¸Ñ Ð²ÐºÐ»Ð°Ð´Ð¾Ð² ÐСÐ.",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),"ÐÐÐ \xabÐÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ñ ÐÐС\xbb. ÐиÑÐµÐ½Ð·Ð¸Ñ Ð½Ð° оÑÑÑеÑÑвление бÑокеÑÑкой деÑÑелÑноÑÑи â 154-04434-100000 Ð¾Ñ 10.01.2001 ÐÑдана ФСФР. Ðез огÑаниÑÐµÐ½Ð¸Ñ ÑÑока дейÑÑвиÑ. ÐодÑобнее:"," ",(0,n.jsx)(m(),{target:"_blank",href:"https://bcs.ru/regulatory",children:"https://bcs.ru/regulatory"}),".",(0,n.jsx)("br",{}),"ÐÐС ÐÐ¸Ñ Ð¸Ð½Ð²ÐµÑÑиÑий иÑполÑзÑеÑÑÑ ÐÐÐ \xabÐÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ñ ÐÐС\xbb в каÑеÑÑве ÑоваÑного знака."]})]})]})})}},38099:(e,t,s)=>{"use strict";s.d(t,{Ey:()=>p,ZB:()=>l});var n=s(93760),a=s(33989),i=s(36241),r=s(15269),o=s(88515);function l(e){let{t}=(0,n.B)("layout");return(0,a.I)({queryKey:["search-assets",e],queryFn:()=>{if(!e.search)return[];try{return(0,o.G)(e)}catch(s){let e=(0,i.g6)(`${t("SEARCH_ASSET.ERROR")}: 4`,s);return(0,r.f1)(e),[]}},staleTime:0,gcTime:0})}var c=s(21069),d=s(33238),m=s(84534),u=s(5226);let h={key:e=>["assetPosts",e],options:(e,t)=>{let{assetType:s,assetInfoId:n,ticker:a,exchange:i,currency:r}=e,o=(0,c.gW)(s,n,a,i,r);return(0,u.j)({queryKey:h.key(o),queryFn:async()=>{let{data:e}=await (0,d.vL)(o,{page:1,pageSize:2,sortBy:m.FU.Hottest});return e},...t})}};function p(e,t){return(0,a.I)(h.options(e,t))}},38266:(e,t,s)=>{"use strict";s.d(t,{k:()=>r});var n=s(26514);s(75834);var a=s(93760),i=s(49732);function r(e){let{t}=(0,a.B)("common");return(0,n.jsxs)("div",{className:"py-4",children:[(0,n.jsx)("div",{children:(0,n.jsx)(i.A,{size:"10x",color:"none",src:"/media/svg/icons/Shopping/Box2.svg?v=1"})}),(0,n.jsxs)("span",{className:"text-muted font-weight-bold",children:[" ",e.message," ",!e.message&&(0,n.jsxs)(n.Fragment,{children:[t("EMPTY_TABLE_MESSAGE")," ",(0,n.jsx)("i",{className:"far fa-sad-tear icon-nm"})," "]})]})]})}},39608:(e,t,s)=>{"use strict";s.d(t,{s:()=>r});var n=s(26514),a=s(75834),i=s(14163);function r(e){let{executeRecaptcha:t}=(0,i._Y)(),s=(0,a.useCallback)(async()=>t?await t("submitContactForm"):null,[t]);return(0,n.jsx)(n.Fragment,{children:e.children({handleVerify:s})})}},40945:(e,t,s)=>{"use strict";s.d(t,{b:()=>eo});var n=s(26514),a=s(46225),i=s(62936),r=s.n(i),o=s(75834),l=s(80966),c=s(93760),d=s(59757),m=s(95990),u=s(83535),h=s(47115),p=s(55285),x=s(83308),g=s(33807),f=s(18150),b=s(75877),N=s(65119),j=s(73367),v=s(30985),A=s(61139),_=s(54253),C=s(43765),E=s(28100);let T=[{lang:"ru",name:"Ð ÑÑÑкий",flag:(0,_.oK)("/media/svg/flags/248-russia.svg")},{lang:"en",name:"English",flag:(0,_.oK)("/media/svg/flags/226-united-states.svg")}];function I(){let e=(0,d.wA)(),{i18n:t}=(0,c.B)("layout"),s=t.language,a=T.find(e=>e.lang===s);return(0,n.jsxs)(v.A,{drop:"down",alignRight:!0,children:[(0,n.jsx)(v.A.Toggle,{as:C.rI,id:"dropdown-toggle-my-cart",children:(0,n.jsx)("div",{className:"btn btn-icon btn-clean btn-dropdown btn-lg mr-1",children:(0,n.jsx)("img",{className:"h-20px w-20px rounded",src:a?.flag,alt:a?.name})})}),(0,n.jsx)(v.A.Menu,{className:"p-0 m-0 dropdown-menu-right dropdown-menu-anim dropdown-menu-top-unround",children:(0,n.jsx)("ul",{className:"navi navi-hover py-4",children:T.map(s=>(0,n.jsx)("li",{className:(0,j.A)("navi-item",{active:s.lang===a?.lang}),children:(0,n.jsxs)("div",{onClick:()=>{var n;return n=s.lang,void((0,E.lY)(n,(0,p.Q_)(n),!0),t.changeLanguage(n),setTimeout(()=>{e({type:A.QN.UserRequested})},200))},className:"navi-link",style:{cursor:"pointer"},children:[(0,n.jsx)("span",{className:"symbol symbol-20 mr-3",children:(0,n.jsx)("img",{src:s.flag,alt:s.name})}),(0,n.jsx)("span",{className:`navi-text ${s.lang===a?.lang&&"text-primary"}`,children:s.name})]})},s.lang))})})]})}var S=s(9610),y=s.n(S),O=s(96456),R=s.n(O),w=s(51065),k=s.n(w),D=s(96210),L=s(78693);let P=["/dashboard","/stats","/assets","/transactions","/div-calendar","/my-goal","/cash","/portfolio","/corporate-actions","/rebalancing","/findthedip","/import-transactions","/import-transactions-history"];var M=s(66073),B=s(66243),U=s(4469),F=s(3163),H=s(77938),G=s.n(H);function $(e){let{view:t}=e,s=(0,x.Mw)(),i=(0,a.useRouter)(),{t:r}=(0,c.B)("layout"),m=(0,d.wA)(),{savePortfolioOrder:u,items:h,isLoading:g}=(0,B.J)(),{currentPortfolio:f}=(0,d.d4)(e=>{let{app:t}=e;return t}),{user:b}=(0,d.d4)(e=>{let{auth:t}=e;return t}),[N,j]=(0,o.useState)(""),A=(0,o.useMemo)(()=>y()(h,e=>{let{name:t}=e;return t.toLowerCase().indexOf(N.toLowerCase())>=0}),[N,h]),_=e=>{m((0,F.Sq)(e));let t=(0,U.Gu)(`portfolio-currency-${e.id}
4`).code||e.defaultCurrency;m((0,F.MN)(t))};if((0,o.useEffect)(()=>{if(void 0!==h&&!g){var e;!h.length&&(e=i.route)&&P.indexOf(e)>=0&&"/new-portfolio"!==i.route&&i.push("/new-portfolio")}},[h]),(0,o.useEffect)(()=>{if(h&&!h.length||void 0===h||g)return;let e=h.find(e=>(f?.userId===b.id||(0,p.E8)())&&e.id===f?.id);e&&(e.isAutoSyncEnabled!==f?.isAutoSyncEnabled||e.trackCashType!==f?.trackCashType||e.syncProvider!==f?.syncProvider||e.syncParam!==f?.syncParam||e.broker!==f?.broker)&&_(e),e||_(h[0])},[h,f,g]),!f)return null;let C=l.Fr||A.length<2;return(0,n.jsx)(v.A,{id:"portfolio-selector",drop:"down",className:"topbar-dropdown",alignRight:!0,autoClose:"outside",children:(0,n.jsxs)("div",{className:"topbar-item",children:[(0,n.jsx)(v.A.Toggle,{title:r("MENU.PORTFOLIO_SELECTOR"),id:"dropdown-toggle-top2",variant:"transparent",className:`btn w-auto btn-dark-50 btn-sm font-weight-bold p-2 ${"mobile"===t?"exclude-dropdown-toggle btn-icon":""}`,children:"mobile"===t?(0,n.jsx)("span",{className:"symbol symbol-25 symbol-light",children:(0,n.jsx)("span",{className:"symbol-label",children:(0,L.Tb)(f,f.broker)})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"broker-symbol mr-2",children:(0,L.Tb)(f,f.broker)}),(0,n.jsx)("span",{className:"top-dropdown-item",children:f.name})]})}),(0,n.jsx)(v.A.Menu,{className:"dropdown-menu dropdown-menu-md dropdown-menu-right",children:(0,n.jsxs)("div",{className:"dropdown-menu-wrapper",children:[h?.length>=8&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{value:N,onChange:e=>{j(e.target.value)},type:"text",placeholder:r("SEARCH_PLACEHOLDER",{ns:"common"}),className:"form-control form-control-sm search-input",name:"search-currency"}),(0,n.jsx)("hr",{className:"py-1 my-0"})]}),(0,n.jsxs)("ul",{className:`navi navi-hover ${G().navi}`,children:[(0,n.jsx)("li",{id:"portfolio-selector-menu",className:G().portfolioList,children:(0,n.jsx)(k(),{options:{wheelPropagation:!1},style:{maxHeight:"60vh",flex:"1",WebkitOverflowScrolling:"touch"},className:`${!s.isRunning?"scroll scroll-dnd-fix":""} ${G().scrollbar}`,children:(0,n.jsx)(M.b,{disableDragging:C,onDragEnd:u,usePortal:!0,items:A,droppableId:"portfolio-selector",draggableId:e=>{let{id:t}=e;return t},portalClassName:"navi",renderItem:(e,t,s)=>{let{isDragging:a}=s;return(0,n.jsx)("div",{className:"navi-item",style:{cursor:"pointer"},children:(0,n.jsx)(D.T,{disableDragging:C,component:v.A.Item,as:"div",className:`navi-link portfolio-select-item py-2 pr-2 ${e.id===f.id?"active":""}`,onClick:()=>_(e),isDragging:a,handleProps:{...t.dragHandleProps},children:(0,n.jsxs)("div",{className:"w-100 d-flex align-items-center justify-content-between",children:[(0,n.jsxs)("div",{className:"d-flex align-items-center portfolio-selector-item",children:[(0,n.jsx)("span",{className:"symbol symbol-25 mr-1 symbol-light mr-2",children:(0,n.jsx)("span",{className:"symbol-label",children:(0,L.Tb)(e,e.broker??"Other")})}),(0,n.jsx)("span",{className:"navi-text top-dropdown-item",title:e.name,children:e.name})]}),(0,n.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation();var s=e.id;let n=`/manage-portfolios#edit-portfolio-${s}`;i.asPath.includes("/manage-portfolios")?window.location.href=n:i.push(n)},title:r("PORTFOLIO_SELECT.EDIT"),className:"btn btn-sm btn-icon btn-link-dark btn-link-hover-primary portfolio-edit-btn",children:(0,n.jsx)("i",{className:"fas fa-cog icon-md text-muted text-hover-primary"})})]})})})}})})}),(0,n.jsx)("li",{className:"navi-separator mt-3 opacity-70"}),(0,n.jsxs)("li",{className:"navi-footer",children:[(0,n.jsxs)(R(),{id:"portfolio-selector-add-portfolio",href:"/new-portfolio",className:"btn btn-light-primary font-weight-bold btn-sm mr-1",children:[(0,n.jsx)("i",{className:"fas fa-plus icon-sm text-primary text-hover-white"}),r("PORTFOLIO_SELECT.ADD_PORTFOLIO")]}),(0,n.jsxs)(R(),{id:"portfolio-selector-my-portfolios",href:"/manage-portfolios",className:"btn btn-light-primary font-weight-bold btn-sm",children:[(0,n.jsx)("i",{className:"fas fa-cog icon-sm text-primary text-hover-white"}),r("PORTFOLIO_SELECT.MY_PORTFOLIOS")]})]})]})]})})]})})}var K=s(61392),Q=s(91114),z=s.n(Q),W=s(60547),q=s(60608),Y=s(23141
4),V=s(24138),X=s(33734),J=s(83602),Z=s(47894),ee=s(58726),et=s.n(ee);function es(){let{t:e}=(0,c.B)(["layout","common"]),{discount:t}=(0,Z.rU)();return(0,n.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 ${t?"px-5":""} ${et().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:t?44:38},children:t?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("i",{className:"fas fa-gift text-dark"}),(0,n.jsxs)("div",{className:"text-left",children:[e("USER_TOGGLE.SUBSCRIBE")," ",(0,n.jsx)("div",{className:et().text,children:e("DISCOUNT",{ns:"common",value:100*t})})]})]}):(0,n.jsx)(n.Fragment,{children:e("USER_TOGGLE.SUBSCRIBE")})})}function en(e){let{user:t}=(0,d.d4)(e=>e.auth),{isDark:s,toggleTheme:a}=(0,J.DP)(),{t:i}=(0,c.B)(["layout","common"]);return(0,o.useEffect)(()=>{g.A.init("kt_quick_notifications")},[]),(0,n.jsx)(n.Fragment,{children:t&&(0,n.jsxs)(v.A,{drop:"down",id:"user-profile-dropdown",alignRight:!0,children:[(0,n.jsx)(v.A.Toggle,{as:C.rI,id:"dropdown-toggle-user-profile",children:(0,n.jsxs)("button",{type:"button",className:"btn btn-dark-50 btn-icon btn-sm position-relative p-0 ml-2",children:[(0,n.jsx)("span",{className:"svg-icon svg-icon-xl",children:(0,n.jsx)(z(),{preProcessor:W.xY,src:(0,_.oK)("/media/svg/icons/General/User.svg?v=1")})}),e.pendingNotifications>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:`notification-top-badge ${e.pendingNotifications>9&&"long-badge"}`,children:e.pendingNotifications>10?(0,n.jsx)(n.Fragment,{children:"9+"}):(0,n.jsx)(n.Fragment,{children:e.pendingNotifications})}),e.pendingNotifications>0&&(0,n.jsx)("span",{className:`notification-top-badge ${e.pendingNotifications>9&&"long-badge"}`,children:e.pendingNotifications>10?(0,n.jsx)(n.Fragment,{children:"9+"}):(0,n.jsx)(n.Fragment,{children:e.pendingNotifications})}),!1]})]})}),(0,n.jsx)(v.A.Menu,{className:"p-0 m-0 dropdown-menu-right dropdown-menu-anim dropdown-menu-top-unround dropdown-menu-lg",children:(0,n.jsxs)("div",{className:"dropdown-menu-wrapper",children:[(0,n.jsxs)("div",{className:"border-bottom pb-2",children:[(0,n.jsx)(R(),{href:"/user-profile",legacyBehavior:!0,children:(0,n.jsxs)("a",{className:"d-flex align-items-center justify-content-between flex-wrap px-8 pt-6 pb-2 roun
4ded-top",children:[(0,n.jsx)("div",{className:"symbol symbol-35 symbol-light mr-3",children:(0,n.jsx)("span",{className:"symbol-label text-primary font-weight-bold font-size-h4",children:(t.displayName||t.email)[0].toUpperCase()})}),(0,n.jsxs)("div",{className:"text-body m-0 flex-grow-1 mr-3",children:[(0,n.jsx)("div",{className:"font-size-lg font-weight-bold",children:t.displayName||t.email}),(0,n.jsx)("span",{className:"text-white",children:(0,n.jsx)("small",{children:function(e,t,s){let a=e?.subscriptionType;if(a==h.Qh.CANCELLED||a==h.Qh.EXPIRED)return(0,n.jsx)(R(),{href:"/user-manage-subscription",id:"user-subscription-expired",children:(0,n.jsx)("span",{children:(0,n.jsx)(q.A,{variant:"danger",className:"mb-2 mr-2",children:s("SUBSCRIPTION.EXPIRED",{ns:"common"})})})});if(a===h.Qh.TRIAL){let t=new Date(e?.expirationDate);return(0,n.jsx)(R(),{href:"/user-manage-subscription",id:"user-subscription-trial",children:(0,n.jsx)("span",{children:(0,n.jsx)(q.A,{variant:"info",className:"mb-2 mr-2",children:s("SUBSCRIPTION.TRIAL",{ns:"common",date:t})})})})}if(a===h.Qh.TIER_0||a===h.Qh.TIER_1_OLD||a===h.Qh.TIER_1||a===h.Qh.TIER_2||a===h.Qh.TIER_3)return(0,n.jsx)(R(),{href:"/user-manage-subscription",id:"user-subscription-main",children:(0,n.jsx)("span",{children:(0,n.jsx)(q.A,{variant:"success",className:"mb-2",children:(0,n.jsx)(Y.x,{i18nKey:`user:${(0,V.gb)(a)}`})})})})}(t,0,i)})})]})]})}),l.Fr&&[h.Qh.CANCELLED,h.Qh.EXPIRED,h.Qh.TRIAL,h.Qh.TIER_0].includes(t?.subscriptionType)&&(0,n.jsx)("div",{className:"px-8 mt-2 mb-4",children:(0,n.jsx)(es,{})})]}),(0,n.jsx)(k(),{options:{wheelPropagation:!1,suppressScrollX:!0},className:"scroll",style:{maxHeight:l.Fr?"400px":"auto",position:"relative"},children:(0,n.jsxs)("div",{className:"navi navi-hover py-2",children:[(0,n.jsx)(R(),{href:"/user-profile",legacyBehavior:!0,children:(0,n.jsx)("a",{className:"navi-item",id:"user-profile-account",children:(0,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.ACCOUNT")})})})})}),(0,n.jsx)(R(),{href:"/user-profile#subscription",legacyBehavior:!0,children:(0,n.jsx)("a",{className:"navi-item",id:"user-profile-subscription",children:(0,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.SUBSCRIPTION")})})})})}),(0,n.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,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsxs)("div",{className:"font-weight-bold d-flex align-items-center",children:[i("USER_TOGGLE.NOTIFICATIONS"),e.pendingNotifications>0&&(0,n.jsx)("span",{className:"ml-2 badge badge-pill badge-danger notification-badge text-white d-inline",children:e.pendingNotifications})]})})})}),(0,p.de)()&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"navi-separator my-2"}),(0,n.jsx)(R(),{href:"/sync-accounts",legacyBehavior:!0,children:(0,n.jsx)("a",{className:"navi-item",children:(0,n.jsxs)("div",{className:"navi-link px-8",children:[(0,n.jsx)("div",{className:"navi-icon text-dark",children:(0,n.jsx)(K.A,{})}),(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.MANAGE_BROKERAGE_ACCOUNTS")})})]})})})]}),(0,n.jsx)("div",{className:"navi-separator my-2"}),"mobile"!=e.view&&(0,n.jsx)("a",{id:"user-profile-help",className:"navi-item",href:i("HELP.LINK"),target:"_blank",rel:"noreferrer",children:(0,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.HELP")})})})}),"mobile"==e.view&&(0,n.jsx)(R(),{href:"/mobile-about",legacyBehavior:!0,children:(0,n.jsx)("a",{className:"navi-item",children:(0,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.HELP")})})})})}),(0,n.jsx)("a",{id:"user-profile-changelog",className:"navi-item",href:"https://help.snowball-analytics.com/changelog",target:"_blank",rel:"noreferrer",children:(0,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.CHANGELOG")})})})}),(0,n.jsx)("div",{className:"navi-separator my-2"}),(0,n.jsx)(R(),{href:"/user-profile#display-settings",legacyBehavior:!0,children:(0,n.jsx)("a",{className:"navi-item",id:"user-profile-appearance",children:(0,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.DISPLAY_SETTINGS")})})})})}),l.Fr&&(0,n.jsx)("div",{className:"navi-item px-8 pt-2 pb-2",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,n.jsx)("label",{className:"mb-0 font-weight-bold",children:i("DISPLAY_CURRENCY")}),(0,n.jsx)(N.J,{})]})}),(0,n.jsx)("div",{className:"navi-item px-8 pt-2 pb-2",children:(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between",children:[(0,n.jsx)("label",{className:"mb-0 font-weight-bold",children:i("DARK_MODE")}),(0,n.jsx)(X.A,{isDark:s,onChange:a})]})}),(0,p.de)()&&(0,n.jsx)("a",{id:"user-profile-cookies",className:"navi-item",href:void 0,onClick:()=>{let e=document.getElementById("cookiescript_badge");e&&e.click()},children:(0,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsxs)("div",{className:"font-weight-bold",children:[i("COOKIE_SETTINGS")," \uD83C\uDF6A"]})})})}),"mobile"==e.view&&(0,n.jsxs)(n.Fragment,{children:[(0,p.de)()&&(0,n.jsxs)("div",{className:"px-6 mt-2 row align-items-center",children:[l.un&&(0,n.jsx)("div",{className:"col-auto mb-2",children:(0,n.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,n.jsx)("img",{src:"/media/app/appstore-analytics.svg",height:40,alt:"Download Snowball Analytics on App Store"})})}),!l.un&&(0,n.jsx)("div",{className:"col-auto mb-2",children:(0,n.jsx)("a",{href:"https://play.google.com/store/apps/details?id=com.snowballanalytics",target:"_blank",rel:"noreferrer",children:(0,n.jsx)("img",{src:"/media/app/google-play-analytics.svg",height:40,alt:"Download Snowball Analytics on Google Play"})})})]}),!(0,p.de)()&&(0,n.jsxs)("div",{className:"px-6 mt-2 row align-items-center",children:[l.un&&(0,n.jsx)("div",{className:"col-auto mb-2",children:(0,n.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,n.jsx)("img",{src:"/media/app/appstore-income.svg",height:40,alt:"СкаÑаÑÑ Ð¿Ñиложение Snowball Income в App Store"})})}),!l.un&&(0,n.jsx)("div",{className:"col-auto mb-2 pt-1",children:(0,n.jsx)("a",{href:"https://play.google.com/store/apps/details?id=com.snowballincome",target:"_blank",rel:"noreferrer",children:(0,n.jsx)("img",{src:"/media/app/google-play-income.svg",height:40,alt:"СкаÑаÑÑ Ð¿Ñиложение Snowball Income в Google Play"})})}),!l.un&&(0,n.jsx)("div",{className:"col-auto mb-2 pt-1",children:(0,n.jsx)("a",{href:"https://www.rustore.ru/catalog/app/com.snowballincome",target:"_blank",rel:"noreferrer",children:(0,n.jsx)("img",{src:"/media/app/rustore-income.svg",height:40,alt:"СкаÑаÑÑ Ð¿Ñиложение Snowball Income в RuStore"})})})]})]}),(0,n.jsx)("div",{className:"navi-separator my-2"}),(0,n.jsx)(R(),{href:"/logout",legacyBehavior:!0,children:(0,n.jsx)("a",{className:"navi-item",id:"user-profile-logout",children:(0,n.jsx)("div",{className:"navi-link px-8",children:(0,n.jsx)("div",{className:"navi-text",children:(0,n.jsx)("div",{className:"font-weight-bold",children:i("USER_TOGGLE.SIGN_OUT")})})})})})]})})]})})]})})}function ea(e){let t=(0,f.SL)(),s=(0,o.useMemo)(()=>({offcanvas:"offcanvas"===r().get(t.config,"extras.user.layout")}),[t]);return(0,n.jsx)(n.Fragment,{children:!s.offcanvas&&(0,n.jsx)(en,{pendingNotifications:e.pendingNotifications,view:e.view})})}var ei=s(77232),er=s(62400);function eo(e){let t=(0,f.SL)(),s=(0,x.Mw)(),i=(0,a.useRouter)(),{t:j}=(0,c.B)("layout"),{user:v}=(0,d.d4)(e=>e.auth),{currentPortfolio:A}=(0,d.d4)(e=>{let{app:t}=e;return{currentPortfolio:t.currentPortfolio}}),{portfolios:_,isAiChatBtnAnimated:C}=(0,d.d4)(e=>{let{ui:t}=e;return{portfolios:t.portfolios??null,isAiChatBtnAnimated:t.isAiChatBtnAnimated??!1}}),E=(0,o.useMemo)(()=>({viewSearchDisplay:r().get(t.config,"extras.search.display"),viewNotificationsDisplay:r().get(t.config,"extras.notifications.display"),viewQuickActionsDisplay:r().get(t.config,"extras.quick-actions.display"),viewCartDisplay:r().get(t.config,"extras.cart.dis
4play"),viewQuickPanelDisplay:r().get(t.config,"extras.quick-panel.display"),viewLanguagesDisplay:r().get(t.config,"extras.languages.display"),viewUserDisplay:r().get(t.config,"extras.user.display")}),[t]),T=v?.onboardingState==="completed";return(0,n.jsxs)("div",{className:"mobile"!==e.view?"topbar":"d-flex align-items-center",children:[T&&A&&v?.showAIChat&&(0,n.jsx)("div",{className:"d-flex align-items-center mr-3",children:(0,n.jsx)(u.zP,{id:"mobile"===e.view||l.Fr?"ai-chat-start-button-mobile":"ai-chat-start-button",allowGuide:"mobile"!==e.view&&!l.Fr,isAnimated:C})}),"mobile"!==e.view&&T&&(0,n.jsx)(b.l8,{id:"add-selector",includeSync:!s.isStarted,view:e.view,currentPortfolio:A,type:b.jC}),(0,n.jsx)(er.l,{isNewPage:!0}),(0,n.jsx)(ei.qS,{id:"topbar-watchlist",title:j("MENU.WATCHLIST"),onClick:()=>{i.push("/watchlists")},showPulse:!1,icon:(0,n.jsx)(m.A,{})}),"mobile"===e.view&&T&&(0,n.jsx)(b.l8,{id:"add-selector-mobile",includeSync:!0,view:e.view,currentPortfolio:A,type:b.qw}),T&&(0,n.jsx)($,{view:e.view,portfolios:_,currentPortfolio:A}),T&&"mobile"!==e.view&&(0,n.jsx)(N.J,{view:e.view}),v?.canChangeLanguage&&(0,n.jsx)(I,{}),E.viewUserDisplay&&!(0,p.E8)()&&(0,n.jsx)(ea,{pendingNotifications:e.pendingNotifications,view:e.view}),(0,p.E8)()&&(0,n.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,n.jsx)("span",{className:`notification-top-badge ${e.pendingNotifications>9&&"long-badge"}`,children:e.pendingNotifications>10?(0,n.jsx)(n.Fragment,{children:"9+"}):(0,n.jsx)(n.Fragment,{children:e.pendingNotifications})}),(0,n.jsx)("i",{className:`flaticon-bell icon-lg ${e.pendingNotifications>0?"text-primary":""}`})]}),T&&!l.Fr&&[h.Qh.CANCELLED,h.Qh.EXPIRED,h.Qh.TRIAL,h.Qh.TIER_0].includes(v?.subscriptionType)&&!(0,p.E8)()&&(0,n.jsx)("div",{className:"d-flex align-items-center ml-2",id:"topbar-subscribe",children:(0,n.jsx)(es,{discount:20})})]})}},42667:e=>{e.exports={promocode:"TbankPromocode_promocode__foUbh"}},43765:(e,t,s)=>{"use strict";s.d(t,{K$:()=>a,rI:()=>i});var n=s(26514);function a(){return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("ul",{className:"navi navi-hover",children:[(0,n.jsxs)("li",{className:"navi-header font-weight-bold py-5",children:[(0,n.jsx)("span",{className:"font-size-lg",children:"Choose Label:"}),(0,n.jsx)("i",{className:"flaticon2-information icon-md text-muted","data-toggle":"tooltip","data-placement":"right",title:"Click to learn more..."})]}),(0,n.jsx)("li",{className:"navi-separator mb-3 opacity-70"}),(0,n.jsx)("li",{className:"navi-item",children:(0,n.jsx)("a",{href:"#",className:"navi-link",children:(0,n.jsx)("span",{className:"navi-text",children:(0,n.jsx)("span",{className:"label label-xl label-inline label-light-success",children:"Customer"})})})}),(0,n.jsx)("li",{className:"navi-item",children:(0,n.jsx)("a",{href:"#",className:"navi-link",children:(0,n.jsx)("span",{className:"navi-text",children:(0,n.jsx)("span",{className:"label label-xl label-inline label-light-danger",children:"Partner"})})})}),(0,n.jsx)("li",{className:"navi-item",children:(0,n.jsx)("a",{href:"#",className:"navi-link",children:(0,n.jsx)("span",{className:"navi-text",children:(0,n.jsx)("span",{className:"label label-xl label-inline label-light-warning",children:"Suplier"})})})}),(0,n.jsx)("li",{className:"navi-item",children:(0,n.jsx)("a",{href:"#",className:"navi-link",children:(0,n.jsx)("span",{className:"navi-text",children:(0,n.jsx)("span",{className:"label label-xl label-inline label-light-primary",children:"Member"})})})}),(0,n.jsx)("li",{className:"navi-item",children:(0,n.jsx)("a",{href:"#",className:"navi-link",children:(0,n.jsx)("span",{className:"navi-text",children:(0,n.jsx)("span",{className:"label label-xl label-inline label-light-dark",children:"Staff"})})})}),(0,n.jsx)("li",{className:"navi-separator mt-3 opacity-70"}),(0,n.jsx)("li",{className:"navi-footer pt-5 pb-4",children:(0,n.jsxs)("a",{className:"btn btn-clean font-weight-bold btn-sm",href:"#",children:[(0,n.jsx)("i",{className:"ki ki-plus icon-sm"}),"Add new"]})})]})})}let i=s(75834).forwardRef((e,t)=>
4(0,n.jsx)("div",{ref:t,className:"topbar-item",onClick:t=>{t.preventDefault(),e.onClick(t)},children:e.children}));i.displayName="DropdownTopbarItemToggler"},46109:(e,t,s)=>{"use strict";s.d(t,{a:()=>u});var n=s(26514),a=s(75834),i=s(89077),r=s(7086),o=s(59757),l=s(63390),c=s(15269),d=s(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 u(e){let{onRead:t}=e,{notification:s,readNotification:u}=(e=>{let{onRead:t}=e,s=(0,o.wA)(),[n,i]=(0,a.useState)(null),[m,u]=(0,a.useState)(!1),h=async function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u(!0);try{await r.A.post(`${l.EbW}/${e}`,{}),c.Tn(),s((0,d.ot)()),n||i(null),t?.()}catch(e){console.error("Error reading notification:",e)}finally{u(!1)}};return(0,a.useEffect)(()=>{setTimeout(async()=>{try{let e=(await r.A.get(l.cPt)).data;if(!e)return;i(e)}catch(e){console.error("Error fetching notifications:",e)}},1500)},[]),{notification:n,isLoading:m,readNotification:h}})({onRead:t});return s?(0,n.jsxs)(n.Fragment,{children:[s.displayType===m.Modal&&(0,n.jsx)(i.z5,{notification:s,onRead:u}),s.displayType===m.SimplePopup&&(0,n.jsx)(i.EI,{notification:s,onRead:u}),s.displayType===m.SubscriptionPricingPopup&&(0,n.jsx)(i.eh,{onRead:()=>u(s.id,!0)})]}):null}},46833:(e,t,s)=>{"use strict";s.d(t,{If:()=>c,fk:()=>d});var n=s(33989),a=s(7086),i=s(93760),r=s(36241),o=s(15269),l=s(63390);let c="dashboard-stats";function d(e){let{currency:t,portfolioId:s,reload:d}=e,{t:m}=(0,i.B)("common");return(0,n.I)({queryKey:[c,t,s,d],queryFn:async()=>{try{let{data:e}=await a.A.get(l.rf0,{params:{currency:t,portfolioId:s}});return e}catch(t){let e=`${m("ERROR.FAILED_TO_LOAD_DATA")} 5`;if(t.response?.status===403){let s=(0,r.g6)(e,t);(0,o.f1)(s)}}}})}s(31108)},47480:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var s=0;s<t.length;s++){var n=t[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,s,n){return s&&e(t.prototype,s),n&&e(t,n),t}}(),a=r(s(75834)),i=r(s(68208));function r(e){return e&&e.__esModule?e:{default:e}}t.default=function(){var e=a.default.createContext(),t=function(t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);function s(){if(!(this instanceof s))throw TypeError("Cannot call a class as a function");var e=(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments);if(!this)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&("object"==typeof e||"function"==typeof e)?e:this}return s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(s,t):s.__proto__=t),n(s,[{key:"render",value:function(){var t=void 0,s=this.props,n=s.columns,i=s.toggles;return t=i?n.filter(function(e){return i[e.dataField]}):n.filter(function(e){return!e.hidden}),a.default.createElement(e.Provider,{value:{columns:t}},this.props.children)}}]),s}(a.default.Component);return t.propTypes={columns:i.default.array.isRequired,toggles:i.default.object},t.defaultProps={toggles:null},{Provider:t,Consumer:e.Consumer}}},48889:e=>{e.exports={modalBody:"PromosModal_modalBody__PtLEf",title:"PromosModal_title__5Xzrc"}},49522:(e,t,s)=>{"use strict";s.d(t,{$:()=>d});var n=s(26514);s(75834);var a=s(93760),i=s(80966),r=s(74488),o=s.n(r),l=s(97043),c=s(80338);function d(e){let{children:t,component:s="span",textToCopy:r,textSuccess:d,preventEvents:m=!1,hideDefaults:u=!1,className:h,...p}=e,{t:x}=(0,a.B)("common"),g=r||"string"!=typeof t?r:t;if(!g)return(0,n.jsx)(n.Fragment,{children:t});let f=(0,n.jsxs)(s,{...p,className:`${h??""} ${!u&&o().root} ${!u?"bg-hover-light":""}`,onClick:e=>{m&&(e.preventDefault(),e.stopPropagation()),(0,c.C)(g,d||x("COPY.SUCCESS"))},children:[t,!u&&(0,n.jsx)("i",{className:`${o().icon} far fa-copy`})]});return(0,n.jsx)(n.Fragment,{children:i.Fr||u?f:(0,n.jsx)(l.o,{title:x("COPY.ACTION"),children:f})})}},49942:(e,t,s)=>{"use strict";s.d(t,{c:()=>r});var n=s(26514);s(75834);var a=s(60890),i=s.n(a);function r(e){let{title:t,content:s,buttonProps:a,cardProps:r,bodyProps:o,titleProps:l,contentProps:c,onClose:d}=e;return s||t?(0,n.jsx)("div",{onClick:r?.onClick,className:`card card-custom card-stretch bgi-no-repeat bgi-size-cover gutter-b ${r?.className||""}`,style:r?.style||{},children:(0,n.jsxs)("div",{className:`card-body ${o?.className||""}`,style:o?.style||{},children:[(0,n.jsxs)("div",{className:"mr-2",children:[!!t&&(0,n.jsx)("div",{className:`h4 ${l?.className||""}`,style:l?.style||{},children:t}),!!s&&(0,n.jsx)("div",{className:`mt-2 ${c?.className||""}`,style:{whiteSpace:"pre-wrap",...c?.style},children:(0,n.jsx)(i(),{children:s})})]}),(0,n.jsx)("button",{...a,type:"button",className:`btn btn-primary font-weight-bold ${a?.className||""}`,children:a?.text}),!!d&&(0,n.jsx)("button",{onClick:d,type:"button",className:"btn btn-icon btn-white btn-white-bg btn-sm btn-circle btn-close-card",children:(0,n.jsx)("i",{className:"flaticon2-cross icon-sm text-dark-50"})})]})}):null}},50007:(e,t,s)=>{"use strict";s.d(t,{L:()=>o});var n=s(26514);s(75834);var a=s(93760),i=s(51667),r=s.n(i);function o(e){let{type:t,className:s=""}=e,{t:i}=(0,a.B)("common");return(0,n.jsx)("span",{className:`${r().root} ${"text"===t?r().text:r().label} ${s}`,children:i("FEATURE.NEW")})}},50062:(e,t,s)=>{"use strict";s.d(t,{HI:()=>a,Zu:()=>i});var n=s(47115);s(21069);var a=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,t){let s=t.type??t.assetType;return(e!==a.DIVS||!![n.PW.BOND,n.PW.STOCK,n.PW.ETF].includes(s))&&(e!==a.FUND_DATA||s===n.PW.ETF)&&(e!==a.FINANCIALS||s===n.PW.STOCK)&&(e!==a.NEWS||"MCX"!==t.exchange)}},50671:e=>{e.exports={sidebar:"AiChatHistorySidebar_sidebar__PyZqH",narrow:"AiChatHistorySidebar_narrow__vbTCP",open:"AiChatHistorySidebar_open__1KZ_5",panel:"AiChatHistorySidebar_panel__6JmvS",list:"AiChatHistorySidebar_list__o79bG"}},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,t,s)=>{"use strict";s.d(t,{o:()=>o,H:()=>c});var n=s(14063),a=s(93760),i=s(15269),r=s(63885);function o(){let{t:e}=(0,a.B)("promos"),{mutateAsync:t,isPending:s}=(0,n.n)({mutationFn:r.Um,onError:t=>{console.error(t),i.f1(e("TBANK.PROMOCODE_CLAIM_ERROR"))}});return{claimPromo:t,isPending:s}}var l=s(33989);function c(){return(0,l.I)({queryKey:["brokerage-dialog-info"],queryFn:r.td,enabled:!1})}},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,t,s)=>{"use strict";s.d(t,{Uq:()=>c,bH:()=>u,mU:()=>o});var n=s(26514),a=s(81593);s(75834);var i=s(60299),r=s.n(i),o=function(e){return e.VERTICAL_LIST_SORTING="verticalListSorting",e.RECT_SWAPPING="rectSwapping",e.RECT_SORTING="rectSorting",e}({});let l={rectSwapping:a.vl,rectSorting:a.kL,verticalListSorting:a._G};function c(e){let{id:t,strategy:s=o.RECT_SWAPPING,children:i,...l}=e,{attributes:c,listeners:d,setNodeRef:m,transform:u,transition:h,isSorting:p,isDragging:x}=(0,a.gl)({id:t}),g={transform:u?`${s===o.RECT_SWAPPING?`translateX(${u.x}px)`:""} translateY(${u.y}px)`:void 0,transition:p?h:void 0,zIndex:x?9999:void 0},f=`${r().root} ${x?"dragging":""} ${l.className??""}`;return"function"==typeof i?i({ref:m,style:g,attributes:c,listeners:d,className:f,isDragging:x}):(0,n.jsx)("div",{ref:m,style:g,...c,...d,className:f,children:i})}var d=s(32162),m=s(66969);
5function u(e){let{children:t,items:s,isDisabled:i=!1,onSort:r,strategy:c=o.RECT_SORTING}=e,u=(0,d.FR)((0,d.MS)(d.AN,{activationConstraint:{distance:1}}),(0,d.MS)(d.IG));return(0,n.jsx)(d.Mp,{sensors:u,collisionDetection:d.fp,onDragEnd:e=>{let{active:t,over:n}=e;if(!t?.id||!n?.id)return;let a=s.findIndex(e=>e===t.id),i=s.findIndex(e=>e===n.id);if(a<0||i<0||a===i)return;let l=[];if([o.RECT_SORTING,o.VERTICAL_LIST_SORTING].includes(c)){let e=s.filter(e=>e!==t.id),n=e.slice(0,i),r=e.slice(i,s.length);l.push(...n,s[a],...r)}c===o.RECT_SWAPPING&&(l.push(...s),l[a]=s[i],l[i]=s[a]),r?.(l)},modifiers:[m.gj],children:(0,n.jsx)(a.gB,{items:s,strategy:l[c],modifiers:[m.gj],disabled:i,children:t})})}},52550:e=>{e.exports={root:"QuotesListCompact_root__qCsMU"}},53804:(e,t,s)=>{"use strict";s.d(t,{P:()=>ey});var n=s(26514),a=s(62936),i=s.n(a),r=s(75834),o=s(7086),l=s(24322),c=s.n(l),d=s(46225),m=s(93760),u=s(23141),h=s(91114),p=s.n(h),x=s(31653),g=s(59757),f=s(60547),b=s(55285),N=s(48208),j=s(68827),v=s(48174),A=s(49732),_=s(68208),C=s.n(_),E=s(74170),T=s(64137),I=s(10930);class S extends r.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,n.jsx)(E.A,{show:this.state.show,onHide:this.close,size:"md","aria-labelledby":"example-modal-sizes-title-md",children:(0,n.jsxs)(E.A.Body,{children:[(0,n.jsx)("div",{className:"d-flex justify-content-end",children:(0,n.jsx)("button",{type:"button",onClick:this.close,className:"btn btn-clean btn-sm btn-icon",children:(0,n.jsx)("i",{className:"flaticon2-cross icon-nm"})})}),this.state.show&&(0,n.jsx)(I.X,{hide:()=>{this.close()}})]})})}}let y=(0,T.C)("common",{withRef:!0})(S);var O=s(63390),R=s(24138),w=s(61139);function k(){let{t:e}=(0,m.B)(["common","user"]),t=(0,g.wA)(),{user:s}=(0,g.d4)(e=>e.auth),a=r.createRef(null);function i(){a&&a.current&&a.current.open()}return(0,r.useEffect)(()=>{if(null!=s){let e=(0,R.sp)(s.subscriptionType),n=(0,R.PN)(s.subscriptionType),a=(0,R.s2)(s.subscriptionType);o.A.get(`${O.kn6}/get-counts`).then(s=>{let{data:r}=s;if(r){if(r.portfoliosCount<=e&&r.holdingsCount<=n&&r.customHoldingsCount<=a)return void t({type:w.QN.StartRefreshAccessToken});i()}}).catch(e=>{console.error(e)})}},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.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,n.jsxs)("div",{className:"row justify-content-between w-100",children:[(0,n.jsxs)("div",{className:"col-sm-12 col-md-auto d-flex align-items-center",children:[(0,n.jsx)(A.A,{className:"mr-2 d-none d-md-block",src:"/media/svg/icons/Code/Warning-2.svg",color:"warning",size:"2x"}),(0,n.jsx)("span",{children:(0,n.jsx)(u.x,{i18nKey:"user:PAYWALL.LIMITS.EXCEEDED_MESSAGE",components:[(0,n.jsx)(N.o,{className:"alert-link font-weight-bold",href:"/user-manage-subscription"}),(0,n.jsx)(v.q,{isBold:!0,text:(0,b.VQ)()})]})})]}),(0,n.jsx)("div",{className:"col-sm-12 col-md-auto mt-1",children:(0,n.jsx)("button",{type:"button",className:"btn btn-warning font-weight-bold",onClick:i,children:e("BUTTON.RELOAD",{ns:"user"})})})]})}),(0,n.jsx)(y,{ref:a})]})}var D=s(66243),L=s(46109),P=s(83308),M=s(72472),B=s(47115),U=s(17507),F=s(33689),H=s(83535),G=s(54253),$=s(66356),K=s(18150),Q=s(19717),z=s(83602),W=s(30985),q=s(97762),Y=s(60881),V=s.n(Y);let X=r.forwardRef((e,t)=>{let{onClick:s}=e;return(0,n.jsx)("div",{className:"feedback-navbar",children:(0,n.jsx)("div",{className:"feedback-trigger",ref:t,onClick:e=>{e.preventDefault(),s(e)},children:(0,n.jsx)("i",{className:"fas fa-question feedback-icon"})})})});function J(){let{t:e}=(0,m.B)("layout"),t=null,{user:s}=(0,g.d4)(e=>e.auth),a=(0,P.Mw)(),[i,o]=(0,r.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(W.A,{className:"dropdown-inline feedback-dd",alignRight:!0,children:[(0,n.jsx)(W.A.Toggle,{id:"dropdown-toggle-help",as:X}),(0,n.jsxs)(W.A.Menu,{className:"dropdown-menu dropdown-menu-top mb-1",children:[(0,n.jsx)(W.A.Header,{className:"font-weight-bold",children:e("HELP_DIALOG.TITLE")}),a.isEnabled&&(0,n.jsx)(W.A.Item,{as:"div",className:V().tourDropdownItem,children:(0,n.jsx)("button",{type:"button",className:`btn btn-primary font-size-sm btn-md text-uppercase ${V().tourBtn}`,onClick:()=>{o(!0)},children:e("HELP_DIALOG.TOUR")})}),(0,n.jsx)(W.A.Item,{eventKey:"2",onClick:()=>{t&&t.open(s.email)},children:(0,n.jsxs)("span",{children:[(0,n.jsx)("i",{className:"far fa-envelope icon-nm mr-1"})," ",e("HELP_DIALOG.SUPPORT")]})}),(0,n.jsx)(W.A.Item,{eventKey:"1",href:e("HELP.LINK"),className:"",target:"_blank",children:(0,n.jsxs)("span",{children:[(0,n.jsx)("i",{className:"far fa-question-circle icon-nm mr-1 mt-1"})," ",e("FOOTER.FAQ")]})}),(0,b.de)()&&(0,n.jsx)(W.A.Item,{eventKey:"3",href:e("HELP.YOUTUBE.LINK"),target:"_blank",children:(0,n.jsxs)("span",{children:[(0,n.jsx)("i",{className:"fab fa-youtube icon-nm mr-2 mt
5-1"}),e("HELP_DIALOG.GUIDES")]})}),!(0,b.de)()&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(W.A.Divider,{}),(0,n.jsx)(W.A.Header,{className:"font-weight-bold",children:"Telegram"}),(0,n.jsxs)(W.A.Item,{eventKey:"4",href:"https://t.me/snowball_income",className:"",rel:"nofollow",target:"_blank",children:[(0,n.jsx)("i",{className:"fab fa-telegram icon-nm mt-1 mr-2"})," ",e("HELP_DIALOG.TELEGRAM_CHANNEL")]}),(0,n.jsxs)(W.A.Item,{eventKey:"4",href:"https://t.me/longovichok",className:"",rel:"nofollow",target:"_blank",children:[(0,n.jsx)("i",{className:"fas fa-snowman icon-nm mt-1 mr-2"})," ",e("HELP_DIALOG.TELEGRAM_2_CHANNEL")]}),(0,n.jsxs)(W.A.Item,{eventKey:"3",href:"https://t.me/joinchat/imLsaazSSww5NTVi",rel:"nofollow",className:"",target:"_blank",children:[(0,n.jsx)("i",{className:"fab fa-telegram icon-nm mt-1 mr-2"})," ",e("HELP_DIALOG.TELEGRAM_CHAT")]}),(0,n.jsx)(W.A.Divider,{}),(0,n.jsx)(W.A.Header,{className:"font-weight-bold",children:e("HELP_DIALOG.MAX_GROUP")}),(0,n.jsxs)(W.A.Item,{eventKey:"3",href:"",rel:"nofollow",className:"",target:"_blank",children:[(0,n.jsx)(A.A,{size:"sm",color:"none",src:"/media/svg/logos/max-1.svg",className:"mr-2"})," ",e("HELP_DIALOG.MAX_CHAT")]})]})]})]}),(0,n.jsx)(q.a,{t:e,ref:e=>{t=e}}),(0,n.jsx)(P.rD,{show:i,onHide:()=>{o(!1)}})]})}var Z=s(33523),ee=s(33807);function et(){return(0,n.jsxs)("div",{id:"kt_quick_notifications",className:"offcanvas offcanvas-right pt-5 pb-10",children:[(0,n.jsx)("div",{className:"offcanvas-header d-flex align-items-center justify-content-between mb-10",children:(0,n.jsx)("div",{className:"offcanvas-close mt-n1 pr-5",style:{position:"absolute",top:"15px",right:"10px"},children:(0,n.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,n.jsx)("i",{className:"ki ki-close icon-xs text-muted"})})})}),(0,n.jsx)("div",{className:"offcanvas-content px-5",children:(0,n.jsx)(Z.$,{compact:!0})})]})}var es=s(65461),en=s(81221),ea=s(66933);function ei(){let e=new Date().getFullYear(),t=(0,K.SL)(),{t:s}=(0,m.B)(["layout","common"]),a=(0,r.useMemo)(()=>({footerClasses:t.getClasses("footer",!0),footerContainerClasses:t.getClasses("footer_container",!0)}),[t]);return(0,n.jsxs)("div",{className:`footer main-footer bg-white py-4 d-flex flex-lg-column ${a.footerClasses}`,id:"kt_footer",children:[(0,n.jsxs)("div",{className:`${a.footerContainerClasses} d-flex flex-column flex-md-row align-items-center justify-content-between`,children:[(0,n.jsxs)("div",{className:"text-dark order-2 order-md-1",children:[(0,n.jsx)("span",{className:"text-muted font-weight-bold mr-2",children:e.toString()})," ","\xa9 ",(0,n.jsx)("span",{className:"text-dark-75",children:(0,b.VQ)()}),!(0,b.de)()&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{href:"https://t.me/snowball_income",className:"btn btn-icon btn-link-light",target:"_blank",rel:"noreferrer",children:(0,n.jsx)("i",{className:"fab fa-telegram-plane icon-md text-dark-65"})}),(0,n.jsx)("a",{href:"",className:"btn btn-icon btn-link-light",target:"_blank",rel:"noreferrer",children:(0,n.jsx)(A.A,{size:"md",color:"dark-65",src:"/media/svg/logos/max-1.svg"})}),(0,n.jsx)("a",{href:s("HELP.YOUTUBE.LINK"),rel:"nofollow noreferrer",className:"btn btn-icon btn-link-light",target:"_blank",children:(0,n.jsx)("i",{className:"fab fa-youtube icon-md text-dark-65"})})]}),(0,b.de)()&&(0,n.jsxs)(n.Fragment,{children:[(0,n.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,n.jsx)("i",{className:"fab fa-reddit-alien icon-md text-dark-65"})}),(0,n.jsx)("a",{href:"https://x.com/snowballtracker",rel:"nofollow noreferrer",className:"btn btn-icon btn-link-light btn-sm",target:"_blank",children:(0,n.jsx)("span",{className:"text-dark-65 font-size-lg",children:"\uD835\uDD4F"})}),(0,n.jsx)("a",{href:s("HELP.YOUTUBE.LINK"),rel:"nofollow noreferrer",className:"btn btn-icon btn-link-light",target:"_blank",children:(0,n.jsx)("i",{className:"fab fa-youtube icon-md text-dark-65"})})]})]}),(0,n.jsxs)("div",{className:"nav nav-dark order-1 order-md-2",children:[(0,n.jsx)("a",{href:`mailto:${(0,b.SD)()}`,target:"_blank",rel:"noopener noreferrer",className:"nav-link pr-3 pl-0",children:s("FOOTER.SUPPORT")}),(0,n.jsx)("a",{href:"/docs/Terms.pdf",target:"_blank",className:"nav-link pr-3 pl-0",children:s("FOOTER.TERMS")}),(0,n.jsx)("a",{href:"/docs/PrivacyPolicy.pdf",target:"_blank",className:"nav-link pr-3 pl-0",children:s("FOOTER.PRIVACY_POLICY")}),(0,b.de)()&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("a",{href:"/docs/Security.pdf",target:"_blank",className:"nav-link pr-3 pl-0",children:s("FOOTER.SECURITY")}),(0,n.jsx)("a",{href:"/docs/Yodlee.pdf",target:"_blank",className:"nav-link pr-3 pl-0",children:s("FOOTER.YODLEE")})]})]})]}),(0,n.jsx)("div",{className:"pt-5 px-2 px-md-8",children:(0,n.jsx)(ea.T,{})})]})}var er=s(13865),eo=s(38550),el=s(28714),ec=s(53317),ed=s(80966),em=s(72596),eu=s(12822),eh=s(16926),ep=s(22871),ex=s(47894);let eg=(0,em.Ay)(er.A)(()=>({})),ef=(0,em.Ay)(eo.A)(()=>
5({minWidth:0,"& .MuiBottomNavigationAction-label.Mui-selected":{fontSize:"10px",color:"var(--body-color)",fontWeight:"500",textTransform:"none"}}));function eb(){let e=(0,d.useRouter)(),{currentPortfolio:t,user:s,analyticsAsOfDate:a}=(0,g.d4)(e=>{let{app:t,auth:s}=e;return{currentPortfolio:t.currentPortfolio,user:s.user,analyticsAsOfDate:t.analyticsAsOfDate}}),i=(0,ex.iT)(ep.Y.TRAINING),o=(0,g.wA)(),{t:l}=(0,m.B)("layout"),[c,u]=r.useState("dashboard"),[h,x]=r.useState(!1),[N,j]=r.useState(!1),[v,_]=r.useState(!1),[C,E]=r.useState(!1);(0,r.useEffect)(()=>{"/dashboard"===e.pathname||"/manage-portfolios"===e.pathname?u(e.pathname.substr(1)):["/portfolio","/assets","/transactions","/corporate-actions","/div-calendar","/my-goal","/cash","/recap25"].indexOf(e.pathname)>=0?u("portfolio-menu"):["/rebalancing","/top-dividend-stocks","/portfoliolab","/findthedip","/calendars/dividend-calendar","/calendars/ex-dividend-calendar"].indexOf(e.pathname)>=0?u("tool-menu"):["/stats","/stats#common","/stats#diversification","/stats#divs","/stats#growth","/stats#scores","/stats#report","/stats#bonds"].indexOf(e.pathname)>=0?u("stats-menu"):["/public/community","/public/portfolios","/public/popular-assets","/public/blog"].indexOf(e.pathname)>=0?u("community-menu"):u(""),x(!1),j(!1),_(!1),E(!1)},[e.asPath]);let T=(e,t)=>{"portfolio-menu"!==t&&"tool-menu"!==t&&"stats-menu"!==t&&"community-menu"!==t&&u(t)},I=function(t){let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,G.ZY)(e,t,s)?"menu-item-active":""},S=!!s?.showLearnWithSnowball&&!(0,b.de)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:`footer-mobile ${ed.un&&ed.XF?"footer-mobile-up":""}`,children:(0,n.jsxs)(eg,{value:c,children:[(0,n.jsx)(ef,{id:"mobile-footer-dashboard",onKeyPress:()=>{T("dashboard")},component:eu.k,href:"/dashboard",className:"bottom-nav-icon",value:"dashboard",label:l("MENU.DASHBOARD"),icon:(0,n.jsx)("span",{className:`svg-icon svg-icon-lg ${"dashboard"===c&&"svg-icon-dark"}`,children:(0,n.jsx)(p(),{preProcessor:f.xY,src:(0,G.oK)("/media/svg/icons/Home/Home.svg")})})}),(0,n.jsx)(ef,{id:"mobile-footer-stats",onKeyPress:()=>{T("stats-menu")},component:el.A,onClick:()=>{_(!0),j(!1),x(!1),E(!1)},className:"bottom-nav-icon",value:"stats-menu",label:l("MENU.ANALYTICS"),icon:(0,n.jsx)("span",{className:`svg-icon svg-icon-lg ${"stats-menu"===c&&"svg-icon-dark"}`,children:(0,n.jsx)(p(),{preProcessor:f.xY,src:(0,G.oK)("/media/svg/icons/Shopping/Sort3.svg")})})}),(0,n.jsx)(ef,{id:"mobile-footer-portfolio",onKeyPress:()=>{T("portfolio-menu")},component:el.A,onClick:()=>{x(!0),j(!1),_(!1),E(!1)},className:"bottom-nav-icon",value:"portfolio-menu",label:l("MENU.PORTFOLIO"),icon:(0,n.jsxs)("span",{className:`svg-icon svg-icon-lg ${"portfolio-menu"===c&&"svg-icon-dark"}`,children:[(0,n.jsx)(p(),{preProcessor:f.xY,src:(0,G.oK)("/media/svg/icons/General/portfolio.svg")}),B.or&&(0,n.jsx)("i",{className:"btn-indicator text-primary fas fa-snowflake icon-xs"})]})}),!(0,b.E8)()&&(0,n.jsx)(ef,{id:"mobile-footer-tools",onKeyPress:()=>{T("tool-menu")},component:el.A,onClick:()=>{j(!0),x(!1),_(!1),E(!1)},className:"bottom-nav-icon",value:"tool-menu",label:l("MENU.TOOLS"),icon:(0,n.jsx)("span",{className:`svg-icon svg-icon-lg ${"tool-menu"===c&&"svg-icon-dark"}`,children:(0,n.jsx)(p(),{preProcessor:f.xY,src:(0,G.oK)("/media/svg/icons/Tools/Swiss-knife.svg")})})}),!(0,b.E8)()&&(0,n.jsx)(ef,{id:"mobile-footer-community",onKeyPress:()=>{T("community-menu")},onClick:()=>{E(!0),j(!1),x(!1),_(!1)},component:el.A,className:"bottom-nav-icon",value:"community-menu",label:l("MENU.COMMUNITY"),icon:(0,n.jsx)("span",{className:`svg-icon svg-icon-lg ${"community-menu"===c&&"svg-icon-dark"}`,children:(0,n.jsx)(p(),{preProcessor:f.xY,src:(0,G.oK)("/media/svg/icons/Home/Earth.svg")})})}),S&&!(0,b.E8)()&&(0,n.jsx)(ef,{component:eu.k,href:"https://snowball-income.getcourse.ru/div",className:"bottom-nav-icon",value:"training",target:"_blank",label:l("MENU.TRAINING"),onClick:()=>{o((0,eh.hQ)(ep.Y.TRAINING))},icon:(0,n.jsxs)("span",{className:"svg-icon svg-icon-lg",children:[(0,n.jsx)(p(),{preProcessor:f.xY,src:(0,G.oK)("/media/svg/icons/Home/Education.svg")}),!i.isShown&&(0,n.jsx)("span",{className:"btn-indicator label label-md label-dot label-primary"})]})})]})}),(0,n.jsx)(ec.Ay,{anchor:"bottom",open:v,onClose:()=>{_(!1)},children:(0,n.jsx)("div",{className:"header-menu-mobile",children:(0,n.jsxs)("ul",{className:"menu-nav",children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I(["/stats#common","/stats#","/stats"],!0)}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/stats#common",id:"header-menu-mobile-stats-common",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/portfolio.svg"}),(0,n.jsx)("span",{className:"menu-text",children:l("analytics:TABS.COMMON")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/stats#diversification",!0)}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/stats#diversification",id:"header-menu-mobile-stats-diversification",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/pie.svg"}),(0,n.jsx)("span",{className:"menu-text",children:l("analytics:TABS.DIVERSIFICATION")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/stats#divs",!0)}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/stats#divs",id:"header-menu-mobile-stats-divs",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/Chart-bar2.svg"}),(0,n.jsx)("span",{className:"menu-text",children:l("analytics:TABS.DIVIDENDS")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/stats#growth",!0)}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/stats#growth",id:"header-menu-mobile-stats-growth",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/ship.svg"}),(0,n.jsx)("span",{className:"menu-text",children:l("analytics:TABS.GROWTH")})]})}),(0,n.jsx)("hr",{className:"menu-separator"}),!a&&(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/stats#scores",!0)}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/stats#scores",id:"header-menu-mobile-stats-scores",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Devices/Diagnostics.svg"}),(0,n.jsx)("span",{className:"menu-text",children:l("analytics:TABS.METRICS")})]})}),t?.type==B.N$.TRANSACTIONAL?(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/stats#report",!0)}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/stats#report",id:"header-menu-mobile-stats-report",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/report.svg"}),(0,n.jsx)("span",{className:"menu-text",children:l("analytics:TABS.REPORT")})]})}):null,!(0,b.de)()&&(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/stats#bonds",!0)}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/stats#bonds",id:"header-menu-mobile-stats-bonds",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Files/Selected-file.svg"}),(0,n.jsx)("span",{className:"menu-text",children:l("analytics:TABS.BONDS")})]})})]})})}),(0,n.jsx)(ec.Ay,{anchor:"bottom",open:h,onClose:()=>{x(!1)},children:(0,n.jsx)("div",{className:"header-menu-mobile",children:(0,n.jsxs)("ul",{className:"menu-nav",children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/assets")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/assets",id:"header-menu-mobile-portfolio-assets",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/portfolio.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.ASSETS")})]})}),t?.type==B.N$.TRANSACTIONAL?(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/transactions")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/transactions",id:"header-menu-mobile-portfolio-transactions",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Communication/Clipboard-list.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.TRANSACTIONS")})]})}):null,(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/div-calendar")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/div-calendar",id:"header-menu-mobile-portfolio-div-calendar",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/calendar.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.DIV_CALENDAR")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/my-goal")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/my-goal",id:"header-menu-mobile-portfolio-my-goal",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/goal-m.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.MY_GOAL")})]})}),t?.type==B.N$.TRANSACTIONAL?(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/stats#report")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/stats#report",id:"header-menu-mobile-portfolio-report",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/report.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.REPORT")})]})}):null,B.or&&(0,n.jsx)("li",{className:"recap-link menu-item menu-item-rel",children:(0,n.jsx)(eu.k,{className:"menu-link",href:"/recap25",target:"_blank",id:"header-menu-mobile-portfolio-recap",children:(0,n.jsxs)("span",{className:"menu-text",children:["⨠",l("MENU.RECAP_25")," â¨"]})})}),(0,n.jsx)("hr",{className:"menu-separator"}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/cash")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/cash",id:"header-menu-mobile-portfolio-cash",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/money2.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.CASH")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/portfolio")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/portfolio",id:"header-menu-mobile-portfolio-categories",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/pie.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.CATEGORIES")})]})}),t?.type==B.N$.TRANSACTIONAL?(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/corporate-actions")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/corporate-actions",id:"header-menu-mobile-portfolio-corporate-actions",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Code/Github.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.CORPORATE_ACTIONS")})]})}):null]})})}),!(0,b.E8)()&&(0,n.jsx)(ec.Ay,{anchor:"bottom",open:N,onClose:()=>{j(!1)},children:(0,n.jsx)("div",{className:"header-menu-mobile",children:(0,n.jsxs)("ul",{className:"menu-nav",children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/rebalancing")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/rebalancing",id:"header-menu-mobile-tools-recommendations",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/Chart-pie.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.REBALANCING")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/top-dividend-stocks")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link align-items-center",href:"/top-dividend-stocks",id:"header-menu-mobile-tools-top-dividend-stocks",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/Star.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.DIVFINDER")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/calendars/dividend-calendar")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link align-items-center",target:"_blank",href:"/calendars/dividend-calendar",id:"header-menu-mobile-tools-dividend-calendar",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/calendar.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.PUBLIC_DIVIDEND_CALENDAR")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/portfoliolab")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link align-items-center",href:"/portfoliolab",id:"header-menu-mobile-tools-portfoliolab",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Home/Bulb1.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.BACKTEST")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/findthedip")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/findthedip",id:"header-menu-mobile-tools-findthedip",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Navigation/Angle-double-down.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.FINDTHEDIP")})]})})]})})}),!(0,b.E8)()&&(0,n.jsx)(ec.Ay,{anchor:"bottom",open:C,onClose:()=>{E(!1)},children:(0,n.jsx)("div",{className:"header-menu-mobile",children:(0,n.jsxs)("ul",{className:"menu-nav",children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/public/community")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-mobile-community-hub",className:"menu-link",href:"/public/community",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Communication/users-01.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.COMMUNITY_HUB")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/public/portfolios")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-mobile-community-portfolios",className:"menu-link",href:"/public/portfolios",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Clothes/briefcase-02.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.PUBLIC_PORTFOLIOS")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/public/popular-assets")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-mobile-community-popular-assets",className:"menu-link",href:"/public/popular-assets",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/stars-01.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.POPULAR_ASSETS")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${I("/public/blog")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-mobile-community-blog",className:"menu-link",href:"/public/blog",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Home/lightbulb-05.svg"}),(0,n.jsx)("span",{className:"menu-text text-dark-75",children:l("MENU.BLOG")})]})})]})})})]})}var eN=s(71497),ej=s(152),ev=s(40945),eA=s(96456),e_=s.n(eA);function eC(e){let{layoutProps:t}=e,s=(0,d.useRouter)(),{t:a}=(0,m.B)(["layout","analytics"]),i=(0,ex.iT)(ep.Y.TRAINING),{currentPortfolio:r,user:o,analyticsAsOfDate:l}=(0,g.d4)(e=>{let{app:t,auth:s}=e;return{currentPortfolio:t.currentPortfolio,user:s.user,analyticsAsOfDate:t.analyticsAsOfDate}}),c=(0,g.wA)(),u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,G.ZY)(s,e,t)?"menu-item-active":""},h=!!o?.showLearnWithSnowball&&!(0,b.de)()&&!(0,b.E8)();return(0,n.jsx)("div",{id:"kt_header_menu",className:`header-menu header-menu-mobile header-menu-layout-default ${t.ktMenuClasses}`,...t.headerMenuAttributes,children:(0,n.jsxs)("ul",{className:`menu-nav ${t.ulClasses}`,children:[null!=r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/dashboard")}`,children:(0,n.jsx)(eu.k,{className:"menu-link",href:"/dashboard",id:"header-menu-dashboard",children:(0,n.jsx)("span",{className:"me
5nu-text",children:a("MENU.DASHBOARD")})})}),(0,n.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 ${u(["/stats"])}`,children:[(0,n.jsxs)(eu.k,{id:"header-menu-analytics",className:"menu-link menu-toggle",href:"/stats",onClick:()=>{s.push("/stats")},children:[(0,n.jsx)("span",{className:"menu-text",children:a("MENU.ANALYTICS")}),(0,n.jsx)("i",{className:"menu-arrow"})]}),(0,n.jsx)("div",{className:"menu-submenu menu-submenu-classic menu-submenu-left",children:(0,n.jsxs)("ul",{className:"menu-subnav",children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u(["/stats#common","/stats#","/stats"],!0)}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-analytics-common",className:"menu-link",href:"/stats#common",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/portfolio.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("analytics:TABS.COMMON")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/stats#diversification",!0)}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-analytics-diversification",className:"menu-link",href:"/stats#diversification",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/pie.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("analytics:TABS.DIVERSIFICATION")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/stats#divs",!0)}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-analytics-divs",className:"menu-link",href:"/stats#divs",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/Chart-bar2.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("analytics:TABS.DIVIDENDS")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/stats#growth",!0)}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-analytics-growth",className:"menu-link",href:"/stats#growth",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/ship.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("analytics:TABS.GROWTH")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),(0,n.jsx)("hr",{className:"menu-separator"}),!l&&(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/stats#scores",!0)}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-analytics-scores",className:"menu-link",href:"/stats#scores",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Devices/Diagnostics.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("analytics:TABS.METRICS")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),r?.type==B.N$.TRANSACTIONAL?(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/stats#report",!0)}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-analytics-report",className:"menu-link",href:"/stats#report",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/report.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("analytics:TABS.REPORT")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}):null,!(0,b.de)()&&(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/stats#bonds",!0)}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-analytics-bonds",className:"menu-link",href:"/stats#bonds",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Files/Selected-file.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("analytics:TABS.BONDS")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})})]})})]}),(0,n.jsxs)("li",{"data-menu-toggle":"click","aria-haspopup":"true",className:`menu-item menu-item-submenu menu-item-rel menu-item-click-hover ${u(["/portfolio","/assets","/transactions","/corporate-actions","/div-calendar","/my-goal","/cash"])}`,children:[(0,n.jsxs)(eu.k,{id:"header-menu-portfolio",className:"menu-link menu-toggle",href:"/portfolio",children:[(0,n.jsx)("span",{className:"menu-text",children:a("MENU.PORTFOLIO")}),B.or&&(0,n.jsx)("i",{className:"btn-indicator text-primary fas fa-snowflake icon-xs"}),(0,n.jsx)("i",{className:"menu-arrow"})]}),(0,n.jsx)("div",{className:"menu-submenu menu-submenu-classic menu-submenu-left",children:(0,n.jsxs)("ul",{className:"menu-subnav",children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/assets")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-portfolio-assets",className:"menu-link",href:"/assets",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/portfolio.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.ASSETS")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),r?.type==B.N$.TRANSACTIONAL?(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/transactions")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-portfolio-transactions",className:"menu-link",href:"/transactions",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Communication/Clipboard-list.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.TRANSACTIONS")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}):null,(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/div-calendar")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-portfolio-div-calendar",className:"menu-link",href:"/div-calendar",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/calendar.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.DIV_CALENDAR")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/my-goal")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-portfolio-my-goal",className:"menu-link",href:"/my-goal",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/goal-m.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.MY_GOAL")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),B.or&&(0,n.jsx)("li",{className:"recap-link menu-item menu-item-rel",children:(0,n.jsx)(eu.k,{id:"header-menu-portfolio-recap",className:"menu-link",href:"/recap25",target:"_blank",children:(0,n.jsxs)("span",{className:"menu-text",children:["⨠",a("MENU.RECAP_25")," â¨"]})})}),(0,n.jsx)("hr",{className:"menu-separator"}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/cash")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/cash",id:"header-menu-portfolio-cash",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/money2.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.CASH")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/portfolio")}`,children:(0,n.jsx)(eu.k,{className:"menu-link",href:"/portfolio",id:"header-portfolio-link",children:(0,n.jsxs)("div",{className:"d-flex align-items-center flex-grow-1",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/charts/pie.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.CATEGORIES")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})})}),r?.type==B.N$.TRANSACTIONAL?(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/corporate-actions")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-portfolio-corporate-actions",className:"menu-link",href:"/corporate-actions",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Code/Github.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.CORPORATE_ACTIONS")}),t.rootArrowEnabled&&(0,n.jsx)("i",{className:"menu-arrow"})]})}):null]})})]}),(0,n.jsxs)("li",{"data-menu-toggle":"click","aria-haspopup":"true",className:`menu-item menu-item-submenu menu-item-rel menu-item-click-hover ${u(["/rebalancing","/top-dividend-stocks","/portfoliolab","/findthedip"])}`,children:[(0,n.jsxs)(eu.k,{id:"header-menu-tools",className:"menu-link menu-toggle",href:"/rebalancing",children:[(0,n.jsx)("span",{className:"menu-text",children:a("MENU.TOOLS")}),(0,n.jsx)("i",{className:"menu-arrow"})]}),(0,n.jsx)("div",{className:"menu-submenu menu-submenu-classic menu-submenu-left",children:(0,n.jsxs)("ul",{className:"menu-subnav",children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/rebalancing")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-tools-recommendations",className:"menu-link",href:"/rebalancing",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Shopping/Chart-pie.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.REBALANCING")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/top-dividend-stocks")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-tools-top-dividend-stocks",className:"menu-link",href:"/top-dividend-stocks",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/Star.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.DIVFINDER")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/calendars/dividend-calendar")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-tools-dividend-calendar",className:"menu-link",href:"/calendars/dividend-calendar",target:"_blank",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/calendar.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.PUBLIC_DIVIDEND_CALENDAR")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/portfoliolab")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-tools-dividend-portfolio-lab",className:"menu-link",href:"/portfoliolab",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Home/Bulb1.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.BACKTEST")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/findthedip")}`,children:(0,n.jsxs)(eu.k,{id:"header-menu-tools-findthedip",className:"menu-link",href:"/findthedip",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Navigation/Angle-double-down.svg?v=1"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.FINDTHEDIP")})]})})]})})]})]}),!(0,b.E8)()&&(0,n.jsxs)("li",{"data-menu-toggle":"click","aria-haspopup":"true",className:`menu-item menu-item-submenu menu-item-rel menu-item-click-hover ${u(["/public/community","/public/portfolios","/public/popular-assets","/public/blog"])}`,children:[(0,n.jsxs)(eu.k,{className:"menu-link menu-toggle",href:"/public/community",children:[(0,n.jsx)("span",{className:"menu-text",children:a("MENU.COMMUNITY")}),(0,n.jsx)("i",{className:"menu-arrow"})]}),(0,n.jsx)("div",{className:"menu-submenu menu-submenu-classic menu-submenu-left",children:(0,n.jsxs)("ul",{className:"menu-subnav",children:[(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/public/community")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/public/community",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Communication/users-01.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.COMMUNITY_HUB")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/public/portfolios")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/public/portfolios",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Clothes/briefcase-02.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.PUBLIC_PORTFOLIOS")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/public/popular-assets")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/public/popular-assets",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/General/stars-01.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.POPULAR_ASSETS")})]})}),(0,n.jsx)("li",{className:`menu-item menu-item-rel ${u("/public/blog")}`,children:(0,n.jsxs)(eu.k,{className:"menu-link",href:"/public/blog",children:[(0,n.jsx)(A.A,{className:"menu-icon muted-icon",size:"md",noColor:!0,src:"/media/svg/icons/Home/lightbulb-05.svg"}),(0,n.jsx)("span",{className:"menu-text",children:a("MENU.BLOG")})]})})]})})]}),!!h&&(0,n.jsx)("li",{className:"menu-item menu-item-rel",children:(0,n.jsxs)(eu.k,{target:"_blank",className:"menu-link",href:"https://snowball-income.getcourse.ru/div",onClick:()=>{c((0,eh.hQ)(ep.Y.TRAINING))},children:[(0,n.jsx)("span",{className:"menu-text",children:a("MENU.TRAINING")}),!i.isShown&&(0,n.jsx)("span",{className:"btn-indicator label label-md label-dot label-primary"})]})})]})})}function eE(){let e,t=(0,K.SL)(),s=(0,g.wA)(),a=(0,r.useMemo)(()=>({config:t.config,ktMenuClasses:t.getClasses("header_menu",!0),rootArrowEnabled:i().get(t.config,"header.menu.self.root-arrow"),menuDesktopToggle:i().get(t.config,"header.menu.desktop.toggle"),headerMenuAttributes:t.getAttributes("header_menu"),headerSelfTheme:i().get(t.config,"header.self.theme"),ulClasses:t.getClasses("header_menu_nav",!0),disabledAsideSelfDisplay:!1===i().get(t.config,"aside.self.dis
5play")}),[t]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"header-menu-wrapper header-menu-wrapper-left",id:"kt_header_menu_wrapper",children:[a.disabledAsideSelfDisplay&&!(0,b.E8)()&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"header-logo",children:(0,n.jsx)(e_(),{soft:!1,legacyBehavior:!0,href:"/",children:(0,n.jsx)("a",{onClick:function(){s((0,eh.Aj)())},children:(0,n.jsx)("img",{className:"cursor-pointer",alt:"logo",src:(e="symbol.svg",a.headerSelfTheme&&"dark"!==a.headerSelfTheme&&(e="symbol.svg"),(0,G.oK)(`/media/logos/${e}`)),style:{height:"40px"}})})})})}),(0,n.jsx)(eC,{layoutProps:a})]})})}function eT(e){let t=(0,K.SL)(),s=(0,r.useMemo)(()=>({headerClasses:t.getClasses("header",!0),headerAttributes:t.getAttributes("header"),headerContainerClasses:t.getClasses("header_container",!0),menuHeaderDisplay:i().get(t.config,"header.menu.self.display")}),[t]),a=(0,P.Mw)();return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"header header-fixed",id:"kt_header",...s.headerAttributes,children:(0,n.jsxs)("div",{className:` ${s.headerContainerClasses} d-flex align-items-stretch justify-content-between`,children:[(0,n.jsx)(ej.aU,{scrollToTop:!a.isStarted||a.status===P.Ne.PAUSED}),s.menuHeaderDisplay&&(0,n.jsx)(eE,{}),!s.menuHeaderDisplay&&(0,n.jsx)("div",{}),(0,n.jsx)(ev.b,{pendingNotifications:e.pendingNotifications})]})})})}var eI=s(85523),eS=s(37322);function ey(e){let{children:t}=e,s=(0,P.Mw)(),a=(0,K.SL)(),[l,h]=(0,r.useState)(!1),{isDark:v}=(0,z.DP)(),A=(0,d.useRouter)(),{t:_}=(0,m.B)("layout"),{load:C,lastPortfoliosUpdateDate:E}=(0,D.J)(),T=(0,r.useMemo)(()=>({layoutConfig:a.config,selfLayout:i().get(a.config,"self.layout"),asideDisplay:i().get(a.config,"aside.self.display"),subheaderDisplay:i().get(a.config,"subheader.display"),desktopHeaderDisplay:i().get(a.config,"header.self.fixed.desktop"),contentCssClasse
5s:a.getClasses("content",!0),contentContainerClasses:a.getClasses("content_container",!0),contentExtended:i().get(a.config,"content.extended")}),[a]),{user:I}=(0,g.d4)(e=>e.auth),{notificationReload:S=""}=(0,g.d4)(e=>{let{ui:t}=e;return t}),[y,R]=(0,r.useState)(0);async function w(){try{let e=O.ipX,t=(await o.A.get(e)).data;R(t.count)}catch(e){console.error(e)}}return(0,r.useEffect)(()=>{C()},[E]),(0,r.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,r.useEffect)(()=>{I?.exceededLimits&&"/user-manage-subscription"!=A.pathname?h(!0):h(!1)},[A.pathname,I?.exceededLimits]),(0,r.useEffect)(()=>{w()},[S]),"blank"!==T.selfLayout?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c(),{children:(0,n.jsx)("meta",{name:"robots",content:"noindex, nofollow"},"robots")}),(0,n.jsx)($.i,{children:(0,n.jsxs)(x.default,{onSSR:(0,n.jsx)(Q.e,{}),children:[(0,n.jsx)(eN.M,{pendingNotifications:y,type:"main"}),(0,n.jsx)("div",{className:"d-flex flex-column flex-root main-layout-content-wrap",children:(0,n.jsx)("div",{className:"d-flex flex-row flex-column-fluid page",children:(0,n.jsxs)("div",{className:"d-flex flex-column flex-row-fluid wrapper",id:"kt_wrapper",children:[(0,n.jsx)(eT,{pendingNotifications:y}),(0,n.jsxs)("div",{id:"kt_content",className:`content ${T.contentCssClasse
5s} d-flex flex-column flex-column-fluid`,children:[T.subheaderDisplay&&(0,n.jsx)(eS.i,{}),!T.contentExtended&&(0,n.jsx)("div",{className:"d-flex flex-column-fluid",children:(0,n.jsxs)("div",{className:T.contentContainerClasses,children:[(I?.subscriptionType===B.Qh.CANCELLED||I?.subscriptionType===B.Qh.EXPIRED)&&(0,n.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,n.jsxs)("div",{className:"d-flex align-items-center",children:[(0,n.jsx)("span",{className:"svg-icon svg-icon-2x svg-icon-danger mr-4",children:(0,n.jsx)(p(),{preProcessor:f.xY,src:(0,G.oK)("/media/svg/icons/General/Sad.svg?v=1")})}),(0,n.jsxs)("div",{className:"alert-text",children:[_("SUBSCRIPTION_ALERT.HEADER"),"\xa0",(0,n.jsxs)(u.x,{i18nKey:"layout:SUBSCRIPTION_ALERT.MESSAGE",children:[(0,n.jsx)(N.o,{href:"/user-manage-subscription",className:"text-danger font-weight-bold"}),(0,n.jsx)("b",{})]})]})]}),(0,n.jsx)(N.o,{href:"/user-manage-subscription",className:"btn btn-white font-weight-bold",children:_("SUBSCRIPTION_ALERT.PRICING_BTN")})]}),l&&(0,n.jsx)(k,{}),(0,n.jsx)(en.a,{}),t]})}),T.contentExtended&&{children:t}]}),(0,n.jsx)(ei,{})]})})}),!!I&&(0,n.jsx)(F.n6,{}),(0,n.jsx)(J,{}),I?.onboardingState==="completed"&&(0,n.jsx)(eb,{}),(0,n.jsx)(es.l,{}),(0,n.jsx)(eI.L,{}),(0,n.jsx)(et,{}),!s.isStarted&&(0,n.jsx)(L.a,{}),(0,b.de)()&&(0,n.jsx)(M.$,{}),!(0,b.de)()&&(0,n.jsx)(U.O,{}),I?.onboardingState==="completed"&&I?.showAIChat&&(0,n.jsx)(H.Ws,{}),(0,n.jsx)(j.A,{})]})})]}):(0,n.jsx)("div",{className:"d-flex flex-column flex-root",children:t})}},54892:e=>{e.exports={suggestions:"AiChatSuggestedQuestions_suggestions__qt3W3"}},55681:(e,t,s)=>{"use strict";s.d(t,{k:()=>m});var n=s(26514),a=s(75834),i=s(93760),r=s(8393),o=s(91283),l=s(56964),c=s(15124),d=s(45041);function m(e){let{portfolio:t,result:s,withButton:m,withIcons:u,seeMore:h=!1}=e,{t:p,i18n:{language:x}}=(0,i.B)(["import","common"]),g=a.useRef(null),f=(0,a.useMemo)(()=>{let e=(0,o.LV)(x),t=s?.items?.length>0;return s.syncDate=s.syncDate?new Date(s.syncDate):null,s.items&&(0,c.N)(s.items,e),{hasData:t,item:t?s.items[0]:void 0,...s}},[s]);return(0,n.jsxs)(n.Fragment,{children:[f.hasData&&(0,n.jsxs)(n.Fragment,{children:[!t.isComposite&&(0,n.jsx)(l.P,{data:f.item,isCompact:!0,withIcons:u,seeMore:h}),t.isComposite&&(0,n.jsx)(l.s,{data:f,isCompact:!0,withIcons:u,seeMore:h})]}),m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.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:[!f.hasData&&(0,n.jsx)(r.A,{fontSize:"sm",sx:{marginRight:"0.2rem"}}),p("LAST_SYNC.UPDATE_DATA_NOW",{ns:"import"})]}),(0,n.jsx)(d.J,{ref:g,portfolioId:t.id,portfolio:t})]})]})}},56103:(e,t,s)=>{"use strict";s.d(t,{J:()=>b,O:()=>f});var n=s(26514),a=s(82056),i=s(58303),r=s(22005),o=s(32491),l=s.n(o),c=s(75119),d=s.n(c),m=s(75834),u=s(93760),h=s(21069),p=s(72732);let x=()=>({popper:{width:"fit-content"}});function g(e){return(0,n.jsx)(i.A,{...e,style:x.popper,placement:"bottom-end"})}function f(e){let{item:t,hideIcon:s}=e;return(0,n.jsxs)("div",{className:"row m-0 asset-info-container",children:[!s&&(0,n.jsx)("div",{className:"col-auto p-0 d-flex align-items-center",children:(0,n.jsx)(h.hz,{logoUrl:t.logoURL,primaryLogoUrl:t.primaryLogoURL,size:"sm"})}),(0,n.jsxs)("div",{className:"col p-0 d-flex align-items-center",children:[(0,n.jsx)("span",{className:"label label-light label-inline font-weight-bold p-1 mr-1",children:t.ticker}),(0,n.jsx)("span",{className:"asset-info-description",children:t.description})]})]})}function b(e){let{t}=(0,u.B)(["common"]),[s,i]=(0,m.useState)([]),[o,c]=(0,m.useState)([]),[h,x]=(0,m.useState)(e.listViewType??"full"),b=async()=>{let t=await (0,p.kJ)();i(e.sortCurrencies?e.sortCurrencies(t,e.value):t)};(0,m.useEffect)(()=>{b()},[e.sortCurrencies,e.value]),(0,m.useEffect)(()=>{if("full"!=h){let e=d()(s,3);e.push({value:"",moreItems:!0,name:t("BUTTON.MORE_ITEMS")}),c(e)}else c(s)},[h,s]);let N=s.find(t=>t.value===e.value)||null;return(0,n.jsx)(n.Fragment,{children:s&&s.length>0&&(0,n.jsx)(r.A,{placeholder:e.placeholder??"",disabled:e.disabled??!1,value:N,isOptionEqualToValue:(e,t)=>
5e.value===t?.value,onChange:(t,s)=>{s&&s.moreItems?x("full"):e.onChange(t,s)},PopperComponent:e.fullWidth?void 0:g,noOptionsText:t("NO_DATA"),options:o,getOptionLabel:t=>t?e.optionDisplay&&"string"==typeof t?`${l()(s,e=>e.value==t)?.ticker} - ${l()(s,e=>e.value==t)?.description}`:e.optionDisplay&&"string"!=typeof t?`${t.ticker} - ${t.description}`:t?.value??t:"",disableClearable:!0,renderOption:(t,s)=>(0,n.jsx)("li",{...t,children:"compact"==e.displayType||s.moreItems?(0,n.jsx)("span",{className:"font-weight-bold",children:s.name??s.value}):(0,n.jsx)(f,{item:s})}),renderInput:t=>(0,n.jsx)(a.A,{variant:"filled",placeholder:e.placeholder??"",...t,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,t,s)=>{"use strict";s.d(t,{P:()=>c,s:()=>d});var n=s(26514);s(75834);var a=s(93760),i=s(46711),r=s(4068),o=s(61392),l=s(97043);function c(e){let{data:t,isCompact:s,withIcons:d,seeMore:m}=e,{t:u}=(0,a.B)(["import","common"]),h=s&&!m?l.o:i.A,p=s&&!m?{title:(0,n.jsx)(c,{data:t,isCompact:!1})}:{component:"div"};return(0,n.jsx)(h,{...p,children:(0,n.jsxs)("div",{className:s?"d-inline-flex align-items-center":"",children:[d&&(0,n.jsx)(n.Fragment,{children:t.success?(0,n.jsx)(o.A,{fontSize:"small",sx:{marginRight:"0.5rem"}}):(0,n.jsx)(r.A,{fontSize:"small",sx:{marginRight:"0.5rem"}})}),(0,n.jsxs)("span",{className:`${s&&!m&&"hoverable-item"}`,children:[u("LAST_SYNC.RESULT.TITLE"),":\xa0",t.success&&s&&(t.syncDateDistance?t.syncDateDistance:u("SIMPLE_DATE",{date:new Date(t.syncDate),ns:"common"})),t.success&&!s&&u("SIMPLE_DATETIME",{date:new Date(t.syncDate),ns:"common"}),!t.success&&u("LAST_SYNC.RESULT.FAILED"),!t.success&&!s&&(0,n.jsxs)(n.Fragment,{children:[","," ",u("SIMPLE_DATETIME",{date:new Date(t.syncDate),ns:"common"})]}),m&&(0,n.jsx)(l.o,{onClickOnly:!0,title:(0,n.jsx)(c,{data:t,isCompact:!1}),children:(0,n.jsx)("a",{href:void 0,className:"text-dark-65 ml-1 cursor-pointer",children:(0,n.jsx)("u",{children:u("SEE_MORE",{ns:"common"})})})})]}),!s&&t.providerSyncDate&&(0,n.jsx)("span",{className:"d-block mt-1",children:u("IMPORT.LAST_BROKERAGE_SYNC_DATE",{date:t.providerSyncDate,ns:"import"})}),!s&&!t.success&&t.errorMessage&&(0,n.jsxs)("span",{className:"d-block mt-1",children:[(0,n.jsx)("span",{className:"label label-sm label-light-warning label-inline mr-2 font-weight-bold",children:u("LAST_SYNC.RESULT.ACTION_REQUIRED")}),t.errorMessage]})]})})}function d(e){let{data:t,isCompact:s,withIcons:d,seeMore:m}=e,{t:u}=(0,a.B)(["import","common"]);function h(){return(0,n.jsx)("div",{children:t.items.map(e=>(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsx)("div",{className:"font-weight-bold",children:e.portfolioName}),(0,n.jsx)(c,{data:e,isCompact:!1})]}))})}let p=s&&!m?l.o:i.A,x=s&&!m?{title:(0,n.jsx)(h,{})}:{component:"div"};return(0,n.jsx)(p,{...x,children:(0,n.jsxs)("div",{className:s&&!m&&"d-inline-flex align-items-center",children:[d&&(0,n.jsx)(n.Fragment,{children:t.success?(0,n.jsx)(o.A,{fontSize:"small",sx:{marginRight:"0.5rem"}}):(0,n.jsx)(r.A,{fontSize:"small",sx:{marginRight:"0.5rem"}})}),(0,n.jsxs)("span",{className:!m&&"hoverable-item",children:[u("LAST_SYNC.RESULT.TITLE"),":\xa0",u("LAST_SYNC.RESULT.COMPOSITE_COUNT",{success:t.successCount,total:t.items?.length??0}),m&&(0,n.jsx)(l.o,{onClickOnly:!0,title:(0,n.jsx)(h,{}),children:(0,n.jsx)("a",{href:void 0,className:"text-dark-65 ml-1 cursor-pointer",children:(0,n.jsx)("u",{children:u("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"}},57880:(e,t,s)=>{"use strict";
5Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},a=function(){function e(e,t){for(var s=0;s<t.length;s++){var n=t[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,s,n){return s&&e(t.prototype,s),n&&e(t,n),t}}(),i=s(75834),r=f(i),o=f(s(40410)),l=f(s(29372)),c=f(s(990)),d=f(s(47480)),m=f(s(5390)),u=f(s(81580)),h=f(s(89989)),p=f(s(99476)),x=s(12410),g=f(s(21990));function f(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=(0,p.default)(i.Component);if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);function s(e){if(!(this instanceof s))throw TypeError("Cannot call a class as a function");var t=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,e));if(t.DataContext=(0,c.default)(),e.registerExposedAPI){var n=new o.default;n.on("get.table.data",function(e){return e.result=t.table.getData()}),n.on("get.selected.rows",function(e){return e.result=t.selectionContext.getSelected()}),n.on("get.filtered.rows",function(e){t.searchContext?e.result=t.searchContext.getSearched():t.filterContext?e.result=t.filterContext.getFiltered():e.result=t.table.getData()}),e.registerExposedAPI(n)}return e.columns.filter(function(e){return e.sort}).length>0&&(t.SortContext=(0,m.default)(g.default,t.isRemoteSort,t.handleRemoteSortChange)),(e.columnToggle||e.columns.filter(function(e){return e.hidden}).length>0)&&(t.ColumnManagementContext=(0,d.default)()),e.selectRow&&(t.SelectionContext=u.default),e.expandRow&&(t.RowExpandContext=h.default),e.cellEdit&&e.cellEdit.createContext&&(t.CellEditContext=e.cellEdit.createContext(l.default,g.default,t.isRemoteCellEdit,t.handleRemoteCellChange)),e.filter&&(t.FilterContext=e.filter.createContext(l.default,t.isRemoteFiltering,t.handleRemoteFilterChange)),e.pagination&&(t.PaginationContext=e.pagination.createContext()),e.search&&e.search.searchContext&&(t.SearchContext=e.search.searchContext(l.default,t.isRemoteSearch,t.handleRemoteSearchChange)),e.setDependencyModules&&e.setDependencyModules(l.default),e.setPaginationRemoteEmitter&&e.setPaginationRemoteEmitter(t.remoteEmitter),t}return s.prototype=Object.create(t&&t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(s,t):s.__proto__=t),a(s,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.columns.filter(function(e){return e.sort}).length<=0?this.SortContext=null:this.SortContext||(this.SortContext=(0,m.default)(g.default,this.isRemoteSort,this.handleRemoteSortChange)),!e.pagination&&this.props.pagination&&(this.PaginationContext=null),e.pagination&&!this.props.pagination&&(this.PaginationContext=e.pagination.createContext(this.isRemotePagination,this.handleRemotePageChange)),!e.cellEdit&&this.props.cellEdit&&(this.CellEditContext=null),e.cellEdit&&!this.props.cellEdit&&(this.CellEditContext=e.cellEdit.createContext(l.default,g.default,this.isRemoteCellEdit,this.handleRemoteCellChange))}},{key:"renderBase",value:function(){var t=this;return function(s,a,i,o,l,c){return r.default.createElement(e,n({ref:function(e){return t.table=e}},t.props,o,a,i,l,c,{data:s.getData(a,i,o,l)}))}}},{key:"renderWithColumnManagementCtx",value:function(e,t){var s=this;return function(a,i,o,l,c){return r.default.createElement(s.ColumnManagementContext.Provider,n({},t,{toggles:s.props.columnToggle?s.props.columnToggle.toggles:null}),r.default.createElement(s.ColumnManagementContext.Consumer,null,function(t){return e(a,i,o,l,c,t)}))}}},{key:"renderWithSelectionCtx",value:function(e,t){var s=this;return function(a,i,o,l,c){return r.default.createElement(s.SelectionContext.Provider,n({},t,{ref:function(e){return s.selectionContext=e},selectRow:s.props.selectRow,data:a.getData(i,o,l,c)}),e(a,i,o,l,c))}}},{key:"renderWithRowExpandCtx",value:function(e,t){var s=this;return function(a,i,o,l,c){return r.default.createElement(s.RowExpandContext.Provider,n({},t,{ref:function(e){return s.rowExpandContext=e},expandRow:s.props.expandRow,data:a.getData(i,o,l,c)}),e(a,i,o,l,c))}}},{key:"renderWithPaginationCtx",value:function(e){var t=this;return function(s,n,a,i){return r.default.createElement(t.PaginationContext.Provider,{ref:function(e){return t.paginationContext=e},pagination:t.props.pagination,data:s.getData(n,a,i),bootstrap4:t.props.bootstrap4,isRemotePagination:t.isRemotePagination,remoteEmitter:t.remoteEmitter,onDataSizeChange:t.props.onDataSizeChange,tableId:t.props.id},r.default.createElement(t.PaginationContext.Consumer,null,function(t){return e(s,n,a,i,t)}))}}},{key:"renderWithSortCtx",value:function(e,t){var s=this;return function(a,i,o){return r.default.createElement(s.SortContext.Provider,n({},t,{ref:function(e){return s.sortContext=e},defaultSorted:s.props.defaultSorted,defaultSortDirection:s.props.defaultSortDirection,sort:s.props.sort,data:a.getData(i,o)}),r.default.createElement(s.SortContext.Consumer,null,function(t){return e(a,i,o,t)}))}}},{key:"renderWithSearchCtx",value:function(e,t){var s=this;return function(a,i){return r.default.createElement(s.SearchContext.Provider,n({},t,{ref:function(e){return s.searchContext=e},data:a.getData(i),searchText:s.props.search.searchText,dataChangeListener:s.props.dataChangeListener}),r.default.createElement(s.SearchContext.Consumer,null,function(t){return e(a,i,t)}))}}},{key:"renderWithFilterCtx",value:function(e,t){var s=this;return function(a){return r.default.createElement(s.FilterContext.Provider,n({},t,{ref:function(e){return s.filterContext=e},data:a.getData(),filter:s.props.filter.options||{},dataChangeListener:s.props.dataChangeListener}),r.default.createElement(s.FilterContext.Consumer,null,function(t){return e(a,t)}
5))}}},{key:"renderWithCellEditCtx",value:function(e,t){var s=this;return function(a){return r.default.createElement(s.CellEditContext.Provider,n({},t,{ref:function(e){return s.cellEditContext=e},selectRow:s.props.selectRow,cellEdit:s.props.cellEdit,data:a.getData()}),e(a))}}},{key:"render",value:function(){var e=this.props,t=e.keyField,s=e.columns,a=e.bootstrap4,i={keyField:t,columns:s},o=this.renderBase();return this.ColumnManagementContext&&(o=this.renderWithColumnManagementCtx(o,i)),this.SelectionContext&&(o=this.renderWithSelectionCtx(o,i)),this.RowExpandContext&&(o=this.renderWithRowExpandCtx(o,i)),this.PaginationContext&&(o=this.renderWithPaginationCtx(o,i)),this.SortContext&&(o=this.renderWithSortCtx(o,i)),this.SearchContext&&(o=this.renderWithSearchCtx(o,i)),this.FilterContext&&(o=this.renderWithFilterCtx(o,i)),this.CellEditContext&&(o=this.renderWithCellEditCtx(o,i)),r.default.createElement(x.BootstrapContext.Provider,{value:{bootstrap4:a}},r.default.createElement(this.DataContext.Provider,n({},i,{data:this.props.data}),r.default.createElement(this.DataContext.Consumer,null,o)))}}]),s}},58485:(e,t,s)=>{"use strict";s.d(t,{$:()=>I});var n=s(26514),a=s(58245),i=s.n(a),r=s(32673),o=s(59757),l=s(75834),c=s(46225),d=s(93760),m=s(23141),u=s(75035),h=s(92978),p=s(50514),x=s(80315),g=s(16926),f=s(23667),b=s(5771),N=s(15269),j=s(61139),v=s(48208),A=s(86939),_=s.n(A);function C(e){let{icon:t,title:s,text:a}=e;return(0,n.jsxs)("div",{className:`d-flex ${_().root}`,children:[(0,n.jsx)("div",{className:"mr-3",children:t}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"flex-root font-weight-bold font-size-lg mb-1",children:s}),(0,n.jsx)("div",{className:"font-size-sm",children:a})]})]})}var E=s(57326),T=s.n(E);function I(e){let{t}=(0,d.B)("promos"),s=(0,c.useRouter)(),{showPublicModal:a}=(0,o.d4)(e=>{let{ui:t}=e;return t}),A=(0,o.wA)(),[_,E]=(0,l.useState)(!1),[I,S]=(0,l.useState)(!1),[y,O]=(0,l.useState)(!1),[R,w]=(0,l.useState)(!1),[k,D]=(0,l.useState)(null),[L,P]=(0,l.useState)(!1),[M,B]=(0,l.useState)(!1),[U,F]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{s.query?.showPubliccomDialog&&A((0,g.C6)(!0))},[s.query]),(0,n.jsx)(x.a,{...e,show:a||e.alwaysVisible,onHide:()=>{A((0,g.C6)(!1))},onShow:()=>{(0,f.XB)(),E(!0),(0,f.td)().then(e=>{let{publiccomSignupUrl:t,signupLinkClicked:s,bonusConditionsMet:n,bonusReceived:a}=e;O(s),w(n&&!a),P(s),B(s&&n),F(a),D(t),E(!1)})},dialogClassName:`${T().modalDialog} ${e.fullScreen?T().fullScreen:""}`,bodyClassName:T().modalBody,title:(0,n.jsx)("div",{className:`pl-4 pl-sm-0 ${T().title}`,children:t("PUBLIC.MODAL.TITLE")}),children:(0,n.jsxs)(r.A,{gap:{xs:3,sm:4},children:[(0,n.jsx)("div",{className:"d-flex d-sm-block justify-content-center",children:(0,n.jsxs)("div",{className:`font-size-lg ${T().badge}`,children:[t("PUBLIC.COLLABORATION_LABEL")," ",(0,n.jsx)(i(),{src:"/media/public-logo.png",alt:"public.com",width:103,height:26})]})}),(0,n.jsxs)(r.A,{gap:1.5,children:[(0,n.jsx)(C,{icon:(0,n.jsx)(p.rW,{}),title:t("PUBLIC.MODAL.FEATURE_1.TITLE"),text:t("PUBLIC.MODAL.FEATURE_1.TEXT")}),(0,n.jsx)(C,{icon:(0,n.jsx)(p.RO,{}),title:t("PUBLIC.MODAL.FEATURE_2.TITLE"),text:t("PUBLIC.MODAL.FEATURE_2.TEXT")}),(0,n.jsx)(C,{icon:(0,n.jsx)(p.yE,{}),title:t("PUBLIC.MODAL.FEATURE_3.TITLE"),text:t("PUBLIC.MODAL.FEATURE_3.TEXT")})]}),(0,n.jsx)("div",{className:T().divider}),(0,n.jsxs)("div",{className:T().content,children:[(0,n.jsx)("div",{className:"font-size-h3 mb-5",style:{fontWeight:"500"},children:t("PUBLIC.MODAL.STEPS.TITLE")}),_&&(0,n.jsx)(b.J,{count:2}),!_&&(0,n.jsxs)("div",{className:T().steps,children:[(0,n.jsxs)("div",{className:`${T().step} ${T().active} ${L?T().completed:""}`,onClick:()=>{(0,f.Rq)(),k&&window.open(k),O(!0)},children:[(0,n.jsxs)("div",{className:T().stepHeader,children:[(0,n.jsx)("div",{className:T().stepNumber,children:L?(0,n.jsx)(h.A,{}):"1"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:`${T().stepText} font-size-lg`,children:t("PUBLIC.MODAL.STEPS_1.TEXT")}),(0,n.jsxs)("div",{className:`${T().stepDescription} font-size-sm`,children:[t("PUBLIC.MODAL.STEPS_1.DESCRIPTION")," ",(0,n.jsx)("br",{})," \uD83D\uDC49"," ",t("PUBLIC.MODAL.STEPS_1_2.TEXT")," ",(0,n.jsx)("br",{}),(0,n.jsx)("br",{}),t("PUBLIC.MODAL.STEPS_1_3.TEXT")]})]})]}),(0,n.jsxs)("button",{type:"button",className:`btn btn-link-primary btn-lg ${T().stepButton}`,children:[t("PUBLIC.MODAL.STEPS_1.BUTTON")," ",(0,n.jsx)(u.A,{})]})]}),(0,n.jsxs)("div",{className:`${T().step} ${y?T().active:""} ${M?T().completed:""}`,onClick:()=>{y&&(0,f.L2)().then(e=>{e&&setTimeout(()=>{window.open(e,"_blank")})})},children:[(0,n.jsxs)("div",{className:T().stepHeader,children:[(0,n.jsx)("div",{className:T().stepNumber,children:M?(0,n.jsx)(h.A,{}):"2"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:`${T().stepText} font-size-lg`,children:t("PUBLIC.MODAL.STEPS_2.TEXT")}),(0,n.jsx)("div",{className:`${T().stepDescription} font-size-sm`,children:t("PUBLIC.MODAL.STEPS_2.DESCRIPTION")})]})]}),(0,n.jsxs)("button",{type:"button",className:`btn btn-link-primary btn-lg ${T().stepButton}`,disabled:!y,children:[t("PUBLIC.MODAL.STEPS_2.BUTTON")," ",(0,n.jsx)(u.A,{})]})]}),(0,n.jsxs)("div",{className:`${T().step} ${R?T().active:""} ${U?T().completed:""}`,onClick:()=>{R&&!I&&(S(!0),(0,f.Dl)().then(()=>{S(!1),N.uT(t("PUBLIC.MODAL.STEPS_3.SUCCESS_MESSAGE")),F(!0),w(!1),A({type:j.QN.StartRefreshAccessToken})}).catch(e=>
5{S(!1),console.error(e),N.f1(t("PUBLIC.MODAL.STEPS_3.ERROR_MESSAGE"))}))},children:[(0,n.jsxs)("div",{className:T().stepHeader,children:[(0,n.jsx)("div",{className:T().stepNumber,children:U?(0,n.jsx)(h.A,{}):"3"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:`${T().stepText} font-size-lg`,children:U?t("PUBLIC.MODAL.STEPS_3.TEXT_COMPLETED"):t("PUBLIC.MODAL.STEPS_3.TEXT")}),(0,n.jsx)("div",{className:`${T().stepDescription} font-size-sm`,children:U?t("PUBLIC.MODAL.STEPS_3.DESCRIPTION_COMPLETED"):t("PUBLIC.MODAL.STEPS_3.DESCRIPTION")})]})]}),!U&&(0,n.jsxs)("button",{type:"button",className:`btn btn-dark btn-lg ${T().stepButton}`,disabled:!R||I,children:["\uD83D\uDD25"," ",I?t("PUBLIC.MODAL.STEPS_3.BUTTON_LOADING"):t("PUBLIC.MODAL.STEPS_3.BUTTON")," ","\uD83D\uDD25"]})]})]})]}),(0,n.jsx)("div",{className:"font-size-xs text-dark-50",children:(0,n.jsx)(m.x,{i18nKey:"promos:PUBLIC.MODAL.NOTE",components:[(0,n.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,t,s)=>{"use strict";s.d(t,{Y3:()=>v,zN:()=>N});var n=s(26514),a=s(75834),i=s(93760),r=s(89754),o=s(91394),l=s(24665),c=s(97653),d=s(84075),m=s(7086),u=s(14163),h=s(63390),p=s(15269),x=s(39608),g=s(76510),f=s(36241);let b="internal",N="public",j=e=>({message:"",email:e??""});function v(e){let{email:t,onSaved:s,onDiscard:v,type:A=b}=e,{t:_}=(0,i.B)(["layout","common"]),[C,E]=(0,a.useState)(()=>j(t)),[T,I]=(0,a.useState)([]),[S,y]=(0,a.useState)(!1),O=(0,a.createRef)(null);async function R(e,t){let s=await t.handleVerify();e.setFieldValue("verifyToken",s,!0),e.values.verifyToken=s,e.handleSubmit()}async function w(e,t){y(!0);try{let t=A==b?h.T7U:h.L99,n=new FormData;T.forEach(e=>{n.append("Files",e)}),n.append("message",e.message),n.append("email",e.email),e.verifyToken&&n.append("verifyToken",e.verifyToken),await m.A.post(t,n),s&&s(),p.uT(_("FEEDBACK.SUCCESS"))}catch(e){(0,f.ZC)(e,t)}y(!1)}(0,a.useEffect)(()=>{E(j(t)),I([]),A==b&&O&&O.current&&O.current.focus()},[t]);let k=r.Ik().shape({email:r.Yj().email(_("FEEDBACK.VALIDATION.EMAIL")).min(1,_("FEEDBACK.VALIDATION.EMAIL_MIN")).max(128,_("FEEDBACK.VALIDATION.EMAIL_MAX")).required(_("FEEDBACK.VALIDATION.EMAIL_REQUIRED")),message:r.Yj().min(1,_("FEEDBACK.VALIDATION.MESSAGE_MIN")).max(4096,_("FEEDBACK.VALIDATION.MESSAGE_MAX")).required(_("FEEDBACK.VALIDATION.MESSAGE_REQUIRED"))});return(0,n.jsx)(o.l1,{initialValues:C,validationSchema:k,enableReinitialize:!0,onSubmit:(e,t)=>{w(e,t)},children:e=>(0,n.jsxs)(g.A,{tag:"div",blocking:S,keepInView:!0,children:[(0,n.jsxs)("div",{className:"overlay overlay-block cursor-default",children:[S&&(0,n.jsx)("div",{className:"overlay-layer bg-transparent",children:(0,n.jsx)("div",{className:"spinner spinner-lg spinner-success"})}),(0,n.jsxs)(l.A,{onSubmit:e.handleSubmit,children:[e.errors.general&&(0,n.jsx)(c.A,{variant:"danger",children:e.errors.general}),(0,n.jsxs)(l.A.Group,{children:[(0,n.jsx)(l.A.Label,{children:_("FEEDBACK.EMAIL")}),(0,n.jsx)(l.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,n.jsx)("div",{className:"fv-plugins-message-container",children:(0,n.jsx)("div",{className:"fv-help-block",children:e.errors.email})})]}),(0,n.jsxs)(l.A.Group,{children:[(0,n.jsxs)(l.A.Label,{children:[_("FEEDBACK.MESSAGE")," ",(0,n.jsx)("span",{className:"text-danger",children:"*"})]}),(0,n.jsx)(l.A.Control,{as:"textarea",type:"text",rows:3,name:"message",className:"form-control-solid",placeholder:_("FEEDBACK.MESSAGE.PLACEHOLDER"),ref:O,onBlur:e.handleBlur,value:e.values.message,onChange:t=>{e.setFieldValue("message",t.target.value,!0),e.values.message=t.target.value}}),e.touched.message&&e.errors.message&&(0,n.jsx)("div",{className:"fv-plugins-message-container",children:(0,n.jsx)("div",{className:"fv-help-block",children:e.errors.message})})]}),A==b&&(0,n.jsxs)(l.A.Group,{children:[(0,n.jsx)(d.Ay,{maxFiles:5,maxSize:0x3200000,onDrop:e=>(function(e){if(T.length+T.length>5)return void p.f1(_("FEEDBACK.VALIDATION.FILES_MAX"));I(T.concat(e))})(e),children:e=>
5{let{getRootProps:t,getInputProps:s}=e;return(0,n.jsx)("section",{className:"dropzpone",children:(0,n.jsxs)("div",{...t(),className:"text-center text-muted sm",children:[(0,n.jsx)("input",{...s()}),(0,n.jsx)("span",{children:_("FEEDBACK.FILES")}),(0,n.jsxs)("em",{children:["(",_("FEEDBACK.FILES_DESCRIPTION"),")"]})]})})}}),T.length>0&&(0,n.jsx)("div",{className:"mt-2",children:T.map((e,t)=>(0,n.jsxs)("div",{className:"text-dark-65 font-size-sm d-flex align-items-center",children:[(0,n.jsx)("i",{className:"flaticon-attachment icon-nm mr-2"})," ",(0,n.jsx)("span",{className:"file-name-path d-block",children:e.path}),(0,n.jsx)("button",{type:"button",title:_("FEEDBACK.REMOVE_FILE"),className:"btn btn-sm ml-2 mt-n1 btn-link-secondary",onClick:()=>{T.length>=t&&I(T.filter((e,s)=>s!==t))},children:(0,n.jsx)("i",{className:"icon-nm fas fa-times text-dark-50"})})]},e.path))})]}),A==N&&(0,n.jsx)("input",{type:"hidden",name:"verifyToken"})]})]}),(0,n.jsxs)("div",{className:`d-flex align-items-center ${A==b?"justify-content-between":"justify-content-end"}`,children:[A==b&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",onClick:v,className:"btn btn-light btn-elevate font-weight-bold",children:_("FEEDBACK.DISCARD")}),(0,n.jsx)("button",{type:"submit",onClick:()=>{e.handleSubmit()},disabled:!e.isValid,className:"btn btn-primary font-weight-bold",children:_("FEEDBACK.SEND")})]}),A==N&&(0,n.jsx)(u.G3,{reCaptchaKey:"6Ld87woqAAAAAMifeeg0w2TkhHqkNbOjHDuZiJ5A",children:(0,n.jsx)(x.s,{children:t=>(0,n.jsx)("button",{type:"submit",onClick:()=>{R(e,t)},disabled:!e.isValid,className:"btn btn-primary font-weight-bold",children:_("FEEDBACK.SEND")})})})]})]})})}},60881:e=>{e.exports={tourBtn:"FeedbackDropdown_tourBtn__O_kTa",tourDropdownItem:"FeedbackDropdown_tourDropdownItem__esbQY"}},62400:(e,t,s)=>{"use strict";s.d(t,{l:()=>w});var n=s(26514),a=s(75834),i=s(46225),r=s(21069),o=s(30985),l=s(91114),c=s.n(l),d=s(7086),m=s(55971),u=s.n(m),h=s(75119),p=s.n(h),x=s(84580),g=s(71359),f=s(93760),b=s(36241),N=s(15269),j=s(60547),v=s(24163),A=s(47115),_=s(63390),C=s(27188),E=s(77232),T=s(43765),I=s(54253),S=s(90952);let y=[A.PW.STOCK,A.PW.BOND,A.PW.ETF,A.PW.REIT,A.PW.COMMODITY,A.PW.CRYPTO_CURRENCY];function O(e){let{t}=(0,f.B)("layout"),[s,i]=(0,a.useState)(()=>(0,C.eM)()),[r,l]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),[O,R]=(0,a.useState)(null),[w,k]=(0,a.useState)(""),[D,L]=(0,a.useState)(!1),[P,M]=(0,a.useState)(!1),[B,U]=(0,a.useState)(!1),F=(0,a.useRef)(null),H=()=>{R(null),k(""),l(!1)},G=()=>{if(!O?.length)return;let t=O.filter(e=>{let{type:t}=e;return t!==A.PW.QUOTE});if(t?.length){let[s]=t;e.onSubmitAsset?.(s)}},$=(0,a.useCallback)(u()(e=>(e=>{let s=(0,v.F)();if(!e){R([]),l(!1);return}l(!0),d.A.get(_.NwO,{params:{search:e,assetTypes:y,isSignedIn:s}}).then(e=>{let{data:t=[]}=e;t.length||L(!1),R(p()(t,15))}).catch(e=>{let s=(0,b.g6)(`${t("SEARCH_ASSET.ERROR")}: 6`,e);N.f1(s),R([]),L(!1)}).finally(()=>{l(!1),h(!0)})})(e),350),[]);(0,a.useEffect)(()=>{"form"==e.type&&F&&F.current&&(F.current.addEventListener("focus",()=>{U(!0)}),F.current.addEventListener("blur",()=>{setTimeout(()=>{U(!1)},120)}))},[]),(0,a.useEffect)(()=>{let t=O&&O.length>0||!w&&s.length>0;t&&"form"==e.type&&!B&&(t=!1),M(t)},[O,s,w,B]),(0,a.useEffect)(()=>{D&&G()},[G,D]),(0,a.useEffect)(()=>{h(!1),$(w)},[w]);let K=(0,n.jsx)(S.q,{isRecent:!w,openInNewTab:e.openBlanc,data:w?O:s,onItemClicked:e=>{H(),e&&(0,C.GK)(e),document.dispatchEvent(new MouseEvent("click"))}});return(0,n.jsxs)(n.Fragment,{children:["form"==e.type&&(0,n.jsx)(g.x,{onClickAway:H,children:(0,n.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,n.jsx)("form",{className:"quick-search-form quick-search-form-inline",children:(0,n.jsxs)("div",{className:"input-group",children:[(0,n.jsx)("div",{className:"input-group-prepend",children:(0,n.jsx)("span",{className:"input-group-text",children:(0,n.jsx)("span",{className:"svg-icon svg-icon-lg mt-n1",children:(0,n.jsx)(c(),{preProcessor:j.xY,src:(0,I.oK)("/media/svg/icons/General/Search.svg?v=1")})})})}),(0,n.jsx)("input",{id:"search_assets_form_input",type:"text",placeholder:t("SEARCH_ASSET.PLACEHOLDER"),value:w,onChange:e=>{k(e.target.value)},ref:F,className:"form-control form-control-solid"}),(0,n.jsx)("div",{className:`input-group-append ${r?"spinner spinner-sm spinner-primary":""}")}`,children:(0,n.jsx)("span",{className:"input-group-text",children:(0,n.jsx)("i",{style:{display:w&&w.length>0&&!r?"flex":"none"},onClick:H,className:"quick-search-close ki ki-close icon-sm text-muted"})})})]})}),P&&(0,n.jsx)("div",{className:"setting-dropdown py-2 px-3 rounded-sm",children:K})]})}),"form"!=e.type&&(0,n.jsxs)(o.A,{alignRight:!0,drop:"down",onToggle:()=>{H(),setTimeout(()=>{F.current&&"form"!=e.type&&F.current.focus()},100),i((0,C.eM)())},id:"kt_quick_search_toggle",children:[(0,n.jsx)(o.A.Toggle,{as:T.rI,children:(0,n.jsx)(E.qS,{icon:(0,n.jsx)(x.A,{style:{marginTop:2}})})}),(0,n.jsx)(o.A.Menu,{className:"dropdown-menu p-0 m-0 dropdown-menu-right dropdown-menu-anim-up dropdown-menu-lg",children:(0,n.jsxs)("div",{id:"kt_quick_search_dropdown",className:`quick-search quick-search-dropdown dropdown-menu-wrapper ${!r&&P?"pb-0":""} ${P?"quick-search-has-result":""}`,children:[(0,n.jsx)("form",{className:"quick-search-form",onSubmit:e=>{e.preventDefault(),(()=>{if(!O?.length&&w&&!m)return L(!0);G()})()},children:(0,n.jsxs)("div",{className:"input-group",children:[(0,n.jsx)("div",{className:"input-group-prepend",children:(0,n.jsx)("span",{className:"input-group-text",children:(0,n.jsx)("span",{className:"svg-icon svg-icon-lg",children:(0,n.jsx)(c(),{preProcessor:j.xY,src:(0,I.oK)("/media/svg/icons/General/Search.svg?v=1")})})})}),(0,n.jsx)("input",{name:"search",type:"text",autoFocus:!0,placeholder:t("SEARCH_ASSET.PLACEHOLDER"),value:w,ref:F,onChange:e=>{k(e.target.value)},className:"form-control"}),(0,n.jsx)("div",{className:`input-group-append ${r?"spinner spinner-sm spinner-primary":""}")}`,children:(0,n.jsx)("span",{className:"input-group-text",children:(0,n.jsx)("i",{style:{display:r&&w&&w.length>0?"none":"flex"},onClick:H,className:"quick-search-close ki ki-close icon-sm text-muted"})})})]})}),!D&&(0,n.jsx)(n.Fragment,{children:K}),!O?.length&&w&&m&&(0,n.jsx)("div",{className:"pt-5 pb-3 px-10 text-dark-50",children:t("SEARCH_ASSET.NOT_FOUND")})]})})]})]})}var R=s(19717);function w(e){let{isNewPage:t=!1}=e,s=(0,i.useRouter)(),[o,l]=(0,a.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(O,{type:"dropdown",openBlanc:t,onSubmitAsset:e=>{if(!e)return;let n=(0,r.A)(e.assetType,e.id,e.ticker,e.exchange,e.currency);if(n){if(t)return void window.open(n,"_blank");l(!0),s.push(n).catch(()=>{l(!1)})}}}),o&&(0,n.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,t,s)=>{"use strict";s.d(t,{D:()=>x});var n=s(26514),a=s(75834),i=s(46225),r=s(93760),o=s(60890),l=s.n(o),c=s(80966),d=s(7086),m=s(98337),u=s(63390),h=s(73419),p=s(49942);function x(e){let{data:t=[],portfolioId:s,refreshTriggered:o,onNotificationRead:x}=e,g=(0,i.useRouter)(),[f,b]=(0,a.useState)(!1),{t:N}=(0,r.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,t)=>{b(!0);try{let s=u.mAR;await d.A.post(`${s}/${e}`,{}),t||(x?.(e),b(!1))}catch{b(!1)}},_=async(e,t)=>{t&&await A(e.id,!0),e.actionLink&&g.push(e.actionLink)},C=async(e,t)=>{e.preventDefault(),e.stopPropagation(),await A(t.id,!1)};return(0,n.jsx)(n.Fragment,{children:t.map((e,t)=>((e,t)=>{let a=`notification-${e.id}-${t}`;switch(e.type){case h.Ep:return(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"card card-custom card-stretch gutter-b",children:(0,n.jsxs)("div",{className:"card-body row d-flex align-items-center justify-content-between",children:[(0,n.jsxs)("div",{className:"mr-2 mb-2 col",children:[(0,n.jsx)("div",{className:"h4",children:e.messageTitle}),(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(l(),{children:e.messageDescription})})]}),(0,n.jsx)("div",{className:"col-lg-auto col-sm-12",children:(0,n.jsx)("button",{type:"button",onClick:()=>_(e,!1),className:"btn btn-primary font-weight-bold",children:e.actionText||N("BUTTON.SEE_MORE")})})]})})},a);case h.m5:return(0,n.jsx)("div",{children:(0,n.jsx)(m.a,{actions:e.payload,portfolioId:s,onUpdated:o,type:"card"})},a);case h.Pw:case h.Wj:return(0,n.jsx)("div",{children:(e=>{let t=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"}:{},s=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%"}:{},a=j(e)?"text-white":"text-dark-color",i=e.actionLink?a:"",r=e.actionLink?{onClick:()=>_(e,!0),text:N("BUTTON.SEE_MORE"),className:"btn btn-white btn-white-bg font-weight-bold"}:{onClick:()=>A(e.id,!1),text:N("BUTTON.CLOSE"),className:"btn btn-light text-dark font-weight-bold mr-2 mb-2 mb-md-0"};return(0,n.jsx)(p.c,{title:e.messageTitle,content:e.messageDescription,onClose:!!e.actionLink&&(t=>C(t,e)),cardProps:{style:t,onClick:()=>!!e.actionLink&&_(e,!0)},bodyProps:{style:s},titleProps:{className:i},contentProps:{className:i},buttonProps:r})})(e)},a);default:return(0,n.jsx)("div",{children:(0,n.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,n.jsxs)("div",{className:"card-body d-flex align-items-center justify-content-between",children:[(0,n.jsxs)("div",{className:"mr-2",children:[(0,n.jsx)("div",{className:"text-white h4",children:e.messageTitle}),(0,n.jsx)("div",{className:"text-white mt-2",children:e.messageDescription})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("button",{type:"button",onClick:()=>
6A(e.id,!1),className:"btn btn-transparent-white font-weight-bold mr-2 mb-2 mb-md-0",disabled:f,children:N("BUTTON.CLOSE")}),e.actionLink&&(0,n.jsx)("button",{type:"button",onClick:()=>_(e,!0),className:"btn btn-white font-weight-bold",disabled:f,children:N("BUTTON.SEE_MORE")})]})]})})},a)}})(e,t))})}},63595:(e,t,s)=>{"use strict";s.d(t,{$:()=>g});var n=s(26514),a=s(93760),i=s(23141),r=s(75834),o=s(13850),l=s(58245),c=s.n(l),d=s(49522),m=s(48208),u=s(10367),h=s(50996),p=s(42667),x=s.n(p);function g(e){let{promocode:t,onPromocodeClaimed:s}=e,{t:l}=(0,a.B)(["promos","common"]),{claimPromo:p,isPending:g}=(0,h.o)(),[f,b]=(0,r.useState)(t);(0,r.useEffect)(()=>{b(t)},[t]);let N=async()=>{s(await p(u.l.TBANK))};return(0,n.jsxs)("div",{className:"mb-5 bg-light rounded-lg py-4 px-6",children:[(0,n.jsx)(c(),{src:"/media/logos/tbank.svg",width:40,height:40,alt:"tbank.ru",className:"d-block mb-4"}),(0,n.jsx)("div",{className:"font-weight-bold mb-1",children:l(f?.value?"TBANK.YOUR_PROMOCODE":"TBANK.PROMOCODE_NOT_ASSIGNED")}),f?.value?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-1",children:[(0,n.jsx)("code",{className:`${x().promocode} font-size-h4 font-weight-bolder text-uppercase`,children:f.value}),(0,n.jsx)(d.$,{preventEvents:!0,hideDefaults:!0,textSuccess:l("TBANK.PROMOCODE_COPIED"),textToCopy:f.value,children:(0,n.jsx)("button",{type:"button",className:"ml-2 btn btn-sm btn-link-primary font-weight-bold",children:l("common:BUTTON.COPY")})})]}),(0,n.jsx)("hr",{}),(0,n.jsx)("div",{className:"mb-2",children:(0,n.jsx)(i.x,{i18nKey:"promos:TBANK.PROMOCODE_USAGE_DESCRIPTION"})}),(0,n.jsx)("div",{className:"mt-4 mb-2",children:(0,n.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,n.jsx)(o.A,{className:"mr-1",fontSize:"small"}),l("TBANK.DOCUMENTS_LINK")]})})]}):(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)("button",{type:"button",className:"btn btn-dark font-weight-bold",onClick:N,disabled:g,children:l(g?"TBANK.PROMOCODE_LOADING":"TBANK.PROMOCODE_CLAIM_BUTTON")})})]})}},63885:(e,t,s)=>{"use strict";s.d(t,{lo:()=>d.l,mE:()=>d.m,Um:()=>c,td:()=>l,LO:()=>r,XB:()=>o});var n=s(7086);let a="/api/external-promocodes";var i=function(e){return e[e.ON_CLOSE_DASHBOARD_NOTIFICATION=`${a}/on-close-dashboard-notification`]="ON_CLOSE_DASHBOARD_NOTIFICATION",e[e.ON_DIALOG_OPENED=`${a}/on-dialog-opened`]="ON_DIALOG_OPENED",e[e.GET_DIALOG_INFO=`${a}/get-dialog-info`]="GET_DIALOG_INFO",e[e.CLAIM_BONUS=`${a}/claim-bonus`]="CLAIM_BONUS",e}({});async function r(){return n.A.post(i.ON_CLOSE_DASHBOARD_NOTIFICATION)}async function o(){return n.A.post(i.ON_DIALOG_OPENED)}async function l(){return n.A.get(i.GET_DIALOG_INFO).then(e=>{let{data:t}=e;return t})}async function c(e){return n.A.post(i.CLAIM_BONUS,{},{params:{type:e}}).then(e=>{let{data:t}=e;return t})}var d=s(10367)},64674:(e,t,s)=>{"use strict";s.d(t,{N:()=>h});var n=s(26514),a=s(93760),i=s(75834),r=s(13850),o=s(58245),l=s.n(o),c=s(6367),d=s(10367),m=s(50996),u=s(48208);function h(e){let{promocode:t,onPromocodeClaimed:s}=e,{t:o}=(0,a.B)(["promos","common"]),{claimPromo:h,isPending:p}=(0,m.o)(),[x,g]=(0,i.useState)(t);(0,i.useEffect)(()=>{g(t)},[t]);let f=async()=>{s(await h(d.l.BCS))};return(0,n.jsxs)("div",{className:"mb-5 bg-light rounded-lg py-4 px-6",children:[(0,n.jsx)(l(),{src:"/media/brokers/bks.svg",width:40,height:40,alt:"bcs.ru",className:"d-block mb-4"}),(0,n.jsx)("div",{className:"font-weight-bold mb-1",children:o(x?.value?"BCS.YOUR_LINK":"BCS.PROMOCODE_NOT_ASSIGNED")}),x?.value?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mb-1",children:(0,n.jsxs)(u.o,{href:x?.value,className:"btn btn-link-primary font-weight-bold btn-lg",children:[(0,n.jsx)(c.A,{className:"mr-1"})," ",o("BCS.GO_TO")]})}),(0,n.jsx)("hr",{}),(0,n.jsx)("div",{className:"mt-4 mb-2",children:(0,n.jsxs)(u.o,{href:"/docs/bcs-snow-cashback-rules.pdf",target:"_blank",className:"btn btn-link-primary font-weight-bold mr-4",children:[(0,n.jsx)(r.A,{className:"mr-1",fontSize:"small"}),o("BCS.DOCUMENTS_LINK")]})})]}):(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)("button",{type:"button",className:"btn btn-dark font-weight-bold",onClick:f,disabled:p,children:o(p?"BCS.PROMOCODE_LOADING":"BCS.PROMOCODE_CLAIM_BUTTON")})})]})}},65119:(e,t,s)=>{"use strict";s.d(t,{J:()=>v,S:()=>j});var n=s(26514),a=s(30985),i=s(51065),r=s.n(i),o=s(9610),l=s.n(o),c=s(93760),d=s(75834),m=s(33989),u=s(59757),h=s(80966),p=s(47115),x=s(4469),g=s(72732),f=s(56103),b=s(3163);let N="RecentCurrenciesSelected";var j=function(e){return e.Compact="compact",e.Mobile="mobile",e}({});function v(e){let{view:t="compact"}=e,{t:s}=(0,c.B)("common"),{currency:i,localCurrency:o,recentCurrencies:j,currentPortfolio:v}=(0,u.d4)(e=>{let{app:t}=e;return{...t,currency:t.localCurrency??t.currency}}),A=(0,u.wA)(),{data:_=[]}=(0,m.I)({queryKey:["currencyList"],queryFn:g.kJ}),[C,E]=(0,d.useState)("");(0,d.useEffect)(()=>{let e=(0,x.Gu)(N,{list:[]});e?.list?.length&&(A((0,b.LQ)(e?.list)),(0,x.aF)(N))},[]);let T=(0,d.useMemo)(()=>l()(_,e=>{let{ticker:t,description:s}=e;return t.toLowerCase().indexOf(C.toLowerCase())>=0||s.toLowerCase().indexOf(C.toLowerCase())>=0}),[C,_]),I=p.b5.find(e=>{let{code:t}=e;return t===i})?.symbol??"",{finalCurrencyList:S,finalRecentCurrencyList:y}=(0,d.useMemo)(()=>{let e=[],t=[];return T.forEach(s=>
6{j.includes(s.code)?t.push(s):e.push(s)}),t.sort((e,t)=>j.indexOf(e.code)-j.indexOf(t.code)),{finalCurrencyList:e,finalRecentCurrencyList:t}},[T,j]);return i?(0,n.jsx)(a.A,{className:"topbar-dropdown",drop:"down",alignRight:!0,children:(0,n.jsxs)("div",{className:"topbar-item",children:[(0,n.jsx)(a.A.Toggle,{id:"dropdown-toggle-top2",variant:"transparent",className:`btn w-auto btn-dark-50 btn-sm font-weight-bold p-2 ${"mobile"===t?"exclude-dropdown-toggle":""}`,children:"mobile"===t?(0,n.jsx)("span",{className:"symbol symbol-25 symbol-light",children:(0,n.jsx)("span",{className:"symbol-label font-weight-bold font-size-xs",children:I})}):(0,n.jsx)(n.Fragment,{children:i})}),(0,n.jsxs)(a.A.Menu,{className:"dropdown-menu dropdown-menu-md dropdown-menu-right",children:[(0,n.jsx)("input",{value:C,onChange:e=>E(e.target.value),type:"text",placeholder:s("SEARCH_PLACEHOLDER"),className:"form-control form-control-sm search-input",name:"search-currency"}),(0,n.jsx)("hr",{className:"py-1 my-0"}),(0,n.jsx)("ul",{className:"navi navi-hover",children:(0,n.jsxs)(r(),{options:{wheelPropagation:!1},className:"scroll",style:{maxHeight:h.Fr?"250px":"400px",position:"relative"},children:[!!y?.length&&(0,n.jsx)("div",{className:"px-6 mb-1 mt-1",children:(0,n.jsx)("strong",{children:s("RECENT")})}),[...y,...S].map((e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("li",{className:"navi-item",style:{cursor:"pointer"},children:(0,n.jsx)("div",{className:"navi-link",onClick:()=>(e=>{let{code:t}=e;!o&&v&&(0,x.LZ)(`portfolio-currency-${v.id}`,{code:t}),A((0,b.MN)({currency:t,isLocal:!!o})),document.dispatchEvent(new MouseEvent("click"))})(e),children:(0,n.jsx)(f.O,{hideIcon:!1,item:e})})},e.code),t===y.length-1&&(0,n.jsx)("hr",{})]}))]})})]})]})}):null}},66073:(e,t,s)=>{"use strict";s.d(t,{b:()=>d});var n=s(26514),a=s(87245),i=s(75834),r=s(60851);function o(e){let{children:t,provided:s,snapshot:a,portalClassName:o}=e,l=(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),l.el=e,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[l]);let c=(0,n.jsx)("div",{ref:s.innerRef,...s.draggableProps,children:t});return a.isDragging?(0,r.createPortal)(c,l.el):c}var l=s(57108),c=s.n(l);function d(e){let{droppableId:t,items:s,draggableId:r,renderItem:l,portalClassName:d,onDragEnd:m,rootComponent:u="div",usePortal:h=!1,rootRef:p,calculateRootHeight:x=!0,disableDragging:g=!1}=e,f=(0,i.useRef)();return g?(0,n.jsx)(u,{children:s.map((e,t)=>l(e,{dragHandleProps:{},draggableProps:{},innerRef:null},{isDragging:!1},t))}):(0,n.jsx)(a.JY,{onDragEnd:e=>{let t=p?.current||f?.current;if(t&&x&&setTimeout(()=>{t.style.height="inherit"},0),!e.destination)return;let n=[...s];n.splice(e.destination.index,0,n.splice(e.source.index,1)[0]),m(n)},onBeforeDragStart:()=>{if(!x)return;let e=p?.current||f.current;e&&(e.style.height=`${e.clientHeight}px`)},children:(0,n.jsx)(a.gL,{droppableId:t,children:(e,t)=>{let{isDraggingOver:i}=t;return(0,n.jsx)(u,{ref:t=>{e.innerRef(t),f.current=t},...e.droppableProps,className:i&&c().isDraggingOver,children:s.map((e,t)=>(0,n.jsx)(a.sx,{draggableId:r(e),index:t,children:(s,a)=>(0,n.jsx)(n.Fragment,{children:h?(0,n.jsx)(o,{provided:s,snapshot:a,portalClassName:d,children:l(e,s,a,t)}):l(e,s,a,t)})},r(e)))})}})})}},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"}},71497:(e,t,s)=>{"use strict";s.d(t,{M:()=>g});var n=s(26514),a=s(75834),i=s(62936),r=s.n(i),o=s(59757),l=s(16926),c=s(45251),d=s(47894),m=s(54253),u=s(18150),h=s(23426),p=s(40945),x=s(65119);function g(e){let t=(0,u.SL)(),s=(0,d.sc)(),i=(0,o.wA)(),g=(0,a.useMemo)(()=>({headerLogo:t.getStickyLogo(),asideDisplay:r().get(t.config,"aside.self.display"),headerMenuSelfDisplay:("public"!=e.type||!!s)&&!0===r().get(t.config,"header.menu.self.dis
6play"),headerMobileCssClasses:t.getClasses("header_mobile",!0),headerMobileAttributes:t.getAttributes("header_mobile")}),[t]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{id:"kt_header_mobile",className:"header-mobile align-items-center header-mobile-fixed",...g.headerMobileAttributes,children:[(0,n.jsxs)("div",{className:"d-flex align-items-center",children:["public"==e.type&&!s&&(0,n.jsx)("button",{type:"button",className:"btn p-0 burger-icon burger-icon-left mr-4",id:"kt_header_mobile_toggle",children:(0,n.jsx)("span",{})}),("public"==e.type||"main"==e.type)&&(0,n.jsx)(c.N,{legacyBehavior:!0,href:"/",children:(0,n.jsx)("a",{onClick:function(){i((0,l.Aj)())},children:(0,n.jsx)("img",{alt:"logo",src:(0,m.oK)("/media/logos/symbol.svg"),style:{height:"40px"}})})})]}),(0,n.jsxs)("div",{className:"d-flex align-items-center",children:["main"==e.type&&(0,n.jsx)(p.b,{pendingNotifications:e.pendingNotifications,view:x.S.Mobile}),"public"==e.type&&(0,n.jsx)(h.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"}},72472:(e,t,s)=>{"use strict";s.d(t,{$:()=>n.$});var n=s(58485)},73311:(e,t,s)=>{"use strict";s.d(t,{r:()=>r});var n=s(26514);s(75834);var a=s(71582),i=s.n(a);function r(e){let{toLogo:t,fromLogo:s,size:a="md"}=e;return(0,n.jsxs)("div",{className:`${i().root} ${i()[`root-${a}`]}`,children:[(0,n.jsx)("img",{src:t}),(0,n.jsx)("img",{src:s})]})}},73419:(e,t,s)=>{"use strict";s.d(t,{Ep:()=>d,Hn:()=>h,Jv:()=>p,PH:()=>r,Pw:()=>m,SE:()=>x,Wf:()=>u,Wj:()=>l,ZN:()=>o,ae:()=>i,bM:()=>a,k7:()=>c,m5:()=>n});let n=4,a=5,i=8,r=6,o=7,l=50,c=99,d=100,m=101,u=201,h=202,p=203,x=204},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",headerIconBtn:"AiChatDrawer_headerIconBtn__ZCAZX",headerIcon:"AiChatDrawer_headerIcon__Elch6",body:"AiChatDrawer_body__gioki",mainColumn:"AiChatDrawer_mainColumn__0cdIc",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"}},75674:(e,t,s)=>{"use strict";s.d(t,{S:()=>r});var n=s(26514);s(75834);var a=s(56277),i=s.n(a);function r(e){let{stepNumber:t,title:s,text:a,button:r}=e;return(0,n.jsxs)("div",{className:`${i().step}`,children:[(0,n.jsxs)("div",{className:i().stepHeader,children:[(0,n.jsx)("div",{className:i().stepNumber,children:t}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:`${i().stepText} font-size-lg`,children:s}),(0,n.jsx)("div",{className:`${i().stepDescription} font-size-sm`,children:a})]})]}),r]})}},75877:(e,t,s)=>{"use strict";s.d(t,{Es:()=>S,jC:()=>I,qw:()=>T,l8:()=>R});var n=s(26514),a=s(46225),i=s(75834),r=s(30985),o=s(93760),l=s(2782),c=s(4068),d=s(61392),m=s(47115),u=s(55681),h=s(13285),p=s(2587),x=s.n(p),g=s(45041);function f(e){let{portfolio:t}=e,{t:s}=(0,o.B)(["import"]),a=i.useRef(null),{data:r,isLoading:p}=(0,h.F)({portfolioId:t.id});return(0,n.jsxs)("div",{className:`rounded-xl p-4 ${x().root} ${x().block}`,children:[(0,n.jsxs)("div",{className:"font-weight-bold",children:[r?.success?(0,n.jsx)(d.A,{sx:{marginRight:"0.5rem"}}):(0,n.jsx)(c.A,{sx:{marginRight:"0.5rem"}}),s(t.syncProvider==m.nK.YODLEE||t.syncProvider==m.nK.SNAPTRADE||t.syncProvider==m.nK.PLAID?"IMPORT.API.YODLEE":t.isComposite?"IMPORT.API.INTEGRATION_MULTIPLE":"IMPORT.API.INTEGRATION",{ns:"import"})," ",(t.broker==m.eC.TINKOFF||t.broker==m.eC.BINANCE||t.broker==m.eC.JETLEND||t.broker==m.eC.FINAM||t.broker==m.eC.BKS)&&(0,n.jsxs)(n.Fragment,{children:[t.broker," API"]})]}),(0,n.jsxs)("div",{className:"text-dark-50 font-size-sm",children:[p&&(0,n.jsx)(l.A,{variant:"text",sx:{fontSize:"1.5rem"}}),!p&&r&&(0,n.jsx)(u.k,{result:r,portfolio:t,withButton:!1,withIcons:!1,seeMore:!0})]}),(0,n.jsxs)("div",{className:"mt-3",children:[(0,n.jsx)("button",{type:"button",className:"btn btn-sm btn-white btn-white-color shadow-sm font-weight-bold",onClick:()=>{a&&a.current&&a.current.showPinModal()},children:s("LAST_SYNC.UPDATE_DATA_NOW",{ns:"import"})}),(0,n.jsx)(g.J,{ref:a,portfolioId:t.id,portfolio:t})]})]})}var b=s(55285),N=s(49732),j=s(4469),v=s(67614),A=s(50514),_=s(77232);let C="AddActionsSelector",E={showPulse:!1},T="topbar",I="inline",S="compact",y=(0,i.forwardRef)((e,t)=>{let{t:s}=(0,o.B)("layout"),[a,r]=(0,i.useState)(E);(0,i.useEffect)(()=>{r(j.Gu(C,E))},[]);let l=(()=>{switch(e.toggleType){case I:return _.AB;case S:return _.uz;default:return _.qS}})(e.type);return(0,n.jsx)(l,{ref:t,title:s("MENU.QUICK_ACTIONS.ADD"),onClick:t=>{t.preventDefault(),function(){if(a.showPulse){let e={...a};e.showPulse=!1,r(e),j.LZ(C,e)}e.afterToggle&&e.afterToggle()}(),e.onClick(t)},showPulse:a.showPulse,icon:e.showActiveSync?"/media/svg/icons/General/sync-plus.svg":"/media/svg/icons/Code/Plus.svg"})});function O(e){return(0,n.jsxs)(r.A.Item,{id:e.id,className:"dropdown-item font-weight-bold",as:"button",onClick:e.onClick,children:[e.icon&&(0,n.jsx)(N.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:t,currentPortfolio:s,includeSync:l,type:c=T}=e,{t:d}=(0,o.B)(["layout","import"]),[u,h]=(0,i.useState)(c===S),p=(0,a.useRouter)();function x(e){document.dispatchEvent(new MouseEvent("click")),p.push(e)}return(0,n.jsx)(n.Fragment,{children:s&&(0,n.jsxs)(r.A,{id:t,className:"align-items-stretch",drop:"down",alignRightc:!0,children:[(0,n.jsx)(r.A.Toggle,{toggleType:c,showActiveSync:s.isAutoSyncEnabled,as:y,id:"dropdown-toggle-quick-actions-subheader"}),(0,n.jsx)(r.A.Menu,{className:"dropdown-menu dropdown-menu-md dropdown-menu-right dropdown-menu-anim quick-actions-dd",children:(0,n.jsxs)("div",{className:"dropdown-menu-wrapper",children:[l&&s.isAutoSyncEnabled&&(0,n.jsxs)(n.Fragment,{children:[(0,b.de)()&&(0,n.jsx)(r.A.Header,{className:"dropdown-header text-muted font-weight-bold",children:d("HOLDINGS.ADD.SYNC_HEADER")}),(0,n.jsx)("div",{className:"mx-3 my-1",children:(0,n.jsx)(f,{portfolio:s})}),(0,b.de)()&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(O,{id:"add-selector-sync-accounts",onClick:()=>{x("/sync-accounts")},text:d("QUICK_ACTIONS.MANAGE_SYNC_ACCOUNTS"),icon:(0,n.jsx)(A.Ze,{})}),(0,n.jsx)(r.A.Divider,{className:"dropdown-divider"})]})]}),(0,n.jsx)(r.A.Header,{className:"dropdown-header text-muted font-weight-bold",children:d("HOLDINGS.ADD.HEADER")}),(!s.isComposite&&s.type!=m.N$.HOLDINGS||s.isComposite)&&(0,n.jsx)(O,{id:"add-selector-new-transaction",onClick:()=>{x("/transactions#add-tran")},text:d("QUICK_ACTIONS.NEW_TRANSACTION"),icon:(0,n.jsx)(A.c1,{})}),(!s.isComposite&&s.type!=m.N$.HOLDINGS||s.isComposite)&&(0,n.jsx)(O,{id:"add-selector-new-div",onClick:()=>{x("/transactions#add-div")},text:d("QUICK_ACTIONS.NEW_DIV"),icon:(0,n.jsx)(A.c1,{})}),!s.isComposite&&s.type!=m.N$.HOLDINGS&&(0,n.jsx)(O,{id:"add-selector-import-transactions",onClick:()=>{x("/import-transactions")},text:d("QUICK_ACTIONS.UPLOAD_REPORT_2"),icon:(0,n.jsx)(A.z5,{})}),!s.isComposite&&s.type==m.N$.HOLDINGS&&(0,n.jsx)(O,{id:"add-selector-new-asset",onClick:()=>{x("/assets#add")},text:d("QUICK_ACTIONS.ADD_HOLDING"),icon:(0,n.jsx)(A.c1,{})}),!s.isComposite&&s.type==m.N$.HOLDINGS&&(0,n.jsx)(O,{id:"add-selector-edit-holdings",onClick:()=>{x("/edit-holdings")},text:d("QUICK_ACTIONS.EDIT_HOLDINGS"),icon:(0,n.jsx)(A.qU,{})}),!s.isComposite&&(0,n.jsx)(O,{id:"add-selector-manage-cash",onClick:()=>{x("/cash")},text:d("QUICK_ACTIONS.MANAGE_CASH"),icon:(0,n.jsx)(A.lc,{})}),c!==S&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A.Divider,{className:"dropdown-divider"}),(0,n.jsx)(r.A.Header,{className:"text-muted font-weight-bold",children:d("HOLDINGS.ADD.PORTFOLIOS")}
6),(0,n.jsx)(O,{id:"add-selector-add-portfolio",onClick:()=>{x("/new-portfolio")},text:d("QUICK_ACTIONS.NEW_PORTFOLIO"),icon:(0,n.jsx)(A.gi,{})}),(0,n.jsx)(O,{id:"add-selector-add-composite",onClick:()=>{x("/manage-portfolios#add-composite")},text:d("QUICK_ACTIONS.NEW_COMPOSITE_PORTFOLIO"),icon:(0,n.jsx)(A.mL,{})})]}),!s.isComposite&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A.Divider,{}),!u&&(0,n.jsx)("div",{className:"my-4 px-5",children:(0,n.jsx)("a",{className:"font-weight-bold text-body text-hover-primary",href:void 0,onClick:e=>{e.preventDefault(),e.stopPropagation(),h(!0),(0,v.s9)({event:v.Mg.HEADER_ADD_CLICK,element_name:"more_actions"})},children:d("BUTTON.MORE_ACTIONS",{ns:"common"})})}),u&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A.Header,{className:"text-muted font-weight-bold",children:d("HOLDINGS.ADD.OTHER")}),(0,n.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,n.jsx)(A.sj,{})}),s.type!==m.N$.HOLDINGS&&(0,n.jsx)(O,{id:"add-selector-new-corporate-action",onClick:()=>{x("/corporate-actions")},text:d("QUICK_ACTIONS.ADD_CORPORATE_ACTION"),icon:(0,n.jsx)(A.Nb,{})})]})]}),s.isComposite&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.A.Divider,{}),(0,n.jsx)("div",{className:"p-3 font-size-sm text-dark-50 mx-3",children:d("QUICK_ACTIONS.ADD.COMPOSITE_MESSAGE")})]})]})})]})})}},77232:(e,t,s)=>{"use strict";s.d(t,{AB:()=>c,qS:()=>l,uz:()=>d});var n=s(26514),a=s(75834),i=s(93760),r=s(49732),o=s(83602);let l=(0,a.forwardRef)((e,t)=>{let{isDark:s}=(0,o.DP)();return(0,n.jsxs)("button",{id:e.id,type:"button",title:e.title,ref:t,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,n.jsx)(r.A,{src:e.icon,size:e.iconSize??"xl",color:e.iconColor??"primary"}),e.showPulse&&(0,n.jsx)("span",{className:"pulse-ring"})]})}),c=(0,a.forwardRef)((e,t)=>{let{t:s}=(0,i.B)("common");return(0,n.jsxs)("button",{type:"button",title:e.title,ref:t,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,n.jsx)(r.A,{src:e.icon,size:e.iconSize??"md",color:"none"}),s("BUTTON.ADD")]})}),d=(0,a.forwardRef)((e,t)=>{let{t:s}=(0,i.B)("common");return(0,n.jsxs)("button",{type:"button",title:e.title,ref:t,onClick:e.onClick,className:"btn btn-md btn-white shadow-sm font-weight-bold d-flex align-items-center",style:{alignSelf:"center"},children:[(0,n.jsx)(r.A,{src:e.icon,size:e.iconSize??"md",color:"dark"}),s("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,t,s)=>{"use strict";s.d(t,{l:()=>l});var n=s(26514),a=s(95572),i=s(99751),r=s(75834),o=s(334);function l(e){let{items:t}=e,[s,l]=(0,r.useState)([]);return(0,n.jsx)("div",{children:t.map((e,t)=>(0,n.jsxs)("div",{className:"mb-2",children:[(0,n.jsxs)("h3",{className:"font-weight-bold cursor-pointer font-size-lg",onClick:()=>{l(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},style:{userSelect:"none"},children:[s.includes(t)?(0,n.jsx)(a.A,{}):(0,n.jsx)(i.A,{}),e.title]}),(0,n.jsx)(o.A,{in:s.includes(t),children:(0,n.jsx)("div",{className:"pt-1 pb-2 pl-2",children:(0,n.jsx)("div",{style:{whiteSpace:"break-spaces"},children:e.text})})})]},t))})}},80170:(e,t,s)=>{"use strict";s.d(t,{d:()=>o});var n=s(26514);s(75834);var a=s(93760),i=s(1383),r=s.n(i);function o(e){let{title:t,iconUrl:s,onClick:i}=e,{t:o}=(0,a.B)("promos");return(0,n.jsxs)("div",{className:`p-10 border border-light rounded-lg bg-hover-light mb-7 ${r().root}`,onClick:i,children:[(0,n.jsx)("div",{className:"mb-6",children:(0,n.jsx)("img",{src:s,height:40})}),(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsx)("div",{className:`${r().title}`,children:t})}),(0,n.jsx)("div",{children:(0,n.jsxs)("button",{type:"button",className:"btn btn-lg font-weight-bold btn-link-dark",onClick:i,children:[o("PROMO.KNOW_MORE")," â"]})})]})}},80472:(e,t,s)=>{"use strict";s.d(t,{F:()=>p});var n=s(26514);s(75834);var a=s(84332),i=s(93760),r=s(48208),o=s(54253),l=s(69353);let c=(0,l.A)((0,n.jsx)("path",{d:"M18 19H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h5c.55 0 1-.45 1-1s-.45-1-1-1H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1v5c0 .55-.45 1-1 1M14 4c0 .55.45 1 1 1h2.59l-9.13 9.13c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L19 6.41V9c0 .55.45 1 1 1s1-.45 1-1V3h-6c-.55 0-1 .45-1 1"}),"LaunchRounded"),d=(0,l.A)((0,n.jsx)("path",{d:"M16.01 11H5c-.55 0-1 .45-1 1s.45 1 1 1h11.01v1.79c0 .45.54.67.85.35l2.78-2.79c.19-.2.19-.51 0-.71l-2.78-2.79c-.31-.32-.85-.09-.85.35z"}),"ArrowRightAltRounded");var m=s(79598),u=s(83082),h=s.n(u);function p(){let{t:e}=(0,i.B)("portfolio");return(0,n.jsx)("div",{className:h().root,children:(0,n.jsx)(a.F,{className:`alert alert-custom border border-warning ${h().alert}`,children:(0,n.jsxs)("div",{className:h().content,children:[(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("img",{src:(0,o.oK)("/media/svg/illustrations/there-is-nothing-here.png"),alt:"",style:{maxHeight:150},className:"align-self-center mb-6"}),(0,n.jsxs)("h4",{children:["â ï¸ ",e("HOLDING_PORTFOLIO.RESTRICTED.ALERT.TITLE")]}),(0,n.jsx)("p",{children:e("HOLDING_PORTFOLIO.RESTRICTED.ALERT.DESCRIPTION")})]}),(0,n.jsxs)(m.O,{href:"holdings-vs-transactions",target:"_blank",id:"link-to-help-holdings-vs-transactions",className:"btn btn-light btn-lg font-weight-bold text-dark mr-2",children:[e("HOLDING_PORTFOLIO.RESTRICTED.ALERT.LEARN_MORE")," ",(0,n.jsx)(c,{fontSize:"small"})]}),(0,n.jsxs)(r.o,{href:"/dashboard",className:"btn btn-primary btn-lg font-weight-bold",children:[e("HOLDING_PORTFOLIO.RESTRICTED.ALERT.GO_AWAY")," ",(0,n.jsx)(d,{fontSize:"small"})]})]})})})}},81221:(e,t,s)=>{"use strict";s.d(t,{Z:()=>u,a:()=>h});var n=s(26514);s(75834);var a=s(93760),i=s(59757),r=s(38089),o=s(77177),l=s(29622),c=s(49732),d=s(16926),m=s(55285);function u(e){let{t}=(0,a.B)("layout"),s=(0,i.wA)(),{stealthMode:r}=(0,i.d4)(e=>{let{ui:t}=e;return{stealthMode:!0===t.stealthMode}});return(0,m.E8)()?null:(0,n.jsx)("button",{type:"button",className:`btn btn-sm btn-link-muted text-hover-primary btn-icon ${e.className??""}`,title:t(r?"QUICK_ACTIONS.STEALTH_OFF":"QUICK_ACTIONS.STEALTH_ON"),onClick:()=>{s((0,d.R8)(!r))},children:r?(0,n.jsx)(o.A,{color:"muted",fontSize:"small"}):(0,n.jsx)(l.A,{color:"muted",fontSize:"small"})})}function h(){let{t:e}=(0,a.B)("layout"),t=(0,i.wA)(),{stealthMode:s}=(0,i.d4)(e=>{let{ui:t}=e;return{stealthMode:!0===t.stealthMode}});return(0,m.E8)()?null:(0,n.jsx)(r.A,{in:s,children:(0,n.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,n.jsxs)("div",{className:"row justify-content-between w-100",children:[(0,n.jsxs)("div",{className:"col-sm-12 col-md-auto d-flex align-items-center mb-2",children:[(0,n.jsx)(c.A,{className:"mr-2 d-none d-md-block",src:"/media/svg/icons/General/Hidden.svg",color:"warning",size:"2x"}),(0,n.jsx)("span",{children:e("STEALTH_ENABLED.MESSAGE")})]}),(0,n.jsx)("div",{className:"col-sm-12 col-md-auto mb-2",children:(0,n.jsx)("button",{type:"button",className:"btn btn-warning font-weight-bold",onClick:function(){t((0,d.R8)(!s))},children:e("BUTTON.DISABLE_STEALTH")})})]})})})}},81420:(e,t,s)=>{"use strict";s.d(t,{F:()=>c});var n=s(26514),a=s(55909),i=s(10213);s(75834);
6var r=s(23141),o=s(31778),l=s.n(o);function c(e){let{children:t,isDismissible:s=!1,adaptiveCloseButton:o=!1,onClose:c,...d}=e;return(0,n.jsxs)("div",{className:`alert d-block ${d?.className??""}`,children:[(0,n.jsx)("div",{className:"d-flex align-items-center w-100",children:t}),s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.A,{className:`${l().close} ${o?"d-none d-sm-block":""}`,onClick:c,children:(0,n.jsx)(a.A,{})}),o&&(0,n.jsx)("div",{className:"mt-6 d-block d-sm-none",children:(0,n.jsx)("button",{type:"button",className:"btn p-0 w-100",onClick:c,children:(0,n.jsx)(r.x,{i18nKey:"common:BUTTON.CLOSE"})})})]})]})}},81617:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>B});var n=s(26514),a=s(75834),i=s(59757),r=s(93760),o=s(24322),l=s.n(o),c=s(98588),d=s(47030),m=s(7086),u=s(19982),h=s(14009),p=s(64137),x=s(54253),g=s(152),f=s(63390),b=s(96842),N=s(35791),j=s(38266),v=s(40951),A=s(68208),_=s.n(A),C=s(74170),E=s(76510),T=s(15269),I=s(36241);class S extends a.Component{static #e=this.propTypes={portfolioId:_().string,onDelete:_().func,onHide:_().func};constructor(e){super(e),this.open=e=>{this.setState({show:!0,action:e})},this.close=()=>{this.setState({show:!1,action:{}}),this.props.onHide&&this.props.onHide()},this.deleteCorpAction=async()=>{this.setState({blocking:!0});try{let e=f.ske,t=this.state.action.id??null,{data:s}=await m.A.delete(`${e}/${t}`);this.props.onDelete&&this.props.onDelete(s),this.close(),T.uT(this.props.t("CORPORATE_ACTIONS.DELETED"))}catch(t){let e=(0,I.g6)(`${this.props.t("CORPORATE_ACTIONS.FAILED_TO_DELETE")}: 7`,t);T.f1(e)}this.setState({blocking:!1})},this.state={portfolioId:e.portfolioId,action:{},blocking:!1,show:!1}}componentWillReceiveProps(e){e.portfolioId&&e.portfolioId!==this.state.portfolioId&&this.setState({portfolioId:e.portfolioId})}render(){return(0,n.jsxs)(C.A,{show:this.state.show,onHide:this.close,"aria-labelledby":"example-modal-sizes-title-lg",children:[this.state.blocking&&(0,n.jsx)(g.q3,{}),(0,n.jsx)(C.A.Header,{closeButton:!0,children:(0,n.jsx)(C.A.Title,{id:"example-modal-sizes-title-lg",children:this.props.t("CORPORATE_ACTIONS.DELETE.TITLE")})}),(0,n.jsxs)(E.A,{tag:"div",blocking:this.state.blocking,keepInView:!0,children:[(0,n.jsxs)(C.A.Body,{children:[!this.state.blocking&&(0,n.jsx)("span",{children:this.props.t("CORPORATE_ACTIONS.DELETE.DESCRIPTION")}),this.state.blocking&&(0,n.jsx)("span",{children:this.props.t("CORPORATE_ACTIONS.DELETE_IN_PROGRESS")})]}),(0,n.jsxs)(C.A.Footer,{children:[(0,n.jsx)("button",{type:"button",onClick:this.close,className:"btn btn-light btn-elevate",children:this.props.t("BUTTON.DISCARD",{ns:"common"})}),(0,n.jsx)("button",{type:"button",onClick:this.deleteCorpAction,className:"btn btn-danger btn-elevate",children:this.props.t("BUTTON.DELETE_CONFIRM",{ns:"common"})})]})]})]})}}let y=(0,p.C)(["trans","common"],{withRef:!0})(S);var O=s(98337),R=s(49732);class w extends a.Component{constructor(e){super(e),this.corpActionDelete=a.createRef(),this.corpActionEditor=a.createRef(),this.handleTableChange=async(e,t)=>{let{page:s,sizePerPage:n,sortField:a,sortOrder:i}=t,r=s||1;this.state.paginationOptions.sizePerPage!=n&&(r=1),"pagination"===e&&this.setState(e=>({paginationOptions:{...e.paginationOptions,page:r,sizePerPage:n}})),await this.loadData(r,n,a,i,this.state.filter)},this.openEditDialog=(e,t)=>
7{this.corpActionEditor.current.open(e,t)},this.openDeleteDialog=e=>{this.corpActionDelete.current.open(e)},this.refresh=async()=>{await this.loadData(this.state.paginationOptions.page,this.state.paginationOptions.sizePerPage,this.state.sortField,this.state.sortDirection,this.state.filter),await this.checkCorporateActions()},this.loadData=async(e,t,s,n,a)=>{this.setState({listLoading:!0});try{let{data:i}=await m.A.get(f.ske,{params:{page:e,pageSize:t,sortBy:s,sortDirection:n,filter:a,portfolioId:this.state.portfolioId}});this.setState(e=>({sortField:s,sortDirection:n,items:i.data,listLoading:!1,paginationOptions:{...e.paginationOptions,totalSize:i.totalCount}}))}catch(t){this.setState({listLoading:!1});let e=(0,I.g6)(`${this.props.t("ERROR.FAILED_TO_LOAD_DATA",{ns:"common"})}: 8`,t);T.f1(e)}},this.checkCorporateActions=async()=>{try{let{data:e}=await m.A.get(f.PaF,{params:{portfolioId:this.state.portfolioId}});this.setState({suggestActions:e})}catch(t){let e=(0,I.g6)(`${this.props.t("ERROR.FAILED_TO_LOAD_DATA",{ns:"common"})}: 9`,t);T.f1(e)}},this.setColumns=e=>{this.columns=[{dataField:"type",text:this.props.t("COLUMN.EVENT"),sort:!0,sortCaret:x.iA,headerSortingClasses:x.UJ,formatter:b.Gv,classes:"high-col"},{dataField:"date",text:this.props.t("COLUMN.DATE"),sortCaret:x.iA,sort:!0,headerSortingClasses:x.UJ,formatter:b.RB},{dataField:"description",text:this.props.t("COLUMN.DESCRIPTION"),sortCaret:x.iA,sort:!1,headerSortingClasses:x.UJ},{dataField:"importId",text:"",sort:!1,formatter:b.Ux,classes:"text-right pr-0",headerClasses:"text-right pr-3",headerStyle:{width:"30px"}}],e||this.columns.push({dataField:"id",text:"",sort:!1,formatter:b.$t,formatExtraData:{openEditDialog:this.openEditDialog,showEditDialogButton:()=>!1,openDeleteDialog:this.openDeleteDialog,t:this.props.t},classes:"text-right pr-0",headerClasses:"text-right pr-3",headerStyle:{width:"100px"}})};let{portfolioId:t}=e,s=e.isReadonly??!1;this.state={isReadonly:s,portfolioId:t??"",items:null,listLoading:!1,sortField:"name",sortDirection:"asc",filter:"",suggestActions:[],paginationOptions:{custom:!0,totalSize:0,sizePerPageList:N.c9,sizePerPage:25,page:1,paginationTotalRenderer:N.wh}},this.setColumns(s)}componentWillReceiveProps(e){e.portfolioId&&e.portfolioId!==this.state.portfolioId&&this.setState({portfolioId:e.portfolioId,isReadonly:e.isReadonly},()=>{this.setColumns(e.isReadonly),this.refresh(),this.checkCorporateActions()})}componentDidMount(){this.checkCorporateActions()}render(){return(0,n.jsxs)(E.A,{tag:"div",blocking:this.state.listLoading,keepInView:!0,children:[(0,n.jsx)(O.a,{portfolioId:this.state.portfolioId,actions:this.state.suggestActions,onUpdated:this.refresh}),(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsxs)("div",{className:"row justify-content-between",children:[(0,n.jsx)("div",{className:"col-auto mb-1",children:!this.state.isReadonly&&(0,n.jsxs)("button",{type:"button",onClick:()=>this.openEditDialog("new"),className:"btn btn-light-primary font-weight-bold mr-2",children:[(0,n.jsx)("i",{className:"flaticon2-plus"})," ",this.props.t("BUTTON.ADD",{ns:"common"})]})}),(0,n.jsx)("div",{className:"col-auto",children:(0,n.jsxs)(u.A,{className:"mb-1",children:[(0,n.jsx)("div",{children:(0,n.jsx)("input",{type:"text",value:this.state.filter,onKeyDown:e=>{"Enter"===e.key&&this.refresh()},onChange:e=>{this.setState({filter:e.target.value})},className:"form-control form-control-solid border-radius-right-0",placeholder:this.props.t("SEARCH_PLACEHOLDER",{ns:"common"}),id:"corpAction_search_input"})}),(0,n.jsx)(u.A.Append,{children:(0,n.jsx)(h.A,{variant:"light btn-icon",onClick:this.refresh,children:(0,n.jsx)(R.A,{size:"lg",color:"none",src:"/media/svg/icons/General/Search.svg?v=1"})})})]})})]})}),(0,n.jsx)(d.gx,{pagination:(0,d.Ay)(this.state.paginationOptions),children:e=>{let{paginationProps:t,paginationTableProps:s}=e;return(0,n.jsx)(g.dK,{isLoading:this.state.listLoading,paginationProps:t,children:(0,n.jsx)(c.A,{wrapperClasses:"table-responsive",bordered:!1,classes:"table table-head-custom table-vertical-center overflow-hidden table-hover",bootstrap4:!0,keyField:"id",data:null===this.state.items?[]:this.state.items,columns:this.columns,defaultSorted:N.Cm,remote:!0,onTableChange:this.handleTableChange,noDataIndication:()=>(0,n.jsx)(j.k,{}),...s})})}}),(0,n.jsx)(v.f,{ref:this.corpActionEditor,portfolioId:this.state.portfolioId,onHide:this.refresh}),(0,n.jsx)(y,{ref:this.corpActionDelete,portfolioId:this.state.portfolioId,onHide:this.refresh})]})}}let k=(0,p.C)(["trans","common"])(w);var D=s(53804),L=s(80472),P=s(47115);function M(){let{t:e}=(0,r.B)(["trans","common"]),{currentPortfolio:t}=(0,i.d4)(e=>{let{app:t}=e;return{currentPortfolio:t.currentPortfolio??null}},i.bN);
9return t.type.toString()===P.N$.HOLDINGS?(0,n.jsx)(L.F,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(l(),{children:(0,n.jsxs)("title",{children:[e("APP_NAME",{ns:"common"})," - ",e("CORPORATE_ACTIONS")]})}),(0,n.jsx)("div",{className:"card card-custom card-sm-stretch",children:(0,n.jsx)("div",{className:"card-body",children:(0,n.jsx)(k,{portfolioId:t.id,isReadonly:t.isComposite})})})]})}M.getLayout=function(e){return(0,n.jsx)(D.P,{children:e})},M.suspendTrans=["trans","common","layout"];let B=M},81656:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/corporate-actions",function(){return s(81617)}])},83082:e=>{e.exports={root:"RestrictedForPortfolioAlert_root__8D0gB",alert:"RestrictedForPortfolioAlert_alert__i3GJH",button:"RestrictedForPortfolioAlert_button__RfQ_N"}},83535:(e,t,s)=>{"use strict";s.d(t,{zP:()=>h,Ws:()=>tb,Hl:()=>tx,uG:()=>j.uG});var n=s(26514),a=s(75834),i=s(93760),r=s(28684),o=s(47894),l=s(22871),c=s(67614),d=s(83308),m=s(89139),u=s.n(m);function h(e){let{children:t,className:s,onClick:m,title:h,allowGuide:p,isAnimated:x=!1,...g}=e,{t:f}=(0,i.B)("portfolio"),b=(0,r.h)(),N=(0,o.iT)(l.Y.AI_CHAT),j=(0,d.Mw)(),v=(0,a.useRef)(!1),[A,_]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{!p||N.isShown||!j.isEnabled||j.isStarted||j.isRunning||(v.current=!1,N.saveShownState(),j.start(d.Fc.AI_CHAT,d.dG.AI_CHAT_BUTTON))},[p,N.isShown,j.isEnabled,j.isStarted,j.isRunning]),(0,a.useEffect)(()=>{p&&j.scenario===d.Fc.AI_CHAT&&j.status===d.Ne.SKIPPED&&!v.current&&(v.current=!0,N.saveShownState(),(0,c.s9)(c.Mg.AI_MEETFEATURE_SKIP))},[p,j.scenario,j.status]),(0,n.jsx)("button",{className:`btn-icon btn-light font-weight-bold ${u().root} ${x&&!A?u().highlighted:""} ${A?u().pulsed:""} ${!N.isShown?u().animated:""} ${s??""}`,onClick:e=>{m?.(e),N.saveShownState(),b.toggle(),x&&_(!0)},title:h??f("AI_CHAT.BUTTON.TITLE"),type:"button",...g,children:(0,n.jsx)("div",{children:t??(0,n.jsx)("img",{src:"/media/svg/icons/General/ai-sparkle-gradient.svg",className:u().icon})})})}var p=s(53317),x=s(68669),g=s(20444),f=s(55909),b=s(59757),N=s(10192),j=s(33244),v=s(32781),A=s(23141),_=s(66230),C=s(7086);let E="{apiUrl}/api/ai-chat",T="{apiUrl}/api/admin/ai-chat";var I=function(e){return e[e.CLIENT_STREAM=`${E}/stream`]="CLIENT_STREAM",e[e.PLAYGROUND_STREAM=`${T}/stream`]="PLAYGROUND_STREAM",e[e.CLIENT_FEEDBACK=`${E}/feedback`]="CLIENT_FEEDBACK",e[e.PLAYGROUND_FEEDBACK=`${T}/feedback`]="PLAYGROUND_FEEDBACK",e[e.STARTER_QUESTIONS=`${E}/starter-questions`]="STARTER_QUESTIONS",e[e.AVAILABILITY=`${E}/availability`]="AVAILABILITY",e[e.CONVERSATIONS=`${E}/conversations`]="CONVERSATIONS",e}({}),S=s(47115),y=s(61674),O=s(61139),R=s(28100),w=s(55285),k=s(5625);class D extends Error{constructor(e,t){super(e),this.name="ChatStreamError",this.code=t}}function L(e){return e.startsWith("{apiUrl}")?e.replace("{apiUrl}","/extapi"):e}async function P(){let e=window.localStorage.getItem("persist:snowball-auth");if(!e)return null;let t=JSON.parse(e),s=t.refreshToken?t.refreshToken.replace(/"/g,""):null;if(!s)return null;let n=await fetch(L(y.Il),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh_token:s})});if(!n.ok)return null;let a=await n.json(),i=a.access_token,r=a.refresh_token;return t.accessToken=i,t.refreshToken=r,window.localStorage.setItem("persist:snowball-auth",JSON.stringify(t)),k.M_.dispatch({type:O.QN.RefreshAccessToken,payload:{accessToken:i,refreshToken:r}}),i}async function M(e,t,s,n){let a=(0,w.ZI)();return fetch(L(e),{method:"POST",headers:{"Content-Type":"application/json","Accept-Language":function(){let e=(0,R.JQ)();return e?.selectedLang??S.xN}(),"X-Instance":"en",Authorization:`Bearer ${t}`,...a?{"X-Device-Type":a}:{}},body:s,signal:n})}async function B(e,t,s){let n,{onToken:a,onDone:i,onError:r,signal:o}=s,l=JSON.stringify(t),c=function(){let{auth:e}=k.M_.getState();return e.accessToken??null}();if(!c)return void r(Error("Not authenticated"));let d=await M(e,c,l,o);if(401===d.status){let t=await P();if(!t)return void r(Error("Session expired"));d=await M(e,t,l,o)}if(!d.ok)return void r(Error(`Chat request failed: ${d.status}`));let m=d.body?.getReader();if(!m)return void r(Error("No response body"));let u=new TextDecoder,h="",p="";try{for(;;){let{done:e,value:t}=await m.read();if(e)break;let s=(h+=u.decode(t,{stream:!0})).split("\n");for(let e of(h=s.pop()??"",s))if(e.startsWith("event: "))p=e.slice(7).trim();else if(e.startsWith("data: ")){let t=e.slice(6);if("token"===p)try{a(JSON.parse(t))}catch{a(t)}else if("usage"===p)try{n=JSON.parse(t)}catch{}else if("error"===p){try{let e=JSON.parse(t);r(new D(e.message,e.code))}catch{r(new D(t,"unknown"))}return}else if("done"===p)return void i(n)}}i()}catch(e){if(o?.aborted)return;r(e)}}async function U(e,t){let{data:s}=await C.A.get(I.STARTER_QUESTIONS,{params:{portfolioId:e,currency:t}});return s??[]}async function F(){let{data:e}=await C.A.get(I.AVAILABILITY);return e}async function H(e){let{logId:t,feedback:s,mode:n,reason:a}=e;await C.A.post(n===j.uG.PLAYGROUND?I.PLAYGROUND_FEEDBACK:I.CLIENT_FEEDBACK,{logId:t,feedback:s,reason:a})}async function G(e){let{portfolioId:t,message:s,history:n,conversationId:a,currency:i,source:r,onToken:o,onDone:l,onError:c,signal:d}=e;await B(I.CLIENT_STREAM,{portfolioId:t,message:s,history:n,conversationId:a||void 0,currency:i||void 0,source:r||void 0},{onToken:o,onDone:l,onError:c,signal:d})}async function $(){let{data:e}=await C.A.get(I.CONVERSATIONS);return e??[]}async function K(e){let{data:t}=await C.A.get(`${I.CONVERSATIONS}/${e}/messages`);return t}async function Q(e){await C.A.delete(`${I.CONVERSATIONS}/${e}`)}async function z(e){let{portfolioId:t,message:s,history:n,conversationId:a,currency:i,source:r,model:o,systemPrompt:l,promptCache:c,temperature:d,provider:m,useIntentClassifier:u,classifierModel:h,generateSuggestedQuestions:p,onToken:x,onDone:g,onError:f,signal:b}=e;await B(I.PLAYGROUND_STREAM,{portfolioId:t,message:s,history:n,conversationId:a||void 0,currency:i||void 0,source:r||void 0,model:o||void 0,systemPrompt:l||void 0,promptCache:c,temperature:null!=d?Number(d):void 0,provider:m||void 0,useIntentClassifier:u,classifierModel:h||void 0,generateSuggestedQuestions:p},{onToken:x,onDone:g,onError:f,signal:b})}var W=s(33989);function q(e){return{shortText:e,fullText:e}}let Y="ai-chat-conversations";var V=s(85398),X=s(14063),J=s(16926),Z=s(25331),ee=s(20108),et=s.n(ee);
9function es(e){let{conversation:t,isActive:s,isNarrow:a,isConfirmingDelete:r,onSelect:o,onRequestDelete:l,onCancelDelete:c,onConfirmDelete:d}=e,{t:m}=(0,i.B)("portfolio"),u=()=>{a&&r||o()},h=(0,n.jsx)("button",{type:"button",className:"btn btn-icon btn-light-danger btn-hover-danger btn-xs",onClick:e=>{e.stopPropagation(),l()},"aria-label":m("AI_CHAT.HISTORY.DELETE"),children:(0,n.jsx)("i",{className:"far fa-trash-alt icon-nm"})}),p=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button",className:"btn btn-light btn-elevate btn-sm font-weight-bold mr-2",onClick:e=>{e.stopPropagation(),c()},children:m("AI_CHAT.HISTORY.CANCEL")}),(0,n.jsx)("button",{type:"button",className:"btn btn-elevate btn-danger btn-sm font-weight-bold",onClick:e=>{e.stopPropagation(),d()},children:m("AI_CHAT.HISTORY.DELETE")})]});return(0,n.jsxs)("div",{className:`d-flex flex-column ${et().row} ${s?et().active:""} ${a&&r?et().confirming:""}`,onClick:u,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&u()},children:[(0,n.jsxs)("div",{className:`d-flex align-items-center justify-content-center ${et().rowMain}`,children:[(0,n.jsxs)("div",{className:et().rowBody,children:[(0,n.jsx)("div",{className:`text-truncate font-weight-bolder ${et().title}`,children:t.title}),!!t.portfolioName&&(0,n.jsx)("div",{className:"text-truncate text-muted font-size-xs mt-1",children:t.portfolioName})]}),a?h:(0,n.jsxs)(Z.bL,{open:r,onOpenChange:e=>e?l():c(),children:[(0,n.jsx)(Z.l9,{asChild:!0,children:h}),(0,n.jsx)(Z.ZL,{children:(0,n.jsxs)(Z.UC,{side:"right",align:"start",sideOffset:8,className:et().deleteConfirm,onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("p",{children:m("AI_CHAT.HISTORY.DELETE_CONFIRM_TEXT")}),(0,n.jsx)("div",{className:"d-flex justify-content-end",children:p})]})})]})]}),a&&r&&(0,n.jsxs)("div",{className:et().inlineConfirm,children:[(0,n.jsx)("p",{children:m("AI_CHAT.HISTORY.DELETE_CONFIRM_TEXT")}),(0,n.jsx)("div",{className:"d-flex justify-content-end",children:p})]})]})}var en=s(50671),ea=s.n(en);function ei(e){let{isActive:t,isNarrow:s,isOpen:r,onRequestClose:o}=e,{t:l}=(0,i.B)("portfolio"),c=(0,b.wA)(),d=(0,b.d4)(e=>{let{ui:t}=e;return t.aiChatActiveConversationId}),m=(0,W.I)({queryKey:[Y],enabled:t,staleTime:3e4,queryFn:$}),u=function(){let e=(0,V.jE)();return(0,X.n)({mutationFn:Q,onSuccess:(t,s)=>{e.setQueryData([Y],e=>e?.filter(e=>e.id!==s)??e)}})}(),[h,p]=(0,a.useState)(null),x=m.data??[];return(0,n.jsx)("aside",{className:`${ea().sidebar} ${s?ea().narrow:""} ${r?ea().open:""}`,"aria-hidden":!r,children:(0,n.jsxs)("div",{className:`d-flex flex-column ${ea().panel}`,children:[(0,n.jsxs)("button",{type:"button",className:"d-flex btn btn-light font-weight-bold text-nowrap w-100 align-items-center",onClick:()=>{p(null),c((0,J.ji)(null)),o()},children:[(0,n.jsx)(_.A,{className:"mr-1"}),(0,n.jsx)("span",{children:l("AI_CHAT.HISTORY.NEW_CHAT")})]}),(0,n.jsx)("div",{className:`d-flex flex-column ${ea().list}`,children:0===x.length?(0,n.jsx)("p",{className:"py-2 px-1 text-muted font-size-xs text-center",children:(0,n.jsx)(A.x,{i18nKey:"portfolio:AI_CHAT.HISTORY.EMPTY",components:[(0,n.jsx)("br",{})]})}):x.map(e=>(0,n.jsx)(es,{conversation:e,isActive:e.id===d,isNarrow:s,isConfirmingDelete:h===e.id,onSelect:()=>(e=>{if(e===d)return void o();p(null),c((0,J.ji)(e)),o()})(e.id),onRequestDelete:()=>p(e.id),onCancelDelete:()=>p(null),onConfirmDelete:()=>{var t;return t=e.id,void(u.mutate(t,{onSuccess:()=>{d===t&&c((0,J.ji)(null))}}),p(null))}},e.id))})]})})}var er=s(23574),eo=s(66391),el=s(15269),ec=s(4206),ed=s(88754);let em={inputTokens:0,outputTokens:0,estimatedCost:0};function eu(e){return e?.role===j.MW.ASSISTANT&&!!e.quotaStatus}function eh(e){return e.role===j.MW.ASSISTANT?{role:j.MW.ASSISTANT,content:e.content,date:new Date(e.date),logId:e.logId,feedback:e.feedback,suggestedQuestions:e.suggestedQuestions}:{role:j.MW.USER,content:e.content,date:new Date(e.date)}}var ep=s(20968),ex=s(34669),eg=s(48208),ef=s(62522),eb=s.n(ef);function eN(e){let{variant:t}=e,{t:s}=(0,i.B)("portfolio");return t===j.J5.NEAR_LIMIT?(0,n.jsxs)("div",{className:eb().nearLimitNotice,role:"status",children:[(0,n.jsx)(ep.A,{className:eb().nearLimitIcon}),(0,n.jsx)("span",{children:s("AI_CHAT.QUOTA_NEAR_LIMIT")})]}):(0,n.jsx)("div",{className:eb().limitReachedMessage,role:"status","aria-live":"polite",children:(0,n.jsxs)("div",{className:eb().limitReachedCard,
9children:[(0,n.jsx)("div",{className:eb().limitReachedIcon,children:(0,n.jsx)(ep.A,{})}),(0,n.jsxs)("div",{className:eb().limitReachedBody,children:[(0,n.jsx)("h5",{className:"",children:s("AI_CHAT.QUOTA_LIMIT_REACHED.TITLE")}),(0,n.jsx)("p",{className:"text-dark-65",children:s("AI_CHAT.QUOTA_LIMIT_REACHED.TEXT")}),(0,n.jsxs)(eg.o,{href:"/user-manage-subscription",className:"btn btn-md btn-dark font-weight-bold",children:[(0,n.jsx)("span",{children:s("AI_CHAT.QUOTA_LIMIT_REACHED.CTA")}),(0,n.jsx)(ex.A,{className:eb().limitReachedActionIcon})]})]})]})})}var ej=s(60890),ev=s.n(ej),eA=s(90380),e_=s.n(eA),eC=s(65569),eE=s(74206),eT=s(27474),eI=s(49732),eS=s(11725),ey=s(54892),eO=s.n(ey);function eR(e){let{questions:t,onSelect:s,disabled:a}=e;return(0,n.jsx)("div",{className:eO().suggestions,children:t.map(e=>{let t="string"==typeof e?e:e.shortText,i="string"==typeof e?e:e.fullText;return(0,n.jsxs)("button",{type:"button",className:"btn btn-light text-dark font-size-sm d-flex align-items-center justify-content-between text-left",onClick:()=>s?.(i),disabled:a,title:i,children:[t,(0,n.jsx)(eS.A,{sx:{marginLeft:"5px"}})]},`${t}:${i}`)})})}var ew=s(60486),ek=s.n(ew);function eD(e){let{role:t,content:s,logId:r,feedback:o,onFeedback:l,onFeedbackReasonOpen:d,onFeedbackReasonClose:m,isStreaming:u,suggestedQuestions:h,onSuggestedQuestion:p,suggestionsDisabled:x,showActions:g=!0}=e,{t:f}=(0,i.B)("portfolio"),b=t===j.MW.USER,N=!!(u&&0===s.trim().length),[v,A]=(0,a.useState)(!1),_=async()=>{await navigator.clipboard.writeText(s),A(!0),(0,c.s9)({event:c.Mg.AI_CHAT_COPY_CLICK,text:s})};(0,a.useEffect)(()=>{if(!v)return;let e=setTimeout(()=>{A(!1)},2e3);return()=>{clearTimeout(e)}},[v]);let C=e=>{if(!r||!l)return;let t=o===e?null:e;return l(r,t),t};return(0,n.jsxs)("div",{className:`${ek().message} ${b?ek().user:ek().assistant}`,children:[!b&&(0,n.jsx)("div",{className:ek().avatar,children:(0,n.jsx)(eI.A,{src:"/media/svg/icons/General/ai-sparkle.svg?v=2",color:"dark",size:"md"})}),(0,n.jsxs)("div",{className:ek().messageContent,children:[(0,n.jsx)("div",{className:ek().bubble,children:b?(0,n.jsx)("div",{className:ek().textContent,children:s}):(0,n.jsx)("div",{className:ek().markdownContent,children:N?(0,n.jsx)("span",{className:ek().thinkingText,role:"status","aria-live":"polite",children:f("AI_CHAT.THINKING")}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ev(),{remarkPlugins:[e_()],children:s}),u&&(0,n.jsx)("span",{className:ek().streamingCursor})]})})}),!b&&s&&!u&&g&&(0,n.jsxs)("div",{className:ek().actions,children:[(0,n.jsx)("button",{type:"button",className:`${ek().actionBtn} ${v?ek().active:""}`,onClick:_,title:f(v?"AI_CHAT.FEEDBACK.COPIED":"AI_CHAT.FEEDBACK.COPY"),children:(0,n.jsx)(eC.A,{className:ek().actionIcon})}),(0,n.jsx)("button",{type:"button",className:`${ek().actionBtn} ${1===o?ek().active:""}`,onClick:()=>{C(1),m?.(),(0,c.s9)({event:c.Mg.AI_CHAT_LIKE_CLICK,text:s})},title:f("AI_CHAT.FEEDBACK.GOOD"),children:(0,n.jsx)(eE.A,{className:ek().actionIcon})}),(0,n.jsx)("button",{type:"button",className:`${ek().actionBtn} ${-1===o?ek().active:""}`,onClick:e=>{let t=C(-1);r&&-1===t?d?.(r,e.currentTarget):m?.(),(0,c.s9)({event:c.Mg.AI_CHAT_DISLIKE_CLICK,text:s})},title:f("AI_CHAT.FEEDBACK.BAD"),children:(0,n.jsx)(eT.A,{className:ek().actionIcon})})]}),!b&&h?.length?(0,n.jsx)(eR,{questions:h,onSelect:p,disabled:x}):null]})]})}function eL(e){let{content:t}=e;return(0,n.jsxs)("div",{className:ek().systemMessage,role:"status",children:[(0,n.jsx)("span",{className:ek().systemLine,"aria-hidden":"true"}),(0,n.jsx)("span",{className:ek().systemText,children:t}),(0,n.jsx)("span",{className:ek().systemLine,"aria-hidden":"true"})]})}var eP=s(46711),eM=s(10213),eB=s(96418),eU=s(24665),eF=s(77390),eH=s.n(eF);let eG=["AI_CHAT.FEEDBACK.REASON_NO_ANSWER","AI_CHAT.FEEDBACK.REASON_INACCURATE","AI_CHAT.FEEDBACK.REASON_BUG"];function e$(e){let{anchorEl:t,onClose:s,onSubmit:r}=e,{t:o}=(0,i.B)("portfolio"),l=!!t,[c,d]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),h=()=>{d(!1),u("")},p=()=>{h(),s()},x=e=>{h(),r(e)};return(0,a.useEffect)(()=>{d(!1),u("")},[t]),(0,n.jsxs)(eB.Ay,{open:l,anchorEl:t,onClose:p,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},sx:{zIndex:N.QW},PaperProps:{sx:{width:360,maxWidth:"calc(100vw - 24px)"}},children:[(0,n.jsxs)(eP.A,{className:eH().header,children:[(0,n.jsx)("div",{className:"font-weight-bold",children:o("AI_CHAT.FEEDBACK.TITLE")}),(0,n.jsx)(eM.A,{size:"small","aria-label":o("AI_CHAT.CLOSE"),onClick:p,children:(0,n.jsx)(f.A,{fontSize:"small"})})]}),(0,n.jsx)(eP.A,{p:2,children:c?(0,n.jsxs)("div",{children:[(0,n.jsx)(eU.A.Control,{as:"textarea",className:"form-control-solid mb-3",maxLength:N.It,placeholder:o("AI_CHAT.FEEDBACK.OTHER_PLACEHOLDER"),"aria-label":o("AI_CHAT.FEEDBACK.OTHER"),value:m,onChange:e=>u(e.target.value),autoFocus:!0}),(0,n.jsx)("div",{className:"d-flex justify-content-end",children:(0,n.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,n.jsxs)("div",{className:eH().chips,children:[eG.map(e=>(0,n.jsx)("button",{type:"button",className:"btn btn-outline-secondary btn-sm",onClick:()=>x(o(e)),children:o(e)},e)),(0,n.jsx)("button",{type:"button",className:"btn btn-outline-secondary btn-sm",onClick:()=>d(!0),children:o("AI_CHAT.FEEDBACK.OTHER")})]})})]})}function eK(e){let{message:t,isLastMessage:s,isStreaming:a,onFeedback:i,onFeedbackReasonOpen:r,onFeedbackReasonClose:o,onSuggestedQuestion:l,suggestionsDisabled:c}=e,d=a&&t.role===j.MW.ASSISTANT&&s;return t.role===j.MW.SYSTEM?(0,n.jsx)(eL,{content:t.content}):t.quotaStatus===j.J5.LIMIT_REACHED?(0,n.jsx)(eN,{variant:j.J5.LIMIT_REACHED}):(0,n.jsx)(eD,{role:t.role,content:t.content,logId:t.logId,feedback:t.feedback,onFeedback:i,onFeedbackReasonOpen:r,onFeedbackReasonClose:o,isStreaming:d,suggestedQuestions:t.suggestedQuestions,onSuggestedQuestion:l,suggestionsDisabled:c})}function eQ(e){let{messages:t,isStreaming:s,messagesEndRef:i,onFeedback:r,onFeedbackReason:o,onSuggestedQuestion:l,suggestionsDisabled:c}=e,[d,m]=(0,a.useState)(null);return(0,n.jsxs)(n.Fragment,{children:[t.map((e,a)=>(0,n.jsx)(eK,{message:e,isLastMessage:a===t.length-1,isStreaming:s,onFeedback:r,onFeedbackReasonOpen:(e,t)=>m({logId:e,anchorEl:t}),onFeedbackReasonClose:()=>m(null),onSuggestedQuestion:l,suggestionsDisabled:c},a)),(0,n.jsx)("div",{ref:i}),(0,n.jsx)(e$,{anchorEl:d?.anchorEl??null,onClose:()=>m(null),onSubmit:e=>{d&&o?.(d.logId,e),m(null)}})]})}var ez=s(96039),eW=s(51209),eq=s(50041),eY=s(10164),eV=s(66243),eX=s(83094),eJ=s(78693),eZ=s(70326),e0=s.n(eZ);function e1(e){let{value:t,onChange:s,disabled:a}=e,{t:r}=(0,i.B)("portfolio"),{items:o=[],isLoading:l}=(0,eV.J)();if(l)return;let c=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,n.jsxs)("span",{className:e0().option,children:[(0,n.jsx)("span",{className:"symbol symbol-25 mr-2 symbol-light",children:(0,n.jsx)("span",{className:"symbol-label",children:(0,eJ.Tb)(e,e.broker??"Other")})}),(0,n.jsx)("span",{className:t?e0().valueName:e0().optionName,children:e.name})]})};return(0,n.jsx)(eY.Q,{className:e0().select,value:t??"",disabled:a,disableUnderline:!0,displayEmpty:!0,input:(0,n.jsx)(eX.P,{name:"portfolioId",id:"ai-chat-portfolio"}),renderValue:e=>
9{let t=o.find(t=>t.id===e);return t?c(t,!0):r("AI_CHAT.SELECT_PORTFOLIO")},onChange:e=>{var t;return t=e.target.value,void s(o.find(e=>e.id===t))},items:o.map(e=>({value:e.id,name:e.name,display:c(e)}))})}var e5=s(88308),e2=s.n(e5);function e3(e){let{value:t,onChange:s,onSend:r,onStop:o,disabled:l,isStreaming:d,placeholder:m,portfolioId:u,onPortfolioChange:h}=e,{t:p}=(0,i.B)("portfolio"),x=(0,a.useId)(),g=t.length,f=g>N.It,b=g>=N.OB,j=!l&&!d&&g>0&&!f,v=`${e2().symbolCounter} ${f?e2().symbolCounterDanger:e2().symbolCounterWarning}`;return(0,n.jsx)("div",{className:e2().inputContainer,children:(0,n.jsxs)("form",{className:e2().composer,onSubmit:e=>{e.preventDefault(),j&&r()},children:[(0,n.jsx)(eq.A,{className:e2().textarea,value:t,onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),j&&r())},onFocus:()=>{(0,c.s9)(c.Mg.AI_CHAT_CHATAREA_CLICK)},maxRows:5,placeholder:m,disabled:l,"aria-describedby":b?x:void 0,"aria-invalid":f}),b&&(0,n.jsxs)("div",{id:x,className:v,"aria-live":"polite",children:[g,"/",N.It]}),(0,n.jsx)("div",{className:e2().divider}),(0,n.jsxs)("div",{className:e2().bottomRow,children:[(0,n.jsx)(e1,{value:u,onChange:h,disabled:d}),(0,n.jsx)("div",{className:e2().actions,children:d?(0,n.jsx)("button",{type:"button",className:`${e2().actionBtn} ${e2().stopBtn}`,onClick:o,title:p("AI_CHAT.STOP_GENERATING"),children:(0,n.jsx)(ez.A,{className:e2().actionIcon})}):(0,n.jsx)("button",{type:"submit",className:`${e2().actionBtn} ${e2().sendBtn}`,disabled:!j,title:p("AI_CHAT.SEND_MESSAGE"),children:(0,n.jsx)(eW.A,{className:e2().actionIcon})})})]})]})})}var e4=s(51898),e6=s.n(e4);function e8(e){let{questions:t,onSelectQuestion:s,disabled:a}=e,{t:r}=(0,i.B)("portfolio"),o=[r("AI_CHAT.WELCOME_INTRO"),"",...Array.from({length:5},(e,t)=>`- ${r(`AI_CHAT.WELCOME_CAP_${t+1}`)}`),"",`> ${r("AI_CHAT.WELCOME_BETA_NOTE")}`].join("\n");return(0,n.jsxs)("div",{className:e6().welcome,children:[(0,n.jsxs)("div",{className:e6().title,children:[(0,n.jsx)("span",{className:e6().previewBadge,children:r("AI_CHAT.PREVIEW_BADGE")}),(0,n.jsx)("span",{className:e6().titleText,children:r("AI_CHAT.WELCOME_TITLE")})]}),(0,n.jsx)(eD,{role:j.MW.ASSISTANT,content:o,showActions:!1,suggestedQuestions:t,onSuggestedQuestion:s,suggestionsDisabled:a})]})}var e7=s(13664),e9=s(11754),te=s.n(e9);function tt(){let{t:e}=(0,i.B)("portfolio");return(0,n.jsx)("div",{className:te().unavailableMessage,role:"status","aria-live":"polite",children:(0,n.jsxs)("div",{className:te().unavailableCard,children:[(0,n.jsx)("div",{className:te().unavailableIcon,children:(0,n.jsx)(e7.A,{})}),(0,n.jsxs)("div",{className:te().unavailableBody,children:[(0,n.jsx)("h5",{className:"",children:e("AI_CHAT.UNAVAILABLE.TITLE")}),(0,n.jsx)("p",{className:"text-dark-65 mb-0",children:e("AI_CHAT.UNAVAILABLE.TEXT")})]})]})})}var ts=s(14571);let tn=["AI_CHAT.DISCLOSURE.ACCURACY","AI_CHAT.DISCLOSURE.FINANCIAL_ADVICE","AI_CHAT.DISCLOSURE.DATA_PRIVACY","AI_CHAT.DISCLOSURE.TRAINING","AI_CHAT.DISCLOSURE.LIABILITY"];function ta(e){let{id:t,anchorEl:s,onClose:a}=e,{t:r}=(0,i.B)("portfolio");return(0,n.jsxs)(eB.Ay,{id:t,open:!!s,anchorEl:s,onClose:a,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},sx:{zIndex:N.QW},PaperProps:{sx:{width:440,maxWidth:"calc(100vw - 24px)",maxHeight:"min(70vh, 560px)",overflowY:"auto"}},children:[(0,n.jsxs)(eP.A,{display:"flex",alignItems:"center",justifyContent:"space-between",gap:2,px:3,py:1.5,borderBottom:"1px solid",borderColor:"divider",children:[(0,n.jsx)(ts.A,{variant:"subtitle1",fontWeight:600,children:r("AI_CHAT.DISCLOSURE.MODAL_TITLE")}),(0,n.jsx)(eM.A,{size:"small","aria-label":r("AI_CHAT.CLOSE"),onClick:a,children:(0,n.jsx)(f.A,{fontSize:"small"})})]}),(0,n.jsx)(eP.A,{component:"ul",sx:{m:0,px:4,py:2},children:tn.map(e=>(0,n.jsxs)(eP.A,{component:"li",sx:{mb:1.5},children:[(0,n.jsx)(ts.A,{component:"strong",display:"block",fontWeight:600,children:r(`${e}.TITLE`)}),(0,n.jsx)(ts.A,{component:"span",display:"block",variant:"body2",color:"text.secondary",mt:.5,children:r(`${e}.TEXT`)})]},e))})]})}var ti=s(19806),tr=s.n(ti);function to(){let{t:e}=(0,i.B)("portfolio"),{feedbackProps:t,saveFeedbackShownState:s}=(0,o.iT)(l.Y.AI_CHAT),r=(0,a.useId)(),[d,m]=(0,a.useState)(null),[u,h]=(0,a.useState)(!1),p=!!d;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:tr().footer,children:[(0,n.jsxs)("div",{className:tr().left,children:[(0,n.jsx)("span",{children:e("AI_CHAT.DISCLOSURE.SUMMARY")}),(0,n.jsx)("button",{id:"ai-chat-more-details",type:"button",className:tr().detailsBtn,"aria-controls":p?r:void 0,"aria-expanded":p,"aria-haspopup":"dialog",onClick:e=>m(t=>t?null:e.currentTarget),children:e("AI_CHAT.DISCLOSURE.MORE_DETAILS")})]}),(0,n.jsx)("button",{id:"ai-chat-leave-feedback",type:"button",className:tr().feedbackBtn,onClick:()=>{h(!0),s()}
9,children:e("AI_CHAT.LEAVE_FEEDBACK")})]}),(0,n.jsx)(ta,{id:r,anchorEl:d,onClose:()=>m(null)}),u&&!!t&&(0,n.jsx)(v._,{...t,id:"ai-chat-feedback-manual",show:u,onHide:()=>h(!1),onRatingSubmit:e=>{e&&(0,c.s9)({event:c.Mg.AI_CHAT_FEEDBACK_SUBMIT_CLICK,rating:e})}})]})}var tl=s(75165),tc=s(16974),td=s.n(tc);function tm(e){let{className:t,label:s,usage:a}=e,{t:r}=(0,i.B)("portfolio");return(0,n.jsxs)("span",{className:t,children:[s," ",(0,n.jsx)(tl.b,{value:a.inputTokens,precision:0,ignoreStealth:!0})," ",r("AI_CHAT.USAGE_IN")," /"," ",(0,n.jsx)(tl.b,{value:a.outputTokens,precision:0,ignoreStealth:!0})," ",r("AI_CHAT.USAGE_OUT")," ="," ",(0,n.jsx)(tl.b,{value:a.estimatedCost,isMoney:!0,currency:"USD",precision:a.estimatedCost<.01?6:4,ignoreStealth:!0})]})}function tu(e){let{usage:t,totalUsage:s}=e,{t:a}=(0,i.B)("portfolio"),r=s.inputTokens>0;return t||r?(0,n.jsxs)("div",{className:td().usageBar,children:[t&&(0,n.jsx)(tm,{label:a("AI_CHAT.USAGE_LAST_LABEL"),usage:t}),r&&(0,n.jsx)(tm,{className:td().totalUsage,label:a("AI_CHAT.USAGE_SESSION_LABEL"),usage:s})]}):null}var th=s(27497),tp=s.n(th);function tx(e){let{t}=(0,i.B)("portfolio"),s=function(e){var t;let{t:s}=(0,i.B)("portfolio"),n=(0,b.wA)(),r=(0,b.d4)(e=>{let{app:t}=e;return t.currentPortfolio??null}),o=(0,b.d4)(e=>{let{ui:t}=e;return t.aiChatPendingQuestion}),l=r?.id??null,[c,d]=(0,a.useState)(l),[m,u]=(0,a.useState)([]),[h,p]=(0,a.useState)(""),[x,g]=(0,a.useState)(!1),[f,v]=(0,a.useState)(null),[A,_]=(0,a.useState)(em),[C,E]=(0,a.useState)(!1),[T,I]=(0,a.useState)(null),[S,y]=(0,a.useState)(!1),[O,R]=(0,a.useState)(null),w=(0,a.useRef)(null),k=(0,a.useRef)(null),L=(0,a.useRef)(null),P=(0,a.useRef)(0),M=(0,a.useRef)(l),B=(0,a.useRef)(!0),$=(0,a.useRef)(0),Q=(0,a.useRef)(!1),X=(0,a.useRef)(0),Z=(0,a.useRef)(!1),{saveTestResult:ee}=(0,ed.H)(ec.Vr),et=e.mode===j.uG.CLIENT,es=et&&(e.isActive??!0),en=(0,V.jE)(),ea=(0,b.d4)(e=>{let{ui:t}=e;return et?t.aiChatActiveConversationId:null}),ei=(0,a.useRef)(null),er=et?ea:O,eo=(t=et&&es?ea:null,(0,W.I)({queryKey:["ai-chat-conversation-messages",t],enabled:!!t,staleTime:0,queryFn:()=>K(t)})),ep=function(e,t,s){let{t:n}=(0,i.B)("portfolio"),{data:a}=(0,W.I)({queryKey:["ai-chat-starter-questions",e,t],enabled:!!s&&!!e&&!!t,staleTime:1/0,queryFn:()=>U(e,t)});if(!e)return[q(n("AI_CHAT.SUGGEST_NO_PORTFOLIO_1")),q(n("AI_CHAT.SUGGEST_NO_PORTFOLIO_2"))];return a??[]}(c,e.currency,es),ex=function(e){let{data:t}=(0,W.I)({queryKey:["ai-chat-availability"],enabled:e,staleTime:6e4,queryFn:F});return t?.isEnabled??!0}(es),eg=et&&!ex,ef=m.some(e=>e.quotaStatus===j.J5.LIMIT_REACHED),eb=!c||x||eg,eN=c?s("AI_CHAT.PLACEHOLDER_WITH_PORTFOLIO"):s("AI_CHAT.PLACEHOLDER_NO_PORTFOLIO"),ej=et&&!eg&&C&&!ef,ev=e.mode===j.uG.PLAYGROUND&&!!e.showUsage,eA=m.filter((e,t)=>e.quotaStatus===j.J5.LIMIT_REACHED||e.role!==j.MW.ASSISTANT||""!==e.content||x&&t===m.length-1),e_=(0,a.useCallback)(()=>{let e=w.current;return!e||e.scrollHeight-e.scrollTop-e.clientHeight<=80},[]),eC=(0,a.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"smooth",t=w.current;if(t){t.scrollTo({top:t.scrollHeight,behavior:e}),"auto"===e&&(X.current=t.scrollTop);return}k.current?.scrollIntoView({behavior:e})},[]),eE=(0,a.useCallback)(()=>{let e=w.current;if(!e)return;let t=e_(),s=e.scrollTop<X.current;X.current=e.scrollTop,t?B.current=!0:x&&s&&(B.current=!1),y(x&&!B.current&&!t)},[e_,x]),eT=(0,a.useCallback)(()=>{B.current=!0,y(!1),eC("smooth")},[eC]);(0,a.useEffect)(()=>{let e=m.length!==$.current,t=Q.current&&!x;if($.current=m.length,Q.current=x,0===m.length){B.current=!0,X.current=0,y(!1);return}if(x||y(!1),e){B.current=!0,y(!1),eC("smooth");return}B.current&&(x||t)&&eC("auto")},[x,m,eC]),(0,a.useEffect)(()=>()=>{L.current?.abort()},[]),(0,a.useEffect)(()=>{if(et){if(!ea){if(null===ei.current)return;ei.current=null,L.current?.abort(),u([]),I(null),p(""),g(!1),v(null),_(em),P.current=0;return}ei.current!==ea&&(eo.isSuccess?(ei.current=ea,L.current?.abort(),u(eo.data.messages.map(eh)),I(null),p(""),g(!1),v(null),_(em),P.current=0,eo.data.conversation.portfolioId&&d(eo.data.conversation.portfolioId)):eo.isError&&(ei.current=ea,n((0,J.ji)(null))))}},[et,ea,eo.isSuccess,eo.isError,eo.data,n]);let eI=(0,a.useCallback)(e=>{let t;g(!1),t=e instanceof D?"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"),el.f1(t)},[]),eS=(0,a.useCallback)((t,s)=>{!Z.current&&s?.quotaStatus!==j.J5.LIMIT_REACHED&&(t?.trim().length??0)>=N.kN&&(Z.current=!0,e.onFeedbackPromptEligible?.())},[e.onFeedbackPromptEligible]),ey=(0,a.useCallback)((e,t)=>{if(g(!1),t){if(t.quotaStatus===j.J5.LIMIT_REACHED)return void u(s=>{let n=[...s],a=n[e];return a?.role!==j.MW.ASSISTANT?s:(n[e]={...a,role:j.MW.ASSISTANT,content:"",logId:t.logId,quotaStatus:j.J5.LIMIT_REACHED},n)});t.quotaStatus===j.J5.NEAR_LIMIT&&E(!0),v(t),_(e=>({inputTokens:e.inputTokens+t.inputTokens,outputTokens:e.outputTokens+t.outputTokens,estimatedCost:e.estimatedCost+t.estimatedCost})),(t.logId||t.suggestedQuestions?.length)&&u(s=>{let n=[...s],a=n[e];return a?.role!==j.MW.ASSISTANT?s:(n[e]={...a,logId:t.logId??a.logId,suggestedQuestions:t.suggestedQuestions},n)})}},[]),eO=(0,a.useCallback)(e=>{if(e?.conversationId){if(!et)return void R(e.conversationId);ea!==e.conversationId&&(ei.current=e.conversationId,n((0,J.ji)(e.conversationId))),en.invalidateQueries({queryKey:[Y]})}},[et,ea,n,en]),eR=(0,a.useCallback)(async function(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:j.O5.TYPED,n=t??h,a=n.trim();if(!a||n.length>N.It||!c||x)return;let i={role:j.MW.USER,content:a,date:new Date},r=m.slice(P.current),o=r.filter((e,t)=>
9{var s;return!((s=e.role)!==j.MW.USER&&s!==j.MW.ASSISTANT||eu(e))&&0!==e.content.trim().length&&!(e.role===j.MW.USER&&eu(r[t+1]))}).map(e=>({role:e.role,content:e.content,date:e.date})),l=m.length+1,d=new AbortController,f="";u(e=>[...e,i,{role:j.MW.ASSISTANT,content:"",date:new Date}]),I(i),p(""),g(!0),v(null),L.current=d;let b={portfolioId:c,message:a,history:o,conversationId:er??void 0,currency:e.currency,source:s,onToken:e=>{f+=e,u(t=>{let s=[...t],n=s[l];return n?.role!==j.MW.ASSISTANT?t:(s[l]={...n,content:n.content+e},s)})},onDone:e=>{ey(l,e),eS(f,e),eO(e)},onError:eI,signal:d.signal};if(e.mode===j.uG.PLAYGROUND)return void await z({...b,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});ee(ec.Vr.resultTried),await G(b)},[er,ey,eO,eI,h,x,m,e,eS,ee,c]);(0,a.useEffect)(()=>{es&&o&&c&&!x&&(n((0,J.s6)(null)),eR(o,j.O5.STARTER))},[n,eR,es,x,o,c]);let ew=(0,a.useCallback)(()=>{L.current?.abort(),g(!1)},[]),ek=(0,a.useCallback)(()=>{L.current?.abort(),u([]),I(null),g(!1),v(null),_(em),R(null),P.current=0},[]),eD=(0,a.useCallback)(e=>!!e&&e.id!==c&&(d(e.id),et&&ea&&en.setQueryData([Y],t=>t?.map(t=>t.id===ea?{...t,portfolioId:e.id,portfolioName:e.name}:t)??t),u(t=>0===t.length?(P.current=0,t):(P.current=t.length+1,[...t.map(e=>e.role===j.MW.ASSISTANT&&e.suggestedQuestions?.length?{...e,suggestedQuestions:void 0}:e),{role:j.MW.SYSTEM,content:s("AI_CHAT.PORTFOLIO_CHANGED",{portfolioName:e.name}),date:new Date}])),!0),[ea,et,en,c,s]);(0,a.useEffect)(()=>{if(l===M.current)return;let e=M.current;if(M.current=l,!r)return void d(null);(e||!c)&&r.id!==c&&(x&&(L.current?.abort(),g(!1)),eD(r))},[r,l,eD,x,c]);let eL=(0,a.useCallback)(async(t,s)=>{u(e=>e.map(e=>e.role===j.MW.ASSISTANT&&e.logId===t?{...e,feedback:s}:e)),await H({logId:t,feedback:s,mode:e.mode})},[e.mode]),eP=(0,a.useCallback)(async(t,n)=>{await H({logId:t,feedback:-1,mode:e.mode,reason:n}),el.uT(s("AI_CHAT.FEEDBACK.THANKS"))},[e.mode]);return{aiChatDisabled:eg,messages:eA,lastUserMessage:T,input:h,setInput:p,selectedPortfolioId:c,handlePortfolioChange:eD,isStreaming:x,inputDisabled:eb,inputPlaceholder:eN,showNearLimitNotice:ej,showUsage:ev,starterQuestions:ep,usage:f,totalUsage:A,messagesContainerRef:w,messagesEndRef:k,showJumpToLatest:S,hasMessages:m.length>0,send:{input:()=>void eR(),starterQuestion:e=>void eR(e,j.O5.STARTER),suggestedQuestion:e=>void eR(e,j.O5.SUGGESTED)},handleMessagesScroll:eE,handleJumpToLatest:eT,handleStop:ew,handleClear:ek,handleFeedback:eL,handleFeedbackReason:eP}}(e),r=e.mode===j.uG.PLAYGROUND&&s.hasMessages,o=!s.hasMessages;return(0,n.jsxs)("div",{className:`${tp().panel} ${e.className??""}`,children:[r&&(0,n.jsx)("div",{className:tp().header,children:(0,n.jsxs)("button",{id:"ai-chat-clear",type:"button",className:tp().clearBtn,onClick:s.handleClear,title:t("AI_CHAT.CLEAR_CONVERSATION"),children:[(0,n.jsx)(er.A,{className:tp().clearIcon}),(0,n.jsx)("span",{children:t("AI_CHAT.CLEAR")})]})}),(0,n.jsxs)("div",{className:tp().messagesContainer,children:[(0,n.jsxs)("div",{ref:s.messagesContainerRef,className:tp().messages,onScroll:s.handleMessagesScroll,children:[o&&(0,n.jsx)(e8,{questions:s.starterQuestions,onSelectQuestion:e=>{s.send.starterQuestion(e),(0,c.s9)({event:c.Mg.AI_CHAT_FIRSTSLUG_CLICK,element:e})},disabled:s.inputDisabled}),(0,n.jsx)(eQ,{messages:s.messages,isStreaming:s.isStreaming,messagesEndRef:s.messagesEndRef,onFeedback:s.handleFeedback,onFeedbackReason:s.handleFeedbackReason,onSuggestedQuestion:e=>{s.send.suggestedQuestion(e),(0,c.s9)({event:c.Mg.AI_CHAT_SLUG_CLICK,element:e})},suggestionsDisabled:s.isStreaming})]}),s.showJumpToLatest&&(0,n.jsx)("button",{type:"button",className:tp().jumpToLatestBtn,onClick:s.handleJumpToLatest,title:t("AI_CHAT.JUMP_TO_LATEST"),"aria-label":t("AI_CHAT.JUMP_TO_LATEST"),children:(0,n.jsx)(eo.A,{className:tp().jumpToLatestIcon})})]}),s.showUsage&&(0,n.jsx)(tu,{usage:s.usage,totalUsage:s.totalUsage}),s.aiChatDisabled&&(0,n.jsx)(tt,{}),s.showNearLimitNotice&&(0,n.jsx)(eN,{variant:j.J5.NEAR_LIMIT}),(0,n.jsx)(e3,{value:s.input,onChange:s.setInput,onSend:()=>{s.send.input(),(0,c.s9)({event:c.Mg.AI_CHAT_SEND_CLICK,text:s.input})},onStop:()=>{s.handleStop(),s.lastUserMessage&&(0,c.s9)({event:c.Mg.AI_CHAT_STOP_CLICK,text:s.lastUserMessage?.content})},disabled:s.inputDisabled,isStreaming:s.isStreaming,placeholder:s.inputPlaceholder,portfolioId:s.selectedPortfolioId,onPortfolioChange:e=>{e&&s.handlePortfolioChange(e)&&(0,c.s9)({event:c.Mg.AI_CHAT_PORTFOLIO_CLICK,element:e.name})}}),(0,n.jsx)(to,{})]})}var tg=s(74381),tf=s.n(tg);function tb(){let{t:e}=(0,i.B)("portfolio"),t=(0,r.h)({enableResize:!0}),{feedbackProps:s,isFeedbackShown:d,saveFeedbackShownState:m}=(0,o.iT)(l.Y.AI_CHAT),u=(0,b.d4)(e=>{let{app:t}=e;return t.localCurrency??t.currency}),[h,A]=(0,a.useState)(!1),[_,C]=(0,a.useState)(!1),[E,T]=(0,a.useState)(()=>!t.isNarrow),I=(0,a.useRef)(!1),S=(0,a.useRef)(m),y=!!s;(0,a.useEffect)(()=>{I.current||T(!t.isNarrow)},[t.isNarrow]),(0,a.useEffect)(()=>{S.current=m},[m]),(0,a.useEffect)(()=>
9{if(!h||t.isOpen||d||_||!y)return;let e=setTimeout(()=>{C(!0),S.current()},N.qb);return()=>clearTimeout(e)},[y,h,t.isOpen,d,_]);let O=(0,a.useCallback)(()=>{A(!0)},[]),R=(0,n.jsxs)(p.Ay,{className:tf().drawer,variant:"persistent",anchor:"right",open:t.isOpen,style:{zIndex:N.Qt},PaperProps:{className:tf().paper,style:{width:t.isNarrow?"100vw":t.width,zIndex:N.Qt}},children:[!t.isNarrow&&(0,n.jsx)("button",{type:"button",className:tf().resizeHandle,onPointerDown:t.handleResizeStart,onKeyDown:t.handleResizeKeyDown}),(0,n.jsxs)("div",{className:tf().header,children:[(0,n.jsxs)("div",{className:"d-flex align-items-center",children:[(0,n.jsx)("button",{type:"button",className:tf().headerIconBtn,onClick:()=>{I.current=!0,T(e=>!e)},title:e("AI_CHAT.HISTORY.MENU_TOGGLE"),"aria-label":e("AI_CHAT.HISTORY.MENU_TOGGLE"),children:(0,n.jsx)(g.A,{className:tf().headerIcon})}),(0,n.jsxs)("div",{className:tf().title,children:[(0,n.jsx)("img",{src:"/media/svg/icons/General/ai-sparkle-gradient.svg",className:tf().aiIcon}),(0,n.jsx)("span",{children:e("AI_CHAT.TITLE")}),(0,n.jsx)("span",{className:tf().previewBadge,children:e("AI_CHAT.PREVIEW_BADGE")})]})]}),(0,n.jsx)("button",{id:"ai-chat-close",type:"button",className:tf().headerIconBtn,onClick:()=>{t.setOpen(!1)},title:e("AI_CHAT.CLOSE"),"aria-label":e("AI_CHAT.CLOSE"),children:(0,n.jsx)(f.A,{className:tf().headerIcon})})]}),(0,n.jsxs)("div",{className:`d-flex ${tf().body}`,children:[(0,n.jsx)(ei,{isActive:t.isOpen,isNarrow:t.isNarrow,isOpen:E,onRequestClose:()=>{t.isNarrow&&T(!1)}}),(0,n.jsx)("div",{className:`d-flex flex-column ${tf().mainColumn}`,children:(0,n.jsx)(tx,{mode:j.uG.CLIENT,currency:u,isActive:t.isOpen,className:tf().chatPanel,onFeedbackPromptEligible:O})})]})]});return(0,n.jsx)(x.A,{children:(0,n.jsxs)(n.Fragment,{children:[R,!!s&&(0,n.jsx)(v._,{...s,id:"ai-chat-feedback-auto",show:_,onHide:()=>C(!1),onRatingSubmit:e=>{e&&(0,c.s9)({event:c.Mg.AI_CHAT_FEEDBACK_SUBMIT_CLICK,rating:e})}})]})})}s(4707)},84332:(e,t,s)=>{"use strict";s.d(t,{F:()=>n.F});var n=s(81420)},86939:e=>{e.exports={root:"PublicModalFeature_root__psUTJ"}},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",divider:"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,t,s)=>{"use strict";s.d(t,{G:()=>r});var n=s(7086),a=s(24163),i=s(63390);async function r(e){let t=(0,a.F)(),{data:s}=await n.A.get(i.NwO,{params:{...e,isSignedIn:t}});return s}},89077:(e,t,s)=>{"use strict";s.d(t,{EI:()=>p,cg:()=>x.c,z5:()=>h,eh:()=>R}),s(62819);var n=s(26514),a=s(75834),i=s(15269),r=s(60890),o=s(54253),l=s(73419);function c(e){let{item:t,display:s="full",onClick:a}=e;return(0,n.jsxs)("div",{className:a?"cursor-pointer":"",onClick:()=>a?.(t),children:["compact"!==s&&(t.type===l.bM||t.type===l.ae||t.illustrationUrl)&&(0,n.jsx)("div",{className:"d-flex justify-content-center",children:(0,n.jsx)("img",{className:"d-block",style:{height:"230px"},src:(0,o.oK)(t.illustrationUrl??"/media/svg/illustrations/present.png"),alt:"image"})}),t.type!==l.bM&&t.type!==l.ae&&"compact"!==s&&(0,n.jsx)("div",{className:"pt-10"}),(0,n.jsx)("div",{className:`${"compact"===s?"h4":"h3"} message-title`,children:t.messageTitle}),(0,n.jsx)("div",{className:`mt-2 message-content ${"compact"===s?"message-content-compact":"mx-10"}`,children:t.messageDescription&&(0,n.jsx)(r,{children:t.messageDescription})})]})}var d=s(74170),m=s(93760),u=s(46225);function h(e){let{notification:t,onRead:s}=e,[i,r]=(0,a.useState)(!0),{t:o}=(0,m.B)("common"),l=(0,u.useRouter)(),h=async()=>{s&&await s(t.id,!0),r(!1)},p=async()=>{await h(),t?.actionLink&&l.push(t.actionLink)};return(0,n.jsxs)(d.A,{backdrop:"static",show:i,onHide:h,children:[(0,n.jsx)("button",{type:"button",onClick:h,className:"btn btn-icon btn-light btn-sm btn-circle btn-close-card",children:(0,n.jsx)("i",{className:"flaticon2-cross icon-sm text-dark-50"})}),(0,n.jsx)(d.A.Body,{className:"overlay overlay-block cursor-default py-10 px-10 text-center",children:(0,n.jsx)(c,{item:t})}),!!t?.actionLink&&(0,n.jsx)(d.A.Footer,{className:"d-flex justify-content-end",children:(0,n.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:t,onRead:s}=e,[r,o]=(0,a.useState)(!1),l=()=>{i.Tn(),o(!0),s(t.id,!0)};return a.useEffect(()=>{i.IO((0,n.jsx)("div",{children:(0,n.jsx)(c,{item:t,display:"compact",onClick:l})}),{doNotHide:!0,anchor:{vertical:"bottom",horizontal:"right"},ignoreClickAway:!0,onClose:()=>s(t.id)})},[t]),r?(0,n.jsx)(h,{notification:t}):null}var x=s(49942),g=s(88687),f=s(7086),b=s(33989),N=s(36728),j=s(63390),v=s(55285),A=s(47115),_=s(23141
9),C=s(96456),E=s.n(C),T=s(91453),I=s.n(T);function S(e){let{currency:t,monthlyPrice:s,yearlyPrice:a,discount:i=0}=e,{i18n:r,t:o}=(0,m.B)(["common","user"]),l={style:"currency",currency:t};"ru"===r.language&&(l.minimumFractionDigits=0,l.maximumFractionDigits=0);let c=`${Intl.NumberFormat(r.language,l).format(s)}`,d=`${Intl.NumberFormat(r.language,l).format(a)}`;return(0,n.jsxs)("div",{className:I().root,children:[!!i&&(0,n.jsxs)("div",{className:`badge badge-gradient ${I().discount}`,children:["-",i,"%"]}),(0,n.jsxs)("div",{className:"d-flex align-items-end justify-content-between mb-5",children:[(0,n.jsx)("div",{className:I().monthly,children:(0,n.jsx)(_.x,{i18nKey:"LABEL.PRICING_FROM_MONTHLY",components:[(0,n.jsx)("span",{},"pricing-from-monthly")],values:{value:c}})}),(0,n.jsx)("div",{className:I().yearly,children:(0,n.jsx)(_.x,{i18nKey:"LABEL.PRICING_YEARLY",components:[(0,n.jsx)("span",{},"pricing-early")],values:{value:d}})})]}),(0,n.jsx)(E(),{id:"subscription-expiration-upgrade",href:"/user-manage-subscription",className:`btn btn-lg w-100 ${I().btn}`,children:o("BUTTON.UPGRADE",{ns:"user"})})]})}var y=s(25294),O=s.n(y);function R(e){let{onRead:t}=e,{t:s}=(0,m.B)(["layout","common"]),i=(0,u.useRouter)(),{data:r,isLoading:o}=(0,b.I)({queryKey:["subscriptionPricing"],queryFn:()=>f.A.get(j.K4T).then(e=>{let{data:t}=e;return t})}),[l,c]=(0,a.useState)(!0),d=()=>{c(!1),t()};if((0,a.useEffect)(()=>(i.events.on("routeChangeStart",d),()=>{i.events.off("routeChangeStart",d)}),[]),o||!r)return;let h=r.currencuy??((0,v.de)()?"USD":"RUB"),p=r.tier2_1_yearly_price_discounted??r.tier2_1_yearly_price,x=r.tier2_1_yearly_price_final,_=r.personalDiscounts.find(e=>{let{tier:t}=e;return t===A.Qh.TIER_1}),C=_?100*_.discount:0;return(0,n.jsxs)(N.z,{show:l,onHide:d,showButtons:!1,title:s("SUBSCRIPTION_EXPIRING.TITLE"),rootClassName:O().root,children:[(0,n.jsx)("p",{children:s("SUBSCRIPTION_EXPIRING.TEXT")}),(0,n.jsx)("div",{className:"my-4",children:(0,n.jsx)(S,{currency:h,monthlyPrice:p,yearlyPrice:x,discount:C})}),(0,n.jsxs)("ul",{className:O().list,children:[(0,n.jsxs)("li",{children:[(0,n.jsx)(g.A,{})," ",s("SUBSCRIPTION_EXPIRING.LIST_1")]}),(0,n.jsxs)("li",{children:[(0,n.jsx)(g.A,{})," ",s("SUBSCRIPTION_EXPIRING.LIST_2")]}),(0,n.jsxs)("li",{children:[(0,n.jsx)(g.A,{})," ",s("SUBSCRIPTION_EXPIRING.LIST_3")]}),(0,n.jsxs)("li",{children:[(0,n.jsx)(g.A,{})," ",s("SUBSCRIPTION_EXPIRING.LIST_4")]}),(0,n.jsx)("li",{children:s("LABEL.AND_MORE",{ns:"common"})})]})]})}s(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,t,s)=>{"use strict";s.d(t,{q:()=>b});var n=s(26514),a=s(75834),i=s(93760),r=s(51065),o=s.n(r),l=s(46225),c=s(21069),d=s(47115),m=s(50062),u=s(96456),h=s.n(u),p=s(73311),x=s(10140);function g(e){let{item:t,href:s,openInNewTab:a=!1,onClick:r}=e,{t:o}=(0,i.B)("common"),l=(0,n.jsxs)("div",{className:"d-flex align-items-center justify-content-between pr-3",children:[(0,n.jsxs)("div",{className:"d-flex align-items-center overflow-hidden",style:{maxWidth:"100%"},children:[(0,n.jsx)("div",{className:"py-2",children:t.type===d.PW.QUOTE?(0,n.jsx)("div",{className:"mr-2",children:(0,n.jsx)(p.r,{fromLogo:t.primaryLogoURL,toLogo:t.logoURL})}):(0,n.jsx)(c.hz,{logoUrl:t.logoURL,primaryLogoUrl:t.primaryLogoURL,name:t.description,assetType:t.type,ticker:t.ticker})}),(0,n.jsx)("div",{className:"py-2 flex-grow-1 overflow-hidden",children:(0,n.jsxs)("div",{className:"asset-info-container",children:[(0,n.jsxs)("p",{className:"text-muted asset-info-name link-item",children:[t.ticker," ",!!t.exchange&&(0,n.jsxs)(n.Fragment,{children:["(",t.exchange,")"]}),t.isDelisted&&(0,n.jsx)("span",{className:"label label-sm label-inline label-light-warning ml-2",children:o("ASSET_DELISTED")})]}),(0,n.jsx)("p",{className:"asset-info-description",title:t.description,children:t.description})]})})]}),(0,n.jsx)("div",{className:"ml-2 d-flex align-items-center",children:(0,n.jsx)("span",{className:"font-size-sm text-dark-50",children:(0,n.jsx)("span",{children:(0,x.Qn)(t.currency)})})})]});return s?(0,n.jsx)(h(),{legacyBehavior:!0,href:s,children:(0,n.jsx)("a",{onClick:r,target:a?"_blank":"_self",className:"asset-link text-body flex-grow-1 overflow-hidden","aria-disabled":"true",children:l})}):(0,n.jsx)("div",{className:"text-body flex-grow-1 overflow-hidden",children:l})}let f={wheelSpeed:2,wheelPropagation:!1};function b(e){let{onItemClicked:t,openInNewTab:s,isRecent:r,data:u,renderItem:h=(e,t)=>t}=e,{t:p}=(0,i.B)("common"),x=(0,l.useRouter)(),[b,N]=(0,a.useState)(null),j=x.pathname.startsWith("/public/asset"),v=x.pathname.startsWith("/public/asset")?x.query?.tab?.[0]:"";return((0,a.useEffect)(()=>{x.pathname.indexOf("public/asset")>=0&&!window.location.hash.startsWith("#comment")?N(window.location.hash):N(null)},[x]),u)?0===u.length?(0,n.jsx)("div",{style:{maxHeight:"325px",overflow:"hidden"},className:"quick-search-wrapper scroll ps ps--active-y",children:(0,n.jsx)("div",{className:"quick-search-result",children:(0,n.jsx)("div",{className:"text-muted d-none",children:p("ERROR.NOTHING_FOUND")})})}):(0,n.jsx)("div",{style:{maxHeight:"325px",overflow:"hidden"},className:"quick-search-wrapper scroll ps ps--active-y mb-0",children:(0,n.jsx)(o(),{options:f,className:"scroll",style:{maxHeight:"325px",position:"relative"},children:(0,n.jsxs)("div",{className:"quick-search-result pb-4",children:[r&&(0,n.jsx)("div",{className:"text-muted font-weight-bold py-2 font-size-sm",children:p("RECENT_ITEMS")}),u.map((e,a)=>(0,n.jsx)("div",{className:`d-flex align-items-center pr-3 ${a>0?"border-top":""}`,children:h(e,(0,n.jsx)(g,{item:e,href:function(e){if(e?.type===d.PW.QUOTE)return null;let t=(0,c.A)(e.assetType,e.id,e.ticker,e.exchange,e.currency);return j&&v&&(0,m.Zu)(v,e)?`${t}/${v}${b??""}`:`${t}${b??""}`}(e),openInNewTab:s,onClick:()=>{t&&t(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,t,s)=>{"use strict";s.d(t,{Hg:()=>a.H,LO:()=>n.LO,XB:()=>n.XB,lo:()=>n.lo,mE:()=>n.mE});var n=s(63885),a=s(50996)},95638:(e,t,s)=>{"use strict";s.d(t,{A:()=>N,H:()=>j});var n=s(26514),a=s(75834),i=s(91114),r=s.n(i),o=s(51065),l=s.n(o),c=s(80966),d=s(71359),m=s(56153),u=s(6662),h=s(58303),p=s(30985),x=s(54253),g=s(49732),f=s(60547),b=s(97043);function N(e){let[t,s]=a.useState(!1),i=a.useRef(null),{placement:o="bottom-end"}=e,p=()=>{s(e=>!e)},N=e=>{i.current&&i.current.contains(e.target)||"body"!==e.target.localName&&s(!1)};return(0,n.jsxs)(n.Fragment,{children:[e.tooltip&&(0,n.jsx)(b.o,{title:e.tooltip,children:(0,n.jsx)("span",{children:(0,n.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,n.jsx)("span",{className:e.svgIconClass?e.svgIconClass:"svg-icon svg-icon-md svg-icon-dark",children:(0,n.jsx)(r(),{preProcessor:f.xY,src:(0,x.oK)(`/media/svg/icons/${e.icon}`)})}),!e.useSvgIcon&&!e.icon&&!e.text&&(0,n.jsx)(g.A,{color:e.iconColor??"dark-50",size:"md",src:"/media/svg/icons/General/Other2.svg"}),!e.useSvgIcon&&e.icon&&(0,n.jsx)("i",{className:e.icon}),!!e.text&&(0,n.jsx)(n.Fragment,{children:e.text}),e.indicator&&(0,n.jsx)("span",{className:"btn-indicator label label-md label-dot label-success"})]})})}),!e.tooltip&&(0,n.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,n.jsx)("span",{className:e.svgIconClass?e.svgIconClass:"svg-icon svg-icon-md svg-icon-dark",children:(0,n.jsx)(r(),{preProcessor:f.xY,src:(0,x.oK)(`/media/svg/icons/${e.icon}`)})}),!e.useSvgIcon&&!e.icon&&!e.text&&(0,n.jsx)(g.A,{color:e.iconColor??"dark-50",size:"md",src:"/media/svg/icons/General/Other2.svg"}),!e.useSvgIcon&&e.icon&&(0,n.jsx)("i",{className:e.icon}),!!e.text&&(0,n.jsx)(n.Fragment,{children:e.text}),e.indicator&&(0,n.jsx)("span",{className:"btn-indicator label label-md label-dot label-success"})]}),(0,n.jsx)(h.A,{id:e.popperId,open:t,anchorEl:i.current,role:void 0,className:`z-10 setting-dropdown ${e.className??""}`,placement:o,transition:!0,disablePortal:!0,children:t=>{let{TransitionProps:s,placement:a}=t;return(0,n.jsx)(m.A,{...s,style:{transformOrigin:"bottom-start"===a?"left top":"left bottom"},children:(0,n.jsx)(u.A,{sx:{boxShadow:"none"},children:(0,n.jsx)(d.x,{onClickAway:N,children:(0,n.jsx)(l(),{options:{wheelPropagation:!1,wheelSpeed:2},className:"scroll",style:{maxHeight:e.menuHeight??(c.XF?"400px":"500px"),position:"relative"},children:(0,n.jsx)("div",{className:`${e?.className?e.className:""} ${!e.selector&&"p-4 setting-dropdown-container"}`,children:e.children})})})})})}})]})}function j(e){let t=!!e.items.find(e=>{let{isNew:t}=e;return t});return(0,n.jsxs)(p.A,{className:"d-inline-block position-static",alignRight:!0,onToggle:e?.onToggle,children:[(0,n.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,n.jsx)("span",{className:e.iconClass??"svg-icon svg-icon-md svg-icon-dark",children:(0,n.jsx)(r(),{preProcessor:f.xY,src:(0,x.oK)(`/media/svg/icons/${e.icon}`)})}),t&&(0,n.jsx)("span",{className:"btn-indicator label label-md label-dot label-primary",style:{right:0,top:10}}),!e.useSvgIcon&&(0,n.jsx)("i",{className:e.icon??"flaticon2-gear"})]}),(0,n.jsx)(p.A.Menu,{className:"w-auto",children:e.items.map((e,t)=>{if("divider"!=e.type&&"text"!=e.type){let s=(0,n.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,n.jsx)(g.A,{className:"button-svg-icon",src:`/media/svg/icons/${e.svgIcon}`,size:"md",color:e.color??"none"}),(0,n.jsxs)("span",{className:"position-relative",children:[e.name,e.isNew&&(0,n.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,n.jsx)(a.Fragment,{children:i(s)},t)}return"divider"==e.type?(0,n.jsx)(p.A.Divider,{},t):"text"==e.type?(0,n.jsx)(p.A.ItemText,{className:"p-3 text-dark-50 font-size-sm d-inline-block",style:{maxWidth:"200px"},children:e.text},t):null})})]})}},95965:e=>{e.exports={root:"AiChatQuestionBadge_root__lGlSk",icon:"AiChatQuestionBadge_icon__PNRbJ"}},96210:(e,t,s)=>{"use strict";s.d(t,{T:()=>r});var n=s(26514);s(75834);var a=s(33502),i=s.n(a);function r(e){let{children:t,component:s,handleProps:a,isDragging:r=!1,disableDragging:o=!1,className:l="",...c}=e;return(0,n.jsxs)(s??"div",{className:`${r?i().dragging:""} ${i().listItem} ${l}
9`,...c,children:[!o&&(0,n.jsx)("i",{...a,className:`fas fa-grip-horizontal icon-nm p-3 ${i().listHandle}`}),t]})}},97762:(e,t,s)=>{"use strict";s.d(t,{a:()=>c});var n=s(26514),a=s(75834),i=s(74170),r=s(152),o=s(55285),l=s(60488);class c extends a.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,n.jsxs)(i.A,{show:this.state.show,onHide:this.close,"aria-labelledby":"example-modal-sizes-title",children:[(0,n.jsxs)(n.Fragment,{children:[this.state.blocking&&(0,n.jsx)(r.q3,{}),(0,n.jsx)(i.A.Header,{closeButton:!0,children:(0,n.jsxs)(i.A.Title,{id:"example-modal-sizes-title",children:[this.props.t("layout:FEEDBACK.HEADER"),!(0,o.de)()&&(0,n.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,n.jsx)(i.A.Body,{children:this.state.show&&(0,n.jsx)(l.Y3,{email:this.state.email,onSaved:this.close,onDiscard:this.close})})]})}}},98337:(e,t,s)=>{"use strict";s.d(t,{a:()=>E});var n=s(26514),a=s(75834),i=s(7086),r=s(91114),o=s.n(r),l=s(9610),c=s.n(l),d=s(60058),m=s.n(d),u=s(74170),h=s(23141),p=s(64137),x=s(63390),g=s(54253),f=s(152),b=s(76510),N=s(15269),j=s(36241),v=s(60547),A=s(43803),_=s(75165);class C extends a.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 t=x.p9P,s={portfolioId:this.state.portfolioId,commonActionsIds:e?[e]:m()(this.state.suggestActions,e=>e.commonCorporateActionId)};await i.A.post(`${t}/corporate-actions`,s),this.setState(()=>({suggestActions:e?c()(this.state.suggestActions,t=>t.commonCorporateActionId!=e):[]})),N.uT(this.props.t("WARNING.SPLIT.ADDED_MESSAGE")),this.props.onUpdated&&await this.props.onUpdated()}catch(t){let e=(0,j.g6)(`${this.props.t("WARNING.SPLIT.ADD_ERROR")}: 10`,t);N.f1(e)}this.setState({blocking:!1})},this.ignoreCorporateActions=async()=>{this.setState({blocking:!0});try{let e=x.bHF,t={portfolioId:this.state.portfolioId,commonCorporateActionId:this.state.currentIgnoreAction.commonCorporateActionId,repaymentTicker:this.state.currentIgnoreAction.repaymentTicker};await i.A.post(e,t),this.setState(()=>({suggestActions:c()(this.state.suggestActions,e=>e.commonCorporateActionId!=this.state.currentIgnoreAction.commonCorporateActionId),showIgnoreActionDialog:!1,currentIgnoreAction:null})),N.uT(this.props.t("WARNING.SPLIT.DELETED_MESSAGE"))}catch(t){let e=(0,j.g6)(`${this.props.t("WARNING.SPLIT.DELETE_ERROR")}: 11`,t);N.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[t]=A.dN.filter(t=>t.value==e.type);return e.type==A.vq.Repayment?(0,n.jsxs)("span",{children:[this.props.t(t.label,{ns:"types"})," ",(0,n.jsxs)("span",{className:"",children:[(0,n.jsx)("b",{children:e.description})," (",e.ticker,")"]})," ",this.props.t("FULL_DATE_SHORT_DAY",{ns:"common",date:new Date(e.date)})," ",(0,n.jsxs)("b",{children:[(0,n.jsx)(_.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,n.jsxs)("span",{children:[this.props.t(t.label,{ns:"types"})," ",(0,n.jsx)("span",{className:"font-weight-bold",children:(0,n.jsxs)("b",{children:[e.ticker," â ",e.newTicker]})})," ",this.props.t("FULL_DATE_SHORT_DAY",{ns:"common",date:new Date(e.date)})," ",(0,n.jsxs)("b",{children:[e.amount,":1"]})]}):(0,n.jsxs)("span",{children:[this.props.t(t.label,{ns:"types"})," ",(0,n.jsx)("span",{className:"font-weight-bold",children:(0,n.jsx)("b",{children:e.ticker})})," ",this.props.t("FULL_DATE_SHORT_DAY",{ns:"common",date:new Date(e.date)})," ",(0,n.jsxs)("b",{children:[e.amount,":1"]})]})};let{portfolioId:t}=e;this.state={portfolioId:t??"",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,n.jsxs)(n.Fragment,{children:[this.state.suggestActions&&this.state.suggestActions.length>0&&(0,n.jsx)("div",{className:"card"==this.props.type?"card card-custom gutter-b":"mb-4",children:(0,n.jsxs)("div",{className:"card"==this.props.type?"card-body":"bg-light-warning p-8 rounded-xl flex-grow-1",children:[(0,n.jsx)("div",{className:"font-weight-bolder font-size-h5",children:this.props.t("WARNING.CORP_ACTION.TITLE")}),(0,n.jsx)("div",{className:"text-dark-50 font-size-sm",children:this.props.t("WARNING.CORP_ACTION.MESSAGE")}),(0,n.jsx)("div",{className:"mt-5 mb-5",children:this.state.suggestActions.map((e,t)=>(0,n.jsxs)("div",{className:"d-flex align-items-center mb-2",children:[(0,n.jsx)("span",{className:"svg-icon svg-icon-md svg-icon-warning flex-shrink-0 mr-3",children:(0,n.jsx)(o(),{preProcessor:v.xY,src:(0,g.oK)(this.getActionIcon(e))})}),this.getCorpActionDescription(e),(0,n.jsx)("button",{type:"button",className:"ml-2 bt
11n btn-sm btn-link-warning font-weight-bold",onClick:()=>{this.addCorporateActions(e.commonCorporateActionId)},children:this.props.t("BUTTON.ADD",{ns:"common"})}),(0,n.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"})})]},t))}),(0,n.jsx)("button",{type:"button",onClick:this.addCorporateActions,className:"btn btn-warning font-weight-bold",children:this.props.t("WARNING.SPLIT.ADD_ALL")})]})}),(0,n.jsxs)(u.A,{show:this.state.showIgnoreActionDialog,onHide:this.closeIgnoreActionDialog,children:[this.state.blocking&&(0,n.jsx)(f.q3,{}),(0,n.jsx)(u.A.Header,{closeButton:!0,children:(0,n.jsx)(u.A.Title,{id:"example-modal-sizes-title-lg",children:this.props.t("WARNING.CORP_ACTION.DELETE.TITLE")})}),(0,n.jsxs)(b.A,{tag:"div",blocking:this.state.blocking,keepInView:!0,children:[(0,n.jsxs)(u.A.Body,{children:[!this.state.blocking&&this.state.currentIgnoreAction&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:(0,n.jsx)(h.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,n.jsx)("div",{className:"alert alert-custom alert-light-warning fade show mb-5",role:"alert",children:(0,n.jsx)("div",{className:"alert-text",children:(0,n.jsx)(h.x,{i18nKey:"analytics:WARNING.SPLIT.DELETE.ALERT"})})})]}),this.state.blocking&&(0,n.jsx)("span",{children:this.props.t("WARNING.SPLIT.DELETE.WAIT")})]}),(0,n.jsxs)(u.A.Footer,{children:[(0,n.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,n.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)},98588:(e,t,s)=>{"use strict";var n=a(s(82358));function a(e){return e&&e.__esModule?e:{default:e}}t.A=(0,a(s(57880)).default)(n.default)},99476:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},a=r(s(40410)),i=r(s(29372));function r(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function, not "+typeof e);function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");var s=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return s.getNewestState=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=void 0,a=void 0,i=void 0,r=void 0,o=void 0,l={};return s.sortContext&&(t=s.sortContext.state.sortOrder,a=s.sortContext.state.sortColumn?s.sortContext.state.sortColumn.dataField:null),s.filterContext&&(l=s.filterContext.currFilters),s.paginationContext&&(i=s.paginationContext.currPage,r=s.paginationContext.currSizePerPage),s.searchContext&&(o=s.props.search.searchText),n({sortOrder:t,sortField:a,filters:l,page:i,sizePerPage:r,searchText:o},e,{data:s.props.data})},s.isRemoteSearch=function(){var e=s.props.remote;return!0===e||i.default.isObject(e)&&e.search||s.isRemotePagination()},s.isRemotePagination=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=s.props.remote;return e.result=!0===t||i.default.isObject(t)&&t.pagination,e.result},s.isRemoteFiltering=function(){var e=s.props.remote;return!0===e||i.default.isObject(e)&&e.filter||s.isRemotePagination()},s.isRemoteSort=function(){var e=s.props.remote;return!0===e||i.default.isObject(e)&&e.sort||s.isRemotePagination()},s.isRemoteCellEdit=function(){var e=s.props.remote;return!0===e||i.default.isObject(e)&&e.cellEdit},s.handleRemotePageChange=function(e,t){s.props.onTableChange("pagination",s.getNewestState({page:e,sizePerPage:t}))},s.handleRemoteFilterChange=function(e){var t={filters:e};if(s.isRemotePagination()){var n=s.props.pagination.options||{};t.page=i.default.isDefined(n.pageStartIndex)?n.pageStartIndex:1}s.props.onTableChange("filter",s.getNewestState(t))},s.handleRemoteSortChange=function(e,t){s.props.onTableChange("sort",s.getNewestState({sortField:e,sortOrder:t}))},s.handleRemoteCellChange=function(e,t,n){s.props.onTableChange("cellEdit",s.getNewestState({cellEdit:{rowId:e,dataField:t,newValue:n}}))},s.handleRemoteSearchChange=function(e){s.props.onTableChange("search",s.getNewestState({searchText:e}))},s.remoteEmitter=new a.default,s.remoteEmitter.on("paginationChange",s.handleRemotePageChange),s.remoteEmitter.on("isRemotePagination",s.isRemotePagination),s}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),t}}},e=>{e.O(0,[3803,6456,4638,8245,6725,1394,9754,5386,7973,5888,1757,1879,7346,3464,1291,7370,8129,2698,4219,8887,7321,112,2358,3700,8996,5331,7153,6518,6842,951,636,6593,8792],()=>e(e.s=81656)),_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.