@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
@@ -2,68 +2,69 @@ import { jsx as e, jsxs as s, Fragment as H } from "react/jsx-runtime";
2
2
  import g from "react";
3
3
  import { observer as D } from "mobx-react-lite";
4
4
  import w from "@mui/material/Stack";
5
- import { useTheme as X, Card as _e, Stack as _, Box as W } from "@mui/material";
6
- import { Text as l, H3 as De, InstitutionLogo as Te, Icon as te } from "@mxenabled/mxui";
7
- import { intervalToDuration as Ae, formatDuration as Ee } from "date-fns";
8
- import { addMonths as se } from "date-fns/addMonths";
9
- import { fromUnixTime as ce } from "date-fns/fromUnixTime";
10
- import { getUnixTime as de } from "date-fns/getUnixTime";
11
- import { D as P, M as Ie, I as Be } from "../DebtsStore-Bu8rRRSL.mjs";
12
- import { a as Lr } from "../DebtsStore-Bu8rRRSL.mjs";
13
- import { f as k, a as Me } from "../NumberFormatting-DjTD0t3W.mjs";
14
- import { f as U, a as q } from "../Dialog-BPTr3qHE.mjs";
15
- import { G as Pe, x as Z, u as S, l as V, g as F, d as J, n as ke, b as Ne } from "../hooks-C41HAxM5.mjs";
5
+ import { useTheme as X, Card as be, Stack as _, Box as G } from "@mui/material";
6
+ import { Text as l, H3 as ve, InstitutionLogo as De, Icon as ee } from "@mxenabled/mxui";
7
+ import { intervalToDuration as Te, formatDuration as Ae } from "date-fns";
8
+ import { addMonths as le } from "date-fns/addMonths";
9
+ import { fromUnixTime as se } from "date-fns/fromUnixTime";
10
+ import { getUnixTime as ce } from "date-fns/getUnixTime";
11
+ import { D as P, M as Ee, I as Ie } from "../DebtsStore-DVPZbv2C.mjs";
12
+ import { a as Lr } from "../DebtsStore-DVPZbv2C.mjs";
13
+ import { f as k, a as Be } from "../NumberFormatting-DjTD0t3W.mjs";
14
+ import { f as K, a as U } from "../Dialog-BPTr3qHE.mjs";
15
+ import { G as Me, w as q, u as S, l as V, g as F, d as Z, b as Pe } from "../hooks-ZMp65DFz.mjs";
16
16
  import { u as Y } from "../useScreenSize-B6JyS_Lj.mjs";
