"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4461],{11301:function(e,n,t){t.d(n,{k:function(){return s},m:function(){return a}});var r=t(77808),i=t(52080);let a={[i.n7.Settings]:"settings:overview",[i.n7.SettingsCommunications]:"communications:overview",[i.n7.EmailPreferences]:"emails:preferences_form"},s=(e,n,t)=>r.fn.interaction({interactionData:{analyticsID:e,interactionType:"ButtonClick"},screenViewContext:{nextScreenVariation:void 0,currentScreenVariation:void 0,nextScreenName:void 0,nextScreenViewId:void 0,...n},selectionContext:t,assetClassContext:void 0,contentContext:void 0,portfolioContext:void 0})},6870:function(e,n,t){t.d(n,{C:function(){return d}});var r=t(31549),i=t(50471),a=t(21746),s=t(33864),l=t(88905),o=t(52080),c=t(38842);let d=e=>{let{appearence:n="normal"}=e,{count:t=0}=(0,l.J)();return(0,r.jsxs)(c.p,{href:o.n7.Inbox,isColored:!1,children:["normal"===n&&(0,r.jsx)(s.Ct,{className:"select-none cursor-pointer",variant:"white",icon:(0,r.jsxs)("div",{className:"relative flex",children:[t>0&&(0,r.jsx)("div",{className:"absolute size-2 bg-red3 rounded-full -right-0.5 top-0.5 animate-fade","data-testid":"notification-badge-dot"}),(0,r.jsx)(a.G,{icon:i.wK3})]}),children:String(t)}),"minimal"===n&&t>0&&(0,r.jsx)(s.Ct,{className:"py-1",variant:"white",children:String(t)})]})}},66421:function(e,n,t){t.d(n,{a:function(){return a}});var r=t(31549),i=t(33864);let a=e=>{let{rows:n}=e,t=Array.from(Array(n).keys());return(0,r.jsx)(i.aV,{gap:"gap-4",children:t.map(e=>(0,r.jsx)("div",{className:"rounded-lg h-12 bg-neutral5 animate-blink opacity-0",style:{animationDelay:"".concat(.1*e,"s")}},e))})}},43542:function(e,n,t){t.d(n,{R:function(){return d}});var r=t(31549),i=t(20691),a=t(44194),s=t(33864),l=t(9382),o=t(12375),c=t(52080);let d=e=>{let{isStyled:n,className:t,children:d}=e,u=(0,i.useRouter)(),{mutate:h,isSuccess:x}=(0,o._)();return(0,a.useEffect)(()=>{x&&(window.location.href=c.n7.Login)},[x,u]),(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)(s.zx,{className:t,onClick:()=>h(),children:d}),!n&&(0,r.jsx)(s.P3,{className:(0,l.A)("text-left",t),onClick:()=>h(),children:d})]})}},35238:function(e,n,t){t.d(n,{X:function(){return h}});var r=t(31549),i=t(46511),a=t(20691),s=t(49925),l=t(33864),o=t(15342),c=t(52080),d=t(38842),u=t(13918);let h=e=>{let{$t:n}=(0,o.$)(),t=(0,a.useRouter)(),{title:h=n("not-found.title"),subtitle:x=n("error.something-is-wrong"),buttonText:p=n(t.asPath===c.n7.Dashboard?"common.retry":"common.back-to-dashboard")}=e,m=(0,s.cI)({defaultValues:{comments:""}});return(0,r.jsx)(l.kC,{className:"client-error h-full",justifyContent:"justify-center",...e,children:(0,r.jsx)("form",{className:"flex items-center",onSubmit:m.handleSubmit(e=>{(0,i.mv)(e),m.resetField("comments")}),children:(0,r.jsxs)(l.aV,{className:"flex-1 text-center",gap:"gap-6",children:[(0,r.jsx)(l.H3,{color:"text-stashawayNavy",children:h}),(0,r.jsx)(l.P,{children:x}),(0,r.jsx)(u.o,{control:m.control,name:"comments",rules:{required:!0}}),(0,r.jsxs)(l.kC,{justifyContent:"justify-center",children:[t.asPath===c.n7.Dashboard?(0,r.jsx)(l.zx,{onClick:()=>t.reload(),children:p}):(0,r.jsx)(d.p,{isUnderline:!0,href:c.n7.Dashboard,children:(0,r.jsx)(l.zx,{children:p})}),(0,r.jsx)(l.zx,{type:"submit",variant:"secondary",children:n("feedback.button")})]})]})})})}},13279:function(e,n,t){t.d(n,{B:function(){return c}});var r=t(31549),i=t(74330),a=t.n(i),s=t(33864),l=t(52080),o=t(38842);let c=e=>{let{trackingSource:n,otherParams:t}=e,i=(0,l.mn)({deeplinkPath:"/ios-app",trackingSource:n,otherParams:t}),c=(0,l.mn)({deeplinkPath:"/android-app",trackingSource:n,otherParams:t}),d=(0,l.mn)({deeplinkPath:"/android-app-huawei",trackingSource:n,otherParams:t});return(0,r.jsxs)(s.kC,{className:"sm:gap-4 flex-wrap",gap:"gap-2",justifyContent:"justify-center",children:[(0,r.jsx)(o.p,{href:i,children:(0,r.jsx)(a(),{unoptimized:!0,alt:"download with app store",height:48,src:"/images/app-store.svg",width:145})}),(0,r.jsx)(o.p,{href:c,children:(0,r.jsx)(a(),{unoptimized:!0,alt:"download with google play",height:48,src:"/images/google-play.svg",width:164})}),(0,r.jsx)(o.p,{href:d,children:(0,r.jsx)(a(),{unoptimized:!0,alt:"download with app gallery",height:48,src:"/images/app-gallary.svg",width:161})})]})}},80978:function(e,n,t){t.d(n,{k:function(){return d}});var r=t(31549),i=t(63773),a=t(33864),s=t(15342),l=t(52080),o=t(13279),c=t(38842);let d=e=>{let{otherParams:n,deeplinkPath:t="/app",glyph:d,title:u,description:h}=e,{$t:x}=(0,s.$)(),p=(0,l.mn)({trackingSource:"webapp_app_link",deeplinkPath:t,otherParams:n}),m=(0,l.mn)({trackingSource:"webapp_qr_link",deeplinkPath:t,otherParams:n});return(0,r.jsxs)(a.aV,{alignItems:"items-center",className:"text-center",gap:"gap-6",children:[d||(0,r.jsx)(a.v9,{className:"sm:hidden translate-x-2"}),(0,r.jsxs)(a.aV,{children:[(0,r.jsx)(a.H4,{children:u||x("continue-in-app.title")}),(0,r.jsx)(a.P,{children:h||x("continue-in-app.description")})]}),(0,r.jsx)("div",{className:"hidden sm:flex",children:(0,r.jsx)(o.B,{otherParams:n,trackingSource:"webapp_app_link"})}),(0,r.jsxs)(a.aV,{className:"hidden sm:flex",children:[(0,r.jsx)(a.P,{children:x("continue-in-app.scan-qr-code")}),(0,r.jsx)(i.ZP,{size:180,value:m})]}),(0,r.jsx)(c.p,{className:"w-full sm:hidden",href:p,isUnderline:!1,children:(0,r.jsx)(a.zx,{isFullWidth:!0,children:x("continue-in-app.title")})})]})}},55689:function(e,n,t){t.d(n,{y:function(){return u}});var r=t(31549),i=t(20691),a=t(44194),s=t(33864),l=t(70810),o=t(11301),c=t(15342),d=t(80978);let u=e=>{let{children:n,otherParams:t,deeplinkPath:u="/app",defaultIsOpen:h,dialogRef:x,title:p,description:m,glyph:f,onClose:v}=e,j=(0,a.useRef)(null),g=(0,i.useRouter)(),{$t:N}=(0,c.$)();return(0,r.jsx)(s.Vq,{defaultIsOpen:h,ref:x||j,size:"max-w-screen-sm",trigger:n,onClose:v,children:(0,r.jsxs)(s.aV,{alignItems:"items-center",className:"text-center",gap:"gap-6",children:[(0,r.jsx)(d.k,{deeplinkPath:u,description:m,glyph:f,otherParams:t,title:p}),(0,r.jsx)(s.P3,{isUnderline:!0,textColor:"text-teal2",onClick:()=>{var e,n;(0,o.k)("continue_in_app:close_clicked",{currentScreenName:g.pathname,currentScreenViewId:(0,l.Z)(),nextScreenName:u,nextScreenViewId:(0,l.Z)()}),null==x||null===(e=x.current)||void 0===e||e.close(),null==j||null===(n=j.current)||void 0===n||n.close()},children:N("common.close")})]})})}},48535:function(e,n,t){t.d(n,{O:function(){return l}});var r=t(31549),i=t(20691),a=t(9382),s=t(38842);let l=e=>{let{href:n,children:t,isColored:l,textColor:o,hoverColor:c,className:d,matchingChildRoutes:u,...h}=e,x=(0,i.useRouter)(),p=x.asPath===n||(null==u?void 0:u.some(e=>e.test(x.asPath)));return(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)(s.p,{color:o||(p?"text-teal2":"text-white"),hoverColor:c,href:n,isColored:p||l,isUnderline:!1,className:(0,a.A)(d,p&&"[&_path]:fill-teal2"),...h,children:t}),!n&&(0,r.jsx)("span",{className:"text-white",children:t})]})}},38842:function(e,n,t){t.d(n,{p:function(){return c}});var r=t(31549),i=t(50786),a=t.n(i),s=t(44194),l=t(33864),o=t(9382);let c=e=>{let{children:n,href:t,isPreventDefault:i=!1,isStopPropagation:c=!1,isDisabled:d=!1,isColored:u=!0,isUnderline:h=!0,isFocusable:x=!0,shallow:p=!1,className:m,color:f="text-teal2",hoverColor:v="text-teal2",...j}=e,g=t.toString(),N=(0,s.useCallback)(e=>{if(e.metaKey||e.ctrlKey||e.shiftKey){e.preventDefault(),window.open(g,"_blank");return}c&&e.stopPropagation(),i&&e.preventDefault()},[i,c,g]);return(0,r.jsxs)(r.Fragment,{children:[!d&&(0,r.jsx)(a(),{"data-testid":"next-link",href:t,locale:!1,rel:"noopener noreferrer",shallow:p,className:(0,o.A)("transition-all",!x&&"focus-visible:outline-none",h&&"underline",u&&("text-teal2"===v?"hover:text-teal2":"text-reserveGold1"===v?"hover:text-reserveGold1":void 0),u&&f,m),onClick:N,...j,children:(0,r.jsx)(l.$Z,{children:n})}),d&&(0,r.jsx)("div",{className:m,children:(0,r.jsx)(l.$Z,{children:n})})]})}},13918:function(e,n,t){t.d(n,{o:function(){return s}});var r=t(31549),i=t(49925),a=t(33864);function s(e){var n;let{control:t,name:s,shouldUnregister:l,rules:o,defaultValue:c,...d}=e,{field:u,fieldState:h}=(0,i.bc)({control:t,name:s,shouldUnregister:l,rules:o,defaultValue:c});return(0,r.jsx)(a.gJ,{...d,color:h.error?"danger":void 0,message:null===(n=h.error)||void 0===n?void 0:n.message,...u})}},94461:function(e,n,t){t.d(n,{t:function(){return O}});var r=t(31549),i=t(33864),a=t(9382),s=t(66421),l=t(85682),o=t(22302),c=t(35238);let d=e=>{let{children:n,onError:t,...i}=e;return(0,r.jsx)(o.SV,{fallback:(0,r.jsx)(c.X,{}),onError:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];null==t||t(...n)},...i,children:n})};var u=t(62063),h=t(52080),x=t(38842),p=t(39222);let m=e=>{let{showReserveTheme:n=!1}=e,{websiteUrl:t}=(0,u.W)(),a=n?"text-reserveGold1":"text-teal2";return(0,r.jsx)("footer",{className:"py-10 text-neutral7 print:hidden",children:(0,r.jsxs)(i.aV,{className:"capitalize",gap:"gap-2",children:[(0,r.jsx)(i.kC,{className:"text-center px-4 md:px-0 ",justifyContent:"justify-center",children:(0,r.jsx)(p.T,{id:"footer.copyright",values:{year:new Date().getFullYear()}})}),(0,r.jsxs)(i.kC,{className:"flex-wrap",justifyContent:"justify-center",children:[(0,r.jsx)(x.p,{className:"whitespace-nowrap",color:a,hoverColor:a,href:t+h.cp.PrivacyPolicy,children:(0,r.jsx)(p.T,{id:"common.privacy-policy"})}),"|",(0,r.jsx)(x.p,{className:"whitespace-nowrap",color:a,hoverColor:a,href:t+h.cp.PlatformAgreement,children:(0,r.jsx)(p.T,{id:"common.platform-agreement"})}),"|",(0,r.jsx)(x.p,{className:"whitespace-nowrap",color:a,hoverColor:a,href:h.n7.Support,children:(0,r.jsx)(p.T,{id:"common.support"})})]})]})})};var f=t(29332),v=t(41556),j=t(42377),g=t(46244),N=t(65277),E=t(6870),w=t(43542),y=t(55689),C=t(48535);let R=()=>(0,r.jsx)(x.p,{href:h.n7.Dashboard,children:(0,r.jsx)(i.TR,{fill:"fill-white"})}),S=e=>{let{showInbox:n,extraSlot:t}=e,{CAN:a}=(0,v.g)(),{portfolios:s,cashPortfolios:l}=(0,j.l)(),{shouldShowReserve:o}=(0,N.h)(),{isPevcCustomer:c}=(0,g._)();return(0,r.jsx)("nav",{className:"min-h-screen bg-stashawayNavy px-8 py-12 overflow-auto size-full lg:w-64 xl:w-80 2xl:w-96",children:(0,r.jsxs)(i.aV,{gap:"gap-10",children:[(0,r.jsxs)(i.kC,{justifyContent:"justify-between",children:[(0,r.jsx)(R,{}),t]}),(0,r.jsxs)(i.aV,{gap:"gap-4",children:[(0,r.jsx)(C.O,{className:"[&_path]:hover:fill-teal2 [&_path]:transition-all",href:h.n7.Dashboard,children:(0,r.jsx)(i.EP,{glyph:(0,r.jsx)(i.Y3,{}),children:(0,r.jsx)(p.T,{id:"common.home"})})}),(0,r.jsx)(C.O,{className:"[&_path]:hover:fill-teal2 [&_path]:transition-all",href:h.n7.Performance,children:(0,r.jsx)(i.EP,{glyph:(0,r.jsx)(i.HD,{}),children:(0,r.jsx)(p.T,{id:"dashboard.tab.performance"})})})]}),(0,r.jsxs)(i.aV,{gap:"gap-4",children:[(0,r.jsx)("div",{className:"text-white uppercase text-xs opacity-75 mb-2",children:(0,r.jsx)(p.T,{id:"common.my-investment"})}),null==s?void 0:s.map(e=>{let n=(0,h.Wj)(h.n7.Goal,{id:e.id});return(0,r.jsx)(C.O,{href:n,matchingChildRoutes:[RegExp("^".concat(n),"i")],children:e.displayName},e.id)}),null==l?void 0:l.map(e=>{let n=(0,h.Wj)(h.n7.SimpleGoal,{id:e.id});return(0,r.jsx)(C.O,{href:n,matchingChildRoutes:[RegExp("^".concat(n),"i")],children:e.displayName},e.id)}),(0,r.jsx)(y.y,{deeplinkPath:h.U3.GoalsSelect,children:(0,r.jsxs)(C.O,{children:["+ ",(0,r.jsx)(p.T,{id:"common.create-portfolio"})]})})]}),(0,r.jsxs)(i.aV,{gap:"gap-4",children:[(0,r.jsx)("div",{className:"text-white uppercase text-xs opacity-75 mb-2",children:(0,r.jsx)(p.T,{id:"navigation-bar.money-movements"})}),a.DEPOSIT&&(0,r.jsx)(C.O,{href:h.n7.Deposits,matchingChildRoutes:[new RegExp("^".concat(h.n7.ManageDeposits))],children:(0,r.jsx)(p.T,{id:"common.manage-deposits"})}),(0,r.jsx)(C.O,{href:h.n7.Transfers,isUnderline:!1,matchingChildRoutes:[new RegExp("^".concat(h.n7.WithdrawalsTransfer)),new RegExp("^".concat(h.n7.TransfersRecurring))],children:(0,r.jsx)(p.T,{id:"common.transfer-funds"})}),(0,r.jsx)(C.O,{href:h.n7.Withdrawals,isUnderline:!1,matchingChildRoutes:[new RegExp("^".concat(h.n7.WithdrawalsGoals))],children:(0,r.jsx)(p.T,{id:"common.withdraw-funds"})})]}),(0,r.jsxs)(i.aV,{gap:"gap-4",children:[(0,r.jsx)("div",{className:"text-white uppercase text-xs opacity-75 mb-2",children:(0,r.jsx)(p.T,{id:"navigation-bar.account"})}),n&&(0,r.jsxs)(i.kC,{children:[(0,r.jsx)(C.O,{href:h.n7.Inbox,matchingChildRoutes:[new RegExp("^".concat(h.n7.Inbox))],children:(0,r.jsx)(p.T,{id:"inbox.header"})}),(0,r.jsx)(E.C,{appearence:"minimal"})]}),(0,r.jsx)(C.O,{href:h.n7.Statements,children:(0,r.jsx)(p.T,{id:"common.statements"})}),(0,r.jsx)(C.O,{href:h.n7.Transactions,matchingChildRoutes:[new RegExp("^".concat(h.n7.Transactions))],children:(0,r.jsx)(p.T,{id:"dashboard.tab.transactions"})}),(0,r.jsx)(C.O,{href:h.n7.Settings,matchingChildRoutes:[new RegExp("^".concat(h.n7.Settings))],children:(0,r.jsx)(p.T,{id:"common.settings"})}),(0,r.jsx)(w.R,{className:"w-full text-white hover:text-teal2",children:(0,r.jsx)(p.T,{id:"common.logout"})})]}),o&&c&&(0,r.jsxs)(i.aV,{gap:"gap-4",children:[(0,r.jsx)("div",{className:"text-white uppercase text-xs opacity-75 mb-2",children:"StashAway Reserve"}),(0,r.jsx)(C.O,{href:h.n7.ReservePevcOverview,children:(0,r.jsx)(p.T,{id:"pevc.homepage.reserve_portfolios.pevc"})})]}),(0,r.jsxs)(i.aV,{gap:"gap-4",children:[(0,r.jsx)("div",{className:"text-white uppercase text-xs opacity-75 mb-2",children:(0,r.jsx)(p.T,{id:"navigation-bar.more"})}),a.REFER&&(0,r.jsx)(C.O,{href:h.n7.Referral,children:(0,r.jsx)(p.T,{id:"common.refer-a-friend"})}),(0,r.jsx)(C.O,{href:h.n7.Support,children:(0,r.jsx)(p.T,{id:"common.support"})})]})]})})},b=e=>{let{headline:n,subHeadline:t,linkPath:a,linkText:s,shallow:l,cta:o}=e,c=a&&s&&(0,r.jsx)(x.p,{className:"absolute left-0 top-1/2 -translate-y-1/2 lg:relative lg:left-0 lg:top-0",color:"text-teal2",href:a,isUnderline:!1,shallow:l,children:(0,r.jsxs)(i.kC,{children:[(0,r.jsx)(i.Y4,{}),(0,r.jsx)(i.H5,{className:"hidden lg:block",color:"text-teal2",children:s})]})});return(0,r.jsx)("header",{className:"pb-12 hidden lg:block",children:(0,r.jsxs)(i.kC,{children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsxs)("div",{className:"hidden lg:inline-block",children:[c,(0,r.jsx)(i.H3,{className:"min-h-[3.375rem] leading-normal",color:"text-stashawayNavy",children:n})]}),t&&(0,r.jsx)(i.P,{color:"text-white",children:t})]}),o]})})};var T=t(50471),_=t(21746),I=t(44194);let k=()=>{let e=(0,I.useRef)(null),n=(0,I.useCallback)(()=>{var n;null===(n=e.current)||void 0===n||n.close()},[]);return(0,r.jsx)("div",{className:"burger absolute right-0 top-1/2 -translate-y-1/2 lg:hidden",children:(0,r.jsx)(i.Vq,{appearance:"slide-out",backdropColor:"bg-black/75",padding:"p-0",ref:e,size:"max-w-[80vw]",trigger:(0,r.jsx)(_.G,{className:"text-white",icon:T.xiG}),children:(0,r.jsx)(S,{showInbox:!0,extraSlot:(0,r.jsx)(_.G,{className:"text-4xl text-white",icon:T.NBC,onClick:n})})})})},A=e=>{let{headline:n,linkPath:t,linkText:a,shallow:s}=e,l=t&&a&&(0,r.jsx)(x.p,{className:"absolute left-0 top-1/2 -translate-y-1/2 lg:relative lg:left-0 lg:top-0 print:hidden",color:"text-teal2",href:t,isUnderline:!1,shallow:s,children:(0,r.jsxs)(i.kC,{children:[(0,r.jsx)(i.Y4,{}),(0,r.jsx)(i.H5,{className:"hidden lg:block",color:"text-teal2",children:a})]})});return(0,r.jsx)("header",{className:"lg:hidden bg-stashawayNavy p-4 sticky inset-x-0 top-0 z-10",children:(0,r.jsx)(i.kC,{children:(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsxs)("div",{className:"lg:hidden relative",children:[l,(0,r.jsx)(i.H5,{className:"px-12 text-center leading-normal lg:hidden",color:"text-white",children:n}),(0,r.jsx)(k,{})]})})})})},O=e=>{let{children:n,headline:t,linkPath:o,linkText:c,shallow:u,cta:h,subHeadline:x,isLoading:p,className:v,backgroundColor:j,showReserveTheme:g}=e,{isActivated:N}=(0,l.E)();return(0,r.jsxs)(r.Fragment,{children:[!N&&(0,r.jsx)(f.V,{}),(0,r.jsx)(i.or,{backgroundColor:j,padding:"py-0",children:(0,r.jsxs)(i.kC,{alignItems:"items-stretch",className:"h-screen sticky",gap:"gap-0",children:[(0,r.jsx)("div",{className:"h-full flex-none hidden lg:block print:hidden",children:(0,r.jsx)(S,{})}),(0,r.jsxs)("div",{className:(0,a.A)("flex-1 overflow-y-auto scroll-smooth print:overflow-visible"),children:[(0,r.jsx)(A,{headline:t,linkPath:o,linkText:c,shallow:u,subHeadline:x}),(0,r.jsx)("div",{className:(0,a.A)("relative",v),children:(0,r.jsxs)(i.W2,{className:"py-8 sticky flex flex-col h-screen",children:[(0,r.jsx)(b,{cta:h,headline:t,linkPath:o,linkText:c,shallow:u,subHeadline:x}),(0,r.jsxs)(i.aV,{className:"grow",gap:"gap-6",children:[(0,r.jsx)("div",{className:"grow",children:(0,r.jsxs)(d,{children:[p&&(0,r.jsx)(s.a,{rows:15}),!p&&n]})}),(0,r.jsx)(m,{showReserveTheme:g})]})]})})]})]})})]})}},29332:function(e,n,t){t.d(n,{V:function(){return h}});var r=t(31549),i=t(44194),a=t(33864),s=t(17667);let l=async()=>{let e=await (0,s.as)();return(await e.post("/v1/auth/activation/reset",{})).data};var o=t(18006);let c=()=>(0,o.Q)(l);var d=t(85682),u=t(39222);let h=()=>{let{email:e}=(0,d.E)(),{mutate:n,isSuccess:t}=c(),s=(0,i.useCallback)(()=>{n()},[n]);return(0,r.jsxs)("div",{className:"bg-green1 p-4 text-center text-white print:hidden",children:[(0,r.jsx)(u.T,{id:"confirm-email.description",values:{email:e}})," ",!t&&(0,r.jsx)(a.P3,{isUnderline:!0,onClick:s,children:(0,r.jsx)(u.T,{id:"confirm-email.resend-email"})}),t&&(0,r.jsx)(u.T,{id:"confirm-email.email-sent"})]})}},78634:function(e,n,t){t.d(n,{g:function(){return o}});var r=t(85682),i=t(37513),a=t(701);let s=async e=>{let{baseURL:n,userId:t}=e,{data:r}=await a.default.get("/api/features",{baseURL:n,params:{userId:t}});return r},l=e=>{let{userId:n,baseURL:t}=e;return{queryKey:["featureFlags",n||""],queryFn:()=>s({userId:n,baseURL:t})}},o=()=>{let{userId:e}=(0,r.E)(),n=(0,i.B)({...l({userId:e}),keepPreviousData:!0});return{...n,...n.data}}},12375:function(e,n,t){t.d(n,{_:function(){return a}});var r=t(37990),i=t(18006);let a=()=>(0,i.Q)(()=>(0,r.signOut)())},42377:function(e,n,t){t.d(n,{l:function(){return u}});var r=t(62063),i=t(31791),a=t(7488),s=t(41630),l=t(79655);function o(){let e=(0,i._)(["\n      query ($displayCurrency: String!) {\n        goals {\n          _id\n          reviewed\n          currency\n          goalType\n          displayName\n          startDate\n          fundingSource\n          strategyId\n          portfolioPerformance(displayCurrency: $displayCurrency) {\n            currentNav\n            netReturns\n            currency\n          }\n          strategy {\n            valueAtRisk\n          }\n        }\n      }\n    "]);return o=function(){return e},e}let c=async e=>{let n=await (0,l.K)("/goals"),t=(await n.request((0,a.Ps)(o()),{displayCurrency:e})).goals.sortAscendBy("fundingSource").map(e=>{let{_id:n,goalType:t,fundingSource:r,displayName:i,portfolioPerformance:a,strategy:s,strategyId:l,reviewed:o}=e,{currentNav:c,netReturns:d}=a,u=e.currency||a.currency;return{id:n,currentValue:c,riskIndex:s.valueAtRisk,currency:u,goalType:t,fundingSource:r,displayName:i,strategyId:l,netReturns:d,isReviewed:!!o}}),r=t.filter(e=>{let{goalType:n}=e;return(0,s.ZA)(n)}),i=t.filter(e=>{let{goalType:n}=e;return!(0,s.ZA)(n)}),c=null==t?void 0:t.some(e=>!e.isReviewed),d=null==t?void 0:t.some(e=>"SRS"===e.fundingSource||"IFAST_SRS"===e.fundingSource);return{hasMoreThanOnePortfolio:((null==t?void 0:t.length)||0)>1,hasUnreviewedPortfolio:c,hasSRSFundingSource:d,allPortfolios:t,cashPortfolios:r,portfolios:i}};var d=t(37513);let u=e=>{let{regionCurrency:n}=(0,r.W)(),t=e||n,i=(0,d.B)({queryKey:["goals",t],queryFn:()=>c(t),enabled:!!t,keepPreviousData:!0});return{...i,...i.data}}},88905:function(e,n,t){t.d(n,{J:function(){return s}});var r=t(17667);let i=async()=>{let e=await (0,r.as)({prefix:""}),{data:n}=await e.get("/notifications/inbox/notifications/count",{params:{status:"unread"}});return n};var a=t(37513);let s=()=>{var e;let n=(0,a.B)({queryKey:["unreadNotification"],queryFn:i});return{...n,count:null===(e=n.data)||void 0===e?void 0:e.count}}},46244:function(e,n,t){t.d(n,{_:function(){return s}});var r=t(17667);let i=async()=>{let e=await (0,r.as)({prefix:"/pevc/api"}),{data:n}=await e.get("/v1/customer");return n};var a=t(37513);let s=()=>{let e=(0,a.B)({queryKey:["pevc","customer"],queryFn:i}),n=e.isSuccess&&void 0!==e.data.id;return{...e,isPevcCustomer:n}}},65277:function(e,n,t){t.d(n,{h:function(){return x}});var r=t(85682),i=t(78634),a=t(41556),s=t(31791),l=t(10230),o=t(79655);function c(){let e=(0,s._)(["\n      query ReserveMembership($userId: String!) {\n        customer(appServerUserId: $userId) {\n          id\n          status {\n            id\n            type\n          }\n          wealthAdvisor {\n            id\n            firstName\n            lastName\n            bio\n            email\n            phoneNumber\n            pictureUrl\n            whatsappUrl\n            contactUrlPath\n          }\n        }\n      }\n    "]);return c=function(){return e},e}let d=async e=>{let{userId:n}=e,t=await (0,o.K)("/reserve-membership/graphql/ReserveMembership",!1);return await t.request((0,l.Ps)(c()),{userId:n})};var u=t(68277),h=t(37513);let x=()=>{var e,n,t,s;let{ENABLE_RESERVE:l}=(0,i.g)(),{HAS:o}=(0,a.g)(),{userId:c}=(0,r.E)(),x=(0,h.B)({queryKey:["reserveMembership"],queryFn:()=>{if(c)return d({userId:c})},enabled:o.RESERVE&&l&&void 0!==c}),p=null===(n=x.data)||void 0===n?void 0:null===(e=n.customer)||void 0===e?void 0:e.wealthAdvisor,m=!!(null==p?void 0:p.id),f=null===(s=x.data)||void 0===s?void 0:null===(t=s.customer)||void 0===t?void 0:t.status.type,v=o.RESERVE&&l&&m&&!!f&&[u.i.Active,u.i.Grace,u.i.LeadAi,u.i.Expired].includes(f);return{...x,...x.data,statusType:f,shouldShowReserve:v,wealthAdvisor:p}}},68277:function(e,n,t){var r,i;t.d(n,{i:function(){return r}}),(i=r||(r={})).Active="ACTIVE",i.Ineligible="INELIGIBLE",i.Grace="GRACE",i.LeadAi="LEAD_AI",i.LeadNonAi="LEAD_NON_AI",i.OptOut="OPT_OUT",i.Expired="EXPIRED"},79655:function(e,n,t){t.d(n,{K:function(){return o}});var r=t(10230),i=t(37990),a=t(73130),s=t(95442),l=t(5025);let o=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{API_URL:t}=(0,s.h)(),o=(0,a.$o)("locale"),c=await (0,i.getSession)(),{token:d}=(null==c?void 0:c.user)||{},u=new r.g6(n?t+"/graphql"+e:t+e,{headers:{"x-client-identifier":"webapp@4.4.0","accept-language":o||"",authorization:d?"Bearer ".concat(d):""}});return{...u,request:async function(e){for(var n,t,r,i,a,s,o=arguments.length,c=Array(o>1?o-1:0),d=1;d<o;d++)c[d-1]=arguments[d];try{return await u.request(e,...c)}catch(o){let e=null==o?void 0:null===(t=o.response)||void 0===t?void 0:null===(n=t.errors)||void 0===n?void 0:n[0];if(null==e?void 0:null===(i=e.extensions)||void 0===i?void 0:null===(r=i.exception)||void 0===r?void 0:r.status)throw(0,l.R)({status:null==e?void 0:null===(a=e.extensions)||void 0===a?void 0:a.exception.status,data:{message:(null==e?void 0:null===(s=e.extensions)||void 0===s?void 0:s.exception.name)||(null==e?void 0:e.message)}})||o;throw(0,l.R)(o)||o}}}}},41630:function(e,n,t){t.d(n,{$E:function(){return d},Fg:function(){return o},ID:function(){return x},TF:function(){return a},Tm:function(){return u},Ul:function(){return i},Xj:function(){return p},ZA:function(){return c},g4:function(){return h},pD:function(){return l}});let r=["THEME_HEALTHCARE","THEME_TECH","THEME_CONSUMER","THEME_ENVIRONMENT"],i=["GENERAL_INVESTING","BLACKROCK","CPFISOA","SINGAPORE_INVESTING","GLOBAL_INCOME_INVESTING","MMF","SIMPLEPLUS","SIMPLE_GUARANTEED","ESG","CUSTOM",...r,"RETIREMENT","BUY_A_HOME","CHILD_EDUCATION","VEHICLE","EMERGENCY_FUND","START_BUSINESS","WEDDING","TRAVEL"],a=["CORE_1","CORE_4","CORE_8","CORE_12","CORE_16","CORE_20","CORE_24","CORE_28","CORE_32","HIGHER_RISK_40","HIGHER_RISK_48","HIGHER_RISK_60"],s=["MMF","SIMPLEPLUS","SIMPLE_GUARANTEED","SINGAPORE_INVESTING","GLOBAL_INCOME_INVESTING"],l=e=>e&&s.includes(e),o=e=>"IFAST_SRS"===e||"SRS"===e,c=e=>"MMF"===e||"SIMPLEPLUS"===e||"SIMPLE_GUARANTEED"===e,d=e=>"RETIREMENT"===e||"BUY_A_HOME"===e||"CHILD_EDUCATION"===e||"VEHICLE"===e||"EMERGENCY_FUND"===e||"START_BUSINESS"===e||"WEDDING"===e||"TRAVEL"===e,u=e=>r.includes(e),h=e=>"SINGAPORE_INVESTING"===e,x=e=>"GLOBAL_INCOME_INVESTING"===e,p=e=>"CUSTOM"===e}}]);