@mx-cartographer/experiences 7.4.7-alpha.mega1 → 7.4.8-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.
Files changed (61) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/{Account-01wOyrH1.mjs → Account-BrOTlmeK.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-COMjOzwr.mjs → AccountDetailsContent-B7FqH05C.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-Cbi5G6fJ.mjs → AccountDetailsHeader-C8MxsxhN.mjs} +4 -4
  5. package/dist/{AccountFields-Cd_nOWmf.mjs → AccountFields-BQZ-o6Kj.mjs} +2 -2
  6. package/dist/{AccountListItem-DxY4cCF1.mjs → AccountListItem-aIE9WWTO.mjs} +4 -4
  7. package/dist/{AccountStore-C1zMBzHq.mjs → AccountStore-DqO84Aer.mjs} +2 -2
  8. package/dist/{Accounts-D7QljYas.mjs → Accounts-DC_A4UCa.mjs} +1 -1
  9. package/dist/{BudgetUtil-Df2nII9u.mjs → BudgetUtil-BmZXkL0C.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-DqJK_rrL.mjs → CategorySelectorDrawer-SUgfE5GN.mjs} +1 -1
  11. package/dist/{ConnectDrawer-CuUj16NH.mjs → ConnectDrawer-KL8t1qSC.mjs} +1 -1
  12. package/dist/{ConnectionsDrawer-Bz4uwdFE.mjs → ConnectionsDrawer-DaK5uIL5.mjs} +2 -2
  13. package/dist/{CurrencyInput-BFKcs-_K.mjs → CurrencyInput-itK0R3wV.mjs} +1 -1
  14. package/dist/{DebtsStore-Bu8rRRSL.mjs → DebtsStore-DVPZbv2C.mjs} +1 -1
  15. package/dist/{ExportCsvAction-DzTrtPzk.mjs → ExportCsvAction-Cglo8Mca.mjs} +3 -3
  16. package/dist/{GoalStore-CrNhjvNc.mjs → GoalStore-o4rrjGSJ.mjs} +2 -2
  17. package/dist/{Help-BnPXM_N2.mjs → Help-BjLMsuMS.mjs} +1 -1
  18. package/dist/{LineChart-bc1D9xBE.mjs → LineChart-BQRxZF3p.mjs} +1 -1
  19. package/dist/{ListItemAction-uobBrm_a.mjs → ListItemAction-BxTkF6Tz.mjs} +1 -1
  20. package/dist/{ManageIncome-A69EUO5u.mjs → ManageIncome-rcnDYsBJ.mjs} +75 -75
  21. package/dist/{MicroWidgetContainer-DEiRnYVa.mjs → MicroWidgetContainer-B2hO9rOG.mjs} +1 -1
  22. package/dist/{MiniWidgetContainer-CmXpTylX.mjs → MiniWidgetContainer-98-hKFqm.mjs} +1 -1
  23. package/dist/{NetWorthStore-CpL_kqvx.mjs → NetWorthStore-DG2X69jG.mjs} +2 -2
  24. package/dist/{NotificationSettings-CNmJWVeI.mjs → NotificationSettings-C7FYNM7I.mjs} +250 -248
  25. package/dist/{OriginalBalanceAction-DK8_LkPz.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +3 -3
  26. package/dist/{RecurringSettings-B0uObPlD.mjs → RecurringSettings-C81H1l38.mjs} +3 -3
  27. package/dist/{SpendingLegend-Bf-wbJvb.mjs → SpendingLegend-DqZxN_BZ.mjs} +2 -2
  28. package/dist/{TransactionDetails-COH0OKNG.mjs → TransactionDetails-BA_E5nQ-.mjs} +5 -5
  29. package/dist/{TransactionStore-Dz-G8Wd0.mjs → TransactionStore-PRlwE-TF.mjs} +2 -2
  30. package/dist/{User-wXzDI4M8.mjs → User-Cnlegl1N.mjs} +1 -1
  31. package/dist/{ViewMoreMicroCard-C0832BMe.mjs → ViewMoreMicroCard-DfPXJzbv.mjs} +105 -101
  32. package/dist/{WidgetContainer-6dsjtOVg.mjs → WidgetContainer-CaPjoWeE.mjs} +2 -2
  33. package/dist/accounts/index.es.js +148 -140
  34. package/dist/analytics/index.es.js +2 -2
  35. package/dist/budgets/index.es.js +483 -478
  36. package/dist/cashflow/index.es.js +367 -362
  37. package/dist/categories/index.es.js +1 -1
  38. package/dist/common/hooks/index.d.ts +1 -0
  39. package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
  40. package/dist/common/index.es.js +35 -33
  41. package/dist/dashboard/index.es.js +90 -88
  42. package/dist/debts/index.es.js +346 -342
  43. package/dist/{exportTransactionsToCSV-Cz2t0lmA.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +1 -1
  44. package/dist/finstrong/index.es.js +352 -350
  45. package/dist/goals/index.es.js +518 -511
  46. package/dist/help/index.es.js +13 -9
  47. package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
  48. package/dist/investments/index.es.js +395 -393
  49. package/dist/merchants/index.es.js +1 -1
  50. package/dist/microinsights/index.es.js +1 -1
  51. package/dist/networth/index.es.js +245 -240
  52. package/dist/notifications/index.es.js +2 -2
  53. package/dist/recurringtransactions/index.es.js +293 -285
  54. package/dist/settings/index.es.js +252 -249
  55. package/dist/spending/index.es.js +136 -124
  56. package/dist/transactions/index.es.js +77 -73
  57. package/dist/trends/index.es.js +601 -588
  58. package/dist/{useAccountDisplayName-CMMlIOXF.mjs → useAccountDisplayName-Cjx8YmKK.mjs} +2 -2
  59. package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
  60. package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +23 -0
  61. package/package.json +1 -1
@@ -1,157 +1,158 @@
1
- import { g as _e, T as u, G as ue, a as Pe, M as q, C as Te, b as Ve } from "../GoalStore-CrNhjvNc.mjs";
2
- import { c as qn, d as Jn } from "../GoalStore-CrNhjvNc.mjs";
3
- import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
1
+ import { g as ue, T as u, G as me, a as Pe, M as J, C as Ae, b as Ve } from "../GoalStore-o4rrjGSJ.mjs";
2
+ import { c as qn, d as Jn } from "../GoalStore-o4rrjGSJ.mjs";
3
+ import { jsxs as r, jsx as e, Fragment as U } from "react/jsx-runtime";
4
4
  import y from "react";
5
5
  import { observer as D } from "mobx-react-lite";
6
6
  import je from "@mui/material/Alert";
7
7
  import Fe from "@mui/material/Snackbar";
8
- import b from "@mui/material/Stack";
9
- import ce from "@mui/material/Tab";
8
+ import f from "@mui/material/Stack";
9
+ import le from "@mui/material/Tab";
10
10
  import ze from "@mui/material/Tabs";
11
- import { Text as A, H2 as pe, P, H3 as He, Icon as $e, InstitutionLogo as oe } from "@mxenabled/mxui";
12
- import he from "@mui/material/Button";
13
- import Ce from "@mui/material/Card";
14
- import Se from "@mui/material/CardActionArea";
15
- import Re from "@mui/material/CardContent";
16
- import fe from "@mui/material/Unstable_Grid2";
17
- import ae from "@mui/material/Avatar";
11
+ import { Text as A, H2 as _e, P as W, H3 as He, Icon as $e, InstitutionLogo as ne } from "@mxenabled/mxui";
12
+ import pe from "@mui/material/Button";
13
+ import Te from "@mui/material/Card";
14
+ import Ce from "@mui/material/CardActionArea";
15
+ import Se from "@mui/material/CardContent";
16
+ import be from "@mui/material/Unstable_Grid2";
17
+ import oe from "@mui/material/Avatar";
18
18
  import Xe from "@mui/material/CardHeader";
19
- import { Payments as Ee, NoteStack as xe, Person as ve, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as ye, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
20
- import { u as C, l as I, b as ge, a as Ge, d as j, p as Ne, g as ke, n as Qe } from "../hooks-C41HAxM5.mjs";
21
- import { u as be } from "../useScreenSize-B6JyS_Lj.mjs";
19
+ import { Payments as Re, NoteStack as Ee, Person as xe, ChevronRight as M, DragHandle as Ue, CheckCircle as Ye, Icon as fe, ExpandLess as Ze, ExpandMore as qe, AddBox as ve, Trophy as Je } from "@mxenabled/mx-icons";
20
+ import { u as C, l as I, b as he, a as Ie, d as V, o as Ge, g as Ne } from "../hooks-ZMp65DFz.mjs";
21
+ import { u as ge } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { f as x } from "../NumberFormatting-DjTD0t3W.mjs";
23
- import { S as et } from "../StatusBar-BK_uYHAB.mjs";
23
+ import { S as Qe } from "../StatusBar-BK_uYHAB.mjs";
24
24
  import E from "@mui/material/Divider";
25
25
  import B from "@mui/material/List";
26
- import { L as Q } from "../ListItemAction-uobBrm_a.mjs";
27
- import { C as we } from "../CurrencyInput-BFKcs-_K.mjs";
28
- import { fromUnixTime as J } from "date-fns/fromUnixTime";
26
+ import { L as ee } from "../ListItemAction-BxTkF6Tz.mjs";
27
+ import { C as ke } from "../CurrencyInput-itK0R3wV.mjs";
28
+ import { fromUnixTime as Q } from "date-fns/fromUnixTime";
29
29
  import N from "@mui/material/ListItem";
30
30
  import k from "@mui/material/ListItemButton";
31
31
  import w from "@mui/material/ListItemText";
32
- import { DataGridPro as tt } from "@mui/x-data-grid-pro";
33
- import { D as F } from "../Drawer-BEtCk82g.mjs";
32
+ import { DataGridPro as et } from "@mui/x-data-grid-pro";
33
+ import { D as j } from "../Drawer-BEtCk82g.mjs";
34
34
  import { b as L } from "../Localization-2MODESHW.mjs";
35
- import { f as re, a as ie, D as nt } from "../Dialog-BPTr3qHE.mjs";
36
- import V from "@mui/material/ListItemAvatar";
37
- import { g as De, A as Ae } from "../ConnectDrawer-CuUj16NH.mjs";
38
- import ot from "@mui/material/Collapse";
39
- import at from "@mui/material/ListItemIcon";
40
- import rt from "@mui/material/Checkbox";
41
- import { u as it, A as st } from "../AccountDetailsHeader-Cbi5G6fJ.mjs";
42
- import { A as lt } from "../AccountDetailsContent-COMjOzwr.mjs";
43
- import { u as ct } from "../useAccountDisplayName-CMMlIOXF.mjs";
44
- import Ke from "@mui/material/TextField";
45
- import { M as dt, I as mt, O as ut } from "../OriginalBalanceAction-DK8_LkPz.mjs";
46
- import { getUnixTime as _t } from "date-fns/getUnixTime";
47
- import { isValid as pt } from "date-fns/isValid";
48
- import { AdapterDateFns as ht } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
- import { DatePicker as gt } from "@mui/x-date-pickers";
50
- import { LocalizationProvider as bt } from "@mui/x-date-pickers/LocalizationProvider";
51
- import { A as Y, W as ft } from "../WidgetContainer-6dsjtOVg.mjs";
35
+ import { f as ae, a as re, D as tt } from "../Dialog-BPTr3qHE.mjs";
36
+ import P from "@mui/material/ListItemAvatar";
37
+ import { g as we, A as ye } from "../ConnectDrawer-KL8t1qSC.mjs";
38
+ import nt from "@mui/material/Collapse";
39
+ import ot from "@mui/material/ListItemIcon";
40
+ import at from "@mui/material/Checkbox";
41
+ import { u as rt, A as it } from "../AccountDetailsHeader-C8MxsxhN.mjs";
42
+ import { A as st } from "../AccountDetailsContent-B7FqH05C.mjs";
43
+ import { u as lt } from "../useAccountDisplayName-Cjx8YmKK.mjs";
44
+ import De from "@mui/material/TextField";
45
+ import { M as ct, I as dt, O as mt } from "../OriginalBalanceAction-C6jdS4ws.mjs";
46
+ import { getUnixTime as ut } from "date-fns/getUnixTime";
47
+ import { isValid as _t } from "date-fns/isValid";
48
+ import { AdapterDateFns as pt } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
+ import { DatePicker as ht } from "@mui/x-date-pickers";
50
+ import { LocalizationProvider as gt } from "@mui/x-date-pickers/LocalizationProvider";
51
+ import { u as Ke } from "../useWidgetLoadTimer-C1NBkyLd.mjs";
52
+ import { A as Y, W as bt } from "../WidgetContainer-CaPjoWeE.mjs";
52
53
  import { L as Me } from "../Loader-DUaFpDGv.mjs";
53
- import { E as yt } from "../EmptyState-DoxNUae-.mjs";
54
- import At from "@mui/material/Stack/Stack";
55
- import Tt from "@mui/material/Box";
56
- import Ct from "@mui/material/styles/useTheme";
57
- import { S as St } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
- import { M as Rt } from "../MicroWidgetContainer-DEiRnYVa.mjs";
59
- function de({ title: t, subtitle: n }) {
60
- return /* @__PURE__ */ i(b, { children: [
54
+ import { E as ft } from "../EmptyState-DoxNUae-.mjs";
55
+ import yt from "@mui/material/Stack/Stack";
56
+ import At from "@mui/material/Box";
57
+ import Tt from "@mui/material/styles/useTheme";
58
+ import { S as Ct } from "../SingleSegmentDonut-BgbLgwHi.mjs";
59
+ import { M as St } from "../MicroWidgetContainer-B2hO9rOG.mjs";
60
+ function ce({ title: t, subtitle: n }) {
61
+ return /* @__PURE__ */ r(f, { children: [
61
62
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t }),
62
63
  /* @__PURE__ */ e(A, { sx: { fontWeight: 400 }, variant: "Body", children: n })
63
64
  ] });
64
65
  }
65
- const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
66
+ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
66
67
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
67
68
  "$1$2$3"
68
69
  ) : x(t, "0,0.00"), Le = D(
69
- ({ goal: t, isInDrawer: n = !1, onClick: s }) => {
70
- const { goals: c } = C(), { isMobile: p, isTablet: a } = be(), _ = p || a, {
71
- backgroundColor: h,
72
- color: g,
73
- percentage: r,
74
- percentageText: m,
70
+ ({ goal: t, isInDrawer: n = !1, onClick: i }) => {
71
+ const { goals: s } = C(), { isMobile: p, isTablet: a } = ge(), _ = p || a, {
72
+ backgroundColor: g,
73
+ color: l,
74
+ percentage: h,
75
+ percentageText: d,
75
76
  projectedText: o
76
- } = _e(c, t), d = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, l = [
77
+ } = ue(s, t), c = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, m = [
77
78
  {
78
- color: h,
79
- percentage: `${r}`
79
+ color: g,
80
+ percentage: `${h}`
80
81
  }
81
82
  ];
82
- let f = /* @__PURE__ */ e(Ee, {});
83
- return t.track_type === u.DEBT_TRACK ? f = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ i(Se, { disabled: !s, onClick: s, children: [
83
+ let b = /* @__PURE__ */ e(Re, {});
84
+ return t.track_type === u.DEBT_TRACK ? b = /* @__PURE__ */ e(Ee, {}) : t.track_type === u.RETIREMENT_TRACK && (b = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ r(Ce, { disabled: !i, onClick: i, children: [
84
85
  /* @__PURE__ */ e(
85
86
  Xe,
86
87
  {
87
- avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: h, color: g, height: 48, width: 48 }, variant: "rounded", children: f }),
88
- subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Et(
89
- d,
88
+ avatar: /* @__PURE__ */ e(oe, { sx: { bgcolor: g, color: l, height: 48, width: 48 }, variant: "rounded", children: b }),
89
+ subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Rt(
90
+ c,
90
91
  _
91
92
  )}` }),
92
- title: /* @__PURE__ */ e(pe, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
93
+ title: /* @__PURE__ */ e(_e, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
93
94
  }
94
95
  ),
95
- /* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ i(b, { gap: 6, children: [
96
- /* @__PURE__ */ e(et, { data: l, height: 24 }),
97
- /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
98
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: m }),
96
+ /* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ r(f, { gap: 6, children: [
97
+ /* @__PURE__ */ e(Qe, { data: m, height: 24 }),
98
+ /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
99
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: d }),
99
100
  t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o })
100
101
  ] })
101
102
  ] }) })
102
103
  ] }) });
103
104
  }
104
- ), xt = D(({ trackType: t }) => {
105
- const { goals: n } = C(), { setAlert: s, monthlyCashFlowProfile: c, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
106
- let r = 0;
107
- return t === u.SAVINGS_TRACK ? r = c?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? r = c?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (r = c?.amount_allocated_for_retirement_goals || 0), r;
108
- }, [c]), [_, h] = y.useState(a), g = async () => {
109
- if (c) {
110
- const r = { ...c };
111
- t === u.SAVINGS_TRACK ? r.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? r.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (r.amount_allocated_for_retirement_goals = _), await p(r), s(n.alert_contribution_updated);
105
+ ), Et = D(({ trackType: t }) => {
106
+ const { goals: n } = C(), { setAlert: i, monthlyCashFlowProfile: s, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
107
+ let h = 0;
108
+ return t === u.SAVINGS_TRACK ? h = s?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? h = s?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (h = s?.amount_allocated_for_retirement_goals || 0), h;
109
+ }, [s]), [_, g] = y.useState(a), l = async () => {
110
+ if (s) {
111
+ const h = { ...s };
112
+ t === u.SAVINGS_TRACK ? h.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? h.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (h.amount_allocated_for_retirement_goals = _), await p(h), i(n.alert_contribution_updated);
112
113
  }
113
114
  };
114
- return /* @__PURE__ */ e(b, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
115
- Q,
115
+ return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
116
+ ee,
116
117
  {
117
118
  isSaveDisabled: !_ || isNaN(_),
118
119
  label: n.contribution_label,
119
- onCancel: () => h(a),
120
- onSave: g,
120
+ onCancel: () => g(a),
121
+ onSave: l,
121
122
  primaryText: n.contribution_label,
122
123
  secondaryText: x(a, "0,0.00"),
123
124
  children: /* @__PURE__ */ e(
124
- we,
125
+ ke,
125
126
  {
126
127
  amount: _,
127
128
  autoFocus: !0,
128
129
  error: !_ || isNaN(_),
129
130
  fullWidth: !0,
130
131
  minAmount: 0,
131
- setAmount: (r) => h(isNaN(Number(r)) ? _ : Number(r)),
132
+ setAmount: (h) => g(isNaN(Number(h)) ? _ : Number(h)),
132
133
  sx: { ".MuiTypography-Body": { p: 0 } }
133
134
  }
134
135
  )
135
136
  }
136
137
  ) });
137
- }), vt = ({ goals: t }) => {
138
- const { goals: n, common: s } = C(), { reorderGoals: c, setAlert: p } = I(), [a, _] = y.useState(!1), [h, g] = y.useState(t.map((l) => ({ ...l })));
138
+ }), xt = ({ goals: t }) => {
139
+ const { goals: n, common: i } = C(), { reorderGoals: s, setAlert: p } = I(), [a, _] = y.useState(!1), [g, l] = y.useState(t.map((m) => ({ ...m })));
139
140
  y.useEffect(() => {
140
- a && g(t.map((l) => ({ ...l })));
141
+ a && l(t.map((m) => ({ ...m })));
141
142
  }, [a]);
142
- const r = [
143
+ const h = [
143
144
  {
144
145
  field: "name",
145
146
  flex: 1,
146
- renderCell: (l) => {
147
- const f = l.row;
148
- return /* @__PURE__ */ i(b, { children: [
149
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: f.name }),
147
+ renderCell: (m) => {
148
+ const b = m.row;
149
+ return /* @__PURE__ */ r(f, { children: [
150
+ /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: b.name }),
150
151
  /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
151
152
  n.goal_projection,
152
- re(
153
- J(f.projected_to_complete_at || 0),
154
- ie.MONTH_SHORT_YEAR
153
+ ae(
154
+ Q(b.projected_to_complete_at || 0),
155
+ re.MONTH_SHORT_YEAR
155
156
  )
156
157
  ) })
157
158
  ] });
@@ -162,29 +163,29 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
162
163
  align: "right",
163
164
  field: "amount",
164
165
  minWidth: 140,
165
- renderCell: (l) => {
166
- const f = l.row;
167
- return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(f.amount, "0,0.00") });
166
+ renderCell: (m) => {
167
+ const b = m.row;
168
+ return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(b.amount, "0,0.00") });
168
169
  },
169
170
  sortable: !1
170
171
  }
171
- ], m = h.map((l) => ({
172
- id: l.guid,
172
+ ], d = g.map((m) => ({
173
+ id: m.guid,
173
174
  isHovering: !1,
174
- __reorder__: l.name,
175
- ...l
176
- })), o = ({ oldIndex: l, targetIndex: f }) => {
177
- const T = [...h];
178
- T.splice(f, 0, T.splice(l, 1)[0]);
175
+ __reorder__: m.name,
176
+ ...m
177
+ })), o = ({ oldIndex: m, targetIndex: b }) => {
178
+ const T = [...g];
179
+ T.splice(b, 0, T.splice(m, 1)[0]);
179
180
  for (let S = 0; S < T.length; S += 1)
180
181
  T[S].position = S + 1;
181
- g(T);
182
- }, d = async () => {
183
- await c(h), p(n.alert_goals_reordered), _(!1);
182
+ l(T);
183
+ }, c = async () => {
184
+ await s(g), p(n.alert_goals_reordered), _(!1);
184
185
  };
185
- return /* @__PURE__ */ i(b, { children: [
186
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
187
- b,
186
+ return /* @__PURE__ */ r(f, { children: [
187
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(
188
+ f,
188
189
  {
189
190
  alignItems: "center",
190
191
  color: "action.active",
@@ -197,26 +198,26 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
197
198
  }
198
199
  ) }) }) }),
199
200
  /* @__PURE__ */ e(
200
- F,
201
+ j,
201
202
  {
202
- ariaLabelClose: s.close_aria,
203
+ ariaLabelClose: i.close_aria,
203
204
  isOpen: a,
204
205
  onClose: () => _(!1),
205
- onPrimaryAction: d,
206
+ onPrimaryAction: c,
206
207
  title: n.reorder_goals_title,
207
- children: /* @__PURE__ */ i(b, { children: [
208
- /* @__PURE__ */ e(P, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
208
+ children: /* @__PURE__ */ r(f, { children: [
209
+ /* @__PURE__ */ e(W, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
209
210
  /* @__PURE__ */ e(
210
- tt,
211
+ et,
211
212
  {
212
213
  columnHeaderHeight: 0,
213
- columns: r,
214
+ columns: h,
214
215
  disableColumnFilter: !0,
215
216
  disableColumnMenu: !0,
216
217
  hideFooter: !0,
217
218
  onRowOrderChange: o,
218
219
  rowReordering: !0,
219
- rows: m,
220
+ rows: d,
220
221
  slots: {
221
222
  rowReorderIcon: () => /* @__PURE__ */ e(Ue, { sx: { ml: 12 } })
222
223
  //TODO: Add to mx-icons
@@ -232,11 +233,11 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
232
233
  }
233
234
  )
234
235
  ] });
235
- }, It = ({ goal: t, index: n }) => {
236
- const { goals: s } = C(), { percentage: c } = _e(s, t), p = t.goal_type === ue.KEEP_BALANCE_BELOW || t.has_been_spent ? s.goal_completed : L(s.goal_percentage_reached, `${c * 100}`);
237
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
236
+ }, vt = ({ goal: t, index: n }) => {
237
+ const { goals: i } = C(), { percentage: s } = ue(i, t), p = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? i.goal_completed : L(i.goal_percentage_reached, `${s * 100}`);
238
+ return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
238
239
  t.track_type !== u.RETIREMENT_TRACK && /* @__PURE__ */ e(
239
- V,
240
+ P,
240
241
  {
241
242
  sx: {
242
243
  alignItems: "center",
@@ -244,114 +245,114 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
244
245
  justifyContent: "center",
245
246
  ".MuiAvatar-root": { height: "16px", width: "16px" }
246
247
  },
247
- children: /* @__PURE__ */ e(ae, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "XSmall", children: n + 1 }) })
248
+ children: /* @__PURE__ */ e(oe, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "XSmall", children: n + 1 }) })
248
249
  }
249
250
  ),
250
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
251
- /* @__PURE__ */ i(b, { children: [
251
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
252
+ /* @__PURE__ */ r(f, { children: [
252
253
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
253
254
  /* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p : L(
254
- s.goal_projection,
255
- re(
256
- J(t.projected_to_complete_at || 0),
257
- ie.MONTH_SHORT_YEAR
255
+ i.goal_projection,
256
+ ae(
257
+ Q(t.projected_to_complete_at || 0),
258
+ re.MONTH_SHORT_YEAR
258
259
  )
259
260
  ) })
260
261
  ] }),
261
262
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
262
263
  ] }) })
263
264
  ] }) });
264
- }, Gt = ({ goal: t }) => {
265
+ }, It = ({ goal: t }) => {
265
266
  const { goals: n } = C();
266
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
267
- /* @__PURE__ */ e(V, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
268
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
269
- /* @__PURE__ */ i(b, { children: [
267
+ return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
268
+ /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
269
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
270
+ /* @__PURE__ */ r(f, { children: [
270
271
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
271
272
  /* @__PURE__ */ e(A, { variant: "XSmall", children: L(
272
273
  n.completed_label,
273
- re(
274
- J(t.completed_at || 0),
275
- ie.MONTH_SHORT_YEAR
274
+ ae(
275
+ Q(t.completed_at || 0),
276
+ re.MONTH_SHORT_YEAR
276
277
  )
277
278
  ) })
278
279
  ] }),
279
280
  /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
280
281
  ] }) })
281
282
  ] }) }, t.guid);
282
- }, Nt = ({ trackType: t }) => {
283
- const { goals: n, common: s } = C(), { orderedGoals: c } = I(), p = c.filter((l) => l.track_type === t), a = p.filter(
284
- (l) => l.track_type === u.SAVINGS_TRACK && !l.has_been_spent || l.track_type !== u.SAVINGS_TRACK && !l.is_complete
283
+ }, Gt = ({ trackType: t }) => {
284
+ const { goals: n, common: i } = C(), { orderedGoals: s } = I(), p = s.filter((m) => m.track_type === t), a = p.filter(
285
+ (m) => m.track_type === u.SAVINGS_TRACK && !m.has_been_spent || m.track_type !== u.SAVINGS_TRACK && !m.is_complete
285
286
  ), _ = p.filter(
286
- (l) => l.track_type === u.SAVINGS_TRACK && l.has_been_spent || l.track_type !== u.SAVINGS_TRACK && l.is_complete
287
- ), [h, g] = y.useState(!1);
288
- let r = n.manage_saving_goals, m = n.manage_saving_drawer_title, o = n.manage_saving_title, d = n.manage_saving_description;
289
- return t === u.DEBT_TRACK ? (r = n.manage_debt_goals, m = n.manage_debt_drawer_title, o = n.manage_debt_title, d = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (r = n.manage_retirement_goals, m = n.manage_retirement_drawer_title, o = n.manage_retirement_title, d = n.manage_retirement_description), /* @__PURE__ */ i(b, { children: [
290
- /* @__PURE__ */ e(he, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => g(!0), children: r }),
287
+ (m) => m.track_type === u.SAVINGS_TRACK && m.has_been_spent || m.track_type !== u.SAVINGS_TRACK && m.is_complete
288
+ ), [g, l] = y.useState(!1);
289
+ let h = n.manage_saving_goals, d = n.manage_saving_drawer_title, o = n.manage_saving_title, c = n.manage_saving_description;
290
+ return t === u.DEBT_TRACK ? (h = n.manage_debt_goals, d = n.manage_debt_drawer_title, o = n.manage_debt_title, c = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (h = n.manage_retirement_goals, d = n.manage_retirement_drawer_title, o = n.manage_retirement_title, c = n.manage_retirement_description), /* @__PURE__ */ r(f, { children: [
291
+ /* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => l(!0), children: h }),
291
292
  /* @__PURE__ */ e(
292
- F,
293
+ j,
293
294
  {
294
- ariaLabelClose: s.close_aria,
295
- isOpen: h,
296
- onClose: () => g(!1),
297
- title: m,
298
- children: /* @__PURE__ */ i(b, { children: [
299
- /* @__PURE__ */ i(b, { m: 24, children: [
295
+ ariaLabelClose: i.close_aria,
296
+ isOpen: g,
297
+ onClose: () => l(!1),
298
+ title: d,
299
+ children: /* @__PURE__ */ r(f, { children: [
300
+ /* @__PURE__ */ r(f, { m: 24, children: [
300
301
  /* @__PURE__ */ e(He, { children: o }),
301
- /* @__PURE__ */ e(P, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: d })
302
+ /* @__PURE__ */ e(W, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: c })
302
303
  ] }),
303
- /* @__PURE__ */ e(xt, { trackType: t }),
304
+ /* @__PURE__ */ e(Et, { trackType: t }),
304
305
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
305
- /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
306
- a.map((l, f) => {
307
- const T = f >= a.length - 1;
308
- return /* @__PURE__ */ i(b, { children: [
309
- /* @__PURE__ */ e(It, { goal: l, index: f }),
306
+ /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
307
+ a.map((m, b) => {
308
+ const T = b >= a.length - 1;
309
+ return /* @__PURE__ */ r(f, { children: [
310
+ /* @__PURE__ */ e(vt, { goal: m, index: b }),
310
311
  /* @__PURE__ */ e(
311
312
  E,
312
313
  {
313
314
  variant: T && t === u.RETIREMENT_TRACK ? "fullWidth" : "inset"
314
315
  }
315
316
  )
316
- ] }, `ongoing-${l.guid}`);
317
+ ] }, `ongoing-${m.guid}`);
317
318
  }),
318
- t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { children: [
319
- /* @__PURE__ */ e(vt, { goals: a }),
319
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { children: [
320
+ /* @__PURE__ */ e(xt, { goals: a }),
320
321
  /* @__PURE__ */ e(E, {})
321
322
  ] })
322
323
  ] }),
323
- t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ i(b, { children: [
324
+ t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ r(f, { children: [
324
325
  /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
325
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: _.map((l, f) => {
326
- const T = f > a.length - 1;
327
- return /* @__PURE__ */ i(b, { children: [
328
- /* @__PURE__ */ e(Gt, { goal: l }),
326
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: _.map((m, b) => {
327
+ const T = b > a.length - 1;
328
+ return /* @__PURE__ */ r(f, { children: [
329
+ /* @__PURE__ */ e(It, { goal: m }),
329
330
  /* @__PURE__ */ e(E, { variant: T ? "fullWidth" : "inset" })
330
- ] }, `complete-${l.guid}`);
331
+ ] }, `complete-${m.guid}`);
331
332
  }) })
332
333
  ] })
333
334
  ] })
334
335
  }
335
336
  )
336
337
  ] });
337
- }, me = D(({ trackType: t, onAddGoals: n }) => {
338
- const { isMobile: s } = be(), { goals: c } = C(), { selectedAccountGuids: p } = ge(), { orderedGoals: a, setSelectedGoal: _ } = I(), h = a.filter(
338
+ }, de = D(({ trackType: t, onAddGoals: n }) => {
339
+ const { isMobile: i } = ge(), { goals: s } = C(), { selectedAccountGuids: p } = he(), { orderedGoals: a, setSelectedGoal: _ } = I(), g = a.filter(
339
340
  (o) => o.track_type === t && p.includes(o.account_guid)
340
- ), g = h.filter(
341
+ ), l = g.filter(
341
342
  (o) => o.track_type === u.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && !o.is_complete
342
- ), r = h.filter(
343
+ ), h = g.filter(
343
344
  (o) => o.track_type === u.SAVINGS_TRACK && o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && o.is_complete
344
- ), m = t === u.DEBT_TRACK ? c.zero_state_complete_debt : c.zero_state_complete_savings;
345
- return /* @__PURE__ */ i(b, { mt: 16, mx: s ? 24 : 0, children: [
346
- /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
347
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: c.ongoing_title }),
348
- /* @__PURE__ */ e(Nt, { trackType: t })
345
+ ), d = t === u.DEBT_TRACK ? s.zero_state_complete_debt : s.zero_state_complete_savings;
346
+ return /* @__PURE__ */ r(f, { mt: 16, mx: i ? 24 : 0, children: [
347
+ /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
348
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.ongoing_title }),
349
+ /* @__PURE__ */ e(Gt, { trackType: t })
349
350
  ] }),
350
- g.length > 0 ? /* @__PURE__ */ e(fe, { container: !0, spacing: 24, children: g.map((o, d, l) => (
351
+ l.length > 0 ? /* @__PURE__ */ e(be, { container: !0, spacing: 24, children: l.map((o, c, m) => (
351
352
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
352
- /* @__PURE__ */ e(fe, { xs: s || d === 0 && l.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid) }, d)
353
- )) }) : /* @__PURE__ */ i(
354
- b,
353
+ /* @__PURE__ */ e(be, { xs: i || c === 0 && m.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid) }, c)
354
+ )) }) : /* @__PURE__ */ r(
355
+ f,
355
356
  {
356
357
  alignItems: "center",
357
358
  bgcolor: "background.default",
@@ -361,7 +362,7 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
361
362
  py: 18,
362
363
  children: [
363
364
  /* @__PURE__ */ e(
364
- P,
365
+ W,
365
366
  {
366
367
  sx: (o) => ({
367
368
  color: "text.secondary",
@@ -371,17 +372,17 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
371
372
  width: { sm: 381 }
372
373
  }),
373
374
  variant: "Small",
374
- children: Pe(t, c)
375
+ children: Pe(t, s)
375
376
  }
376
377
  ),
377
- /* @__PURE__ */ e(he, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: c.add_goals_button })
378
+ /* @__PURE__ */ e(pe, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: s.add_goals_button })
378
379
  ]
379
380
  }
380
381
  ),
381
- t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(b, { gap: 16, mt: 48, children: [
382
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: c.complete_title }),
383
- r.length === 0 && /* @__PURE__ */ e(b, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
384
- P,
382
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { gap: 16, mt: 48, children: [
383
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.complete_title }),
384
+ h.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
385
+ W,
385
386
  {
386
387
  sx: (o) => ({
387
388
  color: "text.secondary",
@@ -391,11 +392,11 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
391
392
  }
392
393
  }),
393
394
  variant: "Small",
394
- children: m
395
+ children: d
395
396
  }
396
397
  ) }),
397
- r.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Se, { onClick: () => _(o), children: /* @__PURE__ */ e(Re, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
398
- /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", gap: 6, children: [
398
+ h.map((o) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => _(o), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
399
+ /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", gap: 6, children: [
399
400
  /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
400
401
  /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
401
402
  ] }),
@@ -403,65 +404,65 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
403
404
  ] }) }) }) }, o.guid))
404
405
  ] })
405
406
  ] });
406
- }), kt = ({ goalType: t, onClick: n }) => {
407
- const { goals: s } = C(), { bgcolor: c, icon: p, label: a, description: _, subTypes: h, type: g } = t, [r, m] = y.useState(!1), o = h.length > 0;
408
- return /* @__PURE__ */ e(b, { children: /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
409
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(
407
+ }), Nt = ({ goalType: t, onClick: n }) => {
408
+ const { goals: i } = C(), { bgcolor: s, icon: p, label: a, description: _, subTypes: g, type: l } = t, [h, d] = y.useState(!1), o = g.length > 0;
409
+ return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
410
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(
410
411
  k,
411
412
  {
412
- onClick: o ? () => m(!r) : () => n(
413
- g === u.RETIREMENT_TRACK ? s.retirement : "",
414
- g === u.RETIREMENT_TRACK ? q.RETIREMENT : q.OTHER,
415
- g
413
+ onClick: o ? () => d(!h) : () => n(
414
+ l === u.RETIREMENT_TRACK ? i.retirement : "",
415
+ l === u.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
416
+ l
416
417
  ),
417
418
  children: [
418
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: c }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: p, sx: { color: "grey.900" } }) }) }),
419
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: s }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: p, sx: { color: "grey.900" } }) }) }),
419
420
  /* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
420
421
  !o && /* @__PURE__ */ e(M, {}),
421
- o && (r ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
422
+ o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
422
423
  ]
423
424
  }
424
425
  ) }),
425
426
  /* @__PURE__ */ e(E, { variant: "inset" }),
426
- o && /* @__PURE__ */ e(ot, { in: r, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: h.map((d, l) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ i(k, { onClick: () => n(d.label, d.metaType, g), children: [
427
- /* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: d.icon }) }),
427
+ o && /* @__PURE__ */ e(nt, { in: h, children: /* @__PURE__ */ e(B, { sx: { bgcolor: "background.default" }, children: g.map((c, m) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ r(k, { onClick: () => n(c.label, c.metaType, l), children: [
428
+ /* @__PURE__ */ e(ot, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: c.icon }) }),
428
429
  /* @__PURE__ */ e(
429
430
  w,
430
431
  {
431
- primary: d.label,
432
+ primary: c.label,
432
433
  primaryTypographyProps: { variant: "Body" }
433
434
  }
434
435
  ),
435
436
  /* @__PURE__ */ e(M, {})
436
- ] }) }, l)) }) })
437
+ ] }) }, m)) }) })
437
438
  ] }) });
438
439
  }, Be = ({
439
440
  accounts: t,
440
441
  isOpen: n,
441
- onClose: s,
442
- onSave: c,
442
+ onClose: i,
443
+ onSave: s,
443
444
  title: p
444
445
  }) => {
445
- const { goals: a, common: _ } = C(), { config: h } = Ge(), [g, r] = y.useState([]), m = (o) => {
446
- const d = g.findIndex((f) => f.guid === o.guid), l = [...g];
447
- d >= 0 ? l.splice(d, 1) : l.push(o), r(l);
446
+ const { goals: a, common: _ } = C(), { config: g } = Ie(), [l, h] = y.useState([]), d = (o) => {
447
+ const c = l.findIndex((b) => b.guid === o.guid), m = [...l];
448
+ c >= 0 ? m.splice(c, 1) : m.push(o), h(m);
448
449
  };
449
- return /* @__PURE__ */ i(
450
- F,
450
+ return /* @__PURE__ */ r(
451
+ j,
451
452
  {
452
453
  ariaLabelClose: _.close_aria,
453
454
  isOpen: n,
454
- onClose: s,
455
- onPrimaryAction: () => c(g),
455
+ onClose: i,
456
+ onPrimaryAction: () => s(l),
456
457
  title: p,
457
458
  children: [
458
- /* @__PURE__ */ e(P, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
459
- /* @__PURE__ */ i(B, { sx: { bgcolor: "background.white" }, children: [
459
+ /* @__PURE__ */ e(W, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
460
+ /* @__PURE__ */ r(B, { sx: { bgcolor: "background.white" }, children: [
460
461
  /* @__PURE__ */ e(E, { variant: "fullWidth" }),
461
- t.map((o, d) => /* @__PURE__ */ i(y.Fragment, { children: [
462
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => m(o), children: [
463
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
464
- oe,
462
+ t.map((o, c) => /* @__PURE__ */ r(y.Fragment, { children: [
463
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => d(o), children: [
464
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
465
+ ne,
465
466
  {
466
467
  alt: o?.name || "",
467
468
  institutionGuid: o?.institution_guid || ""
@@ -470,19 +471,19 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
470
471
  /* @__PURE__ */ e(
471
472
  w,
472
473
  {
473
- primary: De(o, {
474
- allowNickname: h?.show_account_nicknames_in_master
474
+ primary: we(o, {
475
+ allowNickname: g?.show_account_nicknames_in_master
475
476
  }),
476
477
  secondary: x(o.balance || 0, "0,0.00")
477
478
  }
478
479
  ),
479
- /* @__PURE__ */ e(rt, { checked: g.some((l) => l.guid === o.guid) })
480
+ /* @__PURE__ */ e(at, { checked: l.some((m) => m.guid === o.guid) })
480
481
  ] }) }),
481
- /* @__PURE__ */ e(E, { variant: d < t.length - 1 ? "inset" : "fullWidth" })
482
+ /* @__PURE__ */ e(E, { variant: c < t.length - 1 ? "inset" : "fullWidth" })
482
483
  ] }, o.guid))
483
484
  ] }),
484
485
  /* @__PURE__ */ e(
485
- Te,
486
+ Ae,
486
487
  {
487
488
  description: a.connect_description,
488
489
  label: a.connect_button,
@@ -492,58 +493,58 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
492
493
  ]
493
494
  }
494
495
  );
495
- }, wt = ({ onClose: t }) => {
496
- const { goals: n } = C(), { addGoal: s, debtGoals: c, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ge(), { visibleDebtAccounts: h } = j(), [g, r] = y.useState(!1), m = Ve(n), o = (l, f, T) => {
497
- T === u.DEBT_TRACK ? r(!0) : a({
496
+ }, kt = ({ onClose: t }) => {
497
+ const { goals: n } = C(), { addGoal: i, debtGoals: s, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ie(), { visibleDebtAccounts: g } = V(), [l, h] = y.useState(!1), d = Ve(n), o = (m, b, T) => {
498
+ T === u.DEBT_TRACK ? h(!0) : a({
498
499
  amount: 0,
499
500
  current_amount: 0,
500
- goal_type: ue.SAVE_AMOUNT,
501
+ goal_type: me.SAVE_AMOUNT,
501
502
  initial_amount: 0,
502
- meta_type: f,
503
- name: l,
503
+ meta_type: b,
504
+ name: m,
504
505
  track_type: T
505
506
  });
506
- }, d = async (l) => {
507
- for (const f of l) {
508
- let T = q.CREDIT_CARD;
509
- f.account_type === Ae.LOAN ? T = q.LOANS : f.account_type === Ae.LINE_OF_CREDIT && (T = q.LINE_OF_CREDIT), await s({
510
- account_guid: f.guid,
507
+ }, c = async (m) => {
508
+ for (const b of m) {
509
+ let T = J.CREDIT_CARD;
510
+ b.account_type === ye.LOAN ? T = J.LOANS : b.account_type === ye.LINE_OF_CREDIT && (T = J.LINE_OF_CREDIT), await i({
511
+ account_guid: b.guid,
511
512
  amount: 0,
512
513
  current_amount: 0,
513
- goal_type: ue.KEEP_BALANCE_BELOW,
514
- initial_amount: f.balance || 0,
515
- interest_rate: f.interest_rate || 0,
514
+ goal_type: me.KEEP_BALANCE_BELOW,
515
+ initial_amount: b.balance || 0,
516
+ interest_rate: b.interest_rate || 0,
516
517
  meta_type: T,
517
- monthly_payment: f.minimum_payment || 0,
518
- name: De(f, {
518
+ monthly_payment: b.minimum_payment || 0,
519
+ name: we(b, {
519
520
  allowNickname: _?.show_account_nicknames_in_master
520
521
  }),
521
522
  track_type: u.DEBT_TRACK
522
523
  }), p(n.alert_goal_added);
523
524
  }
524
- r(!1), t?.(u.DEBT_TRACK);
525
+ h(!1), t?.(u.DEBT_TRACK);
525
526
  };
526
- return /* @__PURE__ */ i(b, { children: [
527
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: m.map((l, f) => /* @__PURE__ */ e(kt, { goalType: l, onClick: o }, f)) }),
527
+ return /* @__PURE__ */ r(f, { children: [
528
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: d.map((m, b) => /* @__PURE__ */ e(Nt, { goalType: m, onClick: o }, b)) }),
528
529
  /* @__PURE__ */ e(
529
530
  Be,
530
531
  {
531
- accounts: h.filter((l) => !c.find((f) => f.account_guid === l.guid)),
532
- isOpen: g,
533
- onClose: () => r(!1),
534
- onSave: d,
532
+ accounts: g.filter((m) => !s.find((b) => b.account_guid === m.guid)),
533
+ isOpen: l,
534
+ onClose: () => h(!1),
535
+ onSave: c,
535
536
  title: n.select_debt_accounts_title
536
537
  }
537
538
  )
538
539
  ] });
539
540
  }, Oe = ({ account: t }) => {
540
- const { accounts: n } = C(), s = ct(t), { setSelectedAccount: c } = it(), [p, a] = y.useState(!1);
541
- return /* @__PURE__ */ i(N, { sx: { bgcolor: "background.paper" }, children: [
542
- /* @__PURE__ */ i(k, { onClick: () => {
543
- c(t), a(!0);
541
+ const { accounts: n } = C(), i = lt(t), { setSelectedAccount: s } = rt(), [p, a] = y.useState(!1);
542
+ return /* @__PURE__ */ r(N, { sx: { bgcolor: "background.paper" }, children: [
543
+ /* @__PURE__ */ r(k, { onClick: () => {
544
+ s(t), a(!0);
544
545
  }, children: [
545
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
546
- oe,
546
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
547
+ ne,
547
548
  {
548
549
  alt: t.name || "",
549
550
  institutionGuid: t.institution_guid || ""
@@ -552,65 +553,65 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
552
553
  /* @__PURE__ */ e(
553
554
  w,
554
555
  {
555
- primary: s,
556
+ primary: i,
556
557
  secondary: x(t.balance || 0, "0,0.00")
557
558
  }
558
559
  ),
559
560
  /* @__PURE__ */ e(M, {})
560
561
  ] }),
561
- /* @__PURE__ */ e(F, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ i(b, { children: [
562
- /* @__PURE__ */ e(st, {}),
563
- /* @__PURE__ */ e(lt, {})
562
+ /* @__PURE__ */ e(j, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ r(f, { children: [
563
+ /* @__PURE__ */ e(it, {}),
564
+ /* @__PURE__ */ e(st, {})
564
565
  ] }) })
565
566
  ] });
566
- }, Dt = D(({ goal: t }) => {
567
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.amount), h = !t.guid, g = a < 0 || a > 9999999999e-2, r = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, m = async () => {
568
- const d = { ...t, amount: a };
569
- t.amount = a, h ? c(d) : (await p(d), s(n.alert_goal_updated_amount));
567
+ }, wt = D(({ goal: t }) => {
568
+ const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.amount), g = !t.guid, l = a < 0 || a > 9999999999e-2, h = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, d = async () => {
569
+ const c = { ...t, amount: a };
570
+ t.amount = a, g ? s(c) : (await p(c), i(n.alert_goal_updated_amount));
570
571
  }, o = () => {
571
572
  setTimeout(() => {
572
573
  _(t.amount);
573
574
  }, 250);
574
575
  };
575
576
  return /* @__PURE__ */ e(
576
- Q,
577
+ ee,
577
578
  {
578
- isDisabled: r,
579
- isSaveDisabled: g,
579
+ isDisabled: h,
580
+ isSaveDisabled: l,
580
581
  label: n.details_amount_to_save,
581
582
  onCancel: o,
582
- onSave: m,
583
+ onSave: d,
583
584
  primaryText: n.details_amount_to_save,
584
585
  secondaryText: x(t.amount, "0,0"),
585
- zeroStateText: h && t.amount === 0 ? n.add_amount : void 0,
586
+ zeroStateText: g && t.amount === 0 ? n.add_amount : void 0,
586
587
  children: /* @__PURE__ */ e(
587
- we,
588
+ ke,
588
589
  {
589
590
  amount: a,
590
591
  autoFocus: !0,
591
- error: g,
592
+ error: l,
592
593
  fullWidth: !0,
593
594
  minAmount: 0,
594
- setAmount: (d) => _(isNaN(Number(d)) ? a : Number(d)),
595
+ setAmount: (c) => _(isNaN(Number(c)) ? a : Number(c)),
595
596
  sx: { ".MuiTypography-Body": { p: 0 } }
596
597
  }
597
598
  )
598
599
  }
599
600
  );
600
- }), Kt = ({ goal: t }) => {
601
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: s } = j(), { accounts: c, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: h } = I(), g = !t.guid, [r, m] = y.useState(!1), o = async ({ balance: d, guid: l }) => {
602
- const f = { ...t, account_guid: l, current_amount: d || 0 };
603
- g ? _(f) : (await h(f), a(p.alert_account_changed)), m(!1);
601
+ }), Dt = ({ goal: t }) => {
602
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = V(), { accounts: s, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: g } = I(), l = !t.guid, [h, d] = y.useState(!1), o = async ({ balance: c, guid: m }) => {
603
+ const b = { ...t, account_guid: m, current_amount: c || 0 };
604
+ l ? _(b) : (await g(b), a(p.alert_account_changed)), d(!1);
604
605
  };
605
- return /* @__PURE__ */ i(b, { children: [
606
- g && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => m(!0), children: [
607
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
608
- /* @__PURE__ */ e(Ie, { filled: !0 }),
606
+ return /* @__PURE__ */ r(f, { children: [
607
+ l && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => d(!0), children: [
608
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
609
+ /* @__PURE__ */ e(ve, { filled: !0 }),
609
610
  p.details_add_account
610
611
  ] }) }),
611
612
  /* @__PURE__ */ e(M, { color: "primary" })
612
- ] }) }) : /* @__PURE__ */ i(b, { sx: { gap: 8, my: 24, mx: 24 }, children: [
613
- /* @__PURE__ */ e(he, { onClick: () => m(!0), variant: "text", children: p.details_change_account }),
613
+ ] }) }) : /* @__PURE__ */ r(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
614
+ /* @__PURE__ */ e(pe, { onClick: () => d(!0), variant: "text", children: p.details_change_account }),
614
615
  /* @__PURE__ */ e(
615
616
  A,
616
617
  {
@@ -621,45 +622,45 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
621
622
  }
622
623
  )
623
624
  ] }),
624
- /* @__PURE__ */ e(F, { isOpen: r, onClose: () => m(!1), title: p.details_change_account, children: /* @__PURE__ */ i(b, { children: [
625
- n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[1] }),
626
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
627
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
628
- oe,
625
+ /* @__PURE__ */ e(j, { isOpen: h, onClose: () => d(!1), title: p.details_change_account, children: /* @__PURE__ */ r(f, { children: [
626
+ n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[1] }),
627
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: n.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(c), children: [
628
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
629
+ ne,
629
630
  {
630
- alt: d?.name || "",
631
- institutionGuid: d?.institution_guid || ""
631
+ alt: c?.name || "",
632
+ institutionGuid: c?.institution_guid || ""
632
633
  }
633
634
  ) }),
634
635
  /* @__PURE__ */ e(
635
636
  w,
636
637
  {
637
- primary: d?.name || d?.feed_name,
638
- secondary: x(d?.balance || 0, "0,0.00")
638
+ primary: c?.name || c?.feed_name,
639
+ secondary: x(c?.balance || 0, "0,0.00")
639
640
  }
640
641
  ),
641
642
  /* @__PURE__ */ e(M, {})
642
- ] }) }, d.guid)) }),
643
- s.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[2] }),
644
- /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: s.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
645
- /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(
646
- oe,
643
+ ] }) }, c.guid)) }),
644
+ i.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[2] }),
645
+ /* @__PURE__ */ e(B, { sx: { bgcolor: "background.paper" }, children: i.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(c), children: [
646
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
647
+ ne,
647
648
  {
648
- alt: d?.name || "",
649
- institutionGuid: d?.institution_guid || ""
649
+ alt: c?.name || "",
650
+ institutionGuid: c?.institution_guid || ""
650
651
  }
651
652
  ) }),
652
653
  /* @__PURE__ */ e(
653
654
  w,
654
655
  {
655
- primary: d?.name || d?.feed_name,
656
- secondary: x(d?.balance || 0, "0,0.00")
656
+ primary: c?.name || c?.feed_name,
657
+ secondary: x(c?.balance || 0, "0,0.00")
657
658
  }
658
659
  ),
659
660
  /* @__PURE__ */ e(M, {})
660
- ] }) }, d.guid)) }),
661
+ ] }) }, c.guid)) }),
661
662
  /* @__PURE__ */ e(
662
- Te,
663
+ Ae,
663
664
  {
664
665
  description: p.connect_description,
665
666
  label: p.connect_button,
@@ -668,27 +669,27 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
668
669
  )
669
670
  ] }) })
670
671
  ] });
671
- }, Mt = D(({ goal: t }) => {
672
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.name), h = !t.guid, g = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, r = async () => {
672
+ }, Kt = D(({ goal: t }) => {
673
+ const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.name), g = !t.guid, l = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, h = async () => {
673
674
  const o = { ...t, name: a };
674
- t.name = a, h ? c(o) : (await p(o), s(n.alert_goal_updated_name));
675
- }, m = () => {
675
+ t.name = a, g ? s(o) : (await p(o), i(n.alert_goal_updated_name));
676
+ }, d = () => {
676
677
  setTimeout(() => {
677
678
  _(t.name);
678
679
  }, 250);
679
680
  };
680
681
  return /* @__PURE__ */ e(
681
- Q,
682
+ ee,
682
683
  {
683
- isDisabled: g,
684
+ isDisabled: l,
684
685
  isSaveDisabled: !a,
685
686
  label: n.details_goal_name,
686
- onCancel: m,
687
- onSave: r,
687
+ onCancel: d,
688
+ onSave: h,
688
689
  primaryText: n.details_goal_name,
689
690
  secondaryText: t.name,
690
691
  children: /* @__PURE__ */ e(
691
- Ke,
692
+ De,
692
693
  {
693
694
  error: !a,
694
695
  fullWidth: !0,
@@ -699,32 +700,32 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
699
700
  )
700
701
  }
701
702
  );
702
- }), Lt = ({ goal: t }) => {
703
- const { goals: n } = C(), { setAlert: s, setSelectedGoal: c, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), h = !t.guid, g = async () => {
703
+ }), Mt = ({ goal: t }) => {
704
+ const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), g = !t.guid, l = async () => {
704
705
  if (!isNaN(a)) {
705
706
  const o = { ...t, retirement_age: a };
706
- t.retirement_age = a, h ? c(o) : (await p(o), s(n.alert_goal_updated_retirement_age));
707
+ t.retirement_age = a, g ? s(o) : (await p(o), i(n.alert_goal_updated_retirement_age));
707
708
  }
708
- }, r = () => {
709
+ }, h = () => {
709
710
  setTimeout(() => {
710
711
  _(t.retirement_age || 65);
711
712
  }, 250);
712
- }, m = !a || isNaN(a) || a < 20 || a >= 100;
713
+ }, d = !a || isNaN(a) || a < 20 || a >= 100;
713
714
  return /* @__PURE__ */ e(
714
- Q,
715
+ ee,
715
716
  {
716
717
  isDisabled: t.is_complete,
717
- isSaveDisabled: m,
718
+ isSaveDisabled: d,
718
719
  label: n.details_retirement_age,
719
- onCancel: r,
720
- onSave: g,
720
+ onCancel: h,
721
+ onSave: l,
721
722
  primaryText: n.details_retirement_age,
722
723
  secondaryText: `${t.retirement_age}`,
723
- zeroStateText: h && !t.retirement_age ? n.add_age : void 0,
724
+ zeroStateText: g && !t.retirement_age ? n.add_age : void 0,
724
725
  children: /* @__PURE__ */ e(
725
- Ke,
726
+ De,
726
727
  {
727
- error: m,
728
+ error: d,
728
729
  fullWidth: !0,
729
730
  label: n.details_retirement_age,
730
731
  onChange: (o) => _(Number(o.target.value)),
@@ -733,68 +734,68 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
733
734
  )
734
735
  }
735
736
  );
736
- }, Bt = D(({ goal: t }) => {
737
- const { goals: n } = C(), { user: s, updateUser: c } = Ne(), { setAlert: p } = I(), [a, _] = y.useState(J(s.birthday ?? 0)), [h, g] = y.useState(null), r = t.is_complete, m = async () => {
738
- a && pt(a) && (await c({ ...s, birthday: _t(a) }), p(n.alert_goal_updated_birthday));
737
+ }, Lt = D(({ goal: t }) => {
738
+ const { goals: n } = C(), { user: i, updateUser: s } = Ge(), { setAlert: p } = I(), [a, _] = y.useState(Q(i.birthday ?? 0)), [g, l] = y.useState(null), h = t.is_complete, d = async () => {
739
+ a && _t(a) && (await s({ ...i, birthday: ut(a) }), p(n.alert_goal_updated_birthday));
739
740
  };
740
741
  return /* @__PURE__ */ e(
741
- Q,
742
+ ee,
742
743
  {
743
- isDisabled: r,
744
- isSaveDisabled: !!h,
744
+ isDisabled: h,
745
+ isSaveDisabled: !!g,
745
746
  label: n.details_birthday,
746
- onSave: m,
747
+ onSave: d,
747
748
  primaryText: n.details_birthday,
748
- secondaryText: `${re(J(s.birthday ?? 0), ie.MONTH_DAY_YEAR)}`,
749
- zeroStateText: !t.guid && !s.birthday ? n.add_birthday : void 0,
750
- children: /* @__PURE__ */ e(bt, { dateAdapter: ht, children: /* @__PURE__ */ e(
751
- gt,
749
+ secondaryText: `${ae(Q(i.birthday ?? 0), re.MONTH_DAY_YEAR)}`,
750
+ zeroStateText: !t.guid && !i.birthday ? n.add_birthday : void 0,
751
+ children: /* @__PURE__ */ e(gt, { dateAdapter: pt, children: /* @__PURE__ */ e(
752
+ ht,
752
753
  {
753
754
  label: n.details_birthday,
754
755
  onChange: _,
755
- onError: (o) => g(o),
756
+ onError: (o) => l(o),
756
757
  sx: { width: "100%" },
757
758
  value: a
758
759
  }
759
760
  ) })
760
761
  }
761
762
  );
762
- }), Ot = ({ goal: t }) => {
763
- const { goals: n } = C(), { visibleRetirementAccounts: s } = j(), {
764
- addRetirementGoalAccount: c,
763
+ }), Bt = ({ goal: t }) => {
764
+ const { goals: n } = C(), { visibleRetirementAccounts: i } = V(), {
765
+ addRetirementGoalAccount: s,
765
766
  newRetirementGoalAccounts: p,
766
767
  retirementGoalAccounts: a,
767
768
  selectedGoal: _,
768
- setAlert: h,
769
- setNewRetirementGoalAccounts: g,
770
- setSelectedGoal: r
771
- } = I(), [m, o] = y.useState(!1), d = !t.guid, l = s.filter(
772
- (S) => d ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
773
- ), f = s.filter(
769
+ setAlert: g,
770
+ setNewRetirementGoalAccounts: l,
771
+ setSelectedGoal: h
772
+ } = I(), [d, o] = y.useState(!1), c = !t.guid, m = i.filter(
773
+ (S) => c ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
774
+ ), b = i.filter(
774
775
  (S) => !a.find((R) => R.account_guid === S.guid)
775
776
  ), T = async (S) => {
776
777
  const R = S.map((v) => ({
777
778
  account_guid: v.guid,
778
779
  retirement_goal_guid: t.guid
779
780
  }));
780
- if (d)
781
- g(R);
781
+ if (c)
782
+ l(R);
782
783
  else
783
784
  for (const v of R)
784
- await c(v), h(n.alert_account_added);
785
- r({
785
+ await s(v), g(n.alert_account_added);
786
+ h({
786
787
  ..._,
787
- current_amount: S.reduce((v, K) => v + (K.balance || 0), 0)
788
+ current_amount: S.reduce((v, F) => v + (F.balance || 0), 0)
788
789
  }), o(!1);
789
790
  };
790
- return /* @__PURE__ */ i(b, { children: [
791
- l.map((S) => /* @__PURE__ */ i(b, { children: [
791
+ return /* @__PURE__ */ r(f, { children: [
792
+ m.map((S) => /* @__PURE__ */ r(f, { children: [
792
793
  /* @__PURE__ */ e(Oe, { account: S }),
793
794
  /* @__PURE__ */ e(E, {})
794
795
  ] }, S.guid)),
795
- /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => o(!0), children: [
796
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(b, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
797
- /* @__PURE__ */ e(Ie, { filled: !0 }),
796
+ /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => o(!0), children: [
797
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
798
+ /* @__PURE__ */ e(ve, { filled: !0 }),
798
799
  n.details_add_account
799
800
  ] }) }),
800
801
  /* @__PURE__ */ e(M, { color: "primary" })
@@ -802,213 +803,216 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
802
803
  /* @__PURE__ */ e(
803
804
  Be,
804
805
  {
805
- accounts: f,
806
- isOpen: m,
806
+ accounts: b,
807
+ isOpen: d,
807
808
  onClose: () => o(!1),
808
809
  onSave: T,
809
810
  title: n.add_select_accounts
810
811
  }
811
812
  )
812
813
  ] });
813
- }, Wt = D(({ goal: t }) => {
814
- const { goals: n } = C(), { visibleAccounts: s } = j(), c = y.useMemo(
815
- () => s.find((_) => _.guid === t.account_guid),
816
- [s, t]
814
+ }, Ot = D(({ goal: t }) => {
815
+ const { goals: n } = C(), { visibleAccounts: i } = V(), s = y.useMemo(
816
+ () => i.find((_) => _.guid === t.account_guid),
817
+ [i, t]
817
818
  ), p = t.track_type;
818
819
  let a = n.details_save_title;
819
- return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ i(b, { children: [
820
- /* @__PURE__ */ i(b, { mx: 24, children: [
820
+ return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ r(f, { children: [
821
+ /* @__PURE__ */ r(f, { mx: 24, children: [
821
822
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
822
823
  /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
823
824
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
824
825
  ] }),
825
- /* @__PURE__ */ i(B, { sx: { bgcolor: "background.paper" }, children: [
826
- /* @__PURE__ */ e(Mt, { goal: t }),
826
+ /* @__PURE__ */ r(B, { sx: { bgcolor: "background.paper" }, children: [
827
+ /* @__PURE__ */ e(Kt, { goal: t }),
827
828
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
828
- (p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ i(U, { children: [
829
- /* @__PURE__ */ e(Dt, { goal: t }),
829
+ (p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ r(U, { children: [
830
+ /* @__PURE__ */ e(wt, { goal: t }),
830
831
  /* @__PURE__ */ e(E, { sx: { ml: p === u.RETIREMENT_TRACK ? 24 : 0 } })
831
832
  ] }),
832
- t.track_type === u.DEBT_TRACK && /* @__PURE__ */ i(U, { children: [
833
+ t.track_type === u.DEBT_TRACK && /* @__PURE__ */ r(U, { children: [
834
+ /* @__PURE__ */ e(ct, { goal: t }),
835
+ /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
833
836
  /* @__PURE__ */ e(dt, { goal: t }),
834
837
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
835
838
  /* @__PURE__ */ e(mt, { goal: t }),
836
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
837
- /* @__PURE__ */ e(ut, { goal: t }),
838
839
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
839
840
  ] }),
840
- t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
841
- /* @__PURE__ */ e(Lt, { goal: t }),
841
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
842
+ /* @__PURE__ */ e(Mt, { goal: t }),
842
843
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
843
- /* @__PURE__ */ e(Bt, { goal: t }),
844
+ /* @__PURE__ */ e(Lt, { goal: t }),
844
845
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
845
846
  ] })
846
847
  ] }),
847
848
  /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === u.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
848
- t.track_type !== u.RETIREMENT_TRACK && c && /* @__PURE__ */ i(U, { children: [
849
- /* @__PURE__ */ e(Oe, { account: c }),
849
+ t.track_type !== u.RETIREMENT_TRACK && s && /* @__PURE__ */ r(U, { children: [
850
+ /* @__PURE__ */ e(Oe, { account: s }),
850
851
  /* @__PURE__ */ e(E, {})
851
852
  ] }),
852
- t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
853
- /* @__PURE__ */ e(Ot, { goal: t }),
853
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
854
+ /* @__PURE__ */ e(Bt, { goal: t }),
854
855
  /* @__PURE__ */ e(E, {})
855
856
  ] }),
856
- t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Kt, { goal: t })
857
+ t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Dt, { goal: t })
857
858
  ] });
858
- }), Pt = D(({ onClose: t }) => {
859
- const { visibleRetirementAccounts: n } = j(), { goals: s, common: c } = C(), {
859
+ }), Wt = D(({ onClose: t }) => {
860
+ const { visibleRetirementAccounts: n } = V(), { goals: i, common: s } = C(), {
860
861
  addGoal: p,
861
862
  addRetirementGoal: a,
862
863
  deleteGoal: _,
863
- deleteRetirementGoal: h,
864
- newRetirementGoalAccounts: g,
865
- retirementGoalAccounts: r,
866
- selectedGoal: m,
864
+ deleteRetirementGoal: g,
865
+ newRetirementGoalAccounts: l,
866
+ retirementGoalAccounts: h,
867
+ selectedGoal: d,
867
868
  setAlert: o,
868
- setSelectedGoal: d,
869
- updateGoal: l
870
- } = I(), { user: f } = Ne(), [T, S] = y.useState(!1), R = !m?.guid, v = m?.track_type === u.SAVINGS_TRACK && m.is_complete && !m.has_been_spent, K = y.useMemo(() => {
871
- const G = R ? g : r;
872
- return n.filter((H) => G.some(($) => $.account_guid === H.guid));
873
- }, [R, n, g, r]), se = y.useMemo(() => {
874
- if (!m) return !1;
869
+ setSelectedGoal: c,
870
+ updateGoal: m
871
+ } = I(), { user: b } = Ge(), [T, S] = y.useState(!1), R = !d?.guid, v = d?.track_type === u.SAVINGS_TRACK && d.is_complete && !d.has_been_spent, F = y.useMemo(() => {
872
+ const G = R ? l : h;
873
+ return n.filter(($) => G.some((K) => K.account_guid === $.guid));
874
+ }, [R, n, l, h]), Z = y.useMemo(() => {
875
+ if (!d) return !1;
875
876
  if (!R && !v) return !0;
876
- const { account_guid: G, track_type: H, name: $, amount: O, retirement_age: ne } = m;
877
- return H === u.SAVINGS_TRACK ? G ? !!$ && !!O : !1 : H === u.RETIREMENT_TRACK ? K.length ? !!$ && !!O && !!ne && !!f.birthday : !1 : !0;
878
- }, [m, K, f.birthday]);
879
- let W = c.delete_button, z = () => S(!0);
880
- R ? (z = () => ee(), W = c.save_button) : v && (z = () => le(), W = s.mark_as_complete_button);
881
- const ee = async () => {
882
- if (m) {
883
- const G = m.track_type;
884
- G !== u.RETIREMENT_TRACK ? await p(m) : G === u.RETIREMENT_TRACK && await a({ ...m, target_amount: m.amount }), o(s.alert_goal_added), d(void 0), G && t?.(G);
877
+ const { account_guid: G, track_type: $, name: K, amount: q, retirement_age: O } = d;
878
+ return $ === u.SAVINGS_TRACK ? G ? !!K && !!q : !1 : $ === u.RETIREMENT_TRACK ? F.length ? !!K && !!q && !!O && !!b.birthday : !1 : !0;
879
+ }, [d, F, b.birthday]);
880
+ let z = s.delete_button, H = () => S(!0);
881
+ R ? (H = () => te(), z = s.save_button) : v && (H = () => se(), z = i.mark_as_complete_button);
882
+ const te = async () => {
883
+ if (d) {
884
+ const G = d.track_type;
885
+ G !== u.RETIREMENT_TRACK ? await p(d) : G === u.RETIREMENT_TRACK && await a({ ...d, target_amount: d.amount }), o(i.alert_goal_added), c(void 0), G && t?.(G);
885
886
  }
886
- }, te = async () => {
887
- m && (m.track_type !== u.RETIREMENT_TRACK ? await _(m.guid) : m.track_type === u.RETIREMENT_TRACK && await h(m), o(s.alert_goal_deleted), d(void 0));
888
- }, le = async () => {
887
+ }, ie = async () => {
888
+ d && (d.track_type !== u.RETIREMENT_TRACK ? await _(d.guid) : d.track_type === u.RETIREMENT_TRACK && await g(d), o(i.alert_goal_deleted), c(void 0));
889
+ }, se = async () => {
889
890
  const G = {
890
- ...m,
891
+ ...d,
891
892
  has_been_spent: !0
892
893
  };
893
- await l(G), o(s.alert_goal_completed), d(void 0);
894
+ await m(G), o(i.alert_goal_completed), c(void 0);
894
895
  };
895
- return /* @__PURE__ */ i(b, { children: [
896
+ return /* @__PURE__ */ r(f, { children: [
896
897
  /* @__PURE__ */ e(
897
- F,
898
+ j,
898
899
  {
899
- ariaLabelClose: c.close_aria,
900
+ ariaLabelClose: s.close_aria,
900
901
  hasSecondaryAction: R,
901
- isOpen: !!m,
902
- isPrimaryDisabled: !se,
903
- onClose: () => d(void 0),
904
- onPrimaryAction: z,
902
+ isOpen: !!d,
903
+ isPrimaryDisabled: !Z,
904
+ onClose: () => c(void 0),
905
+ onPrimaryAction: H,
905
906
  primaryColor: R || v ? "primary" : "error",
906
- primaryText: W,
907
+ primaryText: z,
907
908
  secondaryColor: "primary",
908
- title: s.goal_details,
909
- children: m && /* @__PURE__ */ e(Wt, { goal: m })
909
+ title: i.goal_details,
910
+ children: d && /* @__PURE__ */ e(Ot, { goal: d })
910
911
  }
911
912
  ),
912
913
  /* @__PURE__ */ e(
913
- nt,
914
+ tt,
914
915
  {
915
- copy: { close_aria: c.close_aria, title: s.delete_goal },
916
+ copy: { close_aria: s.close_aria, title: i.delete_goal },
916
917
  isOpen: T,
917
918
  maxWidth: "xs",
918
919
  onClose: () => S(!1),
919
- onPrimaryAction: te,
920
+ onPrimaryAction: ie,
920
921
  primaryColor: "error",
921
- primaryText: c.delete_button,
922
- children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(s.delete_description, m?.name || "") })
922
+ primaryText: s.delete_button,
923
+ children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: L(i.delete_description, d?.name || "") })
923
924
  }
924
925
  )
925
926
  ] });
926
927
  }), Xn = D(({ onBackClick: t, sx: n }) => {
927
- const { onEvent: s } = ke(), { onLoad: c } = Qe(), { isMobile: p } = be(), { visibleAccounts: a } = j(), { isCopyLoaded: _, isInitialized: h, setSelectedAccounts: g } = ge(), { goals: r, common: m } = C(), { alert: o, goals: d, goalsLoaded: l, loadGoals: f, monthlyCashFlowProfile: T, setAlert: S, retirmentGoals: R } = I(), [v, K] = y.useState(0), [se, W] = y.useState(!1), z = T?.amount_allocated_for_savings_goals || 0, ee = T?.amount_allocated_for_debt_goals || 0, te = T?.amount_allocated_for_retirement_goals || 0, le = _ ? L(
928
- p ? r.tab_subtitle_mobile : r.tab_subtitle,
928
+ const { onEvent: i } = Ne(), { isMobile: s } = ge(), { visibleAccounts: p } = V(), { isCopyLoaded: a, isInitialized: _, setSelectedAccounts: g } = he(), { goals: l, common: h } = C(), { alert: d, goals: o, goalsLoaded: c, loadGoals: m, monthlyCashFlowProfile: b, setAlert: T, retirmentGoals: S } = I(), [R, v] = y.useState(0), [F, Z] = y.useState(!1), z = b?.amount_allocated_for_savings_goals || 0, H = b?.amount_allocated_for_debt_goals || 0, te = b?.amount_allocated_for_retirement_goals || 0;
929
+ Ke({
930
+ widgetName: "GoalsWidget",
931
+ isLoaded: c
932
+ });
933
+ const ie = a ? L(
934
+ s ? l.tab_subtitle_mobile : l.tab_subtitle,
929
935
  x(z, "0,0")
930
- ) : "", G = _ ? L(
931
- p ? r.tab_subtitle_mobile : r.tab_subtitle,
932
- x(ee, "0,0")
933
- ) : "", H = _ ? L(
934
- p ? r.tab_subtitle_mobile : r.tab_subtitle,
936
+ ) : "", se = a ? L(
937
+ s ? l.tab_subtitle_mobile : l.tab_subtitle,
938
+ x(H, "0,0")
939
+ ) : "", G = a ? L(
940
+ s ? l.tab_subtitle_mobile : l.tab_subtitle,
935
941
  x(te, "0,0")
936
942
  ) : "";
937
943
  y.useEffect(() => {
938
- g(a), s(Y.GOALS_VIEW);
939
- }, [a]), y.useEffect(() => {
940
- h && f().finally(() => {
941
- c?.("GoalsWidget");
942
- });
943
- }, [h, z, ee, te]);
944
+ g(p), i(Y.GOALS_VIEW);
945
+ }, [p]), y.useEffect(() => {
946
+ _ && m().finally();
947
+ }, [_, z, H, te]);
944
948
  const $ = () => {
945
- s(Y.GOALS_CLICK_FILTER);
946
- }, O = () => {
947
- W(!0), s(Y.GOALS_CLICK_ADD);
948
- }, ne = (X) => {
949
- W(!1), X === u.SAVINGS_TRACK ? K(0) : X === u.DEBT_TRACK ? K(1) : X === u.RETIREMENT_TRACK && K(2);
950
- }, Z = y.useMemo(
951
- () => l && (d.length === 0 || d.every(({ track_type: X }) => !X) && R.length === 0),
952
- [d, l, R]
949
+ i(Y.GOALS_CLICK_FILTER);
950
+ }, K = () => {
951
+ Z(!0), i(Y.GOALS_CLICK_ADD);
952
+ }, q = (X) => {
953
+ Z(!1), X === u.SAVINGS_TRACK ? v(0) : X === u.DEBT_TRACK ? v(1) : X === u.RETIREMENT_TRACK && v(2);
954
+ }, O = y.useMemo(
955
+ () => c && (o.length === 0 || o.every(({ track_type: X }) => !X) && S.length === 0),
956
+ [o, c, S]
953
957
  );
954
- return !l || !_ || !h ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ i(
955
- ft,
958
+ return !c || !a || !_ ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ r(
959
+ bt,
956
960
  {
957
- accountOptions: a,
961
+ accountOptions: p,
958
962
  actions: [
959
963
  {
960
964
  iconName: "add",
961
- label: r.add_title,
962
- onClick: O
965
+ label: l.add_title,
966
+ onClick: K
963
967
  }
964
968
  ],
965
969
  onAccountsFilterClick: $,
966
970
  onBackClick: t,
967
971
  sx: n,
968
- title: r.title,
972
+ title: l.title,
969
973
  children: [
970
- /* @__PURE__ */ i(b, { mx: p ? 0 : 48, my: 24, children: [
971
- /* @__PURE__ */ i(
974
+ /* @__PURE__ */ r(f, { mx: s ? 0 : 48, my: 24, children: [
975
+ /* @__PURE__ */ r(
972
976
  ze,
973
977
  {
974
- onChange: (X, We) => K(We),
978
+ onChange: (X, We) => v(We),
975
979
  sx: { bgcolor: "background.paper" },
976
980
  textColor: "primary",
977
- value: Z ? !1 : v,
981
+ value: O ? !1 : R,
978
982
  variant: "fullWidth",
979
983
  children: [
980
984
  /* @__PURE__ */ e(
981
- ce,
985
+ le,
982
986
  {
983
- disabled: Z,
984
- label: /* @__PURE__ */ e(de, { subtitle: le, title: r.tab_saving_title })
987
+ disabled: O,
988
+ label: /* @__PURE__ */ e(ce, { subtitle: ie, title: l.tab_saving_title })
985
989
  }
986
990
  ),
987
991
  /* @__PURE__ */ e(
988
- ce,
992
+ le,
989
993
  {
990
- disabled: Z,
991
- label: /* @__PURE__ */ e(de, { subtitle: G, title: r.tab_debt_title })
994
+ disabled: O,
995
+ label: /* @__PURE__ */ e(ce, { subtitle: se, title: l.tab_debt_title })
992
996
  }
993
997
  ),
994
998
  /* @__PURE__ */ e(
995
- ce,
999
+ le,
996
1000
  {
997
- disabled: Z,
998
- label: /* @__PURE__ */ e(de, { subtitle: H, title: r.tab_retirement_title })
1001
+ disabled: O,
1002
+ label: /* @__PURE__ */ e(ce, { subtitle: G, title: l.tab_retirement_title })
999
1003
  }
1000
1004
  )
1001
1005
  ]
1002
1006
  }
1003
1007
  ),
1004
- Z ? /* @__PURE__ */ e(
1005
- yt,
1008
+ O ? /* @__PURE__ */ e(
1009
+ ft,
1006
1010
  {
1007
- header: r.create_goals_header,
1011
+ header: l.create_goals_header,
1008
1012
  icon: "trophy",
1009
- onClick: O,
1010
- primaryButton: r.add_goals_button,
1011
- subText: r.empty_state_subheader,
1013
+ onClick: K,
1014
+ primaryButton: l.add_goals_button,
1015
+ subText: l.empty_state_subheader,
1012
1016
  sx: {
1013
1017
  width: { sm: 432 },
1014
1018
  ".buttons-footer": {
@@ -1016,67 +1020,67 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1016
1020
  }
1017
1021
  }
1018
1022
  }
1019
- ) : /* @__PURE__ */ i(U, { children: [
1020
- v === 0 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.SAVINGS_TRACK }),
1021
- v === 1 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.DEBT_TRACK }),
1022
- v === 2 && /* @__PURE__ */ e(me, { onAddGoals: O, trackType: u.RETIREMENT_TRACK })
1023
+ ) : /* @__PURE__ */ r(U, { children: [
1024
+ R === 0 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.SAVINGS_TRACK }),
1025
+ R === 1 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.DEBT_TRACK }),
1026
+ R === 2 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: u.RETIREMENT_TRACK })
1023
1027
  ] })
1024
1028
  ] }),
1025
- /* @__PURE__ */ e(Pt, { onClose: ne }),
1029
+ /* @__PURE__ */ e(Wt, { onClose: q }),
1026
1030
  /* @__PURE__ */ e(
1027
- F,
1031
+ j,
1028
1032
  {
1029
- ariaLabelClose: m.close_aria,
1030
- isOpen: se,
1031
- onClose: () => W(!1),
1032
- title: r.add_goal_title,
1033
- children: /* @__PURE__ */ e(wt, { onClose: ne })
1033
+ ariaLabelClose: h.close_aria,
1034
+ isOpen: F,
1035
+ onClose: () => Z(!1),
1036
+ title: l.add_goal_title,
1037
+ children: /* @__PURE__ */ e(kt, { onClose: q })
1034
1038
  }
1035
1039
  ),
1036
- /* @__PURE__ */ e(Fe, { onClose: () => S(""), open: !!o, children: /* @__PURE__ */ e(je, { onClose: () => S(""), severity: "success", variant: "filled", children: o }) })
1040
+ /* @__PURE__ */ e(Fe, { onClose: () => T(""), open: !!d, children: /* @__PURE__ */ e(je, { onClose: () => T(""), severity: "success", variant: "filled", children: d }) })
1037
1041
  ]
1038
1042
  }
1039
1043
  );
1040
- }), Vt = D(({ goal: t }) => {
1041
- const { goals: n } = C(), s = Ct(), {
1042
- backgroundColor: c,
1044
+ }), Pt = D(({ goal: t }) => {
1045
+ const { goals: n } = C(), i = Tt(), {
1046
+ backgroundColor: s,
1043
1047
  color: p,
1044
1048
  percentage: a,
1045
1049
  projectedText: _
1046
- } = _e(n, t), h = Math.round(a * 100);
1047
- let g = /* @__PURE__ */ e(Ee, {});
1048
- return t.track_type === u.DEBT_TRACK ? g = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (g = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ i(b, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1049
- /* @__PURE__ */ e(ae, { sx: { bgcolor: c, color: p, height: 32, width: 32 }, variant: "rounded", children: g }),
1050
- /* @__PURE__ */ i(Tt, { sx: { width: "100%" }, children: [
1051
- /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1050
+ } = ue(n, t), g = Math.round(a * 100);
1051
+ let l = /* @__PURE__ */ e(Re, {});
1052
+ return t.track_type === u.DEBT_TRACK ? l = /* @__PURE__ */ e(Ee, {}) : t.track_type === u.RETIREMENT_TRACK && (l = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1053
+ /* @__PURE__ */ e(oe, { sx: { bgcolor: s, color: p, height: 32, width: 32 }, variant: "rounded", children: l }),
1054
+ /* @__PURE__ */ r(At, { sx: { width: "100%" }, children: [
1055
+ /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1052
1056
  t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
1053
1057
  ] }),
1054
1058
  /* @__PURE__ */ e(
1055
- St,
1059
+ Ct,
1056
1060
  {
1057
- backgroundStrokeColor: s.palette.border.lighter,
1058
- color: s.palette.primary.main,
1059
- percent: h,
1061
+ backgroundStrokeColor: i.palette.border.lighter,
1062
+ color: i.palette.primary.main,
1063
+ percent: g,
1060
1064
  size: 40,
1061
1065
  strokeWidth: 3,
1062
- children: /* @__PURE__ */ e(P, { fontWeight: 700, variant: "caption", children: `${h}%` })
1066
+ children: /* @__PURE__ */ e(W, { fontWeight: 700, variant: "caption", children: `${g}%` })
1063
1067
  }
1064
1068
  )
1065
1069
  ] });
1066
- }), jt = ({ header: t, subText: n, sx: s }) => /* @__PURE__ */ i(
1067
- b,
1070
+ }), Vt = ({ header: t, subText: n, sx: i }) => /* @__PURE__ */ r(
1071
+ f,
1068
1072
  {
1069
1073
  sx: {
1070
1074
  alignItems: "center",
1071
1075
  alignSelf: "center",
1072
1076
  px: 24,
1073
- ...s
1077
+ ...i
1074
1078
  },
1075
1079
  children: [
1076
1080
  /* @__PURE__ */ e(Je, { size: 32 }),
1077
- /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, children: t }),
1081
+ /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, children: t }),
1078
1082
  /* @__PURE__ */ e(
1079
- P,
1083
+ W,
1080
1084
  {
1081
1085
  color: "text.secondary",
1082
1086
  sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
@@ -1087,39 +1091,42 @@ const Et = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1087
1091
  ]
1088
1092
  }
1089
1093
  ), Un = D(({ onCTAClick: t }) => {
1090
- const { visibleAccounts: n } = j(), { onEvent: s } = ke(), { goals: c } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = ge(), { ongoingGoalsForMicroWidget: h, loadGoals: g, goalsLoaded: r } = I();
1091
- y.useEffect(() => {
1094
+ const { visibleAccounts: n } = V(), { onEvent: i } = Ne(), { goals: s } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = he(), { ongoingGoalsForMicroWidget: g, loadGoals: l, goalsLoaded: h } = I();
1095
+ Ke({
1096
+ widgetName: "GoalsMicroWidget",
1097
+ isLoaded: h
1098
+ }), y.useEffect(() => {
1092
1099
  a(n);
1093
1100
  }, []), y.useEffect(() => {
1094
- p && (g().finally(), s(Y.GOALS_LOAD_WIDGET, {
1101
+ p && (l().finally(), i(Y.GOALS_LOAD_WIDGET, {
1095
1102
  state: n?.length ? "default" : "zeroState"
1096
1103
  }));
1097
1104
  }, [p]);
1098
- const m = y.useMemo(
1099
- () => r && h.length === 0,
1100
- [h, r]
1105
+ const d = y.useMemo(
1106
+ () => h && g.length === 0,
1107
+ [g, h]
1101
1108
  ), o = () => {
1102
- s(
1103
- m ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1109
+ i(
1110
+ d ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1104
1111
  ), t();
1105
1112
  };
1106
- return !r || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1107
- Rt,
1113
+ return !h || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1114
+ St,
1108
1115
  {
1109
1116
  className: "mx-goals-microwidget",
1110
- ctaLabel: m ? c.get_started : c.view_details,
1117
+ ctaLabel: d ? s.get_started : s.view_details,
1111
1118
  onCTAClick: o,
1112
- title: c.title,
1113
- children: m ? /* @__PURE__ */ e(
1114
- jt,
1119
+ title: s.title,
1120
+ children: d ? /* @__PURE__ */ e(
1121
+ Vt,
1115
1122
  {
1116
- header: c.create_goals_header,
1117
- subText: c.micro_zero_state_description
1123
+ header: s.create_goals_header,
1124
+ subText: s.micro_zero_state_description
1118
1125
  }
1119
- ) : /* @__PURE__ */ e(At, { sx: { justifyContent: "space-between" }, children: h.map((d, l) => /* @__PURE__ */ i(y.Fragment, { children: [
1120
- /* @__PURE__ */ e(Vt, { goal: d }),
1121
- l !== h.length - 1 && /* @__PURE__ */ e(E, {})
1122
- ] }, d.guid)) })
1126
+ ) : /* @__PURE__ */ e(yt, { sx: { justifyContent: "space-between" }, children: g.map((c, m) => /* @__PURE__ */ r(y.Fragment, { children: [
1127
+ /* @__PURE__ */ e(Pt, { goal: c }),
1128
+ m !== g.length - 1 && /* @__PURE__ */ e(E, {})
1129
+ ] }, c.guid)) })
1123
1130
  }
1124
1131
  );
1125
1132
  });