@mx-cartographer/experiences 7.13.21 → 7.13.22-alpha.al0

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 (67) hide show
  1. package/dist/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-CG9VtEpj.mjs} +2 -2
  2. package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-BDFCEhSI.mjs} +2 -2
  3. package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-Bn1eH2EU.mjs} +1 -1
  4. package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-BCSxP3M3.mjs} +1 -1
  5. package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-tvJUjmwZ.mjs} +1 -1
  6. package/dist/{Connect-eYIWqCEr.mjs → Connect-CmjOgy5v.mjs} +1 -1
  7. package/dist/{ConnectDrawer-C0wjwcJt.mjs → ConnectDrawer-Be0RkL7I.mjs} +2 -2
  8. package/dist/{ConnectionsDrawer-IA7vnv1J.mjs → ConnectionsDrawer-yeD_PsY1.mjs} +2 -2
  9. package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-xu9UcYZR.mjs} +1 -1
  10. package/dist/DateRangeSelector-DE4UR77m.mjs +275 -0
  11. package/dist/{ExportCsvAction-izkIdXj5.mjs → ExportCsvAction-CLUDN8jI.mjs} +3 -3
  12. package/dist/{GlobalAccountFilter-B73Pw1hJ.mjs → GlobalAccountFilter-BkUeAltd.mjs} +90 -96
  13. package/dist/{GoalStore-DB58sKTC.mjs → GoalStore-DMhiGiF4.mjs} +1 -1
  14. package/dist/{Help-D-laTbKu.mjs → Help-pcoNjCaF.mjs} +1 -1
  15. package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DIjY-HBq.mjs} +1 -1
  16. package/dist/{ListItemAction-4KB7P75M.mjs → ListItemAction-BQIdxB-9.mjs} +1 -1
  17. package/dist/{ManageIncome-B1j-AzI1.mjs → ManageIncome-DWVaWpCT.mjs} +4 -4
  18. package/dist/{MicroWidgetContainer-B_EnfvCq.mjs → MicroWidgetContainer-CTMkXRJM.mjs} +1 -1
  19. package/dist/{MiniWidgetContainer-Bhkv-hpz.mjs → MiniWidgetContainer-BKPN3c-6.mjs} +1 -1
  20. package/dist/{NotificationSettings-C77J42Ue.mjs → NotificationSettings-O3iUw7-O.mjs} +32 -32
  21. package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-2lCGZTRv.mjs} +3 -3
  22. package/dist/{RecurringSettings-Dyj3i0ZJ.mjs → RecurringSettings-DNko1CD0.mjs} +2 -2
  23. package/dist/{SpendingLegend-BgjazduU.mjs → SpendingLegend-CGYqNtOp.mjs} +1 -1
  24. package/dist/{StatusIndicator-CIKUOoN_.mjs → StatusIndicator-CnDblSmc.mjs} +2 -2
  25. package/dist/{Transaction-CqjlF6SO.mjs → Transaction-Bd0myZzA.mjs} +1 -1
  26. package/dist/{TransactionDetails-CwqokbQo.mjs → TransactionDetails-DAB5arBD.mjs} +6 -6
  27. package/dist/{TransactionStore-rpqhGX8m.mjs → TransactionStore-hzVucfUK.mjs} +2 -2
  28. package/dist/{ViewMoreMicroCard-D24H9kDm.mjs → ViewMoreMicroCard-BWCe3UeO.mjs} +1 -1
  29. package/dist/WidgetContainer-BPeSl0Dj.mjs +180 -0
  30. package/dist/WidgetContainerV2-BjOelON7.mjs +127 -0
  31. package/dist/accounts/index.es.js +218 -219
  32. package/dist/analytics/index.es.js +8 -8
  33. package/dist/budgets/index.es.js +408 -409
  34. package/dist/cashflow/index.es.js +227 -228
  35. package/dist/categories/index.es.js +1 -1
  36. package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
  37. package/dist/common/components/WidgetContainer.d.ts +3 -2
  38. package/dist/common/components/WidgetContainerV2.d.ts +4 -0
  39. package/dist/common/components/index.d.ts +1 -0
  40. package/dist/common/index.es.js +167 -164
  41. package/dist/dashboard/index.es.js +5 -5
  42. package/dist/debts/index.es.js +585 -586
  43. package/dist/{exportTransactionsToCSV-CdTF_RqL.mjs → exportTransactionsToCSV-CamFllci.mjs} +1 -1
  44. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  45. package/dist/finstrong/index.es.js +641 -652
  46. package/dist/goals/GoalsWidget.d.ts +1 -1
  47. package/dist/goals/index.es.js +498 -499
  48. package/dist/help/index.es.js +8 -8
  49. package/dist/{hooks-BxkfR-Ff.mjs → hooks-DOWEalfb.mjs} +2 -2
  50. package/dist/insights/index.es.js +3 -3
  51. package/dist/investments/InvestmentsWidget.d.ts +1 -1
  52. package/dist/investments/index.es.js +448 -449
  53. package/dist/merchants/index.es.js +1 -1
  54. package/dist/microinsights/index.es.js +1 -1
  55. package/dist/networth/index.es.js +182 -196
  56. package/dist/notifications/index.es.js +2 -2
  57. package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
  58. package/dist/recurringtransactions/index.es.js +240 -242
  59. package/dist/settings/index.es.js +7 -7
  60. package/dist/spending/index.es.js +8 -8
  61. package/dist/transactions/index.es.js +246 -248
  62. package/dist/trends/index.es.js +12 -12
  63. package/dist/{useAccountDisplayName-DKwT1mWv.mjs → useAccountDisplayName-DQc7zGqk.mjs} +1 -1
  64. package/dist/{useInsightsEnabled-DL_oNyI0.mjs → useInsightsEnabled-DojdZhOg.mjs} +1 -1
  65. package/dist/{useWidgetLoadTimer-DgN1bTyu.mjs → useWidgetLoadTimer-DmYEMfRw.mjs} +1 -1
  66. package/package.json +1 -1
  67. package/dist/WidgetContainer-B7xDq2bM.mjs +0 -441
@@ -1,75 +1,75 @@
1
- import { jsx as e, jsxs as s, Fragment as $ } from "react/jsx-runtime";
2
- import x from "react";
1
+ import { jsx as e, jsxs as s, Fragment as O } from "react/jsx-runtime";
2
+ import f 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";
4
+ import x from "@mui/material/Stack";
5
+ import { useTheme as Y, Card as ge, Stack as _, Box as G } from "@mui/material";
6
+ import { Text as l, P as we, H3 as Be, InstitutionLogo as Fe, Icon as ne } from "@mxenabled/mxui";
7
+ import { intervalToDuration as Le, formatDuration as $e } from "date-fns";
8
+ import { addMonths as he } from "date-fns/addMonths";
9
+ import { fromUnixTime as me } from "date-fns/fromUnixTime";
10
+ import { getUnixTime as ue } from "date-fns/getUnixTime";
11
+ import { a as N, M as Oe, I as He } from "../DebtsStore-BZqNLaqd.mjs";
12
+ import { D as to } from "../DebtsStore-BZqNLaqd.mjs";
13
+ import { f as P, a as We } from "../NumberFormatting-QCaNwbjv.mjs";
14
+ import { f as J, D as Q } from "../DateFormats-BMpMrZpW.mjs";
15
+ import { G as Ge, v as ee, u as C, k as K, f as B, d as te, a as je, b as ze } from "../hooks-DOWEalfb.mjs";
16
16
  import { u as U } from "../useScreenSize-B6JyS_Lj.mjs";
