@mx-cartographer/experiences 7.12.17 → 7.13.0

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 (50) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AccountDetailsHeader-BkEF1gO-.mjs → AccountDetailsHeader-D9gbTbUt.mjs} +31 -31
  3. package/dist/{AccountFields-C_dcdCM7.mjs → AccountFields-CxqONzjY.mjs} +6 -6
  4. package/dist/AccountListItem-LcJVJysf.mjs +90 -0
  5. package/dist/{AccountStore-ypdfueW9.mjs → AccountStore-BNlTuxWN.mjs} +1 -1
  6. package/dist/{BudgetUtil--_QXyszn.mjs → BudgetUtil-CLhRnCoX.mjs} +75 -75
  7. package/dist/{CashflowStore-DEdQJU5i.mjs → CashflowStore-D3MKniVM.mjs} +11 -11
  8. package/dist/{CategorySelectorDrawer-wfUTIbLR.mjs → CategorySelectorDrawer-DYHNBd2v.mjs} +31 -31
  9. package/dist/{ConnectDrawer-CioFo6Wy.mjs → ConnectDrawer-C0wjwcJt.mjs} +1 -1
  10. package/dist/{ConnectionsDrawer-DqhSaMrJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +1 -1
  11. package/dist/{Drawer-DV4NTsFg.mjs → Drawer-Bbe4AMB1.mjs} +5 -5
  12. package/dist/{GoalStore-0bd-Upkc.mjs → GoalStore-DB58sKTC.mjs} +8 -8
  13. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  14. package/dist/{Help-CDu1Fvrc.mjs → Help-CpLfyvPv.mjs} +24 -24
  15. package/dist/{LineChart-B1qbKR8q.mjs → LineChart-DBSlRSEm.mjs} +102 -102
  16. package/dist/{ManageIncome-BnWWjP2g.mjs → ManageIncome-QvqN555q.mjs} +62 -62
  17. package/dist/{MiniWidgetContainer-Cu72GNsE.mjs → MiniWidgetContainer-xLWSV6Wz.mjs} +13 -13
  18. package/dist/{NotificationSettings-BH2yOwTB.mjs → NotificationSettings-DU3vJh5J.mjs} +139 -139
  19. package/dist/{OriginalBalanceAction-BM6rT_Cn.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +6 -6
  20. package/dist/{RecurringSettings-BmXtfHtK.mjs → RecurringSettings-DdOcok2e.mjs} +2 -2
  21. package/dist/{RecurringTransactions-CYNpe_RS.mjs → RecurringTransactions-BOzBqfdg.mjs} +11 -11
  22. package/dist/{RecurringTransactionsStore-BD-OfVZ-.mjs → RecurringTransactionsStore-CcfPS0d3.mjs} +1 -1
  23. package/dist/{SpendingLegend-Bq6aXMNh.mjs → SpendingLegend-CJjjTGBw.mjs} +76 -76
  24. package/dist/{StatusIndicator-BV3oFzxo.mjs → StatusIndicator-CIKUOoN_.mjs} +53 -53
  25. package/dist/{TransactionDetails-DYlTwSDt.mjs → TransactionDetails-BpcWeXNU.mjs} +350 -350
  26. package/dist/{WidgetContainer-B0ncgABX.mjs → WidgetContainer-D_iaToWJ.mjs} +12 -12
  27. package/dist/accounts/index.es.js +107 -107
  28. package/dist/analytics/index.es.js +18 -18
  29. package/dist/budgets/index.es.js +182 -182
  30. package/dist/cashflow/index.es.js +223 -223
  31. package/dist/categories/index.es.js +1 -1
  32. package/dist/common/index.es.js +54 -64
  33. package/dist/dashboard/index.es.js +9 -9
  34. package/dist/debts/index.es.js +469 -469
  35. package/dist/finstrong/index.es.js +68 -68
  36. package/dist/goals/index.es.js +437 -437
  37. package/dist/help/index.es.js +2 -2
  38. package/dist/insights/index.es.js +159 -159
  39. package/dist/investments/index.es.js +292 -292
  40. package/dist/merchants/index.es.js +12 -12
  41. package/dist/networth/index.es.js +175 -168
  42. package/dist/notifications/index.es.js +13 -13
  43. package/dist/recurringtransactions/index.es.js +69 -69
  44. package/dist/settings/index.es.js +187 -187
  45. package/dist/spending/index.es.js +58 -58
  46. package/dist/transactions/index.es.js +70 -70
  47. package/dist/trends/index.es.js +15 -15
  48. package/package.json +1 -1
  49. package/dist/AccountListItem-BAf03YhK.mjs +0 -90
  50. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
@@ -1,73 +1,73 @@
1
1
  import { jsx as e, jsxs as s, Fragment as $ } from "react/jsx-runtime";
2
- import g from "react";
3
- import { observer as v } from "mobx-react-lite";
4
- import x from "@mui/material/Stack";
5
- import { useTheme as Y, Card as we, Stack as _, Box as W } from "@mui/material";
6
- import { Text as l, P as Ce, H3 as Fe, InstitutionLogo as Le, Icon as ne } from "@mxenabled/mxui";
7
- import { intervalToDuration as $e, formatDuration as He } from "date-fns";
8
- import { addMonths as he } from "date-fns/addMonths";
2
+ import x from "react";
3
+ import { observer as D } from "mobx-react-lite";
4
+ import g from "@mui/material/Stack";
5
+ import { useTheme as V, Card as we, Stack as _, Box as W } from "@mui/material";
6
+ import { Text as l, P as Ce, H3 as Fe, InstitutionLogo as Le, Icon as ae } from "@mxenabled/mxui";
7
+ import { intervalToDuration as $e, formatDuration as Oe } from "date-fns";
8
+ import { addMonths as me } from "date-fns/addMonths";
9
9
  import { fromUnixTime as ue } from "date-fns/fromUnixTime";
10
10
  import { getUnixTime as be } from "date-fns/getUnixTime";
11
- import { a as P, M as Oe, I as We } from "../DebtsStore-BZqNLaqd.mjs";
12
- import { D as ra } from "../DebtsStore-BZqNLaqd.mjs";
13
- import { f as N, a as Ge } from "../NumberFormatting-QCaNwbjv.mjs";
11
+ import { a as P, M as He, I as We } from "../DebtsStore-BZqNLaqd.mjs";
12
+ import { D as ro } from "../DebtsStore-BZqNLaqd.mjs";
13
+ import { f as R, a as Ge } from "../NumberFormatting-QCaNwbjv.mjs";
14
14
  import { f as Q, D as ee } from "../DateFormats-BMpMrZpW.mjs";
15
- import { G as je, v as te, u as C, k as V, g as R, d as re, a as ze, b as Xe } from "../hooks-BxkfR-Ff.mjs";
16
- import { u as K } from "../useScreenSize-B6JyS_Lj.mjs";
17
- import { D as ie } from "../Drawer-DV4NTsFg.mjs";
15
+ import { G as je, v as te, u as C, k as K, g as B, d as re, a as ze, b as Ye } from "../hooks-BxkfR-Ff.mjs";
16
+ import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
17
+ import { D as ie } from "../Drawer-Bbe4AMB1.mjs";
18
18
  import { b as E } from "../Localization-CPkpIwIx.mjs";
19
- import { A as Ye, u as Ve } from "../AccountDetailsHeader-BkEF1gO-.mjs";
20
- import Ke from "@mui/material/Card";
21
- import Ue from "@mui/material/CardContent";
22
- import qe from "@mui/material/CardHeader";
19
+ import { A as Ve, u as Ke } from "../AccountDetailsHeader-D9gbTbUt.mjs";
20
+ import Ue from "@mui/material/Card";
21
+ import qe from "@mui/material/CardContent";
22
+ import Xe from "@mui/material/CardHeader";
23
23
  import le from "@mui/material/Box";
24
24
  import { useTheme as Ze } from "@mui/material/styles";
25
25
  import { LineChart as Je } from "@mui/x-charts/LineChart";
26
- import { A as D } from "../Analytics-BYItVAe-.mjs";
26
+ import { A as S } from "../Analytics-BYItVAe-.mjs";
27
27
  import _e from "@mui/material/Tab";
28
28
  import Qe from "@mui/material/Tabs";
29
- import Se from "@mui/material/List";
29
+ import ve from "@mui/material/List";
30
30
  import G from "@mui/material/Divider";
31
- import { M as et, I as tt, O as rt } from "../OriginalBalanceAction-BM6rT_Cn.mjs";
32
- import at from "@mui/material/TextField";
33
- import { L as ae } from "../ListItemAction-4KB7P75M.mjs";
31
+ import { M as et, I as tt, O as rt } from "../OriginalBalanceAction-DjpvVVFz.mjs";
32
+ import ot from "@mui/material/TextField";
33
+ import { L as oe } from "../ListItemAction-4KB7P75M.mjs";
34
34
  import { C as se } from "../CurrencyInput-DuMktPu3.mjs";
35
35
  import ye from "@mui/material/Alert";
36
36
  import fe from "@mui/material/AlertTitle";
37
- import ge from "@mui/material/Paper";
38
- import { Error as ot, CheckCircle as ve } from "@mxenabled/mx-icons";
39
- import { T as xe } from "../TabContentContainer-j01JYR_7.mjs";
40
- import { DataGridPro as nt } from "@mui/x-data-grid-pro";
41
- import { H as j } from "../HeaderCell-DjuifqHJ.mjs";
42
- import { f as it, A as X } from "../Account-BiB1F8lL.mjs";
43
- import De from "@mui/material/Button";
37
+ import xe from "@mui/material/Paper";
38
+ import { Error as nt, CheckCircle as De } from "@mxenabled/mx-icons";
39
+ import { T as ge } from "../TabContentContainer-j01JYR_7.mjs";
40
+ import { DataGridPro as at } from "@mui/x-data-grid-pro";
41
+ import { H as j } from "../HeaderCell-P8w6CmfO.mjs";
42
+ import { f as it, A as Y } from "../Account-BiB1F8lL.mjs";
43
+ import Se from "@mui/material/Button";
44
44
  import lt from "@mui/material/IconButton";
45
45
  import st from "@mui/material/ListItem";
46
46
  import ct from "@mui/material/Popover";
47
- import { C as dt } from "../ConnectDrawer-CioFo6Wy.mjs";
47
+ import { C as dt } from "../ConnectDrawer-C0wjwcJt.mjs";
48
48
  import { u as pt } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
49
- import { L as mt } from "../Loader-D3rjKx72.mjs";
50
- import { W as ht } from "../WidgetContainer-B0ncgABX.mjs";
49
+ import { L as ht } from "../Loader-D3rjKx72.mjs";
50
+ import { W as mt } from "../WidgetContainer-D_iaToWJ.mjs";
51
51
  import { E as ut } from "../EmptyState-DHAkGsjk.mjs";
52
- const bt = (a, o = 0, r = 0) => {
52
+ const bt = (o, n = 0, r = 0) => {
53
53
  if (r === 0) return 0;
54
- const t = o / (Oe * We);
54
+ const t = n / (He * We);
55
55
  return Math.ceil(
56
- t === 0 ? a / r : -Math.log(1 - t * a / r) / Math.log(1 + t)
56
+ t === 0 ? o / r : -Math.log(1 - t * o / r) / Math.log(1 + t)
57
57
  );
58
- }, _t = (a, o, r, t, n) => {
58
+ }, _t = (o, n, r, t, a) => {
59
59
  const i = [];
60
60
  if (r === 0) {
61
- for (let d = 0; d < a; d++) {
62
- const p = o - t * (d + 1), h = o - t * d, m = p >= 0 ? t : h;
61
+ for (let d = 0; d < o; d++) {
62
+ const p = n - t * (d + 1), m = n - t * d, h = p >= 0 ? t : m;
63
63
  i.push({
64
64
  balance: p >= 0 ? p : 0,
65
65
  interest: r,
66
- payment: m,
67
- principal: m,
66
+ payment: h,
67
+ principal: h,
68
68
  timestamp: be(
69
- he(
70
- ue(n),
69
+ me(
70
+ ue(a),
71
71
  // convert seconds → Date
72
72
  d + 1
73
73
  // add (index + 1) months
@@ -78,98 +78,98 @@ const bt = (a, o = 0, r = 0) => {
78
78
  return i;
79
79
  }
80
80
  const c = r / 1200;
81
- for (let d = 0; d < a; d++) {
82
- const p = be(he(ue(n), d + 1)), h = Math.pow(1 + c, d), m = o * h - t * ((h - 1) / c), w = Math.pow(1 + c, d + 1), b = o * w - t * ((w - 1) / c), B = t + Math.min(b, 0), M = m * c;
81
+ for (let d = 0; d < o; d++) {
82
+ const p = be(me(ue(a), d + 1)), m = Math.pow(1 + c, d), h = n * m - t * ((m - 1) / c), w = Math.pow(1 + c, d + 1), b = n * w - t * ((w - 1) / c), M = t + Math.min(b, 0), k = h * c;
83
83
  i.push({
84
84
  balance: Math.max(0, b),
85
- interest: M,
86
- payment: B,
87
- principal: B - M,
85
+ interest: k,
86
+ payment: M,
87
+ principal: M - k,
88
88
  timestamp: p
89
89
  });
90
90
  }
91
91
  return i;
92
- }, yt = (a) => (a[a.length - 1] || {}).timestamp, ft = (a) => {
93
- const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: n } = a, i = bt(t, r ?? 0, o ?? 0), c = _t(
92
+ }, yt = (o) => (o[o.length - 1] || {}).timestamp, ft = (o) => {
93
+ const { monthly_payment: n, interest_rate: r, balance: t, payment_due_date: a } = o, i = bt(t, r ?? 0, n ?? 0), c = _t(
94
94
  i,
95
95
  t,
96
96
  r ?? 0,
97
- o ?? 0,
98
- n
97
+ n ?? 0,
98
+ a
99
99
  ), d = yt(c);
100
100
  return {
101
- ...a,
101
+ ...o,
102
102
  minimumFinalPayment: d,
103
103
  minimumPayments: c
104
104
  };
105
- }, Te = (a, o) => {
106
- const [r, t] = a.reduce(
107
- ([n, i], c) => (c.is_paid_off || c.is_impossible ? i.push({ ...c, minimumPayments: [] }) : n.push(ft(c)), [n, i]),
105
+ }, Te = (o, n) => {
106
+ const [r, t] = o.reduce(
107
+ ([a, i], c) => (c.is_paid_off || c.is_impossible ? i.push({ ...c, minimumPayments: [] }) : a.push(ft(c)), [a, i]),
108
108
  [[], []]
109
109
  );
110
- switch (o) {
110
+ switch (n) {
111
111
  case P.FASTEST_PAYOFF_FIRST:
112
- r.sort((n, i) => (n.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
112
+ r.sort((a, i) => (a.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
113
113
  break;
114
114
  case P.HIGHEST_INTEREST:
115
- r.sort((n, i) => (i.interest_rate ?? 0) - (n.interest_rate ?? 0));
115
+ r.sort((a, i) => (i.interest_rate ?? 0) - (a.interest_rate ?? 0));
116
116
  break;
117
117
  case P.LOWEST_BALANCE:
118
- r.sort((n, i) => n.balance - i.balance);
118
+ r.sort((a, i) => a.balance - i.balance);
119
119
  break;
120
120
  case P.HIGHEST_BALANCE:
121
- r.sort((n, i) => i.balance - n.balance);
121
+ r.sort((a, i) => i.balance - a.balance);
122
122
  break;
123
123
  default:
124
- r.sort((n, i) => n.balance - i.balance);
124
+ r.sort((a, i) => a.balance - i.balance);
125
125
  }
126
- a.splice(0, a.length, ...r, ...t);
126
+ o.splice(0, o.length, ...r, ...t);
127
127
  };
128
- function gt(a, o, r = 0) {
129
- const t = a.map((m) => ({ ...m })).filter(
130
- (m) => m.interest_rate !== void 0 && m.monthly_payment !== void 0 && !m.is_paid_off
128
+ function xt(o, n, r = 0) {
129
+ const t = o.map((h) => ({ ...h })).filter(
130
+ (h) => h.interest_rate !== void 0 && h.monthly_payment !== void 0 && !h.is_paid_off
131
131
  );
132
- Te(t, o);
133
- let n = 0, i = 0;
132
+ Te(t, n);
133
+ let a = 0, i = 0;
134
134
  const c = /* @__PURE__ */ new Date(), d = /* @__PURE__ */ new Date();
135
- for (; t.some((m) => m.balance >= 0.01 && !m.is_impossible); ) {
136
- let m = !1;
135
+ for (; t.some((h) => h.balance >= 0.01 && !h.is_impossible); ) {
136
+ let h = !1;
137
137
  for (const [w, b] of t.entries()) {
138
138
  if (b.balance <= 0.01 || b.is_impossible) continue;
139
- const M = (b.interest_rate ?? 0) / 100 / 12, I = b.balance * M;
140
- let S = b.monthly_payment ?? 0;
141
- w === 0 && r && (S += r), b.balance += I;
142
- const T = Math.min(b.balance, S + i);
139
+ const k = (b.interest_rate ?? 0) / 100 / 12, I = b.balance * k;
140
+ let v = b.monthly_payment ?? 0;
141
+ w === 0 && r && (v += r), b.balance += I;
142
+ const T = Math.min(b.balance, v + i);
143
143
  if (T <= I) {
144
144
  b.is_impossible = !0;
145
145
  continue;
146
146
  }
147
- b.balance -= T, b.balance = b.balance < 0.01 ? 0 : b.balance, n += I, b.balance <= 0 && (i += S), T > 0 && (m = !0);
147
+ b.balance -= T, b.balance = b.balance < 0.01 ? 0 : b.balance, a += I, b.balance <= 0 && (i += v), T > 0 && (h = !0);
148
148
  }
149
- m && d.setMonth(d.getMonth() + 1);
149
+ h && d.setMonth(d.getMonth() + 1);
150
150
  }
151
- const p = t.some((m) => m.is_impossible && m.balance > 0), h = $e({ start: c, end: d });
151
+ const p = t.some((h) => h.is_impossible && h.balance > 0), m = $e({ start: c, end: d });
152
152
  return {
153
- payoffSavings: p ? "N/A" : N(n, "0,0.00"),
153
+ payoffSavings: p ? "N/A" : R(a, "0,0.00"),
154
154
  payoffDate: p ? "Never" : Q(d, ee.MONTH_YEAR),
155
- payoffDuration: p ? "Stagnant" : He(h, { format: ["years", "months"] }) || "0 months"
155
+ payoffDuration: p ? "Stagnant" : Oe(m, { format: ["years", "months"] }) || "0 months"
156
156
  };
157
157
  }
158
158
  const F = () => {
159
- if (!g.useContext(je))
159
+ if (!x.useContext(je))
160
160
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
161
161
  return te().uiStore;
162
- }, xt = ({ debts: a, onClickCta: o, sx: r }) => {
163
- const t = Y(), { isMobile: n } = K(), { debts: i } = C(), { selectedDebtPriority: c } = F(), { monthlyCashFlowProfile: d } = V(), { payoffDate: p, payoffSavings: h, payoffDuration: m } = g.useMemo(() => {
162
+ }, gt = ({ debts: o, onClickCta: n, sx: r }) => {
163
+ const t = V(), { isMobile: a } = U(), { debts: i } = C(), { selectedDebtPriority: c } = F(), { monthlyCashFlowProfile: d } = K(), { payoffDate: p, payoffSavings: m, payoffDuration: h } = x.useMemo(() => {
164
164
  const w = d?.extra_payment ?? 0;
165
- return gt(a, c, w);
166
- }, [a, c, d]);
165
+ return xt(o, c, w);
166
+ }, [o, c, d]);
167
167
  return /* @__PURE__ */ e(
168
168
  we,
169
169
  {
170
170
  sx: {
171
171
  boxShadow: t.shadows[2],
172
- width: n ? "100%" : "186px",
172
+ width: a ? "100%" : "186px",
173
173
  minWidth: "186px",
174
174
  ...r
175
175
  },
@@ -177,66 +177,66 @@ const F = () => {
177
177
  /* @__PURE__ */ s(
178
178
  _,
179
179
  {
180
- gap: n ? "4px" : "0",
180
+ gap: a ? "4px" : "0",
181
181
  sx: {
182
182
  borderBottom: "1px solid",
183
183
  borderBottomColor: t.palette.grey[300],
184
184
  pb: "8px"
185
185
  },
186
186
  children: [
187
- /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_date_description }),
188
- /* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "Small", children: p })
187
+ /* @__PURE__ */ e(l, { variant: "caption", children: i.snowball_card_date_description }),
188
+ /* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "body2", children: p })
189
189
  ]
190
190
  }
191
191
  ),
192
- /* @__PURE__ */ s(_, { gap: n ? "4px" : "0", children: [
193
- /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: h }),
194
- /* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: i.snowball_card_amount_description })
192
+ /* @__PURE__ */ s(_, { gap: a ? "4px" : "0", children: [
193
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body2", children: m }),
194
+ /* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "caption", children: i.snowball_card_amount_description })
195
195
  ] }),
196
- /* @__PURE__ */ s(_, { gap: n ? "4px" : "0", children: [
197
- /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: m }),
198
- /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_duration_description })
196
+ /* @__PURE__ */ s(_, { gap: a ? "4px" : "0", children: [
197
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body2", children: h }),
198
+ /* @__PURE__ */ e(l, { variant: "caption", children: i.snowball_card_duration_description })
199
199
  ] }),
200
200
  /* @__PURE__ */ e(
201
201
  l,
202
202
  {
203
203
  bold: !0,
204
204
  color: t.palette.primary.main,
205
- onClick: o,
205
+ onClick: n,
206
206
  sx: { cursor: "pointer" },
207
- variant: "Small",
207
+ variant: "body2",
208
208
  children: i.snowball_card_cta
209
209
  }
210
210
  )
211
211
  ] })
212
212
  }
213
213
  );
214
- }, wt = v(xt), Ct = ({ isOpen: a, onClose: o }) => {
215
- const r = Y(), { debts: t } = C(), [n, i] = g.useState(!1);
214
+ }, wt = D(gt), Ct = ({ isOpen: o, onClose: n }) => {
215
+ const r = V(), { debts: t } = C(), [a, i] = x.useState(!1);
216
216
  return /* @__PURE__ */ e(
217
217
  ie,
218
218
  {
219
219
  ariaLabelClose: "",
220
- isOpen: a,
221
- onClose: o,
220
+ isOpen: o,
221
+ onClose: n,
222
222
  title: t.snowball_drawer_title,
223
223
  children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
224
224
  /* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
225
225
  /* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
226
- /* @__PURE__ */ e(l, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
227
- /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
228
- /* @__PURE__ */ e(Ce, { variant: "H1", children: t.snowball_drawer_savings }),
229
- /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
226
+ /* @__PURE__ */ e(l, { mb: 12, variant: "h3", children: t.snowball_drawer_subtitle }),
227
+ /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "body2", children: t.snowball_drawer_amount_description }),
228
+ /* @__PURE__ */ e(Ce, { variant: "h1", children: t.snowball_drawer_savings }),
229
+ /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "body2", children: t.snowball_drawer_duration_description })
230
230
  ] }),
231
231
  /* @__PURE__ */ s(we, { sx: { display: "grid", py: 16, px: 24 }, children: [
232
- /* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
232
+ /* @__PURE__ */ e(l, { mb: 4, variant: "h3", children: t.snowball_drawer_question }),
233
233
  /* @__PURE__ */ e(
234
234
  l,
235
235
  {
236
236
  color: r.palette.secondary.main,
237
237
  mb: 8,
238
- sx: { whiteSpace: n ? "normal" : "nowrap" },
239
- variant: "ParagraphSmall",
238
+ sx: { whiteSpace: a ? "normal" : "nowrap" },
239
+ variant: "subtitle2",
240
240
  children: t.snowball_drawer_answer
241
241
  }
242
242
  ),
@@ -245,10 +245,10 @@ const F = () => {
245
245
  {
246
246
  bold: !0,
247
247
  color: r.palette.primary.main,
248
- onClick: () => i(!n),
248
+ onClick: () => i(!a),
249
249
  sx: { cursor: "pointer" },
250
- variant: "Small",
251
- children: n ? t.snowball_drawer_less : t.snowball_drawer_more
250
+ variant: "body2",
251
+ children: a ? t.snowball_drawer_less : t.snowball_drawer_more
252
252
  }
253
253
  )
254
254
  ] })
@@ -260,13 +260,13 @@ const F = () => {
260
260
  color: r.palette.secondary.main,
261
261
  px: 24,
262
262
  sx: { textAlign: "center", whiteSpace: "normal" },
263
- variant: "Small",
263
+ variant: "body2",
264
264
  children: t.snowball_drawer_disclaimer
265
265
  }
266
266
  ),
267
267
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
268
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 1) }),
269
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
268
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 1) }),
269
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
270
270
  ] }),
271
271
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
272
272
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -283,7 +283,7 @@ const F = () => {
283
283
  backgroundColor: r.palette.success.main,
284
284
  marginRight: 12
285
285
  },
286
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
286
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
287
287
  }
288
288
  ),
289
289
  /* @__PURE__ */ s(
@@ -298,8 +298,8 @@ const F = () => {
298
298
  },
299
299
  children: [
300
300
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
301
- /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "A") }),
302
- /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
301
+ /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "A") }),
302
+ /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "caption", children: [
303
303
  E(
304
304
  t.snowball_drawer_rollover_explainer_pt1,
305
305
  "$100"
@@ -309,14 +309,14 @@ const F = () => {
309
309
  ] })
310
310
  ] }),
311
311
  /* @__PURE__ */ s(_, { children: [
312
- /* @__PURE__ */ e(l, { variant: "Body", children: "$100.00" }),
312
+ /* @__PURE__ */ e(l, { variant: "body1", children: "$100.00" }),
313
313
  /* @__PURE__ */ e(
314
314
  l,
315
315
  {
316
316
  bold: !0,
317
317
  color: r.palette.success.main,
318
318
  textAlign: "end",
319
- variant: "Tiny",
319
+ variant: "tiny",
320
320
  children: t.snowball_drawer_paid_label
321
321
  }
322
322
  )
@@ -349,8 +349,8 @@ const F = () => {
349
349
  pr: 24
350
350
  },
351
351
  children: [
352
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "B") }),
353
- /* @__PURE__ */ e(l, { variant: "Body", children: "$400.00" })
352
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "B") }),
353
+ /* @__PURE__ */ e(l, { variant: "body1", children: "$400.00" })
354
354
  ]
