@mx-cartographer/experiences 7.7.2 → 7.8.0-alpha-ram-goal-bug

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.
Files changed (92) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/Account-BiB1F8lL.mjs +118 -0
  3. package/dist/{Account-BfkKlfsW.mjs → Account-DuOz1a27.mjs} +1 -1
  4. package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
  5. package/dist/{AccountDetailsHeader-DqYIuhOs.mjs → AccountDetailsHeader-Cf2TUJnM.mjs} +4 -4
  6. package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
  7. package/dist/{AccountFields-yP8QdgPd.mjs → AccountFields-UdOvbQ5H.mjs} +7 -6
  8. package/dist/{AccountListItem-DMbu9ehd.mjs → AccountListItem-BPVxmNT_.mjs} +7 -7
  9. package/dist/AccountStore-BbPWe2C9.mjs +244 -0
  10. package/dist/Accounts-M-LTzStv.mjs +27 -0
  11. package/dist/{CategoryStore-Cnw9yUys.mjs → CategoryStore-BYICdb9m.mjs} +73 -73
  12. package/dist/CategoryUtil-meuejJqP.mjs +80 -0
  13. package/dist/{ConnectionsDrawer-BqR6FWJO.mjs → ConnectionsDrawer-BDpVTTSe.mjs} +1 -1
  14. package/dist/{DebtsStore-DuSdXM1k.mjs → DebtsStore-BIbOVCPe.mjs} +12 -12
  15. package/dist/{ExportCsvAction-HK5CeZWR.mjs → ExportCsvAction-CDuzTva1.mjs} +2 -2
  16. package/dist/GlobalAccountFilter-DQCPNc95.mjs +316 -0
  17. package/dist/GoalStore-B4LVt_kH.mjs +422 -0
  18. package/dist/{ManageIncome-BrTrlplL.mjs → ManageIncome-CL3hv8i9.mjs} +44 -44
  19. package/dist/NetWorthStore-yV43kJro.mjs +168 -0
  20. package/dist/{NotificationSettings-D4Vh3z8I.mjs → NotificationSettings-SPg3pwbX.mjs} +171 -169
  21. package/dist/{NotificationStore-CDX_kqHa.mjs → NotificationStore-Ck2KdNmT.mjs} +22 -14
  22. package/dist/{RecurringSettings-D2V6l77l.mjs → RecurringSettings-Bmnnpb48.mjs} +16 -16
  23. package/dist/{RecurringTransactionsStore-Caf1cq4v.mjs → RecurringTransactionsStore-BQBEJOPP.mjs} +91 -81
  24. package/dist/{RecurringTransactions-Bf4lX0Cn.mjs → RepeatingTransaction-miZVnk_A.mjs} +4 -4
  25. package/dist/{SettingsStore-krIRNwHK.mjs → SettingsStore-BHpuyujx.mjs} +1 -1
  26. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  27. package/dist/{SpendingLegend-gTCJLLkV.mjs → SpendingLegend-CD60HCYS.mjs} +33 -33
  28. package/dist/{TransactionDetails-7MHOshKQ.mjs → TransactionDetails-BDhz3DLT.mjs} +2 -2
  29. package/dist/TransactionStore-BSp5bOKg.mjs +705 -0
  30. package/dist/{User-LJpEwPtn.mjs → User-B0LnmiKO.mjs} +21 -20
  31. package/dist/WidgetContainer-BbPS3Yxz.mjs +555 -0
  32. package/dist/accounts/index.es.js +421 -391
  33. package/dist/accounts/stores/AccountStore.d.ts +30 -23
  34. package/dist/accounts/utils/Accounts.d.ts +2 -1
  35. package/dist/budgets/index.es.js +546 -540
  36. package/dist/budgets/store/BudgetsStore.d.ts +1 -0
  37. package/dist/cashflow/index.es.js +444 -457
  38. package/dist/categories/index.es.js +1 -1
  39. package/dist/categories/stores/CategoryStore.d.ts +10 -5
  40. package/dist/categories/util/CategoryUtil.d.ts +3 -2
  41. package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
  42. package/dist/common/components/SkeletonLoader.d.ts +7 -0
  43. package/dist/common/components/WidgetContainer.d.ts +7 -6
  44. package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
  45. package/dist/common/components/index.d.ts +2 -2
  46. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  47. package/dist/common/index.es.js +459 -445
  48. package/dist/common/stores/AppDataStore.d.ts +3 -1
  49. package/dist/common/stores/GlobalCopyStore.d.ts +0 -1
  50. package/dist/common/stores/GlobalStore.d.ts +3 -3
  51. package/dist/common/stores/GlobalUiStore.d.ts +10 -6
  52. package/dist/common/stores/UserStore.d.ts +3 -2
  53. package/dist/common/types/Account.d.ts +9 -6
  54. package/dist/dashboard/index.es.js +84 -116
  55. package/dist/debts/index.es.js +417 -413
  56. package/dist/{exportTransactionsToCSV-BrTYdSgJ.mjs → exportTransactionsToCSV-DtQ7ovAR.mjs} +1 -1
  57. package/dist/finstrong/index.es.js +1167 -1110
  58. package/dist/goals/index.es.js +618 -598
  59. package/dist/goals/stores/GoalStore.d.ts +19 -4
  60. package/dist/help/index.es.js +13 -13
  61. package/dist/investments/index.es.js +330 -325
  62. package/dist/investments/stores/HoldingStore.d.ts +1 -0
  63. package/dist/networth/components/NetWorthChart.d.ts +3 -2
  64. package/dist/networth/components/NetWorthList.d.ts +3 -3
  65. package/dist/networth/index.es.js +423 -433
  66. package/dist/networth/stores/NetWorthStore.d.ts +20 -9
  67. package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
  68. package/dist/notifications/index.es.js +90 -91
  69. package/dist/notifications/stores/NotificationStore.d.ts +3 -1
  70. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  71. package/dist/recurringtransactions/index.es.js +543 -562
  72. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +4 -2
  73. package/dist/settings/index.es.js +253 -248
  74. package/dist/spending/index.es.js +282 -301
  75. package/dist/transactions/index.es.js +269 -263
  76. package/dist/transactions/stores/TransactionStore.d.ts +26 -77
  77. package/dist/transactions/stores/UiStore.d.ts +0 -2
  78. package/dist/trends/index.es.js +708 -699
  79. package/dist/{useAccountDisplayName-BTvP_pw6.mjs → useAccountDisplayName-Bot2tb4n.mjs} +1 -1
  80. package/package.json +3 -3
  81. package/dist/AccountStore-CWFzg8-E.mjs +0 -260
  82. package/dist/Accounts-CWt-NRq8.mjs +0 -9
  83. package/dist/CategoryUtil-DZflYFam.mjs +0 -78
  84. package/dist/ConnectDrawer-BOjfI6rz.mjs +0 -563
  85. package/dist/GoalStore-C7ahxxLi.mjs +0 -364
  86. package/dist/NetWorthStore-xWIo9CYU.mjs +0 -150
  87. package/dist/TransactionStore-DJwPaZuM.mjs +0 -677
  88. package/dist/WidgetContainer-CrK6tyHr.mjs +0 -572
  89. package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
  90. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
  91. package/dist/common/components/accountfilter/index.d.ts +0 -1
  92. package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
@@ -1,70 +1,70 @@
1
- import { jsx as e, jsxs as s, Fragment as H } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as s, Fragment as O } from "react/jsx-runtime";
2
2
  import x from "react";
3
- import { observer as D } from "mobx-react-lite";
4
- import w from "@mui/material/Stack";
5
- import { useTheme as X, Card as be, Stack as _, Box as G } from "@mui/material";
6
- import { Text as l, P as _e, H3 as De, InstitutionLogo as Te, Icon as ee } from "@mxenabled/mxui";
7
- import { intervalToDuration as Ae, formatDuration as Ee } from "date-fns";
8
- import { addMonths as le } from "date-fns/addMonths";
9
- import { fromUnixTime as se } from "date-fns/fromUnixTime";
10
- import { getUnixTime as ce } from "date-fns/getUnixTime";
11
- import { D as P, M as Ie, I as Be } from "../DebtsStore-DuSdXM1k.mjs";
12
- import { a as $r } from "../DebtsStore-DuSdXM1k.mjs";
13
- import { f as k, a as Me } from "../NumberFormatting-DjTD0t3W.mjs";
14
- import { f as K, D as U } from "../Dialog-B4PI-_bL.mjs";
15
- import { G as Pe, w as q, u as S, l as V, g as F, d as Z, b as ke } from "../hooks-ZMp65DFz.mjs";
16
- import { u as Y } from "../useScreenSize-B6JyS_Lj.mjs";
17
- import { D as te } from "../Drawer-DV4NTsFg.mjs";
3
+ import { observer as v } from "mobx-react-lite";
4
+ import g from "@mui/material/Stack";
5
+ import { useTheme as V, Card as _e, Stack as _, Box as W } from "@mui/material";
6
+ import { Text as l, P as ye, H3 as Te, InstitutionLogo as Ae, Icon as te } from "@mxenabled/mxui";
7
+ import { intervalToDuration as Ee, formatDuration as Ie } from "date-fns";
8
+ import { addMonths as se } from "date-fns/addMonths";
9
+ import { fromUnixTime as ce } from "date-fns/fromUnixTime";
10
+ import { getUnixTime as de } from "date-fns/getUnixTime";
11
+ import { D as k, M as Be, I as Me } from "../DebtsStore-BIbOVCPe.mjs";
12
+ import { a as Or } from "../DebtsStore-BIbOVCPe.mjs";
13
+ import { f as N, a as Pe } from "../NumberFormatting-DjTD0t3W.mjs";
14
+ import { f as U, D as q } from "../Dialog-B4PI-_bL.mjs";
15
+ import { G as ke, w as Z, u as S, l as Y, g as F, d as J, b as Ne } from "../hooks-ZMp65DFz.mjs";
16
+ import { u as K } from "../useScreenSize-B6JyS_Lj.mjs";
17
+ import { D as re } from "../Drawer-DV4NTsFg.mjs";
18
18
  import { b as E } from "../Localization-2MODESHW.mjs";
19
- import { A as Ne, u as Fe } from "../AccountDetailsHeader-DqYIuhOs.mjs";
20
- import Re from "@mui/material/Card";
21
- import Le from "@mui/material/CardContent";
22
- import $e from "@mui/material/CardHeader";
23
- import re from "@mui/material/Box";
19
+ import { A as Re, u as Fe } from "../AccountDetailsHeader-Cf2TUJnM.mjs";
20
+ import Le from "@mui/material/Card";
21
+ import $e from "@mui/material/CardContent";
22
+ import Oe from "@mui/material/CardHeader";
23
+ import ae from "@mui/material/Box";
24
24
  import { useTheme as He } from "@mui/material/styles";
