@mx-cartographer/experiences 7.4.8-alpha.mm1 → 7.4.8

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