355
355
  }
356
356
  )
@@ -369,8 +369,8 @@ const F = () => {
369
369
  }
370
370
  ),
371
371
  /* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
372
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }),
373
- /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
372
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }),
373
+ /* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
374
374
  ] })
375
375
  ] }),
376
376
  /* @__PURE__ */ s(
@@ -385,15 +385,15 @@ const F = () => {
385
385
  borderBottom: `1px solid ${r.palette.border.light}`
386
386
  },
387
387
  children: [
388
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
389
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
388
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
389
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
390
390
  ]
391
391
  }
392
392
  )
393
393
  ] }),
394
394
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
395
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 2) }),
396
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
395
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 2) }),
396
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
397
397
  ] }),
398
398
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
399
399
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -410,7 +410,7 @@ const F = () => {
410
410
  backgroundColor: r.palette.success.main,
411
411
  marginRight: 12
412
412
  },
413
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
413
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
414
414
  }
415
415
  ),
416
416
  /* @__PURE__ */ s(
@@ -425,8 +425,8 @@ const F = () => {
425
425
  },
426
426
  children: [
427
427
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
428
- /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "B") }),
429
- /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
428
+ /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "B") }),
429
+ /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "caption", children: [
430
430
  E(
431
431
  t.snowball_drawer_rollover_explainer_pt1,
432
432
  "$500"
@@ -436,14 +436,14 @@ const F = () => {
436
436
  ] })