17
- import { D as ie } from "../Drawer-Bbe4AMB1.mjs";
17
+ import { D as ae } 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";
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-BYItVAe-.mjs";
27
- import _e from "@mui/material/Tab";
28
- import Qe from "@mui/material/Tabs";
29
- import ve from "@mui/material/List";
30
- import G from "@mui/material/Divider";
31
- import { M as et, I as tt, O as rt } from "../OriginalBalanceAction-DjpvVVFz.mjs";
32
- import ot from "@mui/material/TextField";
33
- import { L as oe } from "../ListItemAction-4KB7P75M.mjs";
34
- 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";
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-B7xDq2bM.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);
19
+ import { A as Ve, u as Ye } from "../AccountDetailsHeader-CG9VtEpj.mjs";
20
+ import Ke from "@mui/material/Card";
21
+ import Ue from "@mui/material/CardContent";
22
+ import qe from "@mui/material/CardHeader";
23
+ import ie from "@mui/material/Box";
24
+ import { useTheme as Xe } from "@mui/material/styles";
25
+ import { LineChart as Ze } from "@mui/x-charts/LineChart";
26
+ import { A } from "../Analytics-BYItVAe-.mjs";
27
+ import be from "@mui/material/Tab";
28
+ import Je from "@mui/material/Tabs";
29
+ import Ce from "@mui/material/List";
30
+ import j from "@mui/material/Divider";
31
+ import { M as Qe, I as et, O as tt } from "../OriginalBalanceAction-2lCGZTRv.mjs";
32
+ import rt from "@mui/material/TextField";
33
+ import { L as re } from "../ListItemAction-BQIdxB-9.mjs";
34
+ import { C as le } from "../CurrencyInput-xu9UcYZR.mjs";
35
+ import _e from "@mui/material/Alert";
36
+ import ye from "@mui/material/AlertTitle";
37
+ import fe from "@mui/material/Paper";
38
+ import { Error as ot, CheckCircle as ve } from "@mxenabled/mx-icons";
39
+ import { T as xe } from "../TabContentContainer-j01JYR_7.mjs";
40
+ import { DataGridPro as nt } from "@mui/x-data-grid-pro";
41
+ import { H as z } from "../HeaderCell-P8w6CmfO.mjs";
42
+ import { f as at, A as V } from "../Account-BiB1F8lL.mjs";
43
+ import De from "@mui/material/Button";
44
+ import it from "@mui/material/IconButton";
45
+ import lt from "@mui/material/ListItem";
46
+ import st from "@mui/material/Popover";
47
+ import { C as ct } from "../ConnectDrawer-Be0RkL7I.mjs";
48
+ import { u as dt } from "../useWidgetLoadTimer-DmYEMfRw.mjs";
49
+ import { L as pt } from "../Loader-D3rjKx72.mjs";
50
+ import { W as ht } from "../WidgetContainerV2-BjOelON7.mjs";
51
+ import { E as mt } from "../EmptyState-DHAkGsjk.mjs";
52
+ const ut = (o, n = 0, t = 0) => {
53
+ if (t === 0) return 0;
54
+ const r = n / (Oe * He);
55
55
  return Math.ceil(
56
- t === 0 ? o / r : -Math.log(1 - t * o / r) / Math.log(1 + t)
56
+ r === 0 ? o / t : -Math.log(1 - r * o / t) / Math.log(1 + r)
57
57
  );
58
- }, _t = (o, n, r, t, a) => {
58
+ }, bt = (o, n, t, r, 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 (t === 0) {
61
+ for (let c = 0; c < o; c++) {
62
+ const p = n - r * (c + 1), h = n - r * c, u = p >= 0 ? r : 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: t,
66
+ payment: u,
67
+ principal: u,
68
+ timestamp: ue(
69
+ he(
70
+ me(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 = t / 1200;
81
+ for (let c = 0; c < o; c++) {
82
+ const p = ue(he(me(a), c + 1)), h = Math.pow(1 + d, c), u = n * h - r * ((h - 1) / d), w = Math.pow(1 + d, c + 1), b = n * w - r * ((w - 1) / d), k = r + Math.min(b, 0), I = 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: I,
86
+ payment: k,
87
+ principal: k - I,
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
+ }, _t = (o) => (o[o.length - 1] || {}).timestamp, yt = (o) => {
93
+ const { monthly_payment: n, interest_rate: t, balance: r, payment_due_date: a } = o, i = ut(r, t ?? 0, n ?? 0), d = bt(
94
94
  i,
95
- t,
96
- r ?? 0,
95
+ r,
96
+ t ?? 0,
97
97
  n ?? 0,
98
98
  a
99
- ), d = yt(c);
99
+ ), c = _t(d);
100
100
  return {
101
101
  ...o,
102
- minimumFinalPayment: d,
103
- minimumPayments: c
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
+ }, Se = (o, n) => {
106
+ const [t, r] = o.reduce(
107
+ ([a, i], d) => (d.is_paid_off || d.is_impossible ? i.push({ ...d, minimumPayments: [] }) : a.push(yt(d)), [a, i]),
108
108
  [[], []]
109
109
  );
110
110
  switch (n) {
111
- case P.FASTEST_PAYOFF_FIRST:
112
- r.sort((a, i) => (a.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
111
+ case N.FASTEST_PAYOFF_FIRST:
112
+ t.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
+ t.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
+ t.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
+ t.sort((a, i) => i.balance - a.balance);
122
122
  break;
123
123
  default:
124
- r.sort((a, i) => a.balance - i.balance);
124
+ t.sort((a, i) => a.balance - i.balance);
125
125
  }
126
- o.splice(0, o.length, ...r, ...t);
126
+ o.splice(0, o.length, ...t, ...r);
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 ft(o, n, t = 0) {
129
+ const r = o.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
+ Se(r, n);
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 (; r.some((u) => u.balance >= 0.01 && !u.is_impossible); ) {
136
+ let u = !1;
137
+ for (const [w, b] of r.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 I = (b.interest_rate ?? 0) / 100 / 12, M = b.balance * I;
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
+ w === 0 && t && (v += t), b.balance += M;
142
+ const S = Math.min(b.balance, v + i);
143
+ if (S <= M) {
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 += M, 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 = r.some((u) => u.is_impossible && u.balance > 0), h = Le({ 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" : $e(h, { format: ["years", "months"] }) || "0 months"
156
156
  };
157
157
  }
158
- const F = () => {
159
- if (!x.useContext(je))
158
+ const L = () => {
159
+ if (!f.useContext(Ge))
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
+ }, xt = ({ debts: o, onClickCta: n, sx: t }) => {
163
+ const r = Y(), { isMobile: a } = U(), { debts: i } = C(), { selectedDebtPriority: d } = L(), { monthlyCashFlowProfile: c } = K(), { payoffDate: p, payoffSavings: h, payoffDuration: u } = f.useMemo(() => {
164
+ const w = c?.extra_payment ?? 0;
165
+ return ft(o, d, w);
166
+ }, [o, d, c]);
167
167
  return /* @__PURE__ */ e(
168
- we,
168
+ ge,
169
169
  {
170
170
  sx: {
171
- boxShadow: t.shadows[2],
171
+ boxShadow: r.shadows[2],
172
172
  width: a ? "100%" : "186px",
173
173
  minWidth: "186px",
174
- ...r
174
+ ...t
175
175
  },
176
176
  children: /* @__PURE__ */ s(_, { sx: { gap: "12px", p: "16px" }, children: [
177
177
  /* @__PURE__ */ s(
@@ -180,28 +180,28 @@ const F = () => {
180
180
  gap: a ? "4px" : "0",
181
181
  sx: {
182
182
  borderBottom: "1px solid",
183
- borderBottomColor: t.palette.grey[300],
183
+ borderBottomColor: r.palette.grey[300],
184
184
  pb: "8px"
185
185
  },
186
186
  children: [
187
187
  /* @__PURE__ */ e(l, { variant: "caption", children: i.snowball_card_date_description }),
188
- /* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "body2", children: p })
188
+ /* @__PURE__ */ e(l, { bold: !0, color: r.palette.primary.main, variant: "body2", children: p })
189
189
  ]
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(
201
201
  l,
202
202
  {
203
203
  bold: !0,
204
- color: t.palette.primary.main,
204
+ color: r.palette.primary.main,
205
205
  onClick: n,
206
206
  sx: { cursor: "pointer" },
207
207
  variant: "body2",
@@ -211,44 +211,44 @@ 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
+ }, gt = D(xt), wt = ({ isOpen: o, onClose: n }) => {
215
+ const t = Y(), { debts: r } = C(), [a, i] = f.useState(!1);
216
216
  return /* @__PURE__ */ e(
217
- ie,
217
+ ae,
218
218
  {
219
219
  ariaLabelClose: "",
220
220
  isOpen: o,
221
221
  onClose: n,
222
- title: t.snowball_drawer_title,
223
- children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
222
+ title: r.snowball_drawer_title,
223
+ children: /* @__PURE__ */ s(_, { bgcolor: t.palette.background.default, height: "100%", children: [
224
224
  /* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
225
225
  /* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
226
- /* @__PURE__ */ e(l, { mb: 12, variant: "h3", children: t.snowball_drawer_subtitle }),
227
- /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "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 })
226
+ /* @__PURE__ */ e(l, { mb: 12, variant: "h3", children: r.snowball_drawer_subtitle }),
227
+ /* @__PURE__ */ e(l, { color: t.palette.secondary.main, variant: "body2", children: r.snowball_drawer_amount_description }),
228
+ /* @__PURE__ */ e(we, { variant: "h1", children: r.snowball_drawer_savings }),
229
+ /* @__PURE__ */ e(l, { color: t.palette.secondary.main, variant: "body2", children: r.snowball_drawer_duration_description })
230
230
  ] }),
231
- /* @__PURE__ */ s(we, { sx: { display: "grid", py: 16, px: 24 }, children: [
232
- /* @__PURE__ */ e(l, { mb: 4, variant: "h3", children: t.snowball_drawer_question }),
231
+ /* @__PURE__ */ s(ge, { sx: { display: "grid", py: 16, px: 24 }, children: [
232
+ /* @__PURE__ */ e(l, { mb: 4, variant: "h3", children: r.snowball_drawer_question }),
233
233
  /* @__PURE__ */ e(
234
234
  l,
235
235
  {
236
- color: r.palette.secondary.main,
236
+ color: t.palette.secondary.main,
237
237
  mb: 8,
238
238
  sx: { whiteSpace: a ? "normal" : "nowrap" },
239
239
  variant: "subtitle2",
240
- children: t.snowball_drawer_answer
240
+ children: r.snowball_drawer_answer
241
241
  }
242
242
  ),
243
243
  /* @__PURE__ */ e(
244
244
  l,
245
245
  {
246
246
  bold: !0,
247
- color: r.palette.primary.main,
247
+ color: t.palette.primary.main,
248
248
  onClick: () => i(!a),
249
249
  sx: { cursor: "pointer" },
250
250
  variant: "body2",
251
- children: a ? t.snowball_drawer_less : t.snowball_drawer_more
251
+ children: a ? r.snowball_drawer_less : r.snowball_drawer_more
252
252
  }
253
253
  )
254
254
  ] })
@@ -257,21 +257,21 @@ const F = () => {
257
257
  /* @__PURE__ */ e(
258
258
  l,
259
259
  {
260
- color: r.palette.secondary.main,
260
+ color: t.palette.secondary.main,
261
261
  px: 24,
262
262
  sx: { textAlign: "center", whiteSpace: "normal" },
263
263
  variant: "body2",
264
- children: t.snowball_drawer_disclaimer
264
+ children: r.snowball_drawer_disclaimer
265
265
  }
266
266
  ),
267
267
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
268
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 1) }),
269
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
268
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(r.snowball_drawer_month_header, 1) }),
269
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.snowball_drawer_payment_header })
270
270
  ] }),
271
- /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
271
+ /* @__PURE__ */ s(_, { bgcolor: t.palette.background.paper, mb: 24, children: [
272
272
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
273
273
  /* @__PURE__ */ e(
274
- W,
274
+ G,
275
275
  {
276
276
  sx: {
277
277
  display: "flex",
@@ -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: t.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 ${t.palette.neutral.light}`,
294
294
  flexDirection: "row",
295
295
  flexGrow: 1,
296
296
  py: 14,
@@ -298,14 +298,14 @@ const F = () => {
298
298
  },
299
299
  children: [
300
300
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
301
- /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "A") }),
302
- /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "caption", children: [
301
+ /* @__PURE__ */ e(l, { variant: "body1", children: E(r.snowball_drawer_debt_label, "A") }),
302
+ /* @__PURE__ */ s(l, { color: t.palette.secondary.main, variant: "caption", children: [
303
303
  E(
304
- t.snowball_drawer_rollover_explainer_pt1,
304
+ r.snowball_drawer_rollover_explainer_pt1,
305
305
  "$100"
306
306
  ),
307
- /* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "B") }),
308
- t.snowball_drawer_rollover_explainer_pt2
307
+ /* @__PURE__ */ e("strong", { children: E(r.snowball_drawer_debt_label, "B") }),
308
+ r.snowball_drawer_rollover_explainer_pt2
309
309
  ] })
310
310
  ] }),
311
311
  /* @__PURE__ */ s(_, { children: [
@@ -314,10 +314,10 @@ const F = () => {
314
314
  l,
315
315
  {
316
316
  bold: !0,
317
- color: r.palette.success.main,
317
+ color: t.palette.success.main,
318
318
  textAlign: "end",
319
319
  variant: "tiny",
320
- children: t.snowball_drawer_paid_label
320
+ children: r.snowball_drawer_paid_label
321
321
  }
322
322
  )
323
323
  ] })
@@ -327,14 +327,14 @@ const F = () => {
327
327
  ] }),
328
328
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
329
329
  /* @__PURE__ */ e(
330
- W,
330
+ G,
331
331
  {
332
332
  sx: {
333
333
  width: 20,
334
334
  height: 20,
335
335
  marginRight: 12,
336
336
  borderRadius: "50%",
337
- border: `3px solid ${r.palette.neutral.main}`
337
+ border: `3px solid ${t.palette.neutral.main}`
338
338
  }
339
339
  }
340
340
  ),
@@ -342,14 +342,14 @@ const F = () => {
342
342
  _,
343
343
  {
344
344
  sx: {
345
- borderBottom: `1px solid ${r.palette.neutral.light}`,
345
+ borderBottom: `1px solid ${t.palette.neutral.light}`,
346
346
  flexDirection: "row",
347
347
  flexGrow: 1,
348
348
  py: 14,
349
349
  pr: 24
350
350
  },
351
351
  children: [
352
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "B") }),
352
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(r.snowball_drawer_debt_label, "B") }),
353
353
  /* @__PURE__ */ e(l, { variant: "body1", children: "$400.00" })
354
354
  ]
355
355
  }
@@ -357,19 +357,19 @@ const F = () => {
357
357
  ] }),
358
358
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, py: 14, children: [
359
359
  /* @__PURE__ */ e(
360
- W,
360
+ G,
361
361
  {
362
362
  sx: {
363
363
  width: 20,
364
364
  height: 20,
365
365
  marginRight: 12,
366
366
  borderRadius: "50%",
367
- border: `3px solid ${r.palette.neutral.main}`
367
+ border: `3px solid ${t.palette.neutral.main}`
368
368
  }
369
369
  }
370
370
  ),
371
371
  /* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
372
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }),
372
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(r.snowball_drawer_debt_label, "C") }),
373
373
  /* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
374
374
  ] })
375
375
  ] }),
@@ -381,24 +381,24 @@ 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 ${t.palette.neutral.light}`,
385
+ borderBottom: `1px solid ${t.palette.neutral.light}`
386
386
  },
387
387
  children: [
388
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
388
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: r.snowball_drawer_total_label }),
389
389
  /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
390
390
  ]
391
391
  }
392
392
  )
393
393
  ] }),
394
394
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
395
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 2) }),
396
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
395
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(r.snowball_drawer_month_header, 2) }),
396
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.snowball_drawer_payment_header })
397
397
  ] }),
398
- /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
398
+ /* @__PURE__ */ s(_, { bgcolor: t.palette.background.paper, mb: 24, children: [
399
399
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
400
400
  /* @__PURE__ */ e(
401
- W,
401
+ G,
402
402
  {
403
403
  sx: {
404
404
  display: "flex",
@@ -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: t.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 ${t.palette.neutral.light}`,
421
421
  flexDirection: "row",
422
422
  flexGrow: 1,
423
423
  py: 14,
@@ -425,14 +425,14 @@ const F = () => {
425
425
  },
426
426
  children: [
427
427
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
428
- /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "B") }),
429
- /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "caption", children: [
428
+ /* @__PURE__ */ e(l, { variant: "body1", children: E(r.snowball_drawer_debt_label, "B") }),
429
+ /* @__PURE__ */ s(l, { color: t.palette.secondary.main, variant: "caption", children: [
430
430
  E(
431
- t.snowball_drawer_rollover_explainer_pt1,
431
+ r.snowball_drawer_rollover_explainer_pt1,
432
432
  "$500"
433
433
  ),
434
- /* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "C") }),
435
- t.snowball_drawer_rollover_explainer_pt2
434
+ /* @__PURE__ */ e("strong", { children: E(r.snowball_drawer_debt_label, "C") }),
435
+ r.snowball_drawer_rollover_explainer_pt2
436
436
  ] })
437
437
  ] }),
438
438
  /* @__PURE__ */ s(_, { children: [
@@ -441,10 +441,10 @@ const F = () => {
441
441
  l,
442
442
  {
443
443
  bold: !0,
444
- color: r.palette.success.main,
444
+ color: t.palette.success.main,
445
445
  textAlign: "end",
446
446
  variant: "tiny",
447
- children: t.snowball_drawer_paid_label
447
+ children: r.snowball_drawer_paid_label
448
448
  }
449
449
  )
450
450
  ] })
@@ -454,14 +454,14 @@ const F = () => {
454
454
  ] }),
455
455
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
456
456
  /* @__PURE__ */ e(
457
- W,
457
+ G,
458
458
  {
459
459
  sx: {
460
460
  width: 20,
461
461
  height: 20,
462
462
  marginRight: 12,
463
463
  borderRadius: "50%",
464
- border: `3px solid ${r.palette.neutral.main}`
464
+ border: `3px solid ${t.palette.neutral.main}`
465
465
  }
466
466
  }
467
467
  ),
@@ -475,7 +475,7 @@ const F = () => {
475
475
  pr: 24
476
476
  },
477
477
  children: [
478
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }),
478
+ /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(r.snowball_drawer_debt_label, "C") }),
479
479
  /* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
480
480
  ]
481
481
  }
@@ -489,24 +489,24 @@ 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 ${t.palette.neutral.light}`,
493
+ borderBottom: `1px solid ${t.palette.neutral.light}`
494
494
  },
495
495
  children: [
496
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
496
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: r.snowball_drawer_total_label }),
497
497
  /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
498
498
  ]
499
499
  }
500
500
  )
501
501
  ] }),
502
502
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
503
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 3) }),
504
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
503
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(r.snowball_drawer_month_header, 3) }),
504
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: r.snowball_drawer_payment_header })
505
505
  ] }),
