@mx-cartographer/experiences 8.0.18 → 8.0.20

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