@mx-cartographer/experiences 7.2.15-alpha.sms3 → 7.2.16-alpha.mm0

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.
@@ -1,5 +1,5 @@
1
1
  import { jsxs as o, jsx as e, Fragment as ae } from "react/jsx-runtime";
2
- import B, { useState as O } from "react";
2
+ import A, { useState as O } from "react";
3
3
  import { observer as P } from "mobx-react-lite";
4
4
  import _ from "@mui/material/Stack";
5
5
  import Ee from "@mui/material/Tab";
@@ -14,33 +14,33 @@ import te from "@mui/material/ListItem";
14
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 r, H1 as fe, P as ve, InstitutionLogo as ne } from "@mxenabled/mxui";
17
+ import { Text as i, H1 as fe, P as ve, InstitutionLogo as ne } from "@mxenabled/mxui";
18
18
  import Ue from "@mui/material/Button";
19
- import { u as E, g as be, t as H, b as Q, d as se } from "../hooks-D6XlXHf4.mjs";
20
- import { A as z, W as je } from "../WidgetContainer-EbrN1oIo.mjs";
21
- import { a as ze, f as oe } from "../NumberFormatting-Buh7u8Oi.mjs";
19
+ import { u as M, g as be, t as H, b as Q, d as se, n as je } from "../hooks-D6XlXHf4.mjs";
20
+ import { A as z, W as ze } from "../WidgetContainer-EbrN1oIo.mjs";
21
+ import { a as Oe, f as oe } from "../NumberFormatting-Buh7u8Oi.mjs";
22
22
  import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
23
23
  import le from "@mui/material/styles/useTheme";
24
24
  import { Icon as k } from "@mxenabled/mx-icons";
25
- import { D as Oe } from "../Donut-oaQFlbit.mjs";
26
- import { useTheme as Ve } from "@mui/material/styles";
27
- import { f as Re, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
28
- import Pe from "@mui/material/ListItemText";
25
+ import { D as Ve } from "../Donut-oaQFlbit.mjs";
26
+ import { useTheme as Re } from "@mui/material/styles";
27
+ import { f as Pe, A as V } from "../InvestmentUtil-jOyOgzIB.mjs";
28
+ import Xe from "@mui/material/ListItemText";
29
29
  import ce from "@mui/material/IconButton";
30
- import Xe from "@mui/material/Tooltip";
30
+ import $e from "@mui/material/Tooltip";
31
31
  import _e from "@mui/material/Accordion";
32
32
  import we from "@mui/material/AccordionDetails";
33
33
  import Ce from "@mui/material/AccordionSummary";
34
34
  import ie from "@mui/material/Paper";
35
- import p from "@mui/system/Stack";
35
+ import x from "@mui/system/Stack";
36
36
  import Se from "@mui/material/TextField";
37
- import { D as $e } from "../Drawer-kEE73B87.mjs";
38
- import { DataGridPro as qe } from "@mui/x-data-grid-pro";
39
- import { Stack as Ke } from "@mui/material";
37
+ import { D as qe } from "../Drawer-kEE73B87.mjs";
38
+ import { DataGridPro as Ke } from "@mui/x-data-grid-pro";
39
+ import { Stack as Ye } from "@mui/material";
40
40
  import { L as De } from "../Loader-DUaFpDGv.mjs";
41
- import { E as Ye } from "../EmptyState-DA_lfRBv.mjs";
41
+ import { E as Qe } from "../EmptyState-DA_lfRBv.mjs";
42
42
  const de = ({ sx: t = {} }) => {
43
- const { investments: h } = E(), { onEvent: c } = be(), { setShowConnectionsWidget: u } = H();
43
+ const { investments: g } = M(), { onEvent: c } = be(), { setShowConnectionsWidget: u } = H();
44
44
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", gap: 24, height: 164, p: 24, width: "100%", ...t }, children: [
45
45
  /* @__PURE__ */ o(
46
46
  _,
@@ -53,9 +53,9 @@ const de = ({ sx: t = {} }) => {
53
53
  textAlign: "center"
54
54
  },
55
55
  children: [
56
- /* @__PURE__ */ e(r, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: h.overview.investment_accounts_footer }),
56
+ /* @__PURE__ */ e(i, { sx: { fontWeight: 600, whiteSpace: "normal" }, variant: "Body", children: g.overview.investment_accounts_footer }),
57
57
  /* @__PURE__ */ e(
58
- r,
58
+ i,
59
59
  {
60
60
  sx: {
61
61
  color: "text.secondary",
@@ -63,7 +63,7 @@ const de = ({ sx: t = {} }) => {
63
63
  fontWeight: 400
64
64
  },
65
65
  variant: "ParagraphSmall",
66
- children: h.overview.connect_more_accounts_description
66
+ children: g.overview.connect_more_accounts_description
67
67
  }
68
68
  )
69
69
  ]
@@ -77,11 +77,11 @@ const de = ({ sx: t = {} }) => {
77
77
  },
78
78
  sx: { fontWeight: 600 },
79
79
  variant: "outlined",
80
- children: h.overview.connect_accounts
80
+ children: g.overview.connect_accounts
81
81
  }
82
82
  )
83
83
  ] });