17
- import { D as re } from "../Drawer-BEtCk82g.mjs";
18
- import { b as I } from "../Localization-2MODESHW.mjs";
19
- import { A as Fe, u as Re } from "../AccountDetailsHeader-Cbi5G6fJ.mjs";
20
- import Le from "@mui/material/Card";
21
- import $e from "@mui/material/CardContent";
22
- import He from "@mui/material/CardHeader";
23
- import { LineChart as Oe } from "@mui/x-charts";
24
- import ae from "@mui/material/Box";
25
- import { useTheme as We } from "@mui/material/styles";
26
- import { A as T, W as Ge } from "../WidgetContainer-6dsjtOVg.mjs";
27
- import pe from "@mui/material/Tab";
28
- import je from "@mui/material/Tabs";
29
- import ye from "@mui/material/List";
30
- import G from "@mui/material/Divider";
31
- import { M as ze, I as Xe, O as Ve } from "../OriginalBalanceAction-DK8_LkPz.mjs";
32
- import Ye from "@mui/material/TextField";
33
- import { L as Q } from "../ListItemAction-uobBrm_a.mjs";
34
- import { C as ne } from "../CurrencyInput-BFKcs-_K.mjs";
35
- import me from "@mui/material/Alert";
36
- import he from "@mui/material/AlertTitle";
37
- import ue from "@mui/material/Paper";
38
- import { Error as Ke, CheckCircle as fe } from "@mxenabled/mx-icons";
39
- import { T as be } from "../TabContentContainer-j01JYR_7.mjs";
40
- import { DataGridPro as Ue } from "@mui/x-data-grid-pro";
41
- import { H as j } from "../HeaderCell-DjuifqHJ.mjs";
42
- import { f as qe } from "../ConnectDrawer-CuUj16NH.mjs";
43
- import xe from "@mui/material/Button";
44
- import Ze from "@mui/material/IconButton";
45
- import Je from "@mui/material/ListItem";
46
- import Qe from "@mui/material/Popover";
47
- import { L as et } from "../Loader-DUaFpDGv.mjs";
48
- const tt = (a, n = 0, r = 0) => {
17
+ import { D as te } from "../Drawer-BEtCk82g.mjs";
18
+ import { b as E } from "../Localization-2MODESHW.mjs";
19
+ import { A as ke, u as Ne } from "../AccountDetailsHeader-C8MxsxhN.mjs";
20
+ import Fe from "@mui/material/Card";
21
+ import Re from "@mui/material/CardContent";
22
+ import Le from "@mui/material/CardHeader";
23
+ import { LineChart as $e } from "@mui/x-charts";
24
+ import re from "@mui/material/Box";
25
+ import { useTheme as He } from "@mui/material/styles";
26
+ import { A as T, W as Oe } from "../WidgetContainer-CaPjoWeE.mjs";
27
+ import de from "@mui/material/Tab";
28
+ import We from "@mui/material/Tabs";
29
+ import _e from "@mui/material/List";
30
+ import j from "@mui/material/Divider";
31
+ import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-C6jdS4ws.mjs";
32
+ import Xe from "@mui/material/TextField";
33
+ import { L as J } from "../ListItemAction-BxTkF6Tz.mjs";
34
+ import { C as ae } from "../CurrencyInput-itK0R3wV.mjs";
35
+ import pe from "@mui/material/Alert";
36
+ import me from "@mui/material/AlertTitle";
37
+ import he from "@mui/material/Paper";
38
+ import { Error as Ve, CheckCircle as ye } from "@mxenabled/mx-icons";
39
+ import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
40
+ import { DataGridPro as Ye } from "@mui/x-data-grid-pro";
41
+ import { H as z } from "../HeaderCell-DjuifqHJ.mjs";
42
+ import { f as Ke } from "../ConnectDrawer-KL8t1qSC.mjs";
43
+ import fe from "@mui/material/Button";
44
+ import Ue from "@mui/material/IconButton";
45
+ import qe from "@mui/material/ListItem";
46
+ import Ze from "@mui/material/Popover";
47
+ import { u as Je } from "../useWidgetLoadTimer-C1NBkyLd.mjs";
48
+ import { L as Qe } from "../Loader-DUaFpDGv.mjs";
49
+ const et = (a, n = 0, r = 0) => {
49
50
  if (r === 0) return 0;
50
- const t = n / (Ie * Be);
51
+ const t = n / (Ee * Ie);
51
52
  return Math.ceil(
52
53
  t === 0 ? a / r : -Math.log(1 - t * a / r) / Math.log(1 + t)
53
54
  );
54
- }, rt = (a, n, r, t, o) => {
55
+ }, tt = (a, n, r, t, o) => {
55
56
  const i = [];
56
57
  if (r === 0) {
57
58
  for (let c = 0; c < a; c++) {
58
- const d = n - t * (c + 1), m = n - t * c, u = d >= 0 ? t : m;
59
+ const d = n - t * (c + 1), m = n - t * c, b = d >= 0 ? t : m;
59
60
  i.push({
60
61
  balance: d >= 0 ? d : 0,
61
62
  interest: r,
62
- payment: u,
63
- principal: u,
64
- timestamp: de(
65
- se(
66
- ce(o),
63
+ payment: b,
64
+ principal: b,
65
+ timestamp: ce(
66
+ le(
67
+ se(o),
67
68
  // convert seconds → Date
68
69
  c + 1
69
70
  // add (index + 1) months
@@ -75,32 +76,32 @@ const tt = (a, n = 0, r = 0) => {
75
76
  }
76
77
  const p = r / 1200;
77
78
  for (let c = 0; c < a; c++) {
78
- const d = de(se(ce(o), c + 1)), m = Math.pow(1 + p, c), u = n * m - t * ((m - 1) / p), x = Math.pow(1 + p, c + 1), h = n * x - t * ((x - 1) / p), v = t + Math.min(h, 0), B = u * p;
79
+ const d = ce(le(se(o), c + 1)), m = Math.pow(1 + p, c), b = n * m - t * ((m - 1) / p), f = Math.pow(1 + p, c + 1), u = n * f - t * ((f - 1) / p), v = t + Math.min(u, 0), M = b * p;
79
80
  i.push({
80
- balance: Math.max(0, h),
81
- interest: B,
81
+ balance: Math.max(0, u),
82
+ interest: M,
82
83
  payment: v,
83
- principal: v - B,
84
+ principal: v - M,
84
85
  timestamp: d
85
86
  });
86
87
  }
87
88
  return i;
88
- }, at = (a) => (a[a.length - 1] || {}).timestamp, nt = (a) => {
89
- const { monthly_payment: n, interest_rate: r, balance: t, payment_due_date: o } = a, i = tt(t, r ?? 0, n ?? 0), p = rt(
89
+ }, rt = (a) => (a[a.length - 1] || {}).timestamp, at = (a) => {
90
+ const { monthly_payment: n, interest_rate: r, balance: t, payment_due_date: o } = a, i = et(t, r ?? 0, n ?? 0), p = tt(
90
91
  i,
91
92
  t,
92
93
  r ?? 0,
93
94
  n ?? 0,
94
95
  o
95
- ), c = at(p);
96
+ ), c = rt(p);
96
97
  return {
97
98
  ...a,
98
99
  minimumFinalPayment: c,
99
100
  minimumPayments: p
100
101
  };
101
- }, ge = (a, n) => {
102
+ }, xe = (a, n) => {
102
103
  const [r, t] = a.reduce(
103
- ([o, i], p) => (p.is_paid_off || p.is_impossible ? i.push({ ...p, minimumPayments: [] }) : o.push(nt(p)), [o, i]),
104
+ ([o, i], p) => (p.is_paid_off || p.is_impossible ? i.push({ ...p, minimumPayments: [] }) : o.push(at(p)), [o, i]),
104
105
  [[], []]
105
106
  );
106
107
  switch (n) {
@@ -121,47 +122,47 @@ const tt = (a, n = 0, r = 0) => {
121
122
  }
122
123
  a.splice(0, a.length, ...r, ...t);
123
124
  };
124
- function ot(a, n, r = 0) {
125
- const t = a.map((u) => ({ ...u })).filter(
126
- (u) => u.interest_rate !== void 0 && u.monthly_payment !== void 0 && !u.is_paid_off
125
+ function nt(a, n, r = 0) {
126
+ const t = a.map((b) => ({ ...b })).filter(
127
+ (b) => b.interest_rate !== void 0 && b.monthly_payment !== void 0 && !b.is_paid_off
127
128
  );
128
- ge(t, n);
129
+ xe(t, n);
129
130
  let o = 0, i = 0;
130
131
  const p = /* @__PURE__ */ new Date(), c = /* @__PURE__ */ new Date();
131
- for (; t.some((u) => u.balance >= 0.01 && !u.is_impossible); ) {
132
- let u = !1;
133
- for (const [x, h] of t.entries()) {
134
- if (h.balance <= 0.01 || h.is_impossible) continue;
135
- const B = (h.interest_rate ?? 0) / 100 / 12, N = h.balance * B;
136
- let C = h.monthly_payment ?? 0;
137
- x === 0 && r && (C += r), h.balance += N;
138
- const A = Math.min(h.balance, C + i);
139
- if (A <= N) {
140
- h.is_impossible = !0;
132
+ for (; t.some((b) => b.balance >= 0.01 && !b.is_impossible); ) {
133
+ let b = !1;
134
+ for (const [f, u] of t.entries()) {
135
+ if (u.balance <= 0.01 || u.is_impossible) continue;
136
+ const M = (u.interest_rate ?? 0) / 100 / 12, I = u.balance * M;
137
+ let C = u.monthly_payment ?? 0;
138
+ f === 0 && r && (C += r), u.balance += I;
139
+ const B = Math.min(u.balance, C + i);
140
+ if (B <= I) {
141
+ u.is_impossible = !0;
141
142
  continue;
142
143
  }
143
- h.balance -= A, h.balance = h.balance < 0.01 ? 0 : h.balance, o += N, h.balance <= 0 && (i += C), A > 0 && (u = !0);
144
+ u.balance -= B, u.balance = u.balance < 0.01 ? 0 : u.balance, o += I, u.balance <= 0 && (i += C), B > 0 && (b = !0);
144
145
  }
145
- u && c.setMonth(c.getMonth() + 1);
146
+ b && c.setMonth(c.getMonth() + 1);
146
147
  }
147
- const d = t.some((u) => u.is_impossible && u.balance > 0), m = Ae({ start: p, end: c });
148
+ const d = t.some((b) => b.is_impossible && b.balance > 0), m = Te({ start: p, end: c });
148
149
  return {
149
150
  payoffSavings: d ? "N/A" : k(o, "0,0.00"),
150
- payoffDate: d ? "Never" : U(c, q.MONTH_YEAR),
151
- payoffDuration: d ? "Stagnant" : Ee(m, { format: ["years", "months"] }) || "0 months"
151
+ payoffDate: d ? "Never" : K(c, U.MONTH_YEAR),
152
+ payoffDuration: d ? "Stagnant" : Ae(m, { format: ["years", "months"] }) || "0 months"
152
153
  };
153
154
  }
154
- const L = () => {
155
- if (!g.useContext(Pe))
155
+ const $ = () => {
156
+ if (!g.useContext(Me))
156
157
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
157
- return Z().uiStore;
158
- }, it = ({ debts: a, onClickCta: n, sx: r }) => {
159
- const t = X(), { isMobile: o } = Y(), { debts: i } = S(), { selectedDebtPriority: p } = L(), { monthlyCashFlowProfile: c } = V(), { payoffDate: d, payoffSavings: m, payoffDuration: u } = g.useMemo(() => {
160
- const x = c?.extra_payment ?? 0;
161
- return ot(a, p, x);
158
+ return q().uiStore;
159
+ }, ot = ({ debts: a, onClickCta: n, sx: r }) => {
160
+ const t = X(), { isMobile: o } = Y(), { debts: i } = S(), { selectedDebtPriority: p } = $(), { monthlyCashFlowProfile: c } = V(), { payoffDate: d, payoffSavings: m, payoffDuration: b } = g.useMemo(() => {
161
+ const f = c?.extra_payment ?? 0;
162
+ return nt(a, p, f);
162
163
  }, [a, p, c]);
163
164
  return /* @__PURE__ */ e(
164
- _e,
165
+ be,
165
166
  {
166
167
  sx: {
167
168
  boxShadow: t.shadows[2],
@@ -190,7 +191,7 @@ const L = () => {
190
191
  /* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: i.snowball_card_amount_description })
191
192
  ] }),
192
193
  /* @__PURE__ */ s(_, { gap: o ? "4px" : "0", children: [
193
- /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: u }),
194
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: b }),
194
195
  /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_duration_description })
195
196
  ] }),
196
197
  /* @__PURE__ */ e(
@@ -207,10 +208,10 @@ const L = () => {
207
208
  ] })
208
209
  }
209
210
  );
210
- }, lt = D(it), st = ({ isOpen: a, onClose: n }) => {
211
+ }, it = D(ot), lt = ({ isOpen: a, onClose: n }) => {
211
212
  const r = X(), { debts: t } = S(), [o, i] = g.useState(!1);
212
213
  return /* @__PURE__ */ e(
213
- re,
214
+ te,
214
215
  {
215
216
  ariaLabelClose: "",
216
217
  isOpen: a,
@@ -224,7 +225,7 @@ const L = () => {
224
225
  /* @__PURE__ */ e(l, { variant: "H1", children: t.snowball_drawer_savings }),
225
226
  /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
226
227
  ] }),
227
- /* @__PURE__ */ s(_e, { sx: { display: "grid", py: 16, px: 24 }, children: [
228
+ /* @__PURE__ */ s(be, { sx: { display: "grid", py: 16, px: 24 }, children: [
228
229
  /* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
229
230
  /* @__PURE__ */ e(
230
231
  l,
@@ -261,13 +262,13 @@ const L = () => {
261
262
  }
262
263
  ),
263
264
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
264
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: I(t.snowball_drawer_month_header, 1) }),
265
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 1) }),
265
266
  /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
266
267
  ] }),
267
268
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
268
269
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
269
270
  /* @__PURE__ */ e(
270
- W,
271
+ G,
271
272
  {
272
273
  sx: {
273
274
  display: "flex",
@@ -294,13 +295,13 @@ const L = () => {
294
295
  },
295
296
  children: [
296
297
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
297
- /* @__PURE__ */ e(l, { variant: "Body", children: I(t.snowball_drawer_debt_label, "A") }),
298
+ /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "A") }),
298
299
  /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
299
- I(
300
+ E(
300
301
  t.snowball_drawer_rollover_explainer_pt1,
301
302
  "$100"
302
303
  ),
303
- /* @__PURE__ */ e("strong", { children: I(t.snowball_drawer_debt_label, "B") }),
304
+ /* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "B") }),
304
305
  t.snowball_drawer_rollover_explainer_pt2
305
306
  ] })
306
307
  ] }),
@@ -323,7 +324,7 @@ const L = () => {
323
324
  ] }),
324
325
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
325
326
  /* @__PURE__ */ e(
326
- W,
327
+ G,
327
328
  {
328
329
  sx: {
329
330
  width: 20,
@@ -345,7 +346,7 @@ const L = () => {
345
346
  pr: 24
346
347
  },
347
348
  children: [
348
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: I(t.snowball_drawer_debt_label, "B") }),
349
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "B") }),
349
350
  /* @__PURE__ */ e(l, { variant: "Body", children: "$400.00" })
350
351
  ]
351
352
  }
@@ -353,7 +354,7 @@ const L = () => {
353
354
  ] }),
354
355
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, py: 14, children: [
355
356
  /* @__PURE__ */ e(
356
- W,
357
+ G,
357
358
  {
358
359
  sx: {
359
360
  width: 20,
@@ -365,7 +366,7 @@ const L = () => {
365
366
  }
366
367
  ),
367
368
  /* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
368
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: I(t.snowball_drawer_debt_label, "C") }),
369
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }),
369
370
  /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
370
371
  ] })
371
372
  ] }),
@@ -388,13 +389,13 @@ const L = () => {
388
389
  )
389
390
  ] }),
390
391
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
391
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: I(t.snowball_drawer_month_header, 2) }),
392
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 2) }),
392
393
  /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
393
394
  ] }),
394
395
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
395
396
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
396
397
  /* @__PURE__ */ e(
397
- W,
398
+ G,
398
399
  {
399
400
  sx: {
400
401
  display: "flex",
@@ -421,13 +422,13 @@ const L = () => {
421
422
  },
422
423
  children: [
423
424
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
424
- /* @__PURE__ */ e(l, { variant: "Body", children: I(t.snowball_drawer_debt_label, "B") }),
425
+ /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "B") }),
425
426
  /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
426
- I(
427
+ E(
427
428
  t.snowball_drawer_rollover_explainer_pt1,
428
429
  "$500"
429
430
  ),
430
- /* @__PURE__ */ e("strong", { children: I(t.snowball_drawer_debt_label, "C") }),
431
+ /* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "C") }),
431
432
  t.snowball_drawer_rollover_explainer_pt2
432
433
  ] })
433
434
  ] }),
@@ -450,7 +451,7 @@ const L = () => {
450
451
  ] }),
451
452
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
452
453
  /* @__PURE__ */ e(
453
- W,
454
+ G,
454
455
  {
455
456
  sx: {
456
457
  width: 20,
@@ -471,7 +472,7 @@ const L = () => {
471
472
  pr: 24
472
473
  },
473
474
  children: [
474
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: I(t.snowball_drawer_debt_label, "C") }),
475
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }),
475
476
  /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
476
477
  ]
477
478
  }
@@ -496,13 +497,13 @@ const L = () => {
496
497
  )
497
498
  ] }),
498
499
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
499
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: I(t.snowball_drawer_month_header, 3) }),
500
+ /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 3) }),
500
501
  /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
501
502
  ] }),
502
503
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
503
504
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
504
505
  /* @__PURE__ */ e(
505
- W,
506
+ G,
506
507
  {
507
508
  sx: {
508
509
  display: "flex",
@@ -528,7 +529,7 @@ const L = () => {
528
529
  pr: 24
529
530
  },
530
531
  children: [
531
- /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: I(t.snowball_drawer_debt_label, "C") }) }),
532
+ /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }) }),
532
533
  /* @__PURE__ */ s(_, { children: [
533
534
  /* @__PURE__ */ e(l, { variant: "Body", children: "$1,500.00" }),
534
535
  /* @__PURE__ */ e(
@@ -568,8 +569,8 @@ const L = () => {
568
569
  ] })
569
570
  }
570
571
  );