25
- import { LineChart as Oe } from "@mui/x-charts/LineChart";
26
- import { A as T, W as We } from "../WidgetContainer-CrK6tyHr.mjs";
27
- import de from "@mui/material/Tab";
28
- import Ge from "@mui/material/Tabs";
29
- import ye from "@mui/material/List";
25
+ import { LineChart as Ge } from "@mui/x-charts/LineChart";
26
+ import { A as T, W as We } from "../WidgetContainer-BbPS3Yxz.mjs";
27
+ import pe from "@mui/material/Tab";
28
+ import je from "@mui/material/Tabs";
29
+ import fe from "@mui/material/List";
30
30
  import j from "@mui/material/Divider";
31
- import { M as je, I as ze, O as Xe } from "../OriginalBalanceAction-ChGGq5AH.mjs";
32
- import Ve from "@mui/material/TextField";
33
- import { L as J } from "../ListItemAction-CU42h39I.mjs";
34
- import { C as ae } from "../CurrencyInput-itK0R3wV.mjs";
35
- import pe from "@mui/material/Alert";
36
- import me from "@mui/material/AlertTitle";
37
- import he from "@mui/material/Paper";
38
- import { Error as Ye, CheckCircle as fe } from "@mxenabled/mx-icons";
39
- import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
40
- import { DataGridPro as Ke } from "@mui/x-data-grid-pro";
31
+ import { M as ze, I as Xe, O as Ve } from "../OriginalBalanceAction-ChGGq5AH.mjs";
32
+ import Ye from "@mui/material/TextField";
33
+ import { L as Q } from "../ListItemAction-CU42h39I.mjs";
34
+ import { C as oe } from "../CurrencyInput-itK0R3wV.mjs";
35
+ import me from "@mui/material/Alert";
36
+ import he from "@mui/material/AlertTitle";
37
+ import ue from "@mui/material/Paper";
38
+ import { Error as Ke, CheckCircle as ge } from "@mxenabled/mx-icons";
39
+ import { T as be } from "../TabContentContainer-j01JYR_7.mjs";
40
+ import { DataGridPro as Ue } from "@mui/x-data-grid-pro";
41
41
  import { H as z } from "../HeaderCell-DjuifqHJ.mjs";
