@mx-cartographer/experiences 9.1.0-alpha.bb1 → 9.1.0
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 +75 -0
- package/README.md +10 -10
- package/dist/Account-DR7Plrqy.mjs +119 -0
- package/dist/Account-DR7Plrqy.mjs.map +1 -0
- package/dist/AccountDetailsDrawer-CZPeLsCq.mjs +922 -0
- package/dist/AccountDetailsDrawer-CZPeLsCq.mjs.map +1 -0
- package/dist/AccountDetailsHeader-BvbCUQSS.mjs +231 -0
- package/dist/AccountDetailsHeader-BvbCUQSS.mjs.map +1 -0
- package/dist/AccountUtils-B8ZzWI-d.mjs +28 -0
- package/dist/AccountUtils-B8ZzWI-d.mjs.map +1 -0
- package/dist/Analytics-CkYXKvco.mjs +54 -0
- package/dist/Analytics-CkYXKvco.mjs.map +1 -0
- package/dist/Analytics-WeZYytR0.mjs +140 -0
- package/dist/Analytics-WeZYytR0.mjs.map +1 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +50 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs +27 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs.map +1 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +75 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs.map +1 -0
- package/dist/Category-DEKZGLYe.mjs +302 -0
- package/dist/Category-DEKZGLYe.mjs.map +1 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs +431 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs.map +1 -0
- package/dist/Connect-BH0Pt6zc.mjs +43 -0
- package/dist/Connect-BH0Pt6zc.mjs.map +1 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs +55 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs.map +1 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs +58 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs.map +1 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs +54 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs.map +1 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs +374 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs.map +1 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs +88 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs.map +1 -0
- package/dist/CurrencyText-CCbE6MmF.mjs +21 -0
- package/dist/CurrencyText-CCbE6MmF.mjs.map +1 -0
- package/dist/DateFormats-HudZ3Bjs.mjs +65 -0
- package/dist/DateFormats-HudZ3Bjs.mjs.map +1 -0
- package/dist/DateUtil-CzBmbjmA.mjs +75 -0
- package/dist/DateUtil-CzBmbjmA.mjs.map +1 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs +154 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs.map +1 -0
- package/dist/Dialog-Bvd2n8hz.mjs +67 -0
- package/dist/Dialog-Bvd2n8hz.mjs.map +1 -0
- package/dist/Donut-SzzfZDHF.mjs +89 -0
- package/dist/Donut-SzzfZDHF.mjs.map +1 -0
- package/dist/Drawer-DsnW2o0v.mjs +175 -0
- package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs +859 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs.map +1 -0
- package/dist/EmptyState-CJUDc3kD.mjs +85 -0
- package/dist/EmptyState-CJUDc3kD.mjs.map +1 -0
- package/dist/Error-Dtw6yxkf.mjs +85 -0
- package/dist/Error-Dtw6yxkf.mjs.map +1 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +24 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +1 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs +25 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs.map +1 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +230 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +1 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +129 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +1 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +108 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs.map +1 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +7 -0
- package/dist/HeaderCell-P8w6CmfO.mjs.map +1 -0
- package/dist/Help-CkQTjORd.mjs +300 -0
- package/dist/Help-CkQTjORd.mjs.map +1 -0
- package/dist/Help-aERwhajy.mjs +3210 -0
- package/dist/Help-aERwhajy.mjs.map +1 -0
- package/dist/IconBacking-DgT8DCeh.mjs +40 -0
- package/dist/IconBacking-DgT8DCeh.mjs.map +1 -0
- package/dist/InformationTooltip-4su8bn1e.mjs +42 -0
- package/dist/InformationTooltip-4su8bn1e.mjs.map +1 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs +135 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs.map +1 -0
- package/dist/LineChart-CUfiH86G.mjs +613 -0
- package/dist/LineChart-CUfiH86G.mjs.map +1 -0
- package/dist/ListItemAction-BqUCLj_w.mjs +70 -0
- package/dist/ListItemAction-BqUCLj_w.mjs.map +1 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs +68 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs.map +1 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs +44 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs.map +1 -0
- package/dist/Loader-CxeBwuPG.mjs +22 -0
- package/dist/Loader-CxeBwuPG.mjs.map +1 -0
- package/dist/Localization-DnoVyBNK.mjs +39 -0
- package/dist/Localization-DnoVyBNK.mjs.map +1 -0
- package/dist/ManageIncome-Dcsnnz86.mjs +906 -0
- package/dist/ManageIncome-Dcsnnz86.mjs.map +1 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs +46 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs.map +1 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs +67 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs.map +1 -0
- package/dist/NetWorthUtils-DfSH3z70.mjs +96 -0
- package/dist/NetWorthUtils-DfSH3z70.mjs.map +1 -0
- package/dist/Notification-DTNYSd8P.mjs +8 -0
- package/dist/Notification-DTNYSd8P.mjs.map +1 -0
- package/dist/NotificationSettings-CW7okUrk.mjs +678 -0
- package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
- package/dist/NotificationUtils-BRGFTePr.mjs +24 -0
- package/dist/NotificationUtils-BRGFTePr.mjs.map +1 -0
- package/dist/NumberFormatting--XMeeBfr.mjs +50 -0
- package/dist/NumberFormatting--XMeeBfr.mjs.map +1 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs +115 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs.map +1 -0
- package/dist/RecurringSettings-D8hBbXV_.mjs +89 -0
- package/dist/RecurringSettings-D8hBbXV_.mjs.map +1 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs +299 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs.map +1 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +46 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs.map +1 -0
- package/dist/SearchBox-Cpgu_gdO.mjs +51 -0
- package/dist/SearchBox-Cpgu_gdO.mjs.map +1 -0
- package/dist/Select-CSpkK5cR.mjs +62 -0
- package/dist/Select-CSpkK5cR.mjs.map +1 -0
- package/dist/SelectionBox-B4xELRgp.mjs +49 -0
- package/dist/SelectionBox-B4xELRgp.mjs.map +1 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +70 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs.map +1 -0
- package/dist/Sizes-DISGrlUg.mjs +7 -0
- package/dist/Sizes-DISGrlUg.mjs.map +1 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs +39 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs.map +1 -0
- package/dist/SpendingData-Fii_xATx.mjs +54 -0
- package/dist/SpendingData-Fii_xATx.mjs.map +1 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs +204 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs.map +1 -0
- package/dist/StatusBar-CPfSXe80.mjs +31 -0
- package/dist/StatusBar-CPfSXe80.mjs.map +1 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs +49 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs.map +1 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs +92 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs.map +1 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs +1708 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs.map +1 -0
- package/dist/TransactionUtils-BphBJBbU.mjs +235 -0
- package/dist/TransactionUtils-BphBJBbU.mjs.map +1 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +70 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs.map +1 -0
- package/dist/UserStore-C1fdL3Iu.mjs +3054 -0
- package/dist/UserStore-C1fdL3Iu.mjs.map +1 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs +1280 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs.map +1 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs +483 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs.map +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.d.ts +6 -0
- package/dist/accounts/index.d.ts +1 -0
- package/dist/accounts/index.es.js +784 -12
- package/dist/accounts/index.es.js.map +1 -0
- package/dist/analytics/index.es.js +140 -155
- package/dist/analytics/index.es.js.map +1 -0
- package/dist/budgets/index.es.js +1267 -1317
- package/dist/budgets/index.es.js.map +1 -0
- package/dist/cashflow/index.es.js +943 -1047
- package/dist/cashflow/index.es.js.map +1 -0
- package/dist/categories/index.es.js +5 -4
- package/dist/categories/index.es.js.map +1 -0
- package/dist/common/components/DataRow.d.ts +1 -0
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/constants/Analytics.d.ts +3 -0
- package/dist/common/index.es.js +310 -101
- package/dist/common/index.es.js.map +1 -0
- package/dist/core/index.es.js +105 -80
- package/dist/core/index.es.js.map +1 -0
- package/dist/core/stores/RecurringTransactionsStore.d.ts +29 -1
- package/dist/core/stores/TransactionStore.d.ts +1 -0
- package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
- package/dist/core/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/core/utils/DateUtil.d.ts +2 -0
- package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
- package/dist/dashboard/index.es.js +142 -185
- package/dist/dashboard/index.es.js.map +1 -0
- package/dist/debts/index.es.js +1273 -1384
- package/dist/debts/index.es.js.map +1 -0
- package/dist/finstrong/index.es.js +3473 -3367
- package/dist/finstrong/index.es.js.map +1 -0
- package/dist/goals/index.es.js +984 -1103
- package/dist/goals/index.es.js.map +1 -0
- package/dist/help/index.es.js +26 -3
- package/dist/help/index.es.js.map +1 -0
- package/dist/hooks-97sNJ_lf.mjs +78 -0
- package/dist/hooks-97sNJ_lf.mjs.map +1 -0
- package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +4 -1
- package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +4 -2
- package/dist/insights/index.es.js +4871 -93
- package/dist/insights/index.es.js.map +1 -0
- package/dist/investments/index.es.js +1523 -1533
- package/dist/investments/index.es.js.map +1 -0
- package/dist/merchants/index.es.js +65 -75
- package/dist/merchants/index.es.js.map +1 -0
- package/dist/microinsights/index.es.js +826 -15
- package/dist/microinsights/index.es.js.map +1 -0
- package/dist/networth/index.es.js +504 -550
- package/dist/networth/index.es.js.map +1 -0
- package/dist/notifications/index.es.js +162 -169
- package/dist/notifications/index.es.js.map +1 -0
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
- package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +8 -0
- package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
- package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/index.es.js +1012 -10
- package/dist/recurringtransactions/index.es.js.map +1 -0
- package/dist/settings/index.es.js +892 -13
- package/dist/settings/index.es.js.map +1 -0
- package/dist/spending/index.es.js +457 -400
- package/dist/spending/index.es.js.map +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +604 -10
- package/dist/transactions/index.es.js.map +1 -0
- package/dist/trends/index.es.js +1408 -1268
- package/dist/trends/index.es.js.map +1 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs +24 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
- package/dist/useAriaLive-MkYebyUR.mjs +36 -0
- package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
- package/dist/useDimensions-CeDR9V8N.mjs +37 -0
- package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +12 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
- package/dist/useScreenSize-mWpmnh5w.mjs +37 -0
- package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +20 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
- package/package.json +30 -30
- package/dist/Analytics-BKzTPees.mjs +0 -61
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +0 -487
- package/dist/HeaderCell-EhCUSjvj.mjs +0 -10
- package/dist/Loader-BlVzRtUd.mjs +0 -73
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +0 -110
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +0 -110
- package/dist/SpendingLegend-D15ixlQ1.mjs +0 -222
- package/dist/accounts-DkyAiLpg.mjs +0 -15632
- package/dist/core-BexP5oiV.mjs +0 -4047
- package/dist/help-CctDYrAH.mjs +0 -2308
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
- package/dist/microinsights-CRf3ChsJ.mjs +0 -1814
- package/dist/recurringtransactions-gbJ_NA8u.mjs +0 -1564
- package/dist/settings-ZMHe439l.mjs +0 -1526
package/dist/debts/index.es.js
CHANGED
|
@@ -1,618 +1,541 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { n as ze } from "../Analytics-BKzTPees.mjs";
|
|
5
|
-
import { M as je, d as E, g as z, h as Ve, i as Ye, l as te, n as re, p as w, t as Ke } from "../Loader-BlVzRtUd.mjs";
|
|
6
|
-
import { n as Ue, r as Xe, t as qe } from "../OriginalBalanceAction-sbiqaxok.mjs";
|
|
7
|
-
import { t as O } from "../HeaderCell-EhCUSjvj.mjs";
|
|
8
|
-
import g from "react";
|
|
9
|
-
import { observer as v } from "mobx-react-lite";
|
|
1
|
+
import { jsx as e, jsxs as l, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { observer as C } from "mobx-react-lite";
|
|
10
4
|
import y from "@mui/material/Stack";
|
|
11
|
-
import {
|
|
12
|
-
import xe from "@
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
5
|
+
import { useTheme as j, Card as ge, Stack as u, Box as W } from "@mui/material";
|
|
6
|
+
import { Text as i, P as xe, H3 as Be, InstitutionLogo as Pe, Icon as ne } from "@mxenabled/mxui";
|
|
7
|
+
import { intervalToDuration as Re, formatDuration as Le } from "date-fns";
|
|
8
|
+
import { s as Fe, D as $, t as $e, b as Oe } from "../DebtUtils-i4pI2Uoe.mjs";
|
|
9
|
+
import { f as I, a as We } from "../NumberFormatting--XMeeBfr.mjs";
|
|
10
|
+
import { f as J, D as Q } from "../DateFormats-HudZ3Bjs.mjs";
|
|
11
|
+
import { G as Ge, q as ee, u as w, k as V, f as k, c as te, i as He, a as ze } from "../hooks-97sNJ_lf.mjs";
|
|
12
|
+
import { u as ae } from "../useScreenSize-mWpmnh5w.mjs";
|
|
13
|
+
import { b as T } from "../Localization-DnoVyBNK.mjs";
|
|
14
|
+
import { D as ie } from "../Drawer-DsnW2o0v.mjs";
|
|
15
|
+
import { A as je, u as Ve } from "../AccountDetailsHeader-BvbCUQSS.mjs";
|
|
16
|
+
import Ye from "@mui/material/Card";
|
|
17
|
+
import Ke from "@mui/material/CardContent";
|
|
18
|
+
import Ue from "@mui/material/CardHeader";
|
|
19
|
+
import le from "@mui/material/Box";
|
|
20
|
+
import { useTheme as qe } from "@mui/material/styles";
|
|
21
|
+
import { LineChart as Xe } from "@mui/x-charts/LineChart";
|
|
22
|
+
import { A as S } from "../Analytics-WeZYytR0.mjs";
|
|
23
|
+
import be from "@mui/material/Tab";
|
|
24
|
+
import Ze from "@mui/material/Tabs";
|
|
25
|
+
import we from "@mui/material/List";
|
|
26
26
|
import G from "@mui/material/Divider";
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
import { M as Je, I as Qe, O as et } from "../OriginalBalanceAction-YrvxBYAl.mjs";
|
|
28
|
+
import tt from "@mui/material/TextField";
|
|
29
|
+
import { L as re } from "../ListItemAction-BqUCLj_w.mjs";
|
|
30
|
+
import { C as se } from "../CurrencyInput-DaGEQaLW.mjs";
|
|
31
|
+
import me from "@mui/material/Alert";
|
|
32
|
+
import _e from "@mui/material/AlertTitle";
|
|
33
|
+
import ye from "@mui/material/Paper";
|
|
34
|
+
import { Error as rt, CheckCircle as Ce } from "@mxenabled/mx-icons";
|
|
35
|
+
import { T as fe } from "../TabContentContainer-B0eYJP5p.mjs";
|
|
36
|
+
import { DataGridPro as ot } from "@mui/x-data-grid-pro";
|
|
37
|
+
import { H } from "../HeaderCell-P8w6CmfO.mjs";
|
|
38
|
+
import { A as nt, c as z } from "../Account-DR7Plrqy.mjs";
|
|
39
|
+
import ve from "@mui/material/Button";
|
|
40
|
+
import at from "@mui/material/IconButton";
|
|
41
|
+
import it from "@mui/material/ListItem";
|
|
42
|
+
import lt from "@mui/material/Popover";
|
|
43
|
+
import { u as st } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
44
|
+
import { L as ct } from "../Loader-CxeBwuPG.mjs";
|
|
45
|
+
import { W as dt } from "../WidgetContainer-DJnp6t6c.mjs";
|
|
46
|
+
import { E as pt } from "../EmptyState-CJUDc3kD.mjs";
|
|
47
|
+
import { C as ut } from "../ConnectDrawer-CW4LA3H3.mjs";
|
|
48
|
+
function ht(r, n, o = 0) {
|
|
49
|
+
const t = r.map((b) => ({ ...b })).filter(
|
|
50
|
+
(b) => b.interest_rate !== void 0 && b.monthly_payment !== void 0 && !b.is_paid_off
|
|
51
|
+
);
|
|
37
52
|
Fe(t, n);
|
|
38
|
-
let
|
|
39
|
-
const
|
|
53
|
+
let a = 0, s = 0;
|
|
54
|
+
const d = /* @__PURE__ */ new Date(), c = /* @__PURE__ */ new Date();
|
|
40
55
|
for (; t.some((b) => b.balance >= 0.01 && !b.is_impossible); ) {
|
|
41
56
|
let b = !1;
|
|
42
|
-
for (const [
|
|
57
|
+
for (const [v, x] of t.entries()) {
|
|
43
58
|
if (x.balance <= 0.01 || x.is_impossible) continue;
|
|
44
|
-
const F = (x.interest_rate ?? 0) / 100 / 12,
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
59
|
+
const F = (x.interest_rate ?? 0) / 100 / 12, N = x.balance * F;
|
|
60
|
+
let A = x.monthly_payment ?? 0;
|
|
61
|
+
v === 0 && o && (A += o), x.balance += N;
|
|
62
|
+
const E = Math.min(x.balance, A + s);
|
|
63
|
+
if (E <= N) {
|
|
49
64
|
x.is_impossible = !0;
|
|
50
65
|
continue;
|
|
51
66
|
}
|
|
52
|
-
x.balance -=
|
|
67
|
+
x.balance -= E, x.balance = x.balance < 0.01 ? 0 : x.balance, a += N, x.balance <= 0 && (s += A), E > 0 && (b = !0);
|
|
53
68
|
}
|
|
54
69
|
b && c.setMonth(c.getMonth() + 1);
|
|
55
70
|
}
|
|
56
|
-
const m = t.some((b) => b.is_impossible && b.balance > 0), h =
|
|
57
|
-
start: p,
|
|
58
|
-
end: c
|
|
59
|
-
});
|
|
71
|
+
const m = t.some((b) => b.is_impossible && b.balance > 0), h = Re({ start: d, end: c });
|
|
60
72
|
return {
|
|
61
|
-
payoffSavings: m ? "N/A" :
|
|
62
|
-
payoffDate: m ? "Never" :
|
|
63
|
-
payoffDuration: m ? "Stagnant" :
|
|
73
|
+
payoffSavings: m ? "N/A" : I(a, "0,0.00"),
|
|
74
|
+
payoffDate: m ? "Never" : J(c, Q.MONTH_YEAR),
|
|
75
|
+
payoffDuration: m ? "Stagnant" : Le(h, { format: ["years", "months"] }) || "0 months"
|
|
64
76
|
};
|
|
65
77
|
}
|
|
66
|
-
|
|
67
|
-
if (!
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
]);
|
|
75
|
-
return /* @__PURE__ */ e(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
width: o ? "100%" : "186px",
|
|
79
|
-
minWidth: "186px",
|
|
80
|
-
...r
|
|
81
|
-
},
|
|
82
|
-
children: /* @__PURE__ */ l(u, {
|
|
78
|
+
const P = () => {
|
|
79
|
+
if (!f.useContext(Ge))
|
|
80
|
+
throw new Error("useDebtsUiStore() must be used within the GlobalDataContext");
|
|
81
|
+
return ee().uiStore;
|
|
82
|
+
}, bt = ({ debts: r, onClickCta: n, sx: o }) => {
|
|
83
|
+
const t = j(), { isMobile: a } = ae(), { debts: s } = w(), { selectedDebtPriority: d } = P(), { monthlyCashFlowProfile: c } = V(), { payoffDate: m, payoffSavings: h, payoffDuration: b } = f.useMemo(() => {
|
|
84
|
+
const v = c?.extra_payment ?? 0;
|
|
85
|
+
return ht(r, d, v);
|
|
86
|
+
}, [r, d, c]);
|
|
87
|
+
return /* @__PURE__ */ e(
|
|
88
|
+
ge,
|
|
89
|
+
{
|
|
83
90
|
sx: {
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
boxShadow: t.shadows[2],
|
|
92
|
+
width: a ? "100%" : "186px",
|
|
93
|
+
minWidth: "186px",
|
|
94
|
+
...o
|
|
86
95
|
},
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ l(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
children:
|
|
98
|
-
|
|
96
|
+
children: /* @__PURE__ */ l(u, { sx: { gap: "12px", p: "16px" }, children: [
|
|
97
|
+
/* @__PURE__ */ l(
|
|
98
|
+
u,
|
|
99
|
+
{
|
|
100
|
+
gap: a ? "4px" : "0",
|
|
101
|
+
sx: {
|
|
102
|
+
borderBottom: "1px solid",
|
|
103
|
+
borderBottomColor: t.palette.grey[300],
|
|
104
|
+
pb: "8px"
|
|
105
|
+
},
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ e(i, { variant: "caption", children: s.snowball_card_date_description }),
|
|
108
|
+
/* @__PURE__ */ e(i, { bold: !0, color: t.palette.primary.main, variant: "body2", children: m })
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
/* @__PURE__ */ l(u, { gap: a ? "4px" : "0", children: [
|
|
113
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body2", children: h }),
|
|
114
|
+
/* @__PURE__ */ e(i, { variant: "caption", children: s.snowball_card_amount_description })
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ l(u, { gap: a ? "4px" : "0", children: [
|
|
117
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body2", children: b }),
|
|
118
|
+
/* @__PURE__ */ e(i, { variant: "caption", children: s.snowball_card_duration_description })
|
|
119
|
+
] }),
|
|
120
|
+
/* @__PURE__ */ e(
|
|
121
|
+
i,
|
|
122
|
+
{
|
|
99
123
|
bold: !0,
|
|
100
124
|
color: t.palette.primary.main,
|
|
125
|
+
onClick: n,
|
|
126
|
+
sx: { cursor: "pointer" },
|
|
101
127
|
variant: "body2",
|
|
102
|
-
children:
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
variant: "
|
|
121
|
-
children:
|
|
122
|
-
|
|
123
|
-
variant: "
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
mb: 12,
|
|
158
|
-
truncate: !0,
|
|
159
|
-
variant: "h3",
|
|
160
|
-
children: t.snowball_drawer_subtitle
|
|
161
|
-
}),
|
|
162
|
-
/* @__PURE__ */ e(i, {
|
|
163
|
-
color: r.palette.secondary.main,
|
|
164
|
-
variant: "body2",
|
|
165
|
-
children: t.snowball_drawer_amount_description
|
|
166
|
-
}),
|
|
167
|
-
/* @__PURE__ */ e(ge, {
|
|
168
|
-
variant: "h1",
|
|
169
|
-
children: t.snowball_drawer_savings
|
|
170
|
-
}),
|
|
171
|
-
/* @__PURE__ */ e(i, {
|
|
172
|
-
color: r.palette.secondary.main,
|
|
173
|
-
variant: "body2",
|
|
174
|
-
children: t.snowball_drawer_duration_description
|
|
175
|
-
})
|
|
176
|
-
]
|
|
177
|
-
}), /* @__PURE__ */ l(ve, {
|
|
178
|
-
sx: {
|
|
179
|
-
display: "grid",
|
|
180
|
-
py: 16,
|
|
181
|
-
px: 24
|
|
182
|
-
},
|
|
183
|
-
children: [
|
|
184
|
-
/* @__PURE__ */ e(i, {
|
|
185
|
-
mb: 4,
|
|
186
|
-
truncate: !0,
|
|
187
|
-
variant: "h3",
|
|
188
|
-
children: t.snowball_drawer_question
|
|
189
|
-
}),
|
|
190
|
-
/* @__PURE__ */ e(i, {
|
|
191
|
-
color: r.palette.secondary.main,
|
|
192
|
-
mb: 8,
|
|
193
|
-
truncate: !o,
|
|
194
|
-
variant: "subtitle2",
|
|
195
|
-
children: t.snowball_drawer_answer
|
|
196
|
-
}),
|
|
197
|
-
/* @__PURE__ */ e(i, {
|
|
198
|
-
bold: !0,
|
|
199
|
-
color: r.palette.primary.main,
|
|
200
|
-
onClick: () => s(!o),
|
|
201
|
-
sx: { cursor: "pointer" },
|
|
128
|
+
children: s.snowball_card_cta
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
] })
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}, mt = C(bt), _t = ({ isOpen: r, onClose: n }) => {
|
|
135
|
+
const o = j(), { debts: t } = w(), [a, s] = f.useState(!1);
|
|
136
|
+
return /* @__PURE__ */ e(
|
|
137
|
+
ie,
|
|
138
|
+
{
|
|
139
|
+
ariaLabelClose: "",
|
|
140
|
+
isOpen: r,
|
|
141
|
+
onClose: n,
|
|
142
|
+
title: t.snowball_drawer_title,
|
|
143
|
+
children: /* @__PURE__ */ l(u, { bgcolor: o.palette.background.default, height: "100%", children: [
|
|
144
|
+
/* @__PURE__ */ l(u, { alignItems: "center", px: 24, py: 24, children: [
|
|
145
|
+
/* @__PURE__ */ l(u, { alignItems: "center", pb: 24, children: [
|
|
146
|
+
/* @__PURE__ */ e(i, { mb: 12, truncate: !0, variant: "h3", children: t.snowball_drawer_subtitle }),
|
|
147
|
+
/* @__PURE__ */ e(i, { color: o.palette.secondary.main, variant: "body2", children: t.snowball_drawer_amount_description }),
|
|
148
|
+
/* @__PURE__ */ e(xe, { variant: "h1", children: t.snowball_drawer_savings }),
|
|
149
|
+
/* @__PURE__ */ e(i, { color: o.palette.secondary.main, variant: "body2", children: t.snowball_drawer_duration_description })
|
|
150
|
+
] }),
|
|
151
|
+
/* @__PURE__ */ l(ge, { sx: { display: "grid", py: 16, px: 24 }, children: [
|
|
152
|
+
/* @__PURE__ */ e(i, { mb: 4, truncate: !0, variant: "h3", children: t.snowball_drawer_question }),
|
|
153
|
+
/* @__PURE__ */ e(
|
|
154
|
+
i,
|
|
155
|
+
{
|
|
156
|
+
color: o.palette.secondary.main,
|
|
157
|
+
mb: 8,
|
|
158
|
+
truncate: !a,
|
|
159
|
+
variant: "subtitle2",
|
|
160
|
+
children: t.snowball_drawer_answer
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
/* @__PURE__ */ e(
|
|
164
|
+
i,
|
|
165
|
+
{
|
|
166
|
+
bold: !0,
|
|
167
|
+
color: o.palette.primary.main,
|
|
168
|
+
onClick: () => s(!a),
|
|
169
|
+
sx: { cursor: "pointer" },
|
|
170
|
+
variant: "body2",
|
|
171
|
+
children: a ? t.snowball_drawer_less : t.snowball_drawer_more
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] })
|
|
175
|
+
] }),
|
|
176
|
+
/* @__PURE__ */ l(u, { children: [
|
|
177
|
+
/* @__PURE__ */ e(
|
|
178
|
+
i,
|
|
179
|
+
{
|
|
180
|
+
color: o.palette.secondary.main,
|
|
181
|
+
px: 24,
|
|
182
|
+
sx: { textAlign: "center" },
|
|
202
183
|
variant: "body2",
|
|
203
|
-
children:
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
184
|
+
children: t.snowball_drawer_disclaimer
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ l(u, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
188
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "caption", children: T(t.snowball_drawer_month_header, 1) }),
|
|
189
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
|
|
190
|
+
] }),
|
|
191
|
+
/* @__PURE__ */ l(u, { bgcolor: o.palette.background.paper, mb: 24, children: [
|
|
192
|
+
/* @__PURE__ */ l(u, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
193
|
+
/* @__PURE__ */ e(
|
|
194
|
+
W,
|
|
195
|
+
{
|
|
196
|
+
sx: {
|
|
197
|
+
display: "flex",
|
|
198
|
+
alignItems: "center",
|
|
199
|
+
justifyContent: "center",
|
|
200
|
+
width: 20,
|
|
201
|
+
height: 20,
|
|
202
|
+
borderRadius: "50%",
|
|
203
|
+
backgroundColor: o.palette.success.main,
|
|
204
|
+
marginRight: 12
|
|
205
|
+
},
|
|
206
|
+
children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
|
|
207
|
+
}
|
|
208
|
+
),
|
|
209
|
+
/* @__PURE__ */ l(
|
|
210
|
+
u,
|
|
211
|
+
{
|
|
212
|
+
sx: {
|
|
213
|
+
borderBottom: `1px solid ${o.palette.neutral.light}`,
|
|
214
|
+
flexDirection: "row",
|
|
215
|
+
flexGrow: 1,
|
|
216
|
+
py: 14,
|
|
217
|
+
pr: 24
|
|
218
|
+
},
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ l(u, { flexGrow: 1, children: [
|
|
221
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: T(t.snowball_drawer_debt_label, "A") }),
|
|
222
|
+
/* @__PURE__ */ l(i, { color: o.palette.secondary.main, variant: "caption", children: [
|
|
223
|
+
T(
|
|
224
|
+
t.snowball_drawer_rollover_explainer_pt1,
|
|
225
|
+
"$100"
|
|
226
|
+
),
|
|
227
|
+
/* @__PURE__ */ e("strong", { children: T(t.snowball_drawer_debt_label, "B") }),
|
|
228
|
+
t.snowball_drawer_rollover_explainer_pt2
|
|
229
|
+
] })
|
|
230
|
+
] }),
|
|
231
|
+
/* @__PURE__ */ l(u, { children: [
|
|
232
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: "$100.00" }),
|
|
233
|
+
/* @__PURE__ */ e(
|
|
234
|
+
i,
|
|
235
|
+
{
|
|
236
|
+
bold: !0,
|
|
237
|
+
color: o.palette.success.main,
|
|
238
|
+
textAlign: "end",
|
|
239
|
+
variant: "tiny",
|
|
240
|
+
children: t.snowball_drawer_paid_label
|
|
241
|
+
}
|
|
242
|
+
)
|
|
243
|
+
] })
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
] }),
|
|
248
|
+
/* @__PURE__ */ l(u, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
249
|
+
/* @__PURE__ */ e(
|
|
250
|
+
W,
|
|
251
|
+
{
|
|
252
|
+
sx: {
|
|
253
|
+
width: 20,
|
|
254
|
+
height: 20,
|
|
255
|
+
marginRight: 12,
|
|
256
|
+
borderRadius: "50%",
|
|
257
|
+
border: `3px solid ${o.palette.neutral.main}`
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
),
|
|
261
|
+
/* @__PURE__ */ l(
|
|
262
|
+
u,
|
|
263
|
+
{
|
|
264
|
+
sx: {
|
|
265
|
+
borderBottom: `1px solid ${o.palette.neutral.light}`,
|
|
266
|
+
flexDirection: "row",
|
|
267
|
+
flexGrow: 1,
|
|
268
|
+
py: 14,
|
|
269
|
+
pr: 24
|
|
270
|
+
},
|
|
271
|
+
children: [
|
|
272
|
+
/* @__PURE__ */ e(i, { flexGrow: 1, variant: "body1", children: T(t.snowball_drawer_debt_label, "B") }),
|
|
273
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: "$400.00" })
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
)
|
|
277
|
+
] }),
|
|
278
|
+
/* @__PURE__ */ l(u, { alignItems: "center", flexDirection: "row", pl: 24, py: 14, children: [
|
|
279
|
+
/* @__PURE__ */ e(
|
|
280
|
+
W,
|
|
281
|
+
{
|
|
282
|
+
sx: {
|
|
283
|
+
width: 20,
|
|
284
|
+
height: 20,
|
|
285
|
+
marginRight: 12,
|
|
286
|
+
borderRadius: "50%",
|
|
287
|
+
border: `3px solid ${o.palette.neutral.main}`
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
),
|
|
291
|
+
/* @__PURE__ */ l(u, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
|
|
292
|
+
/* @__PURE__ */ e(i, { flexGrow: 1, variant: "body1", children: T(t.snowball_drawer_debt_label, "C") }),
|
|
293
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: "$1,000.00" })
|
|
294
|
+
] })
|
|
295
|
+
] }),
|
|
296
|
+
/* @__PURE__ */ l(
|
|
297
|
+
u,
|
|
298
|
+
{
|
|
303
299
|
sx: {
|
|
304
|
-
|
|
300
|
+
py: 8,
|
|
301
|
+
px: 24,
|
|
305
302
|
flexDirection: "row",
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
children: [/* @__PURE__ */ e(i, {
|
|
311
|
-
flexGrow: 1,
|
|
312
|
-
variant: "body1",
|
|
313
|
-
children: S(t.snowball_drawer_debt_label, "B")
|
|
314
|
-
}), /* @__PURE__ */ e(i, {
|
|
315
|
-
variant: "body1",
|
|
316
|
-
children: "$400.00"
|
|
317
|
-
})]
|
|
318
|
-
})]
|
|
319
|
-
}),
|
|
320
|
-
/* @__PURE__ */ l(u, {
|
|
321
|
-
alignItems: "center",
|
|
322
|
-
flexDirection: "row",
|
|
323
|
-
pl: 24,
|
|
324
|
-
py: 14,
|
|
325
|
-
children: [/* @__PURE__ */ e(W, { sx: {
|
|
326
|
-
width: 20,
|
|
327
|
-
height: 20,
|
|
328
|
-
marginRight: 12,
|
|
329
|
-
borderRadius: "50%",
|
|
330
|
-
border: `3px solid ${r.palette.neutral.main}`
|
|
331
|
-
} }), /* @__PURE__ */ l(u, {
|
|
332
|
-
flexDirection: "row",
|
|
333
|
-
flexGrow: 1,
|
|
334
|
-
pr: 24,
|
|
335
|
-
children: [/* @__PURE__ */ e(i, {
|
|
336
|
-
flexGrow: 1,
|
|
337
|
-
variant: "body1",
|
|
338
|
-
children: S(t.snowball_drawer_debt_label, "C")
|
|
339
|
-
}), /* @__PURE__ */ e(i, {
|
|
340
|
-
variant: "body1",
|
|
341
|
-
children: "$1,000.00"
|
|
342
|
-
})]
|
|
343
|
-
})]
|
|
344
|
-
}),
|
|
345
|
-
/* @__PURE__ */ l(u, {
|
|
346
|
-
sx: {
|
|
347
|
-
py: 8,
|
|
348
|
-
px: 24,
|
|
349
|
-
flexDirection: "row",
|
|
350
|
-
justifyContent: "space-between",
|
|
351
|
-
borderTop: `1px solid ${r.palette.neutral.light}`,
|
|
352
|
-
borderBottom: `1px solid ${r.palette.neutral.light}`
|
|
353
|
-
},
|
|
354
|
-
children: [/* @__PURE__ */ e(i, {
|
|
355
|
-
bold: !0,
|
|
356
|
-
variant: "body1",
|
|
357
|
-
children: t.snowball_drawer_total_label
|
|
358
|
-
}), /* @__PURE__ */ e(i, {
|
|
359
|
-
bold: !0,
|
|
360
|
-
variant: "body1",
|
|
361
|
-
children: "$1,500.00"
|
|
362
|
-
})]
|
|
363
|
-
})
|
|
364
|
-
]
|
|
365
|
-
}),
|
|
366
|
-
/* @__PURE__ */ l(u, {
|
|
367
|
-
flexDirection: "row",
|
|
368
|
-
justifyContent: "space-between",
|
|
369
|
-
sx: {
|
|
370
|
-
pt: 12,
|
|
371
|
-
px: 24,
|
|
372
|
-
pb: 8
|
|
373
|
-
},
|
|
374
|
-
children: [/* @__PURE__ */ e(i, {
|
|
375
|
-
bold: !0,
|
|
376
|
-
variant: "caption",
|
|
377
|
-
children: S(t.snowball_drawer_month_header, 2)
|
|
378
|
-
}), /* @__PURE__ */ e(i, {
|
|
379
|
-
bold: !0,
|
|
380
|
-
variant: "caption",
|
|
381
|
-
children: t.snowball_drawer_payment_header
|
|
382
|
-
})]
|
|
383
|
-
}),
|
|
384
|
-
/* @__PURE__ */ l(u, {
|
|
385
|
-
bgcolor: r.palette.background.paper,
|
|
386
|
-
mb: 24,
|
|
387
|
-
children: [
|
|
388
|
-
/* @__PURE__ */ l(u, {
|
|
389
|
-
alignItems: "center",
|
|
390
|
-
flexDirection: "row",
|
|
391
|
-
pl: 24,
|
|
392
|
-
children: [/* @__PURE__ */ e(W, {
|
|
393
|
-
sx: {
|
|
394
|
-
display: "flex",
|
|
395
|
-
alignItems: "center",
|
|
396
|
-
justifyContent: "center",
|
|
397
|
-
width: 20,
|
|
398
|
-
height: 20,
|
|
399
|
-
borderRadius: "50%",
|
|
400
|
-
backgroundColor: r.palette.success.main,
|
|
401
|
-
marginRight: 12
|
|
303
|
+
justifyContent: "space-between",
|
|
304
|
+
borderTop: `1px solid ${o.palette.neutral.light}`,
|
|
305
|
+
borderBottom: `1px solid ${o.palette.neutral.light}`
|
|
402
306
|
},
|
|
403
|
-
children:
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
307
|
+
children: [
|
|
308
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
|
|
309
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: "$1,500.00" })
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
)
|
|
313
|
+
] }),
|
|
314
|
+
/* @__PURE__ */ l(u, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
315
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "caption", children: T(t.snowball_drawer_month_header, 2) }),
|
|
316
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
|
|
317
|
+
] }),
|
|
318
|
+
/* @__PURE__ */ l(u, { bgcolor: o.palette.background.paper, mb: 24, children: [
|
|
319
|
+
/* @__PURE__ */ l(u, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
320
|
+
/* @__PURE__ */ e(
|
|
321
|
+
W,
|
|
322
|
+
{
|
|
323
|
+
sx: {
|
|
324
|
+
display: "flex",
|
|
325
|
+
alignItems: "center",
|
|
326
|
+
justifyContent: "center",
|
|
327
|
+
width: 20,
|
|
328
|
+
height: 20,
|
|
329
|
+
borderRadius: "50%",
|
|
330
|
+
backgroundColor: o.palette.success.main,
|
|
331
|
+
marginRight: 12
|
|
332
|
+
},
|
|
333
|
+
children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
|
|
334
|
+
}
|
|
335
|
+
),
|
|
336
|
+
/* @__PURE__ */ l(
|
|
337
|
+
u,
|
|
338
|
+
{
|
|
339
|
+
sx: {
|
|
340
|
+
borderBottom: `1px solid ${o.palette.neutral.light}`,
|
|
341
|
+
flexDirection: "row",
|
|
342
|
+
flexGrow: 1,
|
|
343
|
+
py: 14,
|
|
344
|
+
pr: 24
|
|
345
|
+
},
|
|
346
|
+
children: [
|
|
347
|
+
/* @__PURE__ */ l(u, { flexGrow: 1, children: [
|
|
348
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: T(t.snowball_drawer_debt_label, "B") }),
|
|
349
|
+
/* @__PURE__ */ l(i, { color: o.palette.secondary.main, variant: "caption", children: [
|
|
350
|
+
T(
|
|
351
|
+
t.snowball_drawer_rollover_explainer_pt1,
|
|
352
|
+
"$500"
|
|
353
|
+
),
|
|
354
|
+
/* @__PURE__ */ e("strong", { children: T(t.snowball_drawer_debt_label, "C") }),
|
|
355
|
+
t.snowball_drawer_rollover_explainer_pt2
|
|
356
|
+
] })
|
|
357
|
+
] }),
|
|
358
|
+
/* @__PURE__ */ l(u, { children: [
|
|
359
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: "$500.00" }),
|
|
360
|
+
/* @__PURE__ */ e(
|
|
361
|
+
i,
|
|
362
|
+
{
|
|
363
|
+
bold: !0,
|
|
364
|
+
color: o.palette.success.main,
|
|
365
|
+
textAlign: "end",
|
|
366
|
+
variant: "tiny",
|
|
367
|
+
children: t.snowball_drawer_paid_label
|
|
368
|
+
}
|
|
369
|
+
)
|
|
370
|
+
] })
|
|
371
|
+
]
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
] }),
|
|
375
|
+
/* @__PURE__ */ l(u, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
376
|
+
/* @__PURE__ */ e(
|
|
377
|
+
W,
|
|
378
|
+
{
|
|
379
|
+
sx: {
|
|
380
|
+
width: 20,
|
|
381
|
+
height: 20,
|
|
382
|
+
marginRight: 12,
|
|
383
|
+
borderRadius: "50%",
|
|
384
|
+
border: `3px solid ${o.palette.neutral.main}`
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
),
|
|
388
|
+
/* @__PURE__ */ l(
|
|
389
|
+
u,
|
|
390
|
+
{
|
|
391
|
+
sx: {
|
|
392
|
+
flexDirection: "row",
|
|
393
|
+
flexGrow: 1,
|
|
394
|
+
py: 14,
|
|
395
|
+
pr: 24
|
|
396
|
+
},
|
|
397
|
+
children: [
|
|
398
|
+
/* @__PURE__ */ e(i, { flexGrow: 1, variant: "body1", children: T(t.snowball_drawer_debt_label, "C") }),
|
|
399
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: "$1,000.00" })
|
|
400
|
+
]
|
|
401
|
+
}
|
|
402
|
+
)
|
|
403
|
+
] }),
|
|
404
|
+
/* @__PURE__ */ l(
|
|
405
|
+
u,
|
|
406
|
+
{
|
|
410
407
|
sx: {
|
|
411
|
-
|
|
408
|
+
py: 8,
|
|
409
|
+
px: 24,
|
|
412
410
|
flexDirection: "row",
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
411
|
+
justifyContent: "space-between",
|
|
412
|
+
borderTop: `1px solid ${o.palette.neutral.light}`,
|
|
413
|
+
borderBottom: `1px solid ${o.palette.neutral.light}`
|
|
416
414
|
},
|
|
417
|
-
children: [
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
415
|
+
children: [
|
|
416
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
|
|
417
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: "$1,500.00" })
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
)
|
|
421
|
+
] }),
|
|
422
|
+
/* @__PURE__ */ l(u, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
423
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "caption", children: T(t.snowball_drawer_month_header, 3) }),
|
|
424
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
|
|
425
|
+
] }),
|
|
426
|
+
/* @__PURE__ */ l(u, { bgcolor: o.palette.background.paper, mb: 24, children: [
|
|
427
|
+
/* @__PURE__ */ l(u, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
428
|
+
/* @__PURE__ */ e(
|
|
429
|
+
W,
|
|
430
|
+
{
|
|
431
|
+
sx: {
|
|
432
|
+
display: "flex",
|
|
433
|
+
alignItems: "center",
|
|
434
|
+
justifyContent: "center",
|
|
435
|
+
width: 20,
|
|
436
|
+
height: 20,
|
|
437
|
+
borderRadius: "50%",
|
|
438
|
+
backgroundColor: o.palette.success.main,
|
|
439
|
+
marginRight: 12
|
|
440
|
+
},
|
|
441
|
+
children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
|
|
442
|
+
}
|
|
443
|
+
),
|
|
444
|
+
/* @__PURE__ */ l(
|
|
445
|
+
u,
|
|
446
|
+
{
|
|
447
|
+
sx: {
|
|
448
|
+
alignItems: "center",
|
|
449
|
+
flexDirection: "row",
|
|
450
|
+
flexGrow: 1,
|
|
451
|
+
py: 14,
|
|
452
|
+
pr: 24
|
|
453
|
+
},
|
|
454
|
+
children: [
|
|
455
|
+
/* @__PURE__ */ e(u, { flexGrow: 1, children: /* @__PURE__ */ e(i, { variant: "body1", children: T(t.snowball_drawer_debt_label, "C") }) }),
|
|
456
|
+
/* @__PURE__ */ l(u, { children: [
|
|
457
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: "$1,500.00" }),
|
|
458
|
+
/* @__PURE__ */ e(
|
|
459
|
+
i,
|
|
460
|
+
{
|
|
461
|
+
bold: !0,
|
|
462
|
+
color: o.palette.success.main,
|
|
463
|
+
textAlign: "end",
|
|
464
|
+
variant: "tiny",
|
|
465
|
+
children: t.snowball_drawer_paid_label
|
|
466
|
+
}
|
|
467
|
+
)
|
|
468
|
+
] })
|
|
469
|
+
]
|
|
470
|
+
}
|
|
471
|
+
)
|
|
472
|
+
] }),
|
|
473
|
+
/* @__PURE__ */ l(
|
|
474
|
+
u,
|
|
475
|
+
{
|
|
454
476
|
sx: {
|
|
477
|
+
py: 8,
|
|
478
|
+
px: 24,
|
|
455
479
|
flexDirection: "row",
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
480
|
+
justifyContent: "space-between",
|
|
481
|
+
borderTop: `1px solid ${o.palette.neutral.light}`,
|
|
482
|
+
borderBottom: `1px solid ${o.palette.neutral.light}`
|
|
459
483
|
},
|
|
460
|
-
children: [
|
|
461
|
-
|
|
462
|
-
variant: "body1",
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
justifyContent: "space-between",
|
|
476
|
-
borderTop: `1px solid ${r.palette.neutral.light}`,
|
|
477
|
-
borderBottom: `1px solid ${r.palette.neutral.light}`
|
|
478
|
-
},
|
|
479
|
-
children: [/* @__PURE__ */ e(i, {
|
|
480
|
-
bold: !0,
|
|
481
|
-
variant: "body1",
|
|
482
|
-
children: t.snowball_drawer_total_label
|
|
483
|
-
}), /* @__PURE__ */ e(i, {
|
|
484
|
-
bold: !0,
|
|
485
|
-
variant: "body1",
|
|
486
|
-
children: "$1,500.00"
|
|
487
|
-
})]
|
|
488
|
-
})
|
|
489
|
-
]
|
|
490
|
-
}),
|
|
491
|
-
/* @__PURE__ */ l(u, {
|
|
492
|
-
flexDirection: "row",
|
|
493
|
-
justifyContent: "space-between",
|
|
494
|
-
sx: {
|
|
495
|
-
pt: 12,
|
|
496
|
-
px: 24,
|
|
497
|
-
pb: 8
|
|
498
|
-
},
|
|
499
|
-
children: [/* @__PURE__ */ e(i, {
|
|
500
|
-
bold: !0,
|
|
501
|
-
variant: "caption",
|
|
502
|
-
children: S(t.snowball_drawer_month_header, 3)
|
|
503
|
-
}), /* @__PURE__ */ e(i, {
|
|
504
|
-
bold: !0,
|
|
505
|
-
variant: "caption",
|
|
506
|
-
children: t.snowball_drawer_payment_header
|
|
507
|
-
})]
|
|
508
|
-
}),
|
|
509
|
-
/* @__PURE__ */ l(u, {
|
|
510
|
-
bgcolor: r.palette.background.paper,
|
|
511
|
-
mb: 24,
|
|
512
|
-
children: [/* @__PURE__ */ l(u, {
|
|
513
|
-
alignItems: "center",
|
|
514
|
-
flexDirection: "row",
|
|
515
|
-
pl: 24,
|
|
516
|
-
children: [/* @__PURE__ */ e(W, {
|
|
517
|
-
sx: {
|
|
518
|
-
display: "flex",
|
|
519
|
-
alignItems: "center",
|
|
520
|
-
justifyContent: "center",
|
|
521
|
-
width: 20,
|
|
522
|
-
height: 20,
|
|
523
|
-
borderRadius: "50%",
|
|
524
|
-
backgroundColor: r.palette.success.main,
|
|
525
|
-
marginRight: 12
|
|
526
|
-
},
|
|
527
|
-
children: /* @__PURE__ */ e(i, {
|
|
528
|
-
color: "white",
|
|
529
|
-
fontWeight: 700,
|
|
530
|
-
variant: "body2",
|
|
531
|
-
children: "✓"
|
|
532
|
-
})
|
|
533
|
-
}), /* @__PURE__ */ l(u, {
|
|
534
|
-
sx: {
|
|
535
|
-
alignItems: "center",
|
|
536
|
-
flexDirection: "row",
|
|
537
|
-
flexGrow: 1,
|
|
538
|
-
py: 14,
|
|
539
|
-
pr: 24
|
|
540
|
-
},
|
|
541
|
-
children: [/* @__PURE__ */ e(u, {
|
|
542
|
-
flexGrow: 1,
|
|
543
|
-
children: /* @__PURE__ */ e(i, {
|
|
544
|
-
variant: "body1",
|
|
545
|
-
children: S(t.snowball_drawer_debt_label, "C")
|
|
546
|
-
})
|
|
547
|
-
}), /* @__PURE__ */ l(u, { children: [/* @__PURE__ */ e(i, {
|
|
548
|
-
variant: "body1",
|
|
549
|
-
children: "$1,500.00"
|
|
550
|
-
}), /* @__PURE__ */ e(i, {
|
|
551
|
-
bold: !0,
|
|
552
|
-
color: r.palette.success.main,
|
|
553
|
-
textAlign: "end",
|
|
554
|
-
variant: "tiny",
|
|
555
|
-
children: t.snowball_drawer_paid_label
|
|
556
|
-
})] })]
|
|
557
|
-
})]
|
|
558
|
-
}), /* @__PURE__ */ l(u, {
|
|
559
|
-
sx: {
|
|
560
|
-
py: 8,
|
|
561
|
-
px: 24,
|
|
562
|
-
flexDirection: "row",
|
|
563
|
-
justifyContent: "space-between",
|
|
564
|
-
borderTop: `1px solid ${r.palette.neutral.light}`,
|
|
565
|
-
borderBottom: `1px solid ${r.palette.neutral.light}`
|
|
566
|
-
},
|
|
567
|
-
children: [/* @__PURE__ */ e(i, {
|
|
568
|
-
bold: !0,
|
|
569
|
-
variant: "body1",
|
|
570
|
-
children: t.snowball_drawer_total_label
|
|
571
|
-
}), /* @__PURE__ */ e(i, {
|
|
572
|
-
bold: !0,
|
|
573
|
-
variant: "body1",
|
|
574
|
-
children: "$1,500.00"
|
|
575
|
-
})]
|
|
576
|
-
})]
|
|
577
|
-
})
|
|
578
|
-
] })]
|
|
579
|
-
})
|
|
580
|
-
});
|
|
581
|
-
}, yt = v(_t), ft = "#FF7B08";
|
|
582
|
-
function gt(a, n) {
|
|
583
|
-
const [r, t, o] = a.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), s = [
|
|
584
|
-
Math.max(0, Math.min(255, Math.round(r * n))),
|
|
484
|
+
children: [
|
|
485
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
|
|
486
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: "$1,500.00" })
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
)
|
|
490
|
+
] })
|
|
491
|
+
] })
|
|
492
|
+
] })
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
}, yt = C(_t), ft = "#FF7B08";
|
|
496
|
+
function gt(r, n) {
|
|
497
|
+
const [o, t, a] = r.replace(/^#/, "").match(/.{1,2}/g).map((d) => parseInt(d, 16)), s = [
|
|
498
|
+
Math.max(0, Math.min(255, Math.round(o * n))),
|
|
585
499
|
Math.max(0, Math.min(255, Math.round(t * n))),
|
|
586
|
-
Math.max(0, Math.min(255, Math.round(
|
|
500
|
+
Math.max(0, Math.min(255, Math.round(a * n)))
|
|
587
501
|
];
|
|
588
502
|
return `rgb(${s[0]}, ${s[1]}, ${s[2]})`;
|
|
589
503
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
504
|
+
const De = ({
|
|
505
|
+
sx: r,
|
|
506
|
+
height: n = 500,
|
|
507
|
+
width: o,
|
|
508
|
+
debts: t,
|
|
509
|
+
hoveredDebtGuid: a,
|
|
510
|
+
onClickArea: s,
|
|
511
|
+
onHoverArea: d
|
|
512
|
+
}) => {
|
|
513
|
+
const c = qe(), { onEvent: m } = k(), h = t.filter((p) => !p.is_impossible), b = [
|
|
514
|
+
...new Set(
|
|
515
|
+
h.flatMap((p) => p.dataset.map((g) => new Date(g.x).getTime()))
|
|
516
|
+
)
|
|
517
|
+
].sort((p, g) => p - g).map((p) => new Date(p)), v = h.map((p) => {
|
|
518
|
+
const g = new Map(p.dataset.map((B) => [new Date(B.x).getTime(), B.y]));
|
|
519
|
+
let D = g.get(b[0].getTime()) ?? 0;
|
|
520
|
+
const M = b.map((B) => {
|
|
521
|
+
const K = g.get(B.getTime()) ?? D;
|
|
522
|
+
return D = K, { x: B, y: K };
|
|
600
523
|
});
|
|
524
|
+
return { ...p, dataset: M };
|
|
525
|
+
}), x = v.reduce(
|
|
526
|
+
(p, g) => p + (g.dataset[0]?.y ?? 0),
|
|
527
|
+
0
|
|
528
|
+
), L = b.map((p, g) => {
|
|
529
|
+
const D = g / (b.length - 1), M = x * (1 - D);
|
|
530
|
+
return { x: p, y: M };
|
|
531
|
+
}), F = Math.ceil(x / 100) * 100, N = b, A = v.map((p, g) => {
|
|
532
|
+
const D = 1 - g / v.length * 0.5, M = gt(ft, D);
|
|
601
533
|
return {
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
y: x * (1 - f / (b.length - 1))
|
|
608
|
-
})), k = Math.ceil(x / 100) * 100, N = b, D = I.map((d, f) => {
|
|
609
|
-
const T = gt(ft, 1 - f / I.length * 0.5);
|
|
610
|
-
return {
|
|
611
|
-
id: `debt-${f}`,
|
|
612
|
-
guid: d.guid,
|
|
613
|
-
label: d.name,
|
|
614
|
-
data: d.dataset.map(($) => $.y),
|
|
615
|
-
color: T,
|
|
534
|
+
id: `debt-${g}`,
|
|
535
|
+
guid: p.guid,
|
|
536
|
+
label: p.name,
|
|
537
|
+
data: p.dataset.map((B) => B.y),
|
|
538
|
+
color: M,
|
|
616
539
|
curve: "linear",
|
|
617
540
|
type: "line",
|
|
618
541
|
area: !0,
|
|
@@ -620,10 +543,10 @@ var De = ({ sx: a, height: n = 500, width: r, debts: t, hoveredDebtGuid: o, onCl
|
|
|
620
543
|
showMark: !1
|
|
621
544
|
};
|
|
622
545
|
});
|
|
623
|
-
|
|
546
|
+
A.push({
|
|
624
547
|
id: "payoff-line",
|
|
625
548
|
label: "Payoff Line",
|
|
626
|
-
data:
|
|
549
|
+
data: L.map((p) => p.y),
|
|
627
550
|
color: c.palette.grey[700],
|
|
628
551
|
curve: "linear",
|
|
629
552
|
type: "line",
|
|
@@ -631,177 +554,170 @@ var De = ({ sx: a, height: n = 500, width: r, debts: t, hoveredDebtGuid: o, onCl
|
|
|
631
554
|
showMark: !1,
|
|
632
555
|
disableHighlight: !0
|
|
633
556
|
});
|
|
634
|
-
const
|
|
635
|
-
return /* @__PURE__ */ e(
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
height: "100%",
|
|
639
|
-
touchAction: "pan-y",
|
|
640
|
-
"& svg": {
|
|
641
|
-
touchAction: "pan-y",
|
|
642
|
-
userSelect: "none"
|
|
643
|
-
},
|
|
644
|
-
"& .recharts-wrapper": { touchAction: "pan-y" }
|
|
645
|
-
},
|
|
646
|
-
children: /* @__PURE__ */ e(pt, {
|
|
647
|
-
axisHighlight: { x: "none" },
|
|
648
|
-
disableLineItemHighlight: !0,
|
|
649
|
-
height: n,
|
|
650
|
-
hideLegend: !0,
|
|
651
|
-
margin: {
|
|
652
|
-
bottom: 24,
|
|
653
|
-
left: 32,
|
|
654
|
-
right: 72,
|
|
655
|
-
top: 48
|
|
656
|
-
},
|
|
657
|
-
onAreaClick: (d, f) => {
|
|
658
|
-
s?.();
|
|
659
|
-
const T = D.find(($) => $.id === f.seriesId);
|
|
660
|
-
m(C.DEBTS_CLICK_CHART_AREA, { account_guid: T?.guid });
|
|
661
|
-
},
|
|
662
|
-
onHighlightChange: (d) => {
|
|
663
|
-
const f = D.find((T) => T.id === d?.seriesId)?.guid;
|
|
664
|
-
p?.(f ?? "");
|
|
665
|
-
},
|
|
666
|
-
series: D,
|
|
667
|
-
skipAnimation: !0,
|
|
668
|
-
slotProps: { tooltip: { trigger: "none" } },
|
|
557
|
+
const E = (p) => A.findIndex((g) => g?.guid === p);
|
|
558
|
+
return /* @__PURE__ */ e(
|
|
559
|
+
le,
|
|
560
|
+
{
|
|
669
561
|
sx: {
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
opacity: 0.4,
|
|
677
|
-
transition: "opacity 0.3s ease"
|
|
678
|
-
},
|
|
679
|
-
"& .MuiAreaElement-root:hover": { opacity: 1 },
|
|
680
|
-
"& .MuiLineElement-series-payoff-line": {
|
|
681
|
-
strokeDasharray: "10 5",
|
|
682
|
-
strokeWidth: 1
|
|
562
|
+
width: "100%",
|
|
563
|
+
height: "100%",
|
|
564
|
+
touchAction: "pan-y",
|
|
565
|
+
"& svg": {
|
|
566
|
+
touchAction: "pan-y",
|
|
567
|
+
userSelect: "none"
|
|
683
568
|
},
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
...a
|
|
688
|
-
},
|
|
689
|
-
width: r,
|
|
690
|
-
xAxis: [{
|
|
691
|
-
data: N,
|
|
692
|
-
disableTicks: !0,
|
|
693
|
-
min: b[0],
|
|
694
|
-
scaleType: "time",
|
|
695
|
-
tickLabelMinGap: 24,
|
|
696
|
-
valueFormatter: (d) => Q(d, Z.MONTH_SHORT_YEAR)
|
|
697
|
-
}],
|
|
698
|
-
yAxis: [{
|
|
699
|
-
min: 0,
|
|
700
|
-
max: k,
|
|
701
|
-
disableTicks: !0,
|
|
702
|
-
valueFormatter: (d) => A(d, "0a")
|
|
703
|
-
}]
|
|
704
|
-
})
|
|
705
|
-
});
|
|
706
|
-
}, xt = () => {
|
|
707
|
-
const a = j(), { debts: n } = w(), { selectedDebtChartData: r } = M();
|
|
708
|
-
return /* @__PURE__ */ l(B, { children: [/* @__PURE__ */ l(ot, {
|
|
709
|
-
sx: { "& .MuiCardContent-root:last-child": { pb: 0 } },
|
|
710
|
-
children: [/* @__PURE__ */ e(lt, {
|
|
711
|
-
sx: { pb: 0 },
|
|
712
|
-
title: /* @__PURE__ */ e(Je, {
|
|
713
|
-
sx: { pb: 4 },
|
|
714
|
-
children: n.details_chart_title
|
|
715
|
-
})
|
|
716
|
-
}), /* @__PURE__ */ e(it, {
|
|
717
|
-
sx: { p: 0 },
|
|
718
|
-
children: /* @__PURE__ */ e(De, {
|
|
719
|
-
debts: [r],
|
|
720
|
-
height: 250
|
|
721
|
-
})
|
|
722
|
-
})]
|
|
723
|
-
}), /* @__PURE__ */ e(i, {
|
|
724
|
-
color: a.palette.text.secondary,
|
|
725
|
-
sx: {
|
|
726
|
-
textAlign: "center",
|
|
727
|
-
px: 8,
|
|
728
|
-
py: 12
|
|
729
|
-
},
|
|
730
|
-
variant: "body2",
|
|
731
|
-
children: n.details_chart_description
|
|
732
|
-
})] });
|
|
733
|
-
}, wt = v(xt), vt = () => {
|
|
734
|
-
const a = j(), { onEvent: n } = E(), { debts: r } = w(), { selectedDebtChartData: t, showCompleted: o, showError: s } = M();
|
|
735
|
-
return g.useEffect(() => n(C.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(Ce, { children: s || o ? /* @__PURE__ */ e(i, {
|
|
736
|
-
color: a.palette.secondary.main,
|
|
737
|
-
component: "div",
|
|
738
|
-
sx: {
|
|
739
|
-
p: 32,
|
|
740
|
-
textAlign: "center"
|
|
741
|
-
},
|
|
742
|
-
variant: "body2",
|
|
743
|
-
children: s ? r.schedule_error_message : r.schedule_complete_message
|
|
744
|
-
}) : /* @__PURE__ */ l(B, { children: [
|
|
745
|
-
/* @__PURE__ */ l(y, {
|
|
746
|
-
flexDirection: "row",
|
|
747
|
-
justifyContent: "space-between",
|
|
748
|
-
sx: {
|
|
749
|
-
pt: 12,
|
|
750
|
-
px: 24,
|
|
751
|
-
pb: 8
|
|
569
|
+
"& .recharts-wrapper": {
|
|
570
|
+
touchAction: "pan-y"
|
|
571
|
+
}
|
|
752
572
|
},
|
|
753
|
-
children:
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
573
|
+
children: /* @__PURE__ */ e(
|
|
574
|
+
Xe,
|
|
575
|
+
{
|
|
576
|
+
axisHighlight: { x: "none" },
|
|
577
|
+
disableLineItemHighlight: !0,
|
|
578
|
+
height: n,
|
|
579
|
+
hideLegend: !0,
|
|
580
|
+
margin: { bottom: 24, left: 32, right: 72, top: 48 },
|
|
581
|
+
onAreaClick: (p, g) => {
|
|
582
|
+
s?.();
|
|
583
|
+
const D = A.find((M) => M.id === g.seriesId);
|
|
584
|
+
m(S.DEBTS_CLICK_CHART_AREA, { account_guid: D?.guid });
|
|
585
|
+
},
|
|
586
|
+
onHighlightChange: (p) => {
|
|
587
|
+
const g = A.find((D) => D.id === p?.seriesId)?.guid;
|
|
588
|
+
d?.(g ?? "");
|
|
589
|
+
},
|
|
590
|
+
series: A,
|
|
591
|
+
skipAnimation: !0,
|
|
592
|
+
slotProps: { tooltip: { trigger: "none" } },
|
|
770
593
|
sx: {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
594
|
+
p: 4,
|
|
595
|
+
"& .MuiBarLabel-root": {
|
|
596
|
+
fontSize: 10,
|
|
597
|
+
fontWeight: 600
|
|
598
|
+
},
|
|
599
|
+
"& .MuiAreaElement-root": {
|
|
600
|
+
opacity: 0.4,
|
|
601
|
+
transition: "opacity 0.3s ease"
|
|
602
|
+
},
|
|
603
|
+
"& .MuiAreaElement-root:hover": {
|
|
604
|
+
opacity: 1
|
|
605
|
+
},
|
|
606
|
+
"& .MuiLineElement-series-payoff-line": {
|
|
607
|
+
strokeDasharray: "10 5",
|
|
608
|
+
strokeWidth: 1
|
|
609
|
+
},
|
|
610
|
+
[`& .MuiLineElement-series-debt-${E(a ?? "0")}`]: {
|
|
611
|
+
opacity: 1
|
|
612
|
+
},
|
|
613
|
+
[`& .MuiAreaElement-series-debt-${E(a ?? "0")}`]: {
|
|
614
|
+
opacity: 1
|
|
615
|
+
},
|
|
616
|
+
"& .MuiChartsAxis-tickLabel > tspan": {
|
|
617
|
+
fontFamily: c.typography.body2.fontFamily
|
|
618
|
+
},
|
|
619
|
+
...r
|
|
776
620
|
},
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
621
|
+
width: o,
|
|
622
|
+
xAxis: [
|
|
623
|
+
{
|
|
624
|
+
data: N,
|
|
625
|
+
disableTicks: !0,
|
|
626
|
+
min: b[0],
|
|
627
|
+
scaleType: "time",
|
|
628
|
+
tickLabelMinGap: 24,
|
|
629
|
+
valueFormatter: (p) => J(p, Q.MONTH_SHORT_YEAR)
|
|
630
|
+
}
|
|
631
|
+
],
|
|
632
|
+
yAxis: [
|
|
633
|
+
{
|
|
634
|
+
min: 0,
|
|
635
|
+
max: F,
|
|
636
|
+
disableTicks: !0,
|
|
637
|
+
valueFormatter: (p) => I(p, "0a")
|
|
638
|
+
}
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
)
|
|
642
|
+
}
|
|
643
|
+
);
|
|
644
|
+
}, xt = () => {
|
|
645
|
+
const r = j(), { debts: n } = w(), { selectedDebtChartData: o } = P();
|
|
646
|
+
return /* @__PURE__ */ l(R, { children: [
|
|
647
|
+
/* @__PURE__ */ l(
|
|
648
|
+
Ye,
|
|
649
|
+
{
|
|
650
|
+
sx: {
|
|
651
|
+
"& .MuiCardContent-root:last-child": {
|
|
652
|
+
pb: 0
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
children: [
|
|
656
|
+
/* @__PURE__ */ e(Ue, { sx: { pb: 0 }, title: /* @__PURE__ */ e(Be, { sx: { pb: 4 }, children: n.details_chart_title }) }),
|
|
657
|
+
/* @__PURE__ */ e(Ke, { sx: { p: 0 }, children: /* @__PURE__ */ e(De, { debts: [o], height: 250 }) })
|
|
658
|
+
]
|
|
659
|
+
}
|
|
660
|
+
),
|
|
661
|
+
/* @__PURE__ */ e(
|
|
662
|
+
i,
|
|
663
|
+
{
|
|
664
|
+
color: r.palette.text.secondary,
|
|
665
|
+
sx: { textAlign: "center", px: 8, py: 12 },
|
|
666
|
+
variant: "body2",
|
|
667
|
+
children: n.details_chart_description
|
|
668
|
+
}
|
|
669
|
+
)
|
|
670
|
+
] });
|
|
671
|
+
}, wt = C(xt), Ct = () => {
|
|
672
|
+
const r = j(), { onEvent: n } = k(), { debts: o } = w(), { selectedDebtChartData: t, showCompleted: a, showError: s } = P();
|
|
673
|
+
return f.useEffect(() => n(S.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(we, { children: s || a ? /* @__PURE__ */ e(
|
|
674
|
+
i,
|
|
675
|
+
{
|
|
676
|
+
color: r.palette.secondary.main,
|
|
677
|
+
component: "div",
|
|
678
|
+
sx: { p: 32, textAlign: "center" },
|
|
679
|
+
variant: "body2",
|
|
680
|
+
children: s ? o.schedule_error_message : o.schedule_complete_message
|
|
681
|
+
}
|
|
682
|
+
) : /* @__PURE__ */ l(R, { children: [
|
|
683
|
+
/* @__PURE__ */ l(y, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
684
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "caption", children: o.schedule_month_heading }),
|
|
685
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "caption", children: o.schedule_amount_heading })
|
|
686
|
+
] }),
|
|
687
|
+
t.dataset.slice(1).map(({ x: d, y: c, payment: m }) => /* @__PURE__ */ e(y, { bgcolor: r.palette.background.paper, children: /* @__PURE__ */ e(y, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ l(
|
|
688
|
+
y,
|
|
689
|
+
{
|
|
690
|
+
sx: {
|
|
691
|
+
borderBottom: `1px solid ${r.palette.divider}`,
|
|
692
|
+
flexDirection: "row",
|
|
693
|
+
flexGrow: 1,
|
|
694
|
+
py: 14,
|
|
695
|
+
pr: 24
|
|
696
|
+
},
|
|
697
|
+
children: [
|
|
698
|
+
/* @__PURE__ */ l(y, { flexGrow: 1, children: [
|
|
699
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: J(d, Q.MONTH_YEAR) }),
|
|
700
|
+
/* @__PURE__ */ e(i, { color: r.palette.secondary.main, variant: "caption", children: o.schedule_month_label })
|
|
701
|
+
] }),
|
|
702
|
+
/* @__PURE__ */ l(y, { children: [
|
|
703
|
+
/* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: I(c, "0,0.00") }),
|
|
704
|
+
/* @__PURE__ */ e(
|
|
705
|
+
i,
|
|
706
|
+
{
|
|
707
|
+
bold: !0,
|
|
708
|
+
color: r.palette.success.main,
|
|
709
|
+
textAlign: "end",
|
|
710
|
+
variant: "tiny",
|
|
711
|
+
children: `+${I(m, "0,0")}`
|
|
712
|
+
}
|
|
713
|
+
)
|
|
714
|
+
] })
|
|
715
|
+
]
|
|
716
|
+
}
|
|
717
|
+
) }) }, String(d))),
|
|
718
|
+
/* @__PURE__ */ e(y, { bgcolor: "background.paper", children: /* @__PURE__ */ l(
|
|
719
|
+
y,
|
|
720
|
+
{
|
|
805
721
|
sx: {
|
|
806
722
|
alignItems: "center",
|
|
807
723
|
flexDirection: "row",
|
|
@@ -809,139 +725,136 @@ var De = ({ sx: a, height: n = 500, width: r, debts: t, hoveredDebtGuid: o, onCl
|
|
|
809
725
|
py: 14,
|
|
810
726
|
px: 24
|
|
811
727
|
},
|
|
812
|
-
children: [
|
|
813
|
-
flexGrow: 1,
|
|
814
|
-
variant: "body1",
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
children: "-"
|
|
819
|
-
})]
|
|
820
|
-
})
|
|
821
|
-
})
|
|
728
|
+
children: [
|
|
729
|
+
/* @__PURE__ */ e(i, { flexGrow: 1, variant: "body1", children: o.schedule_payoff_label }),
|
|
730
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: "-" })
|
|
731
|
+
]
|
|
732
|
+
}
|
|
733
|
+
) })
|
|
822
734
|
] }) });
|
|
823
|
-
},
|
|
824
|
-
const { debts: n } = w(), { updateAccount:
|
|
825
|
-
await r({
|
|
826
|
-
...a.account,
|
|
827
|
-
interest_rate: o
|
|
828
|
-
}), a.interest_rate = o, t(C.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
|
|
735
|
+
}, vt = C(Ct), Dt = C(({ debt: r }) => {
|
|
736
|
+
const { debts: n } = w(), { updateAccount: o } = te(), { onEvent: t } = k(), [a, s] = f.useState(r.interest_rate ?? 0), d = a < 0, c = async () => {
|
|
737
|
+
await o({ ...r.account, interest_rate: a }), r.interest_rate = a, t(S.DEBTS_SAVE_RATE_ACTION, { account_guid: r.guid });
|
|
829
738
|
}, m = () => {
|
|
830
739
|
setTimeout(() => {
|
|
831
|
-
s(
|
|
740
|
+
s(r.interest_rate ?? 0);
|
|
832
741
|
}, 250);
|
|
833
742
|
};
|
|
834
|
-
return /* @__PURE__ */ e(
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
743
|
+
return /* @__PURE__ */ e(
|
|
744
|
+
re,
|
|
745
|
+
{
|
|
746
|
+
isSaveDisabled: d,
|
|
747
|
+
label: `${n.details_interest_rate} (%)`,
|
|
748
|
+
onCancel: m,
|
|
749
|
+
onSave: c,
|
|
750
|
+
primaryText: n.details_interest_rate,
|
|
751
|
+
secondaryText: We(Number(r.interest_rate) / 100),
|
|
752
|
+
zeroStateText: r.interest_rate ? void 0 : n.add_interest_rate,
|
|
753
|
+
children: /* @__PURE__ */ e(
|
|
754
|
+
tt,
|
|
755
|
+
{
|
|
756
|
+
error: d,
|
|
757
|
+
fullWidth: !0,
|
|
758
|
+
onChange: (h) => s(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
|
|
759
|
+
type: "number",
|
|
760
|
+
value: a
|
|
761
|
+
}
|
|
762
|
+
)
|
|
763
|
+
}
|
|
764
|
+
);
|
|
765
|
+
}), St = C(({ debt: r }) => {
|
|
766
|
+
const { debts: n } = w(), { updateAccount: o } = te(), { onEvent: t } = k(), [a, s] = f.useState(r.monthly_payment ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
|
|
767
|
+
await o({ ...r.account, minimum_payment: a }), r.monthly_payment = a, t(S.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: r.guid });
|
|
856
768
|
}, m = () => {
|
|
857
769
|
setTimeout(() => {
|
|
858
|
-
s(
|
|
770
|
+
s(r.monthly_payment ?? 0);
|
|
859
771
|
}, 250);
|
|
860
772
|
};
|
|
861
|
-
return /* @__PURE__ */ e(
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
773
|
+
return /* @__PURE__ */ e(
|
|
774
|
+
re,
|
|
775
|
+
{
|
|
776
|
+
isSaveDisabled: d,
|
|
777
|
+
label: n.details_monthly_payment,
|
|
778
|
+
onCancel: m,
|
|
779
|
+
onSave: c,
|
|
780
|
+
primaryText: n.details_monthly_payment,
|
|
781
|
+
secondaryText: I(r.monthly_payment, "0,0"),
|
|
782
|
+
zeroStateText: r.monthly_payment ? void 0 : n.add_monthly_payment,
|
|
783
|
+
children: /* @__PURE__ */ e(
|
|
784
|
+
se,
|
|
785
|
+
{
|
|
786
|
+
amount: a,
|
|
787
|
+
autoFocus: !0,
|
|
788
|
+
error: d,
|
|
789
|
+
fullWidth: !0,
|
|
790
|
+
minAmount: 0,
|
|
791
|
+
setAmount: (h) => s(isNaN(Number(h)) ? a : Number(h)),
|
|
792
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
793
|
+
}
|
|
794
|
+
)
|
|
795
|
+
}
|
|
796
|
+
);
|
|
797
|
+
}), At = C(({ debt: r }) => {
|
|
798
|
+
const { debts: n } = w(), { updateAccount: o } = te(), { onEvent: t } = k(), [a, s] = f.useState(r.original_balance ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
|
|
799
|
+
await o({ ...r.account, original_balance: a }), r.original_balance = a, t(S.DEBTS_SAVE_BALANCE_ACTION, { account_guid: r.guid });
|
|
885
800
|
}, m = () => {
|
|
886
801
|
setTimeout(() => {
|
|
887
|
-
s(
|
|
802
|
+
s(r.original_balance ?? 0);
|
|
888
803
|
}, 250);
|
|
889
804
|
};
|
|
890
|
-
return /* @__PURE__ */ e(
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
805
|
+
return /* @__PURE__ */ e(
|
|
806
|
+
re,
|
|
807
|
+
{
|
|
808
|
+
isSaveDisabled: d,
|
|
809
|
+
label: n.details_original_balance,
|
|
810
|
+
onCancel: m,
|
|
811
|
+
onSave: c,
|
|
812
|
+
primaryText: n.details_original_balance,
|
|
813
|
+
secondaryText: I(r.original_balance, "0,0"),
|
|
814
|
+
zeroStateText: r.original_balance ? void 0 : n.add_original_balance,
|
|
815
|
+
children: /* @__PURE__ */ e(
|
|
816
|
+
se,
|
|
817
|
+
{
|
|
818
|
+
amount: a,
|
|
819
|
+
autoFocus: !0,
|
|
820
|
+
error: d,
|
|
821
|
+
fullWidth: !0,
|
|
822
|
+
minAmount: 0,
|
|
823
|
+
setAmount: (h) => s(isNaN(Number(h)) ? a : Number(h)),
|
|
824
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
825
|
+
}
|
|
826
|
+
)
|
|
827
|
+
}
|
|
828
|
+
);
|
|
908
829
|
}), Tt = () => {
|
|
909
|
-
const { onEvent:
|
|
910
|
-
return
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
/* @__PURE__ */ e(Ue, { goal: n.goal }),
|
|
830
|
+
const { onEvent: r } = k(), { selectedDebtChartData: n } = P();
|
|
831
|
+
return f.useEffect(() => r(S.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ l(y, { bgcolor: "background.paper", children: [
|
|
832
|
+
n?.goal && /* @__PURE__ */ l(R, { children: [
|
|
833
|
+
/* @__PURE__ */ e(Je, { goal: n.goal }),
|
|
914
834
|
/* @__PURE__ */ e(G, {}),
|
|
915
|
-
/* @__PURE__ */ e(
|
|
835
|
+
/* @__PURE__ */ e(Qe, { goal: n.goal }),
|
|
916
836
|
/* @__PURE__ */ e(G, {}),
|
|
917
|
-
/* @__PURE__ */ e(
|
|
837
|
+
/* @__PURE__ */ e(et, { goal: n.goal }),
|
|
918
838
|
/* @__PURE__ */ e(G, {})
|
|
919
|
-
] }),
|
|
839
|
+
] }),
|
|
840
|
+
!n?.goal && n?.account && /* @__PURE__ */ l(R, { children: [
|
|
920
841
|
/* @__PURE__ */ e(St, { debt: n }),
|
|
921
842
|
/* @__PURE__ */ e(G, {}),
|
|
922
843
|
/* @__PURE__ */ e(Dt, { debt: n }),
|
|
923
844
|
/* @__PURE__ */ e(G, {}),
|
|
924
845
|
/* @__PURE__ */ e(At, { debt: n }),
|
|
925
846
|
/* @__PURE__ */ e(G, {})
|
|
926
|
-
] })
|
|
927
|
-
});
|
|
928
|
-
}, Et =
|
|
929
|
-
const { debts:
|
|
930
|
-
return
|
|
931
|
-
t &&
|
|
932
|
-
}, [t]), !t && !
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
mx: 24,
|
|
938
|
-
...n
|
|
939
|
-
},
|
|
940
|
-
children: /* @__PURE__ */ l(ye, {
|
|
941
|
-
icon: t ? /* @__PURE__ */ e(Qe, { filled: !0 }) : /* @__PURE__ */ e(we, {
|
|
942
|
-
color: "success",
|
|
943
|
-
filled: !0
|
|
944
|
-
}),
|
|
847
|
+
] })
|
|
848
|
+
] });
|
|
849
|
+
}, Et = C(Tt), It = ({ setTabValue: r, sx: n }) => {
|
|
850
|
+
const { debts: o } = w(), { showError: t, showCompleted: a } = P();
|
|
851
|
+
return f.useEffect(() => {
|
|
852
|
+
t && r(1);
|
|
853
|
+
}, [t]), !t && !a ? /* @__PURE__ */ e(R, {}) : /* @__PURE__ */ l(y, { gap: 16, children: [
|
|
854
|
+
/* @__PURE__ */ e(ye, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ l(
|
|
855
|
+
me,
|
|
856
|
+
{
|
|
857
|
+
icon: t ? /* @__PURE__ */ e(rt, { filled: !0 }) : /* @__PURE__ */ e(Ce, { color: "success", filled: !0 }),
|
|
945
858
|
severity: "error",
|
|
946
859
|
sx: {
|
|
947
860
|
alignItems: "start",
|
|
@@ -949,268 +862,218 @@ var De = ({ sx: a, height: n = 500, width: r, debts: t, hoveredDebtGuid: o, onCl
|
|
|
949
862
|
borderRadius: 1,
|
|
950
863
|
borderColor: t ? "error.main" : "success.main",
|
|
951
864
|
color: "text.primary",
|
|
952
|
-
"&.MuiPaper-root": {
|
|
865
|
+
"&.MuiPaper-root": {
|
|
866
|
+
backgroundColor: "background.paper"
|
|
867
|
+
}
|
|
953
868
|
},
|
|
954
|
-
children: [
|
|
955
|
-
sx: {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
children: t ? r.status_error_description : r.status_complete_description
|
|
965
|
-
})]
|
|
966
|
-
})
|
|
967
|
-
}), t && /* @__PURE__ */ e(me, {
|
|
968
|
-
sx: {
|
|
969
|
-
mb: 16,
|
|
970
|
-
mt: 100,
|
|
971
|
-
mx: 24,
|
|
972
|
-
...n
|
|
973
|
-
},
|
|
974
|
-
children: /* @__PURE__ */ l(ye, {
|
|
975
|
-
icon: /* @__PURE__ */ e(B, {}),
|
|
869
|
+
children: [
|
|
870
|
+
/* @__PURE__ */ e(_e, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: t ? o.status_error_title : o.status_complete_title }),
|
|
871
|
+
/* @__PURE__ */ e(i, { component: "p", variant: "subtitle2", children: t ? o.status_error_description : o.status_complete_description })
|
|
872
|
+
]
|
|
873
|
+
}
|
|
874
|
+
) }),
|
|
875
|
+
t && /* @__PURE__ */ e(ye, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ l(
|
|
876
|
+
me,
|
|
877
|
+
{
|
|
878
|
+
icon: /* @__PURE__ */ e(R, {}),
|
|
976
879
|
severity: "error",
|
|
977
880
|
sx: {
|
|
978
881
|
borderRadius: 2,
|
|
979
882
|
color: "text.primary",
|
|
980
|
-
"&.MuiPaper-root": {
|
|
883
|
+
"&.MuiPaper-root": {
|
|
884
|
+
backgroundColor: "background.paper"
|
|
885
|
+
}
|
|
981
886
|
},
|
|
982
|
-
children: [
|
|
983
|
-
sx: {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
children: r.status_info_title
|
|
989
|
-
}), /* @__PURE__ */ e(i, {
|
|
990
|
-
component: "p",
|
|
991
|
-
variant: "subtitle2",
|
|
992
|
-
children: r.status_info_description
|
|
993
|
-
})]
|
|
994
|
-
})
|
|
995
|
-
})]
|
|
996
|
-
});
|
|
997
|
-
}, kt = v(It), Nt = () => {
|
|
998
|
-
const { debts: a } = w(), { showError: n, showCompleted: r } = M(), [t, o] = g.useState(0);
|
|
999
|
-
return /* @__PURE__ */ l(B, { children: [
|
|
1000
|
-
(n || r) && /* @__PURE__ */ e(kt, {
|
|
1001
|
-
setTabValue: o,
|
|
1002
|
-
sx: { mt: -24 }
|
|
1003
|
-
}),
|
|
1004
|
-
/* @__PURE__ */ l(tt, {
|
|
1005
|
-
"aria-label": a.details_tabs_aria_label,
|
|
1006
|
-
centered: !0,
|
|
1007
|
-
onChange: (s, p) => o(p),
|
|
1008
|
-
textColor: "primary",
|
|
1009
|
-
value: t,
|
|
1010
|
-
variant: "fullWidth",
|
|
1011
|
-
children: [/* @__PURE__ */ e(_e, {
|
|
1012
|
-
"aria-controls": "debt-schedule-tabpanel-0",
|
|
1013
|
-
id: "debt-schedule-tab-0",
|
|
1014
|
-
label: a.schedule_tab_label
|
|
1015
|
-
}), /* @__PURE__ */ e(_e, {
|
|
1016
|
-
"aria-controls": "debt-details-tabpanel-1",
|
|
1017
|
-
id: "debt-details-tab-1",
|
|
1018
|
-
label: a.details_tab_label
|
|
1019
|
-
})]
|
|
1020
|
-
}),
|
|
1021
|
-
/* @__PURE__ */ e(be, {
|
|
1022
|
-
index: 0,
|
|
1023
|
-
name: "debt-schedule",
|
|
1024
|
-
value: t,
|
|
1025
|
-
children: /* @__PURE__ */ e(Ct, {})
|
|
1026
|
-
}),
|
|
1027
|
-
/* @__PURE__ */ e(be, {
|
|
1028
|
-
index: 1,
|
|
1029
|
-
name: "debt-details",
|
|
1030
|
-
value: t,
|
|
1031
|
-
children: /* @__PURE__ */ e(Et, {})
|
|
1032
|
-
})
|
|
887
|
+
children: [
|
|
888
|
+
/* @__PURE__ */ e(_e, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: o.status_info_title }),
|
|
889
|
+
/* @__PURE__ */ e(i, { component: "p", variant: "subtitle2", children: o.status_info_description })
|
|
890
|
+
]
|
|
891
|
+
}
|
|
892
|
+
) })
|
|
1033
893
|
] });
|
|
1034
|
-
}, Mt =
|
|
1035
|
-
const { debts: r } = w(), { showError:
|
|
1036
|
-
return /* @__PURE__ */
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
894
|
+
}, Mt = C(It), kt = () => {
|
|
895
|
+
const { debts: r } = w(), { showError: n, showCompleted: o } = P(), [t, a] = f.useState(0);
|
|
896
|
+
return /* @__PURE__ */ l(R, { children: [
|
|
897
|
+
(n || o) && /* @__PURE__ */ e(Mt, { setTabValue: a, sx: { mt: -24 } }),
|
|
898
|
+
/* @__PURE__ */ l(
|
|
899
|
+
Ze,
|
|
900
|
+
{
|
|
901
|
+
"aria-label": r.details_tabs_aria_label,
|
|
902
|
+
centered: !0,
|
|
903
|
+
onChange: (s, d) => a(d),
|
|
904
|
+
textColor: "primary",
|
|
905
|
+
value: t,
|
|
906
|
+
variant: "fullWidth",
|
|
907
|
+
children: [
|
|
908
|
+
/* @__PURE__ */ e(
|
|
909
|
+
be,
|
|
910
|
+
{
|
|
911
|
+
"aria-controls": "debt-schedule-tabpanel-0",
|
|
912
|
+
id: "debt-schedule-tab-0",
|
|
913
|
+
label: r.schedule_tab_label
|
|
914
|
+
}
|
|
915
|
+
),
|
|
916
|
+
/* @__PURE__ */ e(
|
|
917
|
+
be,
|
|
918
|
+
{
|
|
919
|
+
"aria-controls": "debt-details-tabpanel-1",
|
|
920
|
+
id: "debt-details-tab-1",
|
|
921
|
+
label: r.details_tab_label
|
|
922
|
+
}
|
|
923
|
+
)
|
|
924
|
+
]
|
|
925
|
+
}
|
|
926
|
+
),
|
|
927
|
+
/* @__PURE__ */ e(fe, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(vt, {}) }),
|
|
928
|
+
/* @__PURE__ */ e(fe, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(Et, {}) })
|
|
929
|
+
] });
|
|
930
|
+
}, Nt = C(kt), Bt = ({ isOpen: r, onClose: n }) => {
|
|
931
|
+
const { debts: o } = w(), { showError: t, showCompleted: a } = P(), s = t || a ? /* @__PURE__ */ e(R, {}) : /* @__PURE__ */ e(wt, {});
|
|
932
|
+
return /* @__PURE__ */ e(
|
|
933
|
+
ie,
|
|
934
|
+
{
|
|
935
|
+
ariaLabelClose: o.details_close_aria,
|
|
936
|
+
isOpen: r,
|
|
937
|
+
onClose: n,
|
|
938
|
+
title: o.details_title,
|
|
939
|
+
children: /* @__PURE__ */ l(y, { bgcolor: "background.default", children: [
|
|
940
|
+
/* @__PURE__ */ e(je, { customDetailsChart: s }),
|
|
941
|
+
/* @__PURE__ */ e(Nt, {})
|
|
942
|
+
] })
|
|
943
|
+
}
|
|
944
|
+
);
|
|
945
|
+
}, Pt = C(() => {
|
|
946
|
+
const { debts: r } = w(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: o } = V(), { onEvent: t } = k(), [a, s] = f.useState(n?.extra_payment ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
|
|
947
|
+
n && (await o({ ...n, extra_payment: a }), n.extra_payment = a, t(S.DEBTS_SAVE_PAYDOWN_ACTION, {
|
|
948
|
+
user_guid: n?.user_guid
|
|
949
|
+
}));
|
|
1052
950
|
}, m = () => {
|
|
1053
951
|
setTimeout(() => {
|
|
1054
952
|
s(n?.extra_payment ?? 0);
|
|
1055
953
|
}, 250);
|
|
1056
954
|
};
|
|
1057
|
-
return /* @__PURE__ */ e(
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
955
|
+
return /* @__PURE__ */ e(
|
|
956
|
+
re,
|
|
957
|
+
{
|
|
958
|
+
isSaveDisabled: d,
|
|
959
|
+
label: r.paydown_drawer_extra_payment,
|
|
960
|
+
onCancel: m,
|
|
961
|
+
onSave: c,
|
|
962
|
+
primaryText: r.paydown_drawer_extra_payment,
|
|
963
|
+
secondaryText: I(n?.extra_payment, "0,0"),
|
|
964
|
+
zeroStateText: n?.extra_payment ? void 0 : r.add_extra_payment,
|
|
965
|
+
children: /* @__PURE__ */ e(
|
|
966
|
+
se,
|
|
967
|
+
{
|
|
968
|
+
amount: a,
|
|
969
|
+
autoFocus: !0,
|
|
970
|
+
error: d,
|
|
971
|
+
fullWidth: !0,
|
|
972
|
+
minAmount: 0,
|
|
973
|
+
setAmount: (h) => s(isNaN(Number(h)) ? a : Number(h)),
|
|
974
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
975
|
+
}
|
|
976
|
+
)
|
|
977
|
+
}
|
|
978
|
+
);
|
|
1075
979
|
}), Rt = () => {
|
|
1076
|
-
const { debts:
|
|
1077
|
-
return /* @__PURE__ */ l(y, {
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
}), /* @__PURE__ */ l(y, { children: [/* @__PURE__ */ e(i, {
|
|
1108
|
-
variant: "h3",
|
|
1109
|
-
children: a.paydown_drawer_subtitle
|
|
1110
|
-
}), /* @__PURE__ */ e(i, {
|
|
1111
|
-
truncate: !1,
|
|
1112
|
-
variant: "subtitle2",
|
|
1113
|
-
children: a.paydown_drawer_description
|
|
1114
|
-
})] })]
|
|
1115
|
-
}),
|
|
1116
|
-
/* @__PURE__ */ e(y, {
|
|
1117
|
-
sx: { backgroundColor: "background.paper" },
|
|
1118
|
-
children: /* @__PURE__ */ e(Pt, {})
|
|
1119
|
-
}),
|
|
1120
|
-
/* @__PURE__ */ e(y, {
|
|
1121
|
-
flexDirection: "row-reverse",
|
|
1122
|
-
px: 24,
|
|
1123
|
-
py: 12,
|
|
1124
|
-
children: /* @__PURE__ */ l(y, {
|
|
1125
|
-
gap: 4,
|
|
1126
|
-
children: [/* @__PURE__ */ e(i, {
|
|
1127
|
-
variant: "body2",
|
|
1128
|
-
children: a.paydown_drawer_total_payment
|
|
1129
|
-
}), /* @__PURE__ */ e(i, {
|
|
1130
|
-
bold: !0,
|
|
1131
|
-
textAlign: "right",
|
|
1132
|
-
variant: "body1",
|
|
1133
|
-
children: A(t, "0,0")
|
|
1134
|
-
})]
|
|
1135
|
-
})
|
|
1136
|
-
})
|
|
1137
|
-
]
|
|
1138
|
-
});
|
|
1139
|
-
}, Lt = v(Rt), Ft = ({ isOpen: a, onClose: n }) => {
|
|
1140
|
-
const { debts: r } = w();
|
|
1141
|
-
return /* @__PURE__ */ e(ie, {
|
|
1142
|
-
ariaLabelClose: r.paydown_drawer_close_aria,
|
|
1143
|
-
isOpen: a,
|
|
1144
|
-
onClose: n,
|
|
1145
|
-
title: r.paydown_drawer_title,
|
|
1146
|
-
children: /* @__PURE__ */ e(Lt, {})
|
|
1147
|
-
});
|
|
980
|
+
const { debts: r } = w(), { totalMonthlyPayments: n } = ee(), { monthlyCashFlowProfile: o } = V(), t = n + Number(o?.extra_payment);
|
|
981
|
+
return /* @__PURE__ */ l(y, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
982
|
+
/* @__PURE__ */ l(y, { p: 24, children: [
|
|
983
|
+
/* @__PURE__ */ l(y, { alignItems: "center", gap: 4, mb: 24, children: [
|
|
984
|
+
/* @__PURE__ */ e(i, { variant: "body1", children: r.paydown_drawer_mimimum_label }),
|
|
985
|
+
/* @__PURE__ */ e(xe, { bold: !0, variant: "h1", children: I(n, "0,0") }),
|
|
986
|
+
/* @__PURE__ */ e(i, { textAlign: "center", truncate: !1, variant: "body2", width: 208, children: r.paydown_drawer_minimum_info })
|
|
987
|
+
] }),
|
|
988
|
+
/* @__PURE__ */ l(y, { children: [
|
|
989
|
+
/* @__PURE__ */ e(i, { variant: "h3", children: r.paydown_drawer_subtitle }),
|
|
990
|
+
/* @__PURE__ */ e(i, { truncate: !1, variant: "subtitle2", children: r.paydown_drawer_description })
|
|
991
|
+
] })
|
|
992
|
+
] }),
|
|
993
|
+
/* @__PURE__ */ e(y, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Pt, {}) }),
|
|
994
|
+
/* @__PURE__ */ e(y, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ l(y, { gap: 4, children: [
|
|
995
|
+
/* @__PURE__ */ e(i, { variant: "body2", children: r.paydown_drawer_total_payment }),
|
|
996
|
+
/* @__PURE__ */ e(i, { bold: !0, textAlign: "right", variant: "body1", children: I(t, "0,0") })
|
|
997
|
+
] }) })
|
|
998
|
+
] });
|
|
999
|
+
}, Lt = C(Rt), Ft = ({ isOpen: r, onClose: n }) => {
|
|
1000
|
+
const { debts: o } = w();
|
|
1001
|
+
return /* @__PURE__ */ e(
|
|
1002
|
+
ie,
|
|
1003
|
+
{
|
|
1004
|
+
ariaLabelClose: o.paydown_drawer_close_aria,
|
|
1005
|
+
isOpen: r,
|
|
1006
|
+
onClose: n,
|
|
1007
|
+
title: o.paydown_drawer_title,
|
|
1008
|
+
children: /* @__PURE__ */ e(Lt, {})
|
|
1009
|
+
}
|
|
1010
|
+
);
|
|
1148
1011
|
};
|
|
1149
|
-
function $t(
|
|
1150
|
-
const
|
|
1012
|
+
function $t(r, n) {
|
|
1013
|
+
const o = (t) => {
|
|
1151
1014
|
if (typeof t == "number") return t;
|
|
1152
1015
|
if (t === "!" || t === "✓") return 1 / 0;
|
|
1153
1016
|
throw new Error("Unsupported value");
|
|
1154
1017
|
};
|
|
1155
|
-
return r
|
|
1018
|
+
return o(r) - o(n);
|
|
1156
1019
|
}
|
|
1157
|
-
function Ot(
|
|
1158
|
-
return
|
|
1020
|
+
function Ot(r) {
|
|
1021
|
+
return r.is_paid_off ? "✓" : r.priority === void 0 || r.is_impossible ? "!" : r.priority;
|
|
1159
1022
|
}
|
|
1160
|
-
|
|
1023
|
+
const Wt = (r) => {
|
|
1161
1024
|
const n = {
|
|
1162
1025
|
text: "#121417",
|
|
1163
1026
|
background: "#FFB252"
|
|
1164
1027
|
};
|
|
1165
|
-
return
|
|
1166
|
-
}, Gt = (
|
|
1167
|
-
const n = String(
|
|
1168
|
-
return /* @__PURE__ */ e(
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
variant: "body2",
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
sort: "asc"
|
|
1209
|
-
|
|
1028
|
+
return r === "!" && (n.text = "#FFFFFF", n.background = "#DF320C"), r === "✓" && (n.text = "#FFFFFF", n.background = "#09A57F"), n;
|
|
1029
|
+
}, Gt = (r) => {
|
|
1030
|
+
const n = String(r.formattedValue), o = Wt(n);
|
|
1031
|
+
return /* @__PURE__ */ e(
|
|
1032
|
+
le,
|
|
1033
|
+
{
|
|
1034
|
+
sx: {
|
|
1035
|
+
display: "flex",
|
|
1036
|
+
alignItems: "center",
|
|
1037
|
+
justifyContent: "center",
|
|
1038
|
+
width: 20,
|
|
1039
|
+
// Adjust the size as needed
|
|
1040
|
+
height: 20,
|
|
1041
|
+
borderRadius: "50%",
|
|
1042
|
+
backgroundColor: o.background,
|
|
1043
|
+
marginLeft: "10px"
|
|
1044
|
+
},
|
|
1045
|
+
children: /* @__PURE__ */ e(i, { color: o.text, fontWeight: 700, variant: "body2", children: n })
|
|
1046
|
+
}
|
|
1047
|
+
);
|
|
1048
|
+
}, Ht = (r) => {
|
|
1049
|
+
const n = r.row.account, o = nt[n.account_type];
|
|
1050
|
+
return /* @__PURE__ */ l(y, { alignItems: "center", flexDirection: "row", children: [
|
|
1051
|
+
/* @__PURE__ */ e(
|
|
1052
|
+
Pe,
|
|
1053
|
+
{
|
|
1054
|
+
alt: `${n.institutionName}`,
|
|
1055
|
+
institutionGuid: n.institution_guid || ""
|
|
1056
|
+
}
|
|
1057
|
+
),
|
|
1058
|
+
/* @__PURE__ */ l(y, { ml: 12, children: [
|
|
1059
|
+
/* @__PURE__ */ e(i, { variant: "body2", children: n.name }),
|
|
1060
|
+
/* @__PURE__ */ e(i, { variant: "caption", children: o })
|
|
1061
|
+
] })
|
|
1062
|
+
] });
|
|
1063
|
+
}, zt = ({
|
|
1064
|
+
sx: r = {},
|
|
1065
|
+
debts: n,
|
|
1066
|
+
hoveredDebtGuid: o,
|
|
1067
|
+
onHoverRow: t,
|
|
1068
|
+
onClickRow: a
|
|
1069
|
+
}) => {
|
|
1070
|
+
const s = j(), { onEvent: d } = k(), { isMobile: c } = ae(), { debts: m, common: h } = w(), [b, v] = f.useState([
|
|
1071
|
+
{ field: "priority", sort: "asc" }
|
|
1072
|
+
]), x = [
|
|
1210
1073
|
{
|
|
1211
1074
|
field: "priority",
|
|
1212
1075
|
headerName: m.table_column_priority,
|
|
1213
|
-
renderHeader:
|
|
1076
|
+
renderHeader: H,
|
|
1214
1077
|
renderCell: Gt,
|
|
1215
1078
|
sortComparator: $t,
|
|
1216
1079
|
sortable: !0,
|
|
@@ -1224,7 +1087,7 @@ var Wt = (a) => {
|
|
|
1224
1087
|
{
|
|
1225
1088
|
field: "account",
|
|
1226
1089
|
headerName: m.table_column_account,
|
|
1227
|
-
renderHeader:
|
|
1090
|
+
renderHeader: H,
|
|
1228
1091
|
renderCell: Ht,
|
|
1229
1092
|
sortable: !1,
|
|
1230
1093
|
type: "custom",
|
|
@@ -1236,12 +1099,8 @@ var Wt = (a) => {
|
|
|
1236
1099
|
{
|
|
1237
1100
|
field: "balance",
|
|
1238
1101
|
headerName: m.table_column_balance,
|
|
1239
|
-
renderHeader:
|
|
1240
|
-
renderCell: (_) => /* @__PURE__ */ e(i, {
|
|
1241
|
-
color: s.palette.text.primary,
|
|
1242
|
-
variant: "body2",
|
|
1243
|
-
children: A(_.value, "0,0")
|
|
1244
|
-
}),
|
|
1102
|
+
renderHeader: H,
|
|
1103
|
+
renderCell: (_) => /* @__PURE__ */ e(i, { color: s.palette.text.primary, variant: "body2", children: I(_.value, "0,0") }),
|
|
1245
1104
|
sortable: !0,
|
|
1246
1105
|
hideSortIcons: c,
|
|
1247
1106
|
type: "number",
|
|
@@ -1253,12 +1112,8 @@ var Wt = (a) => {
|
|
|
1253
1112
|
{
|
|
1254
1113
|
field: "interest_rate",
|
|
1255
1114
|
headerName: m.table_column_interest_rate,
|
|
1256
|
-
renderHeader:
|
|
1257
|
-
renderCell: (_) => /* @__PURE__ */ e(i, {
|
|
1258
|
-
color: s.palette.text.primary,
|
|
1259
|
-
variant: "body2",
|
|
1260
|
-
children: isNaN(_.value) ? "---" : `${Number(_.value).toFixed(2)}%`
|
|
1261
|
-
}),
|
|
1115
|
+
renderHeader: H,
|
|
1116
|
+
renderCell: (_) => /* @__PURE__ */ e(i, { color: s.palette.text.primary, variant: "body2", children: isNaN(_.value) ? "---" : `${Number(_.value).toFixed(2)}%` }),
|
|
1262
1117
|
sortable: !0,
|
|
1263
1118
|
hideSortIcons: c,
|
|
1264
1119
|
type: "number",
|
|
@@ -1270,12 +1125,8 @@ var Wt = (a) => {
|
|
|
1270
1125
|
{
|
|
1271
1126
|
field: "projected_payoff_date",
|
|
1272
1127
|
headerName: m.table_column_payoff_date,
|
|
1273
|
-
renderHeader:
|
|
1274
|
-
renderCell: (_) => /* @__PURE__ */ e(i, {
|
|
1275
|
-
color: s.palette.text.primary,
|
|
1276
|
-
variant: "body2",
|
|
1277
|
-
children: _.value ? Q(_.value, Z.MONTH_SHORT_YEAR) : "---"
|
|
1278
|
-
}),
|
|
1128
|
+
renderHeader: H,
|
|
1129
|
+
renderCell: (_) => /* @__PURE__ */ e(i, { color: s.palette.text.primary, variant: "body2", children: _.value ? J(_.value, Q.MONTH_SHORT_YEAR) : "---" }),
|
|
1279
1130
|
sortable: !0,
|
|
1280
1131
|
hideSortIcons: c,
|
|
1281
1132
|
type: "number",
|
|
@@ -1287,12 +1138,8 @@ var Wt = (a) => {
|
|
|
1287
1138
|
{
|
|
1288
1139
|
field: "monthly_payment",
|
|
1289
1140
|
headerName: m.table_column_amount_due,
|
|
1290
|
-
renderHeader:
|
|
1291
|
-
renderCell: (_) => /* @__PURE__ */ e(i, {
|
|
1292
|
-
color: s.palette.text.primary,
|
|
1293
|
-
variant: "body2",
|
|
1294
|
-
children: typeof _.value == "number" ? A(_.value, "0,0") : "---"
|
|
1295
|
-
}),
|
|
1141
|
+
renderHeader: H,
|
|
1142
|
+
renderCell: (_) => /* @__PURE__ */ e(i, { color: s.palette.text.primary, variant: "body2", children: typeof _.value == "number" ? I(_.value, "0,0") : "---" }),
|
|
1296
1143
|
sortable: !0,
|
|
1297
1144
|
hideSortIcons: c,
|
|
1298
1145
|
type: "number",
|
|
@@ -1301,309 +1148,351 @@ var Wt = (a) => {
|
|
|
1301
1148
|
minWidth: 122,
|
|
1302
1149
|
flex: 0.6
|
|
1303
1150
|
}
|
|
1304
|
-
],
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
"
|
|
1310
|
-
role: "button",
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
}], k = g.useMemo(() => n.map((_, d) => ({
|
|
1151
|
+
], L = [
|
|
1152
|
+
...x.slice(0, 3),
|
|
1153
|
+
{
|
|
1154
|
+
field: "chevron",
|
|
1155
|
+
headerClassName: "chevron-header",
|
|
1156
|
+
headerName: "",
|
|
1157
|
+
renderCell: () => /* @__PURE__ */ e(u, { "aria-label": h.see_details, role: "button", children: /* @__PURE__ */ e(ne, { name: "chevron_right" }) }),
|
|
1158
|
+
sortable: !1,
|
|
1159
|
+
hideSortIcons: !0,
|
|
1160
|
+
type: "custom",
|
|
1161
|
+
align: "right",
|
|
1162
|
+
headerAlign: "right",
|
|
1163
|
+
width: 20
|
|
1164
|
+
}
|
|
1165
|
+
], F = f.useMemo(() => n.map((_, p) => ({
|
|
1320
1166
|
..._,
|
|
1321
|
-
id:
|
|
1167
|
+
id: p,
|
|
1322
1168
|
priority: Ot(_)
|
|
1323
1169
|
})), [n]), N = (_) => {
|
|
1324
|
-
const
|
|
1325
|
-
t?.(
|
|
1326
|
-
},
|
|
1170
|
+
const D = _.target.closest("[data-id]")?.getAttribute("data-id"), M = n[Number(D)];
|
|
1171
|
+
t?.(M?.guid ?? "");
|
|
1172
|
+
}, A = (_) => {
|
|
1327
1173
|
c || N(_);
|
|
1328
|
-
},
|
|
1174
|
+
}, E = (_) => {
|
|
1329
1175
|
c && N(_);
|
|
1330
|
-
},
|
|
1331
|
-
return /* @__PURE__ */ e(
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
width: "100%",
|
|
1335
|
-
mt: "15px",
|
|
1336
|
-
overflowX: "auto",
|
|
1337
|
-
overflowY: "visible",
|
|
1338
|
-
boxShadow: "none",
|
|
1339
|
-
...a
|
|
1340
|
-
},
|
|
1341
|
-
children: /* @__PURE__ */ e(ut, {
|
|
1342
|
-
columns: c ? F : x,
|
|
1343
|
-
disableColumnFilter: !0,
|
|
1344
|
-
disableColumnMenu: !0,
|
|
1345
|
-
hideFooter: !0,
|
|
1346
|
-
initialState: { sorting: { sortModel: b } },
|
|
1347
|
-
onRowClick: (_) => {
|
|
1348
|
-
o(), p(C.DEBTS_CLICK_TABLE_ROW, { account_guid: _.row.guid });
|
|
1349
|
-
},
|
|
1350
|
-
onSortModelChange: (_) => {
|
|
1351
|
-
I(_), p(C.DEBTS_CLICK_TABLE_SORT);
|
|
1352
|
-
},
|
|
1353
|
-
rows: k,
|
|
1354
|
-
slotProps: {
|
|
1355
|
-
baseIconButton: {
|
|
1356
|
-
color: "secondary",
|
|
1357
|
-
sx: { ml: 8 }
|
|
1358
|
-
},
|
|
1359
|
-
row: {
|
|
1360
|
-
onMouseEnter: D,
|
|
1361
|
-
onMouseLeave: () => !c && t?.(""),
|
|
1362
|
-
onTouchStart: P,
|
|
1363
|
-
onClick: c ? P : void 0
|
|
1364
|
-
}
|
|
1365
|
-
},
|
|
1366
|
-
sortModel: b,
|
|
1367
|
-
sortingOrder: ["asc", "desc"],
|
|
1176
|
+
}, Y = (_) => F.find((p) => p.guid === _)?.id;
|
|
1177
|
+
return /* @__PURE__ */ e(
|
|
1178
|
+
le,
|
|
1179
|
+
{
|
|
1368
1180
|
sx: {
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1181
|
+
height: "auto",
|
|
1182
|
+
width: "100%",
|
|
1183
|
+
mt: "15px",
|
|
1184
|
+
overflowX: "auto",
|
|
1185
|
+
overflowY: "visible",
|
|
1186
|
+
boxShadow: "none",
|
|
1187
|
+
...r
|
|
1188
|
+
},
|
|
1189
|
+
children: /* @__PURE__ */ e(
|
|
1190
|
+
ot,
|
|
1191
|
+
{
|
|
1192
|
+
columns: c ? L : x,
|
|
1193
|
+
disableColumnFilter: !0,
|
|
1194
|
+
disableColumnMenu: !0,
|
|
1195
|
+
hideFooter: !0,
|
|
1196
|
+
initialState: { sorting: { sortModel: b } },
|
|
1197
|
+
onRowClick: (_) => {
|
|
1198
|
+
a(), d(S.DEBTS_CLICK_TABLE_ROW, { account_guid: _.row.guid });
|
|
1199
|
+
},
|
|
1200
|
+
onSortModelChange: (_) => {
|
|
1201
|
+
v(_), d(S.DEBTS_CLICK_TABLE_SORT);
|
|
1202
|
+
},
|
|
1203
|
+
rows: F,
|
|
1204
|
+
slotProps: {
|
|
1205
|
+
baseIconButton: { color: "secondary", sx: { ml: 8 } },
|
|
1206
|
+
row: {
|
|
1207
|
+
onMouseEnter: A,
|
|
1208
|
+
onMouseLeave: () => !c && t?.(""),
|
|
1209
|
+
onTouchStart: E,
|
|
1210
|
+
onClick: c ? E : void 0
|
|
1211
|
+
}
|
|
1212
|
+
},
|
|
1213
|
+
sortModel: b,
|
|
1214
|
+
sortingOrder: ["asc", "desc"],
|
|
1215
|
+
sx: {
|
|
1216
|
+
"& .chevron-header": { display: "none" },
|
|
1217
|
+
[`& .MuiDataGrid-row[data-id="${Y(o)}"]`]: {
|
|
1218
|
+
backgroundColor: s.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
|
|
1219
|
+
filter: "brightness(98%)"
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1373
1222
|
}
|
|
1374
|
-
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
}, jt = ({
|
|
1223
|
+
)
|
|
1224
|
+
}
|
|
1225
|
+
);
|
|
1226
|
+
}, jt = ({
|
|
1227
|
+
buttonText: r,
|
|
1228
|
+
disabled: n,
|
|
1229
|
+
isDesktop: o = !1,
|
|
1230
|
+
isOpen: t,
|
|
1231
|
+
onClick: a
|
|
1232
|
+
}) => {
|
|
1378
1233
|
const s = t ? "unfold_less" : "unfold_more";
|
|
1379
|
-
return
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1234
|
+
return o ? /* @__PURE__ */ e(
|
|
1235
|
+
ve,
|
|
1236
|
+
{
|
|
1237
|
+
"aria-controls": "prioritize-debts",
|
|
1238
|
+
"aria-describedby": "prioritize-debts",
|
|
1239
|
+
"aria-haspopup": !0,
|
|
1240
|
+
"aria-label": "prioritize-debts",
|
|
1241
|
+
disabled: n,
|
|
1242
|
+
onClick: a,
|
|
1243
|
+
startIcon: /* @__PURE__ */ e(ne, { name: s }),
|
|
1244
|
+
sx: { justifyContent: "start" },
|
|
1245
|
+
children: r
|
|
1246
|
+
}
|
|
1247
|
+
) : /* @__PURE__ */ e(
|
|
1248
|
+
at,
|
|
1249
|
+
{
|
|
1250
|
+
"aria-controls": "prioritize-debts",
|
|
1251
|
+
"aria-describedby": "prioritize-debts",
|
|
1252
|
+
"aria-haspopup": !0,
|
|
1253
|
+
"aria-label": "prioritize-debts",
|
|
1254
|
+
disabled: n,
|
|
1255
|
+
onClick: a,
|
|
1256
|
+
children: /* @__PURE__ */ e(ne, { name: s })
|
|
1257
|
+
}
|
|
1258
|
+
);
|
|
1259
|
+
}, Vt = C(({ buttonEl: r, onClose: n }) => {
|
|
1260
|
+
const { onEvent: o } = k(), { debts: t } = w(), { selectedDebtPriority: a, setSelectedDebtPriority: s } = P(), d = !!r, c = [
|
|
1400
1261
|
{
|
|
1401
|
-
priority:
|
|
1262
|
+
priority: $.FASTEST_PAYOFF_FIRST,
|
|
1402
1263
|
text: t.priority_sort_fastest_payoff
|
|
1403
1264
|
},
|
|
1404
1265
|
{
|
|
1405
|
-
priority:
|
|
1266
|
+
priority: $.HIGHEST_INTEREST,
|
|
1406
1267
|
text: t.priority_sort_highest_interest
|
|
1407
1268
|
},
|
|
1408
1269
|
{
|
|
1409
|
-
priority:
|
|
1270
|
+
priority: $.LOWEST_BALANCE,
|
|
1410
1271
|
text: t.priority_sort_lowest_balance
|
|
1411
1272
|
},
|
|
1412
1273
|
{
|
|
1413
|
-
priority:
|
|
1274
|
+
priority: $.HIGHEST_BALANCE,
|
|
1414
1275
|
text: t.priority_sort_highest_balance
|
|
1415
1276
|
}
|
|
1416
1277
|
], m = (h) => {
|
|
1417
|
-
s(h),
|
|
1278
|
+
s(h), o(S.DEBTS_CLICK_PRIORITY, { debts_priority: h });
|
|
1418
1279
|
};
|
|
1419
|
-
return /* @__PURE__ */ e(
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
onClose: n,
|
|
1427
|
-
open: p,
|
|
1428
|
-
transformOrigin: {
|
|
1429
|
-
vertical: "top",
|
|
1430
|
-
horizontal: "left"
|
|
1431
|
-
},
|
|
1432
|
-
children: /* @__PURE__ */ e(Ce, { children: c.map(({ priority: h, text: b }) => /* @__PURE__ */ l(ct, {
|
|
1433
|
-
onClick: () => m(h),
|
|
1434
|
-
sx: {
|
|
1435
|
-
bgcolor: o === h ? "primary.main" : void 0,
|
|
1436
|
-
color: o === h ? "#fff" : void 0,
|
|
1437
|
-
justifyContent: "space-between",
|
|
1438
|
-
minHeight: 44,
|
|
1439
|
-
minWidth: 268,
|
|
1440
|
-
px: 24,
|
|
1441
|
-
py: 12,
|
|
1442
|
-
"&:hover": {
|
|
1443
|
-
bgcolor: "background.highlight",
|
|
1444
|
-
cursor: "pointer",
|
|
1445
|
-
color: "text.primary"
|
|
1446
|
-
}
|
|
1280
|
+
return /* @__PURE__ */ e(
|
|
1281
|
+
lt,
|
|
1282
|
+
{
|
|
1283
|
+
anchorEl: r,
|
|
1284
|
+
anchorOrigin: {
|
|
1285
|
+
vertical: "bottom",
|
|
1286
|
+
horizontal: "left"
|
|
1447
1287
|
},
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1288
|
+
id: "prioritize-debts",
|
|
1289
|
+
onClose: n,
|
|
1290
|
+
open: d,
|
|
1291
|
+
transformOrigin: {
|
|
1292
|
+
vertical: "top",
|
|
1293
|
+
horizontal: "left"
|
|
1294
|
+
},
|
|
1295
|
+
children: /* @__PURE__ */ e(we, { children: c.map(({ priority: h, text: b }) => /* @__PURE__ */ l(
|
|
1296
|
+
it,
|
|
1297
|
+
{
|
|
1298
|
+
onClick: () => m(h),
|
|
1299
|
+
sx: {
|
|
1300
|
+
bgcolor: a === h ? "primary.main" : void 0,
|
|
1301
|
+
color: a === h ? "#fff" : void 0,
|
|
1302
|
+
justifyContent: "space-between",
|
|
1303
|
+
minHeight: 44,
|
|
1304
|
+
minWidth: 268,
|
|
1305
|
+
px: 24,
|
|
1306
|
+
py: 12,
|
|
1307
|
+
"&:hover": {
|
|
1308
|
+
bgcolor: "background.highlight",
|
|
1309
|
+
cursor: "pointer",
|
|
1310
|
+
color: "text.primary"
|
|
1311
|
+
}
|
|
1312
|
+
},
|
|
1313
|
+
children: [
|
|
1314
|
+
/* @__PURE__ */ e(i, { color: "inherit", variant: "body2", children: b }),
|
|
1315
|
+
a === h && /* @__PURE__ */ e(Ce, { color: "inherit", filled: !0, fontSize: "small" })
|
|
1316
|
+
]
|
|
1317
|
+
},
|
|
1318
|
+
h
|
|
1319
|
+
)) })
|
|
1320
|
+
}
|
|
1321
|
+
);
|
|
1322
|
+
}), Yt = C(({ disabled: r, isDesktop: n }) => {
|
|
1323
|
+
const { onEvent: o } = k(), { debts: t } = w(), { selectedDebtPriority: a } = P(), [s, d] = f.useState(null), c = (v) => {
|
|
1324
|
+
d(v.currentTarget), o(S.DEBTS_CLICK_PRIORITIZE);
|
|
1462
1325
|
}, m = () => {
|
|
1463
|
-
|
|
1464
|
-
}, h = !!s
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
children: /* @__PURE__ */ e(xe, {
|
|
1326
|
+
d(null);
|
|
1327
|
+
}, h = !!s, b = f.useMemo(() => ({
|
|
1328
|
+
[$.FASTEST_PAYOFF_FIRST]: t.priority_sort_fastest_payoff,
|
|
1329
|
+
[$.HIGHEST_INTEREST]: t.priority_sort_highest_interest,
|
|
1330
|
+
[$.HIGHEST_BALANCE]: t.priority_sort_highest_balance,
|
|
1331
|
+
[$.LOWEST_BALANCE]: t.priority_sort_lowest_balance
|
|
1332
|
+
})[a] ?? t.priority_sort_lowest_balance, [a]);
|
|
1333
|
+
return /* @__PURE__ */ l(u, { children: [
|
|
1334
|
+
/* @__PURE__ */ e(
|
|
1335
|
+
jt,
|
|
1336
|
+
{
|
|
1337
|
+
buttonText: b,
|
|
1338
|
+
disabled: r,
|
|
1339
|
+
isDesktop: n,
|
|
1340
|
+
isOpen: h,
|
|
1341
|
+
onClick: c
|
|
1342
|
+
}
|
|
1343
|
+
),
|
|
1344
|
+
/* @__PURE__ */ e(Vt, { buttonEl: s, onClose: m })
|
|
1345
|
+
] });
|
|
1346
|
+
}), Kt = C(({ disabled: r, onClick: n }) => {
|
|
1347
|
+
const { debts: o } = w(), { totalMonthlyPayments: t } = ee(), { monthlyCashFlowProfile: a } = V(), s = t + Number(a?.extra_payment), d = o.paydown_button_long;
|
|
1348
|
+
return /* @__PURE__ */ e(y, { alignItems: "center", sx: { flex: 1, flexShrink: 0 }, children: /* @__PURE__ */ e(
|
|
1349
|
+
ve,
|
|
1350
|
+
{
|
|
1489
1351
|
"aria-controls": "extra-paydown",
|
|
1490
1352
|
"aria-describedby": "extra-paydown",
|
|
1491
1353
|
"aria-haspopup": !0,
|
|
1492
1354
|
"aria-label": "extra-paydown",
|
|
1493
|
-
disabled:
|
|
1355
|
+
disabled: r,
|
|
1494
1356
|
onClick: n,
|
|
1495
1357
|
sx: { justifyContent: "start" },
|
|
1496
|
-
children:
|
|
1497
|
-
}
|
|
1498
|
-
});
|
|
1499
|
-
}), Ut = ({ onBackClick:
|
|
1500
|
-
const { isDesktop: t, isMobile:
|
|
1501
|
-
|
|
1358
|
+
children: T(d, I(s, "0,0"))
|
|
1359
|
+
}
|
|
1360
|
+
) });
|
|
1361
|
+
}), Ut = ({ onBackClick: r, onMenuClick: n, sx: o }) => {
|
|
1362
|
+
const { isDesktop: t, isMobile: a } = ae(), { connect: s, debts: d } = w(), { onEvent: c } = k(), {
|
|
1363
|
+
config: { show_connections_widget_in_master: m }
|
|
1364
|
+
} = He(), { isInitialized: h } = ze(), { setSelectedAccount: b } = Ve(), { selectedDebtPriority: v, setSelectedDebtChartData: x } = P(), {
|
|
1365
|
+
isAccountDataLoaded: L,
|
|
1366
|
+
loadAccountData: F,
|
|
1367
|
+
detailedAccounts: N,
|
|
1368
|
+
visibleDebtAccounts: A
|
|
1369
|
+
} = te(), { isAllGoalDataLoaded: E, loadGoalData: Y, monthlyCashFlowProfile: _ } = V(), { debts: p } = ee(), [g, D] = f.useState(!1), [M, B] = f.useState(!1), [K, ce] = f.useState(!1), [U, Se] = f.useState(""), [Ae, de] = f.useState(!1);
|
|
1370
|
+
st({
|
|
1502
1371
|
widgetName: "DebtsWidget",
|
|
1503
|
-
isLoaded:
|
|
1372
|
+
isLoaded: L && E
|
|
1504
1373
|
});
|
|
1505
|
-
const
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
h && V().finally();
|
|
1374
|
+
const q = f.useMemo(() => {
|
|
1375
|
+
const O = _?.extra_payment ?? 0;
|
|
1376
|
+
return $e(p, v, O);
|
|
1377
|
+
}, [p, v, _]);
|
|
1378
|
+
f.useEffect(() => {
|
|
1379
|
+
L || F().finally(), c(S.DEBTS_VIEW);
|
|
1380
|
+
}, []), f.useEffect(() => {
|
|
1381
|
+
h && Y().finally();
|
|
1514
1382
|
}, [h]);
|
|
1515
|
-
const pe = (
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1518
|
-
}, Te = () => c(
|
|
1519
|
-
ce(!0), c(
|
|
1383
|
+
const pe = (O) => Se(O), ue = () => {
|
|
1384
|
+
const O = A.find((oe) => oe.guid === U), he = q.find((oe) => oe.guid === U);
|
|
1385
|
+
O && b(O), he && x(he), D(!0);
|
|
1386
|
+
}, Te = () => c(S.DEBTS_CLICK_FILTER), Ee = () => {
|
|
1387
|
+
ce(!0), c(S.DEBTS_CLICK_SNOWBALL_CTA);
|
|
1520
1388
|
}, Ie = () => {
|
|
1521
|
-
|
|
1389
|
+
B(!0), c(S.DEBTS_CLICK_PAYDOWN);
|
|
1522
1390
|
};
|
|
1523
|
-
if (!h || !
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
/* @__PURE__ */
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1391
|
+
if (!h || !L || !E)
|
|
1392
|
+
return /* @__PURE__ */ e(ct, {});
|
|
1393
|
+
const Me = N.length === 0, ke = A.length === 0, Ne = p.length === 0, X = Me || ke || Ne, Z = Oe(
|
|
1394
|
+
d,
|
|
1395
|
+
m,
|
|
1396
|
+
() => de(!0)
|
|
1397
|
+
);
|
|
1398
|
+
return /* @__PURE__ */ l(
|
|
1399
|
+
dt,
|
|
1400
|
+
{
|
|
1401
|
+
actions: [/* @__PURE__ */ e(Yt, { disabled: X }, "prioritize-debts")],
|
|
1402
|
+
allowedAccountTypes: [
|
|
1403
|
+
z.CREDIT_CARD,
|
|
1404
|
+
z.LOAN,
|
|
1405
|
+
z.MORTGAGE,
|
|
1406
|
+
z.LINE_OF_CREDIT,
|
|
1407
|
+
z.CHECKING_LINE_OF_CREDIT
|
|
1408
|
+
],
|
|
1409
|
+
hasDivider: !0,
|
|
1410
|
+
onAccountsFilterClick: Te,
|
|
1411
|
+
onBackClick: r,
|
|
1412
|
+
onMenuClick: n,
|
|
1413
|
+
slotComponent: /* @__PURE__ */ e(Kt, { disabled: X, onClick: Ie }, "extra-paydown"),
|
|
1414
|
+
sx: o,
|
|
1415
|
+
title: d.title,
|
|
1416
|
+
children: [
|
|
1417
|
+
/* @__PURE__ */ l(y, { sx: { pt: 48, px: t ? "48px" : "24px" }, children: [
|
|
1418
|
+
X && /* @__PURE__ */ e(
|
|
1419
|
+
pt,
|
|
1420
|
+
{
|
|
1421
|
+
header: Z.header,
|
|
1422
|
+
icon: "note_stack",
|
|
1423
|
+
onClick: Z.onClickHandler,
|
|
1424
|
+
primaryButton: Z.primaryButton,
|
|
1425
|
+
subText: Z.description,
|
|
1426
|
+
sx: { maxWidth: 400 }
|
|
1427
|
+
}
|
|
1428
|
+
),
|
|
1429
|
+
!X && /* @__PURE__ */ l(R, { children: [
|
|
1430
|
+
/* @__PURE__ */ l(
|
|
1431
|
+
y,
|
|
1432
|
+
{
|
|
1433
|
+
sx: {
|
|
1434
|
+
alignItems: a ? "flex-start" : "flex-end",
|
|
1435
|
+
flexDirection: a ? "column" : "row",
|
|
1436
|
+
mx: a ? "-12px" : 0
|
|
1437
|
+
},
|
|
1438
|
+
children: [
|
|
1439
|
+
/* @__PURE__ */ e(
|
|
1440
|
+
De,
|
|
1441
|
+
{
|
|
1442
|
+
debts: q,
|
|
1443
|
+
height: a ? 250 : void 0,
|
|
1444
|
+
hoveredDebtGuid: U,
|
|
1445
|
+
onClickArea: ue,
|
|
1446
|
+
onHoverArea: pe,
|
|
1447
|
+
sx: { mr: a ? "4px" : "-48px" }
|
|
1448
|
+
}
|
|
1449
|
+
),
|
|
1450
|
+
/* @__PURE__ */ e(
|
|
1451
|
+
mt,
|
|
1452
|
+
{
|
|
1453
|
+
debts: q,
|
|
1454
|
+
onClickCta: Ee,
|
|
1455
|
+
sx: { mb: a ? "0px" : "64px" }
|
|
1456
|
+
}
|
|
1457
|
+
)
|
|
1458
|
+
]
|
|
1459
|
+
}
|
|
1460
|
+
),
|
|
1461
|
+
/* @__PURE__ */ e(y, { sx: { mx: a ? "-24px" : 0 }, children: /* @__PURE__ */ e(
|
|
1462
|
+
zt,
|
|
1463
|
+
{
|
|
1464
|
+
debts: q,
|
|
1465
|
+
hoveredDebtGuid: U,
|
|
1466
|
+
onClickRow: ue,
|
|
1467
|
+
onHoverRow: pe
|
|
1468
|
+
}
|
|
1469
|
+
) })
|
|
1470
|
+
] })
|
|
1471
|
+
] }),
|
|
1472
|
+
/* @__PURE__ */ e(
|
|
1473
|
+
yt,
|
|
1474
|
+
{
|
|
1475
|
+
isOpen: K,
|
|
1476
|
+
onClose: () => ce(!1)
|
|
1477
|
+
}
|
|
1478
|
+
),
|
|
1479
|
+
/* @__PURE__ */ e(Bt, { isOpen: g, onClose: () => D(!1) }),
|
|
1480
|
+
/* @__PURE__ */ e(Ft, { isOpen: M, onClose: () => B(!1) }),
|
|
1481
|
+
/* @__PURE__ */ e(
|
|
1482
|
+
ut,
|
|
1483
|
+
{
|
|
1484
|
+
onClose: () => de(!1),
|
|
1485
|
+
showConnectWidget: Ae,
|
|
1486
|
+
title: s.mini_title
|
|
1487
|
+
}
|
|
1488
|
+
)
|
|
1489
|
+
]
|
|
1490
|
+
}
|
|
1491
|
+
);
|
|
1492
|
+
}, Hr = C(Ut);
|
|
1605
1493
|
export {
|
|
1606
1494
|
De as DebtsChart,
|
|
1607
1495
|
zt as DebtsTable,
|
|
1608
|
-
|
|
1496
|
+
Hr as DebtsWidget
|
|
1609
1497
|
};
|
|
1498
|
+
//# sourceMappingURL=index.es.js.map
|