571
- }, ct = D(st), dt = "#FF7B08";
572
- function pt(a, n) {
572
+ }, st = D(lt), ct = "#FF7B08";
573
+ function dt(a, n) {
573
574
  const [r, t, o] = a.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), i = [
574
575
  Math.max(0, Math.min(255, Math.round(r * n))),
575
576
  Math.max(0, Math.min(255, Math.round(t * n))),
@@ -577,7 +578,7 @@ function pt(a, n) {
577
578
  ];
578
579
  return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
579
580
  }
580
- const we = ({
581
+ const ge = ({
581
582
  sx: a,
582
583
  height: n = 500,
583
584
  width: r,
@@ -586,32 +587,32 @@ const we = ({
586
587
  onClickArea: i,
587
588
  onHoverArea: p
588
589
  }) => {
589
- const c = We(), { onEvent: d } = F(), m = t.filter((b) => !b.is_impossible), u = [
590
+ const c = He(), { onEvent: d } = F(), m = t.filter((h) => !h.is_impossible), b = [
590
591
  ...new Set(
591
- m.flatMap((b) => b.dataset.map((f) => new Date(f.x).getTime()))
592
+ m.flatMap((h) => h.dataset.map((x) => new Date(x.x).getTime()))
592
593
  )
593
- ].sort((b, f) => b - f).map((b) => new Date(b)), x = m.map((b) => {
594
- const f = new Map(b.dataset.map((R) => [new Date(R.x).getTime(), R.y]));
595
- let E = f.get(u[0].getTime()) ?? 0;
596
- const $ = u.map((R) => {
597
- const z = f.get(R.getTime()) ?? E;
598
- return E = z, { x: R, y: z };
594
+ ].sort((h, x) => h - x).map((h) => new Date(h)), f = m.map((h) => {
595
+ const x = new Map(h.dataset.map((L) => [new Date(L.x).getTime(), L.y]));
596
+ let A = x.get(b[0].getTime()) ?? 0;
597
+ const R = b.map((L) => {
598
+ const O = x.get(L.getTime()) ?? A;
599
+ return A = O, { x: L, y: O };
599
600
  });
600
- return { ...b, dataset: $ };
601
- }), h = x.reduce(
602
- (b, f) => b + (f.dataset[0]?.y ?? 0),
601
+ return { ...h, dataset: R };
602
+ }), u = f.reduce(
603
+ (h, x) => h + (x.dataset[0]?.y ?? 0),
603
604
  0
604
- ), v = u.map((b, f) => {
605
- const E = f / (u.length - 1), $ = h * (1 - E);
606
- return { x: b, y: $ };
607
- }), B = Math.ceil(h / 100) * 100, N = u, C = x.map((b, f) => {
608
- const E = 1 - f / x.length * 0.5, $ = pt(dt, E);
605
+ ), v = b.map((h, x) => {
606
+ const A = x / (b.length - 1), R = u * (1 - A);
607
+ return { x: h, y: R };
608
+ }), M = Math.ceil(u / 100) * 100, I = b, C = f.map((h, x) => {
609
+ const A = 1 - x / f.length * 0.5, R = dt(ct, A);
609
610
  return {
610
- id: `debt-${f}`,
611
- guid: b.guid,
612
- label: b.name,
613
- data: b.dataset.map((R) => R.y),
614
- color: $,
611
+ id: `debt-${x}`,
612
+ guid: h.guid,
613
+ label: h.name,
614
+ data: h.dataset.map((L) => L.y),
615
+ color: R,
615
616
  curve: "linear",
616
617
  type: "line",
617
618
  area: !0,
@@ -622,7 +623,7 @@ const we = ({
622
623
  C.push({
623
624
  id: "payoff-line",
624
625
  label: "Payoff Line",
625
- data: v.map((b) => b.y),
626
+ data: v.map((h) => h.y),
626
627
  color: c.palette.grey[700],
627
628
  curve: "linear",
628
629
  type: "line",
@@ -630,9 +631,9 @@ const we = ({
630
631
  showMark: !1,
631
632
  disableHighlight: !0
632
633
  });
633
- const A = (b) => C.findIndex((f) => f?.guid === b);
634
+ const B = (h) => C.findIndex((x) => x?.guid === h);
634
635
  return /* @__PURE__ */ e(
635
- ae,
636
+ re,
636
637
  {
637
638
  sx: {
638
639
  width: "100%",
@@ -647,19 +648,19 @@ const we = ({
647
648
  }
648
649
  },
649
650
  children: /* @__PURE__ */ e(
650
- Oe,
651
+ $e,
651
652
  {
652
653
  axisHighlight: { x: "none" },
653
654
  disableLineItemHighlight: !0,
654
655
  height: n,
655
- onAreaClick: (b, f) => {
656
+ onAreaClick: (h, x) => {
656
657
  i?.();
657
- const E = C.find(($) => $.id === f.seriesId);
658
- d(T.DEBTS_CLICK_CHART_AREA, { account_guid: E?.guid });
658
+ const A = C.find((R) => R.id === x.seriesId);
659
+ d(T.DEBTS_CLICK_CHART_AREA, { account_guid: A?.guid });
659
660
  },
660
- onHighlightChange: (b) => {
661
- const f = C.find((E) => E.id === b?.seriesId)?.guid;
662
- p?.(f ?? "");
661
+ onHighlightChange: (h) => {
662
+ const x = C.find((A) => A.id === h?.seriesId)?.guid;
663
+ p?.(x ?? "");
663
664
  },
664
665
  series: C,
665
666
  skipAnimation: !0,
@@ -685,10 +686,10 @@ const we = ({
685
686
  strokeDasharray: "10 5",
686
687
  strokeWidth: 1
687
688
  },
688
- [`& .MuiLineElement-series-debt-${A(o ?? "0")}`]: {
689
+ [`& .MuiLineElement-series-debt-${B(o ?? "0")}`]: {
689
690
  opacity: 1
690
691
  },
691
- [`& .MuiAreaElement-series-debt-${A(o ?? "0")}`]: {
692
+ [`& .MuiAreaElement-series-debt-${B(o ?? "0")}`]: {
692
693
  opacity: 1
693
694
  },
694
695
  "& .MuiChartsAxis-tickLabel > tspan": {
@@ -700,30 +701,30 @@ const we = ({
700
701
  width: r,
701
702
  xAxis: [
702
703
  {
703
- data: N,
704
+ data: I,
704
705
  scaleType: "time",
705
- min: u[0],
706
+ min: b[0],
706
707
  disableTicks: !0,
707
- valueFormatter: (b) => U(b, q.MONTH_SHORT_YEAR)
708
+ valueFormatter: (h) => K(h, U.MONTH_SHORT_YEAR)
708
709
  }
709
710
  ],
710
711
  yAxis: [
711
712
  {
712
713
  min: 0,
713
- max: B,
714
+ max: M,
714
715
  disableTicks: !0,
715
- valueFormatter: (b) => k(b, "0a")
716
+ valueFormatter: (h) => k(h, "0a")
716
717
  }
717
718
  ]
718
719
  }
719
720
  )
720
721
  }
721
722
  );
722
- }, mt = () => {
723
- const a = X(), { debts: n } = S(), { selectedDebtChartData: r } = L();
723
+ }, pt = () => {
724
+ const a = X(), { debts: n } = S(), { selectedDebtChartData: r } = $();
724
725
  return /* @__PURE__ */ s(H, { children: [
725
726
  /* @__PURE__ */ s(
726
- Le,
727
+ Fe,
727
728
  {
728
729
  sx: {
729
730
  "& .MuiCardContent-root:last-child": {
@@ -731,8 +732,8 @@ const we = ({
731
732
  }
732
733
  },
733
734
  children: [
734
- /* @__PURE__ */ e(He, { sx: { pb: 0 }, title: /* @__PURE__ */ e(De, { sx: { pb: 4 }, children: n.details_chart_title }) }),
735
- /* @__PURE__ */ e($e, { sx: { p: 0 }, children: /* @__PURE__ */ e(we, { debts: [r], height: 250 }) })
735
+ /* @__PURE__ */ e(Le, { sx: { pb: 0 }, title: /* @__PURE__ */ e(ve, { sx: { pb: 4 }, children: n.details_chart_title }) }),
736
+ /* @__PURE__ */ e(Re, { sx: { p: 0 }, children: /* @__PURE__ */ e(ge, { debts: [r], height: 250 }) })
736
737
  ]
737
738
  }
738
739
  ),
@@ -746,9 +747,9 @@ const we = ({
746
747
  }
747
748
  )
748
749
  ] });
749
- }, ht = D(mt), ut = () => {
750
- const a = X(), { onEvent: n } = F(), { debts: r } = S(), { selectedDebtChartData: t, showCompleted: o, showError: i } = L();
751
- return g.useEffect(() => n(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(ye, { children: i || o ? /* @__PURE__ */ e(
750
+ }, mt = D(pt), ht = () => {
751
+ const a = X(), { onEvent: n } = F(), { debts: r } = S(), { selectedDebtChartData: t, showCompleted: o, showError: i } = $();
752
+ return g.useEffect(() => n(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(_e, { children: i || o ? /* @__PURE__ */ e(
752
753
  l,
753
754
  {
754
755
  color: a.palette.secondary.main,
@@ -774,7 +775,7 @@ const we = ({
774
775
  },
775
776
  children: [
776
777
  /* @__PURE__ */ s(w, { flexGrow: 1, children: [
777
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: U(p, q.MONTH_YEAR) }),
778
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: K(p, U.MONTH_YEAR) }),
778
779
  /* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: r.schedule_month_label })
779
780
  ] }),
780
781
  /* @__PURE__ */ s(w, { children: [
@@ -810,8 +811,8 @@ const we = ({
810
811
  }
811
812
  ) })
812
813
  ] }) });
813
- }, bt = D(ut), _t = D(({ debt: a }) => {
814
- const { debts: n } = S(), { updateAccount: r } = J(), { onEvent: t } = F(), [o, i] = g.useState(a.interest_rate ?? 0), p = o < 0, c = async () => {
814
+ }, ut = D(ht), bt = D(({ debt: a }) => {
815
+ const { debts: n } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [o, i] = g.useState(a.interest_rate ?? 0), p = o < 0, c = async () => {
815
816
  await r({ ...a.account, interest_rate: o }), a.interest_rate = o, t(T.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
816
817
  }, d = () => {
817
818
  setTimeout(() => {
@@ -819,17 +820,17 @@ const we = ({
819
820
  }, 250);
820
821
  };
821
822
  return /* @__PURE__ */ e(
822
- Q,
823
+ J,
823
824
  {
824
825
  isSaveDisabled: p,
825
826
  label: `${n.details_interest_rate} (%)`,
826
827
  onCancel: d,
827
828
  onSave: c,
828
829
  primaryText: n.details_interest_rate,
829
- secondaryText: Me(Number(a.interest_rate) / 100),
830
+ secondaryText: Be(Number(a.interest_rate) / 100),
830
831
  zeroStateText: a.interest_rate ? void 0 : n.add_interest_rate,
831
832
  children: /* @__PURE__ */ e(
832
- Ye,
833
+ Xe,
833
834
  {
834
835
  error: p,
835
836
  fullWidth: !0,
@@ -840,8 +841,8 @@ const we = ({
840
841
  )
841
842
  }
842
843
  );
843
- }), yt = D(({ debt: a }) => {
844
- const { debts: n } = S(), { updateAccount: r } = J(), { onEvent: t } = F(), [o, i] = g.useState(a.monthly_payment ?? 0), p = o < 0 || o > 9999999999e-2, c = async () => {
844
+ }), _t = D(({ debt: a }) => {
845
+ const { debts: n } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [o, i] = g.useState(a.monthly_payment ?? 0), p = o < 0 || o > 9999999999e-2, c = async () => {
845
846
  await r({ ...a.account, minimum_payment: o }), a.monthly_payment = o, t(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
846
847
  }, d = () => {
847
848
  setTimeout(() => {
@@ -849,7 +850,7 @@ const we = ({
849
850
  }, 250);
850
851
  };
851
852
  return /* @__PURE__ */ e(
852
- Q,
853
+ J,
853
854
  {
854
855
  isSaveDisabled: p,
855
856
  label: n.details_monthly_payment,
@@ -859,7 +860,7 @@ const we = ({
859
860
  secondaryText: k(a.monthly_payment, "0,0"),
860
861
  zeroStateText: a.monthly_payment ? void 0 : n.add_monthly_payment,
861
862
  children: /* @__PURE__ */ e(
862
- ne,
863
+ ae,
863
864
  {
864
865
  amount: o,
865
866
  autoFocus: !0,
@@ -872,8 +873,8 @@ const we = ({
872
873
  )
873
874
  }
874
875
  );
875
- }), ft = D(({ debt: a }) => {
876
- const { debts: n } = S(), { updateAccount: r } = J(), { onEvent: t } = F(), [o, i] = g.useState(a.original_balance ?? 0), p = o < 0 || o > 9999999999e-2, c = async () => {
876
+ }), yt = D(({ debt: a }) => {
877
+ const { debts: n } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [o, i] = g.useState(a.original_balance ?? 0), p = o < 0 || o > 9999999999e-2, c = async () => {
877
878
  await r({ ...a.account, original_balance: o }), a.original_balance = o, t(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
878
879
  }, d = () => {
879
880
  setTimeout(() => {
@@ -881,7 +882,7 @@ const we = ({
881
882
  }, 250);
882
883
  };
883
884
  return /* @__PURE__ */ e(
884
- Q,
885
+ J,
885
886
  {
886
887
  isSaveDisabled: p,
887
888
  label: n.details_original_balance,
@@ -891,7 +892,7 @@ const we = ({
891
892
  secondaryText: k(a.original_balance, "0,0"),
892
893
  zeroStateText: a.original_balance ? void 0 : n.add_original_balance,
893
894
  children: /* @__PURE__ */ e(
894
- ne,
895
+ ae,
895
896
  {
896
897
  amount: o,
897
898
  autoFocus: !0,
@@ -904,35 +905,35 @@ const we = ({
904
905
  )
905
906
  }
906
907
  );
907
- }), xt = () => {
908
- const { onEvent: a } = F(), { selectedDebtChartData: n } = L();
908
+ }), ft = () => {
909
+ const { onEvent: a } = F(), { selectedDebtChartData: n } = $();
909
910
  return g.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(w, { bgcolor: "background.paper", children: [
910
911
  n?.goal && /* @__PURE__ */ s(H, { children: [
912
+ /* @__PURE__ */ e(Ge, { goal: n.goal }),
913
+ /* @__PURE__ */ e(j, {}),
914
+ /* @__PURE__ */ e(je, { goal: n.goal }),
915
+ /* @__PURE__ */ e(j, {}),
911
916
  /* @__PURE__ */ e(ze, { goal: n.goal }),
912
- /* @__PURE__ */ e(G, {}),
913
- /* @__PURE__ */ e(Xe, { goal: n.goal }),
914
- /* @__PURE__ */ e(G, {}),
915
- /* @__PURE__ */ e(Ve, { goal: n.goal }),
916
- /* @__PURE__ */ e(G, {})
917
+ /* @__PURE__ */ e(j, {})
917
918
  ] }),
918
919
  !n?.goal && n?.account && /* @__PURE__ */ s(H, { children: [
919
- /* @__PURE__ */ e(yt, { debt: n }),
920
- /* @__PURE__ */ e(G, {}),
921
920
  /* @__PURE__ */ e(_t, { debt: n }),
922
- /* @__PURE__ */ e(G, {}),
923
- /* @__PURE__ */ e(ft, { debt: n }),
924
- /* @__PURE__ */ e(G, {})
921
+ /* @__PURE__ */ e(j, {}),
922
+ /* @__PURE__ */ e(bt, { debt: n }),
923
+ /* @__PURE__ */ e(j, {}),
924
+ /* @__PURE__ */ e(yt, { debt: n }),
925
+ /* @__PURE__ */ e(j, {})
925
926
  ] })
926
927
  ] });
927
- }, gt = D(xt), wt = ({ setTabValue: a, sx: n }) => {
928
- const { debts: r } = S(), { showError: t, showCompleted: o } = L();
928
+ }, xt = D(ft), gt = ({ setTabValue: a, sx: n }) => {
929
+ const { debts: r } = S(), { showError: t, showCompleted: o } = $();
929
930
  return g.useEffect(() => {
930
931
  t && a(1);
931
932
  }, [t]), !t && !o ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ s(w, { gap: 16, children: [
932
- /* @__PURE__ */ e(ue, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ s(
933
- me,
933
+ /* @__PURE__ */ e(he, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ s(
934
+ pe,
934
935
  {
935
- icon: t ? /* @__PURE__ */ e(Ke, { filled: !0 }) : /* @__PURE__ */ e(fe, { color: "success", filled: !0 }),
936
+ icon: t ? /* @__PURE__ */ e(Ve, { filled: !0 }) : /* @__PURE__ */ e(ye, { color: "success", filled: !0 }),
936
937
  severity: "error",
937
938
  sx: {
938
939
  alignItems: "start",
@@ -945,13 +946,13 @@ const we = ({
945
946
  }
946
947
  },
947
948
  children: [
948
- /* @__PURE__ */ e(he, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: t ? r.status_error_title : r.status_complete_title }),
949
+ /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: t ? r.status_error_title : r.status_complete_title }),
949
950
  /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: t ? r.status_error_description : r.status_complete_description })
950
951
  ]
951
952
  }
952
953
  ) }),
953
- t && /* @__PURE__ */ e(ue, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ s(
954
- me,
954
+ t && /* @__PURE__ */ e(he, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ s(
955
+ pe,
955
956
  {
956
957
  icon: /* @__PURE__ */ e(H, {}),
957
958
  severity: "error",
@@ -963,18 +964,18 @@ const we = ({
963
964
  }
964
965
  },
965
966
  children: [
966
- /* @__PURE__ */ e(he, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r.status_info_title }),
967
+ /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r.status_info_title }),
967
968
  /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r.status_info_description })
968
969
  ]
969
970
  }
970
971
  ) })
971
972
  ] });
972
- }, Ct = D(wt), St = () => {
973
- const { debts: a } = S(), { showError: n, showCompleted: r } = L(), [t, o] = g.useState(0);
973
+ }, wt = D(gt), Ct = () => {
974
+ const { debts: a } = S(), { showError: n, showCompleted: r } = $(), [t, o] = g.useState(0);
974
975
  return /* @__PURE__ */ s(H, { children: [
975
- (n || r) && /* @__PURE__ */ e(Ct, { setTabValue: o, sx: { mt: -24 } }),
976
+ (n || r) && /* @__PURE__ */ e(wt, { setTabValue: o, sx: { mt: -24 } }),
976
977
  /* @__PURE__ */ s(
977
- je,
978
+ We,
978
979
  {
979
980
  "aria-label": a.details_tabs_aria_label,
980
981
  centered: !0,
@@ -984,7 +985,7 @@ const we = ({
984
985
  variant: "fullWidth",
985
986
  children: [
986
987
  /* @__PURE__ */ e(
987
- pe,
988
+ de,
988
989
  {
989
990
  "aria-controls": "debt-schedule-tabpanel-0",
990
991
  id: "debt-schedule-tab-0",
@@ -992,7 +993,7 @@ const we = ({
992
993
  }
993
994
  ),
994
995
  /* @__PURE__ */ e(
995
- pe,
996
+ de,
996
997
  {
997
998
  "aria-controls": "debt-details-tabpanel-1",
998
999
  id: "debt-details-tab-1",
@@ -1002,25 +1003,25 @@ const we = ({
1002
1003
  ]
1003
1004
  }
1004
1005
  ),
1005
- /* @__PURE__ */ e(be, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(bt, {}) }),
1006
- /* @__PURE__ */ e(be, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(gt, {}) })
1006
+ /* @__PURE__ */ e(ue, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(ut, {}) }),
1007
+ /* @__PURE__ */ e(ue, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(xt, {}) })
1007
1008
  ] });
1008
- }, vt = D(St), Dt = ({ isOpen: a, onClose: n }) => {
1009
- const { debts: r } = S(), { showError: t, showCompleted: o } = L(), i = t || o ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ e(ht, {});
1009
+ }, St = D(Ct), vt = ({ isOpen: a, onClose: n }) => {
1010
+ const { debts: r } = S(), { showError: t, showCompleted: o } = $(), i = t || o ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ e(mt, {});
1010
1011
  return /* @__PURE__ */ e(
1011
- re,
1012
+ te,
1012
1013
  {
1013
1014
  ariaLabelClose: r.details_close_aria,
1014
1015
  isOpen: a,
1015
1016
  onClose: n,
1016
1017
  title: r.details_title,
1017
1018
  children: /* @__PURE__ */ s(w, { bgcolor: "background.default", children: [
1018
- /* @__PURE__ */ e(Fe, { customDetailsChart: i }),
1019
- /* @__PURE__ */ e(vt, {})
1019
+ /* @__PURE__ */ e(ke, { customDetailsChart: i }),
1020
+ /* @__PURE__ */ e(St, {})
1020
1021
  ] })
1021
1022
  }
1022
1023
  );
1023
- }, Tt = D(() => {
1024
+ }, Dt = D(() => {
1024
1025
  const { debts: a } = S(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: r } = V(), { onEvent: t } = F(), [o, i] = g.useState(n?.extra_payment ?? 0), p = o < 0 || o > 9999999999e-2, c = async () => {
1025
1026
  n && (await r({ ...n, extra_payment: o }), n.extra_payment = o, t(T.DEBTS_SAVE_PAYDOWN_ACTION, {
1026
1027
  user_guid: n?.user_guid
@@ -1031,7 +1032,7 @@ const we = ({
1031
1032
  }, 250);
1032
1033
  };
1033
1034
  return /* @__PURE__ */ e(
1034
- Q,
1035
+ J,
1035
1036
  {
1036
1037
  isSaveDisabled: p,
1037
1038
  label: a.paydown_drawer_extra_payment,
@@ -1041,7 +1042,7 @@ const we = ({
1041
1042
  secondaryText: k(n?.extra_payment, "0,0"),
1042
1043
  zeroStateText: n?.extra_payment ? void 0 : a.add_extra_payment,
1043
1044
  children: /* @__PURE__ */ e(
1044
- ne,
1045
+ ae,
1045
1046
  {
1046
1047
  amount: o,
1047
1048
  autoFocus: !0,
@@ -1054,8 +1055,8 @@ const we = ({
1054
1055
  )
1055
1056
  }
1056
1057
  );
1057
- }), At = () => {
1058
- const { debts: a } = S(), { totalMonthlyPayments: n } = Z(), { monthlyCashFlowProfile: r } = V(), t = n + Number(r?.extra_payment);
1058
+ }), Tt = () => {
1059
+ const { debts: a } = S(), { totalMonthlyPayments: n } = q(), { monthlyCashFlowProfile: r } = V(), t = n + Number(r?.extra_payment);
1059
1060
  return /* @__PURE__ */ s(w, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1060
1061
  /* @__PURE__ */ s(w, { p: 24, children: [
1061
1062
  /* @__PURE__ */ s(w, { alignItems: "center", gap: 4, mb: 24, children: [
@@ -1068,26 +1069,26 @@ const we = ({
1068
1069
  /* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
1069
1070
  ] })
1070
1071
  ] }),
1071
- /* @__PURE__ */ e(w, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Tt, {}) }),
1072
+ /* @__PURE__ */ e(w, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Dt, {}) }),
1072
1073
  /* @__PURE__ */ e(w, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(w, { gap: 4, children: [
1073
1074
  /* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
1074
1075
  /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: k(t, "0,0") })
1075
1076
  ] }) })
1076
1077
  ] });
1077
- }, Et = D(At), It = ({ isOpen: a, onClose: n }) => {
1078
+ }, At = D(Tt), Et = ({ isOpen: a, onClose: n }) => {
1078
1079
  const { debts: r } = S();
1079
1080
  return /* @__PURE__ */ e(
1080
- re,
1081
+ te,
1081
1082
  {
1082
1083
  ariaLabelClose: r.paydown_drawer_close_aria,
1083
1084
  isOpen: a,
1084
1085
  onClose: n,
1085
1086
  title: r.paydown_drawer_title,
1086
- children: /* @__PURE__ */ e(Et, {})
1087
+ children: /* @__PURE__ */ e(At, {})
1087
1088
  }
1088
1089
  );
1089
1090
  };
1090
- function Bt(a, n) {
1091
+ function It(a, n) {
1091
1092
  const r = (t) => {
1092
1093
  if (typeof t == "number") return t;
1093
1094
  if (t === "!" || t === "✓") return 1 / 0;
@@ -1095,19 +1096,19 @@ function Bt(a, n) {
1095
1096
  };
1096
1097
  return r(a) - r(n);
1097
1098
  }
1098
- function Mt(a) {
1099
+ function Bt(a) {
1099
1100
  return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
1100
1101
  }
1101
- const Pt = (a) => {
1102
+ const Mt = (a) => {
1102
1103
  const n = {
1103
1104
  text: "#121417",
1104
1105
  background: "#FFB252"
1105
1106
  };
1106
1107
  return a === "!" && (n.text = "#FFFFFF", n.background = "#DF320C"), a === "✓" && (n.text = "#FFFFFF", n.background = "#09A57F"), n;
1107
- }, kt = (a) => {
1108
- const n = String(a.formattedValue), r = Pt(n);
1108
+ }, Pt = (a) => {
1109
+ const n = String(a.formattedValue), r = Mt(n);
1109
1110
  return /* @__PURE__ */ e(
1110
- ae,
1111
+ re,
1111
1112
  {
1112
1113
  sx: {
1113
1114
  display: "flex",
@@ -1123,11 +1124,11 @@ const Pt = (a) => {
1123
1124
  children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "Small", children: n })
1124
1125
  }
1125
1126
  );
1126
- }, Nt = (a) => {
1127
- const n = a.row.account, r = qe[n.account_type];
1127
+ }, kt = (a) => {
1128
+ const n = a.row.account, r = Ke[n.account_type];
1128
1129
  return /* @__PURE__ */ s(w, { alignItems: "center", flexDirection: "row", children: [
1129
1130
  /* @__PURE__ */ e(
1130
- Te,
1131
+ De,
1131
1132
  {
1132
1133
  alt: `${n.institutionName}`,
1133
1134
  institutionGuid: n.institution_guid || ""
@@ -1138,22 +1139,22 @@ const Pt = (a) => {
1138
1139
  /* @__PURE__ */ e(l, { variant: "XSmall", children: r })
1139
1140
  ] })
1140
1141
  ] });
1141
- }, Ft = ({
1142
+ }, Nt = ({
1142
1143
  sx: a = {},
1143
1144
  debts: n,
1144
1145
  hoveredDebtGuid: r,
1145
1146
  onHoverRow: t,
1146
1147
  onClickRow: o
1147
1148
  }) => {
1148
- const i = X(), { onEvent: p } = F(), { isMobile: c } = Y(), { debts: d } = S(), [m, u] = g.useState([
1149
+ const i = X(), { onEvent: p } = F(), { isMobile: c } = Y(), { debts: d } = S(), [m, b] = g.useState([
1149
1150
  { field: "priority", sort: "asc" }
1150
- ]), x = [
1151
+ ]), f = [
1151
1152
  {
1152
1153
  field: "priority",
1153
1154
  headerName: d.table_column_priority,
1154
- renderHeader: j,
1155
- renderCell: kt,
1156
- sortComparator: Bt,
1155
+ renderHeader: z,
1156
+ renderCell: Pt,
1157
+ sortComparator: It,
1157
1158
  sortable: !0,
1158
1159
  hideSortIcons: !0,
1159
1160
  type: "custom",
@@ -1165,8 +1166,8 @@ const Pt = (a) => {
1165
1166
  {
1166
1167
  field: "account",
1167
1168
  headerName: d.table_column_account,
1168
- renderHeader: j,
1169
- renderCell: Nt,
1169
+ renderHeader: z,
1170
+ renderCell: kt,
1170
1171
  sortable: !1,
1171
1172
  type: "custom",
1172
1173
  align: "left",
@@ -1177,7 +1178,7 @@ const Pt = (a) => {
1177
1178
  {
1178
1179
  field: "balance",
1179
1180
  headerName: d.table_column_balance,
1180
- renderHeader: j,
1181
+ renderHeader: z,
1181
1182
  renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: k(y.value, "0,0") }),
1182
1183
  sortable: !0,
1183
1184
  hideSortIcons: c,
@@ -1190,7 +1191,7 @@ const Pt = (a) => {
1190
1191
  {
1191
1192
  field: "interest_rate",
1192
1193
  headerName: d.table_column_interest_rate,
1193
- renderHeader: j,
1194
+ renderHeader: z,
1194
1195
  renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
1195
1196
  sortable: !0,
1196
1197
  hideSortIcons: c,
@@ -1203,8 +1204,8 @@ const Pt = (a) => {
1203
1204
  {
1204
1205
  field: "projected_payoff_date",
1205
1206
  headerName: d.table_column_payoff_date,
1206
- renderHeader: j,
1207
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: y.value ? U(y.value, q.MONTH_SHORT_YEAR) : "---" }),
1207
+ renderHeader: z,
1208
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: y.value ? K(y.value, U.MONTH_SHORT_YEAR) : "---" }),
1208
1209
  sortable: !0,
1209
1210
  hideSortIcons: c,
1210
1211
  type: "number",
@@ -1216,7 +1217,7 @@ const Pt = (a) => {
1216
1217
  {
1217
1218
  field: "monthly_payment",
1218
1219
  headerName: d.table_column_amount_due,
1219
- renderHeader: j,
1220
+ renderHeader: z,
1220
1221
  renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: typeof y.value == "number" ? k(y.value, "0,0") : "---" }),
1221
1222
  sortable: !0,
1222
1223
  hideSortIcons: c,
@@ -1226,13 +1227,13 @@ const Pt = (a) => {
1226
1227
  minWidth: 122,
1227
1228
  flex: 0.6
1228
1229
  }
1229
- ], h = [
1230
- ...x.slice(0, 3),
1230
+ ], u = [
1231
+ ...f.slice(0, 3),
1231
1232
  {
1232
1233
  field: "chevron",
1233
1234
  headerName: "",
1234
1235
  renderHeader: void 0,
1235
- renderCell: () => /* @__PURE__ */ e(te, { name: "chevron_right'" }),
1236
+ renderCell: () => /* @__PURE__ */ e(ee, { name: "chevron_right'" }),
1236
1237
  sortable: !0,
1237
1238
  hideSortIcons: !0,
1238
1239
  type: "custom",
@@ -1240,20 +1241,20 @@ const Pt = (a) => {
1240
1241
  headerAlign: "right",
1241
1242
  width: 20
1242
1243
  }
1243
- ], v = g.useMemo(() => n.map((y, M) => ({
1244
+ ], v = g.useMemo(() => n.map((y, N) => ({
1244
1245
  ...y,
1245
- id: M,
1246
- priority: Mt(y)
1247
- })), [n]), B = (y) => {
1248
- const f = y.target.closest("[data-id]")?.getAttribute("data-id"), E = n[Number(f)];
1249
- t?.(E?.guid ?? "");
1250
- }, N = (y) => {
1251
- c || B(y);
1246
+ id: N,
1247
+ priority: Bt(y)
1248
+ })), [n]), M = (y) => {
1249
+ const x = y.target.closest("[data-id]")?.getAttribute("data-id"), A = n[Number(x)];
1250
+ t?.(A?.guid ?? "");
1251
+ }, I = (y) => {
1252
+ c || M(y);
1252
1253
  }, C = (y) => {
1253
- c && B(y);
1254
- }, A = (y) => v.find((M) => M.guid === y)?.id;
1254
+ c && M(y);
1255
+ }, B = (y) => v.find((N) => N.guid === y)?.id;
1255
1256
  return /* @__PURE__ */ e(
1256
- ae,
1257
+ re,
1257
1258
  {
1258
1259
  sx: {
1259
1260
  height: "100dvh",
@@ -1264,9 +1265,9 @@ const Pt = (a) => {
1264
1265
  ...a
1265
1266
  },
1266
1267
  children: /* @__PURE__ */ e(
1267
- Ue,
1268
+ Ye,
1268
1269
  {
1269
- columns: c ? h : x,
1270
+ columns: c ? u : f,
1270
1271
  disableColumnFilter: !0,
1271
1272
  disableColumnMenu: !0,
1272
1273
  hideFooter: !0,
@@ -1275,13 +1276,13 @@ const Pt = (a) => {
1275
1276
  o(), p(T.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
1276
1277
  },
1277
1278
  onSortModelChange: (y) => {
1278
- u(y), p(T.DEBTS_CLICK_TABLE_SORT);
1279
+ b(y), p(T.DEBTS_CLICK_TABLE_SORT);
1279
1280
  },
1280
1281
  rows: v,
1281
1282
  slotProps: {
1282
1283
  baseIconButton: { color: "secondary", sx: { ml: 8 } },
1283
1284
  row: {
1284
- onMouseEnter: N,
1285
+ onMouseEnter: I,
1285
1286
  onMouseLeave: () => !c && t?.(""),
1286
1287
  onTouchStart: C,
1287
1288
  onClick: c ? C : void 0
@@ -1290,7 +1291,7 @@ const Pt = (a) => {
1290
1291
  sortModel: m,
1291
1292
  sortingOrder: ["asc", "desc"],
1292
1293
  sx: {
1293
- [`& .MuiDataGrid-row[data-id="${A(r)}"]`]: {
1294
+ [`& .MuiDataGrid-row[data-id="${B(r)}"]`]: {
1294
1295
  backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1295
1296
  filter: "brightness(98%)"
1296
1297
  }
@@ -1299,33 +1300,33 @@ const Pt = (a) => {
1299
1300
  )
1300
1301
  }
1301
1302
  );
1302
- }, Rt = ({ buttonText: a, isOpen: n, onClick: r }) => {
1303
+ }, Ft = ({ buttonText: a, isOpen: n, onClick: r }) => {
1303
1304
  const { isDesktop: t, isTablet: o } = Y(), i = n ? "unfold_less" : "unfold_more";
1304
1305
  return t || o ? /* @__PURE__ */ e(
1305
- xe,
1306
+ fe,
1306
1307
  {
1307
1308
  "aria-controls": "prioritize-debts",
1308
1309
  "aria-describedby": "prioritize-debts",
1309
1310
  "aria-haspopup": !0,
1310
1311
  "aria-label": "prioritize-debts",
1311
1312
  onClick: r,
1312
- startIcon: /* @__PURE__ */ e(te, { name: i }),
1313
+ startIcon: /* @__PURE__ */ e(ee, { name: i }),
1313
1314
  sx: { justifyContent: "start", minWidth: 214, mx: 4 },
1314
1315
  children: a
1315
1316
  }
1316
1317
  ) : /* @__PURE__ */ e(
1317
- Ze,
1318
+ Ue,
1318
1319
  {
1319
1320
  "aria-controls": "prioritize-debts",
1320
1321
  "aria-describedby": "prioritize-debts",
1321
1322
  "aria-haspopup": !0,
1322
1323
  "aria-label": "prioritize-debts",
1323
1324
  onClick: r,
1324
- children: /* @__PURE__ */ e(te, { name: i })
1325
+ children: /* @__PURE__ */ e(ee, { name: i })
1325
1326
  }
1326
1327
  );
1327
- }, Lt = D(({ buttonEl: a, onClose: n }) => {
1328
- const { onEvent: r } = F(), { debts: t } = S(), { selectedDebtPriority: o, setSelectedDebtPriority: i } = L(), p = !!a, c = [
1328
+ }, Rt = D(({ buttonEl: a, onClose: n }) => {
1329
+ const { onEvent: r } = F(), { debts: t } = S(), { selectedDebtPriority: o, setSelectedDebtPriority: i } = $(), p = !!a, c = [
1329
1330
  {
1330
1331
  priority: P.FASTEST_PAYOFF_FIRST,
1331
1332
  text: t.priority_sort_fastest_payoff
@@ -1346,7 +1347,7 @@ const Pt = (a) => {
1346
1347
  i(m), r(T.DEBTS_CLICK_PRIORITY, { debts_priority: m });
1347
1348
  };
1348
1349
  return /* @__PURE__ */ e(
1349
- Qe,
1350
+ Ze,
1350
1351
  {
1351
1352
  anchorEl: a,
1352
1353
  anchorOrigin: {
@@ -1360,8 +1361,8 @@ const Pt = (a) => {
1360
1361
  vertical: "top",
1361
1362
  horizontal: "left"
1362
1363
  },
1363
- children: /* @__PURE__ */ e(ye, { children: c.map(({ priority: m, text: u }) => /* @__PURE__ */ s(
1364
- Je,
1364
+ children: /* @__PURE__ */ e(_e, { children: c.map(({ priority: m, text: b }) => /* @__PURE__ */ s(
1365
+ qe,
1365
1366
  {
1366
1367
  onClick: () => d(m),
1367
1368
  sx: {
@@ -1379,16 +1380,16 @@ const Pt = (a) => {
1379
1380
  }
1380
1381
  },
1381
1382
  children: [
1382
- /* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: u }),
1383
- o === m && /* @__PURE__ */ e(fe, { color: "inherit", filled: !0, fontSize: "small" })
1383
+ /* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: b }),
1384
+ o === m && /* @__PURE__ */ e(ye, { color: "inherit", filled: !0, fontSize: "small" })
1384
1385
  ]
1385
1386
  },
1386
1387
  m
1387
1388
  )) })
1388
1389
  }
1389
1390
  );
1390
- }), $t = D(() => {
1391
- const { onEvent: a } = F(), { debts: n } = S(), { selectedDebtPriority: r } = L(), [t, o] = g.useState(null), i = (m) => {
1391
+ }), Lt = D(() => {
1392
+ const { onEvent: a } = F(), { debts: n } = S(), { selectedDebtPriority: r } = $(), [t, o] = g.useState(null), i = (m) => {
1392
1393
  o(m.currentTarget), a(T.DEBTS_CLICK_PRIORITIZE);
1393
1394
  }, p = () => {
1394
1395
  o(null);
@@ -1399,12 +1400,12 @@ const Pt = (a) => {
1399
1400
  [P.LOWEST_BALANCE]: n.priority_sort_lowest_balance
1400
1401
  })[r] ?? n.priority_sort_lowest_balance, [r]);
1401
1402
  return /* @__PURE__ */ s(_, { children: [
1402
- /* @__PURE__ */ e(Rt, { buttonText: d, isOpen: c, onClick: i }),
1403
- /* @__PURE__ */ e(Lt, { buttonEl: t, onClose: p })
1403
+ /* @__PURE__ */ e(Ft, { buttonText: d, isOpen: c, onClick: i }),
1404
+ /* @__PURE__ */ e(Rt, { buttonEl: t, onClose: p })
1404
1405
  ] });
1405
- }), Ht = (a, n, r = 0) => {
1406
+ }), $t = (a, n, r = 0) => {
1406
1407
  const t = a.map((d) => ({ ...d }));
1407
- ge(t, n);
1408
+ xe(t, n);
1408
1409
  const o = /* @__PURE__ */ new Date(), i = [];
1409
1410
  let p = 0, c = 1;
1410
1411
  for (const d of t)
@@ -1414,23 +1415,23 @@ const Pt = (a) => {
1414
1415
  dataset: [{ x: new Date(o), y: d.balance }]
1415
1416
  });
1416
1417
  for (; t.some((d) => d.balance >= 0.01 && !d.is_impossible); ) {
1417
- let d = !1, m = !1, u = !1;
1418
- for (const [x, h] of t.entries()) {
1419
- if (h.balance <= 0.01) continue;
1420
- const v = i[x].dataset, N = (h.interest_rate ?? 0) / 100 / 12, C = h.balance * N, A = h.monthly_payment ?? 0;
1421
- let y = A, M = 0;
1422
- !u && r > 0 && (y += r, u = !0), !m && p > 0 && (M = p, m = !0), h.balance += C;
1423
- const b = Math.min(h.balance, y + M);
1424
- if (b <= C) {
1425
- h.is_impossible = !0, i[x].is_impossible = !0, i[x].priority = void 0, v.push({ x: new Date(o), y: h.balance });
1418
+ let d = !1, m = !1, b = !1;
1419
+ for (const [f, u] of t.entries()) {
1420
+ if (u.balance <= 0.01) continue;
1421
+ const v = i[f].dataset, I = (u.interest_rate ?? 0) / 100 / 12, C = u.balance * I, B = u.monthly_payment ?? 0;
1422
+ let y = B, N = 0;
1423
+ !b && r > 0 && (y += r, b = !0), !m && p > 0 && (N = p, m = !0), u.balance += C;
1424
+ const h = Math.min(u.balance, y + N);
1425
+ if (h <= C) {
1426
+ u.is_impossible = !0, i[f].is_impossible = !0, i[f].priority = void 0, v.push({ x: new Date(o), y: u.balance });
1426
1427
  continue;
1427
1428
  }
1428
- h.balance -= b, h.balance = h.balance < 0.01 ? 0 : h.balance, v.push({
1429
+ u.balance -= h, u.balance = u.balance < 0.01 ? 0 : u.balance, v.push({
1429
1430
  x: new Date(o),
1430
- y: Math.max(0, h.balance),
1431
- payment: b,
1432
- extra: M
1433
- }), h.balance <= 0 && (p += A, i[x].projected_payoff_date = new Date(o)), b > 0 && (d = !0);
1431
+ y: Math.max(0, u.balance),
1432
+ payment: h,
1433
+ extra: N
1434
+ }), u.balance <= 0 && (p += B, i[f].projected_payoff_date = new Date(o)), h > 0 && (d = !0);
1434
1435
  }
1435
1436
  d && o.setMonth(o.getMonth() + 1);
1436
1437
  }
@@ -1439,10 +1440,10 @@ const Pt = (a) => {
1439
1440
  }), i.forEach((d) => {
1440
1441
  d.priority = !d.is_paid_off && !d.is_impossible ? c++ : void 0;
1441
1442
  }), i;
1442
- }, Ot = D(({ onClick: a }) => {
1443
- const { debts: n } = S(), { isDesktop: r } = Y(), { totalMonthlyPayments: t } = Z(), { monthlyCashFlowProfile: o } = V(), i = t + Number(o?.extra_payment), p = r ? n.paydown_button_long : n.paydown_button_short;
1443
+ }, Ht = D(({ onClick: a }) => {
1444
+ const { debts: n } = S(), { isDesktop: r } = Y(), { totalMonthlyPayments: t } = q(), { monthlyCashFlowProfile: o } = V(), i = t + Number(o?.extra_payment), p = r ? n.paydown_button_long : n.paydown_button_short;
1444
1445
  return /* @__PURE__ */ e(
1445
- xe,
1446
+ fe,
1446
1447
  {
1447
1448
  "aria-controls": "extra-paydown",
1448
1449
  "aria-describedby": "extra-paydown",
@@ -1450,102 +1451,105 @@ const Pt = (a) => {
1450
1451
  "aria-label": "extra-paydown",
1451
1452
  onClick: a,
1452
1453
  sx: { justifyContent: "start", minWidth: 100, mx: 4 },
1453
- children: I(p, k(i, "0,0"))
1454
+ children: E(p, k(i, "0,0"))
1454
1455
  }
1455
1456
  );
1456
- }), Wt = ({ onBackClick: a, sx: n }) => {
1457
- const [r, t] = g.useState(!1), [o, i] = g.useState(!1), [p, c] = g.useState(!1), [d, m] = g.useState(""), { isDesktop: u, isMobile: x } = Y(), { debts: h } = S(), { onEvent: v } = F(), { onLoad: B } = ke(), { isCopyLoaded: N, isInitialized: C, setSelectedAccounts: A } = Ne(), { setSelectedAccount: y } = Re(), { selectedDebtPriority: M, setSelectedDebtChartData: b } = L(), { visibleDebtAccounts: f } = J(), { goalsLoaded: E, loadGoals: $, monthlyCashFlowProfile: R } = V(), { debts: z } = Z(), K = g.useMemo(() => {
1458
- const O = R?.extra_payment ?? 0;
1459
- return Ht(z, M, O);
1460
- }, [z, M, R]);
1457
+ }), Ot = ({ onBackClick: a, sx: n }) => {
1458
+ const [r, t] = g.useState(!1), [o, i] = g.useState(!1), [p, c] = g.useState(!1), [d, m] = g.useState(""), { isDesktop: b, isMobile: f } = Y(), { debts: u } = S(), { onEvent: v } = F(), { isCopyLoaded: M, isInitialized: I, setSelectedAccounts: C } = Pe(), { setSelectedAccount: B } = Ne(), { selectedDebtPriority: y, setSelectedDebtChartData: N } = $(), { visibleDebtAccounts: h } = Z(), { goalsLoaded: x, loadGoals: A, monthlyCashFlowProfile: R } = V(), { debts: L } = q();
1459
+ Je({
1460
+ widgetName: "DebtsWidget",
1461
+ isLoaded: x
1462
+ });
1463
+ const O = g.useMemo(() => {
1464
+ const W = R?.extra_payment ?? 0;
1465
+ return $t(L, y, W);
1466
+ }, [L, y, R]);
1461
1467
  g.useEffect(() => {
1462
- A(f), v(T.DEBTS_VIEW);
1468
+ C(h), v(T.DEBTS_VIEW);
1463
1469
  }, []), g.useEffect(() => {
1464
- A(f);
1465
- }, [f]), g.useEffect(() => {
1466
- C && $().finally(() => {
1467
- B?.("DebtsWidget");
1468
- });
1469
- }, [C]);
1470
- const oe = (O) => m(O), ie = () => {
1471
- const O = f.find((ee) => ee.guid === d), le = K.find((ee) => ee.guid === d);
1472
- O && y(O), le && b(le), t(!0);
1473
- }, Ce = () => v(T.DEBTS_CLICK_FILTER), Se = () => {
1470
+ C(h);
1471
+ }, [h]), g.useEffect(() => {
1472
+ I && A().finally();
1473
+ }, [I]);
1474
+ const ne = (W) => m(W), oe = () => {
1475
+ const W = h.find((Q) => Q.guid === d), ie = O.find((Q) => Q.guid === d);
1476
+ W && B(W), ie && N(ie), t(!0);
1477
+ }, we = () => v(T.DEBTS_CLICK_FILTER), Ce = () => {
1474
1478
  c(!0), v(T.DEBTS_CLICK_SNOWBALL_CTA);
1475
- }, ve = () => {
1479
+ }, Se = () => {
1476
1480
  i(!0), v(T.DEBTS_CLICK_PAYDOWN);
1477
1481
  };
1478
- return !E || !N || !C ? /* @__PURE__ */ e(et, {}) : /* @__PURE__ */ s(
1479
- Ge,
1482
+ return !x || !M || !I ? /* @__PURE__ */ e(Qe, {}) : /* @__PURE__ */ s(
1483
+ Oe,
1480
1484
  {
1481
- accountOptions: f,
1485
+ accountOptions: h,
1482
1486
  actions: [
1483
- /* @__PURE__ */ e($t, {}, "prioritize-debts"),
1484
- /* @__PURE__ */ e(Ot, { onClick: ve }, "extra-paydown")
1487
+ /* @__PURE__ */ e(Lt, {}, "prioritize-debts"),
1488
+ /* @__PURE__ */ e(Ht, { onClick: Se }, "extra-paydown")
1485
1489
  ],
1486
- onAccountsFilterClick: Ce,
1490
+ onAccountsFilterClick: we,
1487
1491
  onBackClick: a,
1488
1492
  sx: n,
1489
- title: h.title,
1493
+ title: u.title,
1490
1494
  children: [
1491
- /* @__PURE__ */ s(w, { sx: { px: u ? "48px" : "24px" }, children: [
1495
+ /* @__PURE__ */ s(w, { sx: { px: b ? "48px" : "24px" }, children: [
1492
1496
  /* @__PURE__ */ s(
1493
1497
  w,
1494
1498
  {
1495
1499
  sx: {
1496
- alignItems: x ? "flex-start" : "flex-end",
1497
- flexDirection: x ? "column" : "row",
1498
- mx: x ? "-12px" : 0
1500
+ alignItems: f ? "flex-start" : "flex-end",
1501
+ flexDirection: f ? "column" : "row",
1502
+ mx: f ? "-12px" : 0
1499
1503
  },
1500
1504
  children: [
1501
1505
  /* @__PURE__ */ e(
1502
- we,
1506
+ ge,
1503
1507
  {
1504
- debts: K,
1505
- height: x ? 250 : void 0,
1508
+ debts: O,
1509
+ height: f ? 250 : void 0,
1506
1510
  hoveredDebtGuid: d,
1507
- onClickArea: ie,
1508
- onHoverArea: oe,
1509
- sx: { mr: x ? "4px" : "-48px" }
1511
+ onClickArea: oe,
1512
+ onHoverArea: ne,
1513
+ sx: { mr: f ? "4px" : "-48px" }
1510
1514
  }
1511
1515
  ),
1512
1516
  /* @__PURE__ */ e(
1513
- lt,
1517
+ it,
1514
1518
  {
1515
- debts: K,
1516
- onClickCta: Se,
1517
- sx: { mb: x ? "0px" : "64px" }
1519
+ debts: O,
1520
+ onClickCta: Ce,
1521
+ sx: { mb: f ? "0px" : "64px" }
1518
1522
  }
1519
1523
  )
1520
1524
  ]
1521
1525
  }
1522
1526
  ),
1523
- /* @__PURE__ */ e(w, { sx: { mx: x ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1524
- Ft,
1527
+ /* @__PURE__ */ e(w, { sx: { mx: f ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1528
+ Nt,
1525
1529
  {
1526
- debts: K,
1530
+ debts: O,
1527
1531
  hoveredDebtGuid: d,
1528
- onClickRow: ie,
1529
- onHoverRow: oe
1532
+ onClickRow: oe,
1533
+ onHoverRow: ne
1530
1534
  }
1531
1535
  ) })
1532
1536
  ] }),
1533
1537
  /* @__PURE__ */ e(
1534
- ct,
1538
+ st,
1535
1539
  {
1536
1540
  isOpen: p,
1537
1541
  onClose: () => c(!1)
1538
1542
  }
1539
1543
  ),
1540
- /* @__PURE__ */ e(Dt, { isOpen: r, onClose: () => t(!1) }),
1541
- /* @__PURE__ */ e(It, { isOpen: o, onClose: () => i(!1) })
1544
+ /* @__PURE__ */ e(vt, { isOpen: r, onClose: () => t(!1) }),
1545
+ /* @__PURE__ */ e(Et, { isOpen: o, onClose: () => i(!1) })
1542
1546
  ]
1543
1547
  }
1544
1548
  );
1545
- }, Nr = D(Wt);
1549
+ }, Nr = D(Ot);
1546
1550
  export {
1547
- we as DebtsChart,
1551
+ ge as DebtsChart,
1548
1552
  Lr as DebtsStore,
1549
- Ft as DebtsTable,
1553
+ Nt as DebtsTable,
1550
1554
  Nr as DebtsWidget
1551
1555
  };