@mx-cartographer/experiences 7.0.14-alpha-debts-missing-sorting-option-ram1 → 7.0.15

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.
@@ -1,168 +1,111 @@
1
1
  import { jsx as e, jsxs as s, Fragment as L } from "react/jsx-runtime";
2
- import x from "react";
2
+ import y from "react";
3
3
  import { observer as S } from "mobx-react-lite";
4
- import g from "@mui/material/Stack";
5
- import { useTheme as j, Card as be, Stack as _, Box as O } from "@mui/material";
6
- import { Text as l, H3 as ve, InstitutionLogo as De, Icon as ee } from "@mxenabled/mxui";
7
- import { getUnixTime as le, addMonths as se, fromUnixTime as ce, intervalToDuration as Te, formatDuration as Ae } from "date-fns";
8
- import { D as M, M as Ee, I as Ie } from "../DebtsStore-VkyMADzd.mjs";
9
- import { a as Pr } from "../DebtsStore-VkyMADzd.mjs";
10
- import { f as P, a as Be } from "../NumberFormatting-CtWHhyBX.mjs";
4
+ import f from "@mui/material/Stack";
5
+ import { useTheme as j, Card as me, Stack as _, Box as O } from "@mui/material";
6
+ import { Text as i, H3 as we, InstitutionLogo as Ce, Icon as ee } from "@mxenabled/mxui";
7
+ import { intervalToDuration as Se, formatDuration as De } from "date-fns";
8
+ import { D as $ } from "../DebtsStore-Dp-CraCD.mjs";
9
+ import { a as Sr } from "../DebtsStore-Dp-CraCD.mjs";
10
+ import { f as B, a as ve } from "../NumberFormatting-CtWHhyBX.mjs";
11
11
  import { f as K, D as U } from "../Dialog-CWW597AF.mjs";
12
- import { G as Me, x as q, u as C, j as z, e as k, c as Z, a as Pe } from "../hooks-DkUqN6JE.mjs";
12
+ import { G as Te, x as q, u as C, j as z, e as M, c as Z, a as Ae } from "../hooks-DkUqN6JE.mjs";
13
13
  import { u as X } from "../useScreenSize-B6JyS_Lj.mjs";
14
14
  import { D as te } from "../Drawer-kEE73B87.mjs";
15
- import { b as A } from "../Localization-2MODESHW.mjs";
16
- import { A as ke, u as Fe } from "../AccountDetailsHeader-Eb3WvBGm.mjs";
17
- import Ne from "@mui/material/Card";
18
- import Re from "@mui/material/CardContent";
19
- import Le from "@mui/material/CardHeader";
20
- import { LineChart as $e } from "@mui/x-charts";
15
+ import { b as T } from "../Localization-2MODESHW.mjs";
16
+ import { A as Ee, u as Ie } from "../AccountDetailsHeader-Eb3WvBGm.mjs";
17
+ import Be from "@mui/material/Card";
18
+ import Me from "@mui/material/CardContent";
19
+ import ke from "@mui/material/CardHeader";
20
+ import { LineChart as Pe } from "@mui/x-charts";
21
21
  import re from "@mui/material/Box";
22
- import { useTheme as He } from "@mui/material/styles";
23
- import { A as T, W as Oe } from "../WidgetContainer-CdBs9WOZ.mjs";
24
- import de from "@mui/material/Tab";
25
- import We from "@mui/material/Tabs";
26
- import _e from "@mui/material/List";
22
+ import { useTheme as Ne } from "@mui/material/styles";
23
+ import { A as v, W as Re } from "../WidgetContainer-CdBs9WOZ.mjs";
24
+ import le from "@mui/material/Tab";
25
+ import $e from "@mui/material/Tabs";
26
+ import he from "@mui/material/List";
27
27
  import W from "@mui/material/Divider";
28
- import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-DepsKiJz.mjs";
29
- import Xe from "@mui/material/TextField";
28
+ import { M as Le, I as He, O as Fe } from "../OriginalBalanceAction-DepsKiJz.mjs";
29
+ import Oe from "@mui/material/TextField";
30
30
  import { L as J } from "../ListItemAction-DNZZ5fSa.mjs";
31
31
  import { C as ae } from "../CurrencyInput-bEx2Mbd0.mjs";
32
- import pe from "@mui/material/Alert";
33
- import me from "@mui/material/AlertTitle";
34
- import he from "@mui/material/Paper";
35
- import { Error as Ve, CheckCircle as ye } from "@mxenabled/mx-icons";
36
- import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
37
- import { DataGridPro as Ye } from "@mui/x-data-grid-pro";
32
+ import se from "@mui/material/Alert";
33
+ import ce from "@mui/material/AlertTitle";
34
+ import de from "@mui/material/Paper";
35
+ import { Error as We, CheckCircle as ue } from "@mxenabled/mx-icons";
36
+ import { T as pe } from "../TabContentContainer-j01JYR_7.mjs";
37
+ import { DataGridPro as Ge } from "@mui/x-data-grid-pro";
38
38
  import { H as G } from "../HeaderCell-DjuifqHJ.mjs";