506
- /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
506
+ /* @__PURE__ */ s(_, { bgcolor: t.palette.background.paper, mb: 24, children: [
507
507
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
508
508
  /* @__PURE__ */ e(
509
- W,
509
+ G,
510
510
  {
511
511
  sx: {
512
512
  display: "flex",
@@ -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: t.palette.success.main,
519
519
  marginRight: 12
520
520
  },
521
521
  children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
@@ -532,17 +532,17 @@ const F = () => {
532
532
  pr: 24
533
533
  },
534
534
  children: [
535
- /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }) }),
535
+ /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "body1", children: E(r.snowball_drawer_debt_label, "C") }) }),
536
536
  /* @__PURE__ */ s(_, { children: [
537
537
  /* @__PURE__ */ e(l, { variant: "body1", children: "$1,500.00" }),
538
538
  /* @__PURE__ */ e(
539
539
  l,
540
540
  {
541
541
  bold: !0,
542
- color: r.palette.success.main,
542
+ color: t.palette.success.main,
543
543
  textAlign: "end",
544
544
  variant: "tiny",
545
- children: t.snowball_drawer_paid_label
545
+ children: r.snowball_drawer_paid_label
546
546
  }
547
547
  )
548
548
  ] })
@@ -558,11 +558,11 @@ 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 ${t.palette.neutral.light}`,
562
+ borderBottom: `1px solid ${t.palette.neutral.light}`
563
563
  },
564
564
  children: [
565
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
565
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: r.snowball_drawer_total_label }),
566
566
  /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
567
567
  ]
568
568
  }
@@ -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))),
575
+ }, Ct = D(wt), vt = "#FF7B08";
576
+ function Dt(o, n) {
577
+ const [t, r, a] = o.replace(/^#/, "").match(/.{1,2}/g).map((d) => parseInt(d, 16)), i = [
579
578
  Math.max(0, Math.min(255, Math.round(t * n))),
579
+ Math.max(0, Math.min(255, Math.round(r * n))),
580
580
  Math.max(0, Math.min(255, Math.round(a * n)))
581
581
  ];
582
582
  return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
583
583
  }
584
- const Ae = ({
584
+ const Te = ({
585
585
  sx: o,
586
586
  height: n = 500,
587
- width: r,
588
- debts: t,
587
+ width: t,
588
+ debts: r,
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 = Xe(), { onEvent: p } = B(), h = r.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((g) => new Date(g.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, g) => m - g).map((m) => new Date(m)), w = h.map((m) => {
598
+ const g = new Map(m.dataset.map((F) => [new Date(F.x).getTime(), F.y]));
599
+ let T = g.get(u[0].getTime()) ?? 0;
600
+ const R = u.map((F) => {
601
+ const H = g.get(F.getTime()) ?? T;
602
+ return T = H, { x: F, y: H };
603
603
  });
604
- return { ...u, dataset: N };
604
+ return { ...m, dataset: R };
605
605
  }), b = w.reduce(
606
- (u, f) => u + (f.dataset[0]?.y ?? 0),
606
+ (m, g) => m + (g.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
+ ), k = u.map((m, g) => {
609
+ const T = g / (u.length - 1), R = b * (1 - T);
610
+ return { x: m, y: R };
611
+ }), I = Math.ceil(b / 100) * 100, M = u, v = w.map((m, g) => {
612
+ const T = 1 - g / w.length * 0.5, R = Dt(vt, 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-${g}`,
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,17 +626,17 @@ 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: k.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((g) => g?.guid === m);
638
638
  return /* @__PURE__ */ e(
639
- le,
639
+ ie,
640
640
  {
641
641
  sx: {
642
642
  width: "100%",
@@ -651,21 +651,21 @@ const Ae = ({
651
651
  }
652
652
  },
653
653
  children: /* @__PURE__ */ e(
654
- Je,
654
+ Ze,
655
655
  {
656
656
  axisHighlight: { x: "none" },
657
657
  disableLineItemHighlight: !0,
658
658
  height: n,
659
659
  hideLegend: !0,
660
660
  margin: { bottom: 24, left: 32, right: 72, top: 48 },
661
- onAreaClick: (u, f) => {
661
+ onAreaClick: (m, g) => {
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 === g.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 g = v.find((T) => T.id === m?.seriesId)?.guid;
668
+ d?.(g ?? "");
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
699
  ...o
700
700
  },
701
- width: r,
701
+ width: t,
702
702
  xAxis: [
703
703
  {
704
- data: I,
704
+ data: M,
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: I,
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();
726
- return /* @__PURE__ */ s($, { children: [
724
+ }, St = () => {
725
+ const o = Y(), { debts: n } = C(), { selectedDebtChartData: t } = L();
726
+ return /* @__PURE__ */ s(O, { children: [
727
727
  /* @__PURE__ */ s(
728
- Ue,
728
+ Ke,
729
729
  {
730
730
  sx: {
731
731
  "& .MuiCardContent-root:last-child": {
@@ -733,8 +733,8 @@ 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(qe, { sx: { pb: 0 }, title: /* @__PURE__ */ e(Be, { sx: { pb: 4 }, children: n.details_chart_title }) }),
737
+ /* @__PURE__ */ e(Ue, { sx: { p: 0 }, children: /* @__PURE__ */ e(Te, { debts: [t], height: 250 }) })
738
738
  ]
739
739
  }
740
740
  ),
@@ -748,24 +748,24 @@ const Ae = ({
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
+ }, Tt = D(St), At = () => {
752
+ const o = Y(), { onEvent: n } = B(), { debts: t } = C(), { selectedDebtChartData: r, showCompleted: a, showError: i } = L();
753
+ return f.useEffect(() => n(A.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(Ce, { children: i || a ? /* @__PURE__ */ e(
754
754
  l,
755
755
  {
756
756
  color: o.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 ? t.schedule_error_message : t.schedule_complete_message
761
761
  }
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 })
762
+ ) : /* @__PURE__ */ s(O, { children: [
763
+ /* @__PURE__ */ s(x, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
764
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.schedule_month_heading }),
765
+ /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.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
+ r.dataset.slice(1).map(({ x: d, y: c, payment: p }) => /* @__PURE__ */ e(x, { bgcolor: o.palette.background.paper, children: /* @__PURE__ */ e(x, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
768
+ x,
769
769
  {
770
770
  sx: {
771
771
  borderBottom: `1px solid ${o.palette.divider}`,
@@ -775,12 +775,12 @@ const Ae = ({
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(x, { flexGrow: 1, children: [
779
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: J(d, Q.MONTH_YEAR) }),
780
+ /* @__PURE__ */ e(l, { color: o.palette.secondary.main, variant: "caption", children: t.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(x, { children: [
783
+ /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: P(c, "0,0.00") }),
784
784
  /* @__PURE__ */ e(
785
785
  l,
786
786
  {
@@ -788,15 +788,15 @@ const Ae = ({
788
788
  color: o.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(x, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
799
+ x,
800
800
  {
801
801
  sx: {
802
802
  alignItems: "center",
@@ -806,156 +806,156 @@ 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: t.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
+ }, Et = D(At), It = D(({ debt: o }) => {
816
+ const { debts: n } = C(), { updateAccount: t } = te(), { onEvent: r } = B(), [a, i] = f.useState(o.interest_rate ?? 0), d = a < 0, c = async () => {
817
+ await t({ ...o.account, interest_rate: a }), o.interest_rate = a, r(A.DEBTS_SAVE_RATE_ACTION, { account_guid: o.guid });
818
818
  }, p = () => {
819
819
  setTimeout(() => {
820
820
  i(o.interest_rate ?? 0);
821
821
  }, 250);
822
822
  };
823
823
  return /* @__PURE__ */ e(
824
- oe,
824
+ re,
825
825
  {
826
- isSaveDisabled: c,
826
+ isSaveDisabled: d,
827
827
  label: `${n.details_interest_rate} (%)`,
828
828
  onCancel: p,
829
- onSave: d,
829
+ onSave: c,
830
830
  primaryText: n.details_interest_rate,
831
- secondaryText: Ge(Number(o.interest_rate) / 100),
831
+ secondaryText: We(Number(o.interest_rate) / 100),
832
832
  zeroStateText: o.interest_rate ? void 0 : n.add_interest_rate,
833
833
  children: /* @__PURE__ */ e(
834
- ot,
834
+ rt,
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
+ }), Mt = D(({ debt: o }) => {
846
+ const { debts: n } = C(), { updateAccount: t } = te(), { onEvent: r } = B(), [a, i] = f.useState(o.monthly_payment ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
847
+ await t({ ...o.account, minimum_payment: a }), o.monthly_payment = a, r(A.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: o.guid });
848
848
  }, p = () => {
849
849
  setTimeout(() => {
850
850
  i(o.monthly_payment ?? 0);
851
851
  }, 250);
852
852
  };
853
853
  return /* @__PURE__ */ e(
854
- oe,
854
+ re,
855
855
  {
856
- isSaveDisabled: c,
856
+ isSaveDisabled: d,
857
857
  label: n.details_monthly_payment,
858
858
  onCancel: p,
859
- onSave: d,
859
+ onSave: c,
860
860
  primaryText: n.details_monthly_payment,
861
- secondaryText: R(o.monthly_payment, "0,0"),
861
+ secondaryText: P(o.monthly_payment, "0,0"),
862
862
  zeroStateText: o.monthly_payment ? void 0 : n.add_monthly_payment,
863
863
  children: /* @__PURE__ */ e(
864
- se,
864
+ le,
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
+ }), kt = D(({ debt: o }) => {
878
+ const { debts: n } = C(), { updateAccount: t } = te(), { onEvent: r } = B(), [a, i] = f.useState(o.original_balance ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
879
+ await t({ ...o.account, original_balance: a }), o.original_balance = a, r(A.DEBTS_SAVE_BALANCE_ACTION, { account_guid: o.guid });
880
880
  }, p = () => {
881
881
  setTimeout(() => {
882
882
  i(o.original_balance ?? 0);
883
883
  }, 250);
884
884
  };
885
885
  return /* @__PURE__ */ e(
886
- oe,
886
+ re,
887
887
  {
888
- isSaveDisabled: c,
888
+ isSaveDisabled: d,
889
889
  label: n.details_original_balance,
890
890
  onCancel: p,
891
- onSave: d,
891
+ onSave: c,
892
892
  primaryText: n.details_original_balance,
893
- secondaryText: R(o.original_balance, "0,0"),
893
+ secondaryText: P(o.original_balance, "0,0"),
894
894
  zeroStateText: o.original_balance ? void 0 : n.add_original_balance,
895
895
  children: /* @__PURE__ */ e(
896
- se,
896
+ le,
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: [
909
+ }), Nt = () => {
910
+ const { onEvent: o } = B(), { selectedDebtChartData: n } = L();
911
+ return f.useEffect(() => o(A.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(x, { bgcolor: "background.paper", children: [
912
+ n?.goal && /* @__PURE__ */ s(O, { children: [
913
+ /* @__PURE__ */ e(Qe, { goal: n.goal }),
914
+ /* @__PURE__ */ e(j, {}),
913
915
  /* @__PURE__ */ e(et, { goal: n.goal }),
914
- /* @__PURE__ */ e(G, {}),
916
+ /* @__PURE__ */ e(j, {}),
915
917
  /* @__PURE__ */ e(tt, { goal: n.goal }),
916
- /* @__PURE__ */ e(G, {}),
917
- /* @__PURE__ */ e(rt, { goal: n.goal }),
918
- /* @__PURE__ */ e(G, {})
918
+ /* @__PURE__ */ e(j, {})
919
919
  ] }),
920
- !n?.goal && n?.account && /* @__PURE__ */ s($, { children: [
921
- /* @__PURE__ */ e(kt, { debt: n }),
922
- /* @__PURE__ */ e(G, {}),
920
+ !n?.goal && n?.account && /* @__PURE__ */ s(O, { children: [
923
921
  /* @__PURE__ */ e(Mt, { debt: n }),
924
- /* @__PURE__ */ e(G, {}),
925
- /* @__PURE__ */ e(Nt, { debt: n }),
926
- /* @__PURE__ */ e(G, {})
922
+ /* @__PURE__ */ e(j, {}),
923
+ /* @__PURE__ */ e(It, { debt: n }),
924
+ /* @__PURE__ */ e(j, {}),
925
+ /* @__PURE__ */ e(kt, { debt: n }),
926
+ /* @__PURE__ */ e(j, {})
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
+ }, Pt = D(Nt), Rt = ({ setTabValue: o, sx: n }) => {
930
+ const { debts: t } = C(), { showError: r, showCompleted: a } = L();
931
+ return f.useEffect(() => {
932
+ r && o(1);
933
+ }, [r]), !r && !a ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ s(x, { gap: 16, children: [
934
+ /* @__PURE__ */ e(fe, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ s(
935
+ _e,
936
936
  {
937
- icon: t ? /* @__PURE__ */ e(nt, { filled: !0 }) : /* @__PURE__ */ e(De, { color: "success", filled: !0 }),
937
+ icon: r ? /* @__PURE__ */ e(ot, { filled: !0 }) : /* @__PURE__ */ e(ve, { color: "success", filled: !0 }),
938
938
  severity: "error",
939
939
  sx: {
940
940
  alignItems: "start",
941
941
  borderLeft: 5,
942
942
  borderRadius: 1,
943
- borderColor: t ? "error.main" : "success.main",
943
+ borderColor: r ? "error.main" : "success.main",
944
944
  color: "text.primary",
945
945
  "&.MuiPaper-root": {
946
946
  backgroundColor: "background.paper"
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(ye, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: r ? t.status_error_title : t.status_complete_title }),
951
+ /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: r ? t.status_error_description : t.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
+ r && /* @__PURE__ */ e(fe, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ s(
956
+ _e,
957
957
  {
958
- icon: /* @__PURE__ */ e($, {}),
958
+ icon: /* @__PURE__ */ e(O, {}),
959
959
  severity: "error",
960
960
  sx: {
961
961
  borderRadius: 2,
@@ -965,28 +965,28 @@ 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(ye, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: t.status_info_title }),
969
+ /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: t.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);
976
- return /* @__PURE__ */ s($, { children: [
977
- (n || r) && /* @__PURE__ */ e(Ft, { setTabValue: a, sx: { mt: -24 } }),
974
+ }, Bt = D(Rt), Ft = () => {
975
+ const { debts: o } = C(), { showError: n, showCompleted: t } = L(), [r, a] = f.useState(0);
976
+ return /* @__PURE__ */ s(O, { children: [
977
+ (n || t) && /* @__PURE__ */ e(Bt, { setTabValue: a, sx: { mt: -24 } }),
978
978
  /* @__PURE__ */ s(
979
- Qe,
979
+ Je,
980
980
  {
981
981
  "aria-label": o.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
- value: t,
985
+ value: r,
986
986
  variant: "fullWidth",
987
987
  children: [
988
988
  /* @__PURE__ */ e(
989
- _e,
989
+ be,
990
990
  {
991
991
  "aria-controls": "debt-schedule-tabpanel-0",
992
992
  id: "debt-schedule-tab-0",
@@ -994,7 +994,7 @@ const Ae = ({
994
994
  }
995
995
  ),
996
996
  /* @__PURE__ */ e(
997
- _e,
997
+ be,
998
998
  {
999
999
  "aria-controls": "debt-details-tabpanel-1",
1000
1000
  id: "debt-details-tab-1",
@@ -1004,27 +1004,27 @@ const Ae = ({
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(xe, { index: 0, name: "debt-schedule", value: r, children: /* @__PURE__ */ e(Et, {}) }),
1008
+ /* @__PURE__ */ e(xe, { index: 1, name: "debt-details", value: r, children: /* @__PURE__ */ e(Pt, {}) })
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
+ }, Lt = D(Ft), $t = ({ isOpen: o, onClose: n }) => {
1011
+ const { debts: t } = C(), { showError: r, showCompleted: a } = L(), i = r || a ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ e(Tt, {});
1012
1012
  return /* @__PURE__ */ e(
1013
- ie,
1013
+ ae,
1014
1014
  {
1015
- ariaLabelClose: r.details_close_aria,
1015
+ ariaLabelClose: t.details_close_aria,
1016
1016
  isOpen: o,
1017
1017
  onClose: n,
1018
- title: r.details_title,
1019
- children: /* @__PURE__ */ s(g, { bgcolor: "background.default", children: [
1018
+ title: t.details_title,
1019
+ children: /* @__PURE__ */ s(x, { bgcolor: "background.default", children: [
1020
1020
  /* @__PURE__ */ e(Ve, { customDetailsChart: i }),
1021
- /* @__PURE__ */ e($t, {})
1021
+ /* @__PURE__ */ e(Lt, {})
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, {
1025
+ }, Ot = D(() => {
1026
+ const { debts: o } = C(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: t } = K(), { onEvent: r } = B(), [a, i] = f.useState(n?.extra_payment ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
1027
+ n && (await t({ ...n, extra_payment: a }), n.extra_payment = a, r(A.DEBTS_SAVE_PAYDOWN_ACTION, {
1028
1028
  user_guid: n?.user_guid
1029
1029
  }));
1030
1030
  }, p = () => {
@@ -1033,71 +1033,71 @@ const Ae = ({
1033
1033
  }, 250);
1034
1034
  };
1035
1035
  return /* @__PURE__ */ e(
1036
- oe,
1036
+ re,
1037
1037
  {
1038
- isSaveDisabled: c,
1038
+ isSaveDisabled: d,
1039
1039
  label: o.paydown_drawer_extra_payment,
1040
1040
  onCancel: p,
1041
- onSave: d,
1041
+ onSave: c,
1042
1042
  primaryText: o.paydown_drawer_extra_payment,
1043
- secondaryText: R(n?.extra_payment, "0,0"),
1043
+ secondaryText: P(n?.extra_payment, "0,0"),
1044
1044
  zeroStateText: n?.extra_payment ? void 0 : o.add_extra_payment,
1045
1045
  children: /* @__PURE__ */ e(
1046
- se,
1046
+ le,
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: [
1059
+ }), Ht = () => {
1060
+ const { debts: o } = C(), { totalMonthlyPayments: n } = ee(), { monthlyCashFlowProfile: t } = K(), r = n + Number(t?.extra_payment);
1061
+ return /* @__PURE__ */ s(x, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1062
+ /* @__PURE__ */ s(x, { p: 24, children: [
1063
+ /* @__PURE__ */ s(x, { alignItems: "center", gap: 4, mb: 24, children: [
1064
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") }),
1065
+ /* @__PURE__ */ e(we, { bold: !0, variant: "h1", children: P(n, "0,0") }),
1066
1066
  /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "body2", width: 208, children: o.paydown_drawer_minimum_info })
1067
1067
  ] }),
1068
- /* @__PURE__ */ s(g, { children: [
1068
+ /* @__PURE__ */ s(x, { children: [
1069
1069
  /* @__PURE__ */ e(l, { variant: "h3", children: o.paydown_drawer_subtitle }),
1070
1070
  /* @__PURE__ */ e(l, { truncate: !1, variant: "subtitle2", children: o.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: [
1073
+ /* @__PURE__ */ e(x, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Ot, {}) }),
1074
+ /* @__PURE__ */ e(x, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(x, { gap: 4, children: [
1075
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") })
1076
+ /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "body1", children: P(r, "0,0") })
1077
1077
  ] }) })
1078
1078
  ] });
1079
- }, Gt = D(Wt), jt = ({ isOpen: o, onClose: n }) => {
1080
- const { debts: r } = C();
1079
+ }, Wt = D(Ht), Gt = ({ isOpen: o, onClose: n }) => {
1080
+ const { debts: t } = C();
1081
1081
  return /* @__PURE__ */ e(
1082
- ie,
1082
+ ae,
1083
1083
  {
1084
- ariaLabelClose: r.paydown_drawer_close_aria,
1084
+ ariaLabelClose: t.paydown_drawer_close_aria,
1085
1085
  isOpen: o,
1086
1086
  onClose: n,
1087
- title: r.paydown_drawer_title,
1088
- children: /* @__PURE__ */ e(Gt, {})
1087
+ title: t.paydown_drawer_title,
1088
+ children: /* @__PURE__ */ e(Wt, {})
1089
1089
  }
1090
1090
  );
1091
1091
  };
1092
- function zt(o, n) {
1093
- const r = (t) => {
1094
- if (typeof t == "number") return t;
1095
- if (t === "!" || t === "✓") return 1 / 0;
1092
+ function jt(o, n) {
1093
+ const t = (r) => {
1094
+ if (typeof r == "number") return r;
1095
+ if (r === "!" || r === "✓") return 1 / 0;
1096
1096
  throw new Error("Unsupported value");
1097
1097
  };
1098
- return r(o) - r(n);
1098
+ return t(o) - t(n);
1099
1099
  }
1100
- function Yt(o) {
1100
+ function zt(o) {
1101
1101
  return o.is_paid_off ? "✓" : o.priority === void 0 || o.is_impossible ? "!" : o.priority;
1102
1102
  }
1103
1103
  const Vt = (o) => {
@@ -1106,10 +1106,10 @@ const Vt = (o) => {
1106
1106
  background: "#FFB252"
1107
1107
  };
1108
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);
1109
+ }, Yt = (o) => {
1110
+ const n = String(o.formattedValue), t = Vt(n);
1111
1111
  return /* @__PURE__ */ e(
1112
- le,
1112
+ ie,
1113
1113
  {
1114
1114
  sx: {
1115
1115
  display: "flex",
@@ -1119,83 +1119,83 @@ const Vt = (o) => {
1119
1119
  // Adjust the size as needed
1120
1120
  height: 20,
1121
1121
  borderRadius: "50%",
1122
- backgroundColor: r.background,
1122
+ backgroundColor: t.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: t.text, fontWeight: 700, variant: "body2", children: n })
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
+ }, Kt = (o) => {
1129
+ const n = o.row.account, t = at[n.account_type];
1130
+ return /* @__PURE__ */ s(x, { alignItems: "center", flexDirection: "row", children: [
1131
1131
  /* @__PURE__ */ e(
1132
- Le,
1132
+ Fe,
1133
1133
  {
1134
1134
  alt: `${n.institutionName}`,
1135
1135
  institutionGuid: n.institution_guid || ""
1136
1136
  }
1137
1137
  ),
1138
- /* @__PURE__ */ s(g, { ml: 12, children: [
1138
+ /* @__PURE__ */ s(x, { ml: 12, children: [
1139
1139
  /* @__PURE__ */ e(l, { variant: "body2", children: n.name }),
1140
- /* @__PURE__ */ e(l, { variant: "caption", children: r })
1140
+ /* @__PURE__ */ e(l, { variant: "caption", children: t })
1141
1141
  ] })
1142
1142
  ] });
1143
- }, qt = ({
1143
+ }, Ut = ({
1144
1144
  sx: o = {},
1145
1145
  debts: n,
1146
- hoveredDebtGuid: r,
1147
- onHoverRow: t,
1146
+ hoveredDebtGuid: t,
1147
+ onHoverRow: r,
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 } = U(), { debts: p, common: h } = C(), [u, w] = f.useState([
1151
1151
  { field: "priority", sort: "asc" }
1152
1152
  ]), b = [
1153
1153
  {
1154
1154
  field: "priority",
1155
1155
  headerName: p.table_column_priority,
1156
- renderHeader: j,
1157
- renderCell: Kt,
1158
- sortComparator: zt,
1156
+ renderHeader: z,
1157
+ renderCell: Yt,
1158
+ sortComparator: jt,
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
- renderHeader: j,
1171
- renderCell: Ut,
1170
+ renderHeader: z,
1171
+ renderCell: Kt,
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
- renderHeader: j,
1183
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: R(y.value, "0,0") }),
1182
+ renderHeader: z,
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",
1194
1194
  headerName: p.table_column_interest_rate,
1195
- renderHeader: j,
1195
+ renderHeader: z,
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",
@@ -1205,10 +1205,10 @@ const Vt = (o) => {
1205
1205
  {
1206
1206
  field: "projected_payoff_date",
1207
1207
  headerName: p.table_column_payoff_date,
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) : "---" }),
1208
+ renderHeader: z,
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",
@@ -1218,23 +1218,23 @@ const Vt = (o) => {
1218
1218
  {
1219
1219
  field: "monthly_payment",
1220
1220
  headerName: p.table_column_amount_due,
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") : "---" }),
1221
+ renderHeader: z,
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
+ ], k = [
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(ne, { name: "chevron_right" }) }),
1238
1238
  sortable: !1,
1239
1239
  hideSortIcons: !0,
1240
1240
  type: "custom",
@@ -1242,20 +1242,20 @@ const Vt = (o) => {
1242
1242
  headerAlign: "right",
1243
1243
  width: 20
1244
1244
  }
1245
- ], k = x.useMemo(() => n.map((y, u) => ({
1245
+ ], I = f.useMemo(() => n.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: zt(y)
1249
+ })), [n]), M = (y) => {
1250
+ const T = y.target.closest("[data-id]")?.getAttribute("data-id"), R = n[Number(T)];
1251
+ r?.(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 || M(y);
1254
+ }, S = (y) => {
1255
+ c && M(y);
1256
+ }, $ = (y) => I.find((m) => m.guid === y)?.id;
1257
1257
  return /* @__PURE__ */ e(
1258
- le,
1258
+ ie,
1259
1259
  {
1260
1260
  sx: {
1261
1261
  height: "auto",
@@ -1267,34 +1267,34 @@ const Vt = (o) => {
1267
1267
  ...o
1268
1268
  },
1269
1269
  children: /* @__PURE__ */ e(
1270
- at,
1270
+ nt,
1271
1271
  {
1272
- columns: d ? M : b,
1272
+ columns: c ? k : 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
+ w(y), d(A.DEBTS_CLICK_TABLE_SORT);
1282
1282
  },
1283
- rows: k,
1283
+ rows: I,
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 && r?.(""),
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="${$(t)}"]`]: {
1298
1298
  backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1299
1299
  filter: "brightness(98%)"
1300
1300
  }
@@ -1303,61 +1303,61 @@ const Vt = (o) => {
1303
1303
  )
1304
1304
  }
1305
1305
  );
1306
- }, Xt = ({
1306
+ }, qt = ({
1307
1307
  buttonText: o,
1308
1308
  disabled: n,
1309
- isOpen: r,
1310
- onClick: t
1309
+ isOpen: t,
1310
+ onClick: r
1311
1311
  }) => {
1312
- const { isDesktop: a, isTablet: i } = U(), c = r ? "unfold_less" : "unfold_more";
1312
+ const { isDesktop: a, isTablet: i } = U(), d = t ? "unfold_less" : "unfold_more";
1313
1313
  return a || i ? /* @__PURE__ */ e(
1314
- Se,
1314
+ De,
1315
1315
  {
1316
1316
  "aria-controls": "prioritize-debts",
1317
1317
  "aria-describedby": "prioritize-debts",
1318
1318
  "aria-haspopup": !0,
1319
1319
  "aria-label": "prioritize-debts",
1320
1320
  disabled: n,
1321
- onClick: t,
1322
- startIcon: /* @__PURE__ */ e(ae, { name: c }),
1323
- sx: { justifyContent: "start", minWidth: 214, mx: 4 },
1321
+ onClick: r,
1322
+ startIcon: /* @__PURE__ */ e(ne, { name: d }),
1323
+ sx: { justifyContent: "start" },
1324
1324
  children: o
1325
1325
  }
1326
1326
  ) : /* @__PURE__ */ e(
1327
- lt,
1327
+ it,
1328
1328
  {
1329
1329
  "aria-controls": "prioritize-debts",
1330
1330
  "aria-describedby": "prioritize-debts",
1331
1331
  "aria-haspopup": !0,
1332
1332
  "aria-label": "prioritize-debts",
1333
1333
  disabled: n,
1334
- onClick: t,
1335
- children: /* @__PURE__ */ e(ae, { name: c })
1334
+ onClick: r,
1335
+ children: /* @__PURE__ */ e(ne, { name: d })
1336
1336
  }
1337
1337
  );
1338
- }, Zt = D(({ buttonEl: o, onClose: n }) => {
1339
- const { onEvent: r } = B(), { debts: t } = C(), { selectedDebtPriority: a, setSelectedDebtPriority: i } = F(), c = !!o, d = [
1338
+ }, Xt = D(({ buttonEl: o, onClose: n }) => {
1339
+ const { onEvent: t } = B(), { debts: r } = C(), { selectedDebtPriority: a, setSelectedDebtPriority: i } = L(), d = !!o, c = [
1340
1340
  {
1341
- priority: P.FASTEST_PAYOFF_FIRST,
1342
- text: t.priority_sort_fastest_payoff
1341
+ priority: N.FASTEST_PAYOFF_FIRST,
1342
+ text: r.priority_sort_fastest_payoff
1343
1343
  },
1344
1344
  {
1345
- priority: P.HIGHEST_INTEREST,
1346
- text: t.priority_sort_highest_interest
1345
+ priority: N.HIGHEST_INTEREST,
1346
+ text: r.priority_sort_highest_interest
1347
1347
  },
1348
1348
  {
1349
- priority: P.LOWEST_BALANCE,
1350
- text: t.priority_sort_lowest_balance
1349
+ priority: N.LOWEST_BALANCE,
1350
+ text: r.priority_sort_lowest_balance
1351
1351
  },
1352
1352
  {
1353
- priority: P.HIGHEST_BALANCE,
1354
- text: t.priority_sort_highest_balance
1353
+ priority: N.HIGHEST_BALANCE,
1354
+ text: r.priority_sort_highest_balance
1355
1355
  }
1356
- ], p = (m) => {
1357
- i(m), r(S.DEBTS_CLICK_PRIORITY, { debts_priority: m });
1356
+ ], p = (h) => {
1357
+ i(h), t(A.DEBTS_CLICK_PRIORITY, { debts_priority: h });
1358
1358
  };
1359
1359
  return /* @__PURE__ */ e(
1360
- ct,
1360
+ st,
1361
1361
  {
1362
1362
  anchorEl: o,
1363
1363
  anchorOrigin: {
@@ -1366,18 +1366,18 @@ const Vt = (o) => {
1366
1366
  },
1367
1367
  id: "prioritize-debts",
1368
1368
  onClose: n,
1369
- open: c,
1369
+ open: d,
1370
1370
  transformOrigin: {
1371
1371
  vertical: "top",
1372
1372
  horizontal: "left"
1373
1373
  },
1374
- children: /* @__PURE__ */ e(ve, { children: d.map(({ priority: m, text: h }) => /* @__PURE__ */ s(
1375
- st,
1374
+ children: /* @__PURE__ */ e(Ce, { children: c.map(({ priority: h, text: u }) => /* @__PURE__ */ s(
1375
+ lt,
1376
1376
  {
1377
- onClick: () => p(m),
1377
+ onClick: () => p(h),
1378
1378
  sx: {
1379
- bgcolor: a === m ? "primary.main" : void 0,
1380
- color: a === m ? "#fff" : void 0,
1379
+ bgcolor: a === h ? "primary.main" : void 0,
1380
+ color: a === h ? "#fff" : void 0,
1381
1381
  justifyContent: "space-between",
1382
1382
  minHeight: 44,
1383
1383
  minWidth: 268,
@@ -1390,83 +1390,83 @@ const Vt = (o) => {
1390
1390
  }
1391
1391
  },
1392
1392
  children: [
1393
- /* @__PURE__ */ e(l, { color: "inherit", variant: "body2", children: h }),
1394
- a === m && /* @__PURE__ */ e(De, { color: "inherit", filled: !0, fontSize: "small" })
1393
+ /* @__PURE__ */ e(l, { color: "inherit", variant: "body2", children: u }),
1394
+ a === h && /* @__PURE__ */ e(ve, { color: "inherit", filled: !0, fontSize: "small" })
1395
1395
  ]
1396
1396
  },
1397
- m
1397
+ h
1398
1398
  )) })
1399
1399
  }
1400
1400
  );
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 = () => {
1401
+ }), Zt = D(({ disabled: o }) => {
1402
+ const { onEvent: n } = B(), { debts: t } = C(), { selectedDebtPriority: r } = L(), [a, i] = f.useState(null), d = (u) => {
1403
+ i(u.currentTarget), n(A.DEBTS_CLICK_PRIORITIZE);
1404
+ }, c = () => {
1405
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]);
1406
+ }, p = !!a, h = f.useMemo(() => ({
1407
+ [N.FASTEST_PAYOFF_FIRST]: t.priority_sort_fastest_payoff,
1408
+ [N.HIGHEST_INTEREST]: t.priority_sort_highest_interest,
1409
+ [N.HIGHEST_BALANCE]: t.priority_sort_highest_balance,
1410
+ [N.LOWEST_BALANCE]: t.priority_sort_lowest_balance
1411
+ })[r] ?? t.priority_sort_lowest_balance, [r]);
1412
1412
  return /* @__PURE__ */ s(_, { children: [
1413
1413
  /* @__PURE__ */ e(
1414
- Xt,
1414
+ qt,
1415
1415
  {
1416
- buttonText: m,
1416
+ buttonText: h,
1417
1417
  disabled: o,
1418
1418
  isOpen: p,
1419
- onClick: c
1419
+ onClick: d
1420
1420
  }
1421
1421
  ),
1422
- /* @__PURE__ */ e(Zt, { buttonEl: a, onClose: d })
1422
+ /* @__PURE__ */ e(Xt, { buttonEl: a, onClose: c })
1423
1423
  ] });
1424
- }), Qt = (o, n, r = 0) => {
1425
- const t = o.map((p) => ({ ...p }));
1426
- Te(t, n);
1424
+ }), Jt = (o, n, t = 0) => {
1425
+ const r = o.map((p) => ({ ...p }));
1426
+ Se(r, n);
1427
1427
  const a = /* @__PURE__ */ new Date(), i = [];
1428
- let c = 0, d = 1;
1429
- for (const p of t)
1428
+ let d = 0, c = 1;
1429
+ for (const p of r)
1430
1430
  i.push({
1431
1431
  ...p,
1432
1432
  // Start with the initial balance
1433
1433
  dataset: [{ x: new Date(a), y: p.balance }]
1434
1434
  });
1435
- 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()) {
1435
+ for (; r.some((p) => p.balance >= 0.01 && !p.is_impossible); ) {
1436
+ let p = !1, h = !1, u = !1;
1437
+ for (const [w, b] of r.entries()) {
1438
1438
  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 });
1439
+ const k = i[w].dataset, M = (b.interest_rate ?? 0) / 100 / 12, v = b.balance * M, S = b.monthly_payment ?? 0;
1440
+ let $ = S, y = 0;
1441
+ !u && t > 0 && ($ += t, u = !0), !h && d > 0 && (y = d, h = !0), b.balance += v;
1442
+ const m = Math.min(b.balance, $ + y);
1443
+ if (m <= v) {
1444
+ b.is_impossible = !0, i[w].is_impossible = !0, i[w].priority = void 0, k.push({ x: new Date(a), y: b.balance });
1445
1445
  continue;
1446
1446
  }
1447
- b.balance -= u, b.balance = b.balance < 0.01 ? 0 : b.balance, M.push({
1447
+ b.balance -= m, b.balance = b.balance < 0.01 ? 0 : b.balance, k.push({
1448
1448
  x: new Date(a),
1449
1449
  y: Math.max(0, b.balance),
1450
- payment: u,
1450
+ payment: m,
1451
1451
  extra: y
1452
- }), b.balance <= 0 && (c += T, i[w].projected_payoff_date = new Date(a)), u > 0 && (p = !0);
1452
+ }), b.balance <= 0 && (d += S, i[w].projected_payoff_date = new Date(a)), m > 0 && (p = !0);
1453
1453
  }
1454
1454
  p && a.setMonth(a.getMonth() + 1);
1455
1455
  }
1456
1456
  return i.forEach((p) => {
1457
1457
  (p.interest_rate === void 0 || p.monthly_payment === void 0) && (p.projected_payoff_date = void 0);
1458
1458
  }), i.forEach((p) => {
1459
- p.priority = !p.is_paid_off && !p.is_impossible ? d++ : void 0;
1459
+ p.priority = !p.is_paid_off && !p.is_impossible ? c++ : void 0;
1460
1460
  }), i;
1461
- }, er = (o, n, r) => ({
1461
+ }, Qt = (o, n, t) => ({
1462
1462
  description: n ? o.empty_state_description : o.empty_state_description_no_aggregation,
1463
1463
  header: n ? o.empty_state_header : o.empty_state_header_no_aggregation,
1464
- onClickHandler: n ? r : void 0,
1464
+ onClickHandler: n ? t : void 0,
1465
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;
1466
+ }), er = D(({ disabled: o, onClick: n }) => {
1467
+ const { debts: t } = C(), { isDesktop: r } = U(), { totalMonthlyPayments: a } = ee(), { monthlyCashFlowProfile: i } = K(), d = a + Number(i?.extra_payment), c = r ? t.paydown_button_long : t.paydown_button_short;
1468
1468
  return /* @__PURE__ */ e(
1469
- Se,
1469
+ De,
1470
1470
  {
1471
1471
  "aria-controls": "extra-paydown",
1472
1472
  "aria-describedby": "extra-paydown",
@@ -1474,81 +1474,80 @@ const Vt = (o) => {
1474
1474
  "aria-label": "extra-paydown",
1475
1475
  disabled: o,
1476
1476
  onClick: n,
1477
- sx: { justifyContent: "start", minWidth: 100, mx: 4 },
1478
- children: E(d, R(c, "0,0"))
1477
+ sx: { justifyContent: "start" },
1478
+ children: E(c, P(d, "0,0"))
1479
1479
  }
1480
1480
  );
1481
- }), rr = ({ onBackClick: o, sx: n }) => {
1482
- const { isDesktop: r, isMobile: t } = U(), { connect: a, debts: i } = C(), { onEvent: c } = B(), {
1481
+ }), tr = ({ onBackClick: o }) => {
1482
+ const { isDesktop: n, isMobile: t } = U(), { connect: r, debts: a } = C(), { onEvent: i } = B(), {
1483
1483
  config: { show_connections_widget_in_master: d }
1484
- } = ze(), { isInitialized: p } = Ye(), { setSelectedAccount: m } = Ke(), { selectedDebtPriority: h, setSelectedDebtChartData: w } = F(), {
1485
- isAccountDataLoaded: b,
1486
- loadAccountData: M,
1484
+ } = je(), { isInitialized: c } = ze(), { setSelectedAccount: p } = Ye(), { selectedDebtPriority: h, setSelectedDebtChartData: u } = L(), {
1485
+ isAccountDataLoaded: w,
1486
+ loadAccountData: b,
1487
1487
  detailedAccounts: k,
1488
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({
1489
+ } = te(), { isAllGoalDataLoaded: M, loadGoalData: v, monthlyCashFlowProfile: S } = K(), { debts: $ } = ee(), [y, m] = f.useState(!1), [g, T] = f.useState(!1), [R, F] = f.useState(!1), [H, Ae] = f.useState(""), [Ee, se] = f.useState(!1);
1490
+ dt({
1491
1491
  widgetName: "DebtsWidget",
1492
- isLoaded: v
1492
+ isLoaded: M
1493
1493
  });
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);
1494
+ const q = f.useMemo(() => {
1495
+ const W = S?.extra_payment ?? 0;
1496
+ return Jt($, h, W);
1497
+ }, [$, h, S]);
1498
+ f.useEffect(() => {
1499
+ w || b().finally(), i(A.DEBTS_VIEW);
1500
+ }, []), f.useEffect(() => {
1501
+ c && v().finally();
1502
+ }, [c]);
1503
+ const ce = (W) => Ae(W), de = () => {
1504
+ const W = I.find((oe) => oe.guid === H), pe = q.find((oe) => oe.guid === H);
1505
+ W && p(W), pe && u(pe), m(!0);
1506
+ }, Ie = () => i(A.DEBTS_CLICK_FILTER), Me = () => {
1507
+ F(!0), i(A.DEBTS_CLICK_SNOWBALL_CTA);
1508
+ }, ke = () => {
1509
+ T(!0), i(A.DEBTS_CLICK_PAYDOWN);
1510
1510
  };
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,
1511
+ if (!c || !M)
1512
+ return /* @__PURE__ */ e(pt, {});
1513
+ const Ne = k.length === 0, Pe = I.length === 0, Re = $.length === 0, X = Ne || Pe || Re, Z = Qt(
1514
+ a,
1515
1515
  d,
1516
- () => ce(!0)
1516
+ () => se(!0)
1517
1517
  );
1518
1518
  return /* @__PURE__ */ s(
1519
- mt,
1519
+ ht,
1520
1520
  {
1521
1521
  actions: [
1522
- /* @__PURE__ */ e(Jt, { disabled: Z }, "prioritize-debts"),
1523
- /* @__PURE__ */ e(tr, { disabled: Z, onClick: Ne }, "extra-paydown")
1522
+ /* @__PURE__ */ e(Zt, { disabled: X }, "prioritize-debts"),
1523
+ /* @__PURE__ */ e(er, { disabled: X, onClick: ke }, "extra-paydown")
1524
1524
  ],
1525
1525
  allowedAccountTypes: [
1526
- Y.CREDIT_CARD,
1527
- Y.LOAN,
1528
- Y.MORTGAGE,
1529
- Y.LINE_OF_CREDIT,
1530
- Y.CHECKING_LINE_OF_CREDIT
1526
+ V.CREDIT_CARD,
1527
+ V.LOAN,
1528
+ V.MORTGAGE,
1529
+ V.LINE_OF_CREDIT,
1530
+ V.CHECKING_LINE_OF_CREDIT
1531
1531
  ],
1532
- onAccountsFilterClick: Me,
1532
+ onAccountsFilterClick: Ie,
1533
1533
  onBackClick: o,
1534
- sx: n,
1535
- title: i.title,
1534
+ title: a.title,
1536
1535
  children: [
1537
- /* @__PURE__ */ s(g, { sx: { pt: 48, px: r ? "48px" : "24px" }, children: [
1538
- Z && /* @__PURE__ */ e(
1539
- ut,
1536
+ /* @__PURE__ */ s(x, { sx: { pt: 48, px: n ? "48px" : "24px" }, children: [
1537
+ X && /* @__PURE__ */ e(
1538
+ mt,
1540
1539
  {
1541
- header: J.header,
1540
+ header: Z.header,
1542
1541
  icon: "note_stack",
1543
- onClick: J.onClickHandler,
1544
- primaryButton: J.primaryButton,
1545
- subText: J.description,
1542
+ onClick: Z.onClickHandler,
1543
+ primaryButton: Z.primaryButton,
1544
+ subText: Z.description,
1546
1545
  sx: { maxWidth: 400 }
1547
1546
  }
1548
1547
  ),
1549
- !Z && /* @__PURE__ */ s($, { children: [
1548
+ !X && /* @__PURE__ */ s(O, { children: [
1550
1549
  /* @__PURE__ */ s(
1551
- g,
1550
+ x,
1552
1551
  {
1553
1552
  sx: {
1554
1553
  alignItems: t ? "flex-start" : "flex-end",
@@ -1557,62 +1556,62 @@ const Vt = (o) => {
1557
1556
  },
1558
1557
  children: [
1559
1558
  /* @__PURE__ */ e(
1560
- Ae,
1559
+ Te,
1561
1560
  {
1562
- debts: X,
1561
+ debts: q,
1563
1562
  height: t ? 250 : void 0,
1564
- hoveredDebtGuid: q,
1565
- onClickArea: pe,
1566
- onHoverArea: de,
1563
+ hoveredDebtGuid: H,
1564
+ onClickArea: de,
1565
+ onHoverArea: ce,
1567
1566
  sx: { mr: t ? "4px" : "-48px" }
1568
1567
  }
1569
1568
  ),
1570
1569
  /* @__PURE__ */ e(
1571
- wt,
1570
+ gt,
1572
1571
  {
1573
- debts: X,
1574
- onClickCta: ke,
1572
+ debts: q,
1573
+ onClickCta: Me,
1575
1574
  sx: { mb: t ? "0px" : "64px" }
1576
1575
  }
1577
1576
  )
1578
1577
  ]
1579
1578
  }
1580
1579
  ),
1581
- /* @__PURE__ */ e(g, { sx: { mx: t ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1582
- qt,
1580
+ /* @__PURE__ */ e(x, { sx: { mx: t ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1581
+ Ut,
1583
1582
  {
1584
- debts: X,
1585
- hoveredDebtGuid: q,
1586
- onClickRow: pe,
1587
- onHoverRow: de
1583
+ debts: q,
1584
+ hoveredDebtGuid: H,
1585
+ onClickRow: de,
1586
+ onHoverRow: ce
1588
1587
  }
1589
1588
  ) })
1590
1589
  ] })
1591
1590
  ] }),
1592
1591
  /* @__PURE__ */ e(
1593
- vt,
1592
+ Ct,
1594
1593
  {
1595
- isOpen: L,
1596
- onClose: () => z(!1)
1594
+ isOpen: R,
1595
+ onClose: () => F(!1)
1597
1596
  }
1598
1597
  ),
1599
- /* @__PURE__ */ e(Ot, { isOpen: u, onClose: () => f(!1) }),
1600
- /* @__PURE__ */ e(jt, { isOpen: A, onClose: () => N(!1) }),
1598
+ /* @__PURE__ */ e($t, { isOpen: y, onClose: () => m(!1) }),
1599
+ /* @__PURE__ */ e(Gt, { isOpen: g, onClose: () => T(!1) }),
1601
1600
  /* @__PURE__ */ e(
1602
- dt,
1601
+ ct,
1603
1602
  {
1604
- onClose: () => ce(!1),
1605
- showConnectWidget: Ie,
1606
- title: a.mini_title
1603
+ onClose: () => se(!1),
1604
+ showConnectWidget: Ee,
1605
+ title: r.mini_title
1607
1606
  }
1608
1607
  )
1609
1608
  ]
1610
1609
  }
1611
1610
  );
1612
- }, Qr = D(rr);
1611
+ }, Jr = D(tr);
1613
1612
  export {
1614
- Ae as DebtsChart,
1615
- ro as DebtsStore,
1616
- qt as DebtsTable,
1617
- Qr as DebtsWidget
1613
+ Te as DebtsChart,
1614
+ to as DebtsStore,
1615
+ Ut as DebtsTable,
1616
+ Jr as DebtsWidget
1618
1617
  };