@mx-cartographer/experiences 8.0.0-alpha.bb4 → 8.0.0-alpha.mega1
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 +50 -0
- package/dist/{Account-B4CDD-zq.mjs → Account-CvR2-dSR.mjs} +1 -1
- package/dist/AccountDetailsContent-CitErkuS.mjs +686 -0
- package/dist/{AccountDetailsHeader-DRjFuyJT.mjs → AccountDetailsHeader-BkG3MNYo.mjs} +19 -19
- package/dist/{AccountFields-Cl4KHoSj.mjs → AccountFields-zCMqet85.mjs} +10 -12
- package/dist/AccountListItem-DHrz8Mml.mjs +90 -0
- package/dist/{AccountStore-HbVblv86.mjs → AccountStore-LgfBcYMe.mjs} +101 -75
- package/dist/Accounts-Bzy1_REQ.mjs +9 -0
- package/dist/{BudgetUtil-Jv8h9H9l.mjs → BudgetUtil-BmZXkL0C.mjs} +32 -32
- package/dist/{CashflowStore-CA190BPF.mjs → CashflowStore-D9Dpuz7X.mjs} +25 -18
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-Dl006GKy.mjs → CategorySelectorDrawer-B-I3kajA.mjs} +27 -27
- package/dist/CategoryStore-CA3tS1BO.mjs +186 -0
- package/dist/CategoryUtil-DUM8NuGO.mjs +78 -0
- package/dist/{ConnectDrawer-DVp54lUH.mjs → ConnectDrawer-BkvlItWx.mjs} +55 -56
- package/dist/{ConnectionsDrawer-Dsc04-4Z.mjs → ConnectionsDrawer-VmuVFHbL.mjs} +5 -5
- package/dist/CurrencyInput-itK0R3wV.mjs +85 -0
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CBdcsyuk.mjs} +1 -1
- package/dist/{DebtsStore-pL63fmdT.mjs → DebtsStore-Bq-aPy-5.mjs} +3 -3
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-BPTr3qHE.mjs} +24 -24
- package/dist/Drawer-By9V-B5L.mjs +178 -0
- package/dist/{ExportCsvAction-QhQK4_FU.mjs → ExportCsvAction-Cglo8Mca.mjs} +4 -4
- package/dist/{FinstrongStore-BGf36b0z.mjs → FinstrongStore-BIrX0Xg2.mjs} +56 -56
- package/dist/{GoalStore-C1-w3Y1E.mjs → GoalStore-1P19goZ7.mjs} +111 -151
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/{Help-c-zHlDbv.mjs → Help-DhcC-C05.mjs} +8 -8
- package/dist/{Help-DBfsTkAi.mjs → Help-Ea3BlXQp.mjs} +146 -125
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/LineChart-KpPw1phO.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-BxTkF6Tz.mjs} +2 -2
- package/dist/Loader-DUaFpDGv.mjs +24 -0
- package/dist/{ManageIncome-8EsStyIQ.mjs → ManageIncome-CaoQl609.mjs} +142 -142
- package/dist/MicroWidgetContainer-r6mtxRer.mjs +52 -0
- package/dist/MiniWidgetContainer-Bg02sF1Y.mjs +71 -0
- package/dist/{NetWorthStore-Bti6u-d9.mjs → NetWorthStore-rC0q7P7t.mjs} +4 -4
- package/dist/NotificationSettings-uzM8tCoH.mjs +674 -0
- package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-CDX_kqHa.mjs} +14 -22
- package/dist/{OriginalBalanceAction-2Y_3U_mg.mjs → OriginalBalanceAction-C6jdS4ws.mjs} +9 -9
- package/dist/{RecurringSettings-DAncu--R.mjs → RecurringSettings-B4ybrS0B.mjs} +17 -17
- package/dist/{RecurringTransactions-CxcSL1dY.mjs → RecurringTransactions-BqijW_8S.mjs} +79 -79
- package/dist/{RecurringTransactionsStore-CNFxyGB6.mjs → RecurringTransactionsStore-BhBUVm9a.mjs} +81 -91
- package/dist/{ResponsiveButton-Cn6-R7ue.mjs → ResponsiveButton-DZFp78fJ.mjs} +10 -10
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-krIRNwHK.mjs} +1 -1
- package/dist/{SingleSegmentDonut-7Uy6VEld.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +6 -6
- package/dist/SpendingData-DQ1b9uqq.mjs +53 -0
- package/dist/{SpendingLegend-6FqtMcBV.mjs → SpendingLegend-CDO060GT.mjs} +65 -65
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/TransactionDetails-m5PddMQn.mjs +1380 -0
- package/dist/TransactionStore-PRlwE-TF.mjs +677 -0
- package/dist/TrendsStore-yO7qYv97.mjs +186 -0
- package/dist/{User-BklmOUSd.mjs → User-Cnlegl1N.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-DAkyNRlD.mjs → ViewMoreMicroCard-DwR0v_ll.mjs} +211 -205
- package/dist/{WidgetContainer-CDh9fjpR.mjs → WidgetContainer-CoFDmQRE.mjs} +36 -36
- package/dist/accounts/index.es.js +200 -197
- package/dist/accounts/stores/AccountStore.d.ts +22 -25
- package/dist/accounts/utils/Accounts.d.ts +1 -2
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +703 -669
- package/dist/budgets/store/BudgetsStore.d.ts +0 -1
- package/dist/cashflow/index.es.js +420 -404
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +3 -6
- package/dist/categories/util/CategoryUtil.d.ts +2 -3
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +2 -1
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/barchart/Bar.d.ts +25 -0
- package/dist/common/components/barchart/BarChart.d.ts +34 -0
- package/dist/common/components/barchart/BarColumn.d.ts +37 -0
- package/dist/common/components/barchart/Legend.d.ts +8 -0
- package/dist/common/components/barchart/Util.d.ts +42 -0
- package/dist/common/components/barchart/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomMark.d.ts +1 -1
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/hooks/index.d.ts +2 -0
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/hooks/usePrevious.d.ts +2 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +712 -436
- package/dist/common/stores/AppDataStore.d.ts +1 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -0
- package/dist/common/stores/GlobalStore.d.ts +3 -3
- package/dist/common/stores/GlobalUiStore.d.ts +2 -3
- package/dist/common/stores/UserStore.d.ts +2 -3
- package/dist/common/types/Account.d.ts +6 -9
- package/dist/common/types/localization/TransactionsCopy.d.ts +1 -0
- package/dist/common/utils/Theme.d.ts +3 -1
- package/dist/dashboard/index.es.js +93 -91
- package/dist/debts/components/DebtsChart.d.ts +2 -1
- package/dist/debts/index.es.js +529 -527
- package/dist/{exportTransactionsToCSV-BgV_wTLT.mjs → exportTransactionsToCSV-DuAaI5XA.mjs} +3 -3
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +876 -867
- package/dist/goals/index.es.js +526 -525
- package/dist/goals/stores/GoalStore.d.ts +4 -17
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +13 -9
- package/dist/{hooks-C41HAxM5.mjs → hooks-ZMp65DFz.mjs} +11 -11
- package/dist/investments/index.es.js +534 -531
- package/dist/investments/stores/HoldingStore.d.ts +0 -1
- package/dist/merchants/index.es.js +8 -8
- package/dist/microinsights/MicroCardTemplate.d.ts +16 -0
- package/dist/microinsights/index.d.ts +1 -0
- package/dist/microinsights/index.es.js +101 -14
- package/dist/networth/components/NetWorthChange.d.ts +1 -3
- package/dist/networth/index.es.js +284 -285
- package/dist/notifications/index.es.js +95 -94
- package/dist/notifications/stores/NotificationStore.d.ts +1 -3
- package/dist/recurringtransactions/index.es.js +582 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -4
- package/dist/settings/index.es.js +340 -337
- package/dist/spending/index.es.js +281 -268
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +7 -0
- package/dist/transactions/index.es.js +253 -255
- package/dist/transactions/stores/TransactionStore.d.ts +77 -21
- package/dist/transactions/stores/UiStore.d.ts +2 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +838 -793
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/{useAccountDisplayName-CcIp09Xc.mjs → useAccountDisplayName-B7iXTNM8.mjs} +2 -2
- package/dist/{useCombineEvents-kNzLTWCp.mjs → useCombineEvents-CRwX-qWE.mjs} +2 -2
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-B7dxpDrX.mjs} +1 -1
- package/dist/{useScreenSize-B5afALev.mjs → useScreenSize-B6JyS_Lj.mjs} +1 -1
- package/dist/useWidgetLoadTimer-hIOioiKx.mjs +19 -0
- package/package.json +57 -52
- package/dist/AccountDetailsContent-adZTkM52.mjs +0 -683
- package/dist/AccountListItem-wgmlex-_.mjs +0 -90
- package/dist/Accounts-CRUehOiy.mjs +0 -27
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/CategoryUtil-DfVKKkRf.mjs +0 -80
- package/dist/CurrencyInput-D1cjbdCI.mjs +0 -85
- package/dist/Drawer-BF40nbsH.mjs +0 -163
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/LineChart-C1PxNf7P.mjs +0 -581
- package/dist/Loader-Ckqi9Rx6.mjs +0 -21
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +0 -45
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +0 -56
- package/dist/NotificationSettings-B74rQVYC.mjs +0 -672
- package/dist/SearchBox-B7km148n.mjs +0 -39
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +0 -1336
- package/dist/TransactionStore-DbwAutwC.mjs +0 -671
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/common/components/SkeletonLoader.d.ts +0 -7
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +0 -3
package/dist/debts/index.es.js
CHANGED
|
@@ -1,69 +1,70 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as H } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
|
+
import { observer as D } from "mobx-react-lite";
|
|
4
4
|
import w from "@mui/material/Stack";
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import { Text as l, H3 as
|
|
7
|
-
import { intervalToDuration as
|
|
8
|
-
import { addMonths as
|
|
9
|
-
import { fromUnixTime as
|
|
10
|
-
import { getUnixTime as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { f as
|
|
14
|
-
import { f as
|
|
15
|
-
import { G as
|
|
16
|
-
import { u as
|
|
17
|
-
import { D as
|
|
18
|
-
import { b as
|
|
19
|
-
import { A as
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import { A as T, W as
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import { M as
|
|
32
|
-
import
|
|
33
|
-
import { L as
|
|
34
|
-
import { C as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import { Error as
|
|
39
|
-
import { T as
|
|
40
|
-
import { DataGridPro as
|
|
41
|
-
import { H as
|
|
42
|
-
import {
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import {
|
|
48
|
-
|
|
5
|
+
import { useTheme as X, Card as be, Stack as _, Box as G } from "@mui/material";
|
|
6
|
+
import { Text as l, H3 as ve, InstitutionLogo as De, Icon as ee } from "@mxenabled/mxui";
|
|
7
|
+
import { intervalToDuration as Te, formatDuration as Ae } from "date-fns";
|
|
8
|
+
import { addMonths as le } from "date-fns/addMonths";
|
|
9
|
+
import { fromUnixTime as se } from "date-fns/fromUnixTime";
|
|
10
|
+
import { getUnixTime as ce } from "date-fns/getUnixTime";
|
|
11
|
+
import { D as P, M as Ee, I as Ie } from "../DebtsStore-Bq-aPy-5.mjs";
|
|
12
|
+
import { a as Lr } from "../DebtsStore-Bq-aPy-5.mjs";
|
|
13
|
+
import { f as k, a as Be } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
14
|
+
import { f as K, a as U } from "../Dialog-BPTr3qHE.mjs";
|
|
15
|
+
import { G as Me, w as q, u as S, l as V, g as F, d as Z, b as Pe } from "../hooks-ZMp65DFz.mjs";
|
|
16
|
+
import { u as Y } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
17
|
+
import { D as te } from "../Drawer-By9V-B5L.mjs";
|
|
18
|
+
import { b as E } from "../Localization-2MODESHW.mjs";
|
|
19
|
+
import { A as ke, u as Ne } from "../AccountDetailsHeader-BkG3MNYo.mjs";
|
|
20
|
+
import Fe from "@mui/material/Card";
|
|
21
|
+
import Re from "@mui/material/CardContent";
|
|
22
|
+
import Le from "@mui/material/CardHeader";
|
|
23
|
+
import re from "@mui/material/Box";
|
|
24
|
+
import { useTheme as $e } from "@mui/material/styles";
|
|
25
|
+
import { LineChart as He } from "@mui/x-charts/LineChart";
|
|
26
|
+
import { A as T, W as Oe } from "../WidgetContainer-CoFDmQRE.mjs";
|
|
27
|
+
import de from "@mui/material/Tab";
|
|
28
|
+
import We from "@mui/material/Tabs";
|
|
29
|
+
import _e from "@mui/material/List";
|
|
30
|
+
import j from "@mui/material/Divider";
|
|
31
|
+
import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-C6jdS4ws.mjs";
|
|
32
|
+
import Xe from "@mui/material/TextField";
|
|
33
|
+
import { L as J } from "../ListItemAction-BxTkF6Tz.mjs";
|
|
34
|
+
import { C as ae } from "../CurrencyInput-itK0R3wV.mjs";
|
|
35
|
+
import pe from "@mui/material/Alert";
|
|
36
|
+
import me from "@mui/material/AlertTitle";
|
|
37
|
+
import he from "@mui/material/Paper";
|
|
38
|
+
import { Error as Ve, CheckCircle as ye } from "@mxenabled/mx-icons";
|
|
39
|
+
import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
|
|
40
|
+
import { DataGridPro as Ye } from "@mui/x-data-grid-pro";
|
|
41
|
+
import { H as z } from "../HeaderCell-DjuifqHJ.mjs";
|
|
42
|
+
import { f as Ke } from "../ConnectDrawer-BkvlItWx.mjs";
|
|
43
|
+
import fe from "@mui/material/Button";
|
|
44
|
+
import Ue from "@mui/material/IconButton";
|
|
45
|
+
import qe from "@mui/material/ListItem";
|
|
46
|
+
import Ze from "@mui/material/Popover";
|
|
47
|
+
import { u as Je } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
48
|
+
import { L as Qe } from "../Loader-DUaFpDGv.mjs";
|
|
49
|
+
const et = (a, o = 0, r = 0) => {
|
|
49
50
|
if (r === 0) return 0;
|
|
50
|
-
const t = o / (
|
|
51
|
+
const t = o / (Ee * Ie);
|
|
51
52
|
return Math.ceil(
|
|
52
|
-
t === 0 ?
|
|
53
|
+
t === 0 ? a / r : -Math.log(1 - t * a / r) / Math.log(1 + t)
|
|
53
54
|
);
|
|
54
|
-
},
|
|
55
|
+
}, tt = (a, o, r, t, n) => {
|
|
55
56
|
const i = [];
|
|
56
57
|
if (r === 0) {
|
|
57
|
-
for (let c = 0; c <
|
|
58
|
-
const d = o - t * (c + 1),
|
|
58
|
+
for (let c = 0; c < a; c++) {
|
|
59
|
+
const d = o - t * (c + 1), m = o - t * c, b = d >= 0 ? t : m;
|
|
59
60
|
i.push({
|
|
60
61
|
balance: d >= 0 ? d : 0,
|
|
61
62
|
interest: r,
|
|
62
|
-
payment:
|
|
63
|
-
principal:
|
|
64
|
-
timestamp:
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
payment: b,
|
|
64
|
+
principal: b,
|
|
65
|
+
timestamp: ce(
|
|
66
|
+
le(
|
|
67
|
+
se(n),
|
|
67
68
|
// convert seconds → Date
|
|
68
69
|
c + 1
|
|
69
70
|
// add (index + 1) months
|
|
@@ -74,98 +75,98 @@ const tt = (n, o = 0, r = 0) => {
|
|
|
74
75
|
return i;
|
|
75
76
|
}
|
|
76
77
|
const p = r / 1200;
|
|
77
|
-
for (let c = 0; c <
|
|
78
|
-
const d =
|
|
78
|
+
for (let c = 0; c < a; c++) {
|
|
79
|
+
const d = ce(le(se(n), c + 1)), m = Math.pow(1 + p, c), b = o * m - t * ((m - 1) / p), f = Math.pow(1 + p, c + 1), u = o * f - t * ((f - 1) / p), v = t + Math.min(u, 0), M = b * p;
|
|
79
80
|
i.push({
|
|
80
81
|
balance: Math.max(0, u),
|
|
81
82
|
interest: M,
|
|
82
|
-
payment:
|
|
83
|
-
principal:
|
|
83
|
+
payment: v,
|
|
84
|
+
principal: v - M,
|
|
84
85
|
timestamp: d
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
return i;
|
|
88
|
-
},
|
|
89
|
-
const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date:
|
|
89
|
+
}, rt = (a) => (a[a.length - 1] || {}).timestamp, at = (a) => {
|
|
90
|
+
const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: n } = a, i = et(t, r ?? 0, o ?? 0), p = tt(
|
|
90
91
|
i,
|
|
91
92
|
t,
|
|
92
93
|
r ?? 0,
|
|
93
94
|
o ?? 0,
|
|
94
|
-
|
|
95
|
-
), c =
|
|
95
|
+
n
|
|
96
|
+
), c = rt(p);
|
|
96
97
|
return {
|
|
97
|
-
...
|
|
98
|
+
...a,
|
|
98
99
|
minimumFinalPayment: c,
|
|
99
100
|
minimumPayments: p
|
|
100
101
|
};
|
|
101
|
-
}, ge = (
|
|
102
|
-
const [r, t] =
|
|
103
|
-
([
|
|
102
|
+
}, ge = (a, o) => {
|
|
103
|
+
const [r, t] = a.reduce(
|
|
104
|
+
([n, i], p) => (p.is_paid_off || p.is_impossible ? i.push({ ...p, minimumPayments: [] }) : n.push(at(p)), [n, i]),
|
|
104
105
|
[[], []]
|
|
105
106
|
);
|
|
106
107
|
switch (o) {
|
|
107
108
|
case P.FASTEST_PAYOFF_FIRST:
|
|
108
|
-
r.sort((
|
|
109
|
+
r.sort((n, i) => (n.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
|
|
109
110
|
break;
|
|
110
111
|
case P.HIGHEST_INTEREST:
|
|
111
|
-
r.sort((
|
|
112
|
+
r.sort((n, i) => (i.interest_rate ?? 0) - (n.interest_rate ?? 0));
|
|
112
113
|
break;
|
|
113
114
|
case P.LOWEST_BALANCE:
|
|
114
|
-
r.sort((
|
|
115
|
+
r.sort((n, i) => n.balance - i.balance);
|
|
115
116
|
break;
|
|
116
117
|
case P.HIGHEST_BALANCE:
|
|
117
|
-
r.sort((
|
|
118
|
+
r.sort((n, i) => i.balance - n.balance);
|
|
118
119
|
break;
|
|
119
120
|
default:
|
|
120
|
-
r.sort((
|
|
121
|
+
r.sort((n, i) => n.balance - i.balance);
|
|
121
122
|
}
|
|
122
|
-
|
|
123
|
+
a.splice(0, a.length, ...r, ...t);
|
|
123
124
|
};
|
|
124
|
-
function
|
|
125
|
-
const t =
|
|
126
|
-
(
|
|
125
|
+
function ot(a, o, r = 0) {
|
|
126
|
+
const t = a.map((b) => ({ ...b })).filter(
|
|
127
|
+
(b) => b.interest_rate !== void 0 && b.monthly_payment !== void 0 && !b.is_paid_off
|
|
127
128
|
);
|
|
128
129
|
ge(t, o);
|
|
129
|
-
let
|
|
130
|
+
let n = 0, i = 0;
|
|
130
131
|
const p = /* @__PURE__ */ new Date(), c = /* @__PURE__ */ new Date();
|
|
131
|
-
for (; t.some((
|
|
132
|
-
let
|
|
133
|
-
for (const [
|
|
132
|
+
for (; t.some((b) => b.balance >= 0.01 && !b.is_impossible); ) {
|
|
133
|
+
let b = !1;
|
|
134
|
+
for (const [f, u] of t.entries()) {
|
|
134
135
|
if (u.balance <= 0.01 || u.is_impossible) continue;
|
|
135
|
-
const M = (u.interest_rate ?? 0) / 100 / 12,
|
|
136
|
+
const M = (u.interest_rate ?? 0) / 100 / 12, I = u.balance * M;
|
|
136
137
|
let C = u.monthly_payment ?? 0;
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
138
|
+
f === 0 && r && (C += r), u.balance += I;
|
|
139
|
+
const B = Math.min(u.balance, C + i);
|
|
140
|
+
if (B <= I) {
|
|
140
141
|
u.is_impossible = !0;
|
|
141
142
|
continue;
|
|
142
143
|
}
|
|
143
|
-
u.balance -=
|
|
144
|
+
u.balance -= B, u.balance = u.balance < 0.01 ? 0 : u.balance, n += I, u.balance <= 0 && (i += C), B > 0 && (b = !0);
|
|
144
145
|
}
|
|
145
|
-
|
|
146
|
+
b && c.setMonth(c.getMonth() + 1);
|
|
146
147
|
}
|
|
147
|
-
const d = t.some((
|
|
148
|
+
const d = t.some((b) => b.is_impossible && b.balance > 0), m = Te({ start: p, end: c });
|
|
148
149
|
return {
|
|
149
|
-
payoffSavings: d ? "N/A" :
|
|
150
|
-
payoffDate: d ? "Never" :
|
|
151
|
-
payoffDuration: d ? "Stagnant" :
|
|
150
|
+
payoffSavings: d ? "N/A" : k(n, "0,0.00"),
|
|
151
|
+
payoffDate: d ? "Never" : K(c, U.MONTH_YEAR),
|
|
152
|
+
payoffDuration: d ? "Stagnant" : Ae(m, { format: ["years", "months"] }) || "0 months"
|
|
152
153
|
};
|
|
153
154
|
}
|
|
154
|
-
const
|
|
155
|
-
if (!
|
|
155
|
+
const $ = () => {
|
|
156
|
+
if (!x.useContext(Me))
|
|
156
157
|
throw new Error("useCateUiStore() must be used within the GlobalDataContext");
|
|
157
|
-
return
|
|
158
|
-
},
|
|
159
|
-
const t =
|
|
160
|
-
const
|
|
161
|
-
return
|
|
162
|
-
}, [
|
|
158
|
+
return q().uiStore;
|
|
159
|
+
}, nt = ({ debts: a, onClickCta: o, sx: r }) => {
|
|
160
|
+
const t = X(), { isMobile: n } = Y(), { debts: i } = S(), { selectedDebtPriority: p } = $(), { monthlyCashFlowProfile: c } = V(), { payoffDate: d, payoffSavings: m, payoffDuration: b } = x.useMemo(() => {
|
|
161
|
+
const f = c?.extra_payment ?? 0;
|
|
162
|
+
return ot(a, p, f);
|
|
163
|
+
}, [a, p, c]);
|
|
163
164
|
return /* @__PURE__ */ e(
|
|
164
|
-
|
|
165
|
+
be,
|
|
165
166
|
{
|
|
166
167
|
sx: {
|
|
167
168
|
boxShadow: t.shadows[2],
|
|
168
|
-
width:
|
|
169
|
+
width: n ? "100%" : "186px",
|
|
169
170
|
minWidth: "186px",
|
|
170
171
|
...r
|
|
171
172
|
},
|
|
@@ -173,25 +174,25 @@ const L = () => {
|
|
|
173
174
|
/* @__PURE__ */ s(
|
|
174
175
|
_,
|
|
175
176
|
{
|
|
176
|
-
gap:
|
|
177
|
+
gap: n ? "4px" : "0",
|
|
177
178
|
sx: {
|
|
178
179
|
borderBottom: "1px solid",
|
|
179
180
|
borderBottomColor: t.palette.grey[300],
|
|
180
181
|
pb: "8px"
|
|
181
182
|
},
|
|
182
183
|
children: [
|
|
183
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
184
|
-
/* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "
|
|
184
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_date_description }),
|
|
185
|
+
/* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "Small", children: d })
|
|
185
186
|
]
|
|
186
187
|
}
|
|
187
188
|
),
|
|
188
|
-
/* @__PURE__ */ s(_, { gap:
|
|
189
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
190
|
-
/* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "
|
|
189
|
+
/* @__PURE__ */ s(_, { gap: n ? "4px" : "0", children: [
|
|
190
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: m }),
|
|
191
|
+
/* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: i.snowball_card_amount_description })
|
|
191
192
|
] }),
|
|
192
|
-
/* @__PURE__ */ s(_, { gap:
|
|
193
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
194
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
193
|
+
/* @__PURE__ */ s(_, { gap: n ? "4px" : "0", children: [
|
|
194
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: b }),
|
|
195
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_duration_description })
|
|
195
196
|
] }),
|
|
196
197
|
/* @__PURE__ */ e(
|
|
197
198
|
l,
|
|
@@ -200,39 +201,39 @@ const L = () => {
|
|
|
200
201
|
color: t.palette.primary.main,
|
|
201
202
|
onClick: o,
|
|
202
203
|
sx: { cursor: "pointer" },
|
|
203
|
-
variant: "
|
|
204
|
+
variant: "Small",
|
|
204
205
|
children: i.snowball_card_cta
|
|
205
206
|
}
|
|
206
207
|
)
|
|
207
208
|
] })
|
|
208
209
|
}
|
|
209
210
|
);
|
|
210
|
-
},
|
|
211
|
-
const r =
|
|
211
|
+
}, it = D(nt), lt = ({ isOpen: a, onClose: o }) => {
|
|
212
|
+
const r = X(), { debts: t } = S(), [n, i] = x.useState(!1);
|
|
212
213
|
return /* @__PURE__ */ e(
|
|
213
|
-
|
|
214
|
+
te,
|
|
214
215
|
{
|
|
215
216
|
ariaLabelClose: "",
|
|
216
|
-
isOpen:
|
|
217
|
+
isOpen: a,
|
|
217
218
|
onClose: o,
|
|
218
219
|
title: t.snowball_drawer_title,
|
|
219
220
|
children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
|
|
220
221
|
/* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
|
|
221
222
|
/* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
|
|
222
|
-
/* @__PURE__ */ e(l, { mb: 12, variant: "
|
|
223
|
-
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "
|
|
224
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
225
|
-
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "
|
|
223
|
+
/* @__PURE__ */ e(l, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
|
|
224
|
+
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
|
|
225
|
+
/* @__PURE__ */ e(l, { variant: "H1", children: t.snowball_drawer_savings }),
|
|
226
|
+
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
|
|
226
227
|
] }),
|
|
227
|
-
/* @__PURE__ */ s(
|
|
228
|
-
/* @__PURE__ */ e(l, { mb: 4, variant: "
|
|
228
|
+
/* @__PURE__ */ s(be, { sx: { display: "grid", py: 16, px: 24 }, children: [
|
|
229
|
+
/* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
|
|
229
230
|
/* @__PURE__ */ e(
|
|
230
231
|
l,
|
|
231
232
|
{
|
|
232
233
|
color: r.palette.secondary.main,
|
|
233
234
|
mb: 8,
|
|
234
|
-
sx: { whiteSpace:
|
|
235
|
-
variant: "
|
|
235
|
+
sx: { whiteSpace: n ? "normal" : "nowrap" },
|
|
236
|
+
variant: "ParagraphSmall",
|
|
236
237
|
children: t.snowball_drawer_answer
|
|
237
238
|
}
|
|
238
239
|
),
|
|
@@ -241,10 +242,10 @@ const L = () => {
|
|
|
241
242
|
{
|
|
242
243
|
bold: !0,
|
|
243
244
|
color: r.palette.primary.main,
|
|
244
|
-
onClick: () => i(!
|
|
245
|
+
onClick: () => i(!n),
|
|
245
246
|
sx: { cursor: "pointer" },
|
|
246
|
-
variant: "
|
|
247
|
-
children:
|
|
247
|
+
variant: "Small",
|
|
248
|
+
children: n ? t.snowball_drawer_less : t.snowball_drawer_more
|
|
248
249
|
}
|
|
249
250
|
)
|
|
250
251
|
] })
|
|
@@ -256,18 +257,18 @@ const L = () => {
|
|
|
256
257
|
color: r.palette.secondary.main,
|
|
257
258
|
px: 24,
|
|
258
259
|
sx: { textAlign: "center", whiteSpace: "normal" },
|
|
259
|
-
variant: "
|
|
260
|
+
variant: "Small",
|
|
260
261
|
children: t.snowball_drawer_disclaimer
|
|
261
262
|
}
|
|
262
263
|
),
|
|
263
264
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
264
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
265
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
265
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 1) }),
|
|
266
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
266
267
|
] }),
|
|
267
268
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
268
269
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
269
270
|
/* @__PURE__ */ e(
|
|
270
|
-
|
|
271
|
+
G,
|
|
271
272
|
{
|
|
272
273
|
sx: {
|
|
273
274
|
display: "flex",
|
|
@@ -279,14 +280,14 @@ const L = () => {
|
|
|
279
280
|
backgroundColor: r.palette.success.main,
|
|
280
281
|
marginRight: 12
|
|
281
282
|
},
|
|
282
|
-
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "
|
|
283
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
283
284
|
}
|
|
284
285
|
),
|
|
285
286
|
/* @__PURE__ */ s(
|
|
286
287
|
_,
|
|
287
288
|
{
|
|
288
289
|
sx: {
|
|
289
|
-
borderBottom: `1px solid ${r.palette.
|
|
290
|
+
borderBottom: `1px solid ${r.palette.border.light}`,
|
|
290
291
|
flexDirection: "row",
|
|
291
292
|
flexGrow: 1,
|
|
292
293
|
py: 14,
|
|
@@ -294,25 +295,25 @@ const L = () => {
|
|
|
294
295
|
},
|
|
295
296
|
children: [
|
|
296
297
|
/* @__PURE__ */ s(_, { flexGrow: 1, children: [
|
|
297
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
298
|
-
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "
|
|
299
|
-
|
|
298
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "A") }),
|
|
299
|
+
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
|
|
300
|
+
E(
|
|
300
301
|
t.snowball_drawer_rollover_explainer_pt1,
|
|
301
302
|
"$100"
|
|
302
303
|
),
|
|
303
|
-
/* @__PURE__ */ e("strong", { children:
|
|
304
|
+
/* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "B") }),
|
|
304
305
|
t.snowball_drawer_rollover_explainer_pt2
|
|
305
306
|
] })
|
|
306
307
|
] }),
|
|
307
308
|
/* @__PURE__ */ s(_, { children: [
|
|
308
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
309
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$100.00" }),
|
|
309
310
|
/* @__PURE__ */ e(
|
|
310
311
|
l,
|
|
311
312
|
{
|
|
312
313
|
bold: !0,
|
|
313
314
|
color: r.palette.success.main,
|
|
314
315
|
textAlign: "end",
|
|
315
|
-
variant: "
|
|
316
|
+
variant: "Tiny",
|
|
316
317
|
children: t.snowball_drawer_paid_label
|
|
317
318
|
}
|
|
318
319
|
)
|
|
@@ -323,14 +324,14 @@ const L = () => {
|
|
|
323
324
|
] }),
|
|
324
325
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
325
326
|
/* @__PURE__ */ e(
|
|
326
|
-
|
|
327
|
+
G,
|
|
327
328
|
{
|
|
328
329
|
sx: {
|
|
329
330
|
width: 20,
|
|
330
331
|
height: 20,
|
|
331
332
|
marginRight: 12,
|
|
332
333
|
borderRadius: "50%",
|
|
333
|
-
border: `3px solid ${r.palette.
|
|
334
|
+
border: `3px solid ${r.palette.border.darker}`
|
|
334
335
|
}
|
|
335
336
|
}
|
|
336
337
|
),
|
|
@@ -338,35 +339,35 @@ const L = () => {
|
|
|
338
339
|
_,
|
|
339
340
|
{
|
|
340
341
|
sx: {
|
|
341
|
-
borderBottom: `1px solid ${r.palette.
|
|
342
|
+
borderBottom: `1px solid ${r.palette.border.light}`,
|
|
342
343
|
flexDirection: "row",
|
|
343
344
|
flexGrow: 1,
|
|
344
345
|
py: 14,
|
|
345
346
|
pr: 24
|
|
346
347
|
},
|
|
347
348
|
children: [
|
|
348
|
-
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "
|
|
349
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
349
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "B") }),
|
|
350
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$400.00" })
|
|
350
351
|
]
|
|
351
352
|
}
|
|
352
353
|
)
|
|
353
354
|
] }),
|
|
354
355
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, py: 14, children: [
|
|
355
356
|
/* @__PURE__ */ e(
|
|
356
|
-
|
|
357
|
+
G,
|
|
357
358
|
{
|
|
358
359
|
sx: {
|
|
359
360
|
width: 20,
|
|
360
361
|
height: 20,
|
|
361
362
|
marginRight: 12,
|
|
362
363
|
borderRadius: "50%",
|
|
363
|
-
border: `3px solid ${r.palette.
|
|
364
|
+
border: `3px solid ${r.palette.border.darker}`
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
367
|
),
|
|
367
368
|
/* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
|
|
368
|
-
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "
|
|
369
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
369
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }),
|
|
370
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
|
|
370
371
|
] })
|
|
371
372
|
] }),
|
|
372
373
|
/* @__PURE__ */ s(
|
|
@@ -377,24 +378,24 @@ const L = () => {
|
|
|
377
378
|
px: 24,
|
|
378
379
|
flexDirection: "row",
|
|
379
380
|
justifyContent: "space-between",
|
|
380
|
-
borderTop: `1px solid ${r.palette.
|
|
381
|
-
borderBottom: `1px solid ${r.palette.
|
|
381
|
+
borderTop: `1px solid ${r.palette.border.light}`,
|
|
382
|
+
borderBottom: `1px solid ${r.palette.border.light}`
|
|
382
383
|
},
|
|
383
384
|
children: [
|
|
384
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
385
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
385
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
386
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
386
387
|
]
|
|
387
388
|
}
|
|
388
389
|
)
|
|
389
390
|
] }),
|
|
390
391
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
391
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
392
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
392
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 2) }),
|
|
393
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
393
394
|
] }),
|
|
394
395
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
395
396
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
396
397
|
/* @__PURE__ */ e(
|
|
397
|
-
|
|
398
|
+
G,
|
|
398
399
|
{
|
|
399
400
|
sx: {
|
|
400
401
|
display: "flex",
|
|
@@ -406,14 +407,14 @@ const L = () => {
|
|
|
406
407
|
backgroundColor: r.palette.success.main,
|
|
407
408
|
marginRight: 12
|
|
408
409
|
},
|
|
409
|
-
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "
|
|
410
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
410
411
|
}
|
|
411
412
|
),
|
|
412
413
|
/* @__PURE__ */ s(
|
|
413
414
|
_,
|
|
414
415
|
{
|
|
415
416
|
sx: {
|
|
416
|
-
borderBottom: `1px solid ${r.palette.
|
|
417
|
+
borderBottom: `1px solid ${r.palette.border.light}`,
|
|
417
418
|
flexDirection: "row",
|
|
418
419
|
flexGrow: 1,
|
|
419
420
|
py: 14,
|
|
@@ -421,25 +422,25 @@ const L = () => {
|
|
|
421
422
|
},
|
|
422
423
|
children: [
|
|
423
424
|
/* @__PURE__ */ s(_, { flexGrow: 1, children: [
|
|
424
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
425
|
-
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "
|
|
426
|
-
|
|
425
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "B") }),
|
|
426
|
+
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
|
|
427
|
+
E(
|
|
427
428
|
t.snowball_drawer_rollover_explainer_pt1,
|
|
428
429
|
"$500"
|
|
429
430
|
),
|
|
430
|
-
/* @__PURE__ */ e("strong", { children:
|
|
431
|
+
/* @__PURE__ */ e("strong", { children: E(t.snowball_drawer_debt_label, "C") }),
|
|
431
432
|
t.snowball_drawer_rollover_explainer_pt2
|
|
432
433
|
] })
|
|
433
434
|
] }),
|
|
434
435
|
/* @__PURE__ */ s(_, { children: [
|
|
435
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
436
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$500.00" }),
|
|
436
437
|
/* @__PURE__ */ e(
|
|
437
438
|
l,
|
|
438
439
|
{
|
|
439
440
|
bold: !0,
|
|
440
441
|
color: r.palette.success.main,
|
|
441
442
|
textAlign: "end",
|
|
442
|
-
variant: "
|
|
443
|
+
variant: "Tiny",
|
|
443
444
|
children: t.snowball_drawer_paid_label
|
|
444
445
|
}
|
|
445
446
|
)
|
|
@@ -450,14 +451,14 @@ const L = () => {
|
|
|
450
451
|
] }),
|
|
451
452
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
452
453
|
/* @__PURE__ */ e(
|
|
453
|
-
|
|
454
|
+
G,
|
|
454
455
|
{
|
|
455
456
|
sx: {
|
|
456
457
|
width: 20,
|
|
457
458
|
height: 20,
|
|
458
459
|
marginRight: 12,
|
|
459
460
|
borderRadius: "50%",
|
|
460
|
-
border: `3px solid ${r.palette.
|
|
461
|
+
border: `3px solid ${r.palette.border.darker}`
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
464
|
),
|
|
@@ -471,8 +472,8 @@ const L = () => {
|
|
|
471
472
|
pr: 24
|
|
472
473
|
},
|
|
473
474
|
children: [
|
|
474
|
-
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "
|
|
475
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
475
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }),
|
|
476
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
|
|
476
477
|
]
|
|
477
478
|
}
|
|
478
479
|
)
|
|
@@ -485,24 +486,24 @@ const L = () => {
|
|
|
485
486
|
px: 24,
|
|
486
487
|
flexDirection: "row",
|
|
487
488
|
justifyContent: "space-between",
|
|
488
|
-
borderTop: `1px solid ${r.palette.
|
|
489
|
-
borderBottom: `1px solid ${r.palette.
|
|
489
|
+
borderTop: `1px solid ${r.palette.border.light}`,
|
|
490
|
+
borderBottom: `1px solid ${r.palette.border.light}`
|
|
490
491
|
},
|
|
491
492
|
children: [
|
|
492
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
493
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
493
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
494
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
494
495
|
]
|
|
495
496
|
}
|
|
496
497
|
)
|
|
497
498
|
] }),
|
|
498
499
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
499
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
500
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
500
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: E(t.snowball_drawer_month_header, 3) }),
|
|
501
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
501
502
|
] }),
|
|
502
503
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
503
504
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
504
505
|
/* @__PURE__ */ e(
|
|
505
|
-
|
|
506
|
+
G,
|
|
506
507
|
{
|
|
507
508
|
sx: {
|
|
508
509
|
display: "flex",
|
|
@@ -514,7 +515,7 @@ const L = () => {
|
|
|
514
515
|
backgroundColor: r.palette.success.main,
|
|
515
516
|
marginRight: 12
|
|
516
517
|
},
|
|
517
|
-
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "
|
|
518
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
518
519
|
}
|
|
519
520
|
),
|
|
520
521
|
/* @__PURE__ */ s(
|
|
@@ -528,16 +529,16 @@ const L = () => {
|
|
|
528
529
|
pr: 24
|
|
529
530
|
},
|
|
530
531
|
children: [
|
|
531
|
-
/* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "
|
|
532
|
+
/* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: E(t.snowball_drawer_debt_label, "C") }) }),
|
|
532
533
|
/* @__PURE__ */ s(_, { children: [
|
|
533
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
534
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,500.00" }),
|
|
534
535
|
/* @__PURE__ */ e(
|
|
535
536
|
l,
|
|
536
537
|
{
|
|
537
538
|
bold: !0,
|
|
538
539
|
color: r.palette.success.main,
|
|
539
540
|
textAlign: "end",
|
|
540
|
-
variant: "
|
|
541
|
+
variant: "Tiny",
|
|
541
542
|
children: t.snowball_drawer_paid_label
|
|
542
543
|
}
|
|
543
544
|
)
|
|
@@ -554,12 +555,12 @@ const L = () => {
|
|
|
554
555
|
px: 24,
|
|
555
556
|
flexDirection: "row",
|
|
556
557
|
justifyContent: "space-between",
|
|
557
|
-
borderTop: `1px solid ${r.palette.
|
|
558
|
-
borderBottom: `1px solid ${r.palette.
|
|
558
|
+
borderTop: `1px solid ${r.palette.border.light}`,
|
|
559
|
+
borderBottom: `1px solid ${r.palette.border.light}`
|
|
559
560
|
},
|
|
560
561
|
children: [
|
|
561
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
562
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
562
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
563
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
563
564
|
]
|
|
564
565
|
}
|
|
565
566
|
)
|
|
@@ -568,50 +569,50 @@ const L = () => {
|
|
|
568
569
|
] })
|
|
569
570
|
}
|
|
570
571
|
);
|
|
571
|
-
},
|
|
572
|
-
function
|
|
573
|
-
const [r, t,
|
|
572
|
+
}, st = D(lt), ct = "#FF7B08";
|
|
573
|
+
function dt(a, o) {
|
|
574
|
+
const [r, t, n] = a.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), i = [
|
|
574
575
|
Math.max(0, Math.min(255, Math.round(r * o))),
|
|
575
576
|
Math.max(0, Math.min(255, Math.round(t * o))),
|
|
576
|
-
Math.max(0, Math.min(255, Math.round(
|
|
577
|
+
Math.max(0, Math.min(255, Math.round(n * o)))
|
|
577
578
|
];
|
|
578
579
|
return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
|
|
579
580
|
}
|
|
580
|
-
const
|
|
581
|
-
sx:
|
|
581
|
+
const xe = ({
|
|
582
|
+
sx: a,
|
|
582
583
|
height: o = 500,
|
|
583
584
|
width: r,
|
|
584
585
|
debts: t,
|
|
585
|
-
hoveredDebtGuid:
|
|
586
|
+
hoveredDebtGuid: n,
|
|
586
587
|
onClickArea: i,
|
|
587
588
|
onHoverArea: p
|
|
588
589
|
}) => {
|
|
589
|
-
const c =
|
|
590
|
+
const c = $e(), { onEvent: d } = F(), m = t.filter((h) => !h.is_impossible), b = [
|
|
590
591
|
...new Set(
|
|
591
|
-
|
|
592
|
+
m.flatMap((h) => h.dataset.map((g) => new Date(g.x).getTime()))
|
|
592
593
|
)
|
|
593
|
-
].sort((
|
|
594
|
-
const
|
|
595
|
-
let
|
|
596
|
-
const
|
|
597
|
-
const
|
|
598
|
-
return
|
|
594
|
+
].sort((h, g) => h - g).map((h) => new Date(h)), f = m.map((h) => {
|
|
595
|
+
const g = new Map(h.dataset.map((L) => [new Date(L.x).getTime(), L.y]));
|
|
596
|
+
let A = g.get(b[0].getTime()) ?? 0;
|
|
597
|
+
const R = b.map((L) => {
|
|
598
|
+
const O = g.get(L.getTime()) ?? A;
|
|
599
|
+
return A = O, { x: L, y: O };
|
|
599
600
|
});
|
|
600
|
-
return { ...
|
|
601
|
-
}), u =
|
|
602
|
-
(
|
|
601
|
+
return { ...h, dataset: R };
|
|
602
|
+
}), u = f.reduce(
|
|
603
|
+
(h, g) => h + (g.dataset[0]?.y ?? 0),
|
|
603
604
|
0
|
|
604
|
-
),
|
|
605
|
-
const
|
|
606
|
-
return { x:
|
|
607
|
-
}), M = Math.ceil(u / 100) * 100,
|
|
608
|
-
const
|
|
605
|
+
), v = b.map((h, g) => {
|
|
606
|
+
const A = g / (b.length - 1), R = u * (1 - A);
|
|
607
|
+
return { x: h, y: R };
|
|
608
|
+
}), M = Math.ceil(u / 100) * 100, I = b, C = f.map((h, g) => {
|
|
609
|
+
const A = 1 - g / f.length * 0.5, R = dt(ct, A);
|
|
609
610
|
return {
|
|
610
|
-
id: `debt-${
|
|
611
|
-
guid:
|
|
612
|
-
label:
|
|
613
|
-
data:
|
|
614
|
-
color:
|
|
611
|
+
id: `debt-${g}`,
|
|
612
|
+
guid: h.guid,
|
|
613
|
+
label: h.name,
|
|
614
|
+
data: h.dataset.map((L) => L.y),
|
|
615
|
+
color: R,
|
|
615
616
|
curve: "linear",
|
|
616
617
|
type: "line",
|
|
617
618
|
area: !0,
|
|
@@ -622,7 +623,7 @@ const we = ({
|
|
|
622
623
|
C.push({
|
|
623
624
|
id: "payoff-line",
|
|
624
625
|
label: "Payoff Line",
|
|
625
|
-
data:
|
|
626
|
+
data: v.map((h) => h.y),
|
|
626
627
|
color: c.palette.grey[700],
|
|
627
628
|
curve: "linear",
|
|
628
629
|
type: "line",
|
|
@@ -630,9 +631,9 @@ const we = ({
|
|
|
630
631
|
showMark: !1,
|
|
631
632
|
disableHighlight: !0
|
|
632
633
|
});
|
|
633
|
-
const
|
|
634
|
+
const B = (h) => C.findIndex((g) => g?.guid === h);
|
|
634
635
|
return /* @__PURE__ */ e(
|
|
635
|
-
|
|
636
|
+
re,
|
|
636
637
|
{
|
|
637
638
|
sx: {
|
|
638
639
|
width: "100%",
|
|
@@ -652,22 +653,20 @@ const we = ({
|
|
|
652
653
|
axisHighlight: { x: "none" },
|
|
653
654
|
disableLineItemHighlight: !0,
|
|
654
655
|
height: o,
|
|
655
|
-
|
|
656
|
+
hideLegend: !0,
|
|
657
|
+
margin: { bottom: 24, left: 32, right: 72, top: 48 },
|
|
658
|
+
onAreaClick: (h, g) => {
|
|
656
659
|
i?.();
|
|
657
|
-
const
|
|
658
|
-
d(T.DEBTS_CLICK_CHART_AREA, { account_guid:
|
|
660
|
+
const A = C.find((R) => R.id === g.seriesId);
|
|
661
|
+
d(T.DEBTS_CLICK_CHART_AREA, { account_guid: A?.guid });
|
|
659
662
|
},
|
|
660
|
-
onHighlightChange: (
|
|
661
|
-
const
|
|
662
|
-
p?.(
|
|
663
|
+
onHighlightChange: (h) => {
|
|
664
|
+
const g = C.find((A) => A.id === h?.seriesId)?.guid;
|
|
665
|
+
p?.(g ?? "");
|
|
663
666
|
},
|
|
664
667
|
series: C,
|
|
665
668
|
skipAnimation: !0,
|
|
666
|
-
slotProps: {
|
|
667
|
-
legend: {
|
|
668
|
-
hidden: !0
|
|
669
|
-
}
|
|
670
|
-
},
|
|
669
|
+
slotProps: { tooltip: { trigger: "none" } },
|
|
671
670
|
sx: {
|
|
672
671
|
p: 4,
|
|
673
672
|
"& .MuiBarLabel-root": {
|
|
@@ -685,26 +684,26 @@ const we = ({
|
|
|
685
684
|
strokeDasharray: "10 5",
|
|
686
685
|
strokeWidth: 1
|
|
687
686
|
},
|
|
688
|
-
[`& .MuiLineElement-series-debt-${
|
|
687
|
+
[`& .MuiLineElement-series-debt-${B(n ?? "0")}`]: {
|
|
689
688
|
opacity: 1
|
|
690
689
|
},
|
|
691
|
-
[`& .MuiAreaElement-series-debt-${
|
|
690
|
+
[`& .MuiAreaElement-series-debt-${B(n ?? "0")}`]: {
|
|
692
691
|
opacity: 1
|
|
693
692
|
},
|
|
694
693
|
"& .MuiChartsAxis-tickLabel > tspan": {
|
|
695
|
-
fontFamily: c.typography.
|
|
694
|
+
fontFamily: c.typography.Small.fontFamily
|
|
696
695
|
},
|
|
697
|
-
...
|
|
696
|
+
...a
|
|
698
697
|
},
|
|
699
|
-
tooltip: { trigger: "none" },
|
|
700
698
|
width: r,
|
|
701
699
|
xAxis: [
|
|
702
700
|
{
|
|
703
|
-
data:
|
|
704
|
-
scaleType: "time",
|
|
705
|
-
min: m[0],
|
|
701
|
+
data: I,
|
|
706
702
|
disableTicks: !0,
|
|
707
|
-
|
|
703
|
+
min: b[0],
|
|
704
|
+
scaleType: "time",
|
|
705
|
+
tickLabelMinGap: 24,
|
|
706
|
+
valueFormatter: (h) => K(h, U.MONTH_SHORT_YEAR)
|
|
708
707
|
}
|
|
709
708
|
],
|
|
710
709
|
yAxis: [
|
|
@@ -712,18 +711,18 @@ const we = ({
|
|
|
712
711
|
min: 0,
|
|
713
712
|
max: M,
|
|
714
713
|
disableTicks: !0,
|
|
715
|
-
valueFormatter: (
|
|
714
|
+
valueFormatter: (h) => k(h, "0a")
|
|
716
715
|
}
|
|
717
716
|
]
|
|
718
717
|
}
|
|
719
718
|
)
|
|
720
719
|
}
|
|
721
720
|
);
|
|
722
|
-
},
|
|
723
|
-
const
|
|
724
|
-
return /* @__PURE__ */ s(
|
|
721
|
+
}, pt = () => {
|
|
722
|
+
const a = X(), { debts: o } = S(), { selectedDebtChartData: r } = $();
|
|
723
|
+
return /* @__PURE__ */ s(H, { children: [
|
|
725
724
|
/* @__PURE__ */ s(
|
|
726
|
-
|
|
725
|
+
Fe,
|
|
727
726
|
{
|
|
728
727
|
sx: {
|
|
729
728
|
"& .MuiCardContent-root:last-child": {
|
|
@@ -731,42 +730,42 @@ const we = ({
|
|
|
731
730
|
}
|
|
732
731
|
},
|
|
733
732
|
children: [
|
|
734
|
-
/* @__PURE__ */ e(
|
|
735
|
-
/* @__PURE__ */ e(
|
|
733
|
+
/* @__PURE__ */ e(Le, { sx: { pb: 0 }, title: /* @__PURE__ */ e(ve, { sx: { pb: 4 }, children: o.details_chart_title }) }),
|
|
734
|
+
/* @__PURE__ */ e(Re, { sx: { p: 0 }, children: /* @__PURE__ */ e(xe, { debts: [r], height: 250 }) })
|
|
736
735
|
]
|
|
737
736
|
}
|
|
738
737
|
),
|
|
739
738
|
/* @__PURE__ */ e(
|
|
740
739
|
l,
|
|
741
740
|
{
|
|
742
|
-
color:
|
|
741
|
+
color: a.palette.text.secondary,
|
|
743
742
|
sx: { whiteSpace: "normal", textAlign: "center", px: 8, py: 12 },
|
|
744
|
-
variant: "
|
|
743
|
+
variant: "Small",
|
|
745
744
|
children: o.details_chart_description
|
|
746
745
|
}
|
|
747
746
|
)
|
|
748
747
|
] });
|
|
749
|
-
},
|
|
750
|
-
const
|
|
751
|
-
return
|
|
748
|
+
}, mt = D(pt), ht = () => {
|
|
749
|
+
const a = X(), { onEvent: o } = F(), { debts: r } = S(), { selectedDebtChartData: t, showCompleted: n, showError: i } = $();
|
|
750
|
+
return x.useEffect(() => o(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(_e, { children: i || n ? /* @__PURE__ */ e(
|
|
752
751
|
l,
|
|
753
752
|
{
|
|
754
|
-
color:
|
|
753
|
+
color: a.palette.secondary.main,
|
|
755
754
|
component: "div",
|
|
756
755
|
sx: { p: 32, textAlign: "center", whiteSpace: "normal" },
|
|
757
|
-
variant: "
|
|
756
|
+
variant: "Small",
|
|
758
757
|
children: i ? r.schedule_error_message : r.schedule_complete_message
|
|
759
758
|
}
|
|
760
|
-
) : /* @__PURE__ */ s(
|
|
759
|
+
) : /* @__PURE__ */ s(H, { children: [
|
|
761
760
|
/* @__PURE__ */ s(w, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
762
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
763
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
761
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: r.schedule_month_heading }),
|
|
762
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: r.schedule_amount_heading })
|
|
764
763
|
] }),
|
|
765
|
-
t.dataset.slice(1).map(({ x: p, y: c, payment: d }) => /* @__PURE__ */ e(w, { bgcolor:
|
|
764
|
+
t.dataset.slice(1).map(({ x: p, y: c, payment: d }) => /* @__PURE__ */ e(w, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(w, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
|
|
766
765
|
w,
|
|
767
766
|
{
|
|
768
767
|
sx: {
|
|
769
|
-
borderBottom: `1px solid ${
|
|
768
|
+
borderBottom: `1px solid ${a.palette.border.light}`,
|
|
770
769
|
flexDirection: "row",
|
|
771
770
|
flexGrow: 1,
|
|
772
771
|
py: 14,
|
|
@@ -774,19 +773,19 @@ const we = ({
|
|
|
774
773
|
},
|
|
775
774
|
children: [
|
|
776
775
|
/* @__PURE__ */ s(w, { flexGrow: 1, children: [
|
|
777
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
778
|
-
/* @__PURE__ */ e(l, { color:
|
|
776
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: K(p, U.MONTH_YEAR) }),
|
|
777
|
+
/* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: r.schedule_month_label })
|
|
779
778
|
] }),
|
|
780
779
|
/* @__PURE__ */ s(w, { children: [
|
|
781
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
780
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: k(c, "0,0.00") }),
|
|
782
781
|
/* @__PURE__ */ e(
|
|
783
782
|
l,
|
|
784
783
|
{
|
|
785
784
|
bold: !0,
|
|
786
|
-
color:
|
|
785
|
+
color: a.palette.success.main,
|
|
787
786
|
textAlign: "end",
|
|
788
|
-
variant: "
|
|
789
|
-
children: `+${
|
|
787
|
+
variant: "Tiny",
|
|
788
|
+
children: `+${k(d, "0,0")}`
|
|
790
789
|
}
|
|
791
790
|
)
|
|
792
791
|
] })
|
|
@@ -804,135 +803,135 @@ const we = ({
|
|
|
804
803
|
px: 24
|
|
805
804
|
},
|
|
806
805
|
children: [
|
|
807
|
-
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "
|
|
808
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
806
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: r.schedule_payoff_label }),
|
|
807
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "-" })
|
|
809
808
|
]
|
|
810
809
|
}
|
|
811
810
|
) })
|
|
812
811
|
] }) });
|
|
813
|
-
},
|
|
814
|
-
const { debts: o } =
|
|
815
|
-
await r({ ...
|
|
812
|
+
}, ut = D(ht), bt = D(({ debt: a }) => {
|
|
813
|
+
const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.interest_rate ?? 0), p = n < 0, c = async () => {
|
|
814
|
+
await r({ ...a.account, interest_rate: n }), a.interest_rate = n, t(T.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
|
|
816
815
|
}, d = () => {
|
|
817
816
|
setTimeout(() => {
|
|
818
|
-
i(
|
|
817
|
+
i(a.interest_rate ?? 0);
|
|
819
818
|
}, 250);
|
|
820
819
|
};
|
|
821
820
|
return /* @__PURE__ */ e(
|
|
822
|
-
|
|
821
|
+
J,
|
|
823
822
|
{
|
|
824
823
|
isSaveDisabled: p,
|
|
825
824
|
label: `${o.details_interest_rate} (%)`,
|
|
826
825
|
onCancel: d,
|
|
827
826
|
onSave: c,
|
|
828
827
|
primaryText: o.details_interest_rate,
|
|
829
|
-
secondaryText:
|
|
830
|
-
zeroStateText:
|
|
828
|
+
secondaryText: Be(Number(a.interest_rate) / 100),
|
|
829
|
+
zeroStateText: a.interest_rate ? void 0 : o.add_interest_rate,
|
|
831
830
|
children: /* @__PURE__ */ e(
|
|
832
|
-
|
|
831
|
+
Xe,
|
|
833
832
|
{
|
|
834
833
|
error: p,
|
|
835
834
|
fullWidth: !0,
|
|
836
|
-
onChange: (
|
|
835
|
+
onChange: (m) => i(isNaN(parseFloat(m.target.value)) ? 0 : parseFloat(m.target.value)),
|
|
837
836
|
type: "number",
|
|
838
|
-
value:
|
|
837
|
+
value: n
|
|
839
838
|
}
|
|
840
839
|
)
|
|
841
840
|
}
|
|
842
841
|
);
|
|
843
|
-
}),
|
|
844
|
-
const { debts: o } =
|
|
845
|
-
await r({ ...
|
|
842
|
+
}), _t = D(({ debt: a }) => {
|
|
843
|
+
const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.monthly_payment ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
|
|
844
|
+
await r({ ...a.account, minimum_payment: n }), a.monthly_payment = n, t(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
|
|
846
845
|
}, d = () => {
|
|
847
846
|
setTimeout(() => {
|
|
848
|
-
i(
|
|
847
|
+
i(a.monthly_payment ?? 0);
|
|
849
848
|
}, 250);
|
|
850
849
|
};
|
|
851
850
|
return /* @__PURE__ */ e(
|
|
852
|
-
|
|
851
|
+
J,
|
|
853
852
|
{
|
|
854
853
|
isSaveDisabled: p,
|
|
855
854
|
label: o.details_monthly_payment,
|
|
856
855
|
onCancel: d,
|
|
857
856
|
onSave: c,
|
|
858
857
|
primaryText: o.details_monthly_payment,
|
|
859
|
-
secondaryText:
|
|
860
|
-
zeroStateText:
|
|
858
|
+
secondaryText: k(a.monthly_payment, "0,0"),
|
|
859
|
+
zeroStateText: a.monthly_payment ? void 0 : o.add_monthly_payment,
|
|
861
860
|
children: /* @__PURE__ */ e(
|
|
862
|
-
|
|
861
|
+
ae,
|
|
863
862
|
{
|
|
864
|
-
amount:
|
|
863
|
+
amount: n,
|
|
865
864
|
autoFocus: !0,
|
|
866
865
|
error: p,
|
|
867
866
|
fullWidth: !0,
|
|
868
867
|
minAmount: 0,
|
|
869
|
-
setAmount: (
|
|
870
|
-
sx: { ".MuiTypography-
|
|
868
|
+
setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
|
|
869
|
+
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
871
870
|
}
|
|
872
871
|
)
|
|
873
872
|
}
|
|
874
873
|
);
|
|
875
|
-
}),
|
|
876
|
-
const { debts: o } =
|
|
877
|
-
await r({ ...
|
|
874
|
+
}), yt = D(({ debt: a }) => {
|
|
875
|
+
const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.original_balance ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
|
|
876
|
+
await r({ ...a.account, original_balance: n }), a.original_balance = n, t(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
|
|
878
877
|
}, d = () => {
|
|
879
878
|
setTimeout(() => {
|
|
880
|
-
i(
|
|
879
|
+
i(a.original_balance ?? 0);
|
|
881
880
|
}, 250);
|
|
882
881
|
};
|
|
883
882
|
return /* @__PURE__ */ e(
|
|
884
|
-
|
|
883
|
+
J,
|
|
885
884
|
{
|
|
886
885
|
isSaveDisabled: p,
|
|
887
886
|
label: o.details_original_balance,
|
|
888
887
|
onCancel: d,
|
|
889
888
|
onSave: c,
|
|
890
889
|
primaryText: o.details_original_balance,
|
|
891
|
-
secondaryText:
|
|
892
|
-
zeroStateText:
|
|
890
|
+
secondaryText: k(a.original_balance, "0,0"),
|
|
891
|
+
zeroStateText: a.original_balance ? void 0 : o.add_original_balance,
|
|
893
892
|
children: /* @__PURE__ */ e(
|
|
894
|
-
|
|
893
|
+
ae,
|
|
895
894
|
{
|
|
896
|
-
amount:
|
|
895
|
+
amount: n,
|
|
897
896
|
autoFocus: !0,
|
|
898
897
|
error: p,
|
|
899
898
|
fullWidth: !0,
|
|
900
899
|
minAmount: 0,
|
|
901
|
-
setAmount: (
|
|
902
|
-
sx: { ".MuiTypography-
|
|
900
|
+
setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
|
|
901
|
+
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
903
902
|
}
|
|
904
903
|
)
|
|
905
904
|
}
|
|
906
905
|
);
|
|
907
|
-
}),
|
|
908
|
-
const { onEvent:
|
|
909
|
-
return
|
|
910
|
-
o?.goal && /* @__PURE__ */ s(
|
|
906
|
+
}), ft = () => {
|
|
907
|
+
const { onEvent: a } = F(), { selectedDebtChartData: o } = $();
|
|
908
|
+
return x.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(w, { bgcolor: "background.paper", children: [
|
|
909
|
+
o?.goal && /* @__PURE__ */ s(H, { children: [
|
|
910
|
+
/* @__PURE__ */ e(Ge, { goal: o.goal }),
|
|
911
|
+
/* @__PURE__ */ e(j, {}),
|
|
912
|
+
/* @__PURE__ */ e(je, { goal: o.goal }),
|
|
913
|
+
/* @__PURE__ */ e(j, {}),
|
|
911
914
|
/* @__PURE__ */ e(ze, { goal: o.goal }),
|
|
912
|
-
/* @__PURE__ */ e(
|
|
913
|
-
/* @__PURE__ */ e(Ve, { goal: o.goal }),
|
|
914
|
-
/* @__PURE__ */ e(G, {}),
|
|
915
|
-
/* @__PURE__ */ e(Ye, { goal: o.goal }),
|
|
916
|
-
/* @__PURE__ */ e(G, {})
|
|
915
|
+
/* @__PURE__ */ e(j, {})
|
|
917
916
|
] }),
|
|
918
|
-
!o?.goal && o?.account && /* @__PURE__ */ s(
|
|
919
|
-
/* @__PURE__ */ e(yt, { debt: o }),
|
|
920
|
-
/* @__PURE__ */ e(G, {}),
|
|
917
|
+
!o?.goal && o?.account && /* @__PURE__ */ s(H, { children: [
|
|
921
918
|
/* @__PURE__ */ e(_t, { debt: o }),
|
|
922
|
-
/* @__PURE__ */ e(
|
|
923
|
-
/* @__PURE__ */ e(
|
|
924
|
-
/* @__PURE__ */ e(
|
|
919
|
+
/* @__PURE__ */ e(j, {}),
|
|
920
|
+
/* @__PURE__ */ e(bt, { debt: o }),
|
|
921
|
+
/* @__PURE__ */ e(j, {}),
|
|
922
|
+
/* @__PURE__ */ e(yt, { debt: o }),
|
|
923
|
+
/* @__PURE__ */ e(j, {})
|
|
925
924
|
] })
|
|
926
925
|
] });
|
|
927
|
-
}, gt =
|
|
928
|
-
const { debts: r } =
|
|
929
|
-
return
|
|
930
|
-
t &&
|
|
931
|
-
}, [t]), !t && !
|
|
932
|
-
/* @__PURE__ */ e(
|
|
933
|
-
|
|
926
|
+
}, gt = D(ft), xt = ({ setTabValue: a, sx: o }) => {
|
|
927
|
+
const { debts: r } = S(), { showError: t, showCompleted: n } = $();
|
|
928
|
+
return x.useEffect(() => {
|
|
929
|
+
t && a(1);
|
|
930
|
+
}, [t]), !t && !n ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ s(w, { gap: 16, children: [
|
|
931
|
+
/* @__PURE__ */ e(he, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
|
|
932
|
+
pe,
|
|
934
933
|
{
|
|
935
|
-
icon: t ? /* @__PURE__ */ e(
|
|
934
|
+
icon: t ? /* @__PURE__ */ e(Ve, { filled: !0 }) : /* @__PURE__ */ e(ye, { color: "success", filled: !0 }),
|
|
936
935
|
severity: "error",
|
|
937
936
|
sx: {
|
|
938
937
|
alignItems: "start",
|
|
@@ -945,15 +944,15 @@ const we = ({
|
|
|
945
944
|
}
|
|
946
945
|
},
|
|
947
946
|
children: [
|
|
948
|
-
/* @__PURE__ */ e(
|
|
949
|
-
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "
|
|
947
|
+
/* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: t ? r.status_error_title : r.status_complete_title }),
|
|
948
|
+
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: t ? r.status_error_description : r.status_complete_description })
|
|
950
949
|
]
|
|
951
950
|
}
|
|
952
951
|
) }),
|
|
953
|
-
t && /* @__PURE__ */ e(
|
|
954
|
-
|
|
952
|
+
t && /* @__PURE__ */ e(he, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
|
|
953
|
+
pe,
|
|
955
954
|
{
|
|
956
|
-
icon: /* @__PURE__ */ e(
|
|
955
|
+
icon: /* @__PURE__ */ e(H, {}),
|
|
957
956
|
severity: "error",
|
|
958
957
|
sx: {
|
|
959
958
|
borderRadius: 2,
|
|
@@ -963,66 +962,66 @@ const we = ({
|
|
|
963
962
|
}
|
|
964
963
|
},
|
|
965
964
|
children: [
|
|
966
|
-
/* @__PURE__ */ e(
|
|
967
|
-
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "
|
|
965
|
+
/* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r.status_info_title }),
|
|
966
|
+
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r.status_info_description })
|
|
968
967
|
]
|
|
969
968
|
}
|
|
970
969
|
) })
|
|
971
970
|
] });
|
|
972
|
-
},
|
|
973
|
-
const { debts:
|
|
974
|
-
return /* @__PURE__ */ s(
|
|
975
|
-
(o || r) && /* @__PURE__ */ e(
|
|
971
|
+
}, wt = D(xt), Ct = () => {
|
|
972
|
+
const { debts: a } = S(), { showError: o, showCompleted: r } = $(), [t, n] = x.useState(0);
|
|
973
|
+
return /* @__PURE__ */ s(H, { children: [
|
|
974
|
+
(o || r) && /* @__PURE__ */ e(wt, { setTabValue: n, sx: { mt: -24 } }),
|
|
976
975
|
/* @__PURE__ */ s(
|
|
977
|
-
|
|
976
|
+
We,
|
|
978
977
|
{
|
|
979
|
-
"aria-label":
|
|
978
|
+
"aria-label": a.details_tabs_aria_label,
|
|
980
979
|
centered: !0,
|
|
981
|
-
onChange: (i, p) =>
|
|
980
|
+
onChange: (i, p) => n(p),
|
|
982
981
|
textColor: "primary",
|
|
983
982
|
value: t,
|
|
984
983
|
variant: "fullWidth",
|
|
985
984
|
children: [
|
|
986
985
|
/* @__PURE__ */ e(
|
|
987
|
-
|
|
986
|
+
de,
|
|
988
987
|
{
|
|
989
988
|
"aria-controls": "debt-schedule-tabpanel-0",
|
|
990
989
|
id: "debt-schedule-tab-0",
|
|
991
|
-
label:
|
|
990
|
+
label: a.schedule_tab_label
|
|
992
991
|
}
|
|
993
992
|
),
|
|
994
993
|
/* @__PURE__ */ e(
|
|
995
|
-
|
|
994
|
+
de,
|
|
996
995
|
{
|
|
997
996
|
"aria-controls": "debt-details-tabpanel-1",
|
|
998
997
|
id: "debt-details-tab-1",
|
|
999
|
-
label:
|
|
998
|
+
label: a.details_tab_label
|
|
1000
999
|
}
|
|
1001
1000
|
)
|
|
1002
1001
|
]
|
|
1003
1002
|
}
|
|
1004
1003
|
),
|
|
1005
|
-
/* @__PURE__ */ e(
|
|
1006
|
-
/* @__PURE__ */ e(
|
|
1004
|
+
/* @__PURE__ */ e(ue, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(ut, {}) }),
|
|
1005
|
+
/* @__PURE__ */ e(ue, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(gt, {}) })
|
|
1007
1006
|
] });
|
|
1008
|
-
},
|
|
1009
|
-
const { debts: r } =
|
|
1007
|
+
}, St = D(Ct), vt = ({ isOpen: a, onClose: o }) => {
|
|
1008
|
+
const { debts: r } = S(), { showError: t, showCompleted: n } = $(), i = t || n ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ e(mt, {});
|
|
1010
1009
|
return /* @__PURE__ */ e(
|
|
1011
|
-
|
|
1010
|
+
te,
|
|
1012
1011
|
{
|
|
1013
1012
|
ariaLabelClose: r.details_close_aria,
|
|
1014
|
-
isOpen:
|
|
1013
|
+
isOpen: a,
|
|
1015
1014
|
onClose: o,
|
|
1016
1015
|
title: r.details_title,
|
|
1017
1016
|
children: /* @__PURE__ */ s(w, { bgcolor: "background.default", children: [
|
|
1018
|
-
/* @__PURE__ */ e(
|
|
1019
|
-
/* @__PURE__ */ e(
|
|
1017
|
+
/* @__PURE__ */ e(ke, { customDetailsChart: i }),
|
|
1018
|
+
/* @__PURE__ */ e(St, {})
|
|
1020
1019
|
] })
|
|
1021
1020
|
}
|
|
1022
1021
|
);
|
|
1023
|
-
},
|
|
1024
|
-
const { debts:
|
|
1025
|
-
o && (await r({ ...o, extra_payment:
|
|
1022
|
+
}, Dt = D(() => {
|
|
1023
|
+
const { debts: a } = S(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: r } = V(), { onEvent: t } = F(), [n, i] = x.useState(o?.extra_payment ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
|
|
1024
|
+
o && (await r({ ...o, extra_payment: n }), o.extra_payment = n, t(T.DEBTS_SAVE_PAYDOWN_ACTION, {
|
|
1026
1025
|
user_guid: o?.user_guid
|
|
1027
1026
|
}));
|
|
1028
1027
|
}, d = () => {
|
|
@@ -1031,83 +1030,83 @@ const we = ({
|
|
|
1031
1030
|
}, 250);
|
|
1032
1031
|
};
|
|
1033
1032
|
return /* @__PURE__ */ e(
|
|
1034
|
-
|
|
1033
|
+
J,
|
|
1035
1034
|
{
|
|
1036
1035
|
isSaveDisabled: p,
|
|
1037
|
-
label:
|
|
1036
|
+
label: a.paydown_drawer_extra_payment,
|
|
1038
1037
|
onCancel: d,
|
|
1039
1038
|
onSave: c,
|
|
1040
|
-
primaryText:
|
|
1041
|
-
secondaryText:
|
|
1042
|
-
zeroStateText: o?.extra_payment ? void 0 :
|
|
1039
|
+
primaryText: a.paydown_drawer_extra_payment,
|
|
1040
|
+
secondaryText: k(o?.extra_payment, "0,0"),
|
|
1041
|
+
zeroStateText: o?.extra_payment ? void 0 : a.add_extra_payment,
|
|
1043
1042
|
children: /* @__PURE__ */ e(
|
|
1044
|
-
|
|
1043
|
+
ae,
|
|
1045
1044
|
{
|
|
1046
|
-
amount:
|
|
1045
|
+
amount: n,
|
|
1047
1046
|
autoFocus: !0,
|
|
1048
1047
|
error: p,
|
|
1049
1048
|
fullWidth: !0,
|
|
1050
1049
|
minAmount: 0,
|
|
1051
|
-
setAmount: (
|
|
1052
|
-
sx: { ".MuiTypography-
|
|
1050
|
+
setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
|
|
1051
|
+
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
1053
1052
|
}
|
|
1054
1053
|
)
|
|
1055
1054
|
}
|
|
1056
1055
|
);
|
|
1057
|
-
}),
|
|
1058
|
-
const { debts:
|
|
1056
|
+
}), Tt = () => {
|
|
1057
|
+
const { debts: a } = S(), { totalMonthlyPayments: o } = q(), { monthlyCashFlowProfile: r } = V(), t = o + Number(r?.extra_payment);
|
|
1059
1058
|
return /* @__PURE__ */ s(w, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
1060
1059
|
/* @__PURE__ */ s(w, { p: 24, children: [
|
|
1061
1060
|
/* @__PURE__ */ s(w, { alignItems: "center", gap: 4, mb: 24, children: [
|
|
1062
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1063
|
-
/* @__PURE__ */ e(l, { bold: !0, variant: "
|
|
1064
|
-
/* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "
|
|
1061
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
|
|
1062
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "H1", children: k(o, "0,0") }),
|
|
1063
|
+
/* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
|
|
1065
1064
|
] }),
|
|
1066
1065
|
/* @__PURE__ */ s(w, { children: [
|
|
1067
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1068
|
-
/* @__PURE__ */ e(l, { truncate: !1, variant: "
|
|
1066
|
+
/* @__PURE__ */ e(l, { variant: "H3", children: a.paydown_drawer_subtitle }),
|
|
1067
|
+
/* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
|
|
1069
1068
|
] })
|
|
1070
1069
|
] }),
|
|
1071
|
-
/* @__PURE__ */ e(w, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(
|
|
1070
|
+
/* @__PURE__ */ e(w, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Dt, {}) }),
|
|
1072
1071
|
/* @__PURE__ */ e(w, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(w, { gap: 4, children: [
|
|
1073
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1074
|
-
/* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "
|
|
1072
|
+
/* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
|
|
1073
|
+
/* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: k(t, "0,0") })
|
|
1075
1074
|
] }) })
|
|
1076
1075
|
] });
|
|
1077
|
-
},
|
|
1078
|
-
const { debts: r } =
|
|
1076
|
+
}, At = D(Tt), Et = ({ isOpen: a, onClose: o }) => {
|
|
1077
|
+
const { debts: r } = S();
|
|
1079
1078
|
return /* @__PURE__ */ e(
|
|
1080
|
-
|
|
1079
|
+
te,
|
|
1081
1080
|
{
|
|
1082
1081
|
ariaLabelClose: r.paydown_drawer_close_aria,
|
|
1083
|
-
isOpen:
|
|
1082
|
+
isOpen: a,
|
|
1084
1083
|
onClose: o,
|
|
1085
1084
|
title: r.paydown_drawer_title,
|
|
1086
|
-
children: /* @__PURE__ */ e(
|
|
1085
|
+
children: /* @__PURE__ */ e(At, {})
|
|
1087
1086
|
}
|
|
1088
1087
|
);
|
|
1089
1088
|
};
|
|
1090
|
-
function
|
|
1089
|
+
function It(a, o) {
|
|
1091
1090
|
const r = (t) => {
|
|
1092
1091
|
if (typeof t == "number") return t;
|
|
1093
1092
|
if (t === "!" || t === "✓") return 1 / 0;
|
|
1094
1093
|
throw new Error("Unsupported value");
|
|
1095
1094
|
};
|
|
1096
|
-
return r(
|
|
1095
|
+
return r(a) - r(o);
|
|
1097
1096
|
}
|
|
1098
|
-
function
|
|
1099
|
-
return
|
|
1097
|
+
function Bt(a) {
|
|
1098
|
+
return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
|
|
1100
1099
|
}
|
|
1101
|
-
const
|
|
1100
|
+
const Mt = (a) => {
|
|
1102
1101
|
const o = {
|
|
1103
1102
|
text: "#121417",
|
|
1104
1103
|
background: "#FFB252"
|
|
1105
1104
|
};
|
|
1106
|
-
return
|
|
1107
|
-
},
|
|
1108
|
-
const o = String(
|
|
1105
|
+
return a === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), a === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
|
|
1106
|
+
}, Pt = (a) => {
|
|
1107
|
+
const o = String(a.formattedValue), r = Mt(o);
|
|
1109
1108
|
return /* @__PURE__ */ e(
|
|
1110
|
-
|
|
1109
|
+
re,
|
|
1111
1110
|
{
|
|
1112
1111
|
sx: {
|
|
1113
1112
|
display: "flex",
|
|
@@ -1120,40 +1119,40 @@ const Pt = (n) => {
|
|
|
1120
1119
|
backgroundColor: r.background,
|
|
1121
1120
|
marginLeft: "10px"
|
|
1122
1121
|
},
|
|
1123
|
-
children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "
|
|
1122
|
+
children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "Small", children: o })
|
|
1124
1123
|
}
|
|
1125
1124
|
);
|
|
1126
|
-
},
|
|
1127
|
-
const o =
|
|
1125
|
+
}, kt = (a) => {
|
|
1126
|
+
const o = a.row.account, r = Ke[o.account_type];
|
|
1128
1127
|
return /* @__PURE__ */ s(w, { alignItems: "center", flexDirection: "row", children: [
|
|
1129
1128
|
/* @__PURE__ */ e(
|
|
1130
|
-
|
|
1129
|
+
De,
|
|
1131
1130
|
{
|
|
1132
1131
|
alt: `${o.institutionName}`,
|
|
1133
1132
|
institutionGuid: o.institution_guid || ""
|
|
1134
1133
|
}
|
|
1135
1134
|
),
|
|
1136
1135
|
/* @__PURE__ */ s(w, { ml: 12, children: [
|
|
1137
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1138
|
-
/* @__PURE__ */ e(l, { variant: "
|
|
1136
|
+
/* @__PURE__ */ e(l, { variant: "Small", children: o.name }),
|
|
1137
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: r })
|
|
1139
1138
|
] })
|
|
1140
1139
|
] });
|
|
1141
|
-
},
|
|
1142
|
-
sx:
|
|
1140
|
+
}, Nt = ({
|
|
1141
|
+
sx: a = {},
|
|
1143
1142
|
debts: o,
|
|
1144
1143
|
hoveredDebtGuid: r,
|
|
1145
1144
|
onHoverRow: t,
|
|
1146
|
-
onClickRow:
|
|
1145
|
+
onClickRow: n
|
|
1147
1146
|
}) => {
|
|
1148
|
-
const i =
|
|
1147
|
+
const i = X(), { onEvent: p } = F(), { isMobile: c } = Y(), { debts: d } = S(), [m, b] = x.useState([
|
|
1149
1148
|
{ field: "priority", sort: "asc" }
|
|
1150
|
-
]),
|
|
1149
|
+
]), f = [
|
|
1151
1150
|
{
|
|
1152
1151
|
field: "priority",
|
|
1153
1152
|
headerName: d.table_column_priority,
|
|
1154
|
-
renderHeader:
|
|
1155
|
-
renderCell:
|
|
1156
|
-
sortComparator:
|
|
1153
|
+
renderHeader: z,
|
|
1154
|
+
renderCell: Pt,
|
|
1155
|
+
sortComparator: It,
|
|
1157
1156
|
sortable: !0,
|
|
1158
1157
|
hideSortIcons: !0,
|
|
1159
1158
|
type: "custom",
|
|
@@ -1165,8 +1164,8 @@ const Pt = (n) => {
|
|
|
1165
1164
|
{
|
|
1166
1165
|
field: "account",
|
|
1167
1166
|
headerName: d.table_column_account,
|
|
1168
|
-
renderHeader:
|
|
1169
|
-
renderCell:
|
|
1167
|
+
renderHeader: z,
|
|
1168
|
+
renderCell: kt,
|
|
1170
1169
|
sortable: !1,
|
|
1171
1170
|
type: "custom",
|
|
1172
1171
|
align: "left",
|
|
@@ -1177,8 +1176,8 @@ const Pt = (n) => {
|
|
|
1177
1176
|
{
|
|
1178
1177
|
field: "balance",
|
|
1179
1178
|
headerName: d.table_column_balance,
|
|
1180
|
-
renderHeader:
|
|
1181
|
-
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "
|
|
1179
|
+
renderHeader: z,
|
|
1180
|
+
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: k(y.value, "0,0") }),
|
|
1182
1181
|
sortable: !0,
|
|
1183
1182
|
hideSortIcons: c,
|
|
1184
1183
|
type: "number",
|
|
@@ -1190,8 +1189,8 @@ const Pt = (n) => {
|
|
|
1190
1189
|
{
|
|
1191
1190
|
field: "interest_rate",
|
|
1192
1191
|
headerName: d.table_column_interest_rate,
|
|
1193
|
-
renderHeader:
|
|
1194
|
-
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "
|
|
1192
|
+
renderHeader: z,
|
|
1193
|
+
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
|
|
1195
1194
|
sortable: !0,
|
|
1196
1195
|
hideSortIcons: c,
|
|
1197
1196
|
type: "number",
|
|
@@ -1203,8 +1202,8 @@ const Pt = (n) => {
|
|
|
1203
1202
|
{
|
|
1204
1203
|
field: "projected_payoff_date",
|
|
1205
1204
|
headerName: d.table_column_payoff_date,
|
|
1206
|
-
renderHeader:
|
|
1207
|
-
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "
|
|
1205
|
+
renderHeader: z,
|
|
1206
|
+
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: y.value ? K(y.value, U.MONTH_SHORT_YEAR) : "---" }),
|
|
1208
1207
|
sortable: !0,
|
|
1209
1208
|
hideSortIcons: c,
|
|
1210
1209
|
type: "number",
|
|
@@ -1216,8 +1215,8 @@ const Pt = (n) => {
|
|
|
1216
1215
|
{
|
|
1217
1216
|
field: "monthly_payment",
|
|
1218
1217
|
headerName: d.table_column_amount_due,
|
|
1219
|
-
renderHeader:
|
|
1220
|
-
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "
|
|
1218
|
+
renderHeader: z,
|
|
1219
|
+
renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: typeof y.value == "number" ? k(y.value, "0,0") : "---" }),
|
|
1221
1220
|
sortable: !0,
|
|
1222
1221
|
hideSortIcons: c,
|
|
1223
1222
|
type: "number",
|
|
@@ -1227,12 +1226,12 @@ const Pt = (n) => {
|
|
|
1227
1226
|
flex: 0.6
|
|
1228
1227
|
}
|
|
1229
1228
|
], u = [
|
|
1230
|
-
...
|
|
1229
|
+
...f.slice(0, 3),
|
|
1231
1230
|
{
|
|
1232
1231
|
field: "chevron",
|
|
1233
1232
|
headerName: "",
|
|
1234
1233
|
renderHeader: void 0,
|
|
1235
|
-
renderCell: () => /* @__PURE__ */ e(
|
|
1234
|
+
renderCell: () => /* @__PURE__ */ e(ee, { name: "chevron_right'" }),
|
|
1236
1235
|
sortable: !0,
|
|
1237
1236
|
hideSortIcons: !0,
|
|
1238
1237
|
type: "custom",
|
|
@@ -1240,20 +1239,20 @@ const Pt = (n) => {
|
|
|
1240
1239
|
headerAlign: "right",
|
|
1241
1240
|
width: 20
|
|
1242
1241
|
}
|
|
1243
|
-
],
|
|
1242
|
+
], v = x.useMemo(() => o.map((y, N) => ({
|
|
1244
1243
|
...y,
|
|
1245
|
-
id:
|
|
1246
|
-
priority:
|
|
1244
|
+
id: N,
|
|
1245
|
+
priority: Bt(y)
|
|
1247
1246
|
})), [o]), M = (y) => {
|
|
1248
|
-
const
|
|
1249
|
-
t?.(
|
|
1250
|
-
},
|
|
1247
|
+
const g = y.target.closest("[data-id]")?.getAttribute("data-id"), A = o[Number(g)];
|
|
1248
|
+
t?.(A?.guid ?? "");
|
|
1249
|
+
}, I = (y) => {
|
|
1251
1250
|
c || M(y);
|
|
1252
1251
|
}, C = (y) => {
|
|
1253
1252
|
c && M(y);
|
|
1254
|
-
},
|
|
1253
|
+
}, B = (y) => v.find((N) => N.guid === y)?.id;
|
|
1255
1254
|
return /* @__PURE__ */ e(
|
|
1256
|
-
|
|
1255
|
+
re,
|
|
1257
1256
|
{
|
|
1258
1257
|
sx: {
|
|
1259
1258
|
height: "100dvh",
|
|
@@ -1261,36 +1260,36 @@ const Pt = (n) => {
|
|
|
1261
1260
|
mt: "15px",
|
|
1262
1261
|
overflowX: "auto",
|
|
1263
1262
|
boxShadow: "none",
|
|
1264
|
-
...
|
|
1263
|
+
...a
|
|
1265
1264
|
},
|
|
1266
1265
|
children: /* @__PURE__ */ e(
|
|
1267
|
-
|
|
1266
|
+
Ye,
|
|
1268
1267
|
{
|
|
1269
|
-
columns: c ? u :
|
|
1268
|
+
columns: c ? u : f,
|
|
1270
1269
|
disableColumnFilter: !0,
|
|
1271
1270
|
disableColumnMenu: !0,
|
|
1272
1271
|
hideFooter: !0,
|
|
1273
|
-
initialState: { sorting: { sortModel:
|
|
1272
|
+
initialState: { sorting: { sortModel: m } },
|
|
1274
1273
|
onRowClick: (y) => {
|
|
1275
|
-
|
|
1274
|
+
n(), p(T.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
|
|
1276
1275
|
},
|
|
1277
1276
|
onSortModelChange: (y) => {
|
|
1278
|
-
|
|
1277
|
+
b(y), p(T.DEBTS_CLICK_TABLE_SORT);
|
|
1279
1278
|
},
|
|
1280
|
-
rows:
|
|
1279
|
+
rows: v,
|
|
1281
1280
|
slotProps: {
|
|
1282
1281
|
baseIconButton: { color: "secondary", sx: { ml: 8 } },
|
|
1283
1282
|
row: {
|
|
1284
|
-
onMouseEnter:
|
|
1283
|
+
onMouseEnter: I,
|
|
1285
1284
|
onMouseLeave: () => !c && t?.(""),
|
|
1286
1285
|
onTouchStart: C,
|
|
1287
1286
|
onClick: c ? C : void 0
|
|
1288
1287
|
}
|
|
1289
1288
|
},
|
|
1290
|
-
sortModel:
|
|
1289
|
+
sortModel: m,
|
|
1291
1290
|
sortingOrder: ["asc", "desc"],
|
|
1292
1291
|
sx: {
|
|
1293
|
-
[`& .MuiDataGrid-row[data-id="${
|
|
1292
|
+
[`& .MuiDataGrid-row[data-id="${B(r)}"]`]: {
|
|
1294
1293
|
backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
|
|
1295
1294
|
filter: "brightness(98%)"
|
|
1296
1295
|
}
|
|
@@ -1299,33 +1298,33 @@ const Pt = (n) => {
|
|
|
1299
1298
|
)
|
|
1300
1299
|
}
|
|
1301
1300
|
);
|
|
1302
|
-
},
|
|
1303
|
-
const { isDesktop: t, isTablet:
|
|
1304
|
-
return t ||
|
|
1305
|
-
|
|
1301
|
+
}, Ft = ({ buttonText: a, isOpen: o, onClick: r }) => {
|
|
1302
|
+
const { isDesktop: t, isTablet: n } = Y(), i = o ? "unfold_less" : "unfold_more";
|
|
1303
|
+
return t || n ? /* @__PURE__ */ e(
|
|
1304
|
+
fe,
|
|
1306
1305
|
{
|
|
1307
1306
|
"aria-controls": "prioritize-debts",
|
|
1308
1307
|
"aria-describedby": "prioritize-debts",
|
|
1309
1308
|
"aria-haspopup": !0,
|
|
1310
1309
|
"aria-label": "prioritize-debts",
|
|
1311
1310
|
onClick: r,
|
|
1312
|
-
startIcon: /* @__PURE__ */ e(
|
|
1311
|
+
startIcon: /* @__PURE__ */ e(ee, { name: i }),
|
|
1313
1312
|
sx: { justifyContent: "start", minWidth: 214, mx: 4 },
|
|
1314
|
-
children:
|
|
1313
|
+
children: a
|
|
1315
1314
|
}
|
|
1316
1315
|
) : /* @__PURE__ */ e(
|
|
1317
|
-
|
|
1316
|
+
Ue,
|
|
1318
1317
|
{
|
|
1319
1318
|
"aria-controls": "prioritize-debts",
|
|
1320
1319
|
"aria-describedby": "prioritize-debts",
|
|
1321
1320
|
"aria-haspopup": !0,
|
|
1322
1321
|
"aria-label": "prioritize-debts",
|
|
1323
1322
|
onClick: r,
|
|
1324
|
-
children: /* @__PURE__ */ e(
|
|
1323
|
+
children: /* @__PURE__ */ e(ee, { name: i })
|
|
1325
1324
|
}
|
|
1326
1325
|
);
|
|
1327
|
-
},
|
|
1328
|
-
const { onEvent: r } =
|
|
1326
|
+
}, Rt = D(({ buttonEl: a, onClose: o }) => {
|
|
1327
|
+
const { onEvent: r } = F(), { debts: t } = S(), { selectedDebtPriority: n, setSelectedDebtPriority: i } = $(), p = !!a, c = [
|
|
1329
1328
|
{
|
|
1330
1329
|
priority: P.FASTEST_PAYOFF_FIRST,
|
|
1331
1330
|
text: t.priority_sort_fastest_payoff
|
|
@@ -1342,13 +1341,13 @@ const Pt = (n) => {
|
|
|
1342
1341
|
priority: P.HIGHEST_BALANCE,
|
|
1343
1342
|
text: t.priority_sort_highest_balance
|
|
1344
1343
|
}
|
|
1345
|
-
], d = (
|
|
1346
|
-
i(
|
|
1344
|
+
], d = (m) => {
|
|
1345
|
+
i(m), r(T.DEBTS_CLICK_PRIORITY, { debts_priority: m });
|
|
1347
1346
|
};
|
|
1348
1347
|
return /* @__PURE__ */ e(
|
|
1349
|
-
|
|
1348
|
+
Ze,
|
|
1350
1349
|
{
|
|
1351
|
-
anchorEl:
|
|
1350
|
+
anchorEl: a,
|
|
1352
1351
|
anchorOrigin: {
|
|
1353
1352
|
vertical: "bottom",
|
|
1354
1353
|
horizontal: "left"
|
|
@@ -1360,13 +1359,13 @@ const Pt = (n) => {
|
|
|
1360
1359
|
vertical: "top",
|
|
1361
1360
|
horizontal: "left"
|
|
1362
1361
|
},
|
|
1363
|
-
children: /* @__PURE__ */ e(
|
|
1364
|
-
|
|
1362
|
+
children: /* @__PURE__ */ e(_e, { children: c.map(({ priority: m, text: b }) => /* @__PURE__ */ s(
|
|
1363
|
+
qe,
|
|
1365
1364
|
{
|
|
1366
|
-
onClick: () => d(
|
|
1365
|
+
onClick: () => d(m),
|
|
1367
1366
|
sx: {
|
|
1368
|
-
bgcolor:
|
|
1369
|
-
color:
|
|
1367
|
+
bgcolor: n === m ? "primary.main" : void 0,
|
|
1368
|
+
color: n === m ? "#fff" : void 0,
|
|
1370
1369
|
justifyContent: "space-between",
|
|
1371
1370
|
minHeight: 44,
|
|
1372
1371
|
minWidth: 268,
|
|
@@ -1379,173 +1378,176 @@ const Pt = (n) => {
|
|
|
1379
1378
|
}
|
|
1380
1379
|
},
|
|
1381
1380
|
children: [
|
|
1382
|
-
/* @__PURE__ */ e(l, { color: "inherit", variant: "
|
|
1383
|
-
|
|
1381
|
+
/* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: b }),
|
|
1382
|
+
n === m && /* @__PURE__ */ e(ye, { color: "inherit", filled: !0, fontSize: "small" })
|
|
1384
1383
|
]
|
|
1385
1384
|
},
|
|
1386
|
-
|
|
1385
|
+
m
|
|
1387
1386
|
)) })
|
|
1388
1387
|
}
|
|
1389
1388
|
);
|
|
1390
|
-
}),
|
|
1391
|
-
const { onEvent:
|
|
1392
|
-
|
|
1389
|
+
}), Lt = D(() => {
|
|
1390
|
+
const { onEvent: a } = F(), { debts: o } = S(), { selectedDebtPriority: r } = $(), [t, n] = x.useState(null), i = (m) => {
|
|
1391
|
+
n(m.currentTarget), a(T.DEBTS_CLICK_PRIORITIZE);
|
|
1393
1392
|
}, p = () => {
|
|
1394
|
-
|
|
1395
|
-
}, c = !!t, d =
|
|
1393
|
+
n(null);
|
|
1394
|
+
}, c = !!t, d = x.useMemo(() => ({
|
|
1396
1395
|
[P.FASTEST_PAYOFF_FIRST]: o.priority_sort_fastest_payoff,
|
|
1397
1396
|
[P.HIGHEST_INTEREST]: o.priority_sort_highest_interest,
|
|
1398
1397
|
[P.HIGHEST_BALANCE]: o.priority_sort_highest_balance,
|
|
1399
1398
|
[P.LOWEST_BALANCE]: o.priority_sort_lowest_balance
|
|
1400
1399
|
})[r] ?? o.priority_sort_lowest_balance, [r]);
|
|
1401
1400
|
return /* @__PURE__ */ s(_, { children: [
|
|
1402
|
-
/* @__PURE__ */ e(
|
|
1403
|
-
/* @__PURE__ */ e(
|
|
1401
|
+
/* @__PURE__ */ e(Ft, { buttonText: d, isOpen: c, onClick: i }),
|
|
1402
|
+
/* @__PURE__ */ e(Rt, { buttonEl: t, onClose: p })
|
|
1404
1403
|
] });
|
|
1405
|
-
}),
|
|
1406
|
-
const t =
|
|
1404
|
+
}), $t = (a, o, r = 0) => {
|
|
1405
|
+
const t = a.map((d) => ({ ...d }));
|
|
1407
1406
|
ge(t, o);
|
|
1408
|
-
const
|
|
1407
|
+
const n = /* @__PURE__ */ new Date(), i = [];
|
|
1409
1408
|
let p = 0, c = 1;
|
|
1410
1409
|
for (const d of t)
|
|
1411
1410
|
i.push({
|
|
1412
1411
|
...d,
|
|
1413
1412
|
// Start with the initial balance
|
|
1414
|
-
dataset: [{ x: new Date(
|
|
1413
|
+
dataset: [{ x: new Date(n), y: d.balance }]
|
|
1415
1414
|
});
|
|
1416
1415
|
for (; t.some((d) => d.balance >= 0.01 && !d.is_impossible); ) {
|
|
1417
|
-
let d = !1,
|
|
1418
|
-
for (const [
|
|
1416
|
+
let d = !1, m = !1, b = !1;
|
|
1417
|
+
for (const [f, u] of t.entries()) {
|
|
1419
1418
|
if (u.balance <= 0.01) continue;
|
|
1420
|
-
const
|
|
1421
|
-
let y =
|
|
1422
|
-
!
|
|
1423
|
-
const
|
|
1424
|
-
if (
|
|
1425
|
-
u.is_impossible = !0, i[
|
|
1419
|
+
const v = i[f].dataset, I = (u.interest_rate ?? 0) / 100 / 12, C = u.balance * I, B = u.monthly_payment ?? 0;
|
|
1420
|
+
let y = B, N = 0;
|
|
1421
|
+
!b && r > 0 && (y += r, b = !0), !m && p > 0 && (N = p, m = !0), u.balance += C;
|
|
1422
|
+
const h = Math.min(u.balance, y + N);
|
|
1423
|
+
if (h <= C) {
|
|
1424
|
+
u.is_impossible = !0, i[f].is_impossible = !0, i[f].priority = void 0, v.push({ x: new Date(n), y: u.balance });
|
|
1426
1425
|
continue;
|
|
1427
1426
|
}
|
|
1428
|
-
u.balance -=
|
|
1429
|
-
x: new Date(
|
|
1427
|
+
u.balance -= h, u.balance = u.balance < 0.01 ? 0 : u.balance, v.push({
|
|
1428
|
+
x: new Date(n),
|
|
1430
1429
|
y: Math.max(0, u.balance),
|
|
1431
|
-
payment:
|
|
1432
|
-
extra:
|
|
1433
|
-
}), u.balance <= 0 && (p +=
|
|
1430
|
+
payment: h,
|
|
1431
|
+
extra: N
|
|
1432
|
+
}), u.balance <= 0 && (p += B, i[f].projected_payoff_date = new Date(n)), h > 0 && (d = !0);
|
|
1434
1433
|
}
|
|
1435
|
-
d &&
|
|
1434
|
+
d && n.setMonth(n.getMonth() + 1);
|
|
1436
1435
|
}
|
|
1437
1436
|
return i.forEach((d) => {
|
|
1438
1437
|
(d.interest_rate === void 0 || d.monthly_payment === void 0) && (d.projected_payoff_date = void 0);
|
|
1439
1438
|
}), i.forEach((d) => {
|
|
1440
1439
|
d.priority = !d.is_paid_off && !d.is_impossible ? c++ : void 0;
|
|
1441
1440
|
}), i;
|
|
1442
|
-
}, Ht =
|
|
1443
|
-
const { debts: o } =
|
|
1441
|
+
}, Ht = D(({ onClick: a }) => {
|
|
1442
|
+
const { debts: o } = S(), { isDesktop: r } = Y(), { totalMonthlyPayments: t } = q(), { monthlyCashFlowProfile: n } = V(), i = t + Number(n?.extra_payment), p = r ? o.paydown_button_long : o.paydown_button_short;
|
|
1444
1443
|
return /* @__PURE__ */ e(
|
|
1445
|
-
|
|
1444
|
+
fe,
|
|
1446
1445
|
{
|
|
1447
1446
|
"aria-controls": "extra-paydown",
|
|
1448
1447
|
"aria-describedby": "extra-paydown",
|
|
1449
1448
|
"aria-haspopup": !0,
|
|
1450
1449
|
"aria-label": "extra-paydown",
|
|
1451
|
-
onClick:
|
|
1450
|
+
onClick: a,
|
|
1452
1451
|
sx: { justifyContent: "start", minWidth: 100, mx: 4 },
|
|
1453
|
-
children:
|
|
1452
|
+
children: E(p, k(i, "0,0"))
|
|
1454
1453
|
}
|
|
1455
1454
|
);
|
|
1456
|
-
}),
|
|
1457
|
-
const [r, t] =
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
}, [
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1455
|
+
}), Ot = ({ onBackClick: a, sx: o }) => {
|
|
1456
|
+
const [r, t] = x.useState(!1), [n, i] = x.useState(!1), [p, c] = x.useState(!1), [d, m] = x.useState(""), { isDesktop: b, isMobile: f } = Y(), { debts: u } = S(), { onEvent: v } = F(), { isCopyLoaded: M, isInitialized: I, setSelectedAccounts: C } = Pe(), { setSelectedAccount: B } = Ne(), { selectedDebtPriority: y, setSelectedDebtChartData: N } = $(), { visibleDebtAccounts: h } = Z(), { goalsLoaded: g, loadGoals: A, monthlyCashFlowProfile: R } = V(), { debts: L } = q();
|
|
1457
|
+
Je({
|
|
1458
|
+
widgetName: "DebtsWidget",
|
|
1459
|
+
isLoaded: g
|
|
1460
|
+
});
|
|
1461
|
+
const O = x.useMemo(() => {
|
|
1462
|
+
const W = R?.extra_payment ?? 0;
|
|
1463
|
+
return $t(L, y, W);
|
|
1464
|
+
}, [L, y, R]);
|
|
1465
|
+
x.useEffect(() => {
|
|
1466
|
+
C(h), v(T.DEBTS_VIEW);
|
|
1467
|
+
}, []), x.useEffect(() => {
|
|
1468
|
+
C(h);
|
|
1469
|
+
}, [h]), x.useEffect(() => {
|
|
1470
|
+
I && A().finally();
|
|
1471
|
+
}, [I]);
|
|
1472
|
+
const oe = (W) => m(W), ne = () => {
|
|
1473
|
+
const W = h.find((Q) => Q.guid === d), ie = O.find((Q) => Q.guid === d);
|
|
1474
|
+
W && B(W), ie && N(ie), t(!0);
|
|
1475
|
+
}, we = () => v(T.DEBTS_CLICK_FILTER), Ce = () => {
|
|
1476
|
+
c(!0), v(T.DEBTS_CLICK_SNOWBALL_CTA);
|
|
1477
|
+
}, Se = () => {
|
|
1478
|
+
i(!0), v(T.DEBTS_CLICK_PAYDOWN);
|
|
1477
1479
|
};
|
|
1478
|
-
return !
|
|
1479
|
-
|
|
1480
|
+
return !g || !M || !I ? /* @__PURE__ */ e(Qe, {}) : /* @__PURE__ */ s(
|
|
1481
|
+
Oe,
|
|
1480
1482
|
{
|
|
1481
|
-
accountOptions:
|
|
1483
|
+
accountOptions: h,
|
|
1482
1484
|
actions: [
|
|
1483
|
-
/* @__PURE__ */ e(
|
|
1484
|
-
/* @__PURE__ */ e(Ht, { onClick:
|
|
1485
|
+
/* @__PURE__ */ e(Lt, {}, "prioritize-debts"),
|
|
1486
|
+
/* @__PURE__ */ e(Ht, { onClick: Se }, "extra-paydown")
|
|
1485
1487
|
],
|
|
1486
|
-
onAccountsFilterClick:
|
|
1487
|
-
onBackClick:
|
|
1488
|
+
onAccountsFilterClick: we,
|
|
1489
|
+
onBackClick: a,
|
|
1488
1490
|
sx: o,
|
|
1489
1491
|
title: u.title,
|
|
1490
1492
|
children: [
|
|
1491
|
-
/* @__PURE__ */ s(w, { sx: { px:
|
|
1493
|
+
/* @__PURE__ */ s(w, { sx: { px: b ? "48px" : "24px" }, children: [
|
|
1492
1494
|
/* @__PURE__ */ s(
|
|
1493
1495
|
w,
|
|
1494
1496
|
{
|
|
1495
1497
|
sx: {
|
|
1496
|
-
alignItems:
|
|
1497
|
-
flexDirection:
|
|
1498
|
-
mx:
|
|
1498
|
+
alignItems: f ? "flex-start" : "flex-end",
|
|
1499
|
+
flexDirection: f ? "column" : "row",
|
|
1500
|
+
mx: f ? "-12px" : 0
|
|
1499
1501
|
},
|
|
1500
1502
|
children: [
|
|
1501
1503
|
/* @__PURE__ */ e(
|
|
1502
|
-
|
|
1504
|
+
xe,
|
|
1503
1505
|
{
|
|
1504
|
-
debts:
|
|
1505
|
-
height:
|
|
1506
|
+
debts: O,
|
|
1507
|
+
height: f ? 250 : void 0,
|
|
1506
1508
|
hoveredDebtGuid: d,
|
|
1507
|
-
onClickArea:
|
|
1508
|
-
onHoverArea:
|
|
1509
|
-
sx: { mr:
|
|
1509
|
+
onClickArea: ne,
|
|
1510
|
+
onHoverArea: oe,
|
|
1511
|
+
sx: { mr: f ? "4px" : "-48px" }
|
|
1510
1512
|
}
|
|
1511
1513
|
),
|
|
1512
1514
|
/* @__PURE__ */ e(
|
|
1513
|
-
|
|
1515
|
+
it,
|
|
1514
1516
|
{
|
|
1515
|
-
debts:
|
|
1516
|
-
onClickCta:
|
|
1517
|
-
sx: { mb:
|
|
1517
|
+
debts: O,
|
|
1518
|
+
onClickCta: Ce,
|
|
1519
|
+
sx: { mb: f ? "0px" : "64px" }
|
|
1518
1520
|
}
|
|
1519
1521
|
)
|
|
1520
1522
|
]
|
|
1521
1523
|
}
|
|
1522
1524
|
),
|
|
1523
|
-
/* @__PURE__ */ e(w, { sx: { mx:
|
|
1524
|
-
|
|
1525
|
+
/* @__PURE__ */ e(w, { sx: { mx: f ? "-24px" : 0 }, children: /* @__PURE__ */ e(
|
|
1526
|
+
Nt,
|
|
1525
1527
|
{
|
|
1526
|
-
debts:
|
|
1528
|
+
debts: O,
|
|
1527
1529
|
hoveredDebtGuid: d,
|
|
1528
|
-
onClickRow:
|
|
1529
|
-
onHoverRow:
|
|
1530
|
+
onClickRow: ne,
|
|
1531
|
+
onHoverRow: oe
|
|
1530
1532
|
}
|
|
1531
1533
|
) })
|
|
1532
1534
|
] }),
|
|
1533
1535
|
/* @__PURE__ */ e(
|
|
1534
|
-
|
|
1536
|
+
st,
|
|
1535
1537
|
{
|
|
1536
1538
|
isOpen: p,
|
|
1537
1539
|
onClose: () => c(!1)
|
|
1538
1540
|
}
|
|
1539
1541
|
),
|
|
1540
|
-
/* @__PURE__ */ e(
|
|
1541
|
-
/* @__PURE__ */ e(
|
|
1542
|
+
/* @__PURE__ */ e(vt, { isOpen: r, onClose: () => t(!1) }),
|
|
1543
|
+
/* @__PURE__ */ e(Et, { isOpen: n, onClose: () => i(!1) })
|
|
1542
1544
|
]
|
|
1543
1545
|
}
|
|
1544
1546
|
);
|
|
1545
|
-
},
|
|
1547
|
+
}, Nr = D(Ot);
|
|
1546
1548
|
export {
|
|
1547
|
-
|
|
1549
|
+
xe as DebtsChart,
|
|
1548
1550
|
Lr as DebtsStore,
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
+
Nt as DebtsTable,
|
|
1552
|
+
Nr as DebtsWidget
|
|
1551
1553
|
};
|