39
- import { f as Ke } from "../ConnectDrawer-phFH6OHt.mjs";
40
- import fe from "@mui/material/Button";
41
- import Ue from "@mui/material/IconButton";
42
- import qe from "@mui/material/ListItem";
43
- import Ze from "@mui/material/Popover";
44
- import { L as Je } from "../Loader-DUaFpDGv.mjs";
45
- const Qe = (a, n = 0, o = 0) => {
46
- const r = n / (Ee * Ie);
47
- return o === 0 ? 0 : Math.ceil(
48
- r === 0 ? a / o : -Math.log(1 - r * a / o) / Math.log(1 + r)
49
- );
50
- }, et = (a, n, o, r, t) => {
51
- const i = [];
52
- if (o === 0) {
53
- for (let d = 0; d < a; d++) {
54
- const c = n - r * (d + 1), h = n - r * d, m = c >= 0 ? r : h;
55
- i.push({
56
- balance: c >= 0 ? c : 0,
57
- interest: o,
58
- payment: m,
59
- principal: m,
60
- timestamp: le(
61
- se(
62
- ce(t),
63
- // convert seconds → Date
64
- d + 1
65
- // add (index + 1) months
66
- )
67
- )
68
- });
69
- }
70
- return i;
71
- }
72
- const p = o / 1200;
73
- for (let d = 0; d < a; d++) {
74
- const c = le(se(ce(t), d + 1)), h = Math.pow(1 + p, d), m = n * h - r * ((h - 1) / p), y = Math.pow(1 + p, d + 1), f = n * y - r * ((y - 1) / p), v = r + Math.min(f, 0), E = m * p;
75
- i.push({
76
- balance: Math.max(0, f),
77
- interest: E,
78
- payment: v,
79
- principal: v - E,
80
- timestamp: c
81
- });
82
- }
83
- return i;
84
- }, tt = (a) => (a[a.length - 1] || {}).timestamp, rt = (a) => a.map((n) => {
85
- const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: i } = n, p = Qe(t, r ?? 0, o ?? 0), d = et(
86
- p,
87
- t,
88
- r ?? 0,
89
- o ?? 0,
90
- i
91
- ), c = tt(d);
92
- return {
93
- ...n,
94
- minimumFinalPayment: c,
95
- minimumPayments: d
96
- };
97
- }), xe = (a, n) => {
98
- const o = rt(
99
- a.filter((t) => !t.is_paid_off && !t.is_impossible)
100
- ), r = a.filter((t) => t.is_paid_off || t.is_impossible).map((t) => ({ ...t, minimumPayments: [] }));
101
- switch (n) {
102
- case M.FASTEST_PAYOFF_FIRST:
103
- o.sort((t, i) => (t.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
104
- break;
105
- case M.HIGHEST_INTEREST:
106
- o.sort((t, i) => (i.interest_rate ?? 0) - (t.interest_rate ?? 0));
39
+ import { f as je } from "../ConnectDrawer-phFH6OHt.mjs";
40
+ import be from "@mui/material/Button";
41
+ import ze from "@mui/material/IconButton";
42
+ import Xe from "@mui/material/ListItem";
43
+ import Ve from "@mui/material/Popover";
44
+ import { L as Ye } from "../Loader-DUaFpDGv.mjs";
45
+ const _e = (a, o) => {
46
+ const n = a.filter((t) => !t.is_paid_off && !t.is_impossible), r = a.filter((t) => t.is_paid_off || t.is_impossible);
47
+ switch (o) {
48
+ case $.HIGHEST_INTEREST:
49
+ n.sort((t, l) => (l.interest_rate ?? 0) - (t.interest_rate ?? 0));
107
50
  break;
108
- case M.LOWEST_BALANCE:
109
- o.sort((t, i) => t.balance - i.balance);
51
+ case $.LOWEST_BALANCE:
52
+ n.sort((t, l) => t.balance - l.balance);
110
53
  break;
111
- case M.HIGHEST_BALANCE:
112
- o.sort((t, i) => i.balance - t.balance);
54
+ case $.HIGHEST_BALANCE:
55
+ n.sort((t, l) => l.balance - t.balance);
113
56
  break;
114
57
  default:
115
- o.sort((t, i) => t.balance - i.balance);
58
+ n.sort((t, l) => t.balance - l.balance);
116
59
  }
117
- a.splice(0, a.length, ...o, ...r);
60
+ a.splice(0, a.length, ...n, ...r);
118
61
  };
119
- function at(a, n, o = 0) {
120
- const r = a.map((m) => ({ ...m })).filter(
121
- (m) => m.interest_rate !== void 0 && m.monthly_payment !== void 0 && !m.is_paid_off
62
+ function Ke(a, o, n = 0) {
63
+ const r = a.map((p) => ({ ...p })).filter(
64
+ (p) => p.interest_rate !== void 0 && p.monthly_payment !== void 0 && !p.is_paid_off
122
65
  );
123
- xe(r, n);
124
- let t = 0, i = 0;
125
- const p = /* @__PURE__ */ new Date(), d = /* @__PURE__ */ new Date();
126
- for (; r.some((m) => m.balance >= 0.01 && !m.is_impossible); ) {
127
- let m = !1;
128
- for (const [y, f] of r.entries()) {
129
- if (f.balance <= 0.01 || f.is_impossible) continue;
130
- const E = (f.interest_rate ?? 0) / 100 / 12, D = f.balance * E;
131
- let u = f.monthly_payment ?? 0;
132
- y === 0 && o && (u += o), f.balance += D;
133
- const I = Math.min(f.balance, u + i);
134
- if (I <= D) {
135
- f.is_impossible = !0;
66
+ _e(r, o);
67
+ let t = 0, l = 0;
68
+ const d = /* @__PURE__ */ new Date(), m = /* @__PURE__ */ new Date();
69
+ for (; r.some((p) => p.balance >= 0.01 && !p.is_impossible); ) {
70
+ let p = !1;
71
+ for (const [g, x] of r.entries()) {
72
+ if (x.balance <= 0.01 || x.is_impossible) continue;
73
+ const k = (x.interest_rate ?? 0) / 100 / 12, D = x.balance * k;
74
+ let u = x.monthly_payment ?? 0;
75
+ g === 0 && n && (u += n), x.balance += D;
76
+ const A = Math.min(x.balance, u + l);
77
+ if (A <= D) {
78
+ x.is_impossible = !0;
136
79
  continue;
137
80
  }
138
- f.balance -= I, f.balance = f.balance < 0.01 ? 0 : f.balance, t += D, f.balance <= 0 && (i += u), I > 0 && (m = !0);
81
+ x.balance -= A, x.balance = x.balance < 0.01 ? 0 : x.balance, t += D, x.balance <= 0 && (l += u), A > 0 && (p = !0);
139
82
  }
140
- m && d.setMonth(d.getMonth() + 1);
83
+ p && m.setMonth(m.getMonth() + 1);
141
84
  }
142
- const c = r.some((m) => m.is_impossible && m.balance > 0), h = Te({ start: p, end: d });
85
+ const c = r.some((p) => p.is_impossible && p.balance > 0), h = Se({ start: d, end: m });
143
86
  return {
144
- payoffSavings: c ? "N/A" : P(t, "0,0.00"),
145
- payoffDate: c ? "Never" : K(d, U.MONTH_YEAR),
146
- payoffDuration: c ? "Stagnant" : Ae(h, { format: ["years", "months"] }) || "0 months"
87
+ payoffSavings: c ? "N/A" : B(t, "0,0.00"),
88
+ payoffDate: c ? "Never" : K(m, U.MONTH_YEAR),
89
+ payoffDuration: c ? "Stagnant" : De(h, { format: ["years", "months"] }) || "0 months"
147
90
  };
148
91
  }
149
92
  const R = () => {
150
- if (!x.useContext(Me))
93
+ if (!y.useContext(Te))
151
94
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
152
95
  return q().uiStore;
153
- }, nt = ({ debts: a, onClickCta: n, sx: o }) => {
154
- const r = j(), { isMobile: t } = X(), { debts: i } = C(), { selectedDebtPriority: p } = R(), { monthlyCashFlowProfile: d } = z(), { payoffDate: c, payoffSavings: h, payoffDuration: m } = x.useMemo(() => {
155
- const y = d?.extra_payment ?? 0;
156
- return at(a, p, y);
157
- }, [a, p, d]);
96
+ }, Ue = ({ debts: a, onClickCta: o, sx: n }) => {
97
+ const r = j(), { isMobile: t } = X(), { debts: l } = C(), { selectedDebtPriority: d } = R(), { monthlyCashFlowProfile: m } = z(), { payoffDate: c, payoffSavings: h, payoffDuration: p } = y.useMemo(() => {
98
+ const g = m?.extra_payment ?? 0;
99
+ return Ke(a, d, g);
100
+ }, [a, d, m]);
158
101
  return /* @__PURE__ */ e(
159
- be,
102
+ me,
160
103
  {
161
104
  sx: {
162
105
  boxShadow: r.shadows[2],
163
106
  width: t ? "100%" : "186px",
164
107
  minWidth: "186px",
165
- ...o
108
+ ...n
166
109
  },
167
110
  children: /* @__PURE__ */ s(_, { sx: { gap: "12px", p: "16px" }, children: [
168
111
  /* @__PURE__ */ s(
@@ -175,79 +118,79 @@ const R = () => {
175
118
  pb: "8px"
176
119
  },
177
120
  children: [
178
- /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_date_description }),
179
- /* @__PURE__ */ e(l, { bold: !0, color: r.palette.primary.main, variant: "Small", children: c })
121
+ /* @__PURE__ */ e(i, { variant: "XSmall", children: l.snowball_card_date_description }),
122
+ /* @__PURE__ */ e(i, { bold: !0, color: r.palette.primary.main, variant: "Small", children: c })
180
123
  ]
181
124
  }
182
125
  ),
183
126
  /* @__PURE__ */ s(_, { gap: t ? "4px" : "0", children: [
184
- /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: h }),
185
- /* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: i.snowball_card_amount_description })
127
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Small", children: h }),
128
+ /* @__PURE__ */ e(i, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: l.snowball_card_amount_description })
186
129
  ] }),
187
130
  /* @__PURE__ */ s(_, { gap: t ? "4px" : "0", children: [
188
- /* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: m }),
189
- /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_duration_description })
131
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Small", children: p }),
132
+ /* @__PURE__ */ e(i, { variant: "XSmall", children: l.snowball_card_duration_description })
190
133
  ] }),
191
134
  /* @__PURE__ */ e(
192
- l,
135
+ i,
193
136
  {
194
137
  bold: !0,
195
138
  color: r.palette.primary.main,
196
- onClick: n,
139
+ onClick: o,
197
140
  sx: { cursor: "pointer" },
198
141
  variant: "Small",
199
- children: i.snowball_card_cta
142
+ children: l.snowball_card_cta
200
143
  }
201
144
  )
202
145
  ] })
203
146
  }
204
147
  );
205
- }, ot = S(nt), it = ({ isOpen: a, onClose: n, sx: o }) => {
206
- const r = j(), { debts: t } = C(), [i, p] = x.useState(!1);
148
+ }, qe = S(Ue), Ze = ({ isOpen: a, onClose: o, sx: n }) => {
149
+ const r = j(), { debts: t } = C(), [l, d] = y.useState(!1);
207
150
  return /* @__PURE__ */ e(
208
151
  te,
209
152
  {
210
153
  ariaLabelClose: "",
211
154
  isOpen: a,
212
- onClose: n,
213
- sx: { ...o },
155
+ onClose: o,
156
+ sx: { ...n },
214
157
  title: t.snowball_drawer_title,
215
158
  children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
216
159
  /* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
217
160
  /* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
218
- /* @__PURE__ */ e(l, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
219
- /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
220
- /* @__PURE__ */ e(l, { variant: "H1", children: t.snowball_drawer_savings }),
221
- /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
161
+ /* @__PURE__ */ e(i, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
162
+ /* @__PURE__ */ e(i, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
163
+ /* @__PURE__ */ e(i, { variant: "H1", children: t.snowball_drawer_savings }),
164
+ /* @__PURE__ */ e(i, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
222
165
  ] }),
223
- /* @__PURE__ */ s(be, { sx: { display: "grid", py: 16, px: 24 }, children: [
224
- /* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
166
+ /* @__PURE__ */ s(me, { sx: { display: "grid", py: 16, px: 24 }, children: [
167
+ /* @__PURE__ */ e(i, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
225
168
  /* @__PURE__ */ e(
226
- l,
169
+ i,
227
170
  {
228
171
  color: r.palette.secondary.main,
229
172
  mb: 8,
230
- sx: { whiteSpace: i ? "normal" : "nowrap" },
173
+ sx: { whiteSpace: l ? "normal" : "nowrap" },
231
174
  variant: "ParagraphSmall",
232
175
  children: t.snowball_drawer_answer
233
176
  }
234
177
  ),
235
178
  /* @__PURE__ */ e(
236
- l,
179
+ i,
237
180
  {
238
181
  bold: !0,
239
182
  color: r.palette.primary.main,
240
- onClick: () => p(!i),
183
+ onClick: () => d(!l),
241
184
  sx: { cursor: "pointer" },
242
185
  variant: "Small",
243
- children: i ? t.snowball_drawer_less : t.snowball_drawer_more
186
+ children: l ? t.snowball_drawer_less : t.snowball_drawer_more
244
187
  }
245
188
  )
246
189
  ] })
247
190
  ] }),
248
191
  /* @__PURE__ */ s(_, { children: [
249
192
  /* @__PURE__ */ e(
250
- l,
193
+ i,
251
194
  {
252
195
  color: r.palette.secondary.main,
253
196
  px: 24,
@@ -257,8 +200,8 @@ const R = () => {
257
200
  }
258
201
  ),
259
202
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
260
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 1) }),
261
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
203
+ /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: T(t.snowball_drawer_month_header, 1) }),
204
+ /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
262
205
  ] }),
263
206
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
264
207
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -275,7 +218,7 @@ const R = () => {
275
218
  backgroundColor: r.palette.success.main,
276
219
  marginRight: 12
277
220
  },
278
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
221
+ children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
279
222
  }
280
223
  ),
281
224
  /* @__PURE__ */ s(
@@ -290,20 +233,20 @@ const R = () => {
290
233
  },
291
234
  children: [
292
235
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
293
- /* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "A") }),
294
- /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
295
- A(
236
+ /* @__PURE__ */ e(i, { variant: "Body", children: T(t.snowball_drawer_debt_label, "A") }),
237
+ /* @__PURE__ */ s(i, { color: r.palette.secondary.main, variant: "XSmall", children: [
238
+ T(
296
239
  t.snowball_drawer_rollover_explainer_pt1,
297
240
  "$100"
298
241
  ),
299
- /* @__PURE__ */ e("strong", { children: A(t.snowball_drawer_debt_label, "B") }),
242
+ /* @__PURE__ */ e("strong", { children: T(t.snowball_drawer_debt_label, "B") }),
300
243
  t.snowball_drawer_rollover_explainer_pt2
301
244
  ] })
302
245
  ] }),
303
246
  /* @__PURE__ */ s(_, { children: [
304
- /* @__PURE__ */ e(l, { variant: "Body", children: "$100.00" }),
247
+ /* @__PURE__ */ e(i, { variant: "Body", children: "$100.00" }),
305
248
  /* @__PURE__ */ e(
306
- l,
249
+ i,
307
250
  {
308
251
  bold: !0,
309
252
  color: r.palette.success.main,
@@ -341,8 +284,8 @@ const R = () => {
341
284
  pr: 24
342
285
  },
343
286
  children: [
344
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "B") }),
345
- /* @__PURE__ */ e(l, { variant: "Body", children: "$400.00" })
287
+ /* @__PURE__ */ e(i, { flexGrow: 1, variant: "Body", children: T(t.snowball_drawer_debt_label, "B") }),
288
+ /* @__PURE__ */ e(i, { variant: "Body", children: "$400.00" })
346
289
  ]
347
290
  }
348
291
  )
@@ -361,8 +304,8 @@ const R = () => {
361
304
  }
362
305
  ),
363
306
  /* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
364
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }),
365
- /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
307
+ /* @__PURE__ */ e(i, { flexGrow: 1, variant: "Body", children: T(t.snowball_drawer_debt_label, "C") }),
308
+ /* @__PURE__ */ e(i, { variant: "Body", children: "$1,000.00" })
366
309
  ] })
367
310
  ] }),
368
311
  /* @__PURE__ */ s(
@@ -377,15 +320,15 @@ const R = () => {
377
320
  borderBottom: `1px solid ${r.palette.border.light}`
378
321
  },
379
322
  children: [
380
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
381
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
323
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
324
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: "$1,500.00" })
382
325
  ]
383
326
  }
384
327
  )
385
328
  ] }),
386
329
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
387
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 2) }),
388
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
330
+ /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: T(t.snowball_drawer_month_header, 2) }),
331
+ /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
389
332
  ] }),
390
333
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
391
334
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -402,7 +345,7 @@ const R = () => {
402
345
  backgroundColor: r.palette.success.main,
403
346
  marginRight: 12
404
347
  },