437
437
  ] }),
438
438
  /* @__PURE__ */ s(_, { children: [
439
- /* @__PURE__ */ e(l, { variant: "Body", children: "$500.00" }),
439
+ /* @__PURE__ */ e(l, { variant: "body1", children: "$500.00" }),
440
440
  /* @__PURE__ */ e(
441
441
  l,
442
442
  {
443
443
  bold: !0,
444
444
  color: r.palette.success.main,
445
445
  textAlign: "end",
446
- variant: "Tiny",
446
+ variant: "tiny",
447
447
  children: t.snowball_drawer_paid_label
448
448
  }
449
449
  )
@@ -475,8 +475,8 @@ const F = () => {
475
475
  pr: 24
476
476
  },
477
477
  children: [
478
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }),
479
- /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
478
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }),
479
+ /* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
480
480
  ]
481
481
  }
482
482
  )
@@ -493,15 +493,15 @@ const F = () => {
493
493
  borderBottom: `1px solid ${r.palette.border.light}`
494
494
  },
495
495
  children: [
496
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
497
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
496
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
497
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
498
498
  ]
499
499
  }
500
500
  )
501
501
  ] }),
502
502
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
503
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 3) }),
504
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
503
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 3) }),
504
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
505
505
  ] }),
506
506
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
507
507
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -518,7 +518,7 @@ const F = () => {
518
518
  backgroundColor: r.palette.success.main,
519
519
  marginRight: 12
520
520
  },
521
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
521
+ children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
522
522
  }
523
523
  ),
524
524
  /* @__PURE__ */ s(
@@ -532,16 +532,16 @@ const F = () => {
532
532
  pr: 24
533
533
  },
534
534
  children: [
535
- /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }) }),
535
+ /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }) }),
536
536
  /* @__PURE__ */ s(_, { children: [
537
- /* @__PURE__ */ e(l, { variant: "Body", children: "$1,500.00" }),
537
+ /* @__PURE__ */ e(l, { variant: "body1", children: "$1,500.00" }),
538
538
  /* @__PURE__ */ e(
539
539
  l,
540
540
  {
541
541
  bold: !0,
542
542
  color: r.palette.success.main,
543
543
  textAlign: "end",
544
- variant: "Tiny",
544
+ variant: "tiny",
545
545
  children: t.snowball_drawer_paid_label
546
546
  }
547
547
  )
@@ -562,8 +562,8 @@ const F = () => {
562
562
  borderBottom: `1px solid ${r.palette.border.light}`
563
563
  },
564
564
  children: [
565
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
566
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
565
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
566
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
567
567
  ]
568
568
  }
569
569
  )
@@ -572,50 +572,50 @@ const F = () => {
572
572
  ] })
573
573
  }
574
574
  );
