@mx-cartographer/experiences 7.13.9 → 7.13.11

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.
@@ -5,19 +5,19 @@ import T from "react";
5
5
  import { observer as D } from "mobx-react-lite";
6
6
  import Pe from "@mui/material/Alert";
7
7
  import je from "@mui/material/Snackbar";
8
- import f from "@mui/material/Stack";
8
+ import y from "@mui/material/Stack";
9
9
  import ie from "@mui/material/Tab";
10
10
  import Fe from "@mui/material/Tabs";
11
11
  import { Text as C, H3 as le, P as q, Icon as $e, InstitutionLogo as te, H2 as Te } from "@mxenabled/mxui";
12
12
  import me from "@mui/material/Button";
13
13
  import Ce from "@mui/material/Card";
14
- import Re from "@mui/material/CardActionArea";
15
- import xe from "@mui/material/CardContent";
16
- import ye from "@mui/material/Unstable_Grid2";
14
+ import xe from "@mui/material/CardActionArea";
15
+ import Re from "@mui/material/CardContent";
16
+ import fe from "@mui/material/Unstable_Grid2";
17
17
  import oe from "@mui/material/Avatar";
18
18
  import He from "@mui/material/CardHeader";
19
- import { Payments as Se, NoteStack as Ee, Person as ve, ArrowUpwardAlt as Ue, CheckCircle as Ye, ChevronRight as V, Icon as fe, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
20
- import { u as R, k as G, b as ue, a as _e, d as P, o as Ge, g as Ne } from "../hooks-BxkfR-Ff.mjs";
19
+ import { Payments as Se, NoteStack as Ee, Person as ve, ArrowUpwardAlt as Ue, CheckCircle as Ye, ChevronRight as V, Icon as ye, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
20
+ import { u as x, k as G, b as ue, a as _e, d as P, o as Ge, g as Ne } from "../hooks-BxkfR-Ff.mjs";
21
21
  import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { f as I } from "../NumberFormatting-QCaNwbjv.mjs";
23
23
  import { S as Qe } from "../StatusBar-BK_uYHAB.mjs";
@@ -31,7 +31,7 @@ import k from "@mui/material/ListItem";
31
31
  import z from "@mui/material/ListItemAvatar";
32
32
  import M from "@mui/material/ListItemButton";
33
33
  import w from "@mui/material/ListItemText";
34
- import { b as B } from "../Localization-CPkpIwIx.mjs";
34
+ import { b as W } from "../Localization-CPkpIwIx.mjs";
35
35
  import { f as he, D as be } from "../DateFormats-BMpMrZpW.mjs";
36
36
  import { D as Q } from "../Drawer-Bbe4AMB1.mjs";
37
37
  import { g as we } from "../AccountDisplayName-CO7z3v99.mjs";
@@ -51,15 +51,15 @@ import { D as ut } from "../Dialog-Ck34yr-d.mjs";
51
51
  import { u as Ke } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
52
52
  import { A as H } from "../Analytics-BYItVAe-.mjs";
53
53
  import { L as Me } from "../Loader-D3rjKx72.mjs";
54
- import { W as _t } from "../WidgetContainer-D_iaToWJ.mjs";
54
+ import { W as _t } from "../WidgetContainer-B7xDq2bM.mjs";
55
55
  import { E as pt } from "../EmptyState-DHAkGsjk.mjs";
56
56
  import ht from "@mui/material/Stack/Stack";
57
57
  import bt from "@mui/material/Box";
58
- import yt from "@mui/material/styles/useTheme";
59
- import { S as ft } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
+ import ft from "@mui/material/styles/useTheme";
59
+ import { S as yt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
60
60
  import { M as gt } from "../MicroWidgetContainer-B_EnfvCq.mjs";
61
61
  function re({ title: t, subtitle: n }) {
62
- return /* @__PURE__ */ c(f, { children: [
62
+ return /* @__PURE__ */ c(y, { children: [
63
63
  /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t }),
64
64
  /* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "body1", children: n })
65
65
  ] });
@@ -69,7 +69,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
69
69
  "$1$2$3"
70
70
  ) : I(t, "0,0.00"), Le = D(
71
71
  ({ goal: t, isInDrawer: n = !1, onClick: u }) => {
72
- const { goals: l } = R(), { isMobile: _, isTablet: i } = pe(), d = _ || i, {
72
+ const { goals: l } = x(), { isMobile: _, isTablet: i } = pe(), d = _ || i, {
73
73
  backgroundColor: s,
74
74
  color: p,
75
75
  percentage: h,
@@ -92,7 +92,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
92
92
  outlineColor: "primary.main"
93
93
  }
94
94
  },
95
- children: /* @__PURE__ */ c(Re, { disabled: !u, onClick: u, children: [
95
+ children: /* @__PURE__ */ c(xe, { disabled: !u, onClick: u, children: [
96
96
  /* @__PURE__ */ e(
97
97
  He,
98
98
  {
@@ -111,21 +111,27 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
111
111
  )}`
112
112
  }
113
113
  ),
114
+ sx: { alignItems: "flex-start", "& .MuiCardHeader-content": { minWidth: 0 } },
114
115
  title: /* @__PURE__ */ e(
115
116
  C,
116
117
  {
117
118
  color: "text.secondary",
118
119
  fontWeight: 400,
119
- sx: { fontSize: "15px", lineHeight: "20px" },
120
+ sx: {
121
+ fontSize: "15px",
122
+ lineHeight: "20px",
123
+ whiteSpace: "normal",
124
+ overflowWrap: "break-word"
125
+ },
120
126
  variant: "h4",
121
127
  children: t.name
122
128
  }
123
129
  )
124
130
  }
125
131
  ),
126
- /* @__PURE__ */ e(xe, { sx: { pt: 0 }, children: /* @__PURE__ */ c(f, { gap: 6, children: [
132
+ /* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ c(y, { gap: 6, children: [
127
133
  /* @__PURE__ */ e(Qe, { data: m, height: 24 }),
128
- /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
134
+ /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
129
135
  /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: a }),
130
136
  t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: o })
131
137
  ] })
@@ -135,7 +141,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
135
141
  );
136
142
  }
137
143
  ), Tt = D(({ trackType: t }) => {
138
- const { goals: n } = R(), { setAlert: u, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: _ } = G(), i = T.useMemo(() => {
144
+ const { goals: n } = x(), { setAlert: u, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: _ } = G(), i = T.useMemo(() => {
139
145
  let a = 0;
140
146
  return t === r.SAVINGS_TRACK ? a = l?.amount_allocated_for_savings_goals || 0 : t === r.DEBT_TRACK ? a = l?.amount_allocated_for_debt_goals || 0 : t === r.RETIREMENT_TRACK && (a = l?.amount_allocated_for_retirement_goals || 0), a;
141
147
  }, [l]);
@@ -148,7 +154,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
148
154
  t === r.SAVINGS_TRACK ? a.amount_allocated_for_savings_goals = d : t === r.DEBT_TRACK ? a.amount_allocated_for_debt_goals = d : t === r.RETIREMENT_TRACK && (a.amount_allocated_for_retirement_goals = d), await _(a), u(n.alert_contribution_updated);
149
155
  }
150
156
  };
151
- return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
157
+ return /* @__PURE__ */ e(y, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
152
158
  J,
153
159
  {
154
160
  isSaveDisabled: !d || isNaN(d),
@@ -172,7 +178,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
172
178
  }
173
179
  ) });
174
180
  }), Ct = ({ goal: t, index: n, onUpClick: u }) => {
175
- const { goals: l } = R(), { percentage: _ } = de(l, t), i = t.goal_type === ce.KEEP_BALANCE_BELOW || t.has_been_spent ? l.goal_completed : B(l.goal_percentage_reached, `${_ * 100}`);
181
+ const { goals: l } = x(), { percentage: _ } = de(l, t), i = t.goal_type === ce.KEEP_BALANCE_BELOW || t.has_been_spent ? l.goal_completed : W(l.goal_percentage_reached, `${_ * 100}`);
176
182
  return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
177
183
  M,
178
184
  {
@@ -191,10 +197,10 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
191
197
  children: t.track_type === r.SAVINGS_TRACK ? /* @__PURE__ */ e(Xe, { onClick: () => u?.(t), children: /* @__PURE__ */ e(Ue, { color: "primary", size: 24 }) }) : /* @__PURE__ */ e(oe, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: n + 1 }) })
192
198
  }
193
199
  ),
194
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
195
- /* @__PURE__ */ c(f, { sx: { maxWidth: "70%" }, children: [
200
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
201
+ /* @__PURE__ */ c(y, { sx: { maxWidth: "70%" }, children: [
196
202
  /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
197
- /* @__PURE__ */ e(C, { variant: "caption", children: t.is_complete ? i : B(
203
+ /* @__PURE__ */ e(C, { variant: "caption", children: t.is_complete ? i : W(
198
204
  l.goal_projection,
199
205
  he(
200
206
  ne(t.projected_to_complete_at || 0),
@@ -207,8 +213,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
207
213
  ]
208
214
  }
209
215
  ) });
210
- }, Rt = ({ goal: t }) => {
211
- const { goals: n } = R();
216
+ }, xt = ({ goal: t }) => {
217
+ const { goals: n } = x();
212
218
  return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
213
219
  M,
214
220
  {
@@ -216,10 +222,10 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
216
222
  sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
217
223
  children: [
218
224
  /* @__PURE__ */ e(z, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
219
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
220
- /* @__PURE__ */ c(f, { children: [
225
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
226
+ /* @__PURE__ */ c(y, { children: [
221
227
  /* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
222
- /* @__PURE__ */ e(C, { variant: "caption", children: B(
228
+ /* @__PURE__ */ e(C, { variant: "caption", children: W(
223
229
  n.completed_label,
224
230
  he(
225
231
  ne(t.completed_at || 0),
@@ -232,23 +238,23 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
232
238
  ]
233
239
  }
234
240
  ) }, t.guid);
235
- }, xt = ({ trackType: t }) => {
236
- const { goals: n, common: u } = R(), { loadGoals: l, orderedGoals: _, reorderGoals: i } = G(), d = _.filter((y) => y.track_type === t), s = d.filter(
237
- (y) => y.track_type === r.SAVINGS_TRACK && !y.has_been_spent || y.track_type !== r.SAVINGS_TRACK && !y.is_complete
241
+ }, Rt = ({ trackType: t }) => {
242
+ const { goals: n, common: u } = x(), { loadGoals: l, orderedGoals: _, reorderGoals: i } = G(), d = _.filter((f) => f.track_type === t), s = d.filter(
243
+ (f) => f.track_type === r.SAVINGS_TRACK && !f.has_been_spent || f.track_type !== r.SAVINGS_TRACK && !f.is_complete
238
244
  ), p = d.filter(
239
- (y) => y.track_type === r.SAVINGS_TRACK && y.has_been_spent || y.track_type !== r.SAVINGS_TRACK && y.is_complete
245
+ (f) => f.track_type === r.SAVINGS_TRACK && f.has_been_spent || f.track_type !== r.SAVINGS_TRACK && f.is_complete
240
246
  ), [h, a] = T.useState(!1);
241
247
  let o = n.manage_saving_goals, b = n.manage_saving_drawer_title, m = n.manage_saving_title, g = n.manage_saving_description;
242
248
  t === r.DEBT_TRACK ? (o = n.manage_debt_goals, b = n.manage_debt_drawer_title, m = n.manage_debt_title, g = n.manage_debt_description) : t === r.RETIREMENT_TRACK && (o = n.manage_retirement_goals, b = n.manage_retirement_drawer_title, m = n.manage_retirement_title, g = n.manage_retirement_description);
243
- const x = async (y) => {
244
- const A = [...s], S = A.findIndex((K) => K.guid === y.guid);
249
+ const R = async (f) => {
250
+ const A = [...s], S = A.findIndex((K) => K.guid === f.guid);
245
251
  let N = S - 1;
246
252
  N < 0 && (N = A.length - 1), A.splice(N, 0, A.splice(S, 1)[0]);
247
253
  for (let K = 0; K < A.length; K++)
248
254
  A[K].position = K + 1;
249
255
  await i(A), await l();
250
256
  };
251
- return /* @__PURE__ */ c(f, { children: [
257
+ return /* @__PURE__ */ c(y, { children: [
252
258
  /* @__PURE__ */ e(me, { endIcon: /* @__PURE__ */ e(V, {}), onClick: () => a(!0), children: o }),
253
259
  /* @__PURE__ */ e(
254
260
  Q,
@@ -257,28 +263,28 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
257
263
  isOpen: h,
258
264
  onClose: () => a(!1),
259
265
  title: b,
260
- children: /* @__PURE__ */ c(f, { children: [
261
- /* @__PURE__ */ c(f, { m: 24, children: [
266
+ children: /* @__PURE__ */ c(y, { children: [
267
+ /* @__PURE__ */ c(y, { m: 24, children: [
262
268
  /* @__PURE__ */ e(le, { children: m }),
263
269
  /* @__PURE__ */ e(q, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "subtitle2", children: g })
264
270
  ] }),
265
271
  /* @__PURE__ */ e(Tt, { trackType: t }),
266
272
  /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.goal_priority }),
267
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((y, A) => {
273
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((f, A) => {
268
274
  const S = A >= s.length - 1;
269
- return /* @__PURE__ */ c(f, { children: [
270
- /* @__PURE__ */ e(Ct, { goal: y, index: A, onUpClick: x }),
275
+ return /* @__PURE__ */ c(y, { children: [
276
+ /* @__PURE__ */ e(Ct, { goal: f, index: A, onUpClick: R }),
271
277
  /* @__PURE__ */ e(v, { variant: S ? "fullWidth" : "inset" })
272
- ] }, `ongoing-${y.guid}`);
278
+ ] }, `ongoing-${f.guid}`);
273
279
  }) }),
274
- t !== r.RETIREMENT_TRACK && p.length > 0 && /* @__PURE__ */ c(f, { children: [
280
+ t !== r.RETIREMENT_TRACK && p.length > 0 && /* @__PURE__ */ c(y, { children: [
275
281
  /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.complete_title }),
276
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: p.map((y, A) => {
282
+ /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: p.map((f, A) => {
277
283
  const S = A > s.length - 1;
278
- return /* @__PURE__ */ c(f, { children: [
279
- /* @__PURE__ */ e(Rt, { goal: y }),
284
+ return /* @__PURE__ */ c(y, { children: [
285
+ /* @__PURE__ */ e(xt, { goal: f }),
280
286
  /* @__PURE__ */ e(v, { variant: S ? "fullWidth" : "inset" })
281
- ] }, `complete-${y.guid}`);
287
+ ] }, `complete-${f.guid}`);
282
288
  }) })
283
289
  ] })
284
290
  ] })
@@ -286,23 +292,23 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
286
292
  )
287
293
  ] });
288
294
  }, se = D(({ trackType: t, onAddGoals: n }) => {
289
- const { isMobile: u } = pe(), { goals: l } = R(), { selectedAccountGuids: _ } = ue(), { orderedGoals: i, setSelectedGoal: d } = G(), s = i.filter(
295
+ const { isMobile: u } = pe(), { goals: l } = x(), { selectedAccountGuids: _ } = ue(), { orderedGoals: i, setSelectedGoal: d } = G(), s = i.filter(
290
296
  (o) => o.track_type === t && (o.track_type !== r.RETIREMENT_TRACK && _.includes(o.account_guid) || o.track_type === r.RETIREMENT_TRACK)
291
297
  ), p = s.filter(
292
298
  (o) => o.track_type === r.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== r.SAVINGS_TRACK && !o.is_complete
293
299
  ), h = s.filter(
294
300
  (o) => o.track_type === r.SAVINGS_TRACK && o.has_been_spent || o.track_type !== r.SAVINGS_TRACK && o.is_complete
295
301
  ), a = t === r.DEBT_TRACK ? l.zero_state_complete_debt : l.zero_state_complete_savings;
296
- return /* @__PURE__ */ c(f, { mt: 16, mx: u ? 24 : 0, children: [
297
- /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
302
+ return /* @__PURE__ */ c(y, { mt: 16, mx: u ? 24 : 0, children: [
303
+ /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
298
304
  /* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: l.ongoing_title }),
299
- /* @__PURE__ */ e(xt, { trackType: t })
305
+ /* @__PURE__ */ e(Rt, { trackType: t })
300
306
  ] }),
301
- p.length > 0 ? /* @__PURE__ */ e(ye, { container: !0, spacing: 24, children: p.map((o, b, m) => (
307
+ p.length > 0 ? /* @__PURE__ */ e(fe, { container: !0, spacing: 24, children: p.map((o, b, m) => (
302
308
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
303
- /* @__PURE__ */ e(ye, { xs: u || b === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => d(o) }, o.guid) }, b)
309
+ /* @__PURE__ */ e(fe, { xs: u || b === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => d(o) }, o.guid) }, b)
304
310
  )) }) : /* @__PURE__ */ c(
305
- f,
311
+ y,
306
312
  {
307
313
  alignItems: "center",
308
314
  bgcolor: "background.default",
@@ -329,9 +335,9 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
329
335
  ]
330
336
  }
331
337
  ),
332
- t !== r.RETIREMENT_TRACK && /* @__PURE__ */ c(f, { gap: 16, mt: 48, children: [
338
+ t !== r.RETIREMENT_TRACK && /* @__PURE__ */ c(y, { gap: 16, mt: 48, children: [
333
339
  /* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: l.complete_title }),
334
- h.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
340
+ h.length === 0 && /* @__PURE__ */ e(y, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
335
341
  q,
336
342
  {
337
343
  sx: (o) => ({
@@ -345,8 +351,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
345
351
  children: a
346
352
  }
347
353
  ) }),
348
- h.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Re, { onClick: () => d(o), children: /* @__PURE__ */ e(xe, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
349
- /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", gap: 6, children: [
354
+ h.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(xe, { onClick: () => d(o), children: /* @__PURE__ */ e(Re, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
355
+ /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", gap: 6, children: [
350
356
  /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
351
357
  /* @__PURE__ */ e(C, { color: "text.secondary", variant: "body1", children: o.name })
352
358
  ] }),
@@ -355,8 +361,8 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
355
361
  ] })
356
362
  ] });
357
363
  }), St = ({ goalType: t, onClick: n }) => {
358
- const { goals: u } = R(), { bgcolor: l, icon: _, label: i, description: d, subTypes: s, type: p } = t, [h, a] = T.useState(!1), o = s.length > 0;
359
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ c(L, { sx: { bgcolor: "background.paper" }, children: [
364
+ const { goals: u } = x(), { bgcolor: l, icon: _, label: i, description: d, subTypes: s, type: p } = t, [h, a] = T.useState(!1), o = s.length > 0;
365
+ return /* @__PURE__ */ e(y, { children: /* @__PURE__ */ c(L, { sx: { bgcolor: "background.paper" }, children: [
360
366
  /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
361
367
  M,
362
368
  {
@@ -366,7 +372,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
366
372
  p
367
373
  ),
368
374
  children: [
369
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: _, sx: { color: "grey.900" } }) }) }),
375
+ /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: _, sx: { color: "grey.900" } }) }) }),
370
376
  /* @__PURE__ */ e(w, { primary: i, secondary: d, sx: { mr: 24 } }),
371
377
  !o && /* @__PURE__ */ e(V, {}),
372
378
  o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
@@ -375,7 +381,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
375
381
  ) }),
376
382
  /* @__PURE__ */ e(v, { variant: "inset" }),
377
383
  o && /* @__PURE__ */ e(et, { in: h, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: s.map((b, m) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ c(M, { onClick: () => n(b.label, b.metaType, p), children: [
378
- /* @__PURE__ */ e(tt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: b.icon }) }),
384
+ /* @__PURE__ */ e(tt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: b.icon }) }),
379
385
  /* @__PURE__ */ e(
380
386
  w,
381
387
  {
@@ -393,7 +399,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
393
399
  onSave: l,
394
400
  title: _
395
401
  }) => {
396
- const { goals: i, common: d } = R(), { config: s } = _e(), [p, h] = T.useState([]), a = (o) => {
402
+ const { goals: i, common: d } = x(), { config: s } = _e(), [p, h] = T.useState([]), a = (o) => {
397
403
  const b = p.findIndex((g) => g.guid === o.guid), m = [...p];
398
404
  b >= 0 ? m.splice(b, 1) : m.push(o), h(m);
399
405
  };
@@ -443,27 +449,27 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
443
449
  }
444
450
  );
445
451
  }, Et = ({ onClose: t }) => {
446
- const { goals: n } = R(), { addGoal: u, debtGoals: l, setAlert: _, setSelectedGoal: i } = G(), { config: d } = _e(), { visibleDebtAccounts: s } = P(), [p, h] = T.useState(!1), a = ze(n), o = (m, g, x) => {
447
- x === r.DEBT_TRACK ? h(!0) : i({
452
+ const { goals: n } = x(), { addGoal: u, debtGoals: l, setAlert: _, setSelectedGoal: i } = G(), { config: d } = _e(), { visibleDebtAccounts: s } = P(), [p, h] = T.useState(!1), a = ze(n), o = (m, g, R) => {
453
+ R === r.DEBT_TRACK ? h(!0) : i({
448
454
  amount: 0,
449
455
  current_amount: 0,
450
456
  goal_type: ce.SAVE_AMOUNT,
451
457
  initial_amount: 0,
452
458
  meta_type: g,
453
459
  name: m,
454
- track_type: x
460
+ track_type: R
455
461
  });
456
462
  }, b = async (m) => {
457
463
  for (const g of m) {
458
- let x = Z.CREDIT_CARD;
459
- g.account_type === ge.LOAN ? x = Z.LOANS : g.account_type === ge.LINE_OF_CREDIT && (x = Z.LINE_OF_CREDIT), await u({
464
+ let R = Z.CREDIT_CARD;
465
+ g.account_type === ge.LOAN ? R = Z.LOANS : g.account_type === ge.LINE_OF_CREDIT && (R = Z.LINE_OF_CREDIT), await u({
460
466
  account_guid: g.guid,
461
467
  amount: 0,
462
468
  current_amount: 0,
463
469
  goal_type: ce.KEEP_BALANCE_BELOW,
464
470
  initial_amount: g.balance || 0,
465
471
  interest_rate: g.interest_rate || 0,
466
- meta_type: x,
472
+ meta_type: R,
467
473
  monthly_payment: g.minimum_payment || 0,
468
474
  name: we(g, {
469
475
  allowNickname: d?.show_account_nicknames_in_master
@@ -473,7 +479,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
473
479
  }
474
480
  h(!1), t?.(r.DEBT_TRACK);
475
481
  };
476
- return /* @__PURE__ */ c(f, { children: [
482
+ return /* @__PURE__ */ c(y, { children: [
477
483
  /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: a.map((m, g) => /* @__PURE__ */ e(St, { goalType: m, onClick: o }, g)) }),
478
484
  /* @__PURE__ */ e(
479
485
  Oe,
@@ -486,7 +492,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
486
492
  }
487
493
  )
488
494
  ] });
489
- }, Be = ({ account: t }) => {
495
+ }, We = ({ account: t }) => {
490
496
  const n = ot(t);
491
497
  return /* @__PURE__ */ c(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
492
498
  /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
@@ -505,7 +511,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
505
511
  )
506
512
  ] });
507
513
  }, vt = D(({ goal: t }) => {
508
- const { goals: n } = R(), { setAlert: u, setSelectedGoal: l, updateGoal: _, updateRetirementGoal: i } = G(), [d, s] = T.useState(t.amount), p = !t.guid, h = d < 0 || d > 9999999999e-2, a = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, o = async () => {
514
+ const { goals: n } = x(), { setAlert: u, setSelectedGoal: l, updateGoal: _, updateRetirementGoal: i } = G(), [d, s] = T.useState(t.amount), p = !t.guid, h = d < 0 || d > 9999999999e-2, a = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, o = async () => {
509
515
  const m = { ...t, amount: d };
510
516
  t.amount = d, p ? l(m) : (t.track_type !== r.RETIREMENT_TRACK ? await _(m) : await i(m), u(n.alert_goal_updated_amount));
511
517
  }, b = () => {
@@ -539,18 +545,18 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
539
545
  }
540
546
  );
541
547
  }), It = ({ goal: t }) => {
542
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = P(), { accounts: l, goals: _ } = R(), { config: i } = _e(), { setAlert: d, setSelectedGoal: s, updateGoal: p } = G(), h = !t.guid, [a, o] = T.useState(!1), b = async ({ balance: m, guid: g }) => {
543
- const x = { ...t, account_guid: g, current_amount: m || 0 };
544
- h ? s(x) : (await p(x), d(_.alert_account_changed)), o(!1);
548
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = P(), { accounts: l, goals: _ } = x(), { config: i } = _e(), { setAlert: d, setSelectedGoal: s, updateGoal: p } = G(), h = !t.guid, [a, o] = T.useState(!1), b = async ({ balance: m, guid: g }) => {
549
+ const R = { ...t, account_guid: g, current_amount: m || 0 };
550
+ h ? s(R) : (await p(R), d(_.alert_account_changed)), o(!1);
545
551
  };
546
- return /* @__PURE__ */ c(f, { children: [
552
+ return /* @__PURE__ */ c(y, { children: [
547
553
  h && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(M, { onClick: () => o(!0), children: [
548
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
554
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(y, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
549
555
  /* @__PURE__ */ e(Ie, { filled: !0 }),
550
556
  _.details_add_account
551
557
  ] }) }),
552
558
  /* @__PURE__ */ e(V, { color: "primary" })
553
- ] }) }) : /* @__PURE__ */ c(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
559
+ ] }) }) : /* @__PURE__ */ c(y, { sx: { gap: 8, my: 24, mx: 24 }, children: [
554
560
  /* @__PURE__ */ e(me, { onClick: () => o(!0), variant: "text", children: _.details_change_account }),
555
561
  /* @__PURE__ */ e(
556
562
  C,
@@ -558,11 +564,11 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
558
564
  color: "text.secondary",
559
565
  sx: { textAlign: "center", whiteSpace: "wrap" },
560
566
  variant: "subtitle1",
561
- children: B(_.details_change_account_description, t.name)
567
+ children: W(_.details_change_account_description, t.name)
562
568
  }
563
569
  )
564
570
  ] }),
565
- /* @__PURE__ */ e(Q, { isOpen: a, onClose: () => o(!1), title: _.details_change_account, children: /* @__PURE__ */ c(f, { children: [
571
+ /* @__PURE__ */ e(Q, { isOpen: a, onClose: () => o(!1), title: _.details_change_account, children: /* @__PURE__ */ c(y, { children: [
566
572
  n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: l.account_types[1] }),
567
573
  /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((m) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(M, { onClick: () => b(m), children: [
568
574
  /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(
@@ -610,7 +616,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
610
616
  ] }) })
611
617
  ] });
612
618
  }, Gt = D(({ goal: t }) => {
613
- const { goals: n } = R(), { setAlert: u, setSelectedGoal: l, updateGoal: _ } = G(), [i, d] = T.useState(t.name), s = !t.guid, p = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, h = async () => {
619
+ const { goals: n } = x(), { setAlert: u, setSelectedGoal: l, updateGoal: _ } = G(), [i, d] = T.useState(t.name), s = !t.guid, p = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, h = async () => {
614
620
  const o = { ...t, name: i };
615
621
  t.name = i, s ? l(o) : (await _(o), u(n.alert_goal_updated_name));
616
622
  }, a = () => {
@@ -641,7 +647,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
641
647
  }
642
648
  );
643
649
  }), Nt = ({ goal: t }) => {
644
- const { goals: n } = R(), { setAlert: u, setSelectedGoal: l, updateRetirementGoal: _ } = G(), [i, d] = T.useState(t.retirement_age || 65), s = !t.guid, p = async () => {
650
+ const { goals: n } = x(), { setAlert: u, setSelectedGoal: l, updateRetirementGoal: _ } = G(), [i, d] = T.useState(t.retirement_age || 65), s = !t.guid, p = async () => {
645
651
  if (!isNaN(i)) {
646
652
  const o = { ...t, retirement_age: i };
647
653
  t.retirement_age = i, s ? l(o) : (await _(o), u(n.alert_goal_updated_retirement_age));
@@ -675,7 +681,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
675
681
  }
676
682
  );
677
683
  }, kt = D(({ goal: t }) => {
678
- const { goals: n } = R(), { user: u, updateUser: l } = Ge(), { setAlert: _ } = G(), [i, d] = T.useState(ne(u.birthday ?? 0)), [s, p] = T.useState(null), h = t.is_complete, a = async () => {
684
+ const { goals: n } = x(), { user: u, updateUser: l } = Ge(), { setAlert: _ } = G(), [i, d] = T.useState(ne(u.birthday ?? 0)), [s, p] = T.useState(null), h = t.is_complete, a = async () => {
679
685
  i && ct(i) && (await l({ ...u, birthday: st(i) }), _(n.alert_goal_updated_birthday));
680
686
  };
681
687
  return /* @__PURE__ */ e(
@@ -701,7 +707,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
701
707
  }
702
708
  );
703
709
  }), wt = ({ goal: t }) => {
704
- const { goals: n } = R(), { visibleRetirementAccounts: u } = P(), {
710
+ const { goals: n } = x(), { visibleRetirementAccounts: u } = P(), {
705
711
  addRetirementGoalAccount: l,
706
712
  newRetirementGoalAccounts: _,
707
713
  retirementGoalAccounts: i,
@@ -710,11 +716,11 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
710
716
  setNewRetirementGoalAccounts: p,
711
717
  setSelectedGoal: h
712
718
  } = G(), [a, o] = T.useState(!1), b = !t.guid, m = u.filter(
713
- (y) => b ? _.find((A) => A.account_guid === y.guid) : i.find((A) => A.account_guid === y.guid)
719
+ (f) => b ? _.find((A) => A.account_guid === f.guid) : i.find((A) => A.account_guid === f.guid)
714
720
  ), g = u.filter(
715
- (y) => !i.find((A) => A.account_guid === y.guid)
716
- ), x = async (y) => {
717
- const A = y.map((S) => ({
721
+ (f) => !i.find((A) => A.account_guid === f.guid)
722
+ ), R = async (f) => {
723
+ const A = f.map((S) => ({
718
724
  account_guid: S.guid,
719
725
  retirement_goal_guid: t.guid
720
726
  }));
@@ -725,16 +731,16 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
725
731
  await l(S), s(n.alert_account_added);
726
732
  h({
727
733
  ...d,
728
- current_amount: y.reduce((S, N) => S + (N.balance || 0), 0)
734
+ current_amount: f.reduce((S, N) => S + (N.balance || 0), 0)
729
735
  }), o(!1);
730
736
  };
731
- return /* @__PURE__ */ c(f, { children: [
732
- m.map((y) => /* @__PURE__ */ c(f, { children: [
733
- /* @__PURE__ */ e(Be, { account: y }),
737
+ return /* @__PURE__ */ c(y, { children: [
738
+ m.map((f) => /* @__PURE__ */ c(y, { children: [
739
+ /* @__PURE__ */ e(We, { account: f }),
734
740
  /* @__PURE__ */ e(v, {})
735
- ] }, y.guid)),
741
+ ] }, f.guid)),
736
742
  /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(M, { onClick: () => o(!0), children: [
737
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
743
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(y, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
738
744
  /* @__PURE__ */ e(Ie, { filled: !0 }),
739
745
  n.details_add_account
740
746
  ] }) }),
@@ -746,19 +752,19 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
746
752
  accounts: g,
747
753
  isOpen: a,
748
754
  onClose: () => o(!1),
749
- onSave: x,
755
+ onSave: R,
750
756
  title: n.add_select_accounts
751
757
  }
752
758
  )
753
759
  ] });
754
760
  }, Dt = D(({ goal: t }) => {
755
- const { goals: n } = R(), { visibleAccounts: u } = P(), l = T.useMemo(
761
+ const { goals: n } = x(), { visibleAccounts: u } = P(), l = T.useMemo(
756
762
  () => u.find((d) => d.guid === t.account_guid),
757
763
  [u, t]
758
764
  ), _ = t.track_type;
759
765
  let i = n.details_save_title;
760
- return t.track_type === r.DEBT_TRACK ? i = n.details_debt_title : t.track_type === r.RETIREMENT_TRACK && (i = n.details_retirement_title), /* @__PURE__ */ c(f, { children: [
761
- /* @__PURE__ */ c(f, { mx: 24, children: [
766
+ return t.track_type === r.DEBT_TRACK ? i = n.details_debt_title : t.track_type === r.RETIREMENT_TRACK && (i = n.details_retirement_title), /* @__PURE__ */ c(y, { children: [
767
+ /* @__PURE__ */ c(y, { mx: 24, children: [
762
768
  /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: i }),
763
769
  /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
764
770
  /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: n.details_title })
@@ -767,7 +773,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
767
773
  _ !== r.RETIREMENT_TRACK ? /* @__PURE__ */ e(Gt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
768
774
  w,
769
775
  {
770
- primary: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
776
+ primary: /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
771
777
  /* @__PURE__ */ e(C, { variant: "body1", children: n.details_goal_name }),
772
778
  /* @__PURE__ */ e(C, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
773
779
  ] }),
@@ -796,7 +802,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
796
802
  ] }),
797
803
  /* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: t.track_type === r.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
798
804
  t.track_type !== r.RETIREMENT_TRACK && l && /* @__PURE__ */ c($, { children: [
799
- /* @__PURE__ */ e(Be, { account: l }),
805
+ /* @__PURE__ */ e(We, { account: l }),
800
806
  /* @__PURE__ */ e(v, {})
801
807
  ] }),
802
808
  t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c($, { children: [
@@ -806,7 +812,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
806
812
  t.track_type === r.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(It, { goal: t })
807
813
  ] });
808
814
  }), Kt = D(({ onClose: t }) => {
809
- const { visibleRetirementAccounts: n } = P(), { goals: u, common: l } = R(), {
815
+ const { visibleRetirementAccounts: n } = P(), { goals: u, common: l } = x(), {
810
816
  addGoal: _,
811
817
  addRetirementGoal: i,
812
818
  deleteGoal: d,
@@ -817,7 +823,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
817
823
  setAlert: o,
818
824
  setSelectedGoal: b,
819
825
  updateGoal: m
820
- } = G(), { user: g } = Ge(), [x, y] = T.useState(!1), A = !a?.guid, S = a?.track_type === r.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, N = T.useMemo(() => {
826
+ } = G(), { user: g } = Ge(), [R, f] = T.useState(!1), A = !a?.guid, S = a?.track_type === r.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, N = T.useMemo(() => {
821
827
  const E = A ? p : h;
822
828
  return n.filter((j) => E.some((F) => F.account_guid === j.guid));
823
829
  }, [A, n, p, h]), K = T.useMemo(() => {
@@ -826,14 +832,14 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
826
832
  const { account_guid: E, track_type: j, name: F, amount: ee, retirement_age: O } = a;
827
833
  return j === r.SAVINGS_TRACK ? E ? !!F && !!ee : !1 : j === r.RETIREMENT_TRACK ? N.length ? !!F && !!ee && !!O && !!g.birthday : !1 : !0;
828
834
  }, [a, N, g.birthday]);
829
- let U = l.delete_button, Y = () => y(!0);
835
+ let U = l.delete_button, Y = () => f(!0);
830
836
  A ? (Y = () => ae(), U = l.save_button) : S && (Y = () => X(), U = u.mark_as_complete_button);
831
837
  const ae = async () => {
832
838
  if (a) {
833
839
  const E = a.track_type;
834
840
  E !== r.RETIREMENT_TRACK ? await _(a) : E === r.RETIREMENT_TRACK && await i({ ...a, target_amount: a.amount }), o(u.alert_goal_added), b(void 0), E && t?.(E);
835
841
  }
836
- }, W = async () => {
842
+ }, B = async () => {
837
843
  a && (a.track_type !== r.RETIREMENT_TRACK ? await d(a.guid) : a.track_type === r.RETIREMENT_TRACK && await s(a), o(u.alert_goal_deleted), b(void 0));
838
844
  }, X = async () => {
839
845
  const E = {
@@ -842,7 +848,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
842
848
  };
843
849
  await m(E), o(u.alert_goal_completed), b(void 0);
844
850
  };
845
- return /* @__PURE__ */ c(f, { children: [
851
+ return /* @__PURE__ */ c(y, { children: [
846
852
  /* @__PURE__ */ e(
847
853
  Q,
848
854
  {
@@ -863,26 +869,26 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
863
869
  ut,
864
870
  {
865
871
  copy: { close_aria: l.close_aria, title: u.delete_goal },
866
- isOpen: x,
872
+ isOpen: R,
867
873
  maxWidth: "xs",
868
- onClose: () => y(!1),
869
- onPrimaryAction: W,
874
+ onClose: () => f(!1),
875
+ onPrimaryAction: B,
870
876
  primaryColor: "error",
871
877
  primaryText: l.delete_button,
872
- children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "subtitle1", children: B(u.delete_description, a?.name || "") })
878
+ children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "subtitle1", children: W(u.delete_description, a?.name || "") })
873
879
  }
874
880
  )
875
881
  ] });
876
882
  }), jn = D(({ onBackClick: t, sx: n }) => {
877
- const { onEvent: u } = Ne(), { isMobile: l } = pe(), { isAccountDataLoaded: _, loadAccountData: i } = P(), { isInitialized: d } = ue(), { goals: s, common: p } = R(), {
883
+ const { onEvent: u } = Ne(), { isMobile: l } = pe(), { isAccountDataLoaded: _, loadAccountData: i } = P(), { isInitialized: d } = ue(), { goals: s, common: p } = x(), {
878
884
  alert: h,
879
885
  goals: a,
880
886
  isAllGoalDataLoaded: o,
881
887
  loadGoalData: b,
882
888
  monthlyCashFlowProfile: m,
883
889
  setAlert: g,
884
- retirmentGoals: x
885
- } = G(), [y, A] = T.useState(0), [S, N] = T.useState(!1), K = m?.amount_allocated_for_savings_goals || 0, U = m?.amount_allocated_for_debt_goals || 0, Y = m?.amount_allocated_for_retirement_goals || 0;
890
+ retirmentGoals: R
891
+ } = G(), [f, A] = T.useState(0), [S, N] = T.useState(!1), K = m?.amount_allocated_for_savings_goals || 0, U = m?.amount_allocated_for_debt_goals || 0, Y = m?.amount_allocated_for_retirement_goals || 0;
886
892
  Ke({
887
893
  widgetName: "GoalsWidget",
888
894
  isLoaded: o
@@ -893,23 +899,23 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
893
899
  }, [d]);
894
900
  const ae = () => {
895
901
  u(H.GOALS_CLICK_FILTER);
896
- }, W = () => {
902
+ }, B = () => {
897
903
  N(!0), u(H.GOALS_CLICK_ADD);
898
904
  }, X = (O) => {
899
905
  N(!1), O === r.SAVINGS_TRACK ? A(0) : O === r.DEBT_TRACK ? A(1) : O === r.RETIREMENT_TRACK && A(2);
900
906
  }, E = T.useMemo(
901
- () => o && (a.length === 0 || a.every(({ track_type: O }) => !O) && x.length === 0),
902
- [a, o, x]
907
+ () => o && (a.length === 0 || a.every(({ track_type: O }) => !O) && R.length === 0),
908
+ [a, o, R]
903
909
  );
904
910
  if (!d || !o)
905
911
  return /* @__PURE__ */ e(Me, {});
906
- const j = B(
912
+ const j = W(
907
913
  l ? s.tab_subtitle_mobile : s.tab_subtitle,
908
914
  I(K, "0,0")
909
- ), F = B(
915
+ ), F = W(
910
916
  l ? s.tab_subtitle_mobile : s.tab_subtitle,
911
917
  I(U, "0,0")
912
- ), ee = B(
918
+ ), ee = W(
913
919
  l ? s.tab_subtitle_mobile : s.tab_subtitle,
914
920
  I(Y, "0,0")
915
921
  );
@@ -920,7 +926,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
920
926
  {
921
927
  iconName: "add",
922
928
  label: s.add_title,
923
- onClick: W
929
+ onClick: B
924
930
  }
925
931
  ],
926
932
  onAccountsFilterClick: ae,
@@ -928,14 +934,14 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
928
934
  sx: n,
929
935
  title: s.title,
930
936
  children: [
931
- /* @__PURE__ */ c(f, { mx: l ? 0 : 48, my: 24, children: [
937
+ /* @__PURE__ */ c(y, { mx: l ? 0 : 48, my: 24, children: [
932
938
  /* @__PURE__ */ c(
933
939
  Fe,
934
940
  {
935
- onChange: (O, We) => A(We),
941
+ onChange: (O, Be) => A(Be),
936
942
  sx: { bgcolor: "background.paper" },
937
943
  textColor: "primary",
938
- value: E ? !1 : y,
944
+ value: E ? !1 : f,
939
945
  variant: "fullWidth",
940
946
  children: [
941
947
  /* @__PURE__ */ e(
@@ -967,7 +973,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
967
973
  {
968
974
  header: s.create_goals_header,
969
975
  icon: "trophy",
970
- onClick: W,
976
+ onClick: B,
971
977
  primaryButton: s.add_goals_button,
972
978
  subText: s.empty_state_subheader,
973
979
  sx: {
@@ -978,9 +984,9 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
978
984
  }
979
985
  }
980
986
  ) : /* @__PURE__ */ c($, { children: [
981
- y === 0 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: r.SAVINGS_TRACK }),
982
- y === 1 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: r.DEBT_TRACK }),
983
- y === 2 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: r.RETIREMENT_TRACK })
987
+ f === 0 && /* @__PURE__ */ e(se, { onAddGoals: B, trackType: r.SAVINGS_TRACK }),
988
+ f === 1 && /* @__PURE__ */ e(se, { onAddGoals: B, trackType: r.DEBT_TRACK }),
989
+ f === 2 && /* @__PURE__ */ e(se, { onAddGoals: B, trackType: r.RETIREMENT_TRACK })
984
990
  ] })
985
991
  ] }),
986
992
  /* @__PURE__ */ e(Kt, { onClose: X }),
@@ -999,21 +1005,21 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
999
1005
  }
1000
1006
  );
1001
1007
  }), Mt = D(({ goal: t }) => {
1002
- const { goals: n } = R(), u = yt(), {
1008
+ const { goals: n } = x(), u = ft(), {
1003
1009
  backgroundColor: l,
1004
1010
  color: _,
1005
1011
  percentage: i,
1006
1012
  projectedText: d
1007
1013
  } = de(n, t), s = Math.round(i * 100);
1008
1014
  let p = /* @__PURE__ */ e(Se, {});
1009
- return t.track_type === r.DEBT_TRACK ? p = /* @__PURE__ */ e(Ee, {}) : t.track_type === r.RETIREMENT_TRACK && (p = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1015
+ return t.track_type === r.DEBT_TRACK ? p = /* @__PURE__ */ e(Ee, {}) : t.track_type === r.RETIREMENT_TRACK && (p = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ c(y, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1010
1016
  /* @__PURE__ */ e(oe, { sx: { bgcolor: l, color: _, height: 32, width: 32 }, variant: "rounded", children: p }),
1011
1017
  /* @__PURE__ */ c(bt, { sx: { width: "100%" }, children: [
1012
1018
  /* @__PURE__ */ e(Te, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1013
1019
  t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: d })
1014
1020
  ] }),
1015
1021
  /* @__PURE__ */ e(
1016
- ft,
1022
+ yt,
1017
1023
  {
1018
1024
  backgroundStrokeColor: u.palette.border.lighter,
1019
1025
  color: u.palette.primary.main,
@@ -1025,7 +1031,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
1025
1031
  )
1026
1032
  ] });
1027
1033
  }), Lt = ({ header: t, subText: n, sx: u }) => /* @__PURE__ */ c(
1028
- f,
1034
+ y,
1029
1035
  {
1030
1036
  sx: {
1031
1037
  alignItems: "center",
@@ -1048,7 +1054,7 @@ const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
1048
1054
  ]
1049
1055
  }
1050
1056
  ), Fn = D(({ onCTAClick: t }) => {
1051
- const { isAccountDataLoaded: n, loadAccountData: u, visibleAccounts: l } = P(), { onEvent: _ } = Ne(), { goals: i } = R(), { isInitialized: d } = ue(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: p, loadGoalData: h } = G();
1057
+ const { isAccountDataLoaded: n, loadAccountData: u, visibleAccounts: l } = P(), { onEvent: _ } = Ne(), { goals: i } = x(), { isInitialized: d } = ue(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: p, loadGoalData: h } = G();
1052
1058
  Ke({
1053
1059
  widgetName: "GoalsMicroWidget",
1054
1060
  isLoaded: p