405
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
348
+ children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
406
349
  }
407
350
  ),
408
351
  /* @__PURE__ */ s(
@@ -417,20 +360,20 @@ const R = () => {
417
360
  },
418
361
  children: [
419
362
  /* @__PURE__ */ s(_, { flexGrow: 1, children: [
420
- /* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "B") }),
421
- /* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
422
- A(
363
+ /* @__PURE__ */ e(i, { variant: "Body", children: T(t.snowball_drawer_debt_label, "B") }),
364
+ /* @__PURE__ */ s(i, { color: r.palette.secondary.main, variant: "XSmall", children: [
365
+ T(
423
366
  t.snowball_drawer_rollover_explainer_pt1,
424
367
  "$500"
425
368
  ),
426
- /* @__PURE__ */ e("strong", { children: A(t.snowball_drawer_debt_label, "C") }),
369
+ /* @__PURE__ */ e("strong", { children: T(t.snowball_drawer_debt_label, "C") }),
427
370
  t.snowball_drawer_rollover_explainer_pt2
428
371
  ] })
429
372
  ] }),
430
373
  /* @__PURE__ */ s(_, { children: [
431
- /* @__PURE__ */ e(l, { variant: "Body", children: "$500.00" }),
374
+ /* @__PURE__ */ e(i, { variant: "Body", children: "$500.00" }),
432
375
  /* @__PURE__ */ e(
433
- l,
376
+ i,
434
377
  {
435
378
  bold: !0,
436
379
  color: r.palette.success.main,
@@ -467,8 +410,8 @@ const R = () => {
467
410
  pr: 24
468
411
  },
469
412
  children: [
470
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }),
471
- /* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
413
+ /* @__PURE__ */ e(i, { flexGrow: 1, variant: "Body", children: T(t.snowball_drawer_debt_label, "C") }),
414
+ /* @__PURE__ */ e(i, { variant: "Body", children: "$1,000.00" })
472
415
  ]
473
416
  }
474
417
  )
@@ -485,15 +428,15 @@ const R = () => {
485
428
  borderBottom: `1px solid ${r.palette.border.light}`
486
429
  },
487
430
  children: [
488
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
489
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
431
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
432
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: "$1,500.00" })
490
433
  ]
491
434
  }
492
435
  )
493
436
  ] }),
494
437
  /* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
495
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 3) }),
496
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
438
+ /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: T(t.snowball_drawer_month_header, 3) }),
439
+ /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
497
440
  ] }),
498
441
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
499
442
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
@@ -510,7 +453,7 @@ const R = () => {
510
453
  backgroundColor: r.palette.success.main,
511
454
  marginRight: 12
512
455
  },
513
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
456
+ children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
514
457
  }
515
458
  ),
516
459
  /* @__PURE__ */ s(
@@ -524,11 +467,11 @@ const R = () => {
524
467
  pr: 24
525
468
  },
526
469
  children: [
527
- /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }) }),
470
+ /* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(i, { variant: "Body", children: T(t.snowball_drawer_debt_label, "C") }) }),
528
471
  /* @__PURE__ */ s(_, { children: [
529
- /* @__PURE__ */ e(l, { variant: "Body", children: "$1,500.00" }),
472
+ /* @__PURE__ */ e(i, { variant: "Body", children: "$1,500.00" }),
530
473
  /* @__PURE__ */ e(
531
- l,
474
+ i,
532
475
  {
533
476
  bold: !0,
534
477
  color: r.palette.success.main,
@@ -554,8 +497,8 @@ const R = () => {
554
497
  borderBottom: `1px solid ${r.palette.border.light}`
555
498
  },
556
499
  children: [
557
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
558
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
500
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
501
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: "$1,500.00" })
559
502
  ]
560
503
  }
561
504
  )
@@ -564,50 +507,50 @@ const R = () => {
564
507
  ] })
565
508
  }
566
509
  );
567
- }, lt = S(it), st = "#FF7B08";
568
- function ct(a, n) {
569
- const [o, r, t] = a.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), i = [
570
- Math.max(0, Math.min(255, Math.round(o * n))),
571
- Math.max(0, Math.min(255, Math.round(r * n))),
572
- Math.max(0, Math.min(255, Math.round(t * n)))
510
+ }, Je = S(Ze), Qe = "#FF7B08";
511
+ function et(a, o) {
512
+ const [n, r, t] = a.replace(/^#/, "").match(/.{1,2}/g).map((d) => parseInt(d, 16)), l = [
513
+ Math.max(0, Math.min(255, Math.round(n * o))),
514
+ Math.max(0, Math.min(255, Math.round(r * o))),
515
+ Math.max(0, Math.min(255, Math.round(t * o)))
573
516
  ];
574
- return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
517
+ return `rgb(${l[0]}, ${l[1]}, ${l[2]})`;
575
518
  }