575
- }, St = v(Ct), vt = "#FF7B08";
576
- function Dt(a, o) {
577
- const [r, t, n] = a.replace(/^#/, "").match(/.{1,2}/g).map((c) => parseInt(c, 16)), i = [
578
- Math.max(0, Math.min(255, Math.round(r * o))),
579
- Math.max(0, Math.min(255, Math.round(t * o))),
580
- Math.max(0, Math.min(255, Math.round(n * o)))
575
+ }, vt = D(Ct), Dt = "#FF7B08";
576
+ function St(o, n) {
577
+ const [r, t, a] = o.replace(/^#/, "").match(/.{1,2}/g).map((c) => parseInt(c, 16)), i = [
578
+ Math.max(0, Math.min(255, Math.round(r * n))),
579
+ Math.max(0, Math.min(255, Math.round(t * n))),
580
+ Math.max(0, Math.min(255, Math.round(a * n)))
581
581
  ];
582
582
  return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
583
583
  }
584
584
  const Ae = ({
585
- sx: a,
586
- height: o = 500,
585
+ sx: o,
586
+ height: n = 500,
587
587
  width: r,
588
588
  debts: t,
589
- hoveredDebtGuid: n,
589
+ hoveredDebtGuid: a,
590
590
  onClickArea: i,
591
591
  onHoverArea: c
592
592
  }) => {
593
- const d = Ze(), { onEvent: p } = R(), h = t.filter((u) => !u.is_impossible), m = [
593
+ const d = Ze(), { onEvent: p } = B(), m = t.filter((u) => !u.is_impossible), h = [
594
594
  ...new Set(
595
- h.flatMap((u) => u.dataset.map((f) => new Date(f.x).getTime()))
595
+ m.flatMap((u) => u.dataset.map((f) => new Date(f.x).getTime()))
596
596
  )
597
- ].sort((u, f) => u - f).map((u) => new Date(u)), w = h.map((u) => {
597
+ ].sort((u, f) => u - f).map((u) => new Date(u)), w = m.map((u) => {
598
598
  const f = new Map(u.dataset.map((L) => [new Date(L.x).getTime(), L.y]));
599
- let A = f.get(m[0].getTime()) ?? 0;
600
- const k = m.map((L) => {
599
+ let A = f.get(h[0].getTime()) ?? 0;
600
+ const N = h.map((L) => {
601
601
  const z = f.get(L.getTime()) ?? A;
602
602
  return A = z, { x: L, y: z };
603
603
  });
604
- return { ...u, dataset: k };
604
+ return { ...u, dataset: N };
605
605
  }), b = w.reduce(
606
606
  (u, f) => u + (f.dataset[0]?.y ?? 0),
607
607
  0
608
- ), B = m.map((u, f) => {
609
- const A = f / (m.length - 1), k = b * (1 - A);
610
- return { x: u, y: k };
611
- }), M = Math.ceil(b / 100) * 100, I = m, S = w.map((u, f) => {
612
- const A = 1 - f / w.length * 0.5, k = Dt(vt, A);
608
+ ), M = h.map((u, f) => {
609
+ const A = f / (h.length - 1), N = b * (1 - A);
610
+ return { x: u, y: N };
611
+ }), k = Math.ceil(b / 100) * 100, I = h, v = w.map((u, f) => {
612
+ const A = 1 - f / w.length * 0.5, N = St(Dt, A);
613
613
  return {
614
614
  id: `debt-${f}`,
615
615
  guid: u.guid,
616
616
  label: u.name,
617
617
  data: u.dataset.map((L) => L.y),
618
- color: k,
618
+ color: N,
619
619
  curve: "linear",
620
620
  type: "line",
621
621
  area: !0,
@@ -623,10 +623,10 @@ const Ae = ({
623
623
  showMark: !1
624
624
  };
625
625
  });
626
- S.push({
626
+ v.push({
627
627
  id: "payoff-line",
628
628
  label: "Payoff Line",
629
- data: B.map((u) => u.y),
629
+ data: M.map((u) => u.y),
630
630
  color: d.palette.grey[700],
631
631
  curve: "linear",
632
632
  type: "line",
@@ -634,7 +634,7 @@ const Ae = ({
634
634
  showMark: !1,
635
635
  disableHighlight: !0
636
636
  });
637
- const T = (u) => S.findIndex((f) => f?.guid === u);
637
+ const T = (u) => v.findIndex((f) => f?.guid === u);
638
638
  return /* @__PURE__ */ e(
639
639
  le,
640
640
  {
@@ -655,19 +655,19 @@ const Ae = ({
655
655
  {
656
656
  axisHighlight: { x: "none" },
657
657
  disableLineItemHighlight: !0,
658
- height: o,
658
+ height: n,
659
659
  hideLegend: !0,
660
660
  margin: { bottom: 24, left: 32, right: 72, top: 48 },
661
661
  onAreaClick: (u, f) => {
662
662
  i?.();
663
- const A = S.find((k) => k.id === f.seriesId);
664
- p(D.DEBTS_CLICK_CHART_AREA, { account_guid: A?.guid });
663
+ const A = v.find((N) => N.id === f.seriesId);
664
+ p(S.DEBTS_CLICK_CHART_AREA, { account_guid: A?.guid });
665
665
  },
666
666
  onHighlightChange: (u) => {
667
- const f = S.find((A) => A.id === u?.seriesId)?.guid;
667
+ const f = v.find((A) => A.id === u?.seriesId)?.guid;
668
668
  c?.(f ?? "");
669
669
  },
670
- series: S,
670
+ series: v,
671
671
  skipAnimation: !0,
672
672
  slotProps: { tooltip: { trigger: "none" } },
673
673
  sx: {
@@ -687,23 +687,23 @@ const Ae = ({
687
687
  strokeDasharray: "10 5",
688
688
  strokeWidth: 1
689
689
  },
690
- [`& .MuiLineElement-series-debt-${T(n ?? "0")}`]: {
690
+ [`& .MuiLineElement-series-debt-${T(a ?? "0")}`]: {
691
691
  opacity: 1
692
692
  },
693
- [`& .MuiAreaElement-series-debt-${T(n ?? "0")}`]: {
693
+ [`& .MuiAreaElement-series-debt-${T(a ?? "0")}`]: {
694
694
  opacity: 1
695
695
  },
696
696
  "& .MuiChartsAxis-tickLabel > tspan": {
697
- fontFamily: d.typography.Small.fontFamily
697
+ fontFamily: d.typography.body2.fontFamily
698
698
  },
699
- ...a
699
+ ...o
700
700
  },
701
701
  width: r,
702
702
  xAxis: [
703
703
  {
704
704
  data: I,
705
705
  disableTicks: !0,
706
- min: m[0],
706
+ min: h[0],
707
707
  scaleType: "time",
708
708
  tickLabelMinGap: 24,
709
709
  valueFormatter: (u) => Q(u, ee.MONTH_SHORT_YEAR)
@@ -712,9 +712,9 @@ const Ae = ({
712
712
  yAxis: [
713
713
  {
714
714
  min: 0,
715
- max: M,
715
+ max: k,
716
716
  disableTicks: !0,
717
- valueFormatter: (u) => N(u, "0a")
717
+ valueFormatter: (u) => R(u, "0a")
718
718
  }
719
719
  ]
720
720
  }
@@ -722,10 +722,10 @@ const Ae = ({
722
722
  }
723
723
  );
724
724
  }, Tt = () => {
725
- const a = Y(), { debts: o } = C(), { selectedDebtChartData: r } = F();
725
+ const o = V(), { debts: n } = C(), { selectedDebtChartData: r } = F();
726
726
  return /* @__PURE__ */ s($, { children: [
727
727
  /* @__PURE__ */ s(
728
- Ke,
728
+ Ue,
729
729
  {
730
730
  sx: {
731
731
  "& .MuiCardContent-root:last-child": {
@@ -733,70 +733,70 @@ const Ae = ({
733
733
  }
734
734
  },
735
735
  children: [
736
- /* @__PURE__ */ e(qe, { sx: { pb: 0 }, title: /* @__PURE__ */ e(Fe, { sx: { pb: 4 }, children: o.details_chart_title }) }),
737
- /* @__PURE__ */ e(Ue, { sx: { p: 0 }, children: /* @__PURE__ */ e(Ae, { debts: [r], height: 250 }) })
736
+ /* @__PURE__ */ e(Xe, { sx: { pb: 0 }, title: /* @__PURE__ */ e(Fe, { sx: { pb: 4 }, children: n.details_chart_title }) }),
737
+ /* @__PURE__ */ e(qe, { sx: { p: 0 }, children: /* @__PURE__ */ e(Ae, { debts: [r], height: 250 }) })
738
738
  ]
739
739
  }
740
740
  ),
741
741
  /* @__PURE__ */ e(
742
742
  l,
743
743
  {
744
- color: a.palette.text.secondary,
744
+ color: o.palette.text.secondary,
745
745
  sx: { whiteSpace: "normal", textAlign: "center", px: 8, py: 12 },
746
- variant: "Small",
747
- children: o.details_chart_description
746
+ variant: "body2",
747
+ children: n.details_chart_description
748
748
  }
749
749
  )
750
750
  ] });
751
- }, At = v(Tt), Et = () => {
752
- const a = Y(), { onEvent: o } = R(), { debts: r } = C(), { selectedDebtChartData: t, showCompleted: n, showError: i } = F();
753
- return g.useEffect(() => o(D.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(Se, { children: i || n ? /* @__PURE__ */ e(
751
+ }, At = D(Tt), Et = () => {
752
+ const o = V(), { onEvent: n } = B(), { debts: r } = C(), { selectedDebtChartData: t, showCompleted: a, showError: i } = F();
753
+ return x.useEffect(() => n(S.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(ve, { children: i || a ? /* @__PURE__ */ e(
754
754
  l,
755
755
  {
756
- color: a.palette.secondary.main,
756
+ color: o.palette.secondary.main,
757
757
  component: "div",
758
758
  sx: { p: 32, textAlign: "center", whiteSpace: "normal" },
759
- variant: "Small",
759
+ variant: "body2",
760
760
  children: i ? r.schedule_error_message : r.schedule_complete_message
761
761
  }
762
762
  ) : /* @__PURE__ */ s($, { children: [
763
- /* @__PURE__ */ s(x, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
764
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: r.schedule_month_heading }),
765
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: r.schedule_amount_heading })
763
+ /* @__PURE__ */ s(g, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
764
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.schedule_month_heading }),
765
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.schedule_amount_heading })
766
766
  ] }),
767
- t.dataset.slice(1).map(({ x: c, y: d, payment: p }) => /* @__PURE__ */ e(x, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(x, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
768
- x,
767
+ t.dataset.slice(1).map(({ x: c, y: d, payment: p }) => /* @__PURE__ */ e(g, { bgcolor: o.palette.background.paper, children: /* @__PURE__ */ e(g, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
768
+ g,
769
769
  {
770
770
  sx: {
771
- borderBottom: `1px solid ${a.palette.border.light}`,
771
+ borderBottom: `1px solid ${o.palette.border.light}`,
772
772
  flexDirection: "row",
773
773
  flexGrow: 1,
774
774
  py: 14,
775
775
  pr: 24
776
776
  },
777
777
  children: [
778
- /* @__PURE__ */ s(x, { flexGrow: 1, children: [
779
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: Q(c, ee.MONTH_YEAR) }),
780
- /* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: r.schedule_month_label })
778
+ /* @__PURE__ */ s(g, { flexGrow: 1, children: [
779
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: Q(c, ee.MONTH_YEAR) }),
780
+ /* @__PURE__ */ e(l, { color: o.palette.secondary.main, variant: "caption", children: r.schedule_month_label })
781
781
  ] }),
782
- /* @__PURE__ */ s(x, { children: [
783
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: N(d, "0,0.00") }),
782
+ /* @__PURE__ */ s(g, { children: [
783
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: R(d, "0,0.00") }),
784
784
  /* @__PURE__ */ e(
785
785
  l,
786
786
  {
787
787
  bold: !0,
788
- color: a.palette.success.main,
788
+ color: o.palette.success.main,
789
789
  textAlign: "end",
790
- variant: "Tiny",
791
- children: `+${N(p, "0,0")}`
790
+ variant: "tiny",
791
+ children: `+${R(p, "0,0")}`
792
792
  }
793
793
  )
794
794
  ] })
795
795
  ]
796
796
  }
797
797
  ) }) }, String(c))),
798
- /* @__PURE__ */ e(x, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
799
- x,
798
+ /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
799
+ g,
800
800
  {
801
801
  sx: {
802
802
  alignItems: "center",
@@ -806,135 +806,135 @@ const Ae = ({
806
806
  px: 24
807
807
  },
808
808
  children: [
809
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: r.schedule_payoff_label }),
810
- /* @__PURE__ */ e(l, { variant: "Body", children: "-" })
809
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: r.schedule_payoff_label }),
810
+ /* @__PURE__ */ e(l, { variant: "body1", children: "-" })
811
811
  ]
812
812
  }
813
813
  ) })
814
814
  ] }) });
815
- }, It = v(Et), Bt = v(({ debt: a }) => {
816
- const { debts: o } = C(), { updateAccount: r } = re(), { onEvent: t } = R(), [n, i] = g.useState(a.interest_rate ?? 0), c = n < 0, d = async () => {
817
- await r({ ...a.account, interest_rate: n }), a.interest_rate = n, t(D.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
815
+ }, It = D(Et), Mt = D(({ debt: o }) => {
816
+ const { debts: n } = C(), { updateAccount: r } = re(), { onEvent: t } = B(), [a, i] = x.useState(o.interest_rate ?? 0), c = a < 0, d = async () => {
817
+ await r({ ...o.account, interest_rate: a }), o.interest_rate = a, t(S.DEBTS_SAVE_RATE_ACTION, { account_guid: o.guid });
818
818
  }, p = () => {
819
819
  setTimeout(() => {
820
- i(a.interest_rate ?? 0);
820
+ i(o.interest_rate ?? 0);
821
821
  }, 250);
822
822
  };
823
823
  return /* @__PURE__ */ e(
824
- ae,
824
+ oe,
825
825
  {
826
826
  isSaveDisabled: c,
827
- label: `${o.details_interest_rate} (%)`,
827
+ label: `${n.details_interest_rate} (%)`,
828
828
  onCancel: p,
829
829
  onSave: d,
830
- primaryText: o.details_interest_rate,
831
- secondaryText: Ge(Number(a.interest_rate) / 100),
832
- zeroStateText: a.interest_rate ? void 0 : o.add_interest_rate,
830
+ primaryText: n.details_interest_rate,
831
+ secondaryText: Ge(Number(o.interest_rate) / 100),
832
+ zeroStateText: o.interest_rate ? void 0 : n.add_interest_rate,
833
833
  children: /* @__PURE__ */ e(
834
- at,
834
+ ot,
835
835
  {
836
836
  error: c,
837
837
  fullWidth: !0,
838
- onChange: (h) => i(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
838
+ onChange: (m) => i(isNaN(parseFloat(m.target.value)) ? 0 : parseFloat(m.target.value)),
839
839
  type: "number",
840
- value: n
840
+ value: a
841
841
  }
842
842
  )
843
843
  }
844
844
  );
845
- }), Mt = v(({ debt: a }) => {
846
- const { debts: o } = C(), { updateAccount: r } = re(), { onEvent: t } = R(), [n, i] = g.useState(a.monthly_payment ?? 0), c = n < 0 || n > 9999999999e-2, d = async () => {
847
- await r({ ...a.account, minimum_payment: n }), a.monthly_payment = n, t(D.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
845
+ }), kt = D(({ debt: o }) => {
846
+ const { debts: n } = C(), { updateAccount: r } = re(), { onEvent: t } = B(), [a, i] = x.useState(o.monthly_payment ?? 0), c = a < 0 || a > 9999999999e-2, d = async () => {
847
+ await r({ ...o.account, minimum_payment: a }), o.monthly_payment = a, t(S.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: o.guid });
848
848
  }, p = () => {
849
849
  setTimeout(() => {
850
- i(a.monthly_payment ?? 0);
850
+ i(o.monthly_payment ?? 0);
851
851
  }, 250);
852
852
  };
853
853
  return /* @__PURE__ */ e(
854
- ae,
854
+ oe,
855
855
  {
856
856
  isSaveDisabled: c,
857
- label: o.details_monthly_payment,
857
+ label: n.details_monthly_payment,
858
858
  onCancel: p,
859
859
  onSave: d,
860
- primaryText: o.details_monthly_payment,
861
- secondaryText: N(a.monthly_payment, "0,0"),
862
- zeroStateText: a.monthly_payment ? void 0 : o.add_monthly_payment,
860
+ primaryText: n.details_monthly_payment,
861
+ secondaryText: R(o.monthly_payment, "0,0"),
862
+ zeroStateText: o.monthly_payment ? void 0 : n.add_monthly_payment,
863
863
  children: /* @__PURE__ */ e(
864
864
  se,
865
865
  {
866
- amount: n,
866
+ amount: a,
867
867
  autoFocus: !0,
868
868
  error: c,
869
869
  fullWidth: !0,
870
870
  minAmount: 0,
871
- setAmount: (h) => i(isNaN(Number(h)) ? n : Number(h)),
872
- sx: { ".MuiTypography-Body": { p: 0 } }
871
+ setAmount: (m) => i(isNaN(Number(m)) ? a : Number(m)),
872
+ sx: { ".MuiTypography-body1": { p: 0 } }
873
873
  }
874
874
  )
875
875
  }
876
876
  );
877
- }), kt = v(({ debt: a }) => {
878
- const { debts: o } = C(), { updateAccount: r } = re(), { onEvent: t } = R(), [n, i] = g.useState(a.original_balance ?? 0), c = n < 0 || n > 9999999999e-2, d = async () => {
879
- await r({ ...a.account, original_balance: n }), a.original_balance = n, t(D.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
877
+ }), Nt = D(({ debt: o }) => {
878
+ const { debts: n } = C(), { updateAccount: r } = re(), { onEvent: t } = B(), [a, i] = x.useState(o.original_balance ?? 0), c = a < 0 || a > 9999999999e-2, d = async () => {
879
+ await r({ ...o.account, original_balance: a }), o.original_balance = a, t(S.DEBTS_SAVE_BALANCE_ACTION, { account_guid: o.guid });
880
880
  }, p = () => {
881
881
  setTimeout(() => {
882
- i(a.original_balance ?? 0);
882
+ i(o.original_balance ?? 0);
883
883
  }, 250);
884
884
  };
885
885
  return /* @__PURE__ */ e(
886
- ae,
886
+ oe,
887
887
  {
888
888
  isSaveDisabled: c,
889
- label: o.details_original_balance,
889
+ label: n.details_original_balance,
890
890
  onCancel: p,
891
891
  onSave: d,
892
- primaryText: o.details_original_balance,
893
- secondaryText: N(a.original_balance, "0,0"),
894
- zeroStateText: a.original_balance ? void 0 : o.add_original_balance,
892
+ primaryText: n.details_original_balance,
893
+ secondaryText: R(o.original_balance, "0,0"),
894
+ zeroStateText: o.original_balance ? void 0 : n.add_original_balance,
895
895
  children: /* @__PURE__ */ e(
896
896
  se,
897
897
  {
898
- amount: n,
898
+ amount: a,
899
899
  autoFocus: !0,
900
900
  error: c,
901
901
  fullWidth: !0,
902
902
  minAmount: 0,
903
- setAmount: (h) => i(isNaN(Number(h)) ? n : Number(h)),
904
- sx: { ".MuiTypography-Body": { p: 0 } }
903
+ setAmount: (m) => i(isNaN(Number(m)) ? a : Number(m)),
904
+ sx: { ".MuiTypography-body1": { p: 0 } }
905
905
  }
906
906
  )
907
907
  }
908
908
  );
909
909
  }), Pt = () => {
910
- const { onEvent: a } = R(), { selectedDebtChartData: o } = F();
911
- return g.useEffect(() => a(D.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(x, { bgcolor: "background.paper", children: [
912
- o?.goal && /* @__PURE__ */ s($, { children: [
913
- /* @__PURE__ */ e(et, { goal: o.goal }),
910
+ const { onEvent: o } = B(), { selectedDebtChartData: n } = F();
911
+ return x.useEffect(() => o(S.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(g, { bgcolor: "background.paper", children: [
912
+ n?.goal && /* @__PURE__ */ s($, { children: [
913
+ /* @__PURE__ */ e(et, { goal: n.goal }),
914
914
  /* @__PURE__ */ e(G, {}),
915
- /* @__PURE__ */ e(tt, { goal: o.goal }),
915
+ /* @__PURE__ */ e(tt, { goal: n.goal }),
916
916
  /* @__PURE__ */ e(G, {}),
917
- /* @__PURE__ */ e(rt, { goal: o.goal }),
917
+ /* @__PURE__ */ e(rt, { goal: n.goal }),
918
918
  /* @__PURE__ */ e(G, {})
919
919
  ] }),
920
- !o?.goal && o?.account && /* @__PURE__ */ s($, { children: [
921
- /* @__PURE__ */ e(Mt, { debt: o }),
920
+ !n?.goal && n?.account && /* @__PURE__ */ s($, { children: [
921
+ /* @__PURE__ */ e(kt, { debt: n }),
922
922
  /* @__PURE__ */ e(G, {}),
923
- /* @__PURE__ */ e(Bt, { debt: o }),
923
+ /* @__PURE__ */ e(Mt, { debt: n }),
924
924
  /* @__PURE__ */ e(G, {}),
925
- /* @__PURE__ */ e(kt, { debt: o }),
925
+ /* @__PURE__ */ e(Nt, { debt: n }),
926
926
  /* @__PURE__ */ e(G, {})
927
927
  ] })
928
928
  ] });
929
- }, Nt = v(Pt), Rt = ({ setTabValue: a, sx: o }) => {
930
- const { debts: r } = C(), { showError: t, showCompleted: n } = F();
931
- return g.useEffect(() => {
932
- t && a(1);
933
- }, [t]), !t && !n ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ s(x, { gap: 16, children: [
934
- /* @__PURE__ */ e(ge, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
929
+ }, Rt = D(Pt), Bt = ({ setTabValue: o, sx: n }) => {
930
+ const { debts: r } = C(), { showError: t, showCompleted: a } = F();
931
+ return x.useEffect(() => {
932
+ t && o(1);
933
+ }, [t]), !t && !a ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ s(g, { gap: 16, children: [
934
+ /* @__PURE__ */ e(xe, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ s(
935
935
  ye,
936
936
  {
937
- icon: t ? /* @__PURE__ */ e(ot, { filled: !0 }) : /* @__PURE__ */ e(ve, { color: "success", filled: !0 }),
937
+ icon: t ? /* @__PURE__ */ e(nt, { filled: !0 }) : /* @__PURE__ */ e(De, { color: "success", filled: !0 }),
938
938
  severity: "error",
939
939
  sx: {
940
940
  alignItems: "start",
@@ -947,12 +947,12 @@ const Ae = ({
947
947
  }
948
948
  },
949
949
  children: [
950
- /* @__PURE__ */ e(fe, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: t ? r.status_error_title : r.status_complete_title }),
951
- /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: t ? r.status_error_description : r.status_complete_description })
950
+ /* @__PURE__ */ e(fe, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: t ? r.status_error_title : r.status_complete_title }),
951
+ /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: t ? r.status_error_description : r.status_complete_description })
952
952
  ]
953
953
  }
954
954
  ) }),
955
- t && /* @__PURE__ */ e(ge, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
955
+ t && /* @__PURE__ */ e(xe, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ s(
956
956
  ye,
957
957
  {
958
958
  icon: /* @__PURE__ */ e($, {}),
@@ -965,22 +965,22 @@ const Ae = ({
965
965
  }
966
966
  },
967
967
  children: [
968
- /* @__PURE__ */ e(fe, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r.status_info_title }),
969
- /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r.status_info_description })
968
+ /* @__PURE__ */ e(fe, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: r.status_info_title }),
969
+ /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: r.status_info_description })
970
970
  ]
971
971
  }
972
972
  ) })
973
973
  ] });
974
- }, Ft = v(Rt), Lt = () => {
975
- const { debts: a } = C(), { showError: o, showCompleted: r } = F(), [t, n] = g.useState(0);
974
+ }, Ft = D(Bt), Lt = () => {
975
+ const { debts: o } = C(), { showError: n, showCompleted: r } = F(), [t, a] = x.useState(0);
976
976
  return /* @__PURE__ */ s($, { children: [
977
- (o || r) && /* @__PURE__ */ e(Ft, { setTabValue: n, sx: { mt: -24 } }),
977
+ (n || r) && /* @__PURE__ */ e(Ft, { setTabValue: a, sx: { mt: -24 } }),
978
978
  /* @__PURE__ */ s(
979
979
  Qe,
980
980
  {
981
- "aria-label": a.details_tabs_aria_label,
981
+ "aria-label": o.details_tabs_aria_label,
982
982
  centered: !0,
983
- onChange: (i, c) => n(c),
983
+ onChange: (i, c) => a(c),
984
984
  textColor: "primary",
985
985
  value: t,
986
986
  variant: "fullWidth",
@@ -990,7 +990,7 @@ const Ae = ({
990
990
  {
991
991
  "aria-controls": "debt-schedule-tabpanel-0",
992
992
  id: "debt-schedule-tab-0",
993
- label: a.schedule_tab_label
993
+ label: o.schedule_tab_label
994
994
  }
995
995
  ),
996
996
  /* @__PURE__ */ e(
@@ -998,116 +998,116 @@ const Ae = ({
998
998
  {
999
999
  "aria-controls": "debt-details-tabpanel-1",
1000
1000
  id: "debt-details-tab-1",
1001
- label: a.details_tab_label
1001
+ label: o.details_tab_label
1002
1002
  }
1003
1003
  )
1004
1004
  ]
1005
1005
  }
1006
1006
  ),
1007
- /* @__PURE__ */ e(xe, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(It, {}) }),
1008
- /* @__PURE__ */ e(xe, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(Nt, {}) })
1007
+ /* @__PURE__ */ e(ge, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(It, {}) }),
1008
+ /* @__PURE__ */ e(ge, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(Rt, {}) })
1009
1009
  ] });
1010
- }, $t = v(Lt), Ht = ({ isOpen: a, onClose: o }) => {
1011
- const { debts: r } = C(), { showError: t, showCompleted: n } = F(), i = t || n ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(At, {});
1010
+ }, $t = D(Lt), Ot = ({ isOpen: o, onClose: n }) => {
1011
+ const { debts: r } = C(), { showError: t, showCompleted: a } = F(), i = t || a ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(At, {});
1012
1012
  return /* @__PURE__ */ e(
1013
1013
  ie,
1014
1014
  {
1015
1015
  ariaLabelClose: r.details_close_aria,
1016
- isOpen: a,
1017
- onClose: o,
1016
+ isOpen: o,
1017
+ onClose: n,
1018
1018
  title: r.details_title,
1019
- children: /* @__PURE__ */ s(x, { bgcolor: "background.default", children: [
1020
- /* @__PURE__ */ e(Ye, { customDetailsChart: i }),
1019
+ children: /* @__PURE__ */ s(g, { bgcolor: "background.default", children: [
1020
+ /* @__PURE__ */ e(Ve, { customDetailsChart: i }),
1021
1021
  /* @__PURE__ */ e($t, {})
1022
1022
  ] })
1023
1023
  }
1024
1024
  );
1025
- }, Ot = v(() => {
1026
- const { debts: a } = C(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: r } = V(), { onEvent: t } = R(), [n, i] = g.useState(o?.extra_payment ?? 0), c = n < 0 || n > 9999999999e-2, d = async () => {
1027
- o && (await r({ ...o, extra_payment: n }), o.extra_payment = n, t(D.DEBTS_SAVE_PAYDOWN_ACTION, {
1028
- user_guid: o?.user_guid
1025
+ }, Ht = D(() => {
1026
+ const { debts: o } = C(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: r } = K(), { onEvent: t } = B(), [a, i] = x.useState(n?.extra_payment ?? 0), c = a < 0 || a > 9999999999e-2, d = async () => {
1027
+ n && (await r({ ...n, extra_payment: a }), n.extra_payment = a, t(S.DEBTS_SAVE_PAYDOWN_ACTION, {
1028
+ user_guid: n?.user_guid
1029
1029
  }));
1030
1030
  }, p = () => {
1031
1031
  setTimeout(() => {
1032
- i(o?.extra_payment ?? 0);
1032
+ i(n?.extra_payment ?? 0);
1033
1033
  }, 250);
1034
1034
  };
1035
1035
  return /* @__PURE__ */ e(
1036
- ae,
1036
+ oe,
1037
1037
  {
1038
1038
  isSaveDisabled: c,
1039
- label: a.paydown_drawer_extra_payment,
1039
+ label: o.paydown_drawer_extra_payment,
1040
1040
  onCancel: p,
1041
1041
  onSave: d,
1042
- primaryText: a.paydown_drawer_extra_payment,
1043
- secondaryText: N(o?.extra_payment, "0,0"),
1044
- zeroStateText: o?.extra_payment ? void 0 : a.add_extra_payment,
1042
+ primaryText: o.paydown_drawer_extra_payment,
1043
+ secondaryText: R(n?.extra_payment, "0,0"),
1044
+ zeroStateText: n?.extra_payment ? void 0 : o.add_extra_payment,
1045
1045
  children: /* @__PURE__ */ e(
1046
1046
  se,
1047
1047
  {
1048
- amount: n,
1048
+ amount: a,
1049
1049
  autoFocus: !0,
1050
1050
  error: c,
1051
1051
  fullWidth: !0,
1052
1052
  minAmount: 0,
1053
- setAmount: (h) => i(isNaN(Number(h)) ? n : Number(h)),
1054
- sx: { ".MuiTypography-Body": { p: 0 } }
1053
+ setAmount: (m) => i(isNaN(Number(m)) ? a : Number(m)),
1054
+ sx: { ".MuiTypography-body1": { p: 0 } }
1055
1055
  }
1056
1056
  )
1057
1057
  }
1058
1058
  );
1059
1059
  }), Wt = () => {
1060
- const { debts: a } = C(), { totalMonthlyPayments: o } = te(), { monthlyCashFlowProfile: r } = V(), t = o + Number(r?.extra_payment);
1061
- return /* @__PURE__ */ s(x, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1062
- /* @__PURE__ */ s(x, { p: 24, children: [
1063
- /* @__PURE__ */ s(x, { alignItems: "center", gap: 4, mb: 24, children: [
1064
- /* @__PURE__ */ e(l, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
1065
- /* @__PURE__ */ e(Ce, { bold: !0, variant: "H1", children: N(o, "0,0") }),
1066
- /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
1060
+ const { debts: o } = C(), { totalMonthlyPayments: n } = te(), { monthlyCashFlowProfile: r } = K(), t = n + Number(r?.extra_payment);
1061
+ return /* @__PURE__ */ s(g, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1062
+ /* @__PURE__ */ s(g, { p: 24, children: [
1063
+ /* @__PURE__ */ s(g, { alignItems: "center", gap: 4, mb: 24, children: [
1064
+ /* @__PURE__ */ e(l, { variant: "body1", children: o.paydown_drawer_mimimum_label }),
1065
+ /* @__PURE__ */ e(Ce, { bold: !0, variant: "h1", children: R(n, "0,0") }),
1066
+ /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "body2", width: 208, children: o.paydown_drawer_minimum_info })
1067
1067
  ] }),
1068
- /* @__PURE__ */ s(x, { children: [
1069
- /* @__PURE__ */ e(l, { variant: "H3", children: a.paydown_drawer_subtitle }),
1070
- /* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
1068
+ /* @__PURE__ */ s(g, { children: [
1069
+ /* @__PURE__ */ e(l, { variant: "h3", children: o.paydown_drawer_subtitle }),
1070
+ /* @__PURE__ */ e(l, { truncate: !1, variant: "subtitle2", children: o.paydown_drawer_description })
1071
1071
  ] })
1072
1072
  ] }),
1073
- /* @__PURE__ */ e(x, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Ot, {}) }),
1074
- /* @__PURE__ */ e(x, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(x, { gap: 4, children: [
1075
- /* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
1076
- /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: N(t, "0,0") })
1073
+ /* @__PURE__ */ e(g, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Ht, {}) }),
1074
+ /* @__PURE__ */ e(g, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(g, { gap: 4, children: [
1075
+ /* @__PURE__ */ e(l, { variant: "body2", children: o.paydown_drawer_total_payment }),
1076
+ /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "body1", children: R(t, "0,0") })
1077
1077
  ] }) })
1078
1078
  ] });
1079
- }, Gt = v(Wt), jt = ({ isOpen: a, onClose: o }) => {
1079
+ }, Gt = D(Wt), jt = ({ isOpen: o, onClose: n }) => {
1080
1080
  const { debts: r } = C();
1081
1081
  return /* @__PURE__ */ e(
1082
1082
  ie,
1083
1083
  {
1084
1084
  ariaLabelClose: r.paydown_drawer_close_aria,
1085
- isOpen: a,
1086
- onClose: o,
1085
+ isOpen: o,
1086
+ onClose: n,
1087
1087
  title: r.paydown_drawer_title,
1088
1088
  children: /* @__PURE__ */ e(Gt, {})
1089
1089
  }
1090
1090
  );
1091
1091
  };
1092
- function zt(a, o) {
1092
+ function zt(o, n) {
1093
1093
  const r = (t) => {
1094
1094
  if (typeof t == "number") return t;
1095
1095
  if (t === "!" || t === "✓") return 1 / 0;
1096
1096
  throw new Error("Unsupported value");
1097
1097
  };
1098
- return r(a) - r(o);
1098
+ return r(o) - r(n);
1099
1099
  }
1100
- function Xt(a) {
1101
- return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
1100
+ function Yt(o) {
1101
+ return o.is_paid_off ? "✓" : o.priority === void 0 || o.is_impossible ? "!" : o.priority;
1102
1102
  }
1103
- const Yt = (a) => {
1104
- const o = {
1103
+ const Vt = (o) => {
1104
+ const n = {
1105
1105
  text: "#121417",
1106
1106
  background: "#FFB252"
1107
1107
  };
1108
- return a === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), a === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
1109
- }, Vt = (a) => {
1110
- const o = String(a.formattedValue), r = Yt(o);
1108
+ return o === "!" && (n.text = "#FFFFFF", n.background = "#DF320C"), o === "✓" && (n.text = "#FFFFFF", n.background = "#09A57F"), n;
1109
+ }, Kt = (o) => {
1110
+ const n = String(o.formattedValue), r = Vt(n);
1111
1111
  return /* @__PURE__ */ e(
1112
1112
  le,
1113
1113
  {
@@ -1122,39 +1122,39 @@ const Yt = (a) => {
1122
1122
  backgroundColor: r.background,
1123
1123
  marginLeft: "10px"
1124
1124
  },
1125
- children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "Small", children: o })
1125
+ children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "body2", children: n })
1126
1126
  }
1127
1127
  );
1128
- }, Kt = (a) => {
1129
- const o = a.row.account, r = it[o.account_type];
1130
- return /* @__PURE__ */ s(x, { alignItems: "center", flexDirection: "row", children: [
1128
+ }, Ut = (o) => {
1129
+ const n = o.row.account, r = it[n.account_type];
1130
+ return /* @__PURE__ */ s(g, { alignItems: "center", flexDirection: "row", children: [
1131
1131
  /* @__PURE__ */ e(
1132
1132
  Le,
1133
1133
  {
1134
- alt: `${o.institutionName}`,
1135
- institutionGuid: o.institution_guid || ""
1134
+ alt: `${n.institutionName}`,
1135
+ institutionGuid: n.institution_guid || ""
1136
1136
  }
1137
1137
  ),
1138
- /* @__PURE__ */ s(x, { ml: 12, children: [
1139
- /* @__PURE__ */ e(l, { variant: "Small", children: o.name }),
1140
- /* @__PURE__ */ e(l, { variant: "XSmall", children: r })
1138
+ /* @__PURE__ */ s(g, { ml: 12, children: [
1139
+ /* @__PURE__ */ e(l, { variant: "body2", children: n.name }),
1140
+ /* @__PURE__ */ e(l, { variant: "caption", children: r })
1141
1141
  ] })
1142
1142
  ] });
1143
- }, Ut = ({
1144
- sx: a = {},
1145
- debts: o,
1143
+ }, qt = ({
1144
+ sx: o = {},
1145
+ debts: n,
1146
1146
  hoveredDebtGuid: r,
1147
1147
  onHoverRow: t,
1148
- onClickRow: n
1148
+ onClickRow: a
1149
1149
  }) => {
1150
- const i = Y(), { onEvent: c } = R(), { isMobile: d } = K(), { debts: p, common: h } = C(), [m, w] = g.useState([
1150
+ const i = V(), { onEvent: c } = B(), { isMobile: d } = U(), { debts: p, common: m } = C(), [h, w] = x.useState([
1151
1151
  { field: "priority", sort: "asc" }
1152
1152
  ]), b = [
1153
1153
  {
1154
1154
  field: "priority",
1155
1155
  headerName: p.table_column_priority,
1156
1156
  renderHeader: j,
1157
- renderCell: Vt,
1157
+ renderCell: Kt,
1158
1158
  sortComparator: zt,
1159
1159
  sortable: !0,
1160
1160
  hideSortIcons: !0,
@@ -1168,7 +1168,7 @@ const Yt = (a) => {
1168
1168
  field: "account",
1169
1169
  headerName: p.table_column_account,
1170
1170
  renderHeader: j,
1171
- renderCell: Kt,
1171
+ renderCell: Ut,
1172
1172
  sortable: !1,
1173
1173
  type: "custom",
1174
1174
  align: "left",
@@ -1180,7 +1180,7 @@ const Yt = (a) => {
1180
1180
  field: "balance",
1181
1181
  headerName: p.table_column_balance,
1182
1182
  renderHeader: j,
1183
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: N(y.value, "0,0") }),
1183
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: R(y.value, "0,0") }),
1184
1184
  sortable: !0,
1185
1185
  hideSortIcons: d,
1186
1186
  type: "number",
@@ -1193,7 +1193,7 @@ const Yt = (a) => {
1193
1193
  field: "interest_rate",
1194
1194
  headerName: p.table_column_interest_rate,
1195
1195
  renderHeader: j,
1196
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
1196
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
1197
1197
  sortable: !0,
1198
1198
  hideSortIcons: d,
1199
1199
  type: "number",
@@ -1206,7 +1206,7 @@ const Yt = (a) => {
1206
1206
  field: "projected_payoff_date",
1207
1207
  headerName: p.table_column_payoff_date,
1208
1208
  renderHeader: j,
1209
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: y.value ? Q(y.value, ee.MONTH_SHORT_YEAR) : "---" }),
1209
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: y.value ? Q(y.value, ee.MONTH_SHORT_YEAR) : "---" }),
1210
1210
  sortable: !0,
1211
1211
  hideSortIcons: d,
1212
1212
  type: "number",
@@ -1219,7 +1219,7 @@ const Yt = (a) => {
1219
1219
  field: "monthly_payment",
1220
1220
  headerName: p.table_column_amount_due,
1221
1221
  renderHeader: j,
1222
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: typeof y.value == "number" ? N(y.value, "0,0") : "---" }),
1222
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: typeof y.value == "number" ? R(y.value, "0,0") : "---" }),
1223
1223
  sortable: !0,
1224
1224
  hideSortIcons: d,
1225
1225
  type: "number",
@@ -1228,13 +1228,13 @@ const Yt = (a) => {
1228
1228
  minWidth: 122,
1229
1229
  flex: 0.6
1230
1230
  }
1231
- ], B = [
1231
+ ], M = [
1232
1232
  ...b.slice(0, 3),
1233
1233
  {
1234
1234
  field: "chevron",
1235
1235
  headerClassName: "chevron-header",
1236
1236
  headerName: "",
1237
- renderCell: () => /* @__PURE__ */ e(_, { "aria-label": h.see_details, role: "button", children: /* @__PURE__ */ e(ne, { name: "chevron_right" }) }),
1237
+ renderCell: () => /* @__PURE__ */ e(_, { "aria-label": m.see_details, role: "button", children: /* @__PURE__ */ e(ae, { name: "chevron_right" }) }),
1238
1238
  sortable: !1,
1239
1239
  hideSortIcons: !0,
1240
1240
  type: "custom",
@@ -1242,18 +1242,18 @@ const Yt = (a) => {
1242
1242
  headerAlign: "right",
1243
1243
  width: 20
1244
1244
  }
1245
- ], M = g.useMemo(() => o.map((y, u) => ({
1245
+ ], k = x.useMemo(() => n.map((y, u) => ({
1246
1246
  ...y,
1247
1247
  id: u,
1248
- priority: Xt(y)
1249
- })), [o]), I = (y) => {
1250
- const A = y.target.closest("[data-id]")?.getAttribute("data-id"), k = o[Number(A)];
1251
- t?.(k?.guid ?? "");
1252
- }, S = (y) => {
1248
+ priority: Yt(y)
1249
+ })), [n]), I = (y) => {
1250
+ const A = y.target.closest("[data-id]")?.getAttribute("data-id"), N = n[Number(A)];
1251
+ t?.(N?.guid ?? "");
1252
+ }, v = (y) => {
1253
1253
  d || I(y);
1254
1254
  }, T = (y) => {
1255
1255
  d && I(y);
1256
- }, H = (y) => M.find((u) => u.guid === y)?.id;
1256
+ }, O = (y) => k.find((u) => u.guid === y)?.id;
1257
1257
  return /* @__PURE__ */ e(
1258
1258
  le,
1259
1259
  {
@@ -1264,37 +1264,37 @@ const Yt = (a) => {
1264
1264
  overflowX: "auto",
1265
1265
  overflowY: "visible",
1266
1266
  boxShadow: "none",
1267
- ...a
1267
+ ...o
1268
1268
  },
1269
1269
  children: /* @__PURE__ */ e(
1270
- nt,
1270
+ at,
1271
1271
  {
1272
- columns: d ? B : b,
1272
+ columns: d ? M : b,
1273
1273
  disableColumnFilter: !0,
1274
1274
  disableColumnMenu: !0,
1275
1275
  hideFooter: !0,
1276
- initialState: { sorting: { sortModel: m } },
1276
+ initialState: { sorting: { sortModel: h } },
1277
1277
  onRowClick: (y) => {
1278
- n(), c(D.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
1278
+ a(), c(S.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
1279
1279
  },
1280
1280
  onSortModelChange: (y) => {
1281
- w(y), c(D.DEBTS_CLICK_TABLE_SORT);
1281
+ w(y), c(S.DEBTS_CLICK_TABLE_SORT);
1282
1282
  },
1283
- rows: M,
1283
+ rows: k,
1284
1284
  slotProps: {
1285
1285
  baseIconButton: { color: "secondary", sx: { ml: 8 } },
1286
1286
  row: {
1287
- onMouseEnter: S,
1287
+ onMouseEnter: v,
1288
1288
  onMouseLeave: () => !d && t?.(""),
1289
1289
  onTouchStart: T,
1290
1290
  onClick: d ? T : void 0
1291
1291
  }
1292
1292
  },
1293
- sortModel: m,
1293
+ sortModel: h,
1294
1294
  sortingOrder: ["asc", "desc"],
1295
1295
  sx: {
1296
1296
  "& .chevron-header": { display: "none" },
1297
- [`& .MuiDataGrid-row[data-id="${H(r)}"]`]: {
1297
+ [`& .MuiDataGrid-row[data-id="${O(r)}"]`]: {
1298
1298
  backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1299
1299
  filter: "brightness(98%)"
1300
1300
  }
@@ -1303,25 +1303,25 @@ const Yt = (a) => {
1303
1303
  )
1304
1304
  }
1305
1305
  );
1306
- }, qt = ({
1307
- buttonText: a,
1308
- disabled: o,
1306
+ }, Xt = ({
1307
+ buttonText: o,
1308
+ disabled: n,
1309
1309
  isOpen: r,
1310
1310
  onClick: t
1311
1311
  }) => {
1312
- const { isDesktop: n, isTablet: i } = K(), c = r ? "unfold_less" : "unfold_more";
1313
- return n || i ? /* @__PURE__ */ e(
1314
- De,
1312
+ const { isDesktop: a, isTablet: i } = U(), c = r ? "unfold_less" : "unfold_more";
1313
+ return a || i ? /* @__PURE__ */ e(
1314
+ Se,
1315
1315
  {
1316
1316
  "aria-controls": "prioritize-debts",
1317
1317
  "aria-describedby": "prioritize-debts",
1318
1318
  "aria-haspopup": !0,
1319
1319
  "aria-label": "prioritize-debts",
1320
- disabled: o,
1320
+ disabled: n,
1321
1321
  onClick: t,
1322
- startIcon: /* @__PURE__ */ e(ne, { name: c }),
1322
+ startIcon: /* @__PURE__ */ e(ae, { name: c }),
1323
1323
  sx: { justifyContent: "start", minWidth: 214, mx: 4 },
1324
- children: a
1324
+ children: o
1325
1325
  }
1326
1326
  ) : /* @__PURE__ */ e(
1327
1327
  lt,
@@ -1330,13 +1330,13 @@ const Yt = (a) => {
1330
1330
  "aria-describedby": "prioritize-debts",
1331
1331
  "aria-haspopup": !0,
1332
1332
  "aria-label": "prioritize-debts",
1333
- disabled: o,
1333
+ disabled: n,
1334
1334
  onClick: t,
1335
- children: /* @__PURE__ */ e(ne, { name: c })
1335
+ children: /* @__PURE__ */ e(ae, { name: c })
1336
1336
  }
1337
1337
  );
1338
- }, Zt = v(({ buttonEl: a, onClose: o }) => {
1339
- const { onEvent: r } = R(), { debts: t } = C(), { selectedDebtPriority: n, setSelectedDebtPriority: i } = F(), c = !!a, d = [
1338
+ }, Zt = D(({ buttonEl: o, onClose: n }) => {
1339
+ const { onEvent: r } = B(), { debts: t } = C(), { selectedDebtPriority: a, setSelectedDebtPriority: i } = F(), c = !!o, d = [
1340
1340
  {
1341
1341
  priority: P.FASTEST_PAYOFF_FIRST,
1342
1342
  text: t.priority_sort_fastest_payoff
@@ -1353,31 +1353,31 @@ const Yt = (a) => {
1353
1353
  priority: P.HIGHEST_BALANCE,
1354
1354
  text: t.priority_sort_highest_balance
1355
1355
  }
1356
- ], p = (h) => {
1357
- i(h), r(D.DEBTS_CLICK_PRIORITY, { debts_priority: h });
1356
+ ], p = (m) => {
1357
+ i(m), r(S.DEBTS_CLICK_PRIORITY, { debts_priority: m });
1358
1358
  };
1359
1359
  return /* @__PURE__ */ e(
1360
1360
  ct,
1361
1361
  {
1362
- anchorEl: a,
1362
+ anchorEl: o,
1363
1363
  anchorOrigin: {
1364
1364
  vertical: "bottom",
1365
1365
  horizontal: "left"
1366
1366
  },
1367
1367
  id: "prioritize-debts",
1368
- onClose: o,
1368
+ onClose: n,
1369
1369
  open: c,
1370
1370
  transformOrigin: {
1371
1371
  vertical: "top",
1372
1372
  horizontal: "left"
1373
1373
  },
1374
- children: /* @__PURE__ */ e(Se, { children: d.map(({ priority: h, text: m }) => /* @__PURE__ */ s(
1374
+ children: /* @__PURE__ */ e(ve, { children: d.map(({ priority: m, text: h }) => /* @__PURE__ */ s(
1375
1375
  st,
1376
1376
  {
1377
- onClick: () => p(h),
1377
+ onClick: () => p(m),
1378
1378
  sx: {
1379
- bgcolor: n === h ? "primary.main" : void 0,
1380
- color: n === h ? "#fff" : void 0,
1379
+ bgcolor: a === m ? "primary.main" : void 0,
1380
+ color: a === m ? "#fff" : void 0,
1381
1381
  justifyContent: "space-between",
1382
1382
  minHeight: 44,
1383
1383
  minWidth: 268,
@@ -1390,20 +1390,20 @@ const Yt = (a) => {
1390
1390
  }
1391
1391
  },
1392
1392
  children: [
1393
- /* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: m }),
1394
- n === h && /* @__PURE__ */ e(ve, { color: "inherit", filled: !0, fontSize: "small" })
1393
+ /* @__PURE__ */ e(l, { color: "inherit", variant: "body2", children: h }),
1394
+ a === m && /* @__PURE__ */ e(De, { color: "inherit", filled: !0, fontSize: "small" })
1395
1395
  ]
1396
1396
  },
1397
- h
1397
+ m
1398
1398
  )) })
1399
1399
  }
1400
1400
  );
1401
- }), Jt = v(({ disabled: a }) => {
1402
- const { onEvent: o } = R(), { debts: r } = C(), { selectedDebtPriority: t } = F(), [n, i] = g.useState(null), c = (m) => {
1403
- i(m.currentTarget), o(D.DEBTS_CLICK_PRIORITIZE);
1401
+ }), Jt = D(({ disabled: o }) => {
1402
+ const { onEvent: n } = B(), { debts: r } = C(), { selectedDebtPriority: t } = F(), [a, i] = x.useState(null), c = (h) => {
1403
+ i(h.currentTarget), n(S.DEBTS_CLICK_PRIORITIZE);
1404
1404
  }, d = () => {
1405
1405
  i(null);
1406
- }, p = !!n, h = g.useMemo(() => ({
1406
+ }, p = !!a, m = x.useMemo(() => ({
1407
1407
  [P.FASTEST_PAYOFF_FIRST]: r.priority_sort_fastest_payoff,
1408
1408
  [P.HIGHEST_INTEREST]: r.priority_sort_highest_interest,
1409
1409
  [P.HIGHEST_BALANCE]: r.priority_sort_highest_balance,
@@ -1411,130 +1411,130 @@ const Yt = (a) => {
1411
1411
  })[t] ?? r.priority_sort_lowest_balance, [t]);
1412
1412
  return /* @__PURE__ */ s(_, { children: [
1413
1413
  /* @__PURE__ */ e(
1414
- qt,
1414
+ Xt,
1415
1415
  {
1416
- buttonText: h,
1417
- disabled: a,
1416
+ buttonText: m,
1417
+ disabled: o,
1418
1418
  isOpen: p,
1419
1419
  onClick: c
1420
1420
  }
1421
1421
  ),
1422
- /* @__PURE__ */ e(Zt, { buttonEl: n, onClose: d })
1422
+ /* @__PURE__ */ e(Zt, { buttonEl: a, onClose: d })
1423
1423
  ] });
1424
- }), Qt = (a, o, r = 0) => {
1425
- const t = a.map((p) => ({ ...p }));
1426
- Te(t, o);
1427
- const n = /* @__PURE__ */ new Date(), i = [];
1424
+ }), Qt = (o, n, r = 0) => {
1425
+ const t = o.map((p) => ({ ...p }));
1426
+ Te(t, n);
1427
+ const a = /* @__PURE__ */ new Date(), i = [];
1428
1428
  let c = 0, d = 1;
1429
1429
  for (const p of t)
1430
1430
  i.push({
1431
1431
  ...p,
1432
1432
  // Start with the initial balance
1433
- dataset: [{ x: new Date(n), y: p.balance }]
1433
+ dataset: [{ x: new Date(a), y: p.balance }]
1434
1434
  });
1435
1435
  for (; t.some((p) => p.balance >= 0.01 && !p.is_impossible); ) {
1436
- let p = !1, h = !1, m = !1;
1436
+ let p = !1, m = !1, h = !1;
1437
1437
  for (const [w, b] of t.entries()) {
1438
1438
  if (b.balance <= 0.01) continue;
1439
- const B = i[w].dataset, I = (b.interest_rate ?? 0) / 100 / 12, S = b.balance * I, T = b.monthly_payment ?? 0;
1440
- let H = T, y = 0;
1441
- !m && r > 0 && (H += r, m = !0), !h && c > 0 && (y = c, h = !0), b.balance += S;
1442
- const u = Math.min(b.balance, H + y);
1443
- if (u <= S) {
1444
- b.is_impossible = !0, i[w].is_impossible = !0, i[w].priority = void 0, B.push({ x: new Date(n), y: b.balance });
1439
+ const M = i[w].dataset, I = (b.interest_rate ?? 0) / 100 / 12, v = b.balance * I, T = b.monthly_payment ?? 0;
1440
+ let O = T, y = 0;
1441
+ !h && r > 0 && (O += r, h = !0), !m && c > 0 && (y = c, m = !0), b.balance += v;
1442
+ const u = Math.min(b.balance, O + y);
1443
+ if (u <= v) {
1444
+ b.is_impossible = !0, i[w].is_impossible = !0, i[w].priority = void 0, M.push({ x: new Date(a), y: b.balance });
1445
1445
  continue;
1446
1446
  }
1447
- b.balance -= u, b.balance = b.balance < 0.01 ? 0 : b.balance, B.push({
1448
- x: new Date(n),
1447
+ b.balance -= u, b.balance = b.balance < 0.01 ? 0 : b.balance, M.push({
1448
+ x: new Date(a),
1449
1449
  y: Math.max(0, b.balance),
1450
1450
  payment: u,
1451
1451
  extra: y
1452
- }), b.balance <= 0 && (c += T, i[w].projected_payoff_date = new Date(n)), u > 0 && (p = !0);
1452
+ }), b.balance <= 0 && (c += T, i[w].projected_payoff_date = new Date(a)), u > 0 && (p = !0);
1453
1453
  }
1454
- p && n.setMonth(n.getMonth() + 1);
1454
+ p && a.setMonth(a.getMonth() + 1);
1455
1455
  }
1456
1456
  return i.forEach((p) => {
1457
1457
  (p.interest_rate === void 0 || p.monthly_payment === void 0) && (p.projected_payoff_date = void 0);
1458
1458
  }), i.forEach((p) => {
1459
1459
  p.priority = !p.is_paid_off && !p.is_impossible ? d++ : void 0;
1460
1460
  }), i;
1461
- }, er = (a, o, r) => ({
1462
- description: o ? a.empty_state_description : a.empty_state_description_no_aggregation,
1463
- header: o ? a.empty_state_header : a.empty_state_header_no_aggregation,
1464
- onClickHandler: o ? r : void 0,
1465
- primaryButton: o ? a.connect_accounts : void 0
1466
- }), tr = v(({ disabled: a, onClick: o }) => {
1467
- const { debts: r } = C(), { isDesktop: t } = K(), { totalMonthlyPayments: n } = te(), { monthlyCashFlowProfile: i } = V(), c = n + Number(i?.extra_payment), d = t ? r.paydown_button_long : r.paydown_button_short;
1461
+ }, er = (o, n, r) => ({
1462
+ description: n ? o.empty_state_description : o.empty_state_description_no_aggregation,
1463
+ header: n ? o.empty_state_header : o.empty_state_header_no_aggregation,
1464
+ onClickHandler: n ? r : void 0,
1465
+ primaryButton: n ? o.connect_accounts : void 0
1466
+ }), tr = D(({ disabled: o, onClick: n }) => {
1467
+ const { debts: r } = C(), { isDesktop: t } = U(), { totalMonthlyPayments: a } = te(), { monthlyCashFlowProfile: i } = K(), c = a + Number(i?.extra_payment), d = t ? r.paydown_button_long : r.paydown_button_short;
1468
1468
  return /* @__PURE__ */ e(
1469
- De,
1469
+ Se,
1470
1470
  {
1471
1471
  "aria-controls": "extra-paydown",
1472
1472
  "aria-describedby": "extra-paydown",
1473
1473
  "aria-haspopup": !0,
1474
1474
  "aria-label": "extra-paydown",
1475
- disabled: a,
1476
- onClick: o,
1475
+ disabled: o,
1476
+ onClick: n,
1477
1477
  sx: { justifyContent: "start", minWidth: 100, mx: 4 },
1478
- children: E(d, N(c, "0,0"))
1478
+ children: E(d, R(c, "0,0"))
1479
1479
  }
1480
1480
  );
1481
- }), rr = ({ onBackClick: a, sx: o }) => {
1482
- const { isDesktop: r, isMobile: t } = K(), { connect: n, debts: i } = C(), { onEvent: c } = R(), {
1481
+ }), rr = ({ onBackClick: o, sx: n }) => {
1482
+ const { isDesktop: r, isMobile: t } = U(), { connect: a, debts: i } = C(), { onEvent: c } = B(), {
1483
1483
  config: { show_connections_widget_in_master: d }
1484
- } = ze(), { isInitialized: p } = Xe(), { setSelectedAccount: h } = Ve(), { selectedDebtPriority: m, setSelectedDebtChartData: w } = F(), {
1484
+ } = ze(), { isInitialized: p } = Ye(), { setSelectedAccount: m } = Ke(), { selectedDebtPriority: h, setSelectedDebtChartData: w } = F(), {
1485
1485
  isAccountDataLoaded: b,
1486
- loadAccountData: B,
1487
- detailedAccounts: M,
1486
+ loadAccountData: M,
1487
+ detailedAccounts: k,
1488
1488
  visibleDebtAccounts: I
1489
- } = re(), { isAllGoalDataLoaded: S, loadGoalData: T, monthlyCashFlowProfile: H } = V(), { debts: y } = te(), [u, f] = g.useState(!1), [A, k] = g.useState(!1), [L, z] = g.useState(!1), [U, Ee] = g.useState(""), [Ie, ce] = g.useState(!1);
1489
+ } = re(), { isAllGoalDataLoaded: v, loadGoalData: T, monthlyCashFlowProfile: O } = K(), { debts: y } = te(), [u, f] = x.useState(!1), [A, N] = x.useState(!1), [L, z] = x.useState(!1), [q, Ee] = x.useState(""), [Ie, ce] = x.useState(!1);
1490
1490
  pt({
1491
1491
  widgetName: "DebtsWidget",
1492
- isLoaded: S
1492
+ isLoaded: v
1493
1493
  });
1494
- const q = g.useMemo(() => {
1495
- const O = H?.extra_payment ?? 0;
1496
- return Qt(y, m, O);
1497
- }, [y, m, H]);
1498
- g.useEffect(() => {
1499
- b || B().finally(), c(D.DEBTS_VIEW);
1500
- }, []), g.useEffect(() => {
1494
+ const X = x.useMemo(() => {
1495
+ const H = O?.extra_payment ?? 0;
1496
+ return Qt(y, h, H);
1497
+ }, [y, h, O]);
1498
+ x.useEffect(() => {
1499
+ b || M().finally(), c(S.DEBTS_VIEW);
1500
+ }, []), x.useEffect(() => {
1501
1501
  p && T().finally();
1502
1502
  }, [p]);
1503
- const de = (O) => Ee(O), pe = () => {
1504
- const O = I.find((oe) => oe.guid === U), me = q.find((oe) => oe.guid === U);
1505
- O && h(O), me && w(me), f(!0);
1506
- }, Be = () => c(D.DEBTS_CLICK_FILTER), Me = () => {
1507
- z(!0), c(D.DEBTS_CLICK_SNOWBALL_CTA);
1508
- }, ke = () => {
1509
- k(!0), c(D.DEBTS_CLICK_PAYDOWN);
1503
+ const de = (H) => Ee(H), pe = () => {
1504
+ const H = I.find((ne) => ne.guid === q), he = X.find((ne) => ne.guid === q);
1505
+ H && m(H), he && w(he), f(!0);
1506
+ }, Me = () => c(S.DEBTS_CLICK_FILTER), ke = () => {
1507
+ z(!0), c(S.DEBTS_CLICK_SNOWBALL_CTA);
1508
+ }, Ne = () => {
1509
+ N(!0), c(S.DEBTS_CLICK_PAYDOWN);
1510
1510
  };
1511
- if (!p || !S)
1512
- return /* @__PURE__ */ e(mt, {});
1513
- const Pe = M.length === 0, Ne = I.length === 0, Re = y.length === 0, Z = Pe || Ne || Re, J = er(
1511
+ if (!p || !v)
1512
+ return /* @__PURE__ */ e(ht, {});
1513
+ const Pe = k.length === 0, Re = I.length === 0, Be = y.length === 0, Z = Pe || Re || Be, J = er(
1514
1514
  i,
1515
1515
  d,
1516
1516
  () => ce(!0)
1517
1517
  );
1518
1518
  return /* @__PURE__ */ s(
1519
- ht,
1519
+ mt,
1520
1520
  {
1521
1521
  actions: [
1522
1522
  /* @__PURE__ */ e(Jt, { disabled: Z }, "prioritize-debts"),
1523
- /* @__PURE__ */ e(tr, { disabled: Z, onClick: ke }, "extra-paydown")
1523
+ /* @__PURE__ */ e(tr, { disabled: Z, onClick: Ne }, "extra-paydown")
1524
1524
  ],
1525
1525
  allowedAccountTypes: [
1526
- X.CREDIT_CARD,
1527
- X.LOAN,
1528
- X.MORTGAGE,
1529
- X.LINE_OF_CREDIT,
1530
- X.CHECKING_LINE_OF_CREDIT
1526
+ Y.CREDIT_CARD,
1527
+ Y.LOAN,
1528
+ Y.MORTGAGE,
1529
+ Y.LINE_OF_CREDIT,
1530
+ Y.CHECKING_LINE_OF_CREDIT
1531
1531
  ],
1532
- onAccountsFilterClick: Be,
1533
- onBackClick: a,
1534
- sx: o,
1532
+ onAccountsFilterClick: Me,
1533
+ onBackClick: o,
1534
+ sx: n,
1535
1535
  title: i.title,
1536
1536
  children: [
1537
- /* @__PURE__ */ s(x, { sx: { pt: 48, px: r ? "48px" : "24px" }, children: [
1537
+ /* @__PURE__ */ s(g, { sx: { pt: 48, px: r ? "48px" : "24px" }, children: [
1538
1538
  Z && /* @__PURE__ */ e(
1539
1539
  ut,
1540
1540
  {
@@ -1548,7 +1548,7 @@ const Yt = (a) => {
1548
1548
  ),
1549
1549
  !Z && /* @__PURE__ */ s($, { children: [
1550
1550
  /* @__PURE__ */ s(
1551
- x,
1551
+ g,
1552
1552
  {
1553
1553
  sx: {
1554
1554
  alignItems: t ? "flex-start" : "flex-end",
@@ -1559,9 +1559,9 @@ const Yt = (a) => {
1559
1559
  /* @__PURE__ */ e(
1560
1560
  Ae,
1561
1561
  {
1562
- debts: q,
1562
+ debts: X,
1563
1563
  height: t ? 250 : void 0,
1564
- hoveredDebtGuid: U,
1564
+ hoveredDebtGuid: q,
1565
1565
  onClickArea: pe,
1566
1566
  onHoverArea: de,
1567
1567
  sx: { mr: t ? "4px" : "-48px" }
@@ -1570,19 +1570,19 @@ const Yt = (a) => {
1570
1570
  /* @__PURE__ */ e(
1571
1571
  wt,
1572
1572
  {
1573
- debts: q,
1574
- onClickCta: Me,
1573
+ debts: X,
1574
+ onClickCta: ke,
1575
1575
  sx: { mb: t ? "0px" : "64px" }
1576
1576
  }
1577
1577
  )
1578
1578
  ]
1579
1579
  }
1580
1580
  ),
1581
- /* @__PURE__ */ e(x, { sx: { mx: t ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1582
- Ut,
1581
+ /* @__PURE__ */ e(g, { sx: { mx: t ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1582
+ qt,
1583
1583
  {
1584
- debts: q,
1585
- hoveredDebtGuid: U,
1584
+ debts: X,
1585
+ hoveredDebtGuid: q,
1586
1586
  onClickRow: pe,
1587
1587
  onHoverRow: de
1588
1588
  }
@@ -1590,29 +1590,29 @@ const Yt = (a) => {
1590
1590
  ] })
1591
1591
  ] }),
1592
1592
  /* @__PURE__ */ e(
1593
- St,
1593
+ vt,
1594
1594
  {
1595
1595
  isOpen: L,
1596
1596
  onClose: () => z(!1)
1597
1597
  }
1598
1598
  ),
1599
- /* @__PURE__ */ e(Ht, { isOpen: u, onClose: () => f(!1) }),
1600
- /* @__PURE__ */ e(jt, { isOpen: A, onClose: () => k(!1) }),
1599
+ /* @__PURE__ */ e(Ot, { isOpen: u, onClose: () => f(!1) }),
1600
+ /* @__PURE__ */ e(jt, { isOpen: A, onClose: () => N(!1) }),
1601
1601
  /* @__PURE__ */ e(
1602
1602
  dt,
1603
1603
  {
1604
1604
  onClose: () => ce(!1),
1605
1605
  showConnectWidget: Ie,
1606
- title: n.mini_title
1606
+ title: a.mini_title
1607
1607
  }
1608
1608
  )
1609
1609
  ]
1610
1610
  }
1611
1611
  );
1612
- }, Qr = v(rr);
1612
+ }, Qr = D(rr);
1613
1613
  export {
1614
1614
  Ae as DebtsChart,
1615
- ra as DebtsStore,
1616
- Ut as DebtsTable,
1615
+ ro as DebtsStore,
1616
+ qt as DebtsTable,
1617
1617
  Qr as DebtsWidget
1618
1618
  };