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