576
- const ge = ({
519
+ const ye = ({
577
520
  sx: a,
578
- height: n = 500,
579
- width: o,
521
+ height: o = 500,
522
+ width: n,
580
523
  debts: r,
581
524
  hoveredDebtGuid: t,
582
- onClickArea: i,
583
- onHoverArea: p
525
+ onClickArea: l,
526
+ onHoverArea: d
584
527
  }) => {
585
- const d = He(), { onEvent: c } = k(), h = r.filter((b) => !b.is_impossible), m = [
528
+ const m = Ne(), { onEvent: c } = M(), h = r.filter((b) => !b.is_impossible), p = [
586
529
  ...new Set(
587
530
  h.flatMap((b) => b.dataset.map((w) => new Date(w.x).getTime()))
588
531
  )
589
- ].sort((b, w) => b - w).map((b) => new Date(b)), y = h.map((b) => {
532
+ ].sort((b, w) => b - w).map((b) => new Date(b)), g = h.map((b) => {
590
533
  const w = new Map(b.dataset.map((N) => [new Date(N.x).getTime(), N.y]));
591
- let B = w.get(m[0].getTime()) ?? 0;
592
- const F = m.map((N) => {
593
- const $ = w.get(N.getTime()) ?? B;
594
- return B = $, { x: N, y: $ };
534
+ let I = w.get(p[0].getTime()) ?? 0;
535
+ const P = p.map((N) => {
536
+ const H = w.get(N.getTime()) ?? I;
537
+ return I = H, { x: N, y: H };
595
538
  });
596
- return { ...b, dataset: F };
597
- }), f = y.reduce(
539
+ return { ...b, dataset: P };
540
+ }), x = g.reduce(
598
541
  (b, w) => b + (w.dataset[0]?.y ?? 0),
599
542
  0
600
- ), v = m.map((b, w) => {
601
- const B = w / (m.length - 1), F = f * (1 - B);
602
- return { x: b, y: F };
603
- }), E = Math.ceil(f / 100) * 100, D = m, u = y.map((b, w) => {
604
- const B = 1 - w / y.length * 0.5, F = ct(st, B);
543
+ ), E = p.map((b, w) => {
544
+ const I = w / (p.length - 1), P = x * (1 - I);
545
+ return { x: b, y: P };
546
+ }), k = Math.ceil(x / 100) * 100, D = p, u = g.map((b, w) => {
547
+ const I = 1 - w / g.length * 0.5, P = et(Qe, I);
605
548
  return {
606
549
  id: `debt-${w}`,
607
550
  guid: b.guid,
608
551
  label: b.name,
609
552
  data: b.dataset.map((N) => N.y),
610
- color: F,
553
+ color: P,
611
554
  curve: "linear",
612
555
  type: "line",
613
556
  area: !0,
@@ -618,15 +561,15 @@ const ge = ({
618
561
  u.push({
619
562
  id: "payoff-line",
620
563
  label: "Payoff Line",
621
- data: v.map((b) => b.y),
622
- color: d.palette.grey[700],
564
+ data: E.map((b) => b.y),
565
+ color: m.palette.grey[700],
623
566
  curve: "linear",
624
567
  type: "line",
625
568
  stack: void 0,
626
569
  showMark: !1,
627
570
  disableHighlight: !0
628
571
  });
629
- const I = (b) => u.findIndex((w) => w?.guid === b);
572
+ const A = (b) => u.findIndex((w) => w?.guid === b);
630
573
  return /* @__PURE__ */ e(
631
574
  re,
632
575
  {
@@ -643,19 +586,19 @@ const ge = ({
643
586
  }
644
587
  },
645
588
  children: /* @__PURE__ */ e(
646
- $e,
589
+ Pe,
647
590
  {
648
591
  axisHighlight: { x: "none" },
649
592
  disableLineItemHighlight: !0,
650
- height: n,
593
+ height: o,
651
594
  onAreaClick: (b, w) => {
652
- i?.();
653
- const B = u.find((F) => F.id === w.seriesId);
654
- c(T.DEBTS_CLICK_CHART_AREA, { account_guid: B?.guid });
595
+ l?.();
596
+ const I = u.find((P) => P.id === w.seriesId);
597
+ c(v.DEBTS_CLICK_CHART_AREA, { account_guid: I?.guid });
655
598
  },
656
599
  onHighlightChange: (b) => {
657
- const w = u.find((B) => B.id === b?.seriesId)?.guid;
658
- p?.(w ?? "");
600
+ const w = u.find((I) => I.id === b?.seriesId)?.guid;
601
+ d?.(w ?? "");
659
602
  },
660
603
  series: u,
661
604
  skipAnimation: !0,
@@ -681,21 +624,21 @@ const ge = ({
681
624
  strokeDasharray: "10 5",
682
625
  strokeWidth: 1
683
626
  },
684
- [`& .MuiLineElement-series-debt-${I(t ?? "0")}`]: {
627
+ [`& .MuiLineElement-series-debt-${A(t ?? "0")}`]: {
685
628
  opacity: 1
686
629
  },
687
- [`& .MuiAreaElement-series-debt-${I(t ?? "0")}`]: {
630
+ [`& .MuiAreaElement-series-debt-${A(t ?? "0")}`]: {
688
631
  opacity: 1
689
632
  },
690
633
  ...a
691
634
  },
692
635
  tooltip: { trigger: "none" },
693
- width: o,
636
+ width: n,
694
637
  xAxis: [
695
638
  {
696
639
  data: D,
697
640
  scaleType: "time",
698
- min: m[0],
641
+ min: p[0],
699
642
  disableTicks: !0,
700
643
  valueFormatter: (b) => K(b, U.MONTH_SHORT_YEAR)
701
644
  }
@@ -703,20 +646,20 @@ const ge = ({
703
646
  yAxis: [
704
647
  {
705
648
  min: 0,
706
- max: E,
649
+ max: k,
707
650
  disableTicks: !0,
708
- valueFormatter: (b) => P(b, "0a")
651
+ valueFormatter: (b) => B(b, "0a")
709
652
  }
710
653
  ]
711
654
  }
712
655
  )
713
656
  }
714
657
  );
715
- }, dt = () => {
716
- const a = j(), { debts: n } = C(), { selectedDebtChartData: o } = R();
658
+ }, tt = () => {
659
+ const a = j(), { debts: o } = C(), { selectedDebtChartData: n } = R();
717
660
  return /* @__PURE__ */ s(L, { children: [
718
661
  /* @__PURE__ */ s(
719
- Ne,
662
+ Be,
720
663
  {
721
664
  sx: {
722
665
  "& .MuiCardContent-root:last-child": {
@@ -724,39 +667,39 @@ const ge = ({
724
667
  }
725
668
  },
726
669
  children: [
727
- /* @__PURE__ */ e(Le, { sx: { pb: 0 }, title: /* @__PURE__ */ e(ve, { sx: { pb: 4 }, children: n.details_chart_title }) }),
728
- /* @__PURE__ */ e(Re, { sx: { p: 0 }, children: /* @__PURE__ */ e(ge, { debts: [o], height: 250 }) })
670
+ /* @__PURE__ */ e(ke, { sx: { pb: 0 }, title: /* @__PURE__ */ e(we, { sx: { pb: 4 }, children: o.details_chart_title }) }),
671
+ /* @__PURE__ */ e(Me, { sx: { p: 0 }, children: /* @__PURE__ */ e(ye, { debts: [n], height: 250 }) })
729
672
  ]
730
673
  }
731
674
  ),
732
675
  /* @__PURE__ */ e(
733
- l,
676
+ i,
734
677
  {
735
678
  color: a.palette.text.secondary,
736
679
  sx: { whiteSpace: "normal", textAlign: "center", px: 8, py: 12 },
737
680
  variant: "Small",
738
- children: n.details_chart_description
681
+ children: o.details_chart_description
739
682
  }
740
683
  )
741
684
  ] });
742
- }, pt = S(dt), mt = () => {
743
- const a = j(), { onEvent: n } = k(), { debts: o } = C(), { selectedDebtChartData: r, showCompleted: t, showError: i } = R();
744
- return x.useEffect(() => n(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(_e, { children: i || t ? /* @__PURE__ */ e(
745
- l,
685
+ }, rt = S(tt), at = () => {
686
+ const a = j(), { onEvent: o } = M(), { debts: n } = C(), { selectedDebtChartData: r, showCompleted: t, showError: l } = R();
687
+ return y.useEffect(() => o(v.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(he, { children: l || t ? /* @__PURE__ */ e(
688
+ i,
746
689
  {
747
690
  color: a.palette.secondary.main,
748
691
  component: "div",
749
692
  sx: { p: 32, textAlign: "center", whiteSpace: "normal" },
750
693
  variant: "Small",
751
- children: i ? o.schedule_error_message : o.schedule_complete_message
694
+ children: l ? n.schedule_error_message : n.schedule_complete_message
752
695
  }
753
696
  ) : /* @__PURE__ */ s(L, { children: [
754
- /* @__PURE__ */ s(g, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
755
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: o.schedule_month_heading }),
756
- /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: o.schedule_amount_heading })
697
+ /* @__PURE__ */ s(f, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
698
+ /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: n.schedule_month_heading }),
699
+ /* @__PURE__ */ e(i, { bold: !0, variant: "XSmall", children: n.schedule_amount_heading })
757
700
  ] }),
758
- r.dataset.slice(1).map(({ x: p, y: d, payment: c }) => /* @__PURE__ */ e(g, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(g, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
759
- g,
701
+ r.dataset.slice(1).map(({ x: d, y: m, payment: c }) => /* @__PURE__ */ e(f, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(f, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
702
+ f,
760
703
  {
761
704
  sx: {
762
705
  borderBottom: `1px solid ${a.palette.border.light}`,
@@ -766,28 +709,28 @@ const ge = ({
766
709
  pr: 24
767
710
  },
768
711
  children: [
769
- /* @__PURE__ */ s(g, { flexGrow: 1, children: [
770
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: K(p, U.MONTH_YEAR) }),
771
- /* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: o.schedule_month_label })
712
+ /* @__PURE__ */ s(f, { flexGrow: 1, children: [
713
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: K(d, U.MONTH_YEAR) }),
714
+ /* @__PURE__ */ e(i, { color: a.palette.secondary.main, variant: "XSmall", children: n.schedule_month_label })
772
715
  ] }),
773
- /* @__PURE__ */ s(g, { children: [
774
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: P(d, "0,0.00") }),
716
+ /* @__PURE__ */ s(f, { children: [
717
+ /* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: B(m, "0,0.00") }),
775
718
  /* @__PURE__ */ e(
776
- l,
719
+ i,
777
720
  {
778
721
  bold: !0,
779
722
  color: a.palette.success.main,
780
723
  textAlign: "end",
781
724
  variant: "Tiny",
782
- children: `+${P(c, "0,0")}`
725
+ children: `+${B(c, "0,0")}`
783
726
  }
784
727
  )
785
728
  ] })
786
729
  ]
787
730
  }
788
- ) }) }, String(p))),
789
- /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
790
- g,
731
+ ) }) }, String(d))),
732
+ /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
733
+ f,
791
734
  {
792
735
  sx: {
793
736
  alignItems: "center",
@@ -797,135 +740,135 @@ const ge = ({
797
740
  px: 24
798
741
  },
799
742
  children: [
800
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: o.schedule_payoff_label }),
801
- /* @__PURE__ */ e(l, { variant: "Body", children: "-" })
743
+ /* @__PURE__ */ e(i, { flexGrow: 1, variant: "Body", children: n.schedule_payoff_label }),
744
+ /* @__PURE__ */ e(i, { variant: "Body", children: "-" })
802
745
  ]
803
746
  }
804
747
  ) })
805
748
  ] }) });
806
- }, ht = S(mt), ut = S(({ debt: a }) => {
807
- const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.interest_rate ?? 0), p = t < 0, d = async () => {
808
- await o({ ...a.account, interest_rate: t }), a.interest_rate = t, r(T.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
749
+ }, ot = S(at), nt = S(({ debt: a }) => {
750
+ const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = M(), [t, l] = y.useState(a.interest_rate ?? 0), d = t < 0, m = async () => {
751
+ await n({ ...a.account, interest_rate: t }), a.interest_rate = t, r(v.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
809
752
  }, c = () => {
810
753
  setTimeout(() => {
811
- i(a.interest_rate ?? 0);
754
+ l(a.interest_rate ?? 0);
812
755
  }, 250);
813
756
  };
814
757
  return /* @__PURE__ */ e(
815
758
  J,
816
759
  {
817
- isSaveDisabled: p,
818
- label: `${n.details_interest_rate} (%)`,
760
+ isSaveDisabled: d,
761
+ label: `${o.details_interest_rate} (%)`,
819
762
  onCancel: c,
820
- onSave: d,
821
- primaryText: n.details_interest_rate,
822
- secondaryText: Be(Number(a.interest_rate) / 100),
823
- zeroStateText: a.interest_rate ? void 0 : n.add_interest_rate,
763
+ onSave: m,
764
+ primaryText: o.details_interest_rate,
765
+ secondaryText: ve(Number(a.interest_rate) / 100),
766
+ zeroStateText: a.interest_rate ? void 0 : o.add_interest_rate,
824
767
  children: /* @__PURE__ */ e(
825
- Xe,
768
+ Oe,
826
769
  {
827
- error: p,
770
+ error: d,
828
771
  fullWidth: !0,
829
- onChange: (h) => i(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
772
+ onChange: (h) => l(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
830
773
  type: "number",
831
774
  value: t
832
775
  }
833
776
  )
834
777
  }
835
778
  );
836
- }), bt = S(({ debt: a }) => {
837
- const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.monthly_payment ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
838
- await o({ ...a.account, minimum_payment: t }), a.monthly_payment = t, r(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
779
+ }), it = S(({ debt: a }) => {
780
+ const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = M(), [t, l] = y.useState(a.monthly_payment ?? 0), d = t < 0 || t > 9999999999e-2, m = async () => {
781
+ await n({ ...a.account, minimum_payment: t }), a.monthly_payment = t, r(v.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
839
782
  }, c = () => {
840
783
  setTimeout(() => {
841
- i(a.monthly_payment ?? 0);
784
+ l(a.monthly_payment ?? 0);
842
785
  }, 250);
843
786
  };
844
787
  return /* @__PURE__ */ e(
845
788
  J,
846
789
  {
847
- isSaveDisabled: p,
848
- label: n.details_monthly_payment,
790
+ isSaveDisabled: d,
791
+ label: o.details_monthly_payment,
849
792
  onCancel: c,
850
- onSave: d,
851
- primaryText: n.details_monthly_payment,
852
- secondaryText: P(a.monthly_payment, "0,0"),
853
- zeroStateText: a.monthly_payment ? void 0 : n.add_monthly_payment,
793
+ onSave: m,
794
+ primaryText: o.details_monthly_payment,
795
+ secondaryText: B(a.monthly_payment, "0,0"),
796
+ zeroStateText: a.monthly_payment ? void 0 : o.add_monthly_payment,
854
797
  children: /* @__PURE__ */ e(
855
798
  ae,
856
799
  {
857
800
  amount: t,
858
801
  autoFocus: !0,
859
- error: p,
802
+ error: d,
860
803
  fullWidth: !0,
861
804
  minAmount: 0,
862
- setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
805
+ setAmount: (h) => l(isNaN(Number(h)) ? t : Number(h)),
863
806
  sx: { ".MuiTypography-Body": { p: 0 } }
864
807
  }
865
808
  )
866
809
  }
867
810
  );
868
- }), _t = S(({ debt: a }) => {
869
- const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.original_balance ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
870
- await o({ ...a.account, original_balance: t }), a.original_balance = t, r(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
811
+ }), lt = S(({ debt: a }) => {
812
+ const { debts: o } = C(), { updateAccount: n } = Z(), { onEvent: r } = M(), [t, l] = y.useState(a.original_balance ?? 0), d = t < 0 || t > 9999999999e-2, m = async () => {
813
+ await n({ ...a.account, original_balance: t }), a.original_balance = t, r(v.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
871
814
  }, c = () => {
872
815
  setTimeout(() => {
873
- i(a.original_balance ?? 0);
816
+ l(a.original_balance ?? 0);
874
817
  }, 250);
875
818
  };
876
819
  return /* @__PURE__ */ e(
877
820
  J,
878
821
  {
879
- isSaveDisabled: p,
880
- label: n.details_original_balance,
822
+ isSaveDisabled: d,
823
+ label: o.details_original_balance,
881
824
  onCancel: c,
882
- onSave: d,
883
- primaryText: n.details_original_balance,
884
- secondaryText: P(a.original_balance, "0,0"),
885
- zeroStateText: a.original_balance ? void 0 : n.add_original_balance,
825
+ onSave: m,
826
+ primaryText: o.details_original_balance,
827
+ secondaryText: B(a.original_balance, "0,0"),
828
+ zeroStateText: a.original_balance ? void 0 : o.add_original_balance,
886
829
  children: /* @__PURE__ */ e(
887
830
  ae,
888
831
  {
889
832
  amount: t,
890
833
  autoFocus: !0,
891
- error: p,
834
+ error: d,
892
835
  fullWidth: !0,
893
836
  minAmount: 0,
894
- setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
837
+ setAmount: (h) => l(isNaN(Number(h)) ? t : Number(h)),
895
838
  sx: { ".MuiTypography-Body": { p: 0 } }
896
839
  }
897
840
  )
898
841
  }
899
842
  );
900
- }), yt = () => {
901
- const { onEvent: a } = k(), { selectedDebtChartData: n } = R();
902
- return x.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(g, { bgcolor: "background.paper", children: [
903
- n?.goal && /* @__PURE__ */ s(L, { children: [
904
- /* @__PURE__ */ e(Ge, { goal: n.goal }),
843
+ }), st = () => {
844
+ const { onEvent: a } = M(), { selectedDebtChartData: o } = R();
845
+ return y.useEffect(() => a(v.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(f, { bgcolor: "background.paper", children: [
846
+ o?.goal && /* @__PURE__ */ s(L, { children: [
847
+ /* @__PURE__ */ e(Le, { goal: o.goal }),
905
848
  /* @__PURE__ */ e(W, {}),
906
- /* @__PURE__ */ e(je, { goal: n.goal }),
849
+ /* @__PURE__ */ e(He, { goal: o.goal }),
907
850
  /* @__PURE__ */ e(W, {}),
908
- /* @__PURE__ */ e(ze, { goal: n.goal }),
851
+ /* @__PURE__ */ e(Fe, { goal: o.goal }),
909
852
  /* @__PURE__ */ e(W, {})
910
853
  ] }),
911
- !n?.goal && n?.account && /* @__PURE__ */ s(L, { children: [
912
- /* @__PURE__ */ e(bt, { debt: n }),
854
+ !o?.goal && o?.account && /* @__PURE__ */ s(L, { children: [
855
+ /* @__PURE__ */ e(it, { debt: o }),
913
856
  /* @__PURE__ */ e(W, {}),
914
- /* @__PURE__ */ e(ut, { debt: n }),
857
+ /* @__PURE__ */ e(nt, { debt: o }),
915
858
  /* @__PURE__ */ e(W, {}),
916
- /* @__PURE__ */ e(_t, { debt: n }),
859
+ /* @__PURE__ */ e(lt, { debt: o }),
917
860
  /* @__PURE__ */ e(W, {})
918
861
  ] })
919
862
  ] });
920
- }, ft = S(yt), xt = ({ setTabValue: a, sx: n }) => {
921
- const { debts: o } = C(), { showError: r, showCompleted: t } = R();
922
- return x.useEffect(() => {
863
+ }, ct = S(st), dt = ({ setTabValue: a, sx: o }) => {
864
+ const { debts: n } = C(), { showError: r, showCompleted: t } = R();
865
+ return y.useEffect(() => {
923
866
  r && a(1);
924
- }, [r]), !r && !t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ s(g, { gap: 16, children: [
925
- /* @__PURE__ */ e(he, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ s(
926
- pe,
867
+ }, [r]), !r && !t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ s(f, { gap: 16, children: [
868
+ /* @__PURE__ */ e(de, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
869
+ se,
927
870
  {
928
- icon: r ? /* @__PURE__ */ e(Ve, { filled: !0 }) : /* @__PURE__ */ e(ye, { color: "success", filled: !0 }),
871
+ icon: r ? /* @__PURE__ */ e(We, { filled: !0 }) : /* @__PURE__ */ e(ue, { color: "success", filled: !0 }),
929
872
  severity: "error",
930
873
  sx: {
931
874
  alignItems: "start",
@@ -938,13 +881,13 @@ const ge = ({
938
881
  }
939
882
  },
940
883
  children: [
941
- /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r ? o.status_error_title : o.status_complete_title }),
942
- /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r ? o.status_error_description : o.status_complete_description })
884
+ /* @__PURE__ */ e(ce, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r ? n.status_error_title : n.status_complete_title }),
885
+ /* @__PURE__ */ e(i, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r ? n.status_error_description : n.status_complete_description })
943
886
  ]
944
887
  }
945
888
  ) }),
946
- r && /* @__PURE__ */ e(he, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ s(
947
- pe,
889
+ r && /* @__PURE__ */ e(de, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
890
+ se,
948
891
  {
949
892
  icon: /* @__PURE__ */ e(L, {}),
950
893
  severity: "error",
@@ -956,28 +899,28 @@ const ge = ({
956
899
  }
957
900
  },
958
901
  children: [
959
- /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: o.status_info_title }),
960
- /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: o.status_info_description })
902
+ /* @__PURE__ */ e(ce, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: n.status_info_title }),
903
+ /* @__PURE__ */ e(i, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: n.status_info_description })
961
904
  ]
962
905
  }
963
906
  ) })
964
907
  ] });
965
- }, gt = S(xt), wt = () => {
966
- const { debts: a } = C(), { showError: n, showCompleted: o } = R(), [r, t] = x.useState(0);
908
+ }, pt = S(dt), mt = () => {
909
+ const { debts: a } = C(), { showError: o, showCompleted: n } = R(), [r, t] = y.useState(0);
967
910
  return /* @__PURE__ */ s(L, { children: [
968
- (n || o) && /* @__PURE__ */ e(gt, { setTabValue: t, sx: { mt: -24 } }),
911
+ (o || n) && /* @__PURE__ */ e(pt, { setTabValue: t, sx: { mt: -24 } }),
969
912
  /* @__PURE__ */ s(
970
- We,
913
+ $e,
971
914
  {
972
915
  "aria-label": a.details_tabs_aria_label,
973
916
  centered: !0,
974
- onChange: (i, p) => t(p),
917
+ onChange: (l, d) => t(d),
975
918
  textColor: "primary",
976
919
  value: r,
977
920
  variant: "fullWidth",
978
921
  children: [
979
922
  /* @__PURE__ */ e(
980
- de,
923
+ le,
981
924
  {
982
925
  "aria-controls": "debt-schedule-tabpanel-0",
983
926
  id: "debt-schedule-tab-0",
@@ -985,7 +928,7 @@ const ge = ({
985
928
  }
986
929
  ),
987
930
  /* @__PURE__ */ e(
988
- de,
931
+ le,
989
932
  {
990
933
  "aria-controls": "debt-details-tabpanel-1",
991
934
  id: "debt-details-tab-1",
@@ -995,112 +938,112 @@ const ge = ({
995
938
  ]
996
939
  }
997
940
  ),
998
- /* @__PURE__ */ e(ue, { index: 0, name: "debt-schedule", value: r, children: /* @__PURE__ */ e(ht, {}) }),
999
- /* @__PURE__ */ e(ue, { index: 1, name: "debt-details", value: r, children: /* @__PURE__ */ e(ft, {}) })
941
+ /* @__PURE__ */ e(pe, { index: 0, name: "debt-schedule", value: r, children: /* @__PURE__ */ e(ot, {}) }),
942
+ /* @__PURE__ */ e(pe, { index: 1, name: "debt-details", value: r, children: /* @__PURE__ */ e(ct, {}) })
1000
943
  ] });
1001
- }, Ct = S(wt), St = ({ isOpen: a, onClose: n, sx: o }) => {
1002
- const { debts: r } = C(), { showError: t, showCompleted: i } = R(), p = t || i ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(pt, {});
944
+ }, ht = S(mt), ut = ({ isOpen: a, onClose: o, sx: n }) => {
945
+ const { debts: r } = C(), { showError: t, showCompleted: l } = R(), d = t || l ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(rt, {});
1003
946
  return /* @__PURE__ */ e(
1004
947
  te,
1005
948
  {
1006
949
  ariaLabelClose: r.details_close_aria,
1007
950
  isOpen: a,
1008
- onClose: n,
1009
- sx: { ...o },
951
+ onClose: o,
952
+ sx: { ...n },
1010
953
  title: r.details_title,
1011
- children: /* @__PURE__ */ s(g, { bgcolor: "background.default", children: [
1012
- /* @__PURE__ */ e(ke, { customDetailsChart: p }),
1013
- /* @__PURE__ */ e(Ct, {})
954
+ children: /* @__PURE__ */ s(f, { bgcolor: "background.default", children: [
955
+ /* @__PURE__ */ e(Ee, { customDetailsChart: d }),
956
+ /* @__PURE__ */ e(ht, {})
1014
957
  ] })
1015
958
  }
1016
959
  );
1017
- }, vt = S(() => {
1018
- const { debts: a } = C(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: o } = z(), { onEvent: r } = k(), [t, i] = x.useState(n?.extra_payment ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
1019
- n && (await o({ ...n, extra_payment: t }), n.extra_payment = t, r(T.DEBTS_SAVE_PAYDOWN_ACTION, {
1020
- user_guid: n?.user_guid
960
+ }, bt = S(() => {
961
+ const { debts: a } = C(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: n } = z(), { onEvent: r } = M(), [t, l] = y.useState(o?.extra_payment ?? 0), d = t < 0 || t > 9999999999e-2, m = async () => {
962
+ o && (await n({ ...o, extra_payment: t }), o.extra_payment = t, r(v.DEBTS_SAVE_PAYDOWN_ACTION, {
963
+ user_guid: o?.user_guid
1021
964
  }));
1022
965
  }, c = () => {
1023
966
  setTimeout(() => {
1024
- i(n?.extra_payment ?? 0);
967
+ l(o?.extra_payment ?? 0);
1025
968
  }, 250);
1026
969
  };
1027
970
  return /* @__PURE__ */ e(
1028
971
  J,
1029
972
  {
1030
- isSaveDisabled: p,
973
+ isSaveDisabled: d,
1031
974
  label: a.paydown_drawer_extra_payment,
1032
975
  onCancel: c,
1033
- onSave: d,
976
+ onSave: m,
1034
977
  primaryText: a.paydown_drawer_extra_payment,
1035
- secondaryText: P(n?.extra_payment, "0,0"),
1036
- zeroStateText: n?.extra_payment ? void 0 : a.add_extra_payment,
978
+ secondaryText: B(o?.extra_payment, "0,0"),
979
+ zeroStateText: o?.extra_payment ? void 0 : a.add_extra_payment,
1037
980
  children: /* @__PURE__ */ e(
1038
981
  ae,
1039
982
  {
1040
983
  amount: t,
1041
984
  autoFocus: !0,
1042
- error: p,
985
+ error: d,
1043
986
  fullWidth: !0,
1044
987
  minAmount: 0,
1045
- setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
988
+ setAmount: (h) => l(isNaN(Number(h)) ? t : Number(h)),
1046
989
  sx: { ".MuiTypography-Body": { p: 0 } }
1047
990
  }
1048
991
  )
1049
992
  }
1050
993
  );
1051
- }), Dt = () => {
1052
- const { debts: a } = C(), { totalMonthlyPayments: n } = q(), { monthlyCashFlowProfile: o } = z(), r = n + Number(o?.extra_payment);
1053
- return /* @__PURE__ */ s(g, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1054
- /* @__PURE__ */ s(g, { p: 24, children: [
1055
- /* @__PURE__ */ s(g, { alignItems: "center", gap: 4, mb: 24, children: [
1056
- /* @__PURE__ */ e(l, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
1057
- /* @__PURE__ */ e(l, { bold: !0, variant: "H1", children: P(n, "0,0") }),
1058
- /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
994
+ }), _t = () => {
995
+ const { debts: a } = C(), { totalMonthlyPayments: o } = q(), { monthlyCashFlowProfile: n } = z(), r = o + Number(n?.extra_payment);
996
+ return /* @__PURE__ */ s(f, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
997
+ /* @__PURE__ */ s(f, { p: 24, children: [
998
+ /* @__PURE__ */ s(f, { alignItems: "center", gap: 4, mb: 24, children: [
999
+ /* @__PURE__ */ e(i, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
1000
+ /* @__PURE__ */ e(i, { bold: !0, variant: "H1", children: B(o, "0,0") }),
1001
+ /* @__PURE__ */ e(i, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
1059
1002
  ] }),
1060
- /* @__PURE__ */ s(g, { children: [
1061
- /* @__PURE__ */ e(l, { variant: "H3", children: a.paydown_drawer_subtitle }),
1062
- /* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
1003
+ /* @__PURE__ */ s(f, { children: [
1004
+ /* @__PURE__ */ e(i, { variant: "H3", children: a.paydown_drawer_subtitle }),
1005
+ /* @__PURE__ */ e(i, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
1063
1006
  ] })
1064
1007
  ] }),
1065
- /* @__PURE__ */ e(g, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(vt, {}) }),
1066
- /* @__PURE__ */ e(g, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(g, { gap: 4, children: [
1067
- /* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
1068
- /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: P(r, "0,0") })
1008
+ /* @__PURE__ */ e(f, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(bt, {}) }),
1009
+ /* @__PURE__ */ e(f, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(f, { gap: 4, children: [
1010
+ /* @__PURE__ */ e(i, { variant: "Small", children: a.paydown_drawer_total_payment }),
1011
+ /* @__PURE__ */ e(i, { bold: !0, textAlign: "right", variant: "Body", children: B(r, "0,0") })
1069
1012
  ] }) })
1070
1013
  ] });
1071
- }, Tt = S(Dt), At = ({ isOpen: a, onClose: n, sx: o }) => {
1014
+ }, yt = S(_t), ft = ({ isOpen: a, onClose: o, sx: n }) => {
1072
1015
  const { debts: r } = C();
1073
1016
  return /* @__PURE__ */ e(
1074
1017
  te,
1075
1018
  {
1076
1019
  ariaLabelClose: r.paydown_drawer_close_aria,
1077
1020
  isOpen: a,
1078
- onClose: n,
1079
- sx: { ...o },
1021
+ onClose: o,
1022
+ sx: { ...n },
1080
1023
  title: r.paydown_drawer_title,
1081
- children: /* @__PURE__ */ e(Tt, {})
1024
+ children: /* @__PURE__ */ e(yt, {})
1082
1025
  }
1083
1026
  );
1084
1027
  };
1085
- function Et(a, n) {
1086
- const o = (r) => {
1028
+ function gt(a, o) {
1029
+ const n = (r) => {
1087
1030
  if (typeof r == "number") return r;
1088
1031
  if (r === "!" || r === "✓") return 1 / 0;
1089
1032
  throw new Error("Unsupported value");
1090
1033
  };
1091
- return o(a) - o(n);
1034
+ return n(a) - n(o);
1092
1035
  }
1093
- function It(a) {
1036
+ function xt(a) {
1094
1037
  return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
1095
1038
  }
1096
- const Bt = (a) => {
1097
- const n = {
1039
+ const wt = (a) => {
1040
+ const o = {
1098
1041
  text: "#121417",
1099
1042
  background: "#FFB252"
1100
1043
  };
1101
- return a === "!" && (n.text = "#FFFFFF", n.background = "#DF320C"), a === "✓" && (n.text = "#FFFFFF", n.background = "#09A57F"), n;
1102
- }, Mt = (a) => {
1103
- const n = String(a.formattedValue), o = Bt(n);
1044
+ return a === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), a === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
1045
+ }, Ct = (a) => {
1046
+ const o = String(a.formattedValue), n = wt(o);
1104
1047
  return /* @__PURE__ */ e(
1105
1048
  re,
1106
1049
  {
@@ -1112,75 +1055,75 @@ const Bt = (a) => {
1112
1055
  // Adjust the size as needed
1113
1056
  height: 20,
1114
1057
  borderRadius: "50%",
1115
- backgroundColor: o.background,
1058
+ backgroundColor: n.background,
1116
1059
  marginLeft: "10px"
1117
1060
  },
1118
- children: /* @__PURE__ */ e(l, { color: o.text, fontWeight: 700, variant: "Small", children: n })
1061
+ children: /* @__PURE__ */ e(i, { color: n.text, fontWeight: 700, variant: "Small", children: o })
1119
1062
  }
1120
1063
  );
1121
- }, Pt = (a) => {
1122
- const n = a.row.account, o = Ke[n.account_type];
1123
- return /* @__PURE__ */ s(g, { alignItems: "center", flexDirection: "row", children: [
1064
+ }, St = (a) => {
1065
+ const o = a.row.account, n = je[o.account_type];
1066
+ return /* @__PURE__ */ s(f, { alignItems: "center", flexDirection: "row", children: [
1124
1067
  /* @__PURE__ */ e(
1125
- De,
1068
+ Ce,
1126
1069
  {
1127
- alt: `${n.institutionName}`,
1128
- institutionGuid: n.institution_guid || ""
1070
+ alt: `${o.institutionName}`,
1071
+ institutionGuid: o.institution_guid || ""
1129
1072
  }
1130
1073
  ),
1131
- /* @__PURE__ */ s(g, { ml: 12, children: [
1132
- /* @__PURE__ */ e(l, { variant: "Small", children: n.name }),
1133
- /* @__PURE__ */ e(l, { variant: "XSmall", children: o })
1074
+ /* @__PURE__ */ s(f, { ml: 12, children: [
1075
+ /* @__PURE__ */ e(i, { variant: "Small", children: o.name }),
1076
+ /* @__PURE__ */ e(i, { variant: "XSmall", children: n })
1134
1077
  ] })
1135
1078
  ] });
1136
- }, kt = ({
1079
+ }, Dt = ({
1137
1080
  sx: a = {},
1138
- debts: n,
1139
- hoveredDebtGuid: o,
1081
+ debts: o,
1082
+ hoveredDebtGuid: n,
1140
1083
  onHoverRow: r,
1141
1084
  onClickRow: t
1142
1085
  }) => {
1143
- const i = j(), { onEvent: p } = k(), { isMobile: d } = X(), { debts: c } = C(), [h, m] = x.useState([
1086
+ const l = j(), { onEvent: d } = M(), { isMobile: m } = X(), { debts: c } = C(), [h, p] = y.useState([
1144
1087
  { field: "priority", sort: "asc" }
1145
- ]), y = [
1088
+ ]), g = [
1146
1089
  {
1147
1090
  field: "priority",
1148
1091
  headerName: c.table_column_priority,
1149
1092
  renderHeader: G,
1150
- renderCell: Mt,
1151
- sortComparator: Et,
1093
+ renderCell: Ct,
1094
+ sortComparator: gt,
1152
1095
  sortable: !0,
1153
1096
  hideSortIcons: !0,
1154
1097
  type: "custom",
1155
1098
  align: "left",
1156
1099
  headerAlign: "left",
1157
- minWidth: d ? 67 : 72,
1158
- flex: d ? 0.2 : 0.4
1100
+ minWidth: m ? 67 : 72,
1101
+ flex: m ? 0.2 : 0.4
1159
1102
  },
1160
1103
  {
1161
1104
  field: "account",
1162
1105
  headerName: c.table_column_account,
1163
1106
  renderHeader: G,
1164
- renderCell: Pt,
1107
+ renderCell: St,
1165
1108
  sortable: !1,
1166
1109
  type: "custom",
1167
1110
  align: "left",
1168
1111
  headerAlign: "left",
1169
- minWidth: d ? 180 : 225,
1112
+ minWidth: m ? 180 : 225,
1170
1113
  flex: 1
1171
1114
  },
1172
1115
  {
1173
1116
  field: "balance",
1174
1117
  headerName: c.table_column_balance,
1175
1118
  renderHeader: G,
1176
- valueFormatter: (u) => P(u, "0,0"),
1119
+ valueFormatter: (u) => B(u, "0,0"),
1177
1120
  sortable: !0,
1178
- hideSortIcons: d,
1121
+ hideSortIcons: m,
1179
1122
  type: "number",
1180
- align: d ? "right" : "left",
1181
- headerAlign: d ? "right" : "left",
1182
- minWidth: d ? 70 : 122,
1183
- flex: d ? 0.4 : 0.6
1123
+ align: m ? "right" : "left",
1124
+ headerAlign: m ? "right" : "left",
1125
+ minWidth: m ? 70 : 122,
1126
+ flex: m ? 0.4 : 0.6
1184
1127
  },
1185
1128
  {
1186
1129
  field: "interest_rate",
@@ -1188,7 +1131,7 @@ const Bt = (a) => {
1188
1131
  renderHeader: G,
1189
1132
  valueFormatter: (u) => isNaN(u) ? "---" : `${Number(u).toFixed(2)}%`,
1190
1133
  sortable: !0,
1191
- hideSortIcons: d,
1134
+ hideSortIcons: m,
1192
1135
  type: "number",
1193
1136
  align: "left",
1194
1137
  headerAlign: "left",
@@ -1201,7 +1144,7 @@ const Bt = (a) => {
1201
1144
  renderHeader: G,
1202
1145
  valueFormatter: (u) => u ? K(u, U.MONTH_SHORT_YEAR) : "---",
1203
1146
  sortable: !0,
1204
- hideSortIcons: d,
1147
+ hideSortIcons: m,
1205
1148
  type: "number",
1206
1149
  align: "left",
1207
1150
  headerAlign: "left",
@@ -1212,17 +1155,17 @@ const Bt = (a) => {
1212
1155
  field: "monthly_payment",
1213
1156
  headerName: c.table_column_amount_due,
1214
1157
  renderHeader: G,
1215
- valueFormatter: (u) => typeof u == "number" ? P(u, "0,0") : "---",
1158
+ valueFormatter: (u) => typeof u == "number" ? B(u, "0,0") : "---",
1216
1159
  sortable: !0,
1217
- hideSortIcons: d,
1160
+ hideSortIcons: m,
1218
1161
  type: "number",
1219
1162
  align: "left",
1220
1163
  headerAlign: "left",
1221
1164
  minWidth: 122,
1222
1165
  flex: 0.6
1223
1166
  }
1224
- ], f = [
1225
- ...y.slice(0, 3),
1167
+ ], x = [
1168
+ ...g.slice(0, 3),
1226
1169
  {
1227
1170
  field: "chevron",
1228
1171
  headerName: "",
@@ -1235,14 +1178,14 @@ const Bt = (a) => {
1235
1178
  headerAlign: "right",
1236
1179
  width: 20
1237
1180
  }
1238
- ], v = x.useMemo(() => n.map((u, I) => ({
1181
+ ], E = y.useMemo(() => o.map((u, A) => ({
1239
1182
  ...u,
1240
- id: I,
1241
- priority: It(u)
1242
- })), [n]), E = (u) => {
1243
- const Y = u.target.closest("[data-id]")?.getAttribute("data-id"), b = n[Number(Y)];
1183
+ id: A,
1184
+ priority: xt(u)
1185
+ })), [o]), k = (u) => {
1186
+ const Y = u.target.closest("[data-id]")?.getAttribute("data-id"), b = o[Number(Y)];
1244
1187
  r?.(b?.guid ?? "");
1245
- }, D = (u) => v.find((I) => I.guid === u)?.id;
1188
+ }, D = (u) => E.find((A) => A.guid === u)?.id;
1246
1189
  return /* @__PURE__ */ e(
1247
1190
  re,
1248
1191
  {
@@ -1255,32 +1198,32 @@ const Bt = (a) => {
1255
1198
  ...a
1256
1199
  },
1257
1200
  children: /* @__PURE__ */ e(
1258
- Ye,
1201
+ Ge,
1259
1202
  {
1260
- columns: d ? f : y,
1203
+ columns: m ? x : g,
1261
1204
  disableColumnFilter: !0,
1262
1205
  disableColumnMenu: !0,
1263
1206
  hideFooter: !0,
1264
1207
  initialState: { sorting: { sortModel: h } },
1265
1208
  onRowClick: (u) => {
1266
- t(), p(T.DEBTS_CLICK_TABLE_ROW, { account_guid: u.row.guid });
1209
+ t(), d(v.DEBTS_CLICK_TABLE_ROW, { account_guid: u.row.guid });
1267
1210
  },
1268
1211
  onSortModelChange: (u) => {
1269
- m(u), p(T.DEBTS_CLICK_TABLE_SORT);
1212
+ p(u), d(v.DEBTS_CLICK_TABLE_SORT);
1270
1213
  },
1271
- rows: v,
1214
+ rows: E,
1272
1215
  slotProps: {
1273
1216
  baseIconButton: { color: "secondary", sx: { ml: 8 } },
1274
1217
  row: {
1275
- onMouseEnter: E,
1218
+ onMouseEnter: k,
1276
1219
  onMouseLeave: () => r?.("")
1277
1220
  }
1278
1221
  },
1279
1222
  sortModel: h,
1280
1223
  sortingOrder: ["asc", "desc"],
1281
1224
  sx: {
1282
- [`& .MuiDataGrid-row[data-id="${D(o)}"]`]: {
1283
- backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1225
+ [`& .MuiDataGrid-row[data-id="${D(n)}"]`]: {
1226
+ backgroundColor: l.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1284
1227
  filter: "brightness(98%)"
1285
1228
  }
1286
1229
  }
@@ -1288,54 +1231,50 @@ const Bt = (a) => {
1288
1231
  )
1289
1232
  }
1290
1233
  );
1291
- }, Ft = ({ buttonText: a, isOpen: n, onClick: o }) => {
1292
- const { isDesktop: r, isTablet: t } = X(), i = n ? "unfold_less" : "unfold_more";
1234
+ }, vt = ({ buttonText: a, isOpen: o, onClick: n }) => {
1235
+ const { isDesktop: r, isTablet: t } = X(), l = o ? "unfold_less" : "unfold_more";
1293
1236
  return r || t ? /* @__PURE__ */ e(
1294
- fe,
1237
+ be,
1295
1238
  {
1296
1239
  "aria-controls": "prioritize-debts",
1297
1240
  "aria-describedby": "prioritize-debts",
1298
1241
  "aria-haspopup": !0,
1299
1242
  "aria-label": "prioritize-debts",
1300
- onClick: o,
1301
- startIcon: /* @__PURE__ */ e(ee, { name: i }),
1243
+ onClick: n,
1244
+ startIcon: /* @__PURE__ */ e(ee, { name: l }),
1302
1245
  sx: { justifyContent: "start", minWidth: 214, mx: 4 },
1303
1246
  children: a
1304
1247
  }
1305
1248
  ) : /* @__PURE__ */ e(
1306
- Ue,
1249
+ ze,
1307
1250
  {
1308
1251
  "aria-controls": "prioritize-debts",
1309
1252
  "aria-describedby": "prioritize-debts",
1310
1253
  "aria-haspopup": !0,
1311
1254
  "aria-label": "prioritize-debts",
1312
- onClick: o,
1313
- children: /* @__PURE__ */ e(ee, { name: i })
1255
+ onClick: n,
1256
+ children: /* @__PURE__ */ e(ee, { name: l })
1314
1257
  }
1315
1258
  );
1316
- }, Nt = S(({ buttonEl: a, onClose: n }) => {
1317
- const { onEvent: o } = k(), { debts: r } = C(), { selectedDebtPriority: t, setSelectedDebtPriority: i } = R(), p = !!a, d = [
1259
+ }, Tt = S(({ buttonEl: a, onClose: o }) => {
1260
+ const { onEvent: n } = M(), { debts: r } = C(), { selectedDebtPriority: t, setSelectedDebtPriority: l } = R(), d = !!a, m = [
1318
1261
  {
1319
- priority: M.FASTEST_PAYOFF_FIRST,
1320
- text: r.priority_sort_fastest_payoff
1321
- },
1322
- {
1323
- priority: M.HIGHEST_INTEREST,
1262
+ priority: $.HIGHEST_INTEREST,
1324
1263
  text: r.priority_sort_highest_interest
1325
1264
  },
1326
1265
  {
1327
- priority: M.LOWEST_BALANCE,
1266
+ priority: $.LOWEST_BALANCE,
1328
1267
  text: r.priority_sort_lowest_balance
1329
1268
  },
1330
1269
  {
1331
- priority: M.HIGHEST_BALANCE,
1270
+ priority: $.HIGHEST_BALANCE,
1332
1271
  text: r.priority_sort_highest_balance
1333
1272
  }
1334
1273
  ], c = (h) => {
1335
- i(h), o(T.DEBTS_CLICK_PRIORITY, { debts_priority: h });
1274
+ l(h), n(v.DEBTS_CLICK_PRIORITY, { debts_priority: h });
1336
1275
  };
1337
1276
  return /* @__PURE__ */ e(
1338
- Ze,
1277
+ Ve,
1339
1278
  {
1340
1279
  anchorEl: a,
1341
1280
  anchorOrigin: {
@@ -1343,14 +1282,14 @@ const Bt = (a) => {
1343
1282
  horizontal: "left"
1344
1283
  },
1345
1284
  id: "prioritize-debts",
1346
- onClose: n,
1347
- open: p,
1285
+ onClose: o,
1286
+ open: d,
1348
1287
  transformOrigin: {
1349
1288
  vertical: "top",
1350
1289
  horizontal: "left"
1351
1290
  },
1352
- children: /* @__PURE__ */ e(_e, { children: d.map(({ priority: h, text: m }) => /* @__PURE__ */ s(
1353
- qe,
1291
+ children: /* @__PURE__ */ e(he, { children: m.map(({ priority: h, text: p }) => /* @__PURE__ */ s(
1292
+ Xe,
1354
1293
  {
1355
1294
  onClick: () => c(h),
1356
1295
  sx: {
@@ -1368,70 +1307,69 @@ const Bt = (a) => {
1368
1307
  }
1369
1308
  },
1370
1309
  children: [
1371
- /* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: m }),
1372
- t === h && /* @__PURE__ */ e(ye, { color: "inherit", filled: !0, fontSize: "small" })
1310
+ /* @__PURE__ */ e(i, { color: "inherit", variant: "Small", children: p }),
1311
+ t === h && /* @__PURE__ */ e(ue, { color: "inherit", filled: !0, fontSize: "small" })
1373
1312
  ]
1374
1313
  },
1375
1314
  h
1376
1315
  )) })
1377
1316
  }
1378
1317
  );
1379
- }), Rt = S(() => {
1380
- const { onEvent: a } = k(), { debts: n } = C(), { selectedDebtPriority: o } = R(), [r, t] = x.useState(null), i = (h) => {
1381
- t(h.currentTarget), a(T.DEBTS_CLICK_PRIORITIZE);
1382
- }, p = () => {
1318
+ }), At = S(() => {
1319
+ const { onEvent: a } = M(), { debts: o } = C(), { selectedDebtPriority: n } = R(), [r, t] = y.useState(null), l = (h) => {
1320
+ t(h.currentTarget), a(v.DEBTS_CLICK_PRIORITIZE);
1321
+ }, d = () => {
1383
1322
  t(null);
1384
- }, d = !!r, c = x.useMemo(() => ({
1385
- [M.FASTEST_PAYOFF_FIRST]: n.priority_sort_fastest_payoff,
1386
- [M.HIGHEST_INTEREST]: n.priority_sort_highest_interest,
1387
- [M.HIGHEST_BALANCE]: n.priority_sort_highest_balance,
1388
- [M.LOWEST_BALANCE]: n.priority_sort_lowest_balance
1389
- })[o] ?? n.priority_sort_lowest_balance, [o]);
1323
+ }, m = !!r, c = y.useMemo(() => ({
1324
+ [$.HIGHEST_INTEREST]: o.priority_sort_highest_interest,
1325
+ [$.HIGHEST_BALANCE]: o.priority_sort_highest_balance,
1326
+ [$.LOWEST_BALANCE]: o.priority_sort_lowest_balance
1327
+ })[n] ?? o.priority_sort_lowest_balance, [n]);
1390
1328
  return /* @__PURE__ */ s(_, { children: [
1391
- /* @__PURE__ */ e(Ft, { buttonText: c, isOpen: d, onClick: i }),
1392
- /* @__PURE__ */ e(Nt, { buttonEl: r, onClose: p })
1329
+ /* @__PURE__ */ e(vt, { buttonText: c, isOpen: m, onClick: l }),
1330
+ /* @__PURE__ */ e(Tt, { buttonEl: r, onClose: d })
1393
1331
  ] });
1394
- }), Lt = (a, n, o = 0) => {
1332
+ }), Et = (a, o, n = 0) => {
1395
1333
  const r = a.map((c) => ({ ...c }));
1396
- xe(r, n);
1397
- const t = /* @__PURE__ */ new Date(), i = [];
1398
- let p = 0, d = 1;
1334
+ _e(r, o);
1335
+ const t = /* @__PURE__ */ new Date(), l = [];
1336
+ let d = 0, m = 1;
1399
1337
  for (const c of r)
1400
- i.push({
1338
+ l.push({
1401
1339
  ...c,
1402
1340
  // Start with the initial balance
1403
1341
  dataset: [{ x: new Date(t), y: c.balance }]
1404
1342
  });
1405
1343
  for (; r.some((c) => c.balance >= 0.01 && !c.is_impossible); ) {
1406
1344
  let c = !1;
1407
- for (const [h, m] of r.entries()) {
1408
- if (m.balance <= 0.01) continue;
1409
- const y = i[h].dataset, v = (m.interest_rate ?? 0) / 100 / 12, E = m.balance * v;
1410
- let D = m.monthly_payment ?? 0;
1411
- h === 0 && (D += o), m.balance += E;
1412
- const u = Math.min(m.balance, D + p);
1413
- if (u <= E) {
1414
- m.is_impossible = !0, i[h].is_impossible = !0, i[h].priority = void 0, y.push({ x: new Date(t), y: m.balance });
1345
+ for (const [h, p] of r.entries()) {
1346
+ if (p.balance <= 0.01) continue;
1347
+ const g = l[h].dataset, E = (p.interest_rate ?? 0) / 100 / 12, k = p.balance * E;
1348
+ let D = p.monthly_payment ?? 0;
1349
+ h === 0 && (D += n), p.balance += k;
1350
+ const u = Math.min(p.balance, D + d);
1351
+ if (u <= k) {
1352
+ p.is_impossible = !0, l[h].is_impossible = !0, l[h].priority = void 0, g.push({ x: new Date(t), y: p.balance });
1415
1353
  continue;
1416
1354
  }
1417
- m.balance -= u, m.balance = m.balance < 0.01 ? 0 : m.balance, y.push({
1355
+ p.balance -= u, p.balance = p.balance < 0.01 ? 0 : p.balance, g.push({
1418
1356
  x: new Date(t),
1419
- y: Math.max(0, m.balance),
1357
+ y: Math.max(0, p.balance),
1420
1358
  payment: u,
1421
- extra: p
1422
- }), m.balance <= 0 && (p += D, i[h].projected_payoff_date = new Date(t)), u > 0 && (c = !0);
1359
+ extra: d
1360
+ }), p.balance <= 0 && (d += D, l[h].projected_payoff_date = new Date(t)), u > 0 && (c = !0);
1423
1361
  }
1424
1362
  c && t.setMonth(t.getMonth() + 1);
1425
1363
  }
1426
- return i.forEach((c) => {
1364
+ return l.forEach((c) => {
1427
1365
  (c.interest_rate === void 0 || c.interest_rate === void 0) && (c.projected_payoff_date = void 0);
1428
- }), i.forEach((c) => {
1429
- c.priority = !c.is_paid_off && !c.is_impossible ? d++ : void 0;
1430
- }), i;
1431
- }, $t = S(({ onClick: a }) => {
1432
- const { debts: n } = C(), { isDesktop: o } = X(), { totalMonthlyPayments: r } = q(), { monthlyCashFlowProfile: t } = z(), i = r + Number(t?.extra_payment), p = o ? n.paydown_button_long : n.paydown_button_short;
1366
+ }), l.forEach((c) => {
1367
+ c.priority = !c.is_paid_off && !c.is_impossible ? m++ : void 0;
1368
+ }), l;
1369
+ }, It = S(({ onClick: a }) => {
1370
+ const { debts: o } = C(), { isDesktop: n } = X(), { totalMonthlyPayments: r } = q(), { monthlyCashFlowProfile: t } = z(), l = r + Number(t?.extra_payment), d = n ? o.paydown_button_long : o.paydown_button_short;
1433
1371
  return /* @__PURE__ */ e(
1434
- fe,
1372
+ be,
1435
1373
  {
1436
1374
  "aria-controls": "extra-paydown",
1437
1375
  "aria-describedby": "extra-paydown",
@@ -1439,100 +1377,100 @@ const Bt = (a) => {
1439
1377
  "aria-label": "extra-paydown",
1440
1378
  onClick: a,
1441
1379
  sx: { justifyContent: "start", minWidth: 100, mx: 4 },
1442
- children: A(p, P(i, "0,0"))
1380
+ children: T(d, B(l, "0,0"))
1443
1381
  }
1444
1382
  );
1445
- }), Ht = ({ onBackClick: a, sx: n }) => {
1446
- const [o, r] = x.useState(!1), [t, i] = x.useState(!1), [p, d] = x.useState(!1), [c, h] = x.useState(""), { isDesktop: m, isMobile: y } = X(), { debts: f } = C(), { onEvent: v } = k(), { isCopyLoaded: E, isInitialized: D, setSelectedAccounts: u } = Pe(), { setSelectedAccount: I } = Fe(), { selectedDebtPriority: V, setSelectedDebtChartData: Y } = R(), { visibleDebtAccounts: b } = Z(), { goalsLoaded: w, loadGoals: B, monthlyCashFlowProfile: F } = z(), { debts: N } = q(), $ = x.useMemo(() => {
1447
- const H = F?.extra_payment ?? 0;
1448
- return Lt(N, V, H);
1449
- }, [N, V, F]);
1450
- x.useEffect(() => {
1451
- u(b), v(T.DEBTS_VIEW);
1452
- }, []), x.useEffect(() => {
1383
+ }), Bt = ({ onBackClick: a, sx: o }) => {
1384
+ const [n, r] = y.useState(!1), [t, l] = y.useState(!1), [d, m] = y.useState(!1), [c, h] = y.useState(""), { isDesktop: p, isMobile: g } = X(), { debts: x } = C(), { onEvent: E } = M(), { isCopyLoaded: k, isInitialized: D, setSelectedAccounts: u } = Ae(), { setSelectedAccount: A } = Ie(), { selectedDebtPriority: V, setSelectedDebtChartData: Y } = R(), { visibleDebtAccounts: b } = Z(), { goalsLoaded: w, loadGoals: I, monthlyCashFlowProfile: P } = z(), { debts: N } = q(), H = y.useMemo(() => {
1385
+ const F = P?.extra_payment ?? 0;
1386
+ return Et(N, V, F);
1387
+ }, [N, V, P]);
1388
+ y.useEffect(() => {
1389
+ u(b), E(v.DEBTS_VIEW);
1390
+ }, []), y.useEffect(() => {
1453
1391
  u(b);
1454
- }, [b]), x.useEffect(() => {
1455
- D && B().finally();
1392
+ }, [b]), y.useEffect(() => {
1393
+ D && I().finally();
1456
1394
  }, [D]);
1457
- const ne = (H) => h(H), oe = () => {
1458
- const H = b.find((Q) => Q.guid === c), ie = $.find((Q) => Q.guid === c);
1459
- H && I(H), ie && Y(ie), r(!0);
1460
- }, we = () => v(T.DEBTS_CLICK_FILTER), Ce = () => {
1461
- d(!0), v(T.DEBTS_CLICK_SNOWBALL_CTA);
1462
- }, Se = () => {
1463
- i(!0), v(T.DEBTS_CLICK_PAYDOWN);
1395
+ const oe = (F) => h(F), ne = () => {
1396
+ const F = b.find((Q) => Q.guid === c), ie = H.find((Q) => Q.guid === c);
1397
+ F && A(F), ie && Y(ie), r(!0);
1398
+ }, fe = () => E(v.DEBTS_CLICK_FILTER), ge = () => {
1399
+ m(!0), E(v.DEBTS_CLICK_SNOWBALL_CTA);
1400
+ }, xe = () => {
1401
+ l(!0), E(v.DEBTS_CLICK_PAYDOWN);
1464
1402
  };
1465
- return !w || !E || !D ? /* @__PURE__ */ e(Je, {}) : /* @__PURE__ */ s(
1466
- Oe,
1403
+ return !w || !k || !D ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ s(
1404
+ Re,
1467
1405
  {
1468
1406
  accountOptions: b,
1469
1407
  actions: [
1470
- /* @__PURE__ */ e(Rt, {}, "prioritize-debts"),
1471
- /* @__PURE__ */ e($t, { onClick: Se }, "extra-paydown")
1408
+ /* @__PURE__ */ e(At, {}, "prioritize-debts"),
1409
+ /* @__PURE__ */ e(It, { onClick: xe }, "extra-paydown")
1472
1410
  ],
1473
- onAccountsFilterClick: we,
1411
+ onAccountsFilterClick: fe,
1474
1412
  onBackClick: a,
1475
- sx: n,
1476
- title: f.title,
1413
+ sx: o,
1414
+ title: x.title,
1477
1415
  children: [
1478
- /* @__PURE__ */ s(g, { sx: { px: m ? "48px" : "24px" }, children: [
1416
+ /* @__PURE__ */ s(f, { sx: { px: p ? "48px" : "24px" }, children: [
1479
1417
  /* @__PURE__ */ s(
1480
- g,
1418
+ f,
1481
1419
  {
1482
1420
  sx: {
1483
- alignItems: y ? "flex-start" : "flex-end",
1484
- flexDirection: y ? "column" : "row",
1485
- mx: y ? "-12px" : 0
1421
+ alignItems: g ? "flex-start" : "flex-end",
1422
+ flexDirection: g ? "column" : "row",
1423
+ mx: g ? "-12px" : 0
1486
1424
  },
1487
1425
  children: [
1488
1426
  /* @__PURE__ */ e(
1489
- ge,
1427
+ ye,
1490
1428
  {
1491
- debts: $,
1492
- height: y ? 250 : void 0,
1429
+ debts: H,
1430
+ height: g ? 250 : void 0,
1493
1431
  hoveredDebtGuid: c,
1494
- onClickArea: oe,
1495
- onHoverArea: ne,
1496
- sx: { mr: y ? "4px" : "-48px" }
1432
+ onClickArea: ne,
1433
+ onHoverArea: oe,
1434
+ sx: { mr: g ? "4px" : "-48px" }
1497
1435
  }
1498
1436
  ),
1499
1437
  /* @__PURE__ */ e(
1500
- ot,
1438
+ qe,
1501
1439
  {
1502
- debts: $,
1503
- onClickCta: Ce,
1504
- sx: { mb: y ? "0px" : "64px" }
1440
+ debts: H,
1441
+ onClickCta: ge,
1442
+ sx: { mb: g ? "0px" : "64px" }
1505
1443
  }
1506
1444
  )
1507
1445
  ]
1508
1446
  }
1509
1447
  ),
1510
- /* @__PURE__ */ e(g, { sx: { mx: y ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1511
- kt,
1448
+ /* @__PURE__ */ e(f, { sx: { mx: g ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1449
+ Dt,
1512
1450
  {
1513
- debts: $,
1451
+ debts: H,
1514
1452
  hoveredDebtGuid: c,
1515
- onClickRow: oe,
1516
- onHoverRow: ne
1453
+ onClickRow: ne,
1454
+ onHoverRow: oe
1517
1455
  }
1518
1456
  ) })
1519
1457
  ] }),
1520
1458
  /* @__PURE__ */ e(
1521
- lt,
1459
+ Je,
1522
1460
  {
1523
- isOpen: p,
1524
- onClose: () => d(!1)
1461
+ isOpen: d,
1462
+ onClose: () => m(!1)
1525
1463
  }
1526
1464
  ),
1527
- /* @__PURE__ */ e(St, { isOpen: o, onClose: () => r(!1) }),
1528
- /* @__PURE__ */ e(At, { isOpen: t, onClose: () => i(!1) })
1465
+ /* @__PURE__ */ e(ut, { isOpen: n, onClose: () => r(!1) }),
1466
+ /* @__PURE__ */ e(ft, { isOpen: t, onClose: () => l(!1) })
1529
1467
  ]
1530
1468
  }
1531
1469
  );
1532
- }, Ir = S(Ht);
1470
+ }, xr = S(Bt);
1533
1471
  export {
1534
- ge as DebtsChart,
1535
- Pr as DebtsStore,
1536
- kt as DebtsTable,
1537
- Ir as DebtsWidget
1472
+ ye as DebtsChart,
1473
+ Sr as DebtsStore,
1474
+ Dt as DebtsTable,
1475
+ xr as DebtsWidget
1538
1476
  };