42
- import { f as Ue } from "../ConnectDrawer-BOjfI6rz.mjs";
43
- import ge from "@mui/material/Button";
44
- import qe from "@mui/material/IconButton";
45
- import Ze from "@mui/material/ListItem";
46
- import Je from "@mui/material/Popover";
47
- import { u as Qe } from "../useWidgetLoadTimer-hIOioiKx.mjs";
48
- import { L as et } from "../Loader-DUaFpDGv.mjs";
49
- const tt = (a, o = 0, r = 0) => {
42
+ import { f as qe, A as X } from "../Account-BiB1F8lL.mjs";
43
+ import xe from "@mui/material/Button";
44
+ import Ze from "@mui/material/IconButton";
45
+ import Je from "@mui/material/ListItem";
46
+ import Qe from "@mui/material/Popover";
47
+ import { u as et } from "../useWidgetLoadTimer-hIOioiKx.mjs";
48
+ import { L as tt } from "../Loader-DUaFpDGv.mjs";
49
+ const rt = (a, o = 0, r = 0) => {
50
50
  if (r === 0) return 0;
51
- const t = o / (Ie * Be);
51
+ const t = o / (Be * Me);
52
52
  return Math.ceil(
53
53
  t === 0 ? a / r : -Math.log(1 - t * a / r) / Math.log(1 + t)
54
54
  );
55
- }, rt = (a, o, r, t, n) => {
55
+ }, at = (a, o, r, t, n) => {
56
56
  const i = [];
57
57
  if (r === 0) {
58
58
  for (let c = 0; c < a; c++) {
59
- const d = o - t * (c + 1), m = o - t * c, b = d >= 0 ? t : m;
59
+ const p = o - t * (c + 1), m = o - t * c, b = p >= 0 ? t : m;
60
60
  i.push({
61
- balance: d >= 0 ? d : 0,
61
+ balance: p >= 0 ? p : 0,
62
62
  interest: r,
63
63
  payment: b,
64
64
  principal: b,
65
- timestamp: ce(
66
- le(
67
- se(n),
65
+ timestamp: de(
66
+ se(
67
+ ce(n),
68
68
  // convert seconds → Date
69
69
  c + 1
70
70
  // add (index + 1) months
@@ -74,47 +74,47 @@ const tt = (a, o = 0, r = 0) => {
74
74
  }
75
75
  return i;
76
76
  }
77
- const p = r / 1200;
77
+ const d = r / 1200;
78
78
  for (let c = 0; c < a; c++) {
79
- const d = ce(le(se(n), c + 1)), m = Math.pow(1 + p, c), b = o * m - t * ((m - 1) / p), f = Math.pow(1 + p, c + 1), u = o * f - t * ((f - 1) / p), v = t + Math.min(u, 0), M = b * p;
79
+ const p = de(se(ce(n), c + 1)), m = Math.pow(1 + d, c), b = o * m - t * ((m - 1) / d), w = Math.pow(1 + d, c + 1), h = o * w - t * ((w - 1) / d), A = t + Math.min(h, 0), B = b * d;
80
80
  i.push({
81
- balance: Math.max(0, u),
82
- interest: M,
83
- payment: v,
84
- principal: v - M,
85
- timestamp: d
81
+ balance: Math.max(0, h),
82
+ interest: B,
83
+ payment: A,
84
+ principal: A - B,
85
+ timestamp: p
86
86
  });
87
87
  }
88
88
  return i;
89
- }, at = (a) => (a[a.length - 1] || {}).timestamp, ot = (a) => {
90
- const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: n } = a, i = tt(t, r ?? 0, o ?? 0), p = rt(
89
+ }, ot = (a) => (a[a.length - 1] || {}).timestamp, nt = (a) => {
90
+ const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: n } = a, i = rt(t, r ?? 0, o ?? 0), d = at(
91
91
  i,
92
92
  t,
93
93
  r ?? 0,
94
94
  o ?? 0,
95
95
  n
96
- ), c = at(p);
96
+ ), c = ot(d);
97
97
  return {
98
98
  ...a,
99
99
  minimumFinalPayment: c,
100
- minimumPayments: p
100
+ minimumPayments: d
101
101
  };
102
- }, xe = (a, o) => {
102
+ }, we = (a, o) => {
103
103
  const [r, t] = a.reduce(
104
- ([n, i], p) => (p.is_paid_off || p.is_impossible ? i.push({ ...p, minimumPayments: [] }) : n.push(ot(p)), [n, i]),
104
+ ([n, i], d) => (d.is_paid_off || d.is_impossible ? i.push({ ...d, minimumPayments: [] }) : n.push(nt(d)), [n, i]),
105
105
  [[], []]
106
106
  );
107
107
  switch (o) {
108
- case P.FASTEST_PAYOFF_FIRST:
108
+ case k.FASTEST_PAYOFF_FIRST:
109
109
  r.sort((n, i) => (n.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
110
110
  break;
111
- case P.HIGHEST_INTEREST:
111
+ case k.HIGHEST_INTEREST:
112
112
  r.sort((n, i) => (i.interest_rate ?? 0) - (n.interest_rate ?? 0));
113
113
  break;
114
- case P.LOWEST_BALANCE:
114
+ case k.LOWEST_BALANCE:
115
115
  r.sort((n, i) => n.balance - i.balance);
116
116
  break;
117
- case P.HIGHEST_BALANCE:
117
+ case k.HIGHEST_BALANCE:
118
118
  r.sort((n, i) => i.balance - n.balance);
119
119
  break;
120
120
  default:
@@ -122,47 +122,47 @@ const tt = (a, o = 0, r = 0) => {
122
122
  }
123
123
  a.splice(0, a.length, ...r, ...t);
124
124
  };
125
- function nt(a, o, r = 0) {
125
+ function it(a, o, r = 0) {
126
126
  const t = a.map((b) => ({ ...b })).filter(
127
127
  (b) => b.interest_rate !== void 0 && b.monthly_payment !== void 0 && !b.is_paid_off
128
128
  );
129
- xe(t, o);
129
+ we(t, o);
130
130
  let n = 0, i = 0;
131
- const p = /* @__PURE__ */ new Date(), c = /* @__PURE__ */ new Date();
131
+ const d = /* @__PURE__ */ new Date(), c = /* @__PURE__ */ new Date();
132
132
  for (; t.some((b) => b.balance >= 0.01 && !b.is_impossible); ) {
133
133
  let b = !1;
134
- for (const [f, u] of t.entries()) {
135
- if (u.balance <= 0.01 || u.is_impossible) continue;
136
- const M = (u.interest_rate ?? 0) / 100 / 12, I = u.balance * M;
137
- let C = u.monthly_payment ?? 0;
138
- f === 0 && r && (C += r), u.balance += I;
139
- const B = Math.min(u.balance, C + i);
140
- if (B <= I) {
141
- u.is_impossible = !0;
134
+ for (const [w, h] of t.entries()) {
135
+ if (h.balance <= 0.01 || h.is_impossible) continue;
136
+ const B = (h.interest_rate ?? 0) / 100 / 12, M = h.balance * B;
137
+ let C = h.monthly_payment ?? 0;
138
+ w === 0 && r && (C += r), h.balance += M;
139
+ const I = Math.min(h.balance, C + i);
140
+ if (I <= M) {
141
+ h.is_impossible = !0;
142
142
  continue;
143
143
  }
144
- u.balance -= B, u.balance = u.balance < 0.01 ? 0 : u.balance, n += I, u.balance <= 0 && (i += C), B > 0 && (b = !0);
144
+ h.balance -= I, h.balance = h.balance < 0.01 ? 0 : h.balance, n += M, h.balance <= 0 && (i += C), I > 0 && (b = !0);
145
145
  }
146
146
  b && c.setMonth(c.getMonth() + 1);
147
147
  }
148
- const d = t.some((b) => b.is_impossible && b.balance > 0), m = Ae({ start: p, end: c });
148
+ const p = t.some((b) => b.is_impossible && b.balance > 0), m = Ee({ start: d, end: c });
149
149
  return {
150
- payoffSavings: d ? "N/A" : k(n, "0,0.00"),
151
- payoffDate: d ? "Never" : K(c, U.MONTH_YEAR),
152
- payoffDuration: d ? "Stagnant" : Ee(m, { format: ["years", "months"] }) || "0 months"
150
+ payoffSavings: p ? "N/A" : N(n, "0,0.00"),
151
+ payoffDate: p ? "Never" : U(c, q.MONTH_YEAR),
152
+ payoffDuration: p ? "Stagnant" : Ie(m, { format: ["years", "months"] }) || "0 months"
153
153
  };
154
154
  }
155
- const $ = () => {
156
- if (!x.useContext(Pe))
155
+ const L = () => {
156
+ if (!x.useContext(ke))
157
157
  throw new Error("useCateUiStore() must be used within the GlobalDataContext");
158
- return q().uiStore;
159
- }, it = ({ debts: a, onClickCta: o, sx: r }) => {
160
- const t = X(), { isMobile: n } = Y(), { debts: i } = S(), { selectedDebtPriority: p } = $(), { monthlyCashFlowProfile: c } = V(), { payoffDate: d, payoffSavings: m, payoffDuration: b } = x.useMemo(() => {
161
- const f = c?.extra_payment ?? 0;
162
- return nt(a, p, f);
163
- }, [a, p, c]);
158
+ return Z().uiStore;
159
+ }, lt = ({ debts: a, onClickCta: o, sx: r }) => {
160
+ const t = V(), { isMobile: n } = K(), { debts: i } = S(), { selectedDebtPriority: d } = L(), { monthlyCashFlowProfile: c } = Y(), { payoffDate: p, payoffSavings: m, payoffDuration: b } = x.useMemo(() => {
161
+ const w = c?.extra_payment ?? 0;
162
+ return it(a, d, w);
163
+ }, [a, d, c]);
164
164
  return /* @__PURE__ */ e(
165
- be,
165
+ _e,
166
166
  {
167
167
  sx: {
168
168
  boxShadow: t.shadows[2],
@@ -182,7 +182,7 @@ const $ = () => {
182
182
  },
183
183
  children: [
184
184
  /* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_date_description }),
185
- /* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "Small", children: d })
185
+ /* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "Small", children: p })
186
186
  ]
187
187
  }
188
188
  ),
@@ -208,10 +208,10 @@ const $ = () => {
208
208
  ] })
209
209
  }
210
210
  );
211
- }, lt = D(it), st = ({ isOpen: a, onClose: o }) => {
212
- const r = X(), { debts: t } = S(), [n, i] = x.useState(!1);
211
+ }, st = v(lt), ct = ({ isOpen: a, onClose: o }) => {
212
+ const r = V(), { debts: t } = S(), [n, i] = x.useState(!1);
213
213
  return /* @__PURE__ */ e(
214
- te,
214
+ re,
215
215
  {
216
216
  ariaLabelClose: "",
217
217
  isOpen: a,
@@ -222,10 +222,10 @@ const $ = () => {
222
222
  /* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
223
223
  /* @__PURE__ */ e(l, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
224
224
  /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
225
- /* @__PURE__ */ e(_e, { variant: "H1", children: t.snowball_drawer_savings }),
225
+ /* @__PURE__ */ e(ye, { variant: "H1", children: t.snowball_drawer_savings }),
226
226
  /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
227
227
  ] }),
228
- /* @__PURE__ */ s(be, { sx: { display: "grid", py: 16, px: 24 }, children: [
228
+ /* @__PURE__ */ s(_e, { sx: { display: "grid", py: 16, px: 24 }, children: [
229
229
  /* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
230
230
  /* @__PURE__ */ e(
231
231
  l,
@@ -268,7 +268,7 @@ const $ = () => {
268
268
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
269
269
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
270
270
  /* @__PURE__ */ e(
271
- G,
271
+ W,
272
272
  {
273
273
  sx: {
274
274
  display: "flex",
@@ -324,7 +324,7 @@ const $ = () => {
324
324
  ] }),
325
325
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
326
326
  /* @__PURE__ */ e(
327
- G,
327
+ W,
328
328
  {
329
329
  sx: {
330
330
  width: 20,
@@ -354,7 +354,7 @@ const $ = () => {
354
354
  ] }),
355
355
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, py: 14, children: [
356
356
  /* @__PURE__ */ e(
357
- G,
357
+ W,
358
358
  {
359
359
  sx: {
360
360
  width: 20,
@@ -395,7 +395,7 @@ const $ = () => {
395
395
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
396
396
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
397
397
  /* @__PURE__ */ e(
398
- G,
398
+ W,
399
399
  {
400
400
  sx: {
401
401
  display: "flex",
@@ -451,7 +451,7 @@ const $ = () => {
451
451
  ] }),
452
452
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
453
453
  /* @__PURE__ */ e(
454
- G,
454
+ W,
455
455
  {
456
456
  sx: {
457
457
  width: 20,
@@ -503,7 +503,7 @@ const $ = () => {
503
503
  /* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
504
504
  /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
505
505
  /* @__PURE__ */ e(
506
- G,
506
+ W,
507
507
  {
508
508
  sx: {
509
509
  display: "flex",
@@ -569,50 +569,50 @@ const $ = () => {
569
569
  ] })
570
570
  }
571
571
  );
572
- }, ct = D(st), dt = "#FF7B08";
573
- function pt(a, o) {
574
- const [r, t, n] = a.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), i = [
572
+ }, dt = v(ct), pt = "#FF7B08";
573
+ function mt(a, o) {
574
+ const [r, t, n] = a.replace(/^#/, "").match(/.{1,2}/g).map((d) => parseInt(d, 16)), i = [
575
575
  Math.max(0, Math.min(255, Math.round(r * o))),
576
576
  Math.max(0, Math.min(255, Math.round(t * o))),
577
577
  Math.max(0, Math.min(255, Math.round(n * o)))
578
578
  ];
579
579
  return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
580
580
  }
581
- const we = ({
581
+ const Ce = ({
582
582
  sx: a,
583
583
  height: o = 500,
584
584
  width: r,
585
585
  debts: t,
586
586
  hoveredDebtGuid: n,
587
587
  onClickArea: i,
588
- onHoverArea: p
588
+ onHoverArea: d
589
589
  }) => {
590
- const c = He(), { onEvent: d } = F(), m = t.filter((h) => !h.is_impossible), b = [
590
+ const c = He(), { onEvent: p } = F(), m = t.filter((u) => !u.is_impossible), b = [
591
591
  ...new Set(
592
- m.flatMap((h) => h.dataset.map((g) => new Date(g.x).getTime()))
592
+ m.flatMap((u) => u.dataset.map((f) => new Date(f.x).getTime()))
593
593
  )
594
- ].sort((h, g) => h - g).map((h) => new Date(h)), f = m.map((h) => {
595
- const g = new Map(h.dataset.map((L) => [new Date(L.x).getTime(), L.y]));
596
- let A = g.get(b[0].getTime()) ?? 0;
597
- const R = b.map((L) => {
598
- const O = g.get(L.getTime()) ?? A;
599
- return A = O, { x: L, y: O };
594
+ ].sort((u, f) => u - f).map((u) => new Date(u)), w = m.map((u) => {
595
+ const f = new Map(u.dataset.map(($) => [new Date($.x).getTime(), $.y]));
596
+ let D = f.get(b[0].getTime()) ?? 0;
597
+ const P = b.map(($) => {
598
+ const H = f.get($.getTime()) ?? D;
599
+ return D = H, { x: $, y: H };
600
600
  });
601
- return { ...h, dataset: R };
602
- }), u = f.reduce(
603
- (h, g) => h + (g.dataset[0]?.y ?? 0),
601
+ return { ...u, dataset: P };
602
+ }), h = w.reduce(
603
+ (u, f) => u + (f.dataset[0]?.y ?? 0),
604
604
  0
605
- ), v = b.map((h, g) => {
606
- const A = g / (b.length - 1), R = u * (1 - A);
607
- return { x: h, y: R };
608
- }), M = Math.ceil(u / 100) * 100, I = b, C = f.map((h, g) => {
609
- const A = 1 - g / f.length * 0.5, R = pt(dt, A);
605
+ ), A = b.map((u, f) => {
606
+ const D = f / (b.length - 1), P = h * (1 - D);
607
+ return { x: u, y: P };
608
+ }), B = Math.ceil(h / 100) * 100, M = b, C = w.map((u, f) => {
609
+ const D = 1 - f / w.length * 0.5, P = mt(pt, D);
610
610
  return {
611
- id: `debt-${g}`,
612
- guid: h.guid,
613
- label: h.name,
614
- data: h.dataset.map((L) => L.y),
615
- color: R,
611
+ id: `debt-${f}`,
612
+ guid: u.guid,
613
+ label: u.name,
614
+ data: u.dataset.map(($) => $.y),
615
+ color: P,
616
616
  curve: "linear",
617
617
  type: "line",
618
618
  area: !0,
@@ -623,7 +623,7 @@ const we = ({
623
623
  C.push({
624
624
  id: "payoff-line",
625
625
  label: "Payoff Line",
626
- data: v.map((h) => h.y),
626
+ data: A.map((u) => u.y),
627
627
  color: c.palette.grey[700],
628
628
  curve: "linear",
629
629
  type: "line",
@@ -631,9 +631,9 @@ const we = ({
631
631
  showMark: !1,
632
632
  disableHighlight: !0
633
633
  });
634
- const B = (h) => C.findIndex((g) => g?.guid === h);
634
+ const I = (u) => C.findIndex((f) => f?.guid === u);
635
635
  return /* @__PURE__ */ e(
636
- re,
636
+ ae,
637
637
  {
638
638
  sx: {
639
639
  width: "100%",
@@ -648,21 +648,21 @@ const we = ({
648
648
  }
649
649
  },
650
650
  children: /* @__PURE__ */ e(
651
- Oe,
651
+ Ge,
652
652
  {
653
653
  axisHighlight: { x: "none" },
654
654
  disableLineItemHighlight: !0,
655
655
  height: o,
656
656
  hideLegend: !0,
657
657
  margin: { bottom: 24, left: 32, right: 72, top: 48 },
658
- onAreaClick: (h, g) => {
658
+ onAreaClick: (u, f) => {
659
659
  i?.();
660
- const A = C.find((R) => R.id === g.seriesId);
661
- d(T.DEBTS_CLICK_CHART_AREA, { account_guid: A?.guid });
660
+ const D = C.find((P) => P.id === f.seriesId);
661
+ p(T.DEBTS_CLICK_CHART_AREA, { account_guid: D?.guid });
662
662
  },
663
- onHighlightChange: (h) => {
664
- const g = C.find((A) => A.id === h?.seriesId)?.guid;
665
- p?.(g ?? "");
663
+ onHighlightChange: (u) => {
664
+ const f = C.find((D) => D.id === u?.seriesId)?.guid;
665
+ d?.(f ?? "");
666
666
  },
667
667
  series: C,
668
668
  skipAnimation: !0,
@@ -684,10 +684,10 @@ const we = ({
684
684
  strokeDasharray: "10 5",
685
685
  strokeWidth: 1
686
686
  },
687
- [`& .MuiLineElement-series-debt-${B(n ?? "0")}`]: {
687
+ [`& .MuiLineElement-series-debt-${I(n ?? "0")}`]: {
688
688
  opacity: 1
689
689
  },
690
- [`& .MuiAreaElement-series-debt-${B(n ?? "0")}`]: {
690
+ [`& .MuiAreaElement-series-debt-${I(n ?? "0")}`]: {
691
691
  opacity: 1
692
692
  },
693
693
  "& .MuiChartsAxis-tickLabel > tspan": {
@@ -698,31 +698,31 @@ const we = ({
698
698
  width: r,
699
699
  xAxis: [
700
700
  {
701
- data: I,
701
+ data: M,
702
702
  disableTicks: !0,
703
703
  min: b[0],
704
704
  scaleType: "time",
705
705
  tickLabelMinGap: 24,
706
- valueFormatter: (h) => K(h, U.MONTH_SHORT_YEAR)
706
+ valueFormatter: (u) => U(u, q.MONTH_SHORT_YEAR)
707
707
  }
708
708
  ],
709
709
  yAxis: [
710
710
  {
711
711
  min: 0,
712
- max: M,
712
+ max: B,
713
713
  disableTicks: !0,
714
- valueFormatter: (h) => k(h, "0a")
714
+ valueFormatter: (u) => N(u, "0a")
715
715
  }
716
716
  ]
717
717
  }
718
718
  )
719
719
  }
720
720
  );
721
- }, mt = () => {
722
- const a = X(), { debts: o } = S(), { selectedDebtChartData: r } = $();
723
- return /* @__PURE__ */ s(H, { children: [
721
+ }, ht = () => {
722
+ const a = V(), { debts: o } = S(), { selectedDebtChartData: r } = L();
723
+ return /* @__PURE__ */ s(O, { children: [
724
724
  /* @__PURE__ */ s(
725
- Re,
725
+ Le,
726
726
  {
727
727
  sx: {
728
728
  "& .MuiCardContent-root:last-child": {
@@ -730,8 +730,8 @@ const we = ({
730
730
  }
731
731
  },
732
732
  children: [
733
- /* @__PURE__ */ e($e, { sx: { pb: 0 }, title: /* @__PURE__ */ e(De, { sx: { pb: 4 }, children: o.details_chart_title }) }),
734
- /* @__PURE__ */ e(Le, { sx: { p: 0 }, children: /* @__PURE__ */ e(we, { debts: [r], height: 250 }) })
733
+ /* @__PURE__ */ e(Oe, { sx: { pb: 0 }, title: /* @__PURE__ */ e(Te, { sx: { pb: 4 }, children: o.details_chart_title }) }),
734
+ /* @__PURE__ */ e($e, { sx: { p: 0 }, children: /* @__PURE__ */ e(Ce, { debts: [r], height: 250 }) })
735
735
  ]
736
736
  }
737
737
  ),
@@ -745,9 +745,9 @@ const we = ({
745
745
  }
746
746
  )
747
747
  ] });
748
- }, ht = D(mt), ut = () => {
749
- const a = X(), { onEvent: o } = F(), { debts: r } = S(), { selectedDebtChartData: t, showCompleted: n, showError: i } = $();
750
- return x.useEffect(() => o(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(ye, { children: i || n ? /* @__PURE__ */ e(
748
+ }, ut = v(ht), bt = () => {
749
+ const a = V(), { onEvent: o } = F(), { debts: r } = S(), { selectedDebtChartData: t, showCompleted: n, showError: i } = L();
750
+ return x.useEffect(() => o(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(fe, { children: i || n ? /* @__PURE__ */ e(
751
751
  l,
752
752
  {
753
753
  color: a.palette.secondary.main,
@@ -756,13 +756,13 @@ const we = ({
756
756
  variant: "Small",
757
757
  children: i ? r.schedule_error_message : r.schedule_complete_message
758
758
  }
759
- ) : /* @__PURE__ */ s(H, { children: [
760
- /* @__PURE__ */ s(w, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
759
+ ) : /* @__PURE__ */ s(O, { children: [
760
+ /* @__PURE__ */ s(g, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
761
761
  /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: r.schedule_month_heading }),
762
762
  /* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: r.schedule_amount_heading })
763
763
  ] }),
764
- t.dataset.slice(1).map(({ x: p, y: c, payment: d }) => /* @__PURE__ */ e(w, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(w, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
765
- w,
764
+ t.dataset.slice(1).map(({ x: d, y: c, payment: p }) => /* @__PURE__ */ e(g, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(g, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
765
+ g,
766
766
  {
767
767
  sx: {
768
768
  borderBottom: `1px solid ${a.palette.border.light}`,
@@ -772,12 +772,12 @@ const we = ({
772
772
  pr: 24
773
773
  },
774
774
  children: [
775
- /* @__PURE__ */ s(w, { flexGrow: 1, children: [
776
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: K(p, U.MONTH_YEAR) }),
775
+ /* @__PURE__ */ s(g, { flexGrow: 1, children: [
776
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: U(d, q.MONTH_YEAR) }),
777
777
  /* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: r.schedule_month_label })
778
778
  ] }),
779
- /* @__PURE__ */ s(w, { children: [
780
- /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: k(c, "0,0.00") }),
779
+ /* @__PURE__ */ s(g, { children: [
780
+ /* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: N(c, "0,0.00") }),
781
781
  /* @__PURE__ */ e(
782
782
  l,
783
783
  {
@@ -785,15 +785,15 @@ const we = ({
785
785
  color: a.palette.success.main,
786
786
  textAlign: "end",
787
787
  variant: "Tiny",
788
- children: `+${k(d, "0,0")}`
788
+ children: `+${N(p, "0,0")}`
789
789
  }
790
790
  )
791
791
  ] })
792
792
  ]
793
793
  }
794
- ) }) }, String(p))),
795
- /* @__PURE__ */ e(w, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
796
- w,
794
+ ) }) }, String(d))),
795
+ /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
796
+ g,
797
797
  {
798
798
  sx: {
799
799
  alignItems: "center",
@@ -809,28 +809,28 @@ const we = ({
809
809
  }
810
810
  ) })
811
811
  ] }) });
812
- }, bt = D(ut), _t = D(({ debt: a }) => {
813
- const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.interest_rate ?? 0), p = n < 0, c = async () => {
812
+ }, _t = v(bt), yt = v(({ debt: a }) => {
813
+ const { debts: o } = S(), { updateAccount: r } = J(), { onEvent: t } = F(), [n, i] = x.useState(a.interest_rate ?? 0), d = n < 0, c = async () => {
814
814
  await r({ ...a.account, interest_rate: n }), a.interest_rate = n, t(T.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
815
- }, d = () => {
815
+ }, p = () => {
816
816
  setTimeout(() => {
817
817
  i(a.interest_rate ?? 0);
818
818
  }, 250);
819
819
  };
820
820
  return /* @__PURE__ */ e(
821
- J,
821
+ Q,
822
822
  {
823
- isSaveDisabled: p,
823
+ isSaveDisabled: d,
824
824
  label: `${o.details_interest_rate} (%)`,
825
- onCancel: d,
825
+ onCancel: p,
826
826
  onSave: c,
827
827
  primaryText: o.details_interest_rate,
828
- secondaryText: Me(Number(a.interest_rate) / 100),
828
+ secondaryText: Pe(Number(a.interest_rate) / 100),
829
829
  zeroStateText: a.interest_rate ? void 0 : o.add_interest_rate,
830
830
  children: /* @__PURE__ */ e(
831
- Ve,
831
+ Ye,
832
832
  {
833
- error: p,
833
+ error: d,
834
834
  fullWidth: !0,
835
835
  onChange: (m) => i(isNaN(parseFloat(m.target.value)) ? 0 : parseFloat(m.target.value)),
836
836
  type: "number",
@@ -839,30 +839,30 @@ const we = ({
839
839
  )
840
840
  }
841
841
  );
842
- }), yt = D(({ debt: a }) => {
843
- const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.monthly_payment ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
842
+ }), ft = v(({ debt: a }) => {
843
+ const { debts: o } = S(), { updateAccount: r } = J(), { onEvent: t } = F(), [n, i] = x.useState(a.monthly_payment ?? 0), d = n < 0 || n > 9999999999e-2, c = async () => {
844
844
  await r({ ...a.account, minimum_payment: n }), a.monthly_payment = n, t(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
845
- }, d = () => {
845
+ }, p = () => {
846
846
  setTimeout(() => {
847
847
  i(a.monthly_payment ?? 0);
848
848
  }, 250);
849
849
  };
850
850
  return /* @__PURE__ */ e(
851
- J,
851
+ Q,
852
852
  {
853
- isSaveDisabled: p,
853
+ isSaveDisabled: d,
854
854
  label: o.details_monthly_payment,
855
- onCancel: d,
855
+ onCancel: p,
856
856
  onSave: c,
857
857
  primaryText: o.details_monthly_payment,
858
- secondaryText: k(a.monthly_payment, "0,0"),
858
+ secondaryText: N(a.monthly_payment, "0,0"),
859
859
  zeroStateText: a.monthly_payment ? void 0 : o.add_monthly_payment,
860
860
  children: /* @__PURE__ */ e(
861
- ae,
861
+ oe,
862
862
  {
863
863
  amount: n,
864
864
  autoFocus: !0,
865
- error: p,
865
+ error: d,
866
866
  fullWidth: !0,
867
867
  minAmount: 0,
868
868
  setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
@@ -871,30 +871,30 @@ const we = ({
871
871
  )
872
872
  }
873
873
  );
874
- }), ft = D(({ debt: a }) => {
875
- const { debts: o } = S(), { updateAccount: r } = Z(), { onEvent: t } = F(), [n, i] = x.useState(a.original_balance ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
874
+ }), gt = v(({ debt: a }) => {
875
+ const { debts: o } = S(), { updateAccount: r } = J(), { onEvent: t } = F(), [n, i] = x.useState(a.original_balance ?? 0), d = n < 0 || n > 9999999999e-2, c = async () => {
876
876
  await r({ ...a.account, original_balance: n }), a.original_balance = n, t(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
877
- }, d = () => {
877
+ }, p = () => {
878
878
  setTimeout(() => {
879
879
  i(a.original_balance ?? 0);
880
880
  }, 250);
881
881
  };
882
882
  return /* @__PURE__ */ e(
883
- J,
883
+ Q,
884
884
  {
885
- isSaveDisabled: p,
885
+ isSaveDisabled: d,
886
886
  label: o.details_original_balance,
887
- onCancel: d,
887
+ onCancel: p,
888
888
  onSave: c,
889
889
  primaryText: o.details_original_balance,
890
- secondaryText: k(a.original_balance, "0,0"),
890
+ secondaryText: N(a.original_balance, "0,0"),
891
891
  zeroStateText: a.original_balance ? void 0 : o.add_original_balance,
892
892
  children: /* @__PURE__ */ e(
893
- ae,
893
+ oe,
894
894
  {
895
895
  amount: n,
896
896
  autoFocus: !0,
897
- error: p,
897
+ error: d,
898
898
  fullWidth: !0,
899
899
  minAmount: 0,
900
900
  setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
@@ -903,35 +903,35 @@ const we = ({
903
903
  )
904
904
  }
905
905
  );
906
- }), gt = () => {
907
- const { onEvent: a } = F(), { selectedDebtChartData: o } = $();
908
- return x.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(w, { bgcolor: "background.paper", children: [
909
- o?.goal && /* @__PURE__ */ s(H, { children: [
910
- /* @__PURE__ */ e(je, { goal: o.goal }),
911
- /* @__PURE__ */ e(j, {}),
906
+ }), xt = () => {
907
+ const { onEvent: a } = F(), { selectedDebtChartData: o } = L();
908
+ return x.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(g, { bgcolor: "background.paper", children: [
909
+ o?.goal && /* @__PURE__ */ s(O, { children: [
912
910
  /* @__PURE__ */ e(ze, { goal: o.goal }),
913
911
  /* @__PURE__ */ e(j, {}),
914
912
  /* @__PURE__ */ e(Xe, { goal: o.goal }),
913
+ /* @__PURE__ */ e(j, {}),
914
+ /* @__PURE__ */ e(Ve, { goal: o.goal }),
915
915
  /* @__PURE__ */ e(j, {})
916
916
  ] }),
917
- !o?.goal && o?.account && /* @__PURE__ */ s(H, { children: [
918
- /* @__PURE__ */ e(yt, { debt: o }),
917
+ !o?.goal && o?.account && /* @__PURE__ */ s(O, { children: [
918
+ /* @__PURE__ */ e(ft, { debt: o }),
919
919
  /* @__PURE__ */ e(j, {}),
920
- /* @__PURE__ */ e(_t, { debt: o }),
920
+ /* @__PURE__ */ e(yt, { debt: o }),
921
921
  /* @__PURE__ */ e(j, {}),
922
- /* @__PURE__ */ e(ft, { debt: o }),
922
+ /* @__PURE__ */ e(gt, { debt: o }),
923
923
  /* @__PURE__ */ e(j, {})
924
924
  ] })
925
925
  ] });
926
- }, xt = D(gt), wt = ({ setTabValue: a, sx: o }) => {
927
- const { debts: r } = S(), { showError: t, showCompleted: n } = $();
926
+ }, wt = v(xt), Ct = ({ setTabValue: a, sx: o }) => {
927
+ const { debts: r } = S(), { showError: t, showCompleted: n } = L();
928
928
  return x.useEffect(() => {
929
929
  t && a(1);
930
- }, [t]), !t && !n ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ s(w, { gap: 16, children: [
931
- /* @__PURE__ */ e(he, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
932
- pe,
930
+ }, [t]), !t && !n ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ s(g, { gap: 16, children: [
931
+ /* @__PURE__ */ e(ue, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
932
+ me,
933
933
  {
934
- icon: t ? /* @__PURE__ */ e(Ye, { filled: !0 }) : /* @__PURE__ */ e(fe, { color: "success", filled: !0 }),
934
+ icon: t ? /* @__PURE__ */ e(Ke, { filled: !0 }) : /* @__PURE__ */ e(ge, { color: "success", filled: !0 }),
935
935
  severity: "error",
936
936
  sx: {
937
937
  alignItems: "start",
@@ -944,15 +944,15 @@ const we = ({
944
944
  }
945
945
  },
946
946
  children: [
947
- /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: t ? r.status_error_title : r.status_complete_title }),
947
+ /* @__PURE__ */ e(he, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: t ? r.status_error_title : r.status_complete_title }),
948
948
  /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: t ? r.status_error_description : r.status_complete_description })
949
949
  ]
950
950
  }
951
951
  ) }),
952
- t && /* @__PURE__ */ e(he, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
953
- pe,
952
+ t && /* @__PURE__ */ e(ue, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
953
+ me,
954
954
  {
955
- icon: /* @__PURE__ */ e(H, {}),
955
+ icon: /* @__PURE__ */ e(O, {}),
956
956
  severity: "error",
957
957
  sx: {
958
958
  borderRadius: 2,
@@ -962,28 +962,28 @@ const we = ({
962
962
  }
963
963
  },
964
964
  children: [
965
- /* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r.status_info_title }),
965
+ /* @__PURE__ */ e(he, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r.status_info_title }),
966
966
  /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r.status_info_description })
967
967
  ]
968
968
  }
969
969
  ) })
970
970
  ] });
971
- }, Ct = D(wt), St = () => {
972
- const { debts: a } = S(), { showError: o, showCompleted: r } = $(), [t, n] = x.useState(0);
973
- return /* @__PURE__ */ s(H, { children: [
974
- (o || r) && /* @__PURE__ */ e(Ct, { setTabValue: n, sx: { mt: -24 } }),
971
+ }, St = v(Ct), vt = () => {
972
+ const { debts: a } = S(), { showError: o, showCompleted: r } = L(), [t, n] = x.useState(0);
973
+ return /* @__PURE__ */ s(O, { children: [
974
+ (o || r) && /* @__PURE__ */ e(St, { setTabValue: n, sx: { mt: -24 } }),
975
975
  /* @__PURE__ */ s(
976
- Ge,
976
+ je,
977
977
  {
978
978
  "aria-label": a.details_tabs_aria_label,
979
979
  centered: !0,
980
- onChange: (i, p) => n(p),
980
+ onChange: (i, d) => n(d),
981
981
  textColor: "primary",
982
982
  value: t,
983
983
  variant: "fullWidth",
984
984
  children: [
985
985
  /* @__PURE__ */ e(
986
- de,
986
+ pe,
987
987
  {
988
988
  "aria-controls": "debt-schedule-tabpanel-0",
989
989
  id: "debt-schedule-tab-0",
@@ -991,7 +991,7 @@ const we = ({
991
991
  }
992
992
  ),
993
993
  /* @__PURE__ */ e(
994
- de,
994
+ pe,
995
995
  {
996
996
  "aria-controls": "debt-details-tabpanel-1",
997
997
  id: "debt-details-tab-1",
@@ -1001,50 +1001,50 @@ const we = ({
1001
1001
  ]
1002
1002
  }
1003
1003
  ),
1004
- /* @__PURE__ */ e(ue, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(bt, {}) }),
1005
- /* @__PURE__ */ e(ue, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(xt, {}) })
1004
+ /* @__PURE__ */ e(be, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(_t, {}) }),
1005
+ /* @__PURE__ */ e(be, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(wt, {}) })
1006
1006
  ] });
1007
- }, vt = D(St), Dt = ({ isOpen: a, onClose: o }) => {
1008
- const { debts: r } = S(), { showError: t, showCompleted: n } = $(), i = t || n ? /* @__PURE__ */ e(H, {}) : /* @__PURE__ */ e(ht, {});
1007
+ }, Dt = v(vt), Tt = ({ isOpen: a, onClose: o }) => {
1008
+ const { debts: r } = S(), { showError: t, showCompleted: n } = L(), i = t || n ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ e(ut, {});
1009
1009
  return /* @__PURE__ */ e(
1010
- te,
1010
+ re,
1011
1011
  {
1012
1012
  ariaLabelClose: r.details_close_aria,
1013
1013
  isOpen: a,
1014
1014
  onClose: o,
1015
1015
  title: r.details_title,
1016
- children: /* @__PURE__ */ s(w, { bgcolor: "background.default", children: [
1017
- /* @__PURE__ */ e(Ne, { customDetailsChart: i }),
1018
- /* @__PURE__ */ e(vt, {})
1016
+ children: /* @__PURE__ */ s(g, { bgcolor: "background.default", children: [
1017
+ /* @__PURE__ */ e(Re, { customDetailsChart: i }),
1018
+ /* @__PURE__ */ e(Dt, {})
1019
1019
  ] })
1020
1020
  }
1021
1021
  );
1022
- }, Tt = D(() => {
1023
- const { debts: a } = S(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: r } = V(), { onEvent: t } = F(), [n, i] = x.useState(o?.extra_payment ?? 0), p = n < 0 || n > 9999999999e-2, c = async () => {
1022
+ }, At = v(() => {
1023
+ const { debts: a } = S(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: r } = Y(), { onEvent: t } = F(), [n, i] = x.useState(o?.extra_payment ?? 0), d = n < 0 || n > 9999999999e-2, c = async () => {
1024
1024
  o && (await r({ ...o, extra_payment: n }), o.extra_payment = n, t(T.DEBTS_SAVE_PAYDOWN_ACTION, {
1025
1025
  user_guid: o?.user_guid
1026
1026
  }));
1027
- }, d = () => {
1027
+ }, p = () => {
1028
1028
  setTimeout(() => {
1029
1029
  i(o?.extra_payment ?? 0);
1030
1030
  }, 250);
1031
1031
  };
1032
1032
  return /* @__PURE__ */ e(
1033
- J,
1033
+ Q,
1034
1034
  {
1035
- isSaveDisabled: p,
1035
+ isSaveDisabled: d,
1036
1036
  label: a.paydown_drawer_extra_payment,
1037
- onCancel: d,
1037
+ onCancel: p,
1038
1038
  onSave: c,
1039
1039
  primaryText: a.paydown_drawer_extra_payment,
1040
- secondaryText: k(o?.extra_payment, "0,0"),
1040
+ secondaryText: N(o?.extra_payment, "0,0"),
1041
1041
  zeroStateText: o?.extra_payment ? void 0 : a.add_extra_payment,
1042
1042
  children: /* @__PURE__ */ e(
1043
- ae,
1043
+ oe,
1044
1044
  {
1045
1045
  amount: n,
1046
1046
  autoFocus: !0,
1047
- error: p,
1047
+ error: d,
1048
1048
  fullWidth: !0,
1049
1049
  minAmount: 0,
1050
1050
  setAmount: (m) => i(isNaN(Number(m)) ? n : Number(m)),
@@ -1053,40 +1053,40 @@ const we = ({
1053
1053
  )
1054
1054
  }
1055
1055
  );
1056
- }), At = () => {
1057
- const { debts: a } = S(), { totalMonthlyPayments: o } = q(), { monthlyCashFlowProfile: r } = V(), t = o + Number(r?.extra_payment);
1058
- return /* @__PURE__ */ s(w, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1059
- /* @__PURE__ */ s(w, { p: 24, children: [
1060
- /* @__PURE__ */ s(w, { alignItems: "center", gap: 4, mb: 24, children: [
1056
+ }), Et = () => {
1057
+ const { debts: a } = S(), { totalMonthlyPayments: o } = Z(), { monthlyCashFlowProfile: r } = Y(), t = o + Number(r?.extra_payment);
1058
+ return /* @__PURE__ */ s(g, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1059
+ /* @__PURE__ */ s(g, { p: 24, children: [
1060
+ /* @__PURE__ */ s(g, { alignItems: "center", gap: 4, mb: 24, children: [
1061
1061
  /* @__PURE__ */ e(l, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
1062
- /* @__PURE__ */ e(_e, { bold: !0, variant: "H1", children: k(o, "0,0") }),
1062
+ /* @__PURE__ */ e(ye, { bold: !0, variant: "H1", children: N(o, "0,0") }),
1063
1063
  /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
1064
1064
  ] }),
1065
- /* @__PURE__ */ s(w, { children: [
1065
+ /* @__PURE__ */ s(g, { children: [
1066
1066
  /* @__PURE__ */ e(l, { variant: "H3", children: a.paydown_drawer_subtitle }),
1067
1067
  /* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
1068
1068
  ] })
1069
1069
  ] }),
1070
- /* @__PURE__ */ e(w, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Tt, {}) }),
1071
- /* @__PURE__ */ e(w, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(w, { gap: 4, children: [
1070
+ /* @__PURE__ */ e(g, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(At, {}) }),
1071
+ /* @__PURE__ */ e(g, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(g, { gap: 4, children: [
1072
1072
  /* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
1073
- /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: k(t, "0,0") })
1073
+ /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: N(t, "0,0") })
1074
1074
  ] }) })
1075
1075
  ] });
1076
- }, Et = D(At), It = ({ isOpen: a, onClose: o }) => {
1076
+ }, It = v(Et), Bt = ({ isOpen: a, onClose: o }) => {
1077
1077
  const { debts: r } = S();
1078
1078
  return /* @__PURE__ */ e(
1079
- te,
1079
+ re,
1080
1080
  {
1081
1081
  ariaLabelClose: r.paydown_drawer_close_aria,
1082
1082
  isOpen: a,
1083
1083
  onClose: o,
1084
1084
  title: r.paydown_drawer_title,
1085
- children: /* @__PURE__ */ e(Et, {})
1085
+ children: /* @__PURE__ */ e(It, {})
1086
1086
  }
1087
1087
  );
1088
1088
  };
1089
- function Bt(a, o) {
1089
+ function Mt(a, o) {
1090
1090
  const r = (t) => {
1091
1091
  if (typeof t == "number") return t;
1092
1092
  if (t === "!" || t === "✓") return 1 / 0;
@@ -1094,19 +1094,19 @@ function Bt(a, o) {
1094
1094
  };
1095
1095
  return r(a) - r(o);
1096
1096
  }
1097
- function Mt(a) {
1097
+ function Pt(a) {
1098
1098
  return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
1099
1099
  }
1100
- const Pt = (a) => {
1100
+ const kt = (a) => {
1101
1101
  const o = {
1102
1102
  text: "#121417",
1103
1103
  background: "#FFB252"
1104
1104
  };
1105
1105
  return a === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), a === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
1106
- }, kt = (a) => {
1107
- const o = String(a.formattedValue), r = Pt(o);
1106
+ }, Nt = (a) => {
1107
+ const o = String(a.formattedValue), r = kt(o);
1108
1108
  return /* @__PURE__ */ e(
1109
- re,
1109
+ ae,
1110
1110
  {
1111
1111
  sx: {
1112
1112
  display: "flex",
@@ -1122,17 +1122,17 @@ const Pt = (a) => {
1122
1122
  children: /* @__PURE__ */ e(l, { color: r.text, fontWeight: 700, variant: "Small", children: o })
1123
1123
  }
1124
1124
  );
1125
- }, Nt = (a) => {
1126
- const o = a.row.account, r = Ue[o.account_type];
1127
- return /* @__PURE__ */ s(w, { alignItems: "center", flexDirection: "row", children: [
1125
+ }, Rt = (a) => {
1126
+ const o = a.row.account, r = qe[o.account_type];
1127
+ return /* @__PURE__ */ s(g, { alignItems: "center", flexDirection: "row", children: [
1128
1128
  /* @__PURE__ */ e(
1129
- Te,
1129
+ Ae,
1130
1130
  {
1131
1131
  alt: `${o.institutionName}`,
1132
1132
  institutionGuid: o.institution_guid || ""
1133
1133
  }
1134
1134
  ),
1135
- /* @__PURE__ */ s(w, { ml: 12, children: [
1135
+ /* @__PURE__ */ s(g, { ml: 12, children: [
1136
1136
  /* @__PURE__ */ e(l, { variant: "Small", children: o.name }),
1137
1137
  /* @__PURE__ */ e(l, { variant: "XSmall", children: r })
1138
1138
  ] })
@@ -1144,15 +1144,15 @@ const Pt = (a) => {
1144
1144
  onHoverRow: t,
1145
1145
  onClickRow: n
1146
1146
  }) => {
1147
- const i = X(), { onEvent: p } = F(), { isMobile: c } = Y(), { debts: d } = S(), [m, b] = x.useState([
1147
+ const i = V(), { onEvent: d } = F(), { isMobile: c } = K(), { debts: p } = S(), [m, b] = x.useState([
1148
1148
  { field: "priority", sort: "asc" }
1149
- ]), f = [
1149
+ ]), w = [
1150
1150
  {
1151
1151
  field: "priority",
1152
- headerName: d.table_column_priority,
1152
+ headerName: p.table_column_priority,
1153
1153
  renderHeader: z,
1154
- renderCell: kt,
1155
- sortComparator: Bt,
1154
+ renderCell: Nt,
1155
+ sortComparator: Mt,
1156
1156
  sortable: !0,
1157
1157
  hideSortIcons: !0,
1158
1158
  type: "custom",
@@ -1163,9 +1163,9 @@ const Pt = (a) => {
1163
1163
  },
1164
1164
  {
1165
1165
  field: "account",
1166
- headerName: d.table_column_account,
1166
+ headerName: p.table_column_account,
1167
1167
  renderHeader: z,
1168
- renderCell: Nt,
1168
+ renderCell: Rt,
1169
1169
  sortable: !1,
1170
1170
  type: "custom",
1171
1171
  align: "left",
@@ -1175,9 +1175,9 @@ const Pt = (a) => {
1175
1175
  },
1176
1176
  {
1177
1177
  field: "balance",
1178
- headerName: d.table_column_balance,
1178
+ headerName: p.table_column_balance,
1179
1179
  renderHeader: z,
1180
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: k(y.value, "0,0") }),
1180
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: N(y.value, "0,0") }),
1181
1181
  sortable: !0,
1182
1182
  hideSortIcons: c,
1183
1183
  type: "number",
@@ -1188,7 +1188,7 @@ const Pt = (a) => {
1188
1188
  },
1189
1189
  {
1190
1190
  field: "interest_rate",
1191
- headerName: d.table_column_interest_rate,
1191
+ headerName: p.table_column_interest_rate,
1192
1192
  renderHeader: z,
1193
1193
  renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
1194
1194
  sortable: !0,
@@ -1201,9 +1201,9 @@ const Pt = (a) => {
1201
1201
  },
1202
1202
  {
1203
1203
  field: "projected_payoff_date",
1204
- headerName: d.table_column_payoff_date,
1204
+ headerName: p.table_column_payoff_date,
1205
1205
  renderHeader: z,
1206
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: y.value ? K(y.value, U.MONTH_SHORT_YEAR) : "---" }),
1206
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: y.value ? U(y.value, q.MONTH_SHORT_YEAR) : "---" }),
1207
1207
  sortable: !0,
1208
1208
  hideSortIcons: c,
1209
1209
  type: "number",
@@ -1214,9 +1214,9 @@ const Pt = (a) => {
1214
1214
  },
1215
1215
  {
1216
1216
  field: "monthly_payment",
1217
- headerName: d.table_column_amount_due,
1217
+ headerName: p.table_column_amount_due,
1218
1218
  renderHeader: z,
1219
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: typeof y.value == "number" ? k(y.value, "0,0") : "---" }),
1219
+ renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "Small", children: typeof y.value == "number" ? N(y.value, "0,0") : "---" }),
1220
1220
  sortable: !0,
1221
1221
  hideSortIcons: c,
1222
1222
  type: "number",
@@ -1225,13 +1225,13 @@ const Pt = (a) => {
1225
1225
  minWidth: 122,
1226
1226
  flex: 0.6
1227
1227
  }
1228
- ], u = [
1229
- ...f.slice(0, 3),
1228
+ ], h = [
1229
+ ...w.slice(0, 3),
1230
1230
  {
1231
1231
  field: "chevron",
1232
1232
  headerName: "",
1233
1233
  renderHeader: void 0,
1234
- renderCell: () => /* @__PURE__ */ e(ee, { name: "chevron_right'" }),
1234
+ renderCell: () => /* @__PURE__ */ e(te, { name: "chevron_right'" }),
1235
1235
  sortable: !0,
1236
1236
  hideSortIcons: !0,
1237
1237
  type: "custom",
@@ -1239,20 +1239,20 @@ const Pt = (a) => {
1239
1239
  headerAlign: "right",
1240
1240
  width: 20
1241
1241
  }
1242
- ], v = x.useMemo(() => o.map((y, N) => ({
1242
+ ], A = x.useMemo(() => o.map((y, R) => ({
1243
1243
  ...y,
1244
- id: N,
1245
- priority: Mt(y)
1246
- })), [o]), M = (y) => {
1247
- const g = y.target.closest("[data-id]")?.getAttribute("data-id"), A = o[Number(g)];
1248
- t?.(A?.guid ?? "");
1249
- }, I = (y) => {
1250
- c || M(y);
1244
+ id: R,
1245
+ priority: Pt(y)
1246
+ })), [o]), B = (y) => {
1247
+ const f = y.target.closest("[data-id]")?.getAttribute("data-id"), D = o[Number(f)];
1248
+ t?.(D?.guid ?? "");
1249
+ }, M = (y) => {
1250
+ c || B(y);
1251
1251
  }, C = (y) => {
1252
- c && M(y);
1253
- }, B = (y) => v.find((N) => N.guid === y)?.id;
1252
+ c && B(y);
1253
+ }, I = (y) => A.find((R) => R.guid === y)?.id;
1254
1254
  return /* @__PURE__ */ e(
1255
- re,
1255
+ ae,
1256
1256
  {
1257
1257
  sx: {
1258
1258
  height: "100dvh",
@@ -1263,24 +1263,24 @@ const Pt = (a) => {
1263
1263
  ...a
1264
1264
  },
1265
1265
  children: /* @__PURE__ */ e(
1266
- Ke,
1266
+ Ue,
1267
1267
  {
1268
- columns: c ? u : f,
1268
+ columns: c ? h : w,
1269
1269
  disableColumnFilter: !0,
1270
1270
  disableColumnMenu: !0,
1271
1271
  hideFooter: !0,
1272
1272
  initialState: { sorting: { sortModel: m } },
1273
1273
  onRowClick: (y) => {
1274
- n(), p(T.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
1274
+ n(), d(T.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
1275
1275
  },
1276
1276
  onSortModelChange: (y) => {
1277
- b(y), p(T.DEBTS_CLICK_TABLE_SORT);
1277
+ b(y), d(T.DEBTS_CLICK_TABLE_SORT);
1278
1278
  },
1279
- rows: v,
1279
+ rows: A,
1280
1280
  slotProps: {
1281
1281
  baseIconButton: { color: "secondary", sx: { ml: 8 } },
1282
1282
  row: {
1283
- onMouseEnter: I,
1283
+ onMouseEnter: M,
1284
1284
  onMouseLeave: () => !c && t?.(""),
1285
1285
  onTouchStart: C,
1286
1286
  onClick: c ? C : void 0
@@ -1289,7 +1289,7 @@ const Pt = (a) => {
1289
1289
  sortModel: m,
1290
1290
  sortingOrder: ["asc", "desc"],
1291
1291
  sx: {
1292
- [`& .MuiDataGrid-row[data-id="${B(r)}"]`]: {
1292
+ [`& .MuiDataGrid-row[data-id="${I(r)}"]`]: {
1293
1293
  backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
1294
1294
  filter: "brightness(98%)"
1295
1295
  }
@@ -1298,54 +1298,54 @@ const Pt = (a) => {
1298
1298
  )
1299
1299
  }
1300
1300
  );
1301
- }, Rt = ({ buttonText: a, isOpen: o, onClick: r }) => {
1302
- const { isDesktop: t, isTablet: n } = Y(), i = o ? "unfold_less" : "unfold_more";
1301
+ }, Lt = ({ buttonText: a, isOpen: o, onClick: r }) => {
1302
+ const { isDesktop: t, isTablet: n } = K(), i = o ? "unfold_less" : "unfold_more";
1303
1303
  return t || n ? /* @__PURE__ */ e(
1304
- ge,
1304
+ xe,
1305
1305
  {
1306
1306
  "aria-controls": "prioritize-debts",
1307
1307
  "aria-describedby": "prioritize-debts",
1308
1308
  "aria-haspopup": !0,
1309
1309
  "aria-label": "prioritize-debts",
1310
1310
  onClick: r,
1311
- startIcon: /* @__PURE__ */ e(ee, { name: i }),
1311
+ startIcon: /* @__PURE__ */ e(te, { name: i }),
1312
1312
  sx: { justifyContent: "start", minWidth: 214, mx: 4 },
1313
1313
  children: a
1314
1314
  }
1315
1315
  ) : /* @__PURE__ */ e(
1316
- qe,
1316
+ Ze,
1317
1317
  {
1318
1318
  "aria-controls": "prioritize-debts",
1319
1319
  "aria-describedby": "prioritize-debts",
1320
1320
  "aria-haspopup": !0,
1321
1321
  "aria-label": "prioritize-debts",
1322
1322
  onClick: r,
1323
- children: /* @__PURE__ */ e(ee, { name: i })
1323
+ children: /* @__PURE__ */ e(te, { name: i })
1324
1324
  }
1325
1325
  );
1326
- }, Lt = D(({ buttonEl: a, onClose: o }) => {
1327
- const { onEvent: r } = F(), { debts: t } = S(), { selectedDebtPriority: n, setSelectedDebtPriority: i } = $(), p = !!a, c = [
1326
+ }, $t = v(({ buttonEl: a, onClose: o }) => {
1327
+ const { onEvent: r } = F(), { debts: t } = S(), { selectedDebtPriority: n, setSelectedDebtPriority: i } = L(), d = !!a, c = [
1328
1328
  {
1329
- priority: P.FASTEST_PAYOFF_FIRST,
1329
+ priority: k.FASTEST_PAYOFF_FIRST,
1330
1330
  text: t.priority_sort_fastest_payoff
1331
1331
  },
1332
1332
  {
1333
- priority: P.HIGHEST_INTEREST,
1333
+ priority: k.HIGHEST_INTEREST,
1334
1334
  text: t.priority_sort_highest_interest
1335
1335
  },
1336
1336
  {
1337
- priority: P.LOWEST_BALANCE,
1337
+ priority: k.LOWEST_BALANCE,
1338
1338
  text: t.priority_sort_lowest_balance
1339
1339
  },
1340
1340
  {
1341
- priority: P.HIGHEST_BALANCE,
1341
+ priority: k.HIGHEST_BALANCE,
1342
1342
  text: t.priority_sort_highest_balance
1343
1343
  }
1344
- ], d = (m) => {
1344
+ ], p = (m) => {
1345
1345
  i(m), r(T.DEBTS_CLICK_PRIORITY, { debts_priority: m });
1346
1346
  };
1347
1347
  return /* @__PURE__ */ e(
1348
- Je,
1348
+ Qe,
1349
1349
  {
1350
1350
  anchorEl: a,
1351
1351
  anchorOrigin: {
@@ -1354,15 +1354,15 @@ const Pt = (a) => {
1354
1354
  },
1355
1355
  id: "prioritize-debts",
1356
1356
  onClose: o,
1357
- open: p,
1357
+ open: d,
1358
1358
  transformOrigin: {
1359
1359
  vertical: "top",
1360
1360
  horizontal: "left"
1361
1361
  },
1362
- children: /* @__PURE__ */ e(ye, { children: c.map(({ priority: m, text: b }) => /* @__PURE__ */ s(
1363
- Ze,
1362
+ children: /* @__PURE__ */ e(fe, { children: c.map(({ priority: m, text: b }) => /* @__PURE__ */ s(
1363
+ Je,
1364
1364
  {
1365
- onClick: () => d(m),
1365
+ onClick: () => p(m),
1366
1366
  sx: {
1367
1367
  bgcolor: n === m ? "primary.main" : void 0,
1368
1368
  color: n === m ? "#fff" : void 0,
@@ -1379,69 +1379,69 @@ const Pt = (a) => {
1379
1379
  },
1380
1380
  children: [
1381
1381
  /* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: b }),
1382
- n === m && /* @__PURE__ */ e(fe, { color: "inherit", filled: !0, fontSize: "small" })
1382
+ n === m && /* @__PURE__ */ e(ge, { color: "inherit", filled: !0, fontSize: "small" })
1383
1383
  ]
1384
1384
  },
1385
1385
  m
1386
1386
  )) })
1387
1387
  }
1388
1388
  );
1389
- }), $t = D(() => {
1390
- const { onEvent: a } = F(), { debts: o } = S(), { selectedDebtPriority: r } = $(), [t, n] = x.useState(null), i = (m) => {
1389
+ }), Ot = v(() => {
1390
+ const { onEvent: a } = F(), { debts: o } = S(), { selectedDebtPriority: r } = L(), [t, n] = x.useState(null), i = (m) => {
1391
1391
  n(m.currentTarget), a(T.DEBTS_CLICK_PRIORITIZE);
1392
- }, p = () => {
1392
+ }, d = () => {
1393
1393
  n(null);
1394
- }, c = !!t, d = x.useMemo(() => ({
1395
- [P.FASTEST_PAYOFF_FIRST]: o.priority_sort_fastest_payoff,
1396
- [P.HIGHEST_INTEREST]: o.priority_sort_highest_interest,
1397
- [P.HIGHEST_BALANCE]: o.priority_sort_highest_balance,
1398
- [P.LOWEST_BALANCE]: o.priority_sort_lowest_balance
1394
+ }, c = !!t, p = x.useMemo(() => ({
1395
+ [k.FASTEST_PAYOFF_FIRST]: o.priority_sort_fastest_payoff,
1396
+ [k.HIGHEST_INTEREST]: o.priority_sort_highest_interest,
1397
+ [k.HIGHEST_BALANCE]: o.priority_sort_highest_balance,
1398
+ [k.LOWEST_BALANCE]: o.priority_sort_lowest_balance
1399
1399
  })[r] ?? o.priority_sort_lowest_balance, [r]);
1400
1400
  return /* @__PURE__ */ s(_, { children: [
1401
- /* @__PURE__ */ e(Rt, { buttonText: d, isOpen: c, onClick: i }),
1402
- /* @__PURE__ */ e(Lt, { buttonEl: t, onClose: p })
1401
+ /* @__PURE__ */ e(Lt, { buttonText: p, isOpen: c, onClick: i }),
1402
+ /* @__PURE__ */ e($t, { buttonEl: t, onClose: d })
1403
1403
  ] });
1404
1404
  }), Ht = (a, o, r = 0) => {
1405
- const t = a.map((d) => ({ ...d }));
1406
- xe(t, o);
1405
+ const t = a.map((p) => ({ ...p }));
1406
+ we(t, o);
1407
1407
  const n = /* @__PURE__ */ new Date(), i = [];
1408
- let p = 0, c = 1;
1409
- for (const d of t)
1408
+ let d = 0, c = 1;
1409
+ for (const p of t)
1410
1410
  i.push({
1411
- ...d,
1411
+ ...p,
1412
1412
  // Start with the initial balance
1413
- dataset: [{ x: new Date(n), y: d.balance }]
1413
+ dataset: [{ x: new Date(n), y: p.balance }]
1414
1414
  });
1415
- for (; t.some((d) => d.balance >= 0.01 && !d.is_impossible); ) {
1416
- let d = !1, m = !1, b = !1;
1417
- for (const [f, u] of t.entries()) {
1418
- if (u.balance <= 0.01) continue;
1419
- const v = i[f].dataset, I = (u.interest_rate ?? 0) / 100 / 12, C = u.balance * I, B = u.monthly_payment ?? 0;
1420
- let y = B, N = 0;
1421
- !b && r > 0 && (y += r, b = !0), !m && p > 0 && (N = p, m = !0), u.balance += C;
1422
- const h = Math.min(u.balance, y + N);
1423
- if (h <= C) {
1424
- u.is_impossible = !0, i[f].is_impossible = !0, i[f].priority = void 0, v.push({ x: new Date(n), y: u.balance });
1415
+ for (; t.some((p) => p.balance >= 0.01 && !p.is_impossible); ) {
1416
+ let p = !1, m = !1, b = !1;
1417
+ for (const [w, h] of t.entries()) {
1418
+ if (h.balance <= 0.01) continue;
1419
+ const A = i[w].dataset, M = (h.interest_rate ?? 0) / 100 / 12, C = h.balance * M, I = h.monthly_payment ?? 0;
1420
+ let y = I, R = 0;
1421
+ !b && r > 0 && (y += r, b = !0), !m && d > 0 && (R = d, m = !0), h.balance += C;
1422
+ const u = Math.min(h.balance, y + R);
1423
+ if (u <= C) {
1424
+ h.is_impossible = !0, i[w].is_impossible = !0, i[w].priority = void 0, A.push({ x: new Date(n), y: h.balance });
1425
1425
  continue;
1426
1426
  }
1427
- u.balance -= h, u.balance = u.balance < 0.01 ? 0 : u.balance, v.push({
1427
+ h.balance -= u, h.balance = h.balance < 0.01 ? 0 : h.balance, A.push({
1428
1428
  x: new Date(n),
1429
- y: Math.max(0, u.balance),
1430
- payment: h,
1431
- extra: N
1432
- }), u.balance <= 0 && (p += B, i[f].projected_payoff_date = new Date(n)), h > 0 && (d = !0);
1429
+ y: Math.max(0, h.balance),
1430
+ payment: u,
1431
+ extra: R
1432
+ }), h.balance <= 0 && (d += I, i[w].projected_payoff_date = new Date(n)), u > 0 && (p = !0);
1433
1433
  }
1434
- d && n.setMonth(n.getMonth() + 1);
1434
+ p && n.setMonth(n.getMonth() + 1);
1435
1435
  }
1436
- return i.forEach((d) => {
1437
- (d.interest_rate === void 0 || d.monthly_payment === void 0) && (d.projected_payoff_date = void 0);
1438
- }), i.forEach((d) => {
1439
- d.priority = !d.is_paid_off && !d.is_impossible ? c++ : void 0;
1436
+ return i.forEach((p) => {
1437
+ (p.interest_rate === void 0 || p.monthly_payment === void 0) && (p.projected_payoff_date = void 0);
1438
+ }), i.forEach((p) => {
1439
+ p.priority = !p.is_paid_off && !p.is_impossible ? c++ : void 0;
1440
1440
  }), i;
1441
- }, Ot = D(({ onClick: a }) => {
1442
- const { debts: o } = S(), { isDesktop: r } = Y(), { totalMonthlyPayments: t } = q(), { monthlyCashFlowProfile: n } = V(), i = t + Number(n?.extra_payment), p = r ? o.paydown_button_long : o.paydown_button_short;
1441
+ }, Gt = v(({ onClick: a }) => {
1442
+ const { debts: o } = S(), { isDesktop: r } = K(), { totalMonthlyPayments: t } = Z(), { monthlyCashFlowProfile: n } = Y(), i = t + Number(n?.extra_payment), d = r ? o.paydown_button_long : o.paydown_button_short;
1443
1443
  return /* @__PURE__ */ e(
1444
- ge,
1444
+ xe,
1445
1445
  {
1446
1446
  "aria-controls": "extra-paydown",
1447
1447
  "aria-describedby": "extra-paydown",
@@ -1449,105 +1449,109 @@ const Pt = (a) => {
1449
1449
  "aria-label": "extra-paydown",
1450
1450
  onClick: a,
1451
1451
  sx: { justifyContent: "start", minWidth: 100, mx: 4 },
1452
- children: E(p, k(i, "0,0"))
1452
+ children: E(d, N(i, "0,0"))
1453
1453
  }
1454
1454
  );
1455
1455
  }), Wt = ({ onBackClick: a, sx: o }) => {
1456
- const [r, t] = x.useState(!1), [n, i] = x.useState(!1), [p, c] = x.useState(!1), [d, m] = x.useState(""), { isDesktop: b, isMobile: f } = Y(), { debts: u } = S(), { onEvent: v } = F(), { isCopyLoaded: M, isInitialized: I, setSelectedAccounts: C } = ke(), { setSelectedAccount: B } = Fe(), { selectedDebtPriority: y, setSelectedDebtChartData: N } = $(), { visibleDebtAccounts: h } = Z(), { goalsLoaded: g, loadGoals: A, monthlyCashFlowProfile: R } = V(), { debts: L } = q();
1457
- Qe({
1456
+ const { isDesktop: r, isMobile: t } = K(), { debts: n } = S(), { onEvent: i } = F(), { isInitialized: d } = Ne(), { setSelectedAccount: c } = Fe(), { selectedDebtPriority: p, setSelectedDebtChartData: m } = L(), { isAccountDataLoaded: b, loadAccountData: w, visibleDebtAccounts: h } = J(), { isAllGoalDataLoaded: A, loadGoalData: B, monthlyCashFlowProfile: M } = Y(), { debts: C } = Z(), [I, y] = x.useState(!1), [R, u] = x.useState(!1), [f, D] = x.useState(!1), [P, $] = x.useState("");
1457
+ et({
1458
1458
  widgetName: "DebtsWidget",
1459
- isLoaded: g
1459
+ isLoaded: A
1460
1460
  });
1461
- const O = x.useMemo(() => {
1462
- const W = R?.extra_payment ?? 0;
1463
- return Ht(L, y, W);
1464
- }, [L, y, R]);
1461
+ const H = x.useMemo(() => {
1462
+ const G = M?.extra_payment ?? 0;
1463
+ return Ht(C, p, G);
1464
+ }, [C, p, M]);
1465
1465
  x.useEffect(() => {
1466
- C(h), v(T.DEBTS_VIEW);
1466
+ b || w().finally(), i(T.DEBTS_VIEW);
1467
1467
  }, []), x.useEffect(() => {
1468
- C(h);
1469
- }, [h]), x.useEffect(() => {
1470
- I && A().finally();
1471
- }, [I]);
1472
- const oe = (W) => m(W), ne = () => {
1473
- const W = h.find((Q) => Q.guid === d), ie = O.find((Q) => Q.guid === d);
1474
- W && B(W), ie && N(ie), t(!0);
1475
- }, Ce = () => v(T.DEBTS_CLICK_FILTER), Se = () => {
1476
- c(!0), v(T.DEBTS_CLICK_SNOWBALL_CTA);
1477
- }, ve = () => {
1478
- i(!0), v(T.DEBTS_CLICK_PAYDOWN);
1468
+ d && B().finally();
1469
+ }, [d]);
1470
+ const ne = (G) => $(G), ie = () => {
1471
+ const G = h.find((ee) => ee.guid === P), le = H.find((ee) => ee.guid === P);
1472
+ G && c(G), le && m(le), y(!0);
1473
+ }, Se = () => i(T.DEBTS_CLICK_FILTER), ve = () => {
1474
+ D(!0), i(T.DEBTS_CLICK_SNOWBALL_CTA);
1475
+ }, De = () => {
1476
+ u(!0), i(T.DEBTS_CLICK_PAYDOWN);
1479
1477
  };
1480
- return !g || !M || !I ? /* @__PURE__ */ e(et, {}) : /* @__PURE__ */ s(
1478
+ return !d || !A ? /* @__PURE__ */ e(tt, {}) : /* @__PURE__ */ s(
1481
1479
  We,
1482
1480
  {
1483
- accountOptions: h,
1484
1481
  actions: [
1485
- /* @__PURE__ */ e($t, {}, "prioritize-debts"),
1486
- /* @__PURE__ */ e(Ot, { onClick: ve }, "extra-paydown")
1482
+ /* @__PURE__ */ e(Ot, {}, "prioritize-debts"),
1483
+ /* @__PURE__ */ e(Gt, { onClick: De }, "extra-paydown")
1484
+ ],
1485
+ allowedAccountTypes: [
1486
+ X.CREDIT_CARD,
1487
+ X.LOAN,
1488
+ X.MORTGAGE,
1489
+ X.LINE_OF_CREDIT,
1490
+ X.CHECKING_LINE_OF_CREDIT
1487
1491
  ],
1488
- onAccountsFilterClick: Ce,
1492
+ onAccountsFilterClick: Se,
1489
1493
  onBackClick: a,
1490
1494
  sx: o,
1491
- title: u.title,
1495
+ title: n.title,
1492
1496
  children: [
1493
- /* @__PURE__ */ s(w, { sx: { px: b ? "48px" : "24px" }, children: [
1497
+ /* @__PURE__ */ s(g, { sx: { px: r ? "48px" : "24px" }, children: [
1494
1498
  /* @__PURE__ */ s(
1495
- w,
1499
+ g,
1496
1500
  {
1497
1501
  sx: {
1498
- alignItems: f ? "flex-start" : "flex-end",
1499
- flexDirection: f ? "column" : "row",
1500
- mx: f ? "-12px" : 0
1502
+ alignItems: t ? "flex-start" : "flex-end",
1503
+ flexDirection: t ? "column" : "row",
1504
+ mx: t ? "-12px" : 0
1501
1505
  },
1502
1506
  children: [
1503
1507
  /* @__PURE__ */ e(
1504
- we,
1508
+ Ce,
1505
1509
  {
1506
- debts: O,
1507
- height: f ? 250 : void 0,
1508
- hoveredDebtGuid: d,
1509
- onClickArea: ne,
1510
- onHoverArea: oe,
1511
- sx: { mr: f ? "4px" : "-48px" }
1510
+ debts: H,
1511
+ height: t ? 250 : void 0,
1512
+ hoveredDebtGuid: P,
1513
+ onClickArea: ie,
1514
+ onHoverArea: ne,
1515
+ sx: { mr: t ? "4px" : "-48px" }
1512
1516
  }
1513
1517
  ),
1514
1518
  /* @__PURE__ */ e(
1515
- lt,
1519
+ st,
1516
1520
  {
1517
- debts: O,
1518
- onClickCta: Se,
1519
- sx: { mb: f ? "0px" : "64px" }
1521
+ debts: H,
1522
+ onClickCta: ve,
1523
+ sx: { mb: t ? "0px" : "64px" }
1520
1524
  }
1521
1525
  )
1522
1526
  ]
1523
1527
  }
1524
1528
  ),
1525
- /* @__PURE__ */ e(w, { sx: { mx: f ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1529
+ /* @__PURE__ */ e(g, { sx: { mx: t ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1526
1530
  Ft,
1527
1531
  {
1528
- debts: O,
1529
- hoveredDebtGuid: d,
1530
- onClickRow: ne,
1531
- onHoverRow: oe
1532
+ debts: H,
1533
+ hoveredDebtGuid: P,
1534
+ onClickRow: ie,
1535
+ onHoverRow: ne
1532
1536
  }
1533
1537
  ) })
1534
1538
  ] }),
1535
1539
  /* @__PURE__ */ e(
1536
- ct,
1540
+ dt,
1537
1541
  {
1538
- isOpen: p,
1539
- onClose: () => c(!1)
1542
+ isOpen: f,
1543
+ onClose: () => D(!1)
1540
1544
  }
1541
1545
  ),
1542
- /* @__PURE__ */ e(Dt, { isOpen: r, onClose: () => t(!1) }),
1543
- /* @__PURE__ */ e(It, { isOpen: n, onClose: () => i(!1) })
1546
+ /* @__PURE__ */ e(Tt, { isOpen: I, onClose: () => y(!1) }),
1547
+ /* @__PURE__ */ e(Bt, { isOpen: R, onClose: () => u(!1) })
1544
1548
  ]
1545
1549
  }
1546
1550
  );
1547
- }, Fr = D(Wt);
1551
+ }, Fr = v(Wt);
1548
1552
  export {
1549
- we as DebtsChart,
1550
- $r as DebtsStore,
1553
+ Ce as DebtsChart,
1554
+ Or as DebtsStore,
1551
1555
  Ft as DebtsTable,
1552
1556
  Fr as DebtsWidget
1553
1557
  };