@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.mega2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
  3. package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
  4. package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
  5. package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
  6. package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
  7. package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
  8. package/dist/Accounts-Bzy1_REQ.mjs +9 -0
  9. package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
  10. package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
  11. package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
  12. package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
  13. package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
  14. package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
  15. package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
  16. package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
  17. package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
  18. package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
  19. package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
  20. package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
  21. package/dist/Drawer-By9V-B5L.mjs +178 -0
  22. package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
  23. package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
  24. package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
  25. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  26. package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
  27. package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
  28. package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
  29. package/dist/LineChart-BF4QA-Lx.mjs +580 -0
  30. package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
  31. package/dist/Loader-DUaFpDGv.mjs +24 -0
  32. package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
  33. package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
  34. package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
  35. package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
  36. package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
  37. package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
  38. package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
  39. package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
  40. package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
  41. package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
  42. package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
  43. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  44. package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
  45. package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
  46. package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
  47. package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
  48. package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
  49. package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
  50. package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
  51. package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
  52. package/dist/TrendsStore-yO7qYv97.mjs +186 -0
  53. package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
  54. package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
  55. package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
  56. package/dist/accounts/index.es.js +200 -197
  57. package/dist/accounts/stores/AccountStore.d.ts +22 -25
  58. package/dist/accounts/utils/Accounts.d.ts +1 -2
  59. package/dist/analytics/index.es.js +27 -27
  60. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  61. package/dist/budgets/index.es.js +703 -669
  62. package/dist/budgets/store/BudgetsStore.d.ts +0 -1
  63. package/dist/cashflow/index.es.js +420 -404
  64. package/dist/categories/index.es.js +2 -2
  65. package/dist/categories/stores/CategoryStore.d.ts +3 -6
  66. package/dist/categories/util/CategoryUtil.d.ts +2 -3
  67. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  68. package/dist/common/components/Loader.d.ts +2 -1
  69. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  70. package/dist/common/components/barchart/Bar.d.ts +25 -0
  71. package/dist/common/components/barchart/BarChart.d.ts +34 -0
  72. package/dist/common/components/barchart/BarColumn.d.ts +37 -0
  73. package/dist/common/components/barchart/Legend.d.ts +8 -0
  74. package/dist/common/components/barchart/Util.d.ts +42 -0
  75. package/dist/common/components/barchart/index.d.ts +1 -0
  76. package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
  77. package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
  78. package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
  79. package/dist/common/components/index.d.ts +1 -0
  80. package/dist/common/hooks/index.d.ts +2 -0
  81. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  82. package/dist/common/hooks/usePrevious.d.ts +2 -0
  83. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  84. package/dist/common/index.es.js +712 -436
  85. package/dist/common/stores/AppDataStore.d.ts +1 -3
  86. package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
  87. package/dist/common/stores/GlobalStore.d.ts +3 -3
  88. package/dist/common/stores/GlobalUiStore.d.ts +2 -3
  89. package/dist/common/stores/UserStore.d.ts +2 -3
  90. package/dist/common/types/Account.d.ts +6 -9
  91. package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
  92. package/dist/common/utils/Theme.d.ts +3 -1
  93. package/dist/dashboard/index.es.js +93 -91
  94. package/dist/debts/components/DebtsChart.d.ts +2 -1
  95. package/dist/debts/index.es.js +529 -527
  96. package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
  97. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
  98. package/dist/finstrong/index.es.js +876 -867
  99. package/dist/goals/index.es.js +526 -525
  100. package/dist/goals/stores/GoalStore.d.ts +4 -17
  101. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  102. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  103. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  104. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  105. package/dist/help/index.es.js +13 -9
  106. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  107. package/dist/investments/index.es.js +534 -531
  108. package/dist/investments/stores/HoldingStore.d.ts +0 -1
  109. package/dist/merchants/index.es.js +8 -8
  110. package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
  111. package/dist/microinsights/index.d.ts +1 -0
  112. package/dist/microinsights/index.es.js +101 -14
  113. package/dist/networth/components/NetWorthChange.d.ts +1 -3
  114. package/dist/networth/index.es.js +284 -285
  115. package/dist/notifications/index.es.js +95 -94
  116. package/dist/notifications/stores/NotificationStore.d.ts +1 -3
  117. package/dist/recurringtransactions/index.es.js +582 -562
  118. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
  119. package/dist/settings/index.es.js +340 -337
  120. package/dist/spending/index.es.js +281 -268
  121. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
  122. package/dist/transactions/index.es.js +253 -255
  123. package/dist/transactions/stores/TransactionStore.d.ts +77 -21
  124. package/dist/transactions/stores/UiStore.d.ts +2 -0
  125. package/dist/trends/components/TrendsTable.d.ts +0 -2
  126. package/dist/trends/index.es.js +838 -793
  127. package/dist/trends/utils/TrendsData.d.ts +1 -0
  128. package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
  129. package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
  130. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  131. package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
  132. package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
  133. package/package.json +57 -52
  134. package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
  135. package/dist/AccountListItem-wgmlex-_.mjs +0 -90
  136. package/dist/Accounts-CRUehOiy.mjs +0 -27
  137. package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
  138. package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
  139. package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
  140. package/dist/Drawer-BF40nbsH.mjs +0 -163
  141. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  142. package/dist/LineChart-C1PxNf7P.mjs +0 -581
  143. package/dist/Loader-Ckqi9Rx6.mjs +0 -21
  144. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
  145. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
  146. package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
  147. package/dist/SearchBox-B7km148n.mjs +0 -39
  148. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  149. package/dist/SpendingData-DPQ96k3x.mjs +0 -55
  150. package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
  151. package/dist/TransactionStore-DbwAutwC.mjs +0 -671
  152. package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
  153. package/dist/common/components/SkeletonLoader.d.ts +0 -7
  154. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
@@ -1,45 +1,47 @@
1
1
  import { jsxs as o, jsx as e, Fragment as ae } from "react/jsx-runtime";
2
2
  import A, { useState as O } from "react";
3
- import { observer as $ } from "mobx-react-lite";
3
+ import { observer as P } from "mobx-react-lite";
4
4
  import _ from "@mui/material/Stack";
5
5
  import Ee from "@mui/material/Tab";
6
- import Ge from "@mui/material/Tabs";
7
- import { C as ge } from "../ConnectionsDrawer-Dsc04-4Z.mjs";
6
+ import Ne from "@mui/material/Tabs";
7
+ import { C as ge } from "../ConnectionsDrawer-VmuVFHbL.mjs";
8
8
  import pe from "@mui/material/useMediaQuery";
9
- import Me from "@mui/material/Box";
10
- import Ne from "@mui/material/Collapse";
11
- import Y from "@mui/material/Divider";
12
- import te from "@mui/material/List";
13
- import ne from "@mui/material/ListItem";
14
- import Ue from "@mui/material/ListItemButton";
9
+ import Ge from "@mui/material/Box";
10
+ import Me from "@mui/material/Collapse";
11
+ import K from "@mui/material/Divider";
12
+ import ee from "@mui/material/List";
13
+ import te from "@mui/material/ListItem";
14
+ import He from "@mui/material/ListItemButton";
15
15
  import xe from "@mui/material/ToggleButton";
16
16
  import ye from "@mui/material/ToggleButtonGroup";
17
- import { Text as i, H1 as fe, P as ve, InstitutionLogo as oe } from "@mxenabled/mxui";
18
- import He from "@mui/material/Button";
19
- import { u as M, g as be, t as U, b as J, d as le, n as je } from "../hooks-C41HAxM5.mjs";
20
- import { A as z, W as ze } from "../WidgetContainer-CDh9fjpR.mjs";
21
- import { a as Oe, f as ie } from "../NumberFormatting-DjTD0t3W.mjs";
22
- import { u as H } from "../useScreenSize-B5afALev.mjs";
23
- import { useTheme as X } from "@mui/material/styles";
24
- import { Icon as B } from "@mxenabled/mx-icons";
25
- import { D as Ve } from "../Donut-Dmy3JTWd.mjs";
17
+ import { Text as r, H1 as fe, P as ve, InstitutionLogo as ne } from "@mxenabled/mxui";
18
+ import Ue from "@mui/material/Button";
19
+ import { u as G, g as be, s as H, b as Q, d as se } from "../hooks-ZMp65DFz.mjs";
20
+ import { A as z, W as je } from "../WidgetContainer-CoFDmQRE.mjs";
21
+ import { a as ze, f as oe } from "../NumberFormatting-DjTD0t3W.mjs";
22
+ import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
23
+ import le from "@mui/material/styles/useTheme";
24
+ import { Icon as k } from "@mxenabled/mx-icons";
25
+ import { D as Oe } from "../Donut-Dmy3JTWd.mjs";
26
+ import { useTheme as Ve } from "@mui/material/styles";
26
27
  import { f as Re, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
27
- import $e from "@mui/material/ListItemText";
28
+ import Pe from "@mui/material/ListItemText";
28
29
  import ce from "@mui/material/IconButton";
29
- import Pe from "@mui/material/Tooltip";
30
+ import Xe from "@mui/material/Tooltip";
30
31
  import _e from "@mui/material/Accordion";
31
32
  import we from "@mui/material/AccordionDetails";
32
33
  import Ce from "@mui/material/AccordionSummary";
33
- import re from "@mui/material/Paper";
34
- import x from "@mui/system/Stack";
35
- import De from "@mui/material/TextField";
36
- import { D as qe } from "../Drawer-BF40nbsH.mjs";
37
- import { DataGridPro as Ke } from "@mui/x-data-grid-pro";
38
- import { Stack as Ye } from "@mui/material";
39
- import { L as Se } from "../Loader-Ckqi9Rx6.mjs";
34
+ import ie from "@mui/material/Paper";
35
+ import p from "@mui/system/Stack";
36
+ import Se from "@mui/material/TextField";
37
+ import { D as $e } from "../Drawer-By9V-B5L.mjs";
38
+ import { DataGridPro as qe } from "@mui/x-data-grid-pro";
39
+ import { Stack as Ke } from "@mui/material";
40
+ import { L as De } from "../Loader-DUaFpDGv.mjs";
41
+ import { u as Ye } from "../useWidgetLoadTimer-hIOioiKx.mjs";
40
42
  import { E as Qe } from "../EmptyState-DoxNUae-.mjs";
41
43
  const de = ({ sx: t = {} }) => {
42
- const { investments: g } = M(), { onEvent: c } = be(), { setShowConnectionsWidget: u } = U();
44
+ const { investments: h } = G(), { onEvent: c } = be(), { setShowConnectionsWidget: u } = H();
43
45
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", gap: 24, height: 164, p: 24, width: "100%", ...t }, children: [
44
46
  /* @__PURE__ */ o(
45
47
  _,
@@ -52,31 +54,31 @@ const de = ({ sx: t = {} }) => {
52
54
  textAlign: "center"
53
55
  },
54
56
  children: [
55
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "body1", children: g.overview.investment_accounts_footer }),
57
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: h.overview.investment_accounts_footer }),
56
58
  /* @__PURE__ */ e(
57
- i,
59
+ r,
58
60
  {
59
61
  sx: {
60
62
  color: "text.secondary",
61
63
  whiteSpace: "normal",
62
64
  fontWeight: 400
63
65
  },
64
- variant: "subtitle2",
65
- children: g.overview.connect_more_accounts_description
66
+ variant: "ParagraphSmall",
67
+ children: h.overview.connect_more_accounts_description
66
68
  }
67
69
  )
68
70
  ]
69
71
  }
70
72
  ),
71
73
  /* @__PURE__ */ e(
72
- He,
74
+ Ue,
73
75
  {
74
76
  onClick: () => {
75
77
  u(!0), c(z.ACCOUNTS_CLICK_CONNECT);
76
78
  },
77
79
  sx: { fontWeight: 600 },
78
80
  variant: "outlined",
79
- children: g.overview.connect_accounts
81
+ children: h.overview.connect_accounts
80
82
  }
81
83
  )
82
84
  ] });
@@ -90,7 +92,7 @@ const de = ({ sx: t = {} }) => {
90
92
  allocations_unknown: "#161D6A",
91
93
  allocations_us_bond: "#254995",
92
94
  allocations_us_stock: "#1E2D84"
93
- }, Xe = [
95
+ }, Ze = [
94
96
  {
95
97
  name: "allocations_cash"
96
98
  },
@@ -118,124 +120,124 @@ const de = ({ sx: t = {} }) => {
118
120
  {
119
121
  name: "allocations_unknown"
120
122
  }
121
- ], Ze = (t, g, c) => {
122
- const u = g, v = c;
123
- return t >= Math.min(u, v) && t < Math.max(u, v);
124
- }, et = (t, g, c) => {
123
+ ], et = (t, h, c) => {
124
+ const u = h, x = c;
125
+ return t >= Math.min(u, x) && t < Math.max(u, x);
126
+ }, tt = (t, h, c) => {
125
127
  const u = [
126
- ...new Set(t.map((m) => m.name.toLowerCase()))
128
+ ...new Set(t.map((d) => d.name.toLowerCase()))
127
129
  ];
128
- let v;
129
- return u.map((m) => {
130
- const a = t.reduce((y, d) => {
131
- const b = d.name;
132
- return b.toLowerCase() === m ? (v = b, Q(d) * d[g] / 100 + y) : y;
130
+ let x;
131
+ return u.map((d) => {
132
+ const l = t.reduce((m, y) => {
133
+ const b = y.name;
134
+ return b.toLowerCase() === d ? (x = b, Y(y) * y[h] / 100 + m) : m;
133
135
  }, 0);
134
136
  return {
135
- displayName: v,
136
- name: v,
137
- value: a,
138
- percentage: a / c
137
+ displayName: x,
138
+ name: x,
139
+ value: l,
140
+ percentage: l / c
139
141
  };
140
142
  });
141
- }, Q = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, tt = (t, g, c) => {
142
- const u = Object.values(g.allocations_list), v = [];
143
- let f = 0;
144
- const m = t.map(({ guid: n }) => n), a = c.filter(({ account_guid: n }) => m.includes(n)).map((n) => ({
143
+ }, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, h, c) => {
144
+ const u = Object.values(h.allocations_list), x = [];
145
+ let v = 0;
146
+ const d = t.map(({ guid: n }) => n), l = c.filter(({ account_guid: n }) => d.includes(n)).map((n) => ({
145
147
  ...n,
146
148
  name: n.symbol || n.description,
147
- gainLoss: n.cost_basis || n.cost_basis === 0 ? Q(n) - n.cost_basis : 0
148
- })), { cashBalance: y, totalAccountBalance: d } = t.reduce(
149
- (n, p) => ({
150
- cashBalance: n.cashBalance + (p.cash_balance || 0),
151
- totalAccountBalance: n.totalAccountBalance + (p.balance || 0)
149
+ gainLoss: n.cost_basis || n.cost_basis === 0 ? Y(n) - n.cost_basis : 0
150
+ })), { cashBalance: m, totalAccountBalance: y } = t.reduce(
151
+ (n, g) => ({
152
+ cashBalance: n.cashBalance + (g.cash_balance || 0),
153
+ totalAccountBalance: n.totalAccountBalance + (g.balance || 0)
152
154
  }),
153
155
  { cashBalance: 0, totalAccountBalance: 0 }
154
- ), { marketValue: b, totalGainLoss: l } = a.reduce(
155
- (n, p) => ({
156
- marketValue: n.marketValue + Q(p),
157
- totalGainLoss: n.totalGainLoss + p.gainLoss
156
+ ), { marketValue: b, totalGainLoss: s } = l.reduce(
157
+ (n, g) => ({
158
+ marketValue: n.marketValue + Y(g),
159
+ totalGainLoss: n.totalGainLoss + g.gainLoss
158
160
  }),
159
161
  { marketValue: 0, totalGainLoss: 0 }
160
- ), h = b + y;
161
- Xe.forEach((n, p) => {
162
- const C = a.filter(
162
+ ), f = b + m;
163
+ Ze.forEach((n, g) => {
164
+ const C = l.filter(
163
165
  (I) => !!I[n.name]
164
166
  );
165
- let D = C.reduce(
166
- (I, W) => I + Q(W) * W[n.name] / 100,
167
+ let S = C.reduce(
168
+ (I, W) => I + Y(W) * W[n.name] / 100,
167
169
  0
168
170
  );
169
- const k = et(
171
+ const B = tt(
170
172
  C,
171
173
  n.name,
172
- D
174
+ S
173
175
  );
174
- if (n.name === "allocations_cash" && y > 0) {
175
- D += y;
176
+ if (n.name === "allocations_cash" && m > 0) {
177
+ S += m;
176
178
  const I = {
177
- displayName: g.cash_balance_display_name,
179
+ displayName: h.cash_balance_display_name,
178
180
  name: "allocations_name",
179
- value: y,
180
- percentage: y / h
181
+ value: m,
182
+ percentage: m / f
181
183
  };
182
- k.push(I);
184
+ B.push(I);
183
185
  }
184
- D > 0 && (v.push({
186
+ S > 0 && (x.push({
185
187
  name: n.name,
186
- displayName: u[p],
187
- guid: `${n.name}-${p}`,
188
- holdings: k,
189
- percentage: D / h,
190
- value: D,
188
+ displayName: u[g],
189
+ guid: `${n.name}-${g}`,
190
+ holdings: B,
191
+ percentage: S / f,
192
+ value: S,
191
193
  color: Je[n.name]
192
- }), f += D);
194
+ }), v += S);
193
195
  });
194
- const r = v.map(
195
- ({ displayName: n, guid: p, color: C, value: D }) => ({
196
- id: p,
196
+ const i = x.map(
197
+ ({ displayName: n, guid: g, color: C, value: S }) => ({
198
+ id: g,
197
199
  color: C,
198
200
  label: n,
199
- value: D / f * 100
201
+ value: S / v * 100
200
202
  })
201
203
  );
202
204
  return {
203
- investmentsData: v,
204
- donutData: r,
205
- totalAmount: f,
206
- totalGainLoss: l,
207
- totalMarketValue: h,
208
- totalGainLossPercentage: l / d
205
+ investmentsData: x,
206
+ donutData: i,
207
+ totalAmount: v,
208
+ totalGainLoss: s,
209
+ totalMarketValue: f,
210
+ totalGainLossPercentage: s / y
209
211
  };
210
- }, se = (t) => t < 1e-3 ? "< 0.1%" : Oe(t), R = (t) => t === 0 ? ie(t, "0,0.00") : Ze(t, -0.01, 0.01) ? "< $0.01" : ie(t, "0,0.00"), nt = ({
212
+ }, re = (t) => t < 1e-3 ? "< 0.1%" : ze(t), R = (t) => t === 0 ? oe(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : oe(t, "0,0.00"), ot = ({
211
213
  data: t,
212
- onSelected: g,
214
+ onSelected: h,
213
215
  selectedId: c,
214
216
  selectedTabs: u,
215
- setSelectedTabs: v
217
+ setSelectedTabs: x
216
218
  }) => {
217
- const f = (l, h) => {
218
- h !== null && v(h);
219
- }, { isMobile: m } = H(), {
220
- investments: { allocation: a }
221
- } = M(), y = [
222
- { label: a.tabs_label_dollar, value: 0 },
223
- { label: a.tabs_label_percent, value: 1 }
224
- ], d = !t?.investmentsData.length, { isSmallMobile: b } = H();
225
- return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: m ? 250 : 412 }, children: [
219
+ const v = (s, f) => {
220
+ f !== null && x(f);
221
+ }, { isMobile: d } = U(), {
222
+ investments: { allocation: l }
223
+ } = G(), m = [
224
+ { label: l.tabs_label_dollar, value: 0 },
225
+ { label: l.tabs_label_percent, value: 1 }
226
+ ], y = !t?.investmentsData.length, { isSmallMobile: b } = U();
227
+ return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: d ? 250 : 412 }, children: [
226
228
  /* @__PURE__ */ e(
227
229
  ye,
228
230
  {
229
231
  exclusive: !0,
230
232
  fullWidth: !0,
231
- onChange: f,
232
- value: d ? -1 : u,
233
- children: y.map(({ label: l, value: h }) => /* @__PURE__ */ e(xe, { color: "primary", value: h, children: /* @__PURE__ */ e(i, { bold: !0, textTransform: "capitalize", variant: "body1", children: l }) }, l))
233
+ onChange: v,
234
+ value: y ? -1 : u,
235
+ children: m.map(({ label: s, value: f }) => /* @__PURE__ */ e(xe, { color: "primary", value: f, children: /* @__PURE__ */ e(r, { bold: !0, textTransform: "capitalize", variant: "Body", children: s }) }, s))
234
236
  }
235
237
  ),
236
- /* @__PURE__ */ e(te, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
238
+ /* @__PURE__ */ e(ee, { sx: { px: 12 }, children: t.investmentsData.map((s) => /* @__PURE__ */ o(A.Fragment, { children: [
237
239
  /* @__PURE__ */ e(
238
- ne,
240
+ te,
239
241
  {
240
242
  disableGutters: !0,
241
243
  disablePadding: !0,
@@ -243,19 +245,19 @@ const de = ({ sx: t = {} }) => {
243
245
  minHeight: 44
244
246
  },
245
247
  children: /* @__PURE__ */ o(
246
- Ue,
248
+ He,
247
249
  {
248
- "aria-expanded": c === l.guid,
249
- onClick: () => g(l.guid),
250
+ "aria-expanded": c === s.guid,
251
+ onClick: () => h(s.guid),
250
252
  sx: { minHeight: 44, px: 12, py: 0 },
251
253
  children: [
252
254
  /* @__PURE__ */ e(
253
- Me,
255
+ Ge,
254
256
  {
255
257
  borderRadius: 4,
256
258
  flexShrink: 0,
257
259
  height: 8,
258
- sx: { backgroundColor: l.color, mr: 8 },
260
+ sx: { backgroundColor: s.color, mr: 8 },
259
261
  width: 8
260
262
  }
261
263
  ),
@@ -267,8 +269,8 @@ const de = ({ sx: t = {} }) => {
267
269
  justifyContent: "space-between",
268
270
  width: "100%",
269
271
  children: [
270
- /* @__PURE__ */ e(i, { bold: c === l.guid, children: l.displayName }),
271
- /* @__PURE__ */ e(i, { bold: c === l.guid, variant: "body1", children: u === 0 ? R(l.value) : se(l.percentage) })
272
+ /* @__PURE__ */ e(r, { bold: c === s.guid, children: s.displayName }),
273
+ /* @__PURE__ */ e(r, { bold: c === s.guid, variant: "Body", children: u === 0 ? R(s.value) : re(s.percentage) })
272
274
  ]
273
275
  }
274
276
  )
@@ -277,10 +279,10 @@ const de = ({ sx: t = {} }) => {
277
279
  )
278
280
  }
279
281
  ),
280
- /* @__PURE__ */ e(Y, {}),
281
- l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Ne, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(te, { children: [
282
- l?.holdings?.map((h) => /* @__PURE__ */ e(
283
- ne,
282
+ /* @__PURE__ */ e(K, {}),
283
+ s.holdings && s.holdings.length > 0 && /* @__PURE__ */ e(Me, { in: c === s.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(ee, { children: [
284
+ s?.holdings?.map((f) => /* @__PURE__ */ e(
285
+ te,
284
286
  {
285
287
  sx: {
286
288
  pl: 24,
@@ -288,21 +290,21 @@ const de = ({ sx: t = {} }) => {
288
290
  py: 0
289
291
  },
290
292
  children: /* @__PURE__ */ o(_, { direction: "row", justifyContent: "space-between", width: "100%", children: [
291
- /* @__PURE__ */ o(i, { children: [
292
- h.displayName,
293
+ /* @__PURE__ */ o(r, { children: [
294
+ f.displayName,
293
295
  " "
294
296
  ] }),
295
- /* @__PURE__ */ e(i, { children: u === 0 ? R(h.value) : se(h.percentage) })
297
+ /* @__PURE__ */ e(r, { children: u === 0 ? R(f.value) : re(f.percentage) })
296
298
  ] })
297
299
  },
298
- h.displayName
300
+ f.displayName
299
301
  )),
300
- /* @__PURE__ */ e(Y, {})
302
+ /* @__PURE__ */ e(K, {})
301
303
  ] }) })
302
- ] }, l.guid)) }),
303
- d ? /* @__PURE__ */ o(ae, { children: [
304
- /* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: a.empty_data }),
305
- /* @__PURE__ */ e(Y, { sx: { borderColor: "neutral.light" } }),
304
+ ] }, s.guid)) }),
305
+ y ? /* @__PURE__ */ o(ae, { children: [
306
+ /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: l.empty_data }),
307
+ /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
306
308
  /* @__PURE__ */ e(
307
309
  de,
308
310
  {
@@ -311,55 +313,55 @@ const de = ({ sx: t = {} }) => {
311
313
  }
312
314
  }
313
315
  )
314
- ] }) : u === 0 && /* @__PURE__ */ e(i, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${a.total_label_text} ${R(t.totalAmount)}` })
316
+ ] }) : u === 0 && /* @__PURE__ */ e(r, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${l.total_label_text} ${R(t.totalAmount)}` })
315
317
  ] });
316
- }, ot = ({
318
+ }, it = ({
317
319
  data: t,
318
- hoveredId: g,
320
+ hoveredId: h,
319
321
  isPercentage: c,
320
322
  onMouseEnter: u,
321
- onMouseLeave: v,
322
- onSelected: f,
323
- selectedId: m,
324
- size: a = 150,
325
- totalLabel: y
323
+ onMouseLeave: x,
324
+ onSelected: v,
325
+ selectedId: d,
326
+ size: l = 150,
327
+ totalLabel: m
326
328
  }) => {
327
- const d = X(), b = d.palette.mode === "dark", l = A.useMemo(
328
- () => m ? t.investmentsData.find(({ guid: k }) => k === m) : void 0,
329
- [m]
329
+ const y = le(), b = y.palette.mode === "dark", s = A.useMemo(
330
+ () => d ? t.investmentsData.find(({ guid: B }) => B === d) : void 0,
331
+ [d]
330
332
  ), {
331
- investments: { allocation: h }
332
- } = M(), r = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: d.palette.neutral.light, value: 100 }], [t, d]), n = b ? "#0AC295" : "#09A57F", p = b ? "grey.300" : "grey.700", C = () => l ? h.pie_chart_centered_click_for_details : c ? se(t.totalGainLossPercentage) : R(t.totalGainLoss), D = t.totalGainLoss >= 0 ? n : p;
333
+ investments: { allocation: f }
334
+ } = G(), i = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: y.palette.border.light, value: 100 }], [t, y]), n = b ? "#0AC295" : "#09A57F", g = b ? "grey.300" : "grey.700", C = () => s ? f.pie_chart_centered_click_for_details : c ? re(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : g;
333
335
  return /* @__PURE__ */ e(
334
- Ve,
336
+ Oe,
335
337
  {
336
- data: r,
337
- hoveredId: g,
338
- onClick: f,
338
+ data: i,
339
+ hoveredId: h,
340
+ onClick: v,
339
341
  onMouseEnter: u,
340
- onMouseLeave: v,
341
- selectedId: m,
342
- size: a,
343
- children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: a, minWidth: a, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
344
- /* @__PURE__ */ e(i, { color: "text.secondary", noWrap: !0, children: l?.displayName ?? y }),
345
- /* @__PURE__ */ e(fe, { color: "text.primary", children: R(l?.value ?? t.totalMarketValue) }),
342
+ onMouseLeave: x,
343
+ selectedId: d,
344
+ size: l,
345
+ children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: l, minWidth: l, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
346
+ /* @__PURE__ */ e(r, { color: "text.secondary", noWrap: !0, children: s?.displayName ?? m }),
347
+ /* @__PURE__ */ e(fe, { color: "text.primary", children: R(s?.value ?? t.totalMarketValue) }),
346
348
  /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
347
- !l && /* @__PURE__ */ e(
348
- B,
349
+ !s && /* @__PURE__ */ e(
350
+ k,
349
351
  {
350
352
  name: t.totalGainLoss >= 0 ? "trending_up" : "trending_down",
351
353
  size: 20,
352
- sx: { color: D }
354
+ sx: { color: S }
353
355
  }
354
356
  ),
355
357
  /* @__PURE__ */ e(
356
- i,
358
+ r,
357
359
  {
358
360
  sx: {
359
- color: D,
361
+ color: S,
360
362
  fontWeight: 700
361
363
  },
362
- variant: "body2",
364
+ variant: "Small",
363
365
  children: C()
364
366
  }
365
367
  )
@@ -367,21 +369,21 @@ const de = ({ sx: t = {} }) => {
367
369
  ] }) }) })
368
370
  }
369
371
  );
370
- }, it = () => {
371
- const [t, g] = A.useState(0), [c, u] = A.useState(""), [v, f] = A.useState(""), m = (n) => {
372
- c !== n ? u(n) : (u(""), f(""));
373
- }, { selectedAccountGuids: a } = J(), { visibleHoldings: y } = U(), { visibleInvestmentAccounts: d } = le(), {
372
+ }, rt = () => {
373
+ const [t, h] = A.useState(0), [c, u] = A.useState(""), [x, v] = A.useState(""), d = (n) => {
374
+ c !== n ? u(n) : (u(""), v(""));
375
+ }, { selectedAccountGuids: l } = Q(), { visibleHoldings: m } = H(), { visibleInvestmentAccounts: y } = se(), {
374
376
  investments: { allocation: b }
375
- } = M(), l = tt(
376
- d.filter(({ guid: n }) => a.includes(n)),
377
+ } = G(), s = nt(
378
+ y.filter(({ guid: n }) => l.includes(n)),
377
379
  b,
378
- y
379
- ), { isMobile: h } = H(), r = pe("(max-width:768px)");
380
+ m
381
+ ), { isMobile: f } = U(), i = pe("(max-width:768px)");
380
382
  return /* @__PURE__ */ o(
381
383
  _,
382
384
  {
383
- alignItems: r ? "center" : "flex-start",
384
- direction: r ? "column" : "row",
385
+ alignItems: i ? "center" : "flex-start",
386
+ direction: i ? "column" : "row",
385
387
  gap: { xs: 16, md: 64, xl: 100 },
386
388
  sx: {
387
389
  justifyContent: "center",
@@ -390,47 +392,47 @@ const de = ({ sx: t = {} }) => {
390
392
  },
391
393
  children: [
392
394
  /* @__PURE__ */ e(
393
- ot,
395
+ it,
394
396
  {
395
- data: l,
396
- hoveredId: v,
397
+ data: s,
398
+ hoveredId: x,
397
399
  isPercentage: t === 1,
398
400
  onMouseEnter: (n) => {
399
- c === n ? f("") : c || f(n);
401
+ c === n ? v("") : c || v(n);
400
402
  },
401
403
  onMouseLeave: () => {
402
- f("");
404
+ v("");
403
405
  },
404
- onSelected: m,
406
+ onSelected: d,
405
407
  selectedId: c,
406
- size: h ? 280 : 400,
408
+ size: f ? 280 : 400,
407
409
  totalLabel: b.pie_chart_centered_text
408
410
  }
409
411
  ),
410
412
  /* @__PURE__ */ e(
411
- nt,
413
+ ot,
412
414
  {
413
- data: l,
414
- onSelected: m,
415
+ data: s,
416
+ onSelected: d,
415
417
  selectedId: c,
416
418
  selectedTabs: t,
417
- setSelectedTabs: g
419
+ setSelectedTabs: h
418
420
  }
419
421
  )
420
422
  ]
421
423
  }
422
424
  );
423
- }, rt = $(it), st = ({
425
+ }, at = P(rt), st = ({
424
426
  analysisDetails: t,
425
- analysisType: g,
427
+ analysisType: h,
426
428
  copy: c,
427
429
  setAnalysisType: u
428
430
  }) => {
429
- const { isSmallMobile: v } = H(), f = A.useMemo(() => Object.keys(t).filter((a) => t[a] >= 1).map((a) => ({
430
- key: a,
431
- value: ie(t[a], "0,0"),
432
- formattedKey: Re(a)
433
- })), [t]), m = [
431
+ const { isSmallMobile: x } = U(), v = A.useMemo(() => Object.keys(t).filter((l) => t[l] >= 1).map((l) => ({
432
+ key: l,
433
+ value: oe(t[l], "0,0"),
434
+ formattedKey: Re(l)
435
+ })), [t]), d = [
434
436
  { label: c.equities, value: V.Stocks },
435
437
  { label: c.bonds, value: V.Bonds }
436
438
  ];
@@ -440,7 +442,7 @@ const de = ({ sx: t = {} }) => {
440
442
  {
441
443
  color: "primary",
442
444
  exclusive: !0,
443
- onChange: (a, y) => y && u(y),
445
+ onChange: (l, m) => m && u(m),
444
446
  sx: {
445
447
  width: "100%",
446
448
  "& .MuiToggleButton-root": {
@@ -449,67 +451,67 @@ const de = ({ sx: t = {} }) => {
449
451
  textTransform: "capitalize"
450
452
  }
451
453
  },
452
- value: f.length ? g : -1,
453
- children: m.map(({ label: a, value: y }) => /* @__PURE__ */ e(xe, { sx: { width: "100%" }, value: y, children: a }, y))
454
+ value: v.length ? h : -1,
455
+ children: d.map(({ label: l, value: m }) => /* @__PURE__ */ e(xe, { sx: { width: "100%" }, value: m, children: l }, m))
454
456
  }
455
457
  ),
456
- f.length ? /* @__PURE__ */ e(
457
- te,
458
+ v.length ? /* @__PURE__ */ e(
459
+ ee,
458
460
  {
459
461
  sx: {
460
462
  "& .MuiListItemSecondaryAction-root": { pr: 12 },
461
- "& .MuiListItem-divider": { borderColor: "neutral.light" },
463
+ "& .MuiListItem-divider": { borderColor: "border.light" },
462
464
  "& .MuiListItem-root": { minHeight: 44, px: 12 }
463
465
  },
464
- children: f.map(({ value: a, formattedKey: y }) => /* @__PURE__ */ e(ne, { divider: !0, secondaryAction: /* @__PURE__ */ e(i, { children: a }), children: /* @__PURE__ */ e(
465
- $e,
466
+ children: v.map(({ value: l, formattedKey: m }) => /* @__PURE__ */ e(te, { divider: !0, secondaryAction: /* @__PURE__ */ e(r, { children: l }), children: /* @__PURE__ */ e(
467
+ Pe,
466
468
  {
467
- primary: y,
469
+ primary: m,
468
470
  primaryTypographyProps: { fontStyle: "normal" }
469
471
  }
470
- ) }, y))
472
+ ) }, m))
471
473
  }
472
474
  ) : /* @__PURE__ */ o(ae, { children: [
473
- /* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
474
- /* @__PURE__ */ e(Y, { sx: { borderColor: "neutral.light" } }),
475
+ /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
476
+ /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
475
477
  /* @__PURE__ */ e(
476
478
  de,
477
479
  {
478
480
  sx: {
479
- ".inner-container": { width: v ? "100%" : 364 }
481
+ ".inner-container": { width: x ? "100%" : 364 }
480
482
  }
481
483
  }
482
484
  )
483
485
  ] })
484
486
  ] });
485
- }, at = ({ body: t, title: g }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
486
- /* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: g }),
487
- /* @__PURE__ */ e(ve, { variant: "subtitle2", children: t })
488
- ] }), lt = ({
487
+ }, lt = ({ body: t, title: h }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
488
+ /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: h }),
489
+ /* @__PURE__ */ e(ve, { variant: "ParagraphSmall", children: t })
490
+ ] }), ct = ({
489
491
  placement: t = "bottom",
490
- tooltip_info_body: g,
492
+ tooltip_info_body: h,
491
493
  tooltip_info_title: c
492
494
  }) => /* @__PURE__ */ e(
493
- Pe,
495
+ Xe,
494
496
  {
495
497
  enterTouchDelay: 500,
496
498
  placement: t,
497
- title: /* @__PURE__ */ e(at, { body: g, title: c }),
498
- children: /* @__PURE__ */ e(ce, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(B, { name: "info", sx: { color: "info.main" } }) })
499
+ title: /* @__PURE__ */ e(lt, { body: h, title: c }),
500
+ children: /* @__PURE__ */ e(ce, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(k, { name: "info", sx: { color: "info.main" } }) })
499
501
  }
500
- ), ct = () => {
502
+ ), dt = () => {
501
503
  const {
502
504
  investments: { analysis: t }
503
- } = M(), { analysisChartData: g, analysisDetails: c, analysisType: u, setAnalysisType: v } = U(), f = pe("(min-width:320px) and (max-width:375px)"), { isMobile: m } = H(), y = X().palette.mode === "dark", { cellDimension: d, columns: b, rows: l, textVariant: h } = A.useMemo(() => {
504
- const r = u === V.Stocks, n = Object.values(r ? t.stock_column_labels : t.bond_column_labels), p = Object.values(r ? t.stock_row_labels : t.bond_row_labels);
505
- return { cellDimension: m ? 72 : 100, columns: n, rows: p, textVariant: m ? "caption" : "body1" };
506
- }, [t, m, u]);
505
+ } = G(), { analysisChartData: h, analysisDetails: c, analysisType: u, setAnalysisType: x } = H(), v = pe("(min-width:320px) and (max-width:375px)"), { isMobile: d } = U(), m = Ve().palette.mode === "dark", { cellDimension: y, columns: b, rows: s, textVariant: f } = A.useMemo(() => {
506
+ const i = u === V.Stocks, n = Object.values(i ? t.stock_column_labels : t.bond_column_labels), g = Object.values(i ? t.stock_row_labels : t.bond_row_labels);
507
+ return { cellDimension: d ? 72 : 100, columns: n, rows: g, textVariant: d ? "XSmall" : "Body" };
508
+ }, [t, d, u]);
507
509
  return /* @__PURE__ */ o(
508
510
  _,
509
511
  {
510
512
  sx: {
511
513
  flexDirection: { md: "row" },
512
- gap: m ? 48 : 64,
514
+ gap: d ? 48 : 64,
513
515
  justifyContent: "center",
514
516
  pt: 48,
515
517
  px: 16
@@ -530,34 +532,34 @@ const de = ({ sx: t = {} }) => {
530
532
  {
531
533
  sx: {
532
534
  alignItems: "center",
533
- bottom: m ? 10 : 24,
534
- gap: m ? 0 : 24,
535
+ bottom: d ? 10 : 24,
536
+ gap: d ? 0 : 24,
535
537
  position: "relative",
536
538
  transform: "rotate(-180deg)",
537
539
  writingMode: "vertical-rl"
538
540
  },
539
541
  children: [
540
- /* @__PURE__ */ e(ve, { bold: !0, color: "secondary.main", variant: h, children: u === V.Stocks ? t.market_capitalization : t.credit_quality }),
542
+ /* @__PURE__ */ e(ve, { bold: !0, color: "secondary.main", variant: f, children: u === V.Stocks ? t.market_capitalization : t.credit_quality }),
541
543
  /* @__PURE__ */ e(
542
544
  _,
543
545
  {
544
546
  sx: {
545
547
  flexDirection: "row",
546
- height: m ? 224 : 308,
548
+ height: d ? 224 : 308,
547
549
  justifyContent: "space-around"
548
550
  },
549
- children: b.map((r) => /* @__PURE__ */ e(
550
- i,
551
+ children: b.map((i) => /* @__PURE__ */ e(
552
+ r,
551
553
  {
552
554
  sx: {
553
555
  color: "secondary.main",
554
556
  pl: 12,
555
- pr: m ? 4 : 0
557
+ pr: d ? 4 : 0
556
558
  },
557
- variant: h,
558
- children: r
559
+ variant: f,
560
+ children: i
559
561
  },
560
- r
562
+ i
561
563
  ))
562
564
  }
563
565
  )
@@ -569,15 +571,15 @@ const de = ({ sx: t = {} }) => {
569
571
  _,
570
572
  {
571
573
  sx: {
572
- alignSelf: f ? "start" : "center",
574
+ alignSelf: v ? "start" : "center",
573
575
  flexDirection: "row",
574
576
  gap: 8,
575
577
  pb: 12
576
578
  },
577
579
  children: [
578
- /* @__PURE__ */ e(i, { bold: !0, children: t.invest_analysis }),
580
+ /* @__PURE__ */ e(r, { bold: !0, children: t.invest_analysis }),
579
581
  /* @__PURE__ */ e(
580
- lt,
582
+ ct,
581
583
  {
582
584
  tooltip_info_body: t.tooltip_info_body,
583
585
  tooltip_info_title: t.tooltip_info_title
@@ -586,47 +588,47 @@ const de = ({ sx: t = {} }) => {
586
588
  ]
587
589
  }
588
590
  ),
589
- g.map((r, n, p) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: r.map((C, D) => {
590
- const k = n === 0, I = n === p.length - 1, W = D === 0, G = D === r.length - 1, F = Number(C.replace("%", "")) >= 25;
591
+ h.map((i, n, g) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: i.map((C, S) => {
592
+ const B = n === 0, I = n === g.length - 1, W = S === 0, N = S === i.length - 1, F = Number(C.replace("%", "")) >= 25;
591
593
  let T = "grey.200", j = "grey.900";
592
- return y ? (T = F ? "grey.200" : "grey.700", j = F ? "grey.900" : "common.white") : (T = F ? "grey.700" : "grey.200", j = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
594
+ return m ? (T = F ? "grey.200" : "grey.700", j = F ? "grey.900" : "common.white") : (T = F ? "grey.700" : "grey.200", j = F ? "common.white" : "grey.900"), /* @__PURE__ */ e(
593
595
  _,
594
596
  {
595
597
  sx: {
596
598
  ...{
597
599
  borderBottomLeftRadius: I && W ? 4 : 0,
598
- borderBottomRightRadius: I && G ? 4 : 0,
599
- borderTopLeftRadius: k && W ? 4 : 0,
600
- borderTopRightRadius: k && G ? 4 : 0
600
+ borderBottomRightRadius: I && N ? 4 : 0,
601
+ borderTopLeftRadius: B && W ? 4 : 0,
602
+ borderTopRightRadius: B && N ? 4 : 0
601
603
  },
602
604
  alignItems: "center",
603
605
  bgcolor: T,
604
- height: d,
606
+ height: y,
605
607
  justifyContent: "center",
606
- width: d
608
+ width: y
607
609
  },
608
610
  children: /* @__PURE__ */ e(
609
- i,
611
+ r,
610
612
  {
611
613
  sx: {
612
614
  color: j,
613
- fontWeight: m ? 600 : 700
615
+ fontWeight: d ? 600 : 700
614
616
  },
615
- variant: m ? "body1" : "h3",
617
+ variant: d ? "Body" : "H3",
616
618
  children: C
617
619
  }
618
620
  )
619
621
  },
620
- D
622
+ S
621
623
  );
622
624
  }) }, n)),
623
- /* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: l.map((r) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: d }, children: /* @__PURE__ */ e(i, { color: "secondary.main", variant: h, children: r }) }, r)) }),
625
+ /* @__PURE__ */ e(_, { sx: { alignSelf: "center", flexDirection: "row", pt: 12 }, children: s.map((i) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", width: y }, children: /* @__PURE__ */ e(r, { color: "secondary.main", variant: f, children: i }) }, i)) }),
624
626
  /* @__PURE__ */ e(
625
- i,
627
+ r,
626
628
  {
627
629
  bold: !0,
628
- sx: { color: "secondary.main", pt: m ? 4 : 24, textAlign: "center" },
629
- variant: h,
630
+ sx: { color: "secondary.main", pt: d ? 4 : 24, textAlign: "center" },
631
+ variant: f,
630
632
  children: u === V.Stocks ? t.valuation : t.duration
631
633
  }
632
634
  )
@@ -644,51 +646,51 @@ const de = ({ sx: t = {} }) => {
644
646
  equities: t.equities,
645
647
  bonds: t.bonds
646
648
  },
647
- setAnalysisType: v
649
+ setAnalysisType: x
648
650
  }
649
651
  )
650
652
  ]
651
653
  }
652
654
  );
653
- }, dt = $(ct), mt = ({
655
+ }, mt = P(dt), ut = ({
654
656
  accountHoldingsData: t,
655
- currentEditedCostBasis: g,
657
+ currentEditedCostBasis: h,
656
658
  editingHoldingId: c,
657
659
  handleCostBasisBlur: u,
658
- handleCostBasisClick: v,
659
- handleCostBasisChange: f,
660
- handleCostBasisKeyDown: m,
661
- isOpen: a,
662
- onClose: y
660
+ handleCostBasisClick: x,
661
+ handleCostBasisChange: v,
662
+ handleCostBasisKeyDown: d,
663
+ isOpen: l,
664
+ onClose: m
663
665
  }) => {
664
- const { investments: d } = M(), [b, l] = A.useState({}), h = (r) => (n, p) => {
665
- l((C) => ({
666
+ const { investments: y } = G(), [b, s] = A.useState({}), f = (i) => (n, g) => {
667
+ s((C) => ({
666
668
  ...C,
667
- [r]: p
669
+ [i]: g
668
670
  }));
669
671
  };
670
672
  return /* @__PURE__ */ o(
671
- qe,
673
+ $e,
672
674
  {
673
- ariaLabelClose: d.overview.close_investment_drawer,
674
- isOpen: a,
675
- onClose: y,
676
- title: d.overview.investment_details,
675
+ ariaLabelClose: y.overview.close_investment_drawer,
676
+ isOpen: l,
677
+ onClose: m,
678
+ title: y.overview.investment_details,
677
679
  children: [
678
- /* @__PURE__ */ o(x, { sx: { gap: 8, p: 24 }, children: [
680
+ /* @__PURE__ */ o(p, { sx: { gap: 8, p: 24 }, children: [
679
681
  /* @__PURE__ */ e(
680
- oe,
682
+ ne,
681
683
  {
682
684
  alt: t.accounts.institutionName || "",
683
685
  institutionGuid: t.accounts.institution_guid || "",
684
686
  size: 64
685
687
  }
686
688
  ),
687
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "body2", children: t.accounts.memberName }),
688
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "h2", children: t.accounts.user_name || t.accounts.name }),
689
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
690
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: d.overview.current_balance }),
691
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: t.accounts.balance?.toLocaleString("en-US", {
689
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
690
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
691
+ /* @__PURE__ */ o(p, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
692
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: y.overview.current_balance }),
693
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
692
694
  currency: "USD",
693
695
  maximumFractionDigits: 2,
694
696
  minimumFractionDigits: 2,
@@ -697,7 +699,7 @@ const de = ({ sx: t = {} }) => {
697
699
  ] })
698
700
  ] }),
699
701
  /* @__PURE__ */ o(
700
- x,
702
+ p,
701
703
  {
702
704
  sx: {
703
705
  bgcolor: "background.default",
@@ -707,19 +709,19 @@ const de = ({ sx: t = {} }) => {
707
709
  py: 10
708
710
  },
709
711
  children: [
710
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "caption", children: d.overview.holding }),
711
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "caption", children: d.overview.market_value })
712
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: y.overview.holding }),
713
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: y.overview.market_value })
712
714
  ]
713
715
  }
714
716
  ),
715
- t.holdings?.map((r, n) => {
716
- const p = c === r.id;
717
+ t.holdings?.map((i, n) => {
718
+ const g = c === i.id;
717
719
  return /* @__PURE__ */ o(
718
720
  _e,
719
721
  {
720
722
  disableGutters: !0,
721
- expanded: b[r.id] === !0,
722
- onChange: r ? h(r?.id) : () => {
723
+ expanded: b[i.id] === !0,
724
+ onChange: i ? f(i?.id) : () => {
723
725
  },
724
726
  sx: {
725
727
  ":before": n === 0 ? { opacity: 0 } : {},
@@ -733,15 +735,15 @@ const de = ({ sx: t = {} }) => {
733
735
  id: "panel1a-header",
734
736
  sx: [
735
737
  { height: 64 },
736
- b[r.id] && n > 0 && {
738
+ b[i.id] && n > 0 && {
737
739
  borderTop: 1,
738
- borderColor: "neutral.main"
740
+ borderColor: "border.main"
739
741
  }
740
742
  ],
741
- children: /* @__PURE__ */ o(x, { sx: { flexDirection: "row", width: "100%" }, children: [
743
+ children: /* @__PURE__ */ o(p, { sx: { flexDirection: "row", width: "100%" }, children: [
742
744
  /* @__PURE__ */ e("div", { style: { width: 24 } }),
743
745
  /* @__PURE__ */ o(
744
- x,
746
+ p,
745
747
  {
746
748
  sx: [
747
749
  {
@@ -752,28 +754,28 @@ const de = ({ sx: t = {} }) => {
752
754
  py: 14,
753
755
  width: "100%"
754
756
  },
755
- b[r.id] && {
757
+ b[i.id] && {
756
758
  borderBottom: 1,
757
- borderColor: "neutral.main"
759
+ borderColor: "border.main"
758
760
  }
759
761
  ],
760
762
  children: [
761
763
  /* @__PURE__ */ e(
762
- x,
764
+ p,
763
765
  {
764
766
  sx: {
765
767
  alignItems: "center",
766
768
  flexDirection: "row",
767
769
  gap: 12
768
770
  },
769
- children: /* @__PURE__ */ o(x, { sx: { overflow: "hidden", width: 98 }, children: [
770
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600 }, variant: "body1", children: r.holding }),
771
- /* @__PURE__ */ e(i, { variant: "caption", children: r.description })
771
+ children: /* @__PURE__ */ o(p, { sx: { overflow: "hidden", width: 98 }, children: [
772
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600 }, variant: "Body", children: i.holding }),
773
+ /* @__PURE__ */ e(r, { variant: "XSmall", children: i.description })
772
774
  ] })
773
775
  }
774
776
  ),
775
777
  /* @__PURE__ */ o(
776
- x,
778
+ p,
777
779
  {
778
780
  sx: {
779
781
  alignItems: "center",
@@ -783,47 +785,47 @@ const de = ({ sx: t = {} }) => {
783
785
  justifyContent: "flex-end"
784
786
  },
785
787
  children: [
786
- /* @__PURE__ */ o(x, { children: [
787
- /* @__PURE__ */ e(i, { sx: { fontWeight: 600, textAlign: "right" }, variant: "body1", children: r.marketValue?.toLocaleString("en-US", {
788
+ /* @__PURE__ */ o(p, { children: [
789
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: i.marketValue?.toLocaleString("en-US", {
788
790
  currency: "USD",
789
791
  maximumFractionDigits: 2,
790
792
  minimumFractionDigits: 2,
791
793
  style: "currency"
792
794
  }) }),
793
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
794
- r.totalGainLoss !== 0 && /* @__PURE__ */ e(
795
- B,
795
+ /* @__PURE__ */ o(p, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
796
+ i.totalGainLoss !== 0 && /* @__PURE__ */ e(
797
+ k,
796
798
  {
797
- name: r.totalGainLoss >= 0 ? "trending_up" : "trending_down",
799
+ name: i.totalGainLoss >= 0 ? "trending_up" : "trending_down",
798
800
  size: 12,
799
801
  sx: {
800
802
  verticalAlign: "middle",
801
803
  mr: 1,
802
- color: r.totalGainLoss >= 0 ? "success.main" : "grey.700"
804
+ color: i.totalGainLoss >= 0 ? "success.main" : "grey.700"
803
805
  }
804
806
  }
805
807
  ),
806
808
  /* @__PURE__ */ e(
807
- i,
809
+ r,
808
810
  {
809
811
  sx: {
810
- color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
811
- fontWeight: r.totalGainLoss <= 0 ? 400 : 700
812
+ color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
813
+ fontWeight: i.totalGainLoss <= 0 ? 400 : 700
812
814
  },
813
- variant: "caption",
814
- children: r.costBasis ? `${(r.totalGainLoss / r.costBasis * 100).toFixed(2)}%` : "0.00%"
815
+ variant: "XSmall",
816
+ children: i.costBasis ? `${(i.totalGainLoss / i.costBasis * 100).toFixed(2)}%` : "0.00%"
815
817
  }
816
818
  ),
817
- /* @__PURE__ */ e(i, { sx: { color: "grey.700" }, variant: "caption", children: "|" }),
819
+ /* @__PURE__ */ e(r, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
818
820
  /* @__PURE__ */ e(
819
- i,
821
+ r,
820
822
  {
821
823
  sx: {
822
- color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
823
- fontWeight: r.totalGainLoss <= 0 ? 400 : 700
824
+ color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
825
+ fontWeight: i.totalGainLoss <= 0 ? 400 : 700
824
826
  },
825
- variant: "caption",
826
- children: Math.abs(r.totalGainLoss).toLocaleString("en-US", {
827
+ variant: "XSmall",
828
+ children: Math.abs(i.totalGainLoss).toLocaleString("en-US", {
827
829
  currency: "USD",
828
830
  maximumFractionDigits: 2,
829
831
  minimumFractionDigits: 2,
@@ -834,9 +836,9 @@ const de = ({ sx: t = {} }) => {
834
836
  ] })
835
837
  ] }),
836
838
  /* @__PURE__ */ e(
837
- B,
839
+ k,
838
840
  {
839
- name: b[r.id] ? "expand_less" : "expand_more",
841
+ name: b[i.id] ? "expand_less" : "expand_more",
840
842
  size: 20
841
843
  }
842
844
  )
@@ -850,7 +852,7 @@ const de = ({ sx: t = {} }) => {
850
852
  }
851
853
  ),
852
854
  /* @__PURE__ */ e(we, { children: /* @__PURE__ */ o(
853
- x,
855
+ p,
854
856
  {
855
857
  sx: {
856
858
  alignItems: "center",
@@ -859,28 +861,28 @@ const de = ({ sx: t = {} }) => {
859
861
  pl: 24
860
862
  },
861
863
  children: [
862
- /* @__PURE__ */ e(x, { sx: { width: 32 } }),
863
- /* @__PURE__ */ o(x, { sx: { flex: 1 }, children: [
864
+ /* @__PURE__ */ e(p, { sx: { width: 32 } }),
865
+ /* @__PURE__ */ o(p, { sx: { flex: 1 }, children: [
864
866
  /* @__PURE__ */ o(
865
- x,
867
+ p,
866
868
  {
867
869
  sx: {
868
870
  alignItems: "center",
869
871
  borderBottom: 1,
870
- borderColor: "neutral.main",
872
+ borderColor: "border.main",
871
873
  flexDirection: "row",
872
874
  height: 48,
873
875
  justifyContent: "space-between",
874
876
  pr: 24
875
877
  },
876
878
  children: [
877
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "body1", children: d.overview.quantity }),
878
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "body2", children: r.qty })
879
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: y.overview.quantity }),
880
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: i.qty })
879
881
  ]
880
882
  }
881
883
  ),
882
884
  /* @__PURE__ */ o(
883
- x,
885
+ p,
884
886
  {
885
887
  sx: {
886
888
  alignItems: "center",
@@ -890,9 +892,9 @@ const de = ({ sx: t = {} }) => {
890
892
  pr: 24
891
893
  },
892
894
  children: [
893
- /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "body1", children: d.overview.cost_basis_header }),
895
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: y.overview.cost_basis_header }),
894
896
  /* @__PURE__ */ o(
895
- x,
897
+ p,
896
898
  {
897
899
  direction: "row",
898
900
  sx: {
@@ -900,13 +902,13 @@ const de = ({ sx: t = {} }) => {
900
902
  gap: 4
901
903
  },
902
904
  children: [
903
- p ? /* @__PURE__ */ e(
904
- De,
905
+ g ? /* @__PURE__ */ e(
906
+ Se,
905
907
  {
906
908
  autoFocus: !0,
907
- onBlur: () => u(r.id),
908
- onChange: f,
909
- onKeyDown: (C) => m(C, r.id),
909
+ onBlur: () => u(i.id),
910
+ onChange: v,
911
+ onKeyDown: (C) => d(C, i.id),
910
912
  size: "small",
911
913
  sx: {
912
914
  fontSize: 14,
@@ -921,9 +923,9 @@ const de = ({ sx: t = {} }) => {
921
923
  border: "none"
922
924
  }
923
925
  },
924
- value: g
926
+ value: h
925
927
  }
926
- ) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 58 }, variant: "body2", children: r.costBasis?.toLocaleString("en-US", {
928
+ ) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: i.costBasis?.toLocaleString("en-US", {
927
929
  currency: "USD",
928
930
  maximumFractionDigits: 2,
929
931
  minimumFractionDigits: 2,
@@ -932,9 +934,9 @@ const de = ({ sx: t = {} }) => {
932
934
  /* @__PURE__ */ e(
933
935
  ce,
934
936
  {
935
- onClick: () => v(r.id, r.costBasis),
937
+ onClick: () => x(i.id, i.costBasis),
936
938
  sx: { minWidth: 16, minHeight: 16 },
937
- children: /* @__PURE__ */ e(B, { name: "stylus", size: 16, sx: { color: "grey.700" } })
939
+ children: /* @__PURE__ */ e(k, { name: "stylus", size: 16, sx: { color: "grey.700" } })
938
940
  }
939
941
  )
940
942
  ]
@@ -949,28 +951,28 @@ const de = ({ sx: t = {} }) => {
949
951
  ) })
950
952
  ]
951
953
  },
952
- r.id
954
+ i.id
953
955
  );
954
956
  })
955
957
  ]
956
958
  }
957
959
  );
958
- }, ut = $(mt), K = (t) => /* @__PURE__ */ o(Ye, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
959
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "body2", children: t.colDef.headerName }),
960
- /* @__PURE__ */ e(B, { name: "expand_all", size: 12 })
961
- ] }), ht = ({
960
+ }, ht = P(ut), q = (t) => /* @__PURE__ */ o(Ke, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
961
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
962
+ /* @__PURE__ */ e(k, { name: "expand_all", size: 12 })
963
+ ] }), gt = ({
962
964
  data: t,
963
- editingHoldingId: g,
965
+ editingHoldingId: h,
964
966
  currentEditedCostBasis: c,
965
967
  handleCostBasisClick: u,
966
- handleCostBasisChange: v,
967
- handleCostBasisKeyDown: f,
968
- handleCostBasisBlur: m
968
+ handleCostBasisChange: x,
969
+ handleCostBasisKeyDown: v,
970
+ handleCostBasisBlur: d
969
971
  }) => {
970
- const { investments: a } = M(), d = X().palette.mode === "dark", b = "success.main", l = d ? "grey.300" : "grey.700", h = (n, p = "lesserThan") => p === "greaterThan" ? n >= 0 ? b : l : n <= 0 ? l : b, r = [
972
+ const { investments: l } = G(), y = le().palette.mode === "dark", b = "success.main", s = y ? "grey.300" : "grey.700", f = (n, g = "lesserThan") => g === "greaterThan" ? n >= 0 ? b : s : n <= 0 ? s : b, i = [
971
973
  {
972
974
  field: "qty",
973
- headerName: a.overview.qty_header,
975
+ headerName: l.overview.qty_header,
974
976
  sortable: !1,
975
977
  width: 48,
976
978
  align: "center",
@@ -978,29 +980,29 @@ const de = ({ sx: t = {} }) => {
978
980
  },
979
981
  {
980
982
  field: "holding",
981
- headerName: a.overview.holding_header,
983
+ headerName: l.overview.holding_header,
982
984
  flex: 1,
983
- renderHeader: K,
985
+ renderHeader: q,
984
986
  renderCell: (n) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", gap: 16, flexDirection: "row" }, children: /* @__PURE__ */ o(_, { children: [
985
- /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, children: n.row.holding }),
986
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
987
+ /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, children: n.row.holding }),
988
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
987
989
  ] }) })
988
990
  },
989
991
  {
990
992
  field: "costBasis",
991
- headerName: a.overview.cost_basis_header,
993
+ headerName: l.overview.cost_basis_header,
992
994
  width: 132,
993
- renderHeader: K,
995
+ renderHeader: q,
994
996
  renderCell: (n) => {
995
- const p = g === n.row.id;
997
+ const g = h === n.row.id;
996
998
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
997
- p ? /* @__PURE__ */ e(
998
- De,
999
+ g ? /* @__PURE__ */ e(
1000
+ Se,
999
1001
  {
1000
1002
  autoFocus: !0,
1001
- onBlur: () => m(n.row.id),
1002
- onChange: v,
1003
- onKeyDown: (C) => f(C, n.row.id),
1003
+ onBlur: () => d(n.row.id),
1004
+ onChange: x,
1005
+ onKeyDown: (C) => v(C, n.row.id),
1004
1006
  size: "small",
1005
1007
  sx: {
1006
1008
  fontSize: 14,
@@ -1017,7 +1019,7 @@ const de = ({ sx: t = {} }) => {
1017
1019
  },
1018
1020
  value: c
1019
1021
  }
1020
- ) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 57 }, variant: "body2", children: n.value?.toLocaleString("en-US", {
1022
+ ) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1021
1023
  currency: "USD",
1022
1024
  maximumFractionDigits: 2,
1023
1025
  minimumFractionDigits: 2,
@@ -1028,7 +1030,7 @@ const de = ({ sx: t = {} }) => {
1028
1030
  {
1029
1031
  onClick: () => u(n.row.id, n.row.costBasis),
1030
1032
  sx: { minWidth: 12, minHeight: 12 },
1031
- children: /* @__PURE__ */ e(B, { name: "stylus", size: 12, sx: { color: "grey.700" } })
1033
+ children: /* @__PURE__ */ e(k, { name: "stylus", size: 12, sx: { color: "grey.700" } })
1032
1034
  }
1033
1035
  )
1034
1036
  ] });
@@ -1038,44 +1040,44 @@ const de = ({ sx: t = {} }) => {
1038
1040
  },
1039
1041
  {
1040
1042
  field: "totalGainLoss",
1041
- headerName: a.overview.total_gain_loss_header,
1043
+ headerName: l.overview.total_gain_loss_header,
1042
1044
  width: 196,
1043
- renderHeader: K,
1045
+ renderHeader: q,
1044
1046
  renderCell: (n) => {
1045
- const p = n.row.costBasis, C = p ? n.row.totalGainLoss / p * 100 : 0;
1047
+ const g = n.row.costBasis, C = g ? n.row.totalGainLoss / g * 100 : 0;
1046
1048
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
1047
1049
  n.value !== 0 && /* @__PURE__ */ e(
1048
- B,
1050
+ k,
1049
1051
  {
1050
1052
  name: n.value > 0 ? "trending_up" : "trending_down",
1051
1053
  size: 16,
1052
1054
  sx: {
1053
- color: h(n.value),
1055
+ color: f(n.value),
1054
1056
  mr: 1,
1055
1057
  verticalAlign: "middle"
1056
1058
  }
1057
1059
  }
1058
1060
  ),
1059
1061
  /* @__PURE__ */ e(
1060
- i,
1062
+ r,
1061
1063
  {
1062
1064
  sx: {
1063
- color: h(n.value),
1065
+ color: f(n.value),
1064
1066
  fontWeight: n.value > 0 ? 700 : 400
1065
1067
  },
1066
- variant: "body2",
1067
- children: p ? `${C.toFixed(2)}%` : "0.00%"
1068
+ variant: "Small",
1069
+ children: g ? `${C.toFixed(2)}%` : "0.00%"
1068
1070
  }
1069
1071
  ),
1070
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
1072
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1071
1073
  /* @__PURE__ */ e(
1072
- i,
1074
+ r,
1073
1075
  {
1074
1076
  sx: {
1075
- color: h(n.value),
1077
+ color: f(n.value),
1076
1078
  fontWeight: n.value > 0 ? 700 : 400
1077
1079
  },
1078
- variant: "body2",
1080
+ variant: "Small",
1079
1081
  children: Math.abs(n.value).toLocaleString("en-US", {
1080
1082
  currency: "USD",
1081
1083
  maximumFractionDigits: 2,
@@ -1092,10 +1094,10 @@ const de = ({ sx: t = {} }) => {
1092
1094
  },
1093
1095
  {
1094
1096
  field: "marketValue",
1095
- headerName: a.overview.market_value_header,
1097
+ headerName: l.overview.market_value_header,
1096
1098
  width: 132,
1097
- renderHeader: K,
1098
- renderCell: (n) => /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, variant: "body2", children: n.value?.toLocaleString("en-US", {
1099
+ renderHeader: q,
1100
+ renderCell: (n) => /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1099
1101
  currency: "USD",
1100
1102
  maximumFractionDigits: 2,
1101
1103
  minimumFractionDigits: 2,
@@ -1106,16 +1108,16 @@ const de = ({ sx: t = {} }) => {
1106
1108
  }
1107
1109
  ];
1108
1110
  return /* @__PURE__ */ e(
1109
- re,
1111
+ ie,
1110
1112
  {
1111
1113
  sx: {
1112
1114
  boxShadow: "none",
1113
1115
  width: "100%"
1114
1116
  },
1115
1117
  children: /* @__PURE__ */ e(
1116
- Ke,
1118
+ qe,
1117
1119
  {
1118
- columns: r,
1120
+ columns: i,
1119
1121
  disableColumnFilter: !0,
1120
1122
  disableColumnMenu: !0,
1121
1123
  disableRowSelectionOnClick: !0,
@@ -1126,70 +1128,70 @@ const de = ({ sx: t = {} }) => {
1126
1128
  )
1127
1129
  }
1128
1130
  );
1129
- }, gt = () => {
1130
- const { isMobile: t } = H(), [g, c] = O({}), [u, v] = O(!1), { selectedAccountGuids: f } = J(), { visibleHoldings: m, updateHoldings: a } = U(), [y, d] = A.useState(!1), [b, l] = O({
1131
+ }, pt = () => {
1132
+ const { isMobile: t } = U(), [h, c] = O({}), [u, x] = O(!1), { selectedAccountGuids: v } = Q(), { visibleHoldings: d, updateHoldings: l } = H(), [m, y] = A.useState(!1), [b, s] = O({
1131
1133
  accounts: [],
1132
1134
  holdings: []
1133
- }), { accounts: h, investments: r } = M(), { isCopyLoaded: n } = J(), [p, C] = O(null), [D, k] = O(""), W = X().palette.mode === "dark", G = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (s, w = "lesserThan") => w === "greaterThan" ? s >= 0 ? G : F : s <= 0 ? F : G, j = (s, w) => {
1134
- C(s), k(w.toFixed(2));
1135
- }, Z = (s) => {
1136
- const w = s.target.value;
1137
- /^\d*\.?\d*$/.test(w) && k(w);
1138
- }, me = (s, w) => {
1139
- s.key === "Enter" ? ee(w) : s.key === "Escape" && C(null);
1140
- }, ee = (s) => {
1141
- const w = m.find(({ guid: E }) => E === s);
1135
+ }), { accounts: f, investments: i } = G(), { isCopyLoaded: n } = Q(), [g, C] = O(null), [S, B] = O(""), W = le().palette.mode === "dark", N = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, w = "lesserThan") => w === "greaterThan" ? a >= 0 ? N : F : a <= 0 ? F : N, j = (a, w) => {
1136
+ C(a), B(w.toFixed(2));
1137
+ }, J = (a) => {
1138
+ const w = a.target.value;
1139
+ /^\d*\.?\d*$/.test(w) && B(w);
1140
+ }, me = (a, w) => {
1141
+ a.key === "Enter" ? Z(w) : a.key === "Escape" && C(null);
1142
+ }, Z = (a) => {
1143
+ const w = d.find(({ guid: E }) => E === a);
1142
1144
  if (!w) return;
1143
- const N = Number(D);
1144
- if (a({ ...w, cost_basis: N }), t) {
1145
+ const M = Number(S);
1146
+ if (l({ ...w, cost_basis: M }), t) {
1145
1147
  const E = b.holdings.map(
1146
- (S) => S.id === s ? { ...S, costBasis: N } : S
1148
+ (D) => D.id === a ? { ...D, costBasis: M } : D
1147
1149
  );
1148
- l((S) => ({
1149
- ...S,
1150
+ s((D) => ({
1151
+ ...D,
1150
1152
  holdings: E
1151
1153
  }));
1152
1154
  }
1153
1155
  C(null);
1154
- }, Le = (s) => (w, N) => {
1156
+ }, Le = (a) => (w, M) => {
1155
1157
  c((E) => ({
1156
1158
  ...E,
1157
- [s]: N
1159
+ [a]: M
1158
1160
  }));
1159
- }, { visibleHoldings: ue } = U(), { visibleInvestmentAccounts: Ie } = le(), P = Ie.filter(
1160
- ({ guid: s }) => f.includes(s)
1161
- ), Ae = P.reduce((s, w) => s + (w.balance || 0), 0), ke = P.map(({ guid: s }) => s), q = ue.filter(
1162
- ({ account_guid: s }) => ke.includes(s)
1163
- ).reduce((s, w) => {
1164
- const N = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
1165
- return s + N;
1161
+ }, { visibleHoldings: ue } = H(), { visibleInvestmentAccounts: Ie } = se(), X = Ie.filter(
1162
+ ({ guid: a }) => v.includes(a)
1163
+ ), Ae = X.reduce((a, w) => a + (w.balance || 0), 0), Be = X.map(({ guid: a }) => a), $ = ue.filter(
1164
+ ({ account_guid: a }) => Be.includes(a)
1165
+ ).reduce((a, w) => {
1166
+ const M = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
1167
+ return a + M;
1166
1168
  }, 0), Te = () => {
1167
- v(!1);
1169
+ x(!1);
1168
1170
  };
1169
- return n ? /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1170
- !!P.length && /* @__PURE__ */ o(x, { sx: { alignItems: "center" }, children: [
1171
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, children: r.overview.total_portfolio }),
1171
+ return n ? /* @__PURE__ */ o(p, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1172
+ !!X.length && /* @__PURE__ */ o(p, { sx: { alignItems: "center" }, children: [
1173
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, children: i.overview.total_portfolio }),
1172
1174
  /* @__PURE__ */ e(fe, { children: Ae.toLocaleString("en-US", {
1173
1175
  currency: "USD",
1174
1176
  maximumFractionDigits: 2,
1175
1177
  minimumFractionDigits: 2,
1176
1178
  style: "currency"
1177
1179
  }) }),
1178
- /* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1180
+ /* @__PURE__ */ o(p, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1179
1181
  /* @__PURE__ */ e(
1180
- B,
1182
+ k,
1181
1183
  {
1182
- name: q >= 0 ? "trending_up" : "trending_down",
1184
+ name: $ >= 0 ? "trending_up" : "trending_down",
1183
1185
  size: 20,
1184
- sx: { color: T(q, "greaterThan") }
1186
+ sx: { color: T($, "greaterThan") }
1185
1187
  }
1186
1188
  ),
1187
1189
  /* @__PURE__ */ e(
1188
- i,
1190
+ r,
1189
1191
  {
1190
- sx: { color: T(q, "greaterThan"), fontWeight: 700 },
1191
- variant: "body2",
1192
- children: q.toLocaleString("en-US", {
1192
+ sx: { color: T($, "greaterThan"), fontWeight: 700 },
1193
+ variant: "Small",
1194
+ children: $.toLocaleString("en-US", {
1193
1195
  currency: "USD",
1194
1196
  maximumFractionDigits: 2,
1195
1197
  minimumFractionDigits: 2,
@@ -1199,8 +1201,8 @@ const de = ({ sx: t = {} }) => {
1199
1201
  )
1200
1202
  ] })
1201
1203
  ] }),
1202
- P.map((s) => {
1203
- const w = ue.filter((L) => L.account_guid === s.guid).map((L) => ({
1204
+ X.map((a) => {
1205
+ const w = ue.filter((L) => L.account_guid === a.guid).map((L) => ({
1204
1206
  id: L.guid,
1205
1207
  qty: L.shares || 0,
1206
1208
  holding: L.symbol || L.description || "Unknown",
@@ -1208,18 +1210,18 @@ const de = ({ sx: t = {} }) => {
1208
1210
  totalGainLoss: L.market_value ? L.market_value - (L.cost_basis || 0) : 0,
1209
1211
  marketValue: L.market_value || 0,
1210
1212
  description: L.description || ""
1211
- })), N = w.length > 0, E = s.balance, S = w.reduce(
1213
+ })), M = w.length > 0, E = a.balance, D = w.reduce(
1212
1214
  (L, Fe) => Fe.totalGainLoss + L,
1213
1215
  0
1214
- ), he = E ? S / E * 100 : 0;
1216
+ ), he = E ? D / E * 100 : 0;
1215
1217
  if (t)
1216
1218
  return /* @__PURE__ */ e(
1217
- re,
1219
+ ie,
1218
1220
  {
1219
1221
  onClick: w.length ? () => {
1220
- v(!0), l({
1222
+ x(!0), s({
1221
1223
  holdings: w,
1222
- accounts: s
1224
+ accounts: a
1223
1225
  });
1224
1226
  } : void 0,
1225
1227
  sx: {
@@ -1227,11 +1229,11 @@ const de = ({ sx: t = {} }) => {
1227
1229
  overflow: "hidden"
1228
1230
  },
1229
1231
  children: /* @__PURE__ */ o(
1230
- x,
1232
+ p,
1231
1233
  {
1232
1234
  sx: {
1233
1235
  border: 1,
1234
- borderColor: "divider",
1236
+ borderColor: "border.main",
1235
1237
  borderRadius: "8px",
1236
1238
  ml: 16,
1237
1239
  mr: 16,
@@ -1240,12 +1242,12 @@ const de = ({ sx: t = {} }) => {
1240
1242
  },
1241
1243
  children: [
1242
1244
  /* @__PURE__ */ o(
1243
- x,
1245
+ p,
1244
1246
  {
1245
1247
  sx: {
1246
1248
  alignItems: "center",
1247
1249
  borderBottom: 1,
1248
- borderColor: "divider",
1250
+ borderColor: "border.main",
1249
1251
  flexDirection: "row",
1250
1252
  pb: 14,
1251
1253
  pl: 14,
@@ -1253,22 +1255,22 @@ const de = ({ sx: t = {} }) => {
1253
1255
  },
1254
1256
  children: [
1255
1257
  /* @__PURE__ */ e(
1256
- oe,
1258
+ ne,
1257
1259
  {
1258
- alt: s.institutionName || "",
1259
- institutionGuid: s.institution_guid || "",
1260
+ alt: a.institutionName || "",
1261
+ institutionGuid: a.institution_guid || "",
1260
1262
  size: 32
1261
1263
  }
1262
1264
  ),
1263
- /* @__PURE__ */ o(x, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1264
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "caption", children: s.memberName }),
1265
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: s.user_name || s.name })
1265
+ /* @__PURE__ */ o(p, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1266
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1267
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1266
1268
  ] })
1267
1269
  ]
1268
1270
  }
1269
1271
  ),
1270
1272
  /* @__PURE__ */ o(
1271
- x,
1273
+ p,
1272
1274
  {
1273
1275
  sx: {
1274
1276
  alignItems: "center",
@@ -1279,12 +1281,12 @@ const de = ({ sx: t = {} }) => {
1279
1281
  },
1280
1282
  children: [
1281
1283
  /* @__PURE__ */ o(
1282
- x,
1284
+ p,
1283
1285
  {
1284
1286
  sx: {
1285
1287
  alignItems: "center",
1286
1288
  borderRight: 1,
1287
- borderColor: "divider",
1289
+ borderColor: "border.main",
1288
1290
  flex: 1,
1289
1291
  justifyContent: "center",
1290
1292
  pb: 14,
@@ -1293,9 +1295,9 @@ const de = ({ sx: t = {} }) => {
1293
1295
  pt: 14
1294
1296
  },
1295
1297
  children: [
1296
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontSize: 11 }, variant: "body2", children: r.overview.total_gain_Loss }),
1298
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: i.overview.total_gain_Loss }),
1297
1299
  /* @__PURE__ */ o(
1298
- x,
1300
+ p,
1299
1301
  {
1300
1302
  sx: {
1301
1303
  alignItems: "center",
@@ -1304,38 +1306,38 @@ const de = ({ sx: t = {} }) => {
1304
1306
  justifyContent: "flex-end"
1305
1307
  },
1306
1308
  children: [
1307
- S !== 0 && /* @__PURE__ */ e(
1308
- B,
1309
+ D !== 0 && /* @__PURE__ */ e(
1310
+ k,
1309
1311
  {
1310
- name: S > 0 ? "trending_up" : "trending_down",
1312
+ name: D > 0 ? "trending_up" : "trending_down",
1311
1313
  size: 20,
1312
- sx: { color: T(S) }
1314
+ sx: { color: T(D) }
1313
1315
  }
1314
1316
  ),
1315
1317
  /* @__PURE__ */ o(
1316
- i,
1318
+ r,
1317
1319
  {
1318
1320
  sx: {
1319
- color: T(S),
1321
+ color: T(D),
1320
1322
  fontWeight: 600
1321
1323
  },
1322
- variant: "body1",
1324
+ variant: "Body",
1323
1325
  children: [
1324
1326
  he.toFixed(2),
1325
1327
  "%"
1326
1328
  ]
1327
1329
  }
1328
1330
  ),
1329
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
1331
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1330
1332
  /* @__PURE__ */ e(
1331
- i,
1333
+ r,
1332
1334
  {
1333
1335
  sx: {
1334
- color: T(S),
1336
+ color: T(D),
1335
1337
  fontWeight: 600
1336
1338
  },
1337
- variant: "body1",
1338
- children: Math.abs(S).toLocaleString("en-US", {
1339
+ variant: "Body",
1340
+ children: Math.abs(D).toLocaleString("en-US", {
1339
1341
  currency: "USD",
1340
1342
  maximumFractionDigits: 2,
1341
1343
  minimumFractionDigits: 2,
@@ -1350,7 +1352,7 @@ const de = ({ sx: t = {} }) => {
1350
1352
  }
1351
1353
  ),
1352
1354
  /* @__PURE__ */ o(
1353
- x,
1355
+ p,
1354
1356
  {
1355
1357
  sx: {
1356
1358
  alignItems: "center",
@@ -1362,8 +1364,8 @@ const de = ({ sx: t = {} }) => {
1362
1364
  pt: 14
1363
1365
  },
1364
1366
  children: [
1365
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "caption", children: r.overview.total_value }),
1366
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: E?.toLocaleString("en-US", {
1367
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1368
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1367
1369
  currency: "USD",
1368
1370
  maximumFractionDigits: 2,
1369
1371
  minimumFractionDigits: 2,
@@ -1379,14 +1381,14 @@ const de = ({ sx: t = {} }) => {
1379
1381
  }
1380
1382
  )
1381
1383
  },
1382
- s.guid
1384
+ a.guid
1383
1385
  );
1384
- const Be = W ? "grey.700" : "grey.400", We = w.length ? "text.primary" : Be;
1386
+ const ke = W ? "grey.700" : "grey.400", We = w.length ? "text.primary" : ke;
1385
1387
  return /* @__PURE__ */ o(
1386
1388
  _e,
1387
1389
  {
1388
- expanded: g[s.guid] === !0,
1389
- onChange: N ? Le(s.guid) : () => {
1390
+ expanded: h[a.guid] === !0,
1391
+ onChange: M ? Le(a.guid) : () => {
1390
1392
  },
1391
1393
  sx: {
1392
1394
  border: 1,
@@ -1401,15 +1403,15 @@ const de = ({ sx: t = {} }) => {
1401
1403
  "aria-controls": "panel1a-content",
1402
1404
  id: "panel1a-header",
1403
1405
  sx: [
1404
- g[s.guid] && {
1406
+ h[a.guid] && {
1405
1407
  borderBottom: 1,
1406
- borderColor: "divider",
1408
+ borderColor: "border.main",
1407
1409
  maxHeight: 88
1408
1410
  }
1409
1411
  ],
1410
1412
  children: [
1411
1413
  /* @__PURE__ */ o(
1412
- x,
1414
+ p,
1413
1415
  {
1414
1416
  sx: {
1415
1417
  alignItems: "center",
@@ -1419,27 +1421,27 @@ const de = ({ sx: t = {} }) => {
1419
1421
  width: "100%"
1420
1422
  },
1421
1423
  children: [
1422
- /* @__PURE__ */ e(B, { name: "expand_more", size: 20, sx: { color: We } }),
1424
+ /* @__PURE__ */ e(k, { name: "expand_more", size: 20, sx: { color: We } }),
1423
1425
  /* @__PURE__ */ e(
1424
- oe,
1426
+ ne,
1425
1427
  {
1426
- alt: s.institutionName || "",
1427
- institutionGuid: s.institution_guid || "",
1428
+ alt: a.institutionName || "",
1429
+ institutionGuid: a.institution_guid || "",
1428
1430
  size: 32
1429
1431
  }
1430
1432
  ),
1431
- /* @__PURE__ */ o(x, { sx: { alignItems: "flex-start" }, children: [
1432
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "caption", children: s.memberName }),
1433
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: s.user_name || s.name })
1433
+ /* @__PURE__ */ o(p, { sx: { alignItems: "flex-start" }, children: [
1434
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1435
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1434
1436
  ] })
1435
1437
  ]
1436
1438
  }
1437
1439
  ),
1438
- /* @__PURE__ */ o(x, { sx: { flexDirection: "row" }, children: [
1439
- /* @__PURE__ */ o(x, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1440
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "caption", children: r.overview.total_gain_Loss }),
1440
+ /* @__PURE__ */ o(p, { sx: { flexDirection: "row" }, children: [
1441
+ /* @__PURE__ */ o(p, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1442
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_gain_Loss }),
1441
1443
  /* @__PURE__ */ o(
1442
- x,
1444
+ p,
1443
1445
  {
1444
1446
  sx: {
1445
1447
  alignItems: "center",
@@ -1448,38 +1450,38 @@ const de = ({ sx: t = {} }) => {
1448
1450
  justifyContent: "flex-end"
1449
1451
  },
1450
1452
  children: [
1451
- S !== 0 && /* @__PURE__ */ e(
1452
- B,
1453
+ D !== 0 && /* @__PURE__ */ e(
1454
+ k,
1453
1455
  {
1454
- name: S >= 0 ? "trending_up" : "trending_down",
1456
+ name: D >= 0 ? "trending_up" : "trending_down",
1455
1457
  size: 20,
1456
- sx: { color: T(S) }
1458
+ sx: { color: T(D) }
1457
1459
  }
1458
1460
  ),
1459
1461
  /* @__PURE__ */ o(
1460
- i,
1462
+ r,
1461
1463
  {
1462
1464
  sx: {
1463
- color: T(S),
1465
+ color: T(D),
1464
1466
  fontWeight: 600
1465
1467
  },
1466
- variant: "body1",
1468
+ variant: "Body",
1467
1469
  children: [
1468
1470
  he.toFixed(2),
1469
1471
  "%"
1470
1472
  ]
1471
1473
  }
1472
1474
  ),
1473
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "caption", children: "|" }),
1475
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1474
1476
  /* @__PURE__ */ e(
1475
- i,
1477
+ r,
1476
1478
  {
1477
1479
  sx: {
1478
- color: T(S),
1480
+ color: T(D),
1479
1481
  fontWeight: 600
1480
1482
  },
1481
- variant: "body1",
1482
- children: Math.abs(S).toLocaleString("en-US", {
1483
+ variant: "Body",
1484
+ children: Math.abs(D).toLocaleString("en-US", {
1483
1485
  currency: "USD",
1484
1486
  maximumFractionDigits: 2,
1485
1487
  minimumFractionDigits: 2,
@@ -1491,9 +1493,9 @@ const de = ({ sx: t = {} }) => {
1491
1493
  }
1492
1494
  )
1493
1495
  ] }),
1494
- /* @__PURE__ */ e(x, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(x, { sx: { alignItems: "flex-end" }, children: [
1495
- /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "caption", children: r.overview.total_value }),
1496
- /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: E?.toLocaleString("en-US", {
1496
+ /* @__PURE__ */ e(p, { sx: { alignItems: "flex-end", gap: 12, pb: 14, pl: 16, pr: 16, pt: 14 }, children: /* @__PURE__ */ o(p, { sx: { alignItems: "flex-end" }, children: [
1497
+ /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1498
+ /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1497
1499
  currency: "USD",
1498
1500
  maximumFractionDigits: 2,
1499
1501
  minimumFractionDigits: 2,
@@ -1504,32 +1506,32 @@ const de = ({ sx: t = {} }) => {
1504
1506
  ]
1505
1507
  }
1506
1508
  ),
1507
- /* @__PURE__ */ e(we, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(re, { sx: { border: 1, borderColor: "neutral.light" }, children: /* @__PURE__ */ e(
1508
- ht,
1509
+ /* @__PURE__ */ e(we, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(ie, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ e(
1510
+ gt,
1509
1511
  {
1510
- currentEditedCostBasis: D,
1512
+ currentEditedCostBasis: S,
1511
1513
  data: w,
1512
- editingHoldingId: p,
1513
- handleCostBasisBlur: ee,
1514
- handleCostBasisChange: Z,
1514
+ editingHoldingId: g,
1515
+ handleCostBasisBlur: Z,
1516
+ handleCostBasisChange: J,
1515
1517
  handleCostBasisClick: j,
1516
1518
  handleCostBasisKeyDown: me
1517
1519
  }
1518
1520
  ) }) })
1519
1521
  ]
1520
1522
  },
1521
- s.guid
1523
+ a.guid
1522
1524
  );
1523
1525
  }),
1524
1526
  /* @__PURE__ */ e(de, {}),
1525
1527
  /* @__PURE__ */ e(
1526
- ut,
1528
+ ht,
1527
1529
  {
1528
1530
  accountHoldingsData: b,
1529
- currentEditedCostBasis: D,
1530
- editingHoldingId: p,
1531
- handleCostBasisBlur: ee,
1532
- handleCostBasisChange: Z,
1531
+ currentEditedCostBasis: S,
1532
+ editingHoldingId: g,
1533
+ handleCostBasisBlur: Z,
1534
+ handleCostBasisChange: J,
1533
1535
  handleCostBasisClick: j,
1534
1536
  handleCostBasisKeyDown: me,
1535
1537
  isOpen: u,
@@ -1539,71 +1541,72 @@ const de = ({ sx: t = {} }) => {
1539
1541
  /* @__PURE__ */ e(
1540
1542
  ge,
1541
1543
  {
1542
- onClose: () => d(!1),
1543
- showConnectionsWidget: y,
1544
- title: h.manage_connections
1544
+ onClose: () => y(!1),
1545
+ showConnectionsWidget: m,
1546
+ title: f.manage_connections
1545
1547
  }
1546
1548
  )
1547
- ] }) : /* @__PURE__ */ e(Se, {});
1548
- }, pt = $(gt), xt = ({ title: t }) => /* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: t }), rn = $(({ onBackClick: t, sx: g }) => {
1549
- const { onEvent: c } = be(), { onLoad: u } = je(), { isMobile: v } = H(), { visibleInvestmentAccounts: f } = le(), {
1550
- visibleHoldings: m,
1551
- setShowConnectionsWidget: a,
1552
- showConnectionsWidget: y
1553
- } = U(), { investments: d, accounts: b } = M(), { isCopyLoaded: l, isInitialized: h, setSelectedAccounts: r } = J(), [n, p] = A.useState(0), { loadHoldings: C } = U();
1554
- A.useEffect(() => {
1555
- r(f);
1556
- }, [f]), A.useEffect(() => {
1557
- h && C().finally(() => {
1558
- u?.("InvestmentsWidget");
1559
- });
1560
- }, [h]);
1561
- const D = () => {
1549
+ ] }) : /* @__PURE__ */ e(De, {});
1550
+ }, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: t }), ln = P(({ onBackClick: t, sx: h }) => {
1551
+ const { onEvent: c } = be(), { isMobile: u } = U(), { visibleInvestmentAccounts: x } = se(), {
1552
+ visibleHoldings: v,
1553
+ setShowConnectionsWidget: d,
1554
+ showConnectionsWidget: l
1555
+ } = H(), { investments: m, accounts: y } = G(), { isCopyLoaded: b, isInitialized: s, setSelectedAccounts: f } = Q(), [i, n] = A.useState(0), { loadHoldings: g, holdingsLoaded: C } = H();
1556
+ Ye({
1557
+ widgetName: "InvestmentsWidget",
1558
+ isLoaded: C
1559
+ }), A.useEffect(() => {
1560
+ f(x);
1561
+ }, [x]), A.useEffect(() => {
1562
+ s && g().finally();
1563
+ }, [s]);
1564
+ const S = () => {
1562
1565
  c(z.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
1563
1566
  };
1564
- if (!l || !h) return /* @__PURE__ */ e(Se, {});
1565
- const k = [
1567
+ if (!b || !s) return /* @__PURE__ */ e(De, {});
1568
+ const B = [
1566
1569
  z.INVESTMENT_WIDGET_DETAILS_CLICK,
1567
1570
  z.INVESTMENT_WIDGET_ALLOCATION_CLICK,
1568
1571
  z.INVESTMENT_WIDGET_ANALYSIS_CLICK
1569
- ], I = f.length === 0 && m.length === 0, W = [
1570
- d.tab_overview_title,
1571
- d.tab_allocation_title,
1572
- d.tab_analysis_title
1572
+ ], I = x.length === 0 && v.length === 0, W = [
1573
+ m.tab_overview_title,
1574
+ m.tab_allocation_title,
1575
+ m.tab_analysis_title
1573
1576
  ];
1574
1577
  return /* @__PURE__ */ o(
1575
- ze,
1578
+ je,
1576
1579
  {
1577
- accountOptions: f,
1578
- onAccountsFilterClick: D,
1580
+ accountOptions: x,
1581
+ onAccountsFilterClick: S,
1579
1582
  onBackClick: t,
1580
- sx: g,
1581
- title: d.title,
1583
+ sx: h,
1584
+ title: m.title,
1582
1585
  children: [
1583
- /* @__PURE__ */ o(_, { mx: v ? 0 : 48, my: 24, children: [
1586
+ /* @__PURE__ */ o(_, { mx: u ? 0 : 48, my: 24, children: [
1584
1587
  /* @__PURE__ */ e(
1585
- Ge,
1588
+ Ne,
1586
1589
  {
1587
- onChange: (G, F) => {
1588
- p(F), c(k[F]);
1590
+ onChange: (N, F) => {
1591
+ n(F), c(B[F]);
1589
1592
  },
1590
1593
  sx: { bgcolor: "background.paper" },
1591
1594
  textColor: "primary",
1592
- value: I ? -1 : n,
1595
+ value: I ? -1 : i,
1593
1596
  variant: "fullWidth",
1594
- children: W.map((G) => /* @__PURE__ */ e(Ee, { disabled: I, label: /* @__PURE__ */ e(xt, { title: G }) }, G))
1597
+ children: W.map((N) => /* @__PURE__ */ e(Ee, { disabled: I, label: /* @__PURE__ */ e(yt, { title: N }) }, N))
1595
1598
  }
1596
1599
  ),
1597
1600
  I ? /* @__PURE__ */ e(
1598
1601
  Qe,
1599
1602
  {
1600
- header: d.empty_state_header,
1603
+ header: m.empty_state_header,
1601
1604
  icon: "bid_landscape",
1602
1605
  onClick: () => {
1603
- a(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1606
+ d(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1604
1607
  },
1605
- primaryButton: d.overview.connect_accounts,
1606
- subText: d.empty_state_description,
1608
+ primaryButton: m.overview.connect_accounts,
1609
+ subText: m.empty_state_description,
1607
1610
  sx: {
1608
1611
  width: { sm: 432 },
1609
1612
  ".buttons-footer": {
@@ -1617,17 +1620,17 @@ const de = ({ sx: t = {} }) => {
1617
1620
  }
1618
1621
  }
1619
1622
  ) : /* @__PURE__ */ o(ae, { children: [
1620
- n === 0 && /* @__PURE__ */ e(pt, {}),
1621
- n === 1 && /* @__PURE__ */ e(rt, {}),
1622
- n === 2 && /* @__PURE__ */ e(dt, {})
1623
+ i === 0 && /* @__PURE__ */ e(xt, {}),
1624
+ i === 1 && /* @__PURE__ */ e(at, {}),
1625
+ i === 2 && /* @__PURE__ */ e(mt, {})
1623
1626
  ] })
1624
1627
  ] }),
1625
1628
  /* @__PURE__ */ e(
1626
1629
  ge,
1627
1630
  {
1628
- onClose: () => a(!1),
1629
- showConnectionsWidget: y,
1630
- title: b.manage_connections
1631
+ onClose: () => d(!1),
1632
+ showConnectionsWidget: l,
1633
+ title: y.manage_connections
1631
1634
  }
1632
1635
  )
1633
1636
  ]
@@ -1635,5 +1638,5 @@ const de = ({ sx: t = {} }) => {
1635
1638
  );
1636
1639
  });
1637
1640
  export {
1638
- rn as InvestmentsWidget
1641
+ ln as InvestmentsWidget
1639
1642
  };