@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.
- package/CHANGELOG.md +1 -1
- package/dist/{DebtsStore-VkyMADzd.mjs → DebtsStore-Dp-CraCD.mjs} +15 -18
- package/dist/EmptyState-C0lr9E5T.mjs +72 -0
- package/dist/budgets/index.es.js +1 -1
- package/dist/common/components/EmptyState.d.ts +3 -2
- package/dist/common/index.es.js +2 -2
- package/dist/common/types/localization/DebtsCopy.d.ts +0 -1
- package/dist/debts/constants/index.d.ts +4 -7
- package/dist/debts/index.es.js +482 -544
- package/dist/debts/store/DebtsUiStore.d.ts +3 -3
- package/dist/debts/utils/DebtsWidget.d.ts +2 -2
- package/dist/debts/utils/SnowballCard.d.ts +2 -2
- package/dist/debts/utils/shared.d.ts +2 -11
- package/dist/goals/index.es.js +1 -1
- package/dist/investments/index.es.js +1 -1
- package/dist/networth/index.es.js +1 -1
- package/dist/trends/index.es.js +489 -486
- package/package.json +1 -1
- package/dist/EmptyState-Dcb-o2tl.mjs +0 -55
package/dist/debts/index.es.js
CHANGED
|
@@ -1,168 +1,111 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as L } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import y from "react";
|
|
3
3
|
import { observer as S } from "mobx-react-lite";
|
|
4
|
-
import
|
|
5
|
-
import { useTheme as j, Card as
|
|
6
|
-
import { Text as
|
|
7
|
-
import {
|
|
8
|
-
import { D as
|
|
9
|
-
import { a as
|
|
10
|
-
import { f as
|
|
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
|
|
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
|
|
16
|
-
import { A as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { LineChart as
|
|
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
|
|
23
|
-
import { A as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
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
|
|
29
|
-
import
|
|
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
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import { Error as
|
|
36
|
-
import { T as
|
|
37
|
-
import { DataGridPro as
|
|
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
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import { L as
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
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
|
|
109
|
-
|
|
51
|
+
case $.LOWEST_BALANCE:
|
|
52
|
+
n.sort((t, l) => t.balance - l.balance);
|
|
110
53
|
break;
|
|
111
|
-
case
|
|
112
|
-
|
|
54
|
+
case $.HIGHEST_BALANCE:
|
|
55
|
+
n.sort((t, l) => l.balance - t.balance);
|
|
113
56
|
break;
|
|
114
57
|
default:
|
|
115
|
-
|
|
58
|
+
n.sort((t, l) => t.balance - l.balance);
|
|
116
59
|
}
|
|
117
|
-
a.splice(0, a.length, ...
|
|
60
|
+
a.splice(0, a.length, ...n, ...r);
|
|
118
61
|
};
|
|
119
|
-
function
|
|
120
|
-
const r = a.map((
|
|
121
|
-
(
|
|
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
|
-
|
|
124
|
-
let t = 0,
|
|
125
|
-
const
|
|
126
|
-
for (; r.some((
|
|
127
|
-
let
|
|
128
|
-
for (const [
|
|
129
|
-
if (
|
|
130
|
-
const
|
|
131
|
-
let u =
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
|
|
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
|
-
|
|
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
|
-
|
|
83
|
+
p && m.setMonth(m.getMonth() + 1);
|
|
141
84
|
}
|
|
142
|
-
const c = r.some((
|
|
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" :
|
|
145
|
-
payoffDate: c ? "Never" : K(
|
|
146
|
-
payoffDuration: c ? "Stagnant" :
|
|
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 (!
|
|
93
|
+
if (!y.useContext(Te))
|
|
151
94
|
throw new Error("useCateUiStore() must be used within the GlobalDataContext");
|
|
152
95
|
return q().uiStore;
|
|
153
|
-
},
|
|
154
|
-
const r = j(), { isMobile: t } = X(), { debts:
|
|
155
|
-
const
|
|
156
|
-
return
|
|
157
|
-
}, [a,
|
|
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
|
-
|
|
102
|
+
me,
|
|
160
103
|
{
|
|
161
104
|
sx: {
|
|
162
105
|
boxShadow: r.shadows[2],
|
|
163
106
|
width: t ? "100%" : "186px",
|
|
164
107
|
minWidth: "186px",
|
|
165
|
-
...
|
|
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(
|
|
179
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
185
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
189
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
135
|
+
i,
|
|
193
136
|
{
|
|
194
137
|
bold: !0,
|
|
195
138
|
color: r.palette.primary.main,
|
|
196
|
-
onClick:
|
|
139
|
+
onClick: o,
|
|
197
140
|
sx: { cursor: "pointer" },
|
|
198
141
|
variant: "Small",
|
|
199
|
-
children:
|
|
142
|
+
children: l.snowball_card_cta
|
|
200
143
|
}
|
|
201
144
|
)
|
|
202
145
|
] })
|
|
203
146
|
}
|
|
204
147
|
);
|
|
205
|
-
},
|
|
206
|
-
const r = j(), { debts: t } = C(), [
|
|
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:
|
|
213
|
-
sx: { ...
|
|
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(
|
|
219
|
-
/* @__PURE__ */ e(
|
|
220
|
-
/* @__PURE__ */ e(
|
|
221
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
224
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
169
|
+
i,
|
|
227
170
|
{
|
|
228
171
|
color: r.palette.secondary.main,
|
|
229
172
|
mb: 8,
|
|
230
|
-
sx: { whiteSpace:
|
|
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
|
-
|
|
179
|
+
i,
|
|
237
180
|
{
|
|
238
181
|
bold: !0,
|
|
239
182
|
color: r.palette.primary.main,
|
|
240
|
-
onClick: () =>
|
|
183
|
+
onClick: () => d(!l),
|
|
241
184
|
sx: { cursor: "pointer" },
|
|
242
185
|
variant: "Small",
|
|
243
|
-
children:
|
|
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
|
-
|
|
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(
|
|
261
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
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(
|
|
294
|
-
/* @__PURE__ */ s(
|
|
295
|
-
|
|
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:
|
|
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(
|
|
247
|
+
/* @__PURE__ */ e(i, { variant: "Body", children: "$100.00" }),
|
|
305
248
|
/* @__PURE__ */ e(
|
|
306
|
-
|
|
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(
|
|
345
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
365
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
381
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
388
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
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(
|
|
421
|
-
/* @__PURE__ */ s(
|
|
422
|
-
|
|
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:
|
|
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(
|
|
374
|
+
/* @__PURE__ */ e(i, { variant: "Body", children: "$500.00" }),
|
|
432
375
|
/* @__PURE__ */ e(
|
|
433
|
-
|
|
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(
|
|
471
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
489
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
496
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
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(
|
|
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(
|
|
472
|
+
/* @__PURE__ */ e(i, { variant: "Body", children: "$1,500.00" }),
|
|
530
473
|
/* @__PURE__ */ e(
|
|
531
|
-
|
|
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(
|
|
558
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
568
|
-
function
|
|
569
|
-
const [
|
|
570
|
-
Math.max(0, Math.min(255, Math.round(
|
|
571
|
-
Math.max(0, Math.min(255, Math.round(r *
|
|
572
|
-
Math.max(0, Math.min(255, Math.round(t *
|
|
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(${
|
|
517
|
+
return `rgb(${l[0]}, ${l[1]}, ${l[2]})`;
|
|
575
518
|
}
|
|
576
|
-
const
|
|
519
|
+
const ye = ({
|
|
577
520
|
sx: a,
|
|
578
|
-
height:
|
|
579
|
-
width:
|
|
521
|
+
height: o = 500,
|
|
522
|
+
width: n,
|
|
580
523
|
debts: r,
|
|
581
524
|
hoveredDebtGuid: t,
|
|
582
|
-
onClickArea:
|
|
583
|
-
onHoverArea:
|
|
525
|
+
onClickArea: l,
|
|
526
|
+
onHoverArea: d
|
|
584
527
|
}) => {
|
|
585
|
-
const
|
|
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)),
|
|
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
|
|
592
|
-
const
|
|
593
|
-
const
|
|
594
|
-
return
|
|
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:
|
|
597
|
-
}),
|
|
539
|
+
return { ...b, dataset: P };
|
|
540
|
+
}), x = g.reduce(
|
|
598
541
|
(b, w) => b + (w.dataset[0]?.y ?? 0),
|
|
599
542
|
0
|
|
600
|
-
),
|
|
601
|
-
const
|
|
602
|
-
return { x: b, y:
|
|
603
|
-
}),
|
|
604
|
-
const
|
|
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:
|
|
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:
|
|
622
|
-
color:
|
|
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
|
|
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
|
-
|
|
589
|
+
Pe,
|
|
647
590
|
{
|
|
648
591
|
axisHighlight: { x: "none" },
|
|
649
592
|
disableLineItemHighlight: !0,
|
|
650
|
-
height:
|
|
593
|
+
height: o,
|
|
651
594
|
onAreaClick: (b, w) => {
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
c(
|
|
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((
|
|
658
|
-
|
|
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-${
|
|
627
|
+
[`& .MuiLineElement-series-debt-${A(t ?? "0")}`]: {
|
|
685
628
|
opacity: 1
|
|
686
629
|
},
|
|
687
|
-
[`& .MuiAreaElement-series-debt-${
|
|
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:
|
|
636
|
+
width: n,
|
|
694
637
|
xAxis: [
|
|
695
638
|
{
|
|
696
639
|
data: D,
|
|
697
640
|
scaleType: "time",
|
|
698
|
-
min:
|
|
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:
|
|
649
|
+
max: k,
|
|
707
650
|
disableTicks: !0,
|
|
708
|
-
valueFormatter: (b) =>
|
|
651
|
+
valueFormatter: (b) => B(b, "0a")
|
|
709
652
|
}
|
|
710
653
|
]
|
|
711
654
|
}
|
|
712
655
|
)
|
|
713
656
|
}
|
|
714
657
|
);
|
|
715
|
-
},
|
|
716
|
-
const a = j(), { debts:
|
|
658
|
+
}, tt = () => {
|
|
659
|
+
const a = j(), { debts: o } = C(), { selectedDebtChartData: n } = R();
|
|
717
660
|
return /* @__PURE__ */ s(L, { children: [
|
|
718
661
|
/* @__PURE__ */ s(
|
|
719
|
-
|
|
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(
|
|
728
|
-
/* @__PURE__ */ e(
|
|
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
|
-
|
|
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:
|
|
681
|
+
children: o.details_chart_description
|
|
739
682
|
}
|
|
740
683
|
)
|
|
741
684
|
] });
|
|
742
|
-
},
|
|
743
|
-
const a = j(), { onEvent:
|
|
744
|
-
return
|
|
745
|
-
|
|
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:
|
|
694
|
+
children: l ? n.schedule_error_message : n.schedule_complete_message
|
|
752
695
|
}
|
|
753
696
|
) : /* @__PURE__ */ s(L, { children: [
|
|
754
|
-
/* @__PURE__ */ s(
|
|
755
|
-
/* @__PURE__ */ e(
|
|
756
|
-
/* @__PURE__ */ e(
|
|
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:
|
|
759
|
-
|
|
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(
|
|
770
|
-
/* @__PURE__ */ e(
|
|
771
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
774
|
-
/* @__PURE__ */ e(
|
|
716
|
+
/* @__PURE__ */ s(f, { children: [
|
|
717
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "Body", children: B(m, "0,0.00") }),
|
|
775
718
|
/* @__PURE__ */ e(
|
|
776
|
-
|
|
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: `+${
|
|
725
|
+
children: `+${B(c, "0,0")}`
|
|
783
726
|
}
|
|
784
727
|
)
|
|
785
728
|
] })
|
|
786
729
|
]
|
|
787
730
|
}
|
|
788
|
-
) }) }, String(
|
|
789
|
-
/* @__PURE__ */ e(
|
|
790
|
-
|
|
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(
|
|
801
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
807
|
-
const { debts:
|
|
808
|
-
await
|
|
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
|
-
|
|
754
|
+
l(a.interest_rate ?? 0);
|
|
812
755
|
}, 250);
|
|
813
756
|
};
|
|
814
757
|
return /* @__PURE__ */ e(
|
|
815
758
|
J,
|
|
816
759
|
{
|
|
817
|
-
isSaveDisabled:
|
|
818
|
-
label: `${
|
|
760
|
+
isSaveDisabled: d,
|
|
761
|
+
label: `${o.details_interest_rate} (%)`,
|
|
819
762
|
onCancel: c,
|
|
820
|
-
onSave:
|
|
821
|
-
primaryText:
|
|
822
|
-
secondaryText:
|
|
823
|
-
zeroStateText: a.interest_rate ? void 0 :
|
|
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
|
-
|
|
768
|
+
Oe,
|
|
826
769
|
{
|
|
827
|
-
error:
|
|
770
|
+
error: d,
|
|
828
771
|
fullWidth: !0,
|
|
829
|
-
onChange: (h) =>
|
|
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
|
-
}),
|
|
837
|
-
const { debts:
|
|
838
|
-
await
|
|
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
|
-
|
|
784
|
+
l(a.monthly_payment ?? 0);
|
|
842
785
|
}, 250);
|
|
843
786
|
};
|
|
844
787
|
return /* @__PURE__ */ e(
|
|
845
788
|
J,
|
|
846
789
|
{
|
|
847
|
-
isSaveDisabled:
|
|
848
|
-
label:
|
|
790
|
+
isSaveDisabled: d,
|
|
791
|
+
label: o.details_monthly_payment,
|
|
849
792
|
onCancel: c,
|
|
850
|
-
onSave:
|
|
851
|
-
primaryText:
|
|
852
|
-
secondaryText:
|
|
853
|
-
zeroStateText: a.monthly_payment ? void 0 :
|
|
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:
|
|
802
|
+
error: d,
|
|
860
803
|
fullWidth: !0,
|
|
861
804
|
minAmount: 0,
|
|
862
|
-
setAmount: (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
|
-
}),
|
|
869
|
-
const { debts:
|
|
870
|
-
await
|
|
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
|
-
|
|
816
|
+
l(a.original_balance ?? 0);
|
|
874
817
|
}, 250);
|
|
875
818
|
};
|
|
876
819
|
return /* @__PURE__ */ e(
|
|
877
820
|
J,
|
|
878
821
|
{
|
|
879
|
-
isSaveDisabled:
|
|
880
|
-
label:
|
|
822
|
+
isSaveDisabled: d,
|
|
823
|
+
label: o.details_original_balance,
|
|
881
824
|
onCancel: c,
|
|
882
|
-
onSave:
|
|
883
|
-
primaryText:
|
|
884
|
-
secondaryText:
|
|
885
|
-
zeroStateText: a.original_balance ? void 0 :
|
|
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:
|
|
834
|
+
error: d,
|
|
892
835
|
fullWidth: !0,
|
|
893
836
|
minAmount: 0,
|
|
894
|
-
setAmount: (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
|
-
}),
|
|
901
|
-
const { onEvent: a } =
|
|
902
|
-
return
|
|
903
|
-
|
|
904
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
849
|
+
/* @__PURE__ */ e(He, { goal: o.goal }),
|
|
907
850
|
/* @__PURE__ */ e(W, {}),
|
|
908
|
-
/* @__PURE__ */ e(
|
|
851
|
+
/* @__PURE__ */ e(Fe, { goal: o.goal }),
|
|
909
852
|
/* @__PURE__ */ e(W, {})
|
|
910
853
|
] }),
|
|
911
|
-
!
|
|
912
|
-
/* @__PURE__ */ e(
|
|
854
|
+
!o?.goal && o?.account && /* @__PURE__ */ s(L, { children: [
|
|
855
|
+
/* @__PURE__ */ e(it, { debt: o }),
|
|
913
856
|
/* @__PURE__ */ e(W, {}),
|
|
914
|
-
/* @__PURE__ */ e(
|
|
857
|
+
/* @__PURE__ */ e(nt, { debt: o }),
|
|
915
858
|
/* @__PURE__ */ e(W, {}),
|
|
916
|
-
/* @__PURE__ */ e(
|
|
859
|
+
/* @__PURE__ */ e(lt, { debt: o }),
|
|
917
860
|
/* @__PURE__ */ e(W, {})
|
|
918
861
|
] })
|
|
919
862
|
] });
|
|
920
|
-
},
|
|
921
|
-
const { debts:
|
|
922
|
-
return
|
|
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(
|
|
925
|
-
/* @__PURE__ */ e(
|
|
926
|
-
|
|
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(
|
|
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(
|
|
942
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
947
|
-
|
|
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(
|
|
960
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
966
|
-
const { debts: a } = C(), { showError:
|
|
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
|
-
(
|
|
911
|
+
(o || n) && /* @__PURE__ */ e(pt, { setTabValue: t, sx: { mt: -24 } }),
|
|
969
912
|
/* @__PURE__ */ s(
|
|
970
|
-
|
|
913
|
+
$e,
|
|
971
914
|
{
|
|
972
915
|
"aria-label": a.details_tabs_aria_label,
|
|
973
916
|
centered: !0,
|
|
974
|
-
onChange: (
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
999
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
1002
|
-
const { debts: r } = C(), { showError: t, showCompleted:
|
|
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:
|
|
1009
|
-
sx: { ...
|
|
951
|
+
onClose: o,
|
|
952
|
+
sx: { ...n },
|
|
1010
953
|
title: r.details_title,
|
|
1011
|
-
children: /* @__PURE__ */ s(
|
|
1012
|
-
/* @__PURE__ */ e(
|
|
1013
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
1018
|
-
const { debts: a } = C(), { monthlyCashFlowProfile:
|
|
1019
|
-
|
|
1020
|
-
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
|
-
|
|
967
|
+
l(o?.extra_payment ?? 0);
|
|
1025
968
|
}, 250);
|
|
1026
969
|
};
|
|
1027
970
|
return /* @__PURE__ */ e(
|
|
1028
971
|
J,
|
|
1029
972
|
{
|
|
1030
|
-
isSaveDisabled:
|
|
973
|
+
isSaveDisabled: d,
|
|
1031
974
|
label: a.paydown_drawer_extra_payment,
|
|
1032
975
|
onCancel: c,
|
|
1033
|
-
onSave:
|
|
976
|
+
onSave: m,
|
|
1034
977
|
primaryText: a.paydown_drawer_extra_payment,
|
|
1035
|
-
secondaryText:
|
|
1036
|
-
zeroStateText:
|
|
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:
|
|
985
|
+
error: d,
|
|
1043
986
|
fullWidth: !0,
|
|
1044
987
|
minAmount: 0,
|
|
1045
|
-
setAmount: (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
|
-
}),
|
|
1052
|
-
const { debts: a } = C(), { totalMonthlyPayments:
|
|
1053
|
-
return /* @__PURE__ */ s(
|
|
1054
|
-
/* @__PURE__ */ s(
|
|
1055
|
-
/* @__PURE__ */ s(
|
|
1056
|
-
/* @__PURE__ */ e(
|
|
1057
|
-
/* @__PURE__ */ e(
|
|
1058
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
1061
|
-
/* @__PURE__ */ e(
|
|
1062
|
-
/* @__PURE__ */ e(
|
|
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(
|
|
1066
|
-
/* @__PURE__ */ e(
|
|
1067
|
-
/* @__PURE__ */ e(
|
|
1068
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
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:
|
|
1079
|
-
sx: { ...
|
|
1021
|
+
onClose: o,
|
|
1022
|
+
sx: { ...n },
|
|
1080
1023
|
title: r.paydown_drawer_title,
|
|
1081
|
-
children: /* @__PURE__ */ e(
|
|
1024
|
+
children: /* @__PURE__ */ e(yt, {})
|
|
1082
1025
|
}
|
|
1083
1026
|
);
|
|
1084
1027
|
};
|
|
1085
|
-
function
|
|
1086
|
-
const
|
|
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
|
|
1034
|
+
return n(a) - n(o);
|
|
1092
1035
|
}
|
|
1093
|
-
function
|
|
1036
|
+
function xt(a) {
|
|
1094
1037
|
return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
|
|
1095
1038
|
}
|
|
1096
|
-
const
|
|
1097
|
-
const
|
|
1039
|
+
const wt = (a) => {
|
|
1040
|
+
const o = {
|
|
1098
1041
|
text: "#121417",
|
|
1099
1042
|
background: "#FFB252"
|
|
1100
1043
|
};
|
|
1101
|
-
return a === "!" && (
|
|
1102
|
-
},
|
|
1103
|
-
const
|
|
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:
|
|
1058
|
+
backgroundColor: n.background,
|
|
1116
1059
|
marginLeft: "10px"
|
|
1117
1060
|
},
|
|
1118
|
-
children: /* @__PURE__ */ e(
|
|
1061
|
+
children: /* @__PURE__ */ e(i, { color: n.text, fontWeight: 700, variant: "Small", children: o })
|
|
1119
1062
|
}
|
|
1120
1063
|
);
|
|
1121
|
-
},
|
|
1122
|
-
const
|
|
1123
|
-
return /* @__PURE__ */ s(
|
|
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
|
-
|
|
1068
|
+
Ce,
|
|
1126
1069
|
{
|
|
1127
|
-
alt: `${
|
|
1128
|
-
institutionGuid:
|
|
1070
|
+
alt: `${o.institutionName}`,
|
|
1071
|
+
institutionGuid: o.institution_guid || ""
|
|
1129
1072
|
}
|
|
1130
1073
|
),
|
|
1131
|
-
/* @__PURE__ */ s(
|
|
1132
|
-
/* @__PURE__ */ e(
|
|
1133
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
1079
|
+
}, Dt = ({
|
|
1137
1080
|
sx: a = {},
|
|
1138
|
-
debts:
|
|
1139
|
-
hoveredDebtGuid:
|
|
1081
|
+
debts: o,
|
|
1082
|
+
hoveredDebtGuid: n,
|
|
1140
1083
|
onHoverRow: r,
|
|
1141
1084
|
onClickRow: t
|
|
1142
1085
|
}) => {
|
|
1143
|
-
const
|
|
1086
|
+
const l = j(), { onEvent: d } = M(), { isMobile: m } = X(), { debts: c } = C(), [h, p] = y.useState([
|
|
1144
1087
|
{ field: "priority", sort: "asc" }
|
|
1145
|
-
]),
|
|
1088
|
+
]), g = [
|
|
1146
1089
|
{
|
|
1147
1090
|
field: "priority",
|
|
1148
1091
|
headerName: c.table_column_priority,
|
|
1149
1092
|
renderHeader: G,
|
|
1150
|
-
renderCell:
|
|
1151
|
-
sortComparator:
|
|
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:
|
|
1158
|
-
flex:
|
|
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:
|
|
1107
|
+
renderCell: St,
|
|
1165
1108
|
sortable: !1,
|
|
1166
1109
|
type: "custom",
|
|
1167
1110
|
align: "left",
|
|
1168
1111
|
headerAlign: "left",
|
|
1169
|
-
minWidth:
|
|
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) =>
|
|
1119
|
+
valueFormatter: (u) => B(u, "0,0"),
|
|
1177
1120
|
sortable: !0,
|
|
1178
|
-
hideSortIcons:
|
|
1121
|
+
hideSortIcons: m,
|
|
1179
1122
|
type: "number",
|
|
1180
|
-
align:
|
|
1181
|
-
headerAlign:
|
|
1182
|
-
minWidth:
|
|
1183
|
-
flex:
|
|
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:
|
|
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:
|
|
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" ?
|
|
1158
|
+
valueFormatter: (u) => typeof u == "number" ? B(u, "0,0") : "---",
|
|
1216
1159
|
sortable: !0,
|
|
1217
|
-
hideSortIcons:
|
|
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
|
-
],
|
|
1225
|
-
...
|
|
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
|
-
],
|
|
1181
|
+
], E = y.useMemo(() => o.map((u, A) => ({
|
|
1239
1182
|
...u,
|
|
1240
|
-
id:
|
|
1241
|
-
priority:
|
|
1242
|
-
})), [
|
|
1243
|
-
const Y = u.target.closest("[data-id]")?.getAttribute("data-id"), b =
|
|
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) =>
|
|
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
|
-
|
|
1201
|
+
Ge,
|
|
1259
1202
|
{
|
|
1260
|
-
columns:
|
|
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(),
|
|
1209
|
+
t(), d(v.DEBTS_CLICK_TABLE_ROW, { account_guid: u.row.guid });
|
|
1267
1210
|
},
|
|
1268
1211
|
onSortModelChange: (u) => {
|
|
1269
|
-
|
|
1212
|
+
p(u), d(v.DEBTS_CLICK_TABLE_SORT);
|
|
1270
1213
|
},
|
|
1271
|
-
rows:
|
|
1214
|
+
rows: E,
|
|
1272
1215
|
slotProps: {
|
|
1273
1216
|
baseIconButton: { color: "secondary", sx: { ml: 8 } },
|
|
1274
1217
|
row: {
|
|
1275
|
-
onMouseEnter:
|
|
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(
|
|
1283
|
-
backgroundColor:
|
|
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
|
-
},
|
|
1292
|
-
const { isDesktop: r, isTablet: t } = X(),
|
|
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
|
-
|
|
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:
|
|
1301
|
-
startIcon: /* @__PURE__ */ e(ee, { name:
|
|
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
|
-
|
|
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:
|
|
1313
|
-
children: /* @__PURE__ */ e(ee, { name:
|
|
1255
|
+
onClick: n,
|
|
1256
|
+
children: /* @__PURE__ */ e(ee, { name: l })
|
|
1314
1257
|
}
|
|
1315
1258
|
);
|
|
1316
|
-
},
|
|
1317
|
-
const { onEvent:
|
|
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:
|
|
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:
|
|
1266
|
+
priority: $.LOWEST_BALANCE,
|
|
1328
1267
|
text: r.priority_sort_lowest_balance
|
|
1329
1268
|
},
|
|
1330
1269
|
{
|
|
1331
|
-
priority:
|
|
1270
|
+
priority: $.HIGHEST_BALANCE,
|
|
1332
1271
|
text: r.priority_sort_highest_balance
|
|
1333
1272
|
}
|
|
1334
1273
|
], c = (h) => {
|
|
1335
|
-
|
|
1274
|
+
l(h), n(v.DEBTS_CLICK_PRIORITY, { debts_priority: h });
|
|
1336
1275
|
};
|
|
1337
1276
|
return /* @__PURE__ */ e(
|
|
1338
|
-
|
|
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:
|
|
1347
|
-
open:
|
|
1285
|
+
onClose: o,
|
|
1286
|
+
open: d,
|
|
1348
1287
|
transformOrigin: {
|
|
1349
1288
|
vertical: "top",
|
|
1350
1289
|
horizontal: "left"
|
|
1351
1290
|
},
|
|
1352
|
-
children: /* @__PURE__ */ e(
|
|
1353
|
-
|
|
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(
|
|
1372
|
-
t === h && /* @__PURE__ */ e(
|
|
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
|
-
}),
|
|
1380
|
-
const { onEvent: a } =
|
|
1381
|
-
t(h.currentTarget), a(
|
|
1382
|
-
},
|
|
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
|
-
},
|
|
1385
|
-
[
|
|
1386
|
-
[
|
|
1387
|
-
[
|
|
1388
|
-
|
|
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(
|
|
1392
|
-
/* @__PURE__ */ e(
|
|
1329
|
+
/* @__PURE__ */ e(vt, { buttonText: c, isOpen: m, onClick: l }),
|
|
1330
|
+
/* @__PURE__ */ e(Tt, { buttonEl: r, onClose: d })
|
|
1393
1331
|
] });
|
|
1394
|
-
}),
|
|
1332
|
+
}), Et = (a, o, n = 0) => {
|
|
1395
1333
|
const r = a.map((c) => ({ ...c }));
|
|
1396
|
-
|
|
1397
|
-
const t = /* @__PURE__ */ new Date(),
|
|
1398
|
-
let
|
|
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
|
-
|
|
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,
|
|
1408
|
-
if (
|
|
1409
|
-
const
|
|
1410
|
-
let D =
|
|
1411
|
-
h === 0 && (D +=
|
|
1412
|
-
const u = Math.min(
|
|
1413
|
-
if (u <=
|
|
1414
|
-
|
|
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
|
-
|
|
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,
|
|
1357
|
+
y: Math.max(0, p.balance),
|
|
1420
1358
|
payment: u,
|
|
1421
|
-
extra:
|
|
1422
|
-
}),
|
|
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
|
|
1364
|
+
return l.forEach((c) => {
|
|
1427
1365
|
(c.interest_rate === void 0 || c.interest_rate === void 0) && (c.projected_payoff_date = void 0);
|
|
1428
|
-
}),
|
|
1429
|
-
c.priority = !c.is_paid_off && !c.is_impossible ?
|
|
1430
|
-
}),
|
|
1431
|
-
},
|
|
1432
|
-
const { debts:
|
|
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
|
-
|
|
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:
|
|
1380
|
+
children: T(d, B(l, "0,0"))
|
|
1443
1381
|
}
|
|
1444
1382
|
);
|
|
1445
|
-
}),
|
|
1446
|
-
const [
|
|
1447
|
-
const
|
|
1448
|
-
return
|
|
1449
|
-
}, [N, V,
|
|
1450
|
-
|
|
1451
|
-
u(b), v
|
|
1452
|
-
}, []),
|
|
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]),
|
|
1455
|
-
D &&
|
|
1392
|
+
}, [b]), y.useEffect(() => {
|
|
1393
|
+
D && I().finally();
|
|
1456
1394
|
}, [D]);
|
|
1457
|
-
const
|
|
1458
|
-
const
|
|
1459
|
-
|
|
1460
|
-
},
|
|
1461
|
-
|
|
1462
|
-
},
|
|
1463
|
-
|
|
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 || !
|
|
1466
|
-
|
|
1403
|
+
return !w || !k || !D ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ s(
|
|
1404
|
+
Re,
|
|
1467
1405
|
{
|
|
1468
1406
|
accountOptions: b,
|
|
1469
1407
|
actions: [
|
|
1470
|
-
/* @__PURE__ */ e(
|
|
1471
|
-
/* @__PURE__ */ e(
|
|
1408
|
+
/* @__PURE__ */ e(At, {}, "prioritize-debts"),
|
|
1409
|
+
/* @__PURE__ */ e(It, { onClick: xe }, "extra-paydown")
|
|
1472
1410
|
],
|
|
1473
|
-
onAccountsFilterClick:
|
|
1411
|
+
onAccountsFilterClick: fe,
|
|
1474
1412
|
onBackClick: a,
|
|
1475
|
-
sx:
|
|
1476
|
-
title:
|
|
1413
|
+
sx: o,
|
|
1414
|
+
title: x.title,
|
|
1477
1415
|
children: [
|
|
1478
|
-
/* @__PURE__ */ s(
|
|
1416
|
+
/* @__PURE__ */ s(f, { sx: { px: p ? "48px" : "24px" }, children: [
|
|
1479
1417
|
/* @__PURE__ */ s(
|
|
1480
|
-
|
|
1418
|
+
f,
|
|
1481
1419
|
{
|
|
1482
1420
|
sx: {
|
|
1483
|
-
alignItems:
|
|
1484
|
-
flexDirection:
|
|
1485
|
-
mx:
|
|
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
|
-
|
|
1427
|
+
ye,
|
|
1490
1428
|
{
|
|
1491
|
-
debts:
|
|
1492
|
-
height:
|
|
1429
|
+
debts: H,
|
|
1430
|
+
height: g ? 250 : void 0,
|
|
1493
1431
|
hoveredDebtGuid: c,
|
|
1494
|
-
onClickArea:
|
|
1495
|
-
onHoverArea:
|
|
1496
|
-
sx: { mr:
|
|
1432
|
+
onClickArea: ne,
|
|
1433
|
+
onHoverArea: oe,
|
|
1434
|
+
sx: { mr: g ? "4px" : "-48px" }
|
|
1497
1435
|
}
|
|
1498
1436
|
),
|
|
1499
1437
|
/* @__PURE__ */ e(
|
|
1500
|
-
|
|
1438
|
+
qe,
|
|
1501
1439
|
{
|
|
1502
|
-
debts:
|
|
1503
|
-
onClickCta:
|
|
1504
|
-
sx: { mb:
|
|
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(
|
|
1511
|
-
|
|
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:
|
|
1516
|
-
onHoverRow:
|
|
1453
|
+
onClickRow: ne,
|
|
1454
|
+
onHoverRow: oe
|
|
1517
1455
|
}
|
|
1518
1456
|
) })
|
|
1519
1457
|
] }),
|
|
1520
1458
|
/* @__PURE__ */ e(
|
|
1521
|
-
|
|
1459
|
+
Je,
|
|
1522
1460
|
{
|
|
1523
|
-
isOpen:
|
|
1524
|
-
onClose: () =>
|
|
1461
|
+
isOpen: d,
|
|
1462
|
+
onClose: () => m(!1)
|
|
1525
1463
|
}
|
|
1526
1464
|
),
|
|
1527
|
-
/* @__PURE__ */ e(
|
|
1528
|
-
/* @__PURE__ */ e(
|
|
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
|
-
},
|
|
1470
|
+
}, xr = S(Bt);
|
|
1533
1471
|
export {
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1472
|
+
ye as DebtsChart,
|
|
1473
|
+
Sr as DebtsStore,
|
|
1474
|
+
Dt as DebtsTable,
|
|
1475
|
+
xr as DebtsWidget
|
|
1538
1476
|
};
|