84
- }, Qe = {
84
+ }, Je = {
85
85
  allocations_cash: "#AEDCCC",
86
86
  allocations_convertible: "#80CAD0",
87
87
  allocations_foreign_bond: "#51B9D4",
@@ -91,7 +91,7 @@ const de = ({ sx: t = {} }) => {
91
91
  allocations_unknown: "#161D6A",
92
92
  allocations_us_bond: "#254995",
93
93
  allocations_us_stock: "#1E2D84"
94
- }, Je = [
94
+ }, Ze = [
95
95
  {
96
96
  name: "allocations_cash"
97
97
  },
@@ -119,122 +119,122 @@ const de = ({ sx: t = {} }) => {
119
119
  {
120
120
  name: "allocations_unknown"
121
121
  }
122
- ], Ze = (t, h, c) => {
123
- const u = h, x = c;
124
- return t >= Math.min(u, x) && t < Math.max(u, x);
125
- }, et = (t, h, c) => {
122
+ ], et = (t, g, c) => {
123
+ const u = g, v = c;
124
+ return t >= Math.min(u, v) && t < Math.max(u, v);
125
+ }, tt = (t, g, c) => {
126
126
  const u = [
127
- ...new Set(t.map((d) => d.name.toLowerCase()))
127
+ ...new Set(t.map((m) => m.name.toLowerCase()))
128
128
  ];
129
- let x;
130
- return u.map((d) => {
131
- const l = t.reduce((m, y) => {
132
- const b = y.name;
133
- return b.toLowerCase() === d ? (x = b, Y(y) * y[h] / 100 + m) : m;
129
+ let v;
130
+ return u.map((m) => {
131
+ const s = t.reduce((y, d) => {
132
+ const b = d.name;
133
+ return b.toLowerCase() === m ? (v = b, Y(d) * d[g] / 100 + y) : y;
134
134
  }, 0);
135
135
  return {
136
- displayName: x,
137
- name: x,
138
- value: l,
139
- percentage: l / c
136
+ displayName: v,
137
+ name: v,
138
+ value: s,
139
+ percentage: s / c
140
140
  };
141
141
  });
142
- }, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, tt = (t, h, c) => {
143
- const u = Object.values(h.allocations_list), x = [];
144
- let v = 0;
145
- const d = t.map(({ guid: n }) => n), l = c.filter(({ account_guid: n }) => d.includes(n)).map((n) => ({
142
+ }, Y = (t) => t.calculated_market_value ? t.calculated_market_value : t.market_value, nt = (t, g, c) => {
143
+ const u = Object.values(g.allocations_list), v = [];
144
+ let f = 0;
145
+ const m = t.map(({ guid: n }) => n), s = c.filter(({ account_guid: n }) => m.includes(n)).map((n) => ({
146
146
  ...n,
147
147
  name: n.symbol || n.description,
148
148
  gainLoss: n.cost_basis || n.cost_basis === 0 ? Y(n) - n.cost_basis : 0
149
- })), { cashBalance: m, totalAccountBalance: y } = t.reduce(
150
- (n, g) => ({
151
- cashBalance: n.cashBalance + (g.cash_balance || 0),
152
- totalAccountBalance: n.totalAccountBalance + (g.balance || 0)
149
+ })), { cashBalance: y, totalAccountBalance: d } = t.reduce(
150
+ (n, p) => ({
151
+ cashBalance: n.cashBalance + (p.cash_balance || 0),
152
+ totalAccountBalance: n.totalAccountBalance + (p.balance || 0)
153
153
  }),
154
154
  { cashBalance: 0, totalAccountBalance: 0 }
155
- ), { marketValue: b, totalGainLoss: s } = l.reduce(
156
- (n, g) => ({
157
- marketValue: n.marketValue + Y(g),
158
- totalGainLoss: n.totalGainLoss + g.gainLoss
155
+ ), { marketValue: b, totalGainLoss: l } = s.reduce(
156
+ (n, p) => ({
157
+ marketValue: n.marketValue + Y(p),
158
+ totalGainLoss: n.totalGainLoss + p.gainLoss
159
159
  }),
160
160
  { marketValue: 0, totalGainLoss: 0 }
161
- ), f = b + m;
162
- Je.forEach((n, g) => {
163
- const C = l.filter(
164
- (W) => !!W[n.name]
161
+ ), h = b + y;
162
+ Ze.forEach((n, p) => {
163
+ const C = s.filter(
164
+ (I) => !!I[n.name]
165
165
  );
166
166
  let S = C.reduce(
167
- (W, A) => W + Y(A) * A[n.name] / 100,
167
+ (I, W) => I + Y(W) * W[n.name] / 100,
168
168
  0
169
169
  );
170
- const L = et(
170
+ const B = tt(
171
171
  C,
172
172
  n.name,
173
173
  S
174
174
  );
175
- if (n.name === "allocations_cash" && m > 0) {
176
- S += m;
177
- const W = {
178
- displayName: h.cash_balance_display_name,
175
+ if (n.name === "allocations_cash" && y > 0) {
176
+ S += y;
177
+ const I = {
178
+ displayName: g.cash_balance_display_name,
179
179
  name: "allocations_name",
180
- value: m,
181
- percentage: m / f
180
+ value: y,
181
+ percentage: y / h
182
182
  };
183
- L.push(W);
183
+ B.push(I);
184
184
  }
185
- S > 0 && (x.push({
185
+ S > 0 && (v.push({
186
186
  name: n.name,
187
- displayName: u[g],
188
- guid: `${n.name}-${g}`,
189
- holdings: L,
190
- percentage: S / f,
187
+ displayName: u[p],
188
+ guid: `${n.name}-${p}`,
189
+ holdings: B,
190
+ percentage: S / h,
191
191
  value: S,
192
- color: Qe[n.name]
193
- }), v += S);
192
+ color: Je[n.name]
193
+ }), f += S);
194
194
  });
195
- const i = x.map(
196
- ({ displayName: n, guid: g, color: C, value: S }) => ({
197
- id: g,
195
+ const r = v.map(
196
+ ({ displayName: n, guid: p, color: C, value: S }) => ({
197
+ id: p,
198
198
  color: C,
199
199
  label: n,
200
- value: S / v * 100
200
+ value: S / f * 100
201
201
  })
202
202
  );
203
203
  return {
204
- investmentsData: x,
205
- donutData: i,
206
- totalAmount: v,
207
- totalGainLoss: s,
208
- totalMarketValue: f,
209
- totalGainLossPercentage: s / y
204
+ investmentsData: v,
205
+ donutData: r,
206
+ totalAmount: f,
207
+ totalGainLoss: l,
208
+ totalMarketValue: h,
209
+ totalGainLossPercentage: l / d
210
210
  };
211
- }, re = (t) => t < 1e-3 ? "< 0.1%" : ze(t), R = (t) => t === 0 ? oe(t, "0,0.00") : Ze(t, -0.01, 0.01) ? "< $0.01" : oe(t, "0,0.00"), nt = ({
211
+ }, re = (t) => t < 1e-3 ? "< 0.1%" : Oe(t), R = (t) => t === 0 ? oe(t, "0,0.00") : et(t, -0.01, 0.01) ? "< $0.01" : oe(t, "0,0.00"), ot = ({
212
212
  data: t,
213
- onSelected: h,
213
+ onSelected: g,
214
214
  selectedId: c,
215
215
  selectedTabs: u,
216
- setSelectedTabs: x
216
+ setSelectedTabs: v
217
217
  }) => {
218
- const v = (s, f) => {
219
- f !== null && x(f);
220
- }, { isMobile: d } = U(), {
221
- investments: { allocation: l }
222
- } = E(), m = [
223
- { label: l.tabs_label_dollar, value: 0 },
224
- { label: l.tabs_label_percent, value: 1 }
225
- ], y = !t?.investmentsData.length, { isSmallMobile: b } = U();
226
- return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: d ? 250 : 412 }, children: [
218
+ const f = (l, h) => {
219
+ h !== null && v(h);
220
+ }, { isMobile: m } = U(), {
221
+ investments: { allocation: s }
222
+ } = M(), y = [
223
+ { label: s.tabs_label_dollar, value: 0 },
224
+ { label: s.tabs_label_percent, value: 1 }
225
+ ], d = !t?.investmentsData.length, { isSmallMobile: b } = U();
226
+ return /* @__PURE__ */ o(_, { sx: { mt: 15, gap: 12, width: m ? 250 : 412 }, children: [
227
227
  /* @__PURE__ */ e(
228
228
  ye,
229
229
  {
230
230
  exclusive: !0,
231
231
  fullWidth: !0,
232
- onChange: v,
233
- value: y ? -1 : u,
234
- 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))
232
+ onChange: f,
233
+ value: d ? -1 : u,
234
+ children: y.map(({ label: l, value: h }) => /* @__PURE__ */ e(xe, { color: "primary", value: h, children: /* @__PURE__ */ e(i, { bold: !0, textTransform: "capitalize", variant: "Body", children: l }) }, l))
235
235
  }
236
236
  ),
237
- /* @__PURE__ */ e(ee, { sx: { px: 12 }, children: t.investmentsData.map((s) => /* @__PURE__ */ o(B.Fragment, { children: [
237
+ /* @__PURE__ */ e(ee, { sx: { px: 12 }, children: t.investmentsData.map((l) => /* @__PURE__ */ o(A.Fragment, { children: [
238
238
  /* @__PURE__ */ e(
239
239
  te,
240
240
  {
@@ -246,8 +246,8 @@ const de = ({ sx: t = {} }) => {
246
246
  children: /* @__PURE__ */ o(
247
247
  He,
248
248
  {
249
- "aria-expanded": c === s.guid,
250
- onClick: () => h(s.guid),
249
+ "aria-expanded": c === l.guid,
250
+ onClick: () => g(l.guid),
251
251
  sx: { minHeight: 44, px: 12, py: 0 },
252
252
  children: [
253
253
  /* @__PURE__ */ e(
@@ -256,7 +256,7 @@ const de = ({ sx: t = {} }) => {
256
256
  borderRadius: 4,
257
257
  flexShrink: 0,
258
258
  height: 8,
259
- sx: { backgroundColor: s.color, mr: 8 },
259
+ sx: { backgroundColor: l.color, mr: 8 },
260
260
  width: 8
261
261
  }
262
262
  ),
@@ -268,8 +268,8 @@ const de = ({ sx: t = {} }) => {
268
268
  justifyContent: "space-between",
269
269
  width: "100%",
270
270
  children: [
271
- /* @__PURE__ */ e(r, { bold: c === s.guid, children: s.displayName }),
272
- /* @__PURE__ */ e(r, { bold: c === s.guid, variant: "Body", children: u === 0 ? R(s.value) : re(s.percentage) })
271
+ /* @__PURE__ */ e(i, { bold: c === l.guid, children: l.displayName }),
272
+ /* @__PURE__ */ e(i, { bold: c === l.guid, variant: "Body", children: u === 0 ? R(l.value) : re(l.percentage) })
273
273
  ]
274
274
  }
275
275
  )
@@ -279,8 +279,8 @@ const de = ({ sx: t = {} }) => {
279
279
  }
280
280
  ),
281
281
  /* @__PURE__ */ e(K, {}),
282
- s.holdings && s.holdings.length > 0 && /* @__PURE__ */ e(Ne, { in: c === s.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(ee, { children: [
283
- s?.holdings?.map((f) => /* @__PURE__ */ e(
282
+ l.holdings && l.holdings.length > 0 && /* @__PURE__ */ e(Ne, { in: c === l.guid, unmountOnExit: !0, children: /* @__PURE__ */ o(ee, { children: [
283
+ l?.holdings?.map((h) => /* @__PURE__ */ e(
284
284
  te,
285
285
  {
286
286
  sx: {
@@ -289,20 +289,20 @@ const de = ({ sx: t = {} }) => {
289
289
  py: 0
290
290
  },
291
291
  children: /* @__PURE__ */ o(_, { direction: "row", justifyContent: "space-between", width: "100%", children: [
292
- /* @__PURE__ */ o(r, { children: [
293
- f.displayName,
292
+ /* @__PURE__ */ o(i, { children: [
293
+ h.displayName,
294
294
  " "
295
295
  ] }),
296
- /* @__PURE__ */ e(r, { children: u === 0 ? R(f.value) : re(f.percentage) })
296
+ /* @__PURE__ */ e(i, { children: u === 0 ? R(h.value) : re(h.percentage) })
297
297
  ] })
298
298
  },
299
- f.displayName
299
+ h.displayName
300
300
  )),
301
301
  /* @__PURE__ */ e(K, {})
302
302
  ] }) })
303
- ] }, s.guid)) }),
304
- y ? /* @__PURE__ */ o(ae, { children: [
305
- /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: l.empty_data }),
303
+ ] }, l.guid)) }),
304
+ d ? /* @__PURE__ */ o(ae, { children: [
305
+ /* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: s.empty_data }),
306
306
  /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
307
307
  /* @__PURE__ */ e(
308
308
  de,
@@ -312,40 +312,40 @@ const de = ({ sx: t = {} }) => {
312
312
  }
313
313
  }
314
314
  )
315
- ] }) : u === 0 && /* @__PURE__ */ e(r, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${l.total_label_text} ${R(t.totalAmount)}` })
315
+ ] }) : u === 0 && /* @__PURE__ */ e(i, { bold: !0, sx: { textAlign: "right", pr: 24 }, children: `${s.total_label_text} ${R(t.totalAmount)}` })
316
316
  ] });
317
- }, ot = ({
317
+ }, it = ({
318
318
  data: t,
319
- hoveredId: h,
319
+ hoveredId: g,
320
320
  isPercentage: c,
321
321
  onMouseEnter: u,
322
- onMouseLeave: x,
323
- onSelected: v,
324
- selectedId: d,
325
- size: l = 150,
326
- totalLabel: m
322
+ onMouseLeave: v,
323
+ onSelected: f,
324
+ selectedId: m,
325
+ size: s = 150,
326
+ totalLabel: y
327
327
  }) => {
328
- const y = le(), b = y.palette.mode === "dark", s = B.useMemo(
329
- () => d ? t.investmentsData.find(({ guid: L }) => L === d) : void 0,
330
- [d]
328
+ const d = le(), b = d.palette.mode === "dark", l = A.useMemo(
329
+ () => m ? t.investmentsData.find(({ guid: B }) => B === m) : void 0,
330
+ [m]
331
331
  ), {
332
- investments: { allocation: f }
333
- } = E(), i = B.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;
332
+ investments: { allocation: h }
333
+ } = M(), r = A.useMemo(() => t.donutData.length > 0 ? t.donutData : [{ id: "0", color: d.palette.border.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 ? re(t.totalGainLossPercentage) : R(t.totalGainLoss), S = t.totalGainLoss >= 0 ? n : p;
334
334
  return /* @__PURE__ */ e(
335
- Oe,
335
+ Ve,
336
336
  {
337
- data: i,
338
- hoveredId: h,
339
- onClick: v,
337
+ data: r,
338
+ hoveredId: g,
339
+ onClick: f,
340
340
  onMouseEnter: u,
341
- onMouseLeave: x,
342
- selectedId: d,
343
- size: l,
344
- 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: [
345
- /* @__PURE__ */ e(r, { color: "text.secondary", noWrap: !0, children: s?.displayName ?? m }),
346
- /* @__PURE__ */ e(fe, { color: "text.primary", children: R(s?.value ?? t.totalMarketValue) }),
341
+ onMouseLeave: v,
342
+ selectedId: m,
343
+ size: s,
344
+ children: /* @__PURE__ */ e(_, { alignItems: "center", height: "100%", justifyContent: "center", width: "100%", children: /* @__PURE__ */ e(_, { alignItems: "center", justifyContent: "center", minHeight: s, minWidth: s, children: /* @__PURE__ */ o(_, { alignItems: "center", sx: { gap: { xs: 4, xl: 8 }, mb: { xs: 4, xl: 8 } }, children: [
345
+ /* @__PURE__ */ e(i, { color: "text.secondary", noWrap: !0, children: l?.displayName ?? y }),
346
+ /* @__PURE__ */ e(fe, { color: "text.primary", children: R(l?.value ?? t.totalMarketValue) }),
347
347
  /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
348
- !s && /* @__PURE__ */ e(
348
+ !l && /* @__PURE__ */ e(
349
349
  k,
350
350
  {
351
351
  name: t.totalGainLoss >= 0 ? "trending_up" : "trending_down",
@@ -354,7 +354,7 @@ const de = ({ sx: t = {} }) => {
354
354
  }
355
355
  ),
356
356
  /* @__PURE__ */ e(
357
- r,
357
+ i,
358
358
  {
359
359
  sx: {
360
360
  color: S,
@@ -368,21 +368,21 @@ const de = ({ sx: t = {} }) => {
368
368
  ] }) }) })
369
369
  }
370
370
  );
371
- }, it = () => {
372
- const [t, h] = B.useState(0), [c, u] = B.useState(""), [x, v] = B.useState(""), d = (n) => {
373
- c !== n ? u(n) : (u(""), v(""));
374
- }, { selectedAccountGuids: l } = Q(), { visibleHoldings: m } = H(), { visibleInvestmentAccounts: y } = se(), {
371
+ }, rt = () => {
372
+ const [t, g] = A.useState(0), [c, u] = A.useState(""), [v, f] = A.useState(""), m = (n) => {
373
+ c !== n ? u(n) : (u(""), f(""));
374
+ }, { selectedAccountGuids: s } = Q(), { visibleHoldings: y } = H(), { visibleInvestmentAccounts: d } = se(), {
375
375
  investments: { allocation: b }
376
- } = E(), s = tt(
377
- y.filter(({ guid: n }) => l.includes(n)),
376
+ } = M(), l = nt(
377
+ d.filter(({ guid: n }) => s.includes(n)),
378
378
  b,
379
- m
380
- ), { isMobile: f } = U(), i = pe("(max-width:768px)");
379
+ y
380
+ ), { isMobile: h } = U(), r = pe("(max-width:768px)");
381
381
  return /* @__PURE__ */ o(
382
382
  _,
383
383
  {
384
- alignItems: i ? "center" : "flex-start",
385
- direction: i ? "column" : "row",
384
+ alignItems: r ? "center" : "flex-start",
385
+ direction: r ? "column" : "row",
386
386
  gap: { xs: 16, md: 64, xl: 100 },
387
387
  sx: {
388
388
  justifyContent: "center",
@@ -391,47 +391,47 @@ const de = ({ sx: t = {} }) => {
391
391
  },
392
392
  children: [
393
393
  /* @__PURE__ */ e(
394
- ot,
394
+ it,
395
395
  {
396
- data: s,
397
- hoveredId: x,
396
+ data: l,
397
+ hoveredId: v,
398
398
  isPercentage: t === 1,
399
399
  onMouseEnter: (n) => {
400
- c === n ? v("") : c || v(n);
400
+ c === n ? f("") : c || f(n);
401
401
  },
402
402
  onMouseLeave: () => {
403
- v("");
403
+ f("");
404
404
  },
405
- onSelected: d,
405
+ onSelected: m,
406
406
  selectedId: c,
407
- size: f ? 280 : 400,
407
+ size: h ? 280 : 400,
408
408
  totalLabel: b.pie_chart_centered_text
409
409
  }
410
410
  ),
411
411
  /* @__PURE__ */ e(
412
- nt,
412
+ ot,
413
413
  {
414
- data: s,
415
- onSelected: d,
414
+ data: l,
415
+ onSelected: m,
416
416
  selectedId: c,
417
417
  selectedTabs: t,
418
- setSelectedTabs: h
418
+ setSelectedTabs: g
419
419
  }
420
420
  )
421
421
  ]
422
422
  }
423
423
  );
424
- }, rt = P(it), at = ({
424
+ }, at = P(rt), st = ({
425
425
  analysisDetails: t,
426
- analysisType: h,
426
+ analysisType: g,
427
427
  copy: c,
428
428
  setAnalysisType: u
429
429
  }) => {
430
- const { isSmallMobile: x } = U(), v = B.useMemo(() => Object.keys(t).filter((l) => t[l] >= 1).map((l) => ({
431
- key: l,
432
- value: oe(t[l], "0,0"),
433
- formattedKey: Re(l)
434
- })), [t]), d = [
430
+ const { isSmallMobile: v } = U(), f = A.useMemo(() => Object.keys(t).filter((s) => t[s] >= 1).map((s) => ({
431
+ key: s,
432
+ value: oe(t[s], "0,0"),
433
+ formattedKey: Pe(s)
434
+ })), [t]), m = [
435
435
  { label: c.equities, value: V.Stocks },
436
436
  { label: c.bonds, value: V.Bonds }
437
437
  ];
@@ -441,7 +441,7 @@ const de = ({ sx: t = {} }) => {
441
441
  {
442
442
  color: "primary",
443
443
  exclusive: !0,
444
- onChange: (l, m) => m && u(m),
444
+ onChange: (s, y) => y && u(y),
445
445
  sx: {
446
446
  width: "100%",
447
447
  "& .MuiToggleButton-root": {
@@ -450,11 +450,11 @@ const de = ({ sx: t = {} }) => {
450
450
  textTransform: "capitalize"
451
451
  }
452
452
  },
453
- value: v.length ? h : -1,
454
- children: d.map(({ label: l, value: m }) => /* @__PURE__ */ e(xe, { sx: { width: "100%" }, value: m, children: l }, m))
453
+ value: f.length ? g : -1,
454
+ children: m.map(({ label: s, value: y }) => /* @__PURE__ */ e(xe, { sx: { width: "100%" }, value: y, children: s }, y))
455
455
  }
456
456
  ),
457
- v.length ? /* @__PURE__ */ e(
457
+ f.length ? /* @__PURE__ */ e(
458
458
  ee,
459
459
  {
460
460
  sx: {
@@ -462,55 +462,55 @@ const de = ({ sx: t = {} }) => {
462
462
  "& .MuiListItem-divider": { borderColor: "border.light" },
463
463
  "& .MuiListItem-root": { minHeight: 44, px: 12 }
464
464
  },
465
- children: v.map(({ value: l, formattedKey: m }) => /* @__PURE__ */ e(te, { divider: !0, secondaryAction: /* @__PURE__ */ e(r, { children: l }), children: /* @__PURE__ */ e(
466
- Pe,
465
+ children: f.map(({ value: s, formattedKey: y }) => /* @__PURE__ */ e(te, { divider: !0, secondaryAction: /* @__PURE__ */ e(i, { children: s }), children: /* @__PURE__ */ e(
466
+ Xe,
467
467
  {
468
- primary: m,
468
+ primary: y,
469
469
  primaryTypographyProps: { fontStyle: "normal" }
470
470
  }
471
- ) }, m))
471
+ ) }, y))
472
472
  }
473
473
  ) : /* @__PURE__ */ o(ae, { children: [
474
- /* @__PURE__ */ e(r, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
474
+ /* @__PURE__ */ e(i, { sx: { color: "secondary.main", p: 8, textAlign: "center" }, children: c.empty_data }),
475
475
  /* @__PURE__ */ e(K, { sx: { borderColor: "border.light" } }),
476
476
  /* @__PURE__ */ e(
477
477
  de,
478
478
  {
479
479
  sx: {
480
- ".inner-container": { width: x ? "100%" : 364 }
480
+ ".inner-container": { width: v ? "100%" : 364 }
481
481
  }
482
482
  }
483
483
  )
484
484
  ] })
485
485
  ] });
486
- }, st = ({ body: t, title: h }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
487
- /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: h }),
486
+ }, lt = ({ body: t, title: g }) => /* @__PURE__ */ o(_, { sx: { gap: 4, p: 12 }, children: [
487
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: g }),
488
488
  /* @__PURE__ */ e(ve, { variant: "ParagraphSmall", children: t })
489
- ] }), lt = ({
489
+ ] }), ct = ({
490
490
  placement: t = "bottom",
491
- tooltip_info_body: h,
491
+ tooltip_info_body: g,
492
492
  tooltip_info_title: c
493
493
  }) => /* @__PURE__ */ e(
494
- Xe,
494
+ $e,
495
495
  {
496
496
  enterTouchDelay: 500,
497
497
  placement: t,
498
- title: /* @__PURE__ */ e(st, { body: h, title: c }),
498
+ title: /* @__PURE__ */ e(lt, { body: g, title: c }),
499
499
  children: /* @__PURE__ */ e(ce, { "aria-label": c, sx: { minHeight: 0, minWidth: 0, p: 0 }, children: /* @__PURE__ */ e(k, { name: "info", sx: { color: "info.main" } }) })
500
500
  }
501
- ), ct = () => {
501
+ ), dt = () => {
502
502
  const {
503
503
  investments: { analysis: t }
504
- } = E(), { 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 } = B.useMemo(() => {
505
- 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);
506
- return { cellDimension: d ? 72 : 100, columns: n, rows: g, textVariant: d ? "XSmall" : "Body" };
507
- }, [t, d, u]);
504
+ } = M(), { analysisChartData: g, analysisDetails: c, analysisType: u, setAnalysisType: v } = H(), f = pe("(min-width:320px) and (max-width:375px)"), { isMobile: m } = U(), y = Re().palette.mode === "dark", { cellDimension: d, columns: b, rows: l, textVariant: h } = A.useMemo(() => {
505
+ 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);
506
+ return { cellDimension: m ? 72 : 100, columns: n, rows: p, textVariant: m ? "XSmall" : "Body" };
507
+ }, [t, m, u]);
508
508
  return /* @__PURE__ */ o(
509
509
  _,
510
510
  {
511
511
  sx: {
512
512
  flexDirection: { md: "row" },
513
- gap: d ? 48 : 64,
513
+ gap: m ? 48 : 64,
514
514
  justifyContent: "center",
515
515
  pt: 48,
516
516
  px: 16
@@ -531,34 +531,34 @@ const de = ({ sx: t = {} }) => {
531
531
  {
532
532
  sx: {
533
533
  alignItems: "center",
534
- bottom: d ? 10 : 24,
535
- gap: d ? 0 : 24,
534
+ bottom: m ? 10 : 24,
535
+ gap: m ? 0 : 24,
536
536
  position: "relative",
537
537
  transform: "rotate(-180deg)",
538
538
  writingMode: "vertical-rl"
539
539
  },
540
540
  children: [
541
- /* @__PURE__ */ e(ve, { bold: !0, color: "secondary.main", variant: f, children: u === V.Stocks ? t.market_capitalization : t.credit_quality }),
541
+ /* @__PURE__ */ e(ve, { bold: !0, color: "secondary.main", variant: h, children: u === V.Stocks ? t.market_capitalization : t.credit_quality }),
542
542
  /* @__PURE__ */ e(
543
543
  _,
544
544
  {
545
545
  sx: {
546
546
  flexDirection: "row",
547
- height: d ? 224 : 308,
547
+ height: m ? 224 : 308,
548
548
  justifyContent: "space-around"
549
549
  },
550
- children: b.map((i) => /* @__PURE__ */ e(
551
- r,
550
+ children: b.map((r) => /* @__PURE__ */ e(
551
+ i,
552
552
  {
553
553
  sx: {
554
554
  color: "secondary.main",
555
555
  pl: 12,
556
- pr: d ? 4 : 0
556
+ pr: m ? 4 : 0
557
557
  },
558
- variant: f,
559
- children: i
558
+ variant: h,
559
+ children: r
560
560
  },
561
- i
561
+ r
562
562
  ))
563
563
  }
564
564
  )
@@ -570,15 +570,15 @@ const de = ({ sx: t = {} }) => {
570
570
  _,
571
571
  {
572
572
  sx: {
573
- alignSelf: v ? "start" : "center",
573
+ alignSelf: f ? "start" : "center",
574
574
  flexDirection: "row",
575
575
  gap: 8,
576
576
  pb: 12
577
577
  },
578
578
  children: [
579
- /* @__PURE__ */ e(r, { bold: !0, children: t.invest_analysis }),
579
+ /* @__PURE__ */ e(i, { bold: !0, children: t.invest_analysis }),
580
580
  /* @__PURE__ */ e(
581
- lt,
581
+ ct,
582
582
  {
583
583
  tooltip_info_body: t.tooltip_info_body,
584
584
  tooltip_info_title: t.tooltip_info_title
@@ -587,33 +587,33 @@ const de = ({ sx: t = {} }) => {
587
587
  ]
588
588
  }
589
589
  ),
590
- h.map((i, n, g) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: i.map((C, S) => {
591
- const L = n === 0, W = n === g.length - 1, A = S === 0, G = S === i.length - 1, N = Number(C.replace("%", "")) >= 25;
590
+ g.map((r, n, p) => /* @__PURE__ */ e(_, { sx: { flexDirection: "row", gap: 4 }, children: r.map((C, S) => {
591
+ const B = n === 0, I = n === p.length - 1, W = S === 0, G = S === r.length - 1, F = Number(C.replace("%", "")) >= 25;
592
592
  let T = "grey.200", j = "grey.900";
593
- return m ? (T = N ? "grey.200" : "grey.700", j = N ? "grey.900" : "common.white") : (T = N ? "grey.700" : "grey.200", j = N ? "common.white" : "grey.900"), /* @__PURE__ */ e(
593
+ 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
594
  _,
595
595
  {
596
596
  sx: {
597
597
  ...{
598
- borderBottomLeftRadius: W && A ? 4 : 0,
599
- borderBottomRightRadius: W && G ? 4 : 0,
600
- borderTopLeftRadius: L && A ? 4 : 0,
601
- borderTopRightRadius: L && G ? 4 : 0
598
+ borderBottomLeftRadius: I && W ? 4 : 0,
599
+ borderBottomRightRadius: I && G ? 4 : 0,
600
+ borderTopLeftRadius: B && W ? 4 : 0,
601
+ borderTopRightRadius: B && G ? 4 : 0
602
602
  },
603
603
  alignItems: "center",
604
604
  bgcolor: T,
605
- height: y,
605
+ height: d,
606
606
  justifyContent: "center",
607
- width: y
607
+ width: d
608
608
  },
609
609
  children: /* @__PURE__ */ e(
610
- r,
610
+ i,
611
611
  {
612
612
  sx: {
613
613
  color: j,
614
- fontWeight: d ? 600 : 700
614
+ fontWeight: m ? 600 : 700
615
615
  },
616
- variant: d ? "Body" : "H3",
616
+ variant: m ? "Body" : "H3",
617
617
  children: C
618
618
  }
619
619
  )
@@ -621,13 +621,13 @@ const de = ({ sx: t = {} }) => {
621
621
  S
622
622
  );
623
623
  }) }, n)),
624
- /* @__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
+ /* @__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
625
  /* @__PURE__ */ e(
626
- r,
626
+ i,
627
627
  {
628
628
  bold: !0,
629
- sx: { color: "secondary.main", pt: d ? 4 : 24, textAlign: "center" },
630
- variant: f,
629
+ sx: { color: "secondary.main", pt: m ? 4 : 24, textAlign: "center" },
630
+ variant: h,
631
631
  children: u === V.Stocks ? t.valuation : t.duration
632
632
  }
633
633
  )
@@ -636,7 +636,7 @@ const de = ({ sx: t = {} }) => {
636
636
  }
637
637
  ),
638
638
  /* @__PURE__ */ e(
639
- at,
639
+ st,
640
640
  {
641
641
  analysisDetails: c,
642
642
  analysisType: u,
@@ -645,38 +645,38 @@ const de = ({ sx: t = {} }) => {
645
645
  equities: t.equities,
646
646
  bonds: t.bonds
647
647
  },
648
- setAnalysisType: x
648
+ setAnalysisType: v
649
649
  }
650
650
  )
651
651
  ]
652
652
  }
653
653
  );
654
- }, dt = P(ct), mt = ({
654
+ }, mt = P(dt), ut = ({
655
655
  accountHoldingsData: t,
656
- currentEditedCostBasis: h,
656
+ currentEditedCostBasis: g,
657
657
  editingHoldingId: c,
658
658
  handleCostBasisBlur: u,
659
- handleCostBasisClick: x,
660
- handleCostBasisChange: v,
661
- handleCostBasisKeyDown: d,
662
- isOpen: l,
663
- onClose: m
659
+ handleCostBasisClick: v,
660
+ handleCostBasisChange: f,
661
+ handleCostBasisKeyDown: m,
662
+ isOpen: s,
663
+ onClose: y
664
664
  }) => {
665
- const { investments: y } = E(), [b, s] = B.useState({}), f = (i) => (n, g) => {
666
- s((C) => ({
665
+ const { investments: d } = M(), [b, l] = A.useState({}), h = (r) => (n, p) => {
666
+ l((C) => ({
667
667
  ...C,
668
- [i]: g
668
+ [r]: p
669
669
  }));
670
670
  };
671
671
  return /* @__PURE__ */ o(
672
- $e,
672
+ qe,
673
673
  {
674
- ariaLabelClose: y.overview.close_investment_drawer,
675
- isOpen: l,
676
- onClose: m,
677
- title: y.overview.investment_details,
674
+ ariaLabelClose: d.overview.close_investment_drawer,
675
+ isOpen: s,
676
+ onClose: y,
677
+ title: d.overview.investment_details,
678
678
  children: [
679
- /* @__PURE__ */ o(p, { sx: { gap: 8, p: 24 }, children: [
679
+ /* @__PURE__ */ o(x, { sx: { gap: 8, p: 24 }, children: [
680
680
  /* @__PURE__ */ e(
681
681
  ne,
682
682
  {
@@ -685,11 +685,11 @@ const de = ({ sx: t = {} }) => {
685
685
  size: 64
686
686
  }
687
687
  ),
688
- /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
689
- /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
690
- /* @__PURE__ */ o(p, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
691
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: y.overview.current_balance }),
692
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
688
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Small", children: t.accounts.memberName }),
689
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "H2", children: t.accounts.user_name || t.accounts.name }),
690
+ /* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [
691
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: d.overview.current_balance }),
692
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: t.accounts.balance?.toLocaleString("en-US", {
693
693
  currency: "USD",
694
694
  maximumFractionDigits: 2,
695
695
  minimumFractionDigits: 2,
@@ -698,7 +698,7 @@ const de = ({ sx: t = {} }) => {
698
698
  ] })
699
699
  ] }),
700
700
  /* @__PURE__ */ o(
701
- p,
701
+ x,
702
702
  {
703
703
  sx: {
704
704
  bgcolor: "background.default",
@@ -708,19 +708,19 @@ const de = ({ sx: t = {} }) => {
708
708
  py: 10
709
709
  },
710
710
  children: [
711
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: y.overview.holding }),
712
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: y.overview.market_value })
711
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: d.overview.holding }),
712
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 700 }, variant: "XSmall", children: d.overview.market_value })
713
713
  ]
714
714
  }
715
715
  ),
716
- t.holdings?.map((i, n) => {
717
- const g = c === i.id;
716
+ t.holdings?.map((r, n) => {
717
+ const p = c === r.id;
718
718
  return /* @__PURE__ */ o(
719
719
  _e,
720
720
  {
721
721
  disableGutters: !0,
722
- expanded: b[i.id] === !0,
723
- onChange: i ? f(i?.id) : () => {
722
+ expanded: b[r.id] === !0,
723
+ onChange: r ? h(r?.id) : () => {
724
724
  },
725
725
  sx: {
726
726
  ":before": n === 0 ? { opacity: 0 } : {},
@@ -734,15 +734,15 @@ const de = ({ sx: t = {} }) => {
734
734
  id: "panel1a-header",
735
735
  sx: [
736
736
  { height: 64 },
737
- b[i.id] && n > 0 && {
737
+ b[r.id] && n > 0 && {
738
738
  borderTop: 1,
739
739
  borderColor: "border.main"
740
740
  }
741
741
  ],
742
- children: /* @__PURE__ */ o(p, { sx: { flexDirection: "row", width: "100%" }, children: [
742
+ children: /* @__PURE__ */ o(x, { sx: { flexDirection: "row", width: "100%" }, children: [
743
743
  /* @__PURE__ */ e("div", { style: { width: 24 } }),
744
744
  /* @__PURE__ */ o(
745
- p,
745
+ x,
746
746
  {
747
747
  sx: [
748
748
  {
@@ -753,28 +753,28 @@ const de = ({ sx: t = {} }) => {
753
753
  py: 14,
754
754
  width: "100%"
755
755
  },
756
- b[i.id] && {
756
+ b[r.id] && {
757
757
  borderBottom: 1,
758
758
  borderColor: "border.main"
759
759
  }
760
760
  ],
761
761
  children: [
762
762
  /* @__PURE__ */ e(
763
- p,
763
+ x,
764
764
  {
765
765
  sx: {
766
766
  alignItems: "center",
767
767
  flexDirection: "row",
768
768
  gap: 12
769
769
  },
770
- children: /* @__PURE__ */ o(p, { sx: { overflow: "hidden", width: 98 }, children: [
771
- /* @__PURE__ */ e(r, { sx: { fontWeight: 600 }, variant: "Body", children: i.holding }),
772
- /* @__PURE__ */ e(r, { variant: "XSmall", children: i.description })
770
+ children: /* @__PURE__ */ o(x, { sx: { overflow: "hidden", width: 98 }, children: [
771
+ /* @__PURE__ */ e(i, { sx: { fontWeight: 600 }, variant: "Body", children: r.holding }),
772
+ /* @__PURE__ */ e(i, { variant: "XSmall", children: r.description })
773
773
  ] })
774
774
  }
775
775
  ),
776
776
  /* @__PURE__ */ o(
777
- p,
777
+ x,
778
778
  {
779
779
  sx: {
780
780
  alignItems: "center",
@@ -784,47 +784,47 @@ const de = ({ sx: t = {} }) => {
784
784
  justifyContent: "flex-end"
785
785
  },
786
786
  children: [
787
- /* @__PURE__ */ o(p, { children: [
788
- /* @__PURE__ */ e(r, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: i.marketValue?.toLocaleString("en-US", {
787
+ /* @__PURE__ */ o(x, { children: [
788
+ /* @__PURE__ */ e(i, { sx: { fontWeight: 600, textAlign: "right" }, variant: "Body", children: r.marketValue?.toLocaleString("en-US", {
789
789
  currency: "USD",
790
790
  maximumFractionDigits: 2,
791
791
  minimumFractionDigits: 2,
792
792
  style: "currency"
793
793
  }) }),
794
- /* @__PURE__ */ o(p, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
795
- i.totalGainLoss !== 0 && /* @__PURE__ */ e(
794
+ /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 2, flexDirection: "row" }, children: [
795
+ r.totalGainLoss !== 0 && /* @__PURE__ */ e(
796
796
  k,
797
797
  {
798
- name: i.totalGainLoss >= 0 ? "trending_up" : "trending_down",
798
+ name: r.totalGainLoss >= 0 ? "trending_up" : "trending_down",
799
799
  size: 12,
800
800
  sx: {
801
801
  verticalAlign: "middle",
802
802
  mr: 1,
803
- color: i.totalGainLoss >= 0 ? "success.main" : "grey.700"
803
+ color: r.totalGainLoss >= 0 ? "success.main" : "grey.700"
804
804
  }
805
805
  }
806
806
  ),
807
807
  /* @__PURE__ */ e(
808
- r,
808
+ i,
809
809
  {
810
810
  sx: {
811
- color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
812
- fontWeight: i.totalGainLoss <= 0 ? 400 : 700
811
+ color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
812
+ fontWeight: r.totalGainLoss <= 0 ? 400 : 700
813
813
  },
814
814
  variant: "XSmall",
815
- children: i.costBasis ? `${(i.totalGainLoss / i.costBasis * 100).toFixed(2)}%` : "0.00%"
815
+ children: r.costBasis ? `${(r.totalGainLoss / r.costBasis * 100).toFixed(2)}%` : "0.00%"
816
816
  }
817
817
  ),
818
- /* @__PURE__ */ e(r, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
818
+ /* @__PURE__ */ e(i, { sx: { color: "grey.700" }, variant: "XSmall", children: "|" }),
819
819
  /* @__PURE__ */ e(
820
- r,
820
+ i,
821
821
  {
822
822
  sx: {
823
- color: i.totalGainLoss <= 0 ? "grey.700" : "success.main",
824
- fontWeight: i.totalGainLoss <= 0 ? 400 : 700
823
+ color: r.totalGainLoss <= 0 ? "grey.700" : "success.main",
824
+ fontWeight: r.totalGainLoss <= 0 ? 400 : 700
825
825
  },
826
826
  variant: "XSmall",
827
- children: Math.abs(i.totalGainLoss).toLocaleString("en-US", {
827
+ children: Math.abs(r.totalGainLoss).toLocaleString("en-US", {
828
828
  currency: "USD",
829
829
  maximumFractionDigits: 2,
830
830
  minimumFractionDigits: 2,
@@ -837,7 +837,7 @@ const de = ({ sx: t = {} }) => {
837
837
  /* @__PURE__ */ e(
838
838
  k,
839
839
  {
840
- name: b[i.id] ? "expand_less" : "expand_more",
840
+ name: b[r.id] ? "expand_less" : "expand_more",
841
841
  size: 20
842
842
  }
843
843
  )
@@ -851,7 +851,7 @@ const de = ({ sx: t = {} }) => {
851
851
  }
852
852
  ),
853
853
  /* @__PURE__ */ e(we, { children: /* @__PURE__ */ o(
854
- p,
854
+ x,
855
855
  {
856
856
  sx: {
857
857
  alignItems: "center",
@@ -860,10 +860,10 @@ const de = ({ sx: t = {} }) => {
860
860
  pl: 24
861
861
  },
862
862
  children: [
863
- /* @__PURE__ */ e(p, { sx: { width: 32 } }),
864
- /* @__PURE__ */ o(p, { sx: { flex: 1 }, children: [
863
+ /* @__PURE__ */ e(x, { sx: { width: 32 } }),
864
+ /* @__PURE__ */ o(x, { sx: { flex: 1 }, children: [
865
865
  /* @__PURE__ */ o(
866
- p,
866
+ x,
867
867
  {
868
868
  sx: {
869
869
  alignItems: "center",
@@ -875,13 +875,13 @@ const de = ({ sx: t = {} }) => {
875
875
  pr: 24
876
876
  },
877
877
  children: [
878
- /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: y.overview.quantity }),
879
- /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Small", children: i.qty })
878
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Body", children: d.overview.quantity }),
879
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Small", children: r.qty })
880
880
  ]
881
881
  }
882
882
  ),
883
883
  /* @__PURE__ */ o(
884
- p,
884
+ x,
885
885
  {
886
886
  sx: {
887
887
  alignItems: "center",
@@ -891,9 +891,9 @@ const de = ({ sx: t = {} }) => {
891
891
  pr: 24
892
892
  },
893
893
  children: [
894
- /* @__PURE__ */ e(r, { sx: { color: "text.primary" }, variant: "Body", children: y.overview.cost_basis_header }),
894
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary" }, variant: "Body", children: d.overview.cost_basis_header }),
895
895
  /* @__PURE__ */ o(
896
- p,
896
+ x,
897
897
  {
898
898
  direction: "row",
899
899
  sx: {
@@ -901,13 +901,13 @@ const de = ({ sx: t = {} }) => {
901
901
  gap: 4
902
902
  },
903
903
  children: [
904
- g ? /* @__PURE__ */ e(
904
+ p ? /* @__PURE__ */ e(
905
905
  Se,
906
906
  {
907
907
  autoFocus: !0,
908
- onBlur: () => u(i.id),
909
- onChange: v,
910
- onKeyDown: (C) => d(C, i.id),
908
+ onBlur: () => u(r.id),
909
+ onChange: f,
910
+ onKeyDown: (C) => m(C, r.id),
911
911
  size: "small",
912
912
  sx: {
913
913
  fontSize: 14,
@@ -922,9 +922,9 @@ const de = ({ sx: t = {} }) => {
922
922
  border: "none"
923
923
  }
924
924
  },
925
- value: h
925
+ value: g
926
926
  }
927
- ) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: i.costBasis?.toLocaleString("en-US", {
927
+ ) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 58 }, variant: "Small", children: r.costBasis?.toLocaleString("en-US", {
928
928
  currency: "USD",
929
929
  maximumFractionDigits: 2,
930
930
  minimumFractionDigits: 2,
@@ -933,7 +933,7 @@ const de = ({ sx: t = {} }) => {
933
933
  /* @__PURE__ */ e(
934
934
  ce,
935
935
  {
936
- onClick: () => x(i.id, i.costBasis),
936
+ onClick: () => v(r.id, r.costBasis),
937
937
  sx: { minWidth: 16, minHeight: 16 },
938
938
  children: /* @__PURE__ */ e(k, { name: "stylus", size: 16, sx: { color: "grey.700" } })
939
939
  }
@@ -950,28 +950,28 @@ const de = ({ sx: t = {} }) => {
950
950
  ) })
951
951
  ]
952
952
  },
953
- i.id
953
+ r.id
954
954
  );
955
955
  })
956
956
  ]
957
957
  }
958
958
  );
959
- }, ut = P(mt), q = (t) => /* @__PURE__ */ o(Ke, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
960
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
959
+ }, ht = P(ut), q = (t) => /* @__PURE__ */ o(Ye, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
960
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600, fontSize: 14 }, variant: "Small", children: t.colDef.headerName }),
961
961
  /* @__PURE__ */ e(k, { name: "expand_all", size: 12 })
962
- ] }), ht = ({
962
+ ] }), gt = ({
963
963
  data: t,
964
- editingHoldingId: h,
964
+ editingHoldingId: g,
965
965
  currentEditedCostBasis: c,
966
966
  handleCostBasisClick: u,
967
- handleCostBasisChange: x,
968
- handleCostBasisKeyDown: v,
969
- handleCostBasisBlur: d
967
+ handleCostBasisChange: v,
968
+ handleCostBasisKeyDown: f,
969
+ handleCostBasisBlur: m
970
970
  }) => {
971
- const { investments: l } = E(), 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
+ const { investments: s } = M(), d = le().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
972
  {
973
973
  field: "qty",
974
- headerName: l.overview.qty_header,
974
+ headerName: s.overview.qty_header,
975
975
  sortable: !1,
976
976
  width: 48,
977
977
  align: "center",
@@ -979,29 +979,29 @@ const de = ({ sx: t = {} }) => {
979
979
  },
980
980
  {
981
981
  field: "holding",
982
- headerName: l.overview.holding_header,
982
+ headerName: s.overview.holding_header,
983
983
  flex: 1,
984
984
  renderHeader: q,
985
985
  renderCell: (n) => /* @__PURE__ */ e(_, { sx: { alignItems: "center", gap: 16, flexDirection: "row" }, children: /* @__PURE__ */ o(_, { children: [
986
- /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, children: n.row.holding }),
987
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
986
+ /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, children: n.row.holding }),
987
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontWeight: 400 }, variant: "tiny", children: n.row.description })
988
988
  ] }) })
989
989
  },
990
990
  {
991
991
  field: "costBasis",
992
- headerName: l.overview.cost_basis_header,
992
+ headerName: s.overview.cost_basis_header,
993
993
  width: 132,
994
994
  renderHeader: q,
995
995
  renderCell: (n) => {
996
- const g = h === n.row.id;
996
+ const p = g === n.row.id;
997
997
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
998
- g ? /* @__PURE__ */ e(
998
+ p ? /* @__PURE__ */ e(
999
999
  Se,
1000
1000
  {
1001
1001
  autoFocus: !0,
1002
- onBlur: () => d(n.row.id),
1003
- onChange: x,
1004
- onKeyDown: (C) => v(C, n.row.id),
1002
+ onBlur: () => m(n.row.id),
1003
+ onChange: v,
1004
+ onKeyDown: (C) => f(C, n.row.id),
1005
1005
  size: "small",
1006
1006
  sx: {
1007
1007
  fontSize: 14,
@@ -1018,7 +1018,7 @@ const de = ({ sx: t = {} }) => {
1018
1018
  },
1019
1019
  value: c
1020
1020
  }
1021
- ) : /* @__PURE__ */ e(r, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1021
+ ) : /* @__PURE__ */ e(i, { sx: { fontSize: 14, width: 57 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1022
1022
  currency: "USD",
1023
1023
  maximumFractionDigits: 2,
1024
1024
  minimumFractionDigits: 2,
@@ -1039,11 +1039,11 @@ const de = ({ sx: t = {} }) => {
1039
1039
  },
1040
1040
  {
1041
1041
  field: "totalGainLoss",
1042
- headerName: l.overview.total_gain_loss_header,
1042
+ headerName: s.overview.total_gain_loss_header,
1043
1043
  width: 196,
1044
1044
  renderHeader: q,
1045
1045
  renderCell: (n) => {
1046
- const g = n.row.costBasis, C = g ? n.row.totalGainLoss / g * 100 : 0;
1046
+ const p = n.row.costBasis, C = p ? n.row.totalGainLoss / p * 100 : 0;
1047
1047
  return /* @__PURE__ */ o(_, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
1048
1048
  n.value !== 0 && /* @__PURE__ */ e(
1049
1049
  k,
@@ -1051,29 +1051,29 @@ const de = ({ sx: t = {} }) => {
1051
1051
  name: n.value > 0 ? "trending_up" : "trending_down",
1052
1052
  size: 16,
1053
1053
  sx: {
1054
- color: f(n.value),
1054
+ color: h(n.value),
1055
1055
  mr: 1,
1056
1056
  verticalAlign: "middle"
1057
1057
  }
1058
1058
  }
1059
1059
  ),
1060
1060
  /* @__PURE__ */ e(
1061
- r,
1061
+ i,
1062
1062
  {
1063
1063
  sx: {
1064
- color: f(n.value),
1064
+ color: h(n.value),
1065
1065
  fontWeight: n.value > 0 ? 700 : 400
1066
1066
  },
1067
1067
  variant: "Small",
1068
- children: g ? `${C.toFixed(2)}%` : "0.00%"
1068
+ children: p ? `${C.toFixed(2)}%` : "0.00%"
1069
1069
  }
1070
1070
  ),
1071
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1071
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1072
1072
  /* @__PURE__ */ e(
1073
- r,
1073
+ i,
1074
1074
  {
1075
1075
  sx: {
1076
- color: f(n.value),
1076
+ color: h(n.value),
1077
1077
  fontWeight: n.value > 0 ? 700 : 400
1078
1078
  },
1079
1079
  variant: "Small",
@@ -1093,10 +1093,10 @@ const de = ({ sx: t = {} }) => {
1093
1093
  },
1094
1094
  {
1095
1095
  field: "marketValue",
1096
- headerName: l.overview.market_value_header,
1096
+ headerName: s.overview.market_value_header,
1097
1097
  width: 132,
1098
1098
  renderHeader: q,
1099
- renderCell: (n) => /* @__PURE__ */ e(r, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1099
+ renderCell: (n) => /* @__PURE__ */ e(i, { sx: { fontWeight: 700 }, variant: "Small", children: n.value?.toLocaleString("en-US", {
1100
1100
  currency: "USD",
1101
1101
  maximumFractionDigits: 2,
1102
1102
  minimumFractionDigits: 2,
@@ -1114,9 +1114,9 @@ const de = ({ sx: t = {} }) => {
1114
1114
  width: "100%"
1115
1115
  },
1116
1116
  children: /* @__PURE__ */ e(
1117
- qe,
1117
+ Ke,
1118
1118
  {
1119
- columns: i,
1119
+ columns: r,
1120
1120
  disableColumnFilter: !0,
1121
1121
  disableColumnMenu: !0,
1122
1122
  disableRowSelectionOnClick: !0,
@@ -1127,56 +1127,56 @@ const de = ({ sx: t = {} }) => {
1127
1127
  )
1128
1128
  }
1129
1129
  );
1130
- }, gt = () => {
1131
- const { isMobile: t } = U(), [h, c] = O({}), [u, x] = O(!1), { selectedAccountGuids: v } = Q(), { visibleHoldings: d, updateHoldings: l } = H(), [m, y] = B.useState(!1), [b, s] = O({
1130
+ }, pt = () => {
1131
+ const { isMobile: t } = U(), [g, c] = O({}), [u, v] = O(!1), { selectedAccountGuids: f } = Q(), { visibleHoldings: m, updateHoldings: s } = H(), [y, d] = A.useState(!1), [b, l] = O({
1132
1132
  accounts: [],
1133
1133
  holdings: []
1134
- }), { accounts: f, investments: i } = E(), { isCopyLoaded: n } = Q(), [g, C] = O(null), [S, L] = O(""), A = le().palette.mode === "dark", G = A ? "#0AC295" : "#09A57F", N = A ? "grey.300" : "grey.700", T = (a, w = "lesserThan") => w === "greaterThan" ? a >= 0 ? G : N : a <= 0 ? N : G, j = (a, w) => {
1135
- C(a), L(w.toFixed(2));
1134
+ }), { accounts: h, investments: r } = M(), { isCopyLoaded: n } = Q(), [p, C] = O(null), [S, B] = O(""), W = le().palette.mode === "dark", G = W ? "#0AC295" : "#09A57F", F = W ? "grey.300" : "grey.700", T = (a, w = "lesserThan") => w === "greaterThan" ? a >= 0 ? G : F : a <= 0 ? F : G, j = (a, w) => {
1135
+ C(a), B(w.toFixed(2));
1136
1136
  }, J = (a) => {
1137
1137
  const w = a.target.value;
1138
- /^\d*\.?\d*$/.test(w) && L(w);
1138
+ /^\d*\.?\d*$/.test(w) && B(w);
1139
1139
  }, me = (a, w) => {
1140
1140
  a.key === "Enter" ? Z(w) : a.key === "Escape" && C(null);
1141
1141
  }, Z = (a) => {
1142
- const w = d.find(({ guid: F }) => F === a);
1142
+ const w = m.find(({ guid: E }) => E === a);
1143
1143
  if (!w) return;
1144
- const M = Number(S);
1145
- if (l({ ...w, cost_basis: M }), t) {
1146
- const F = b.holdings.map(
1147
- (D) => D.id === a ? { ...D, costBasis: M } : D
1144
+ const N = Number(S);
1145
+ if (s({ ...w, cost_basis: N }), t) {
1146
+ const E = b.holdings.map(
1147
+ (D) => D.id === a ? { ...D, costBasis: N } : D
1148
1148
  );
1149
- s((D) => ({
1149
+ l((D) => ({
1150
1150
  ...D,
1151
- holdings: F
1151
+ holdings: E
1152
1152
  }));
1153
1153
  }
1154
1154
  C(null);
1155
- }, Le = (a) => (w, M) => {
1156
- c((F) => ({
1157
- ...F,
1158
- [a]: M
1155
+ }, Le = (a) => (w, N) => {
1156
+ c((E) => ({
1157
+ ...E,
1158
+ [a]: N
1159
1159
  }));
1160
1160
  }, { visibleHoldings: ue } = H(), { visibleInvestmentAccounts: Ie } = se(), X = Ie.filter(
1161
- ({ guid: a }) => v.includes(a)
1161
+ ({ guid: a }) => f.includes(a)
1162
1162
  ), Ae = X.reduce((a, w) => a + (w.balance || 0), 0), Be = X.map(({ guid: a }) => a), $ = ue.filter(
1163
1163
  ({ account_guid: a }) => Be.includes(a)
1164
1164
  ).reduce((a, w) => {
1165
- const M = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
1166
- return a + M;
1165
+ const N = w.market_value ? w.market_value - (w.cost_basis || 0) : 0;
1166
+ return a + N;
1167
1167
  }, 0), Te = () => {
1168
- x(!1);
1168
+ v(!1);
1169
1169
  };
1170
- return n ? /* @__PURE__ */ o(p, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1171
- !!X.length && /* @__PURE__ */ o(p, { sx: { alignItems: "center" }, children: [
1172
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, children: i.overview.total_portfolio }),
1170
+ return n ? /* @__PURE__ */ o(x, { sx: { alignItems: "center", gap: 48, pt: 48, width: "100%" }, children: [
1171
+ !!X.length && /* @__PURE__ */ o(x, { sx: { alignItems: "center" }, children: [
1172
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, children: r.overview.total_portfolio }),
1173
1173
  /* @__PURE__ */ e(fe, { children: Ae.toLocaleString("en-US", {
1174
1174
  currency: "USD",
1175
1175
  maximumFractionDigits: 2,
1176
1176
  minimumFractionDigits: 2,
1177
1177
  style: "currency"
1178
1178
  }) }),
1179
- /* @__PURE__ */ o(p, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1179
+ /* @__PURE__ */ o(x, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
1180
1180
  /* @__PURE__ */ e(
1181
1181
  k,
1182
1182
  {
@@ -1186,7 +1186,7 @@ const de = ({ sx: t = {} }) => {
1186
1186
  }
1187
1187
  ),
1188
1188
  /* @__PURE__ */ e(
1189
- r,
1189
+ i,
1190
1190
  {
1191
1191
  sx: { color: T($, "greaterThan"), fontWeight: 700 },
1192
1192
  variant: "Small",
@@ -1201,24 +1201,24 @@ const de = ({ sx: t = {} }) => {
1201
1201
  ] })
1202
1202
  ] }),
1203
1203
  X.map((a) => {
1204
- const w = ue.filter((I) => I.account_guid === a.guid).map((I) => ({
1205
- id: I.guid,
1206
- qty: I.shares || 0,
1207
- holding: I.symbol || I.description || "Unknown",
1208
- costBasis: I.cost_basis || 0,
1209
- totalGainLoss: I.market_value ? I.market_value - (I.cost_basis || 0) : 0,
1210
- marketValue: I.market_value || 0,
1211
- description: I.description || ""
1212
- })), M = w.length > 0, F = a.balance, D = w.reduce(
1213
- (I, Fe) => Fe.totalGainLoss + I,
1204
+ const w = ue.filter((L) => L.account_guid === a.guid).map((L) => ({
1205
+ id: L.guid,
1206
+ qty: L.shares || 0,
1207
+ holding: L.symbol || L.description || "Unknown",
1208
+ costBasis: L.cost_basis || 0,
1209
+ totalGainLoss: L.market_value ? L.market_value - (L.cost_basis || 0) : 0,
1210
+ marketValue: L.market_value || 0,
1211
+ description: L.description || ""
1212
+ })), N = w.length > 0, E = a.balance, D = w.reduce(
1213
+ (L, Fe) => Fe.totalGainLoss + L,
1214
1214
  0
1215
- ), he = F ? D / F * 100 : 0;
1215
+ ), he = E ? D / E * 100 : 0;
1216
1216
  if (t)
1217
1217
  return /* @__PURE__ */ e(
1218
1218
  ie,
1219
1219
  {
1220
1220
  onClick: w.length ? () => {
1221
- x(!0), s({
1221
+ v(!0), l({
1222
1222
  holdings: w,
1223
1223
  accounts: a
1224
1224
  });
@@ -1228,7 +1228,7 @@ const de = ({ sx: t = {} }) => {
1228
1228
  overflow: "hidden"
1229
1229
  },
1230
1230
  children: /* @__PURE__ */ o(
1231
- p,
1231
+ x,
1232
1232
  {
1233
1233
  sx: {
1234
1234
  border: 1,
@@ -1241,7 +1241,7 @@ const de = ({ sx: t = {} }) => {
1241
1241
  },
1242
1242
  children: [
1243
1243
  /* @__PURE__ */ o(
1244
- p,
1244
+ x,
1245
1245
  {
1246
1246
  sx: {
1247
1247
  alignItems: "center",
@@ -1261,15 +1261,15 @@ const de = ({ sx: t = {} }) => {
1261
1261
  size: 32
1262
1262
  }
1263
1263
  ),
1264
- /* @__PURE__ */ o(p, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1265
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1266
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1264
+ /* @__PURE__ */ o(x, { sx: { overflow: "hidden", pl: 13, pr: 13 }, children: [
1265
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1266
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1267
1267
  ] })
1268
1268
  ]
1269
1269
  }
1270
1270
  ),
1271
1271
  /* @__PURE__ */ o(
1272
- p,
1272
+ x,
1273
1273
  {
1274
1274
  sx: {
1275
1275
  alignItems: "center",
@@ -1280,7 +1280,7 @@ const de = ({ sx: t = {} }) => {
1280
1280
  },
1281
1281
  children: [
1282
1282
  /* @__PURE__ */ o(
1283
- p,
1283
+ x,
1284
1284
  {
1285
1285
  sx: {
1286
1286
  alignItems: "center",
@@ -1294,9 +1294,9 @@ const de = ({ sx: t = {} }) => {
1294
1294
  pt: 14
1295
1295
  },
1296
1296
  children: [
1297
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: i.overview.total_gain_Loss }),
1297
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary", fontSize: 11 }, variant: "Small", children: r.overview.total_gain_Loss }),
1298
1298
  /* @__PURE__ */ o(
1299
- p,
1299
+ x,
1300
1300
  {
1301
1301
  sx: {
1302
1302
  alignItems: "center",
@@ -1314,7 +1314,7 @@ const de = ({ sx: t = {} }) => {
1314
1314
  }
1315
1315
  ),
1316
1316
  /* @__PURE__ */ o(
1317
- r,
1317
+ i,
1318
1318
  {
1319
1319
  sx: {
1320
1320
  color: T(D),
@@ -1327,9 +1327,9 @@ const de = ({ sx: t = {} }) => {
1327
1327
  ]
1328
1328
  }
1329
1329
  ),
1330
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1330
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1331
1331
  /* @__PURE__ */ e(
1332
- r,
1332
+ i,
1333
1333
  {
1334
1334
  sx: {
1335
1335
  color: T(D),
@@ -1351,7 +1351,7 @@ const de = ({ sx: t = {} }) => {
1351
1351
  }
1352
1352
  ),
1353
1353
  /* @__PURE__ */ o(
1354
- p,
1354
+ x,
1355
1355
  {
1356
1356
  sx: {
1357
1357
  alignItems: "center",
@@ -1363,8 +1363,8 @@ const de = ({ sx: t = {} }) => {
1363
1363
  pt: 14
1364
1364
  },
1365
1365
  children: [
1366
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1367
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: F?.toLocaleString("en-US", {
1366
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_value }),
1367
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1368
1368
  currency: "USD",
1369
1369
  maximumFractionDigits: 2,
1370
1370
  minimumFractionDigits: 2,
@@ -1382,12 +1382,12 @@ const de = ({ sx: t = {} }) => {
1382
1382
  },
1383
1383
  a.guid
1384
1384
  );
1385
- const ke = A ? "grey.700" : "grey.400", We = w.length ? "text.primary" : ke;
1385
+ const ke = W ? "grey.700" : "grey.400", We = w.length ? "text.primary" : ke;
1386
1386
  return /* @__PURE__ */ o(
1387
1387
  _e,
1388
1388
  {
1389
- expanded: h[a.guid] === !0,
1390
- onChange: M ? Le(a.guid) : () => {
1389
+ expanded: g[a.guid] === !0,
1390
+ onChange: N ? Le(a.guid) : () => {
1391
1391
  },
1392
1392
  sx: {
1393
1393
  border: 1,
@@ -1402,7 +1402,7 @@ const de = ({ sx: t = {} }) => {
1402
1402
  "aria-controls": "panel1a-content",
1403
1403
  id: "panel1a-header",
1404
1404
  sx: [
1405
- h[a.guid] && {
1405
+ g[a.guid] && {
1406
1406
  borderBottom: 1,
1407
1407
  borderColor: "border.main",
1408
1408
  maxHeight: 88
@@ -1410,7 +1410,7 @@ const de = ({ sx: t = {} }) => {
1410
1410
  ],
1411
1411
  children: [
1412
1412
  /* @__PURE__ */ o(
1413
- p,
1413
+ x,
1414
1414
  {
1415
1415
  sx: {
1416
1416
  alignItems: "center",
@@ -1429,18 +1429,18 @@ const de = ({ sx: t = {} }) => {
1429
1429
  size: 32
1430
1430
  }
1431
1431
  ),
1432
- /* @__PURE__ */ o(p, { sx: { alignItems: "flex-start" }, children: [
1433
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1434
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1432
+ /* @__PURE__ */ o(x, { sx: { alignItems: "flex-start" }, children: [
1433
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: a.memberName }),
1434
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: a.user_name || a.name })
1435
1435
  ] })
1436
1436
  ]
1437
1437
  }
1438
1438
  ),
1439
- /* @__PURE__ */ o(p, { sx: { flexDirection: "row" }, children: [
1440
- /* @__PURE__ */ o(p, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1441
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_gain_Loss }),
1439
+ /* @__PURE__ */ o(x, { sx: { flexDirection: "row" }, children: [
1440
+ /* @__PURE__ */ o(x, { sx: { alignItems: "flex-end", pb: 14, pl: 24, pr: 24, pt: 14 }, children: [
1441
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_gain_Loss }),
1442
1442
  /* @__PURE__ */ o(
1443
- p,
1443
+ x,
1444
1444
  {
1445
1445
  sx: {
1446
1446
  alignItems: "center",
@@ -1458,7 +1458,7 @@ const de = ({ sx: t = {} }) => {
1458
1458
  }
1459
1459
  ),
1460
1460
  /* @__PURE__ */ o(
1461
- r,
1461
+ i,
1462
1462
  {
1463
1463
  sx: {
1464
1464
  color: T(D),
@@ -1471,9 +1471,9 @@ const de = ({ sx: t = {} }) => {
1471
1471
  ]
1472
1472
  }
1473
1473
  ),
1474
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1474
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: "|" }),
1475
1475
  /* @__PURE__ */ e(
1476
- r,
1476
+ i,
1477
1477
  {
1478
1478
  sx: {
1479
1479
  color: T(D),
@@ -1492,9 +1492,9 @@ const de = ({ sx: t = {} }) => {
1492
1492
  }
1493
1493
  )
1494
1494
  ] }),
1495
- /* @__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: [
1496
- /* @__PURE__ */ e(r, { sx: { color: "text.secondary" }, variant: "XSmall", children: i.overview.total_value }),
1497
- /* @__PURE__ */ e(r, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: F?.toLocaleString("en-US", {
1495
+ /* @__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: [
1496
+ /* @__PURE__ */ e(i, { sx: { color: "text.secondary" }, variant: "XSmall", children: r.overview.total_value }),
1497
+ /* @__PURE__ */ e(i, { sx: { color: "text.primary", fontWeight: 600 }, variant: "Body", children: E?.toLocaleString("en-US", {
1498
1498
  currency: "USD",
1499
1499
  maximumFractionDigits: 2,
1500
1500
  minimumFractionDigits: 2,
@@ -1506,11 +1506,11 @@ const de = ({ sx: t = {} }) => {
1506
1506
  }
1507
1507
  ),
1508
1508
  /* @__PURE__ */ e(we, { sx: { bgcolor: "background.default", p: 12 }, children: /* @__PURE__ */ e(ie, { sx: { border: 1, borderColor: "border.light" }, children: /* @__PURE__ */ e(
1509
- ht,
1509
+ gt,
1510
1510
  {
1511
1511
  currentEditedCostBasis: S,
1512
1512
  data: w,
1513
- editingHoldingId: g,
1513
+ editingHoldingId: p,
1514
1514
  handleCostBasisBlur: Z,
1515
1515
  handleCostBasisChange: J,
1516
1516
  handleCostBasisClick: j,
@@ -1524,11 +1524,11 @@ const de = ({ sx: t = {} }) => {
1524
1524
  }),
1525
1525
  /* @__PURE__ */ e(de, {}),
1526
1526
  /* @__PURE__ */ e(
1527
- ut,
1527
+ ht,
1528
1528
  {
1529
1529
  accountHoldingsData: b,
1530
1530
  currentEditedCostBasis: S,
1531
- editingHoldingId: g,
1531
+ editingHoldingId: p,
1532
1532
  handleCostBasisBlur: Z,
1533
1533
  handleCostBasisChange: J,
1534
1534
  handleCostBasisClick: j,
@@ -1540,69 +1540,71 @@ const de = ({ sx: t = {} }) => {
1540
1540
  /* @__PURE__ */ e(
1541
1541
  ge,
1542
1542
  {
1543
- onClose: () => y(!1),
1544
- showConnectionsWidget: m,
1545
- title: f.manage_connections
1543
+ onClose: () => d(!1),
1544
+ showConnectionsWidget: y,
1545
+ title: h.manage_connections
1546
1546
  }
1547
1547
  )
1548
1548
  ] }) : /* @__PURE__ */ e(De, {});
1549
- }, pt = P(gt), xt = ({ title: t }) => /* @__PURE__ */ e(r, { bold: !0, variant: "Body", children: t }), an = P(({ onBackClick: t, sx: h }) => {
1550
- const { onEvent: c } = be(), { isMobile: u } = U(), { visibleInvestmentAccounts: x } = se(), {
1551
- visibleHoldings: v,
1552
- setShowConnectionsWidget: d,
1553
- showConnectionsWidget: l
1554
- } = H(), { investments: m, accounts: y } = E(), { isCopyLoaded: b, isInitialized: s, setSelectedAccounts: f } = Q(), [i, n] = B.useState(0), { loadHoldings: g } = H();
1555
- B.useEffect(() => {
1556
- f(x);
1557
- }, [x]), B.useEffect(() => {
1558
- s && g().finally();
1559
- }, [s]);
1560
- const C = () => {
1549
+ }, xt = P(pt), yt = ({ title: t }) => /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t }), sn = P(({ onBackClick: t, sx: g }) => {
1550
+ const { onEvent: c } = be(), { onLoad: u } = je(), { isMobile: v } = U(), { visibleInvestmentAccounts: f } = se(), {
1551
+ visibleHoldings: m,
1552
+ setShowConnectionsWidget: s,
1553
+ showConnectionsWidget: y
1554
+ } = H(), { investments: d, accounts: b } = M(), { isCopyLoaded: l, isInitialized: h, setSelectedAccounts: r } = Q(), [n, p] = A.useState(0), { loadHoldings: C } = H();
1555
+ A.useEffect(() => {
1556
+ r(f);
1557
+ }, [f]), A.useEffect(() => {
1558
+ h && C().finally(() => {
1559
+ u?.("InvestmentsWidget");
1560
+ });
1561
+ }, [h]);
1562
+ const S = () => {
1561
1563
  c(z.INVESTMENT_WIDGET_ACCOUNT_FILTER_CLICK);
1562
1564
  };
1563
- if (!b || !s) return /* @__PURE__ */ e(De, {});
1564
- const S = [
1565
+ if (!l || !h) return /* @__PURE__ */ e(De, {});
1566
+ const B = [
1565
1567
  z.INVESTMENT_WIDGET_DETAILS_CLICK,
1566
1568
  z.INVESTMENT_WIDGET_ALLOCATION_CLICK,
1567
1569
  z.INVESTMENT_WIDGET_ANALYSIS_CLICK
1568
- ], L = x.length === 0 && v.length === 0, W = [
1569
- m.tab_overview_title,
1570
- m.tab_allocation_title,
1571
- m.tab_analysis_title
1570
+ ], I = f.length === 0 && m.length === 0, W = [
1571
+ d.tab_overview_title,
1572
+ d.tab_allocation_title,
1573
+ d.tab_analysis_title
1572
1574
  ];
1573
1575
  return /* @__PURE__ */ o(
1574
- je,
1576
+ ze,
1575
1577
  {
1576
- accountOptions: x,
1577
- onAccountsFilterClick: C,
1578
+ accountOptions: f,
1579
+ onAccountsFilterClick: S,
1578
1580
  onBackClick: t,
1579
- sx: h,
1580
- title: m.title,
1581
+ sx: g,
1582
+ title: d.title,
1581
1583
  children: [
1582
- /* @__PURE__ */ o(_, { mx: u ? 0 : 48, my: 24, children: [
1584
+ /* @__PURE__ */ o(_, { mx: v ? 0 : 48, my: 24, children: [
1583
1585
  /* @__PURE__ */ e(
1584
1586
  Ge,
1585
1587
  {
1586
- onChange: (A, G) => {
1587
- n(G), c(S[G]);
1588
+ onChange: (G, F) => {
1589
+ p(F), c(B[F]);
1588
1590
  },
1589
1591
  sx: { bgcolor: "background.paper" },
1590
1592
  textColor: "primary",
1591
- value: L ? -1 : i,
1593
+ value: I ? -1 : n,
1592
1594
  variant: "fullWidth",
1593
- children: W.map((A) => /* @__PURE__ */ e(Ee, { disabled: L, label: /* @__PURE__ */ e(xt, { title: A }) }, A))
1595
+ children: W.map((G) => /* @__PURE__ */ e(Ee, { disabled: I, label: /* @__PURE__ */ e(yt, { title: G }) }, G))
1594
1596
  }
1595
1597
  ),
1596
- L ? /* @__PURE__ */ e(
1597
- Ye,
1598
+ I ? /* @__PURE__ */ e(
1599
+ Qe,
1598
1600
  {
1599
- header: m.empty_state_header,
1601
+ header: d.empty_state_header,
1600
1602
  icon: "bid_landscape",
1601
1603
  onClick: () => {
1602
- d(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1604
+ s(!0), c(z.ACCOUNTS_CLICK_CONNECT);
1603
1605
  },
1604
- primaryButton: m.overview.connect_accounts,
1605
- subText: m.empty_state_description,
1606
+ primaryButton: d.overview.connect_accounts,
1607
+ subText: d.empty_state_description,
1606
1608
  sx: {
1607
1609
  width: { sm: 432 },
1608
1610
  ".buttons-footer": {
@@ -1616,17 +1618,17 @@ const de = ({ sx: t = {} }) => {
1616
1618
  }
1617
1619
  }
1618
1620
  ) : /* @__PURE__ */ o(ae, { children: [
1619
- i === 0 && /* @__PURE__ */ e(pt, {}),
1620
- i === 1 && /* @__PURE__ */ e(rt, {}),
1621
- i === 2 && /* @__PURE__ */ e(dt, {})
1621
+ n === 0 && /* @__PURE__ */ e(xt, {}),
1622
+ n === 1 && /* @__PURE__ */ e(at, {}),
1623
+ n === 2 && /* @__PURE__ */ e(mt, {})
1622
1624
  ] })
1623
1625
  ] }),
1624
1626
  /* @__PURE__ */ e(
1625
1627
  ge,
1626
1628
  {
1627
- onClose: () => d(!1),
1628
- showConnectionsWidget: l,
1629
- title: y.manage_connections
1629
+ onClose: () => s(!1),
1630
+ showConnectionsWidget: y,
1631
+ title: b.manage_connections
1630
1632
  }
1631
1633
  )
1632
1634
  ]
@@ -1634,5 +1636,5 @@ const de = ({ sx: t = {} }) => {
1634
1636
  );
1635
1637
  });
1636
1638
  export {
1637
- an as InvestmentsWidget
1639
+ sn as InvestmentsWidget
1638
1640
  };