@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.
Files changed (246) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-CMjOp7S2.mjs → Account-BaJmiJAG.mjs} +4 -4
  3. package/dist/{Account-BIKn4XEZ.mjs → Account-BxHMlV9R.mjs} +1 -1
  4. package/dist/{AccountDetailsHeader-CzefHTWU.mjs → AccountDetailsHeader-CfdnKyJK.mjs} +21 -21
  5. package/dist/{AccountFields-BWmpVsS3.mjs → AccountFields-CAy0x_4i.mjs} +6 -6
  6. package/dist/{AccountListItem-DRDxaRBe.mjs → AccountListItem-BYyeeCf6.mjs} +7 -7
  7. package/dist/{Accounts-DX3xJE97.mjs → AccountUtils-T5_Odvos.mjs} +1 -1
  8. package/dist/{Analytics-CxK7O19c.mjs → Analytics-CkYXKvco.mjs} +1 -1
  9. package/dist/ApiEndpoints-DXwIYNUV.mjs +49 -0
  10. package/dist/BudgetUtil-Bg2AQJpQ.mjs +74 -0
  11. package/dist/{Category-Ccoew_sA.mjs → Category-DEKZGLYe.mjs} +3 -3
  12. package/dist/{CategorySelectorDrawer-hhDdSFHO.mjs → CategorySelectorDrawer-Cu1ohxeM.mjs} +2 -2
  13. package/dist/{Connect-CBBTL1HJ.mjs → Connect-Dk6GZEsA.mjs} +1 -1
  14. package/dist/ConnectCard-Dix8BoV_.mjs +54 -0
  15. package/dist/{ConnectDrawer-DNnuF80E.mjs → ConnectDrawer-DgfsTpyW.mjs} +2 -2
  16. package/dist/{ConnectionsDrawer-DX6d7uwJ.mjs → ConnectionsDrawer-D7IXAza2.mjs} +2 -2
  17. package/dist/CurrencyDialog-d4dL7vA5.mjs +371 -0
  18. package/dist/{CurrencyInput-BMbUVSvz.mjs → CurrencyInput-B59ugxPN.mjs} +15 -16
  19. package/dist/{CurrencyText-oqd6cX3M.mjs → CurrencyText-CCbE6MmF.mjs} +1 -1
  20. package/dist/{DateFormats-CaOj_4eI.mjs → DateFormats-HudZ3Bjs.mjs} +6 -7
  21. package/dist/{DateUtil-D0TO0DaZ.mjs → DateUtil-Bhq59ZVg.mjs} +1 -1
  22. package/dist/DebtUtils-DD3186U-.mjs +153 -0
  23. package/dist/EmbeddedCard-BNl3quCs.mjs +856 -0
  24. package/dist/Error-Dogaw2jO.mjs +84 -0
  25. package/dist/ErrorBoundary-CsdOcnJ9.mjs +23 -0
  26. package/dist/{ExportCsvAction-BDFu6YIe.mjs → ExportCsvAction-hDprC41l.mjs} +6 -5
  27. package/dist/{GlobalAccountFilter-jkFxqPg6.mjs → GlobalAccountFilter-DrhtwPqh.mjs} +1 -1
  28. package/dist/GlobalCopyApi-wcnDUzMV.mjs +128 -0
  29. package/dist/GoalsUtil-C9EnLWvC.mjs +107 -0
  30. package/dist/{Help-C_CM4gpK.mjs → Help-BSQm9o29.mjs} +68 -67
  31. package/dist/{Help-CgpJK03Q.mjs → Help-CkQTjORd.mjs} +6 -27
  32. package/dist/InformationTooltip-4su8bn1e.mjs +41 -0
  33. package/dist/{LineChart-CeZnCZ7j.mjs → LineChart-CejWS_rh.mjs} +2 -2
  34. package/dist/{ListItemAction-CNpknVvo.mjs → ListItemAction-DGjHxNDJ.mjs} +1 -1
  35. package/dist/ListItemRow-kH1rn8Xu.mjs +67 -0
  36. package/dist/ListItemWrapper-B5r-YQQ_.mjs +42 -0
  37. package/dist/Localization-DnoVyBNK.mjs +38 -0
  38. package/dist/{ManageIncome-BX2IqW57.mjs → ManageIncome-DwylSiWs.mjs} +51 -51
  39. package/dist/{MicroWidgetContainer-DAesImQ6.mjs → MicroWidgetContainer-CfKdQfhi.mjs} +1 -1
  40. package/dist/{MiniWidgetContainer-BOv3n4iw.mjs → MiniWidgetContainer-BdPiUU-u.mjs} +1 -1
  41. package/dist/NetWorthUtils-DilGN1nW.mjs +95 -0
  42. package/dist/{NotificationSettings-DatCL2Ej.mjs → NotificationSettings-CCg-Tml2.mjs} +13 -13
  43. package/dist/NotificationUtils-BRGFTePr.mjs +23 -0
  44. package/dist/{NumberFormatting-CyrvFgfd.mjs → NumberFormatting--XMeeBfr.mjs} +2 -1
  45. package/dist/{OriginalBalanceAction-CWQ0CK-T.mjs → OriginalBalanceAction-CvDx0K6k.mjs} +4 -4
  46. package/dist/{RecurringSettings-DCplGEv_.mjs → RecurringSettings-CPXLW6AR.mjs} +9 -9
  47. package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +253 -0
  48. package/dist/Select-BZRUpOib.mjs +51 -0
  49. package/dist/SelectionBox-Bx2a5rh4.mjs +48 -0
  50. package/dist/Sizes-DISGrlUg.mjs +6 -0
  51. package/dist/{SpendingData-Dj85XEUp.mjs → SpendingData-PKlh8caU.mjs} +6 -6
  52. package/dist/{SpendingLegend-BS8mHUbu.mjs → SpendingLegend-BmkEr9Nh.mjs} +4 -4
  53. package/dist/{TransactionDetails-C_skrQk8.mjs → TransactionDetails-CbBSxdOi.mjs} +33 -33
  54. package/dist/TransactionUtils-BphBJBbU.mjs +234 -0
  55. package/dist/TrendsUtil-D9z3kIj_.mjs +69 -0
  56. package/dist/UserStore-CRpKQjpP.mjs +3002 -0
  57. package/dist/{ViewMoreMicroCard-D1j0w64K.mjs → ViewMoreMicroCard-K69RRs_b.mjs} +28 -30
  58. package/dist/{WidgetContainer-BPJoDkhL.mjs → WidgetContainer-DalWyz5A.mjs} +3 -3
  59. package/dist/accounts/hooks/useUiStore.d.ts +6 -1
  60. package/dist/accounts/index.d.ts +0 -1
  61. package/dist/accounts/index.es.js +62 -64
  62. package/dist/analytics/index.es.js +2 -2
  63. package/dist/budgets/index.es.js +18 -18
  64. package/dist/cashflow/context/hooks.d.ts +15 -1
  65. package/dist/cashflow/index.d.ts +0 -1
  66. package/dist/cashflow/index.es.js +28 -31
  67. package/dist/categories/context/hooks.d.ts +19 -1
  68. package/dist/categories/index.d.ts +0 -1
  69. package/dist/categories/index.es.js +4 -6
  70. package/dist/common/constants/ScheduledPayment.d.ts +1 -1
  71. package/dist/common/constants/index.d.ts +0 -3
  72. package/dist/common/context/GlobalDataProvider.d.ts +1 -1
  73. package/dist/common/context/hooks.d.ts +20 -20
  74. package/dist/common/index.d.ts +3 -1
  75. package/dist/common/index.es.js +215 -961
  76. package/dist/common/utils/AccountFilter.d.ts +1 -1
  77. package/dist/common/utils/index.d.ts +0 -4
  78. package/dist/{common → core}/constants/DefaultConfig.d.ts +1 -1
  79. package/dist/core/constants/Transaction.d.ts +10 -0
  80. package/dist/core/constants/index.d.ts +2 -0
  81. package/dist/core/index.d.ts +1 -1
  82. package/dist/core/index.es.js +94 -79
  83. package/dist/{accounts → core}/stores/AccountStore.d.ts +14 -4
  84. package/dist/{analytics → core}/stores/AnalyticsStore.d.ts +1 -1
  85. package/dist/{common → core}/stores/AppDataStore.d.ts +4 -5
  86. package/dist/{insights/store → core/stores}/BeatStore.d.ts +3 -3
  87. package/dist/{budgets/store → core/stores}/BudgetsStore.d.ts +3 -4
  88. package/dist/{cashflow/stores/UiStore.d.ts → core/stores/CashflowStore.d.ts} +10 -2
  89. package/dist/{categories → core}/stores/CategoryStore.d.ts +24 -4
  90. package/dist/{common → core}/stores/ConnectStore.d.ts +2 -2
  91. package/dist/core/stores/DebtsStore.d.ts +22 -0
  92. package/dist/{finstrong → core}/stores/FinstrongStore.d.ts +4 -4
  93. package/dist/{common → core}/stores/GlobalCopyStore.d.ts +2 -2
  94. package/dist/{common → core}/stores/GlobalStore.d.ts +2 -25
  95. package/dist/{common → core}/stores/GlobalUiStore.d.ts +3 -3
  96. package/dist/{goals → core}/stores/GoalStore.d.ts +3 -3
  97. package/dist/{help/store → core/stores}/HelpStore.d.ts +4 -6
  98. package/dist/{investments → core}/stores/HoldingStore.d.ts +4 -4
  99. package/dist/{merchants → core}/stores/MerchantStore.d.ts +3 -3
  100. package/dist/{networth → core}/stores/NetWorthStore.d.ts +3 -4
  101. package/dist/{notifications → core}/stores/NotificationStore.d.ts +3 -3
  102. package/dist/{recurringtransactions → core}/stores/RecurringTransactionsStore.d.ts +3 -3
  103. package/dist/{settings → core}/stores/SettingsStore.d.ts +4 -5
  104. package/dist/{transactions → core}/stores/TransactionStore.d.ts +27 -6
  105. package/dist/{trends → core}/stores/TrendsStore.d.ts +11 -5
  106. package/dist/{common → core}/stores/UserStore.d.ts +2 -2
  107. package/dist/core/stores/index.d.ts +24 -0
  108. package/dist/{networth → core}/types/NetWorth.d.ts +1 -10
  109. package/dist/core/types/Offer.d.ts +32 -0
  110. package/dist/core/types/index.d.ts +3 -1
  111. package/dist/{accounts/utils/Accounts.d.ts → core/utils/AccountUtils.d.ts} +1 -1
  112. package/dist/{microinsights/utils/beatUtils.d.ts → core/utils/BeatUtils.d.ts} +1 -1
  113. package/dist/{budgets → core}/utils/BudgetUtil.d.ts +2 -2
  114. package/dist/{categories/util → core/utils}/CategoryUtil.d.ts +6 -1
  115. package/dist/core/utils/DebtUtils.d.ts +31 -0
  116. package/dist/core/utils/FinstrongUtils.d.ts +7 -0
  117. package/dist/{goals/util → core/utils}/GoalsUtil.d.ts +1 -1
  118. package/dist/core/utils/HelpUtil.d.ts +3 -0
  119. package/dist/{investments/util → core/utils}/InvestmentUtil.d.ts +2 -2
  120. package/dist/core/utils/Localization.d.ts +3 -0
  121. package/dist/{networth → core}/utils/NetWorthUtils.d.ts +1 -2
  122. package/dist/{notifications → core}/utils/NotificationUtils.d.ts +1 -1
  123. package/dist/{common → core}/utils/NumberFormatting.d.ts +1 -1
  124. package/dist/{recurringtransactions/util/RecurringTransactions.d.ts → core/utils/RecurringTransactionsUtil.d.ts} +1 -1
  125. package/dist/{settings/util/Notifications.d.ts → core/utils/SettingsUtil.d.ts} +1 -1
  126. package/dist/{transactions/utils/buildDetailedTransactions.d.ts → core/utils/TransactionUtils.d.ts} +12 -2
  127. package/dist/{trends/utils/TrendsData.d.ts → core/utils/TrendsUtil.d.ts} +1 -1
  128. package/dist/{common/utils/User.d.ts → core/utils/UserUtils.d.ts} +1 -1
  129. package/dist/core/utils/index.d.ts +1 -1
  130. package/dist/dashboard/index.es.js +4 -4
  131. package/dist/debts/components/DebtsChart.d.ts +1 -1
  132. package/dist/debts/components/DebtsTable.d.ts +1 -1
  133. package/dist/debts/components/SnowballCard.d.ts +1 -1
  134. package/dist/debts/components/actions/InterestRateAction.d.ts +1 -1
  135. package/dist/debts/components/actions/MonthlyPaymentAction.d.ts +1 -1
  136. package/dist/debts/components/actions/OriginalBalanceAction.d.ts +1 -1
  137. package/dist/debts/hooks/useDebtsUiStore.d.ts +1 -1
  138. package/dist/debts/index.d.ts +0 -1
  139. package/dist/debts/index.es.js +568 -691
  140. package/dist/debts/utils/DebtsTable.d.ts +1 -1
  141. package/dist/debts/utils/SnowballCard.d.ts +2 -2
  142. package/dist/finstrong/index.d.ts +0 -1
  143. package/dist/finstrong/index.es.js +1565 -1342
  144. package/dist/finstrong/util/finstrongUtils.d.ts +1 -7
  145. package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
  146. package/dist/goals/index.d.ts +0 -1
  147. package/dist/goals/index.es.js +71 -73
  148. package/dist/help/index.es.js +4 -4
  149. package/dist/help/utils/index.d.ts +0 -1
  150. package/dist/{hooks-RzCoiTd0.mjs → hooks-BaO_gOI6.mjs} +17 -17
  151. package/dist/insights/index.d.ts +0 -1
  152. package/dist/insights/index.es.js +52 -54
  153. package/dist/investments/components/AnalysisDetails.d.ts +1 -1
  154. package/dist/investments/index.es.js +6 -6
  155. package/dist/merchants/index.d.ts +0 -1
  156. package/dist/merchants/index.es.js +12 -14
  157. package/dist/microinsights/index.es.js +1 -1
  158. package/dist/microinsights/interfaces.d.ts +1 -33
  159. package/dist/networth/components/AssetsLiabilitiesDetail.d.ts +1 -1
  160. package/dist/networth/components/GainsLossesDetail.d.ts +1 -1
  161. package/dist/networth/components/NetWorthChange.d.ts +1 -1
  162. package/dist/networth/components/NetWorthListItem.d.ts +1 -1
  163. package/dist/networth/components/NetWorthSummary.d.ts +1 -1
  164. package/dist/networth/index.d.ts +0 -4
  165. package/dist/networth/index.es.js +232 -237
  166. package/dist/notifications/index.d.ts +0 -2
  167. package/dist/notifications/index.es.js +23 -26
  168. package/dist/recurringtransactions/index.d.ts +0 -1
  169. package/dist/recurringtransactions/index.es.js +92 -96
  170. package/dist/settings/index.d.ts +0 -1
  171. package/dist/settings/index.es.js +11 -13
  172. package/dist/spending/index.es.js +10 -10
  173. package/dist/transactions/context/hooks.d.ts +1 -1
  174. package/dist/transactions/index.d.ts +0 -4
  175. package/dist/transactions/index.es.js +102 -109
  176. package/dist/trends/index.d.ts +0 -1
  177. package/dist/trends/index.es.js +67 -68
  178. package/dist/trends/utils/shared.d.ts +1 -1
  179. package/dist/{useAccountDisplayName-pliH6hz0.mjs → useAccountDisplayName-CFa_MrS6.mjs} +1 -1
  180. package/dist/{useInsightsEnabled-CzJoG8xi.mjs → useInsightsEnabled-DaNLPmUU.mjs} +1 -1
  181. package/dist/{useWidgetLoadTimer-BZjr-BiE.mjs → useWidgetLoadTimer-CJb-RELP.mjs} +1 -1
  182. package/package.json +1 -1
  183. package/dist/AccountApi-WEM2M9tg.mjs +0 -19
  184. package/dist/AccountStore-CGrjC2Oe.mjs +0 -253
  185. package/dist/ApiEndpoints-C5IA97i7.mjs +0 -118
  186. package/dist/BeatApi-C6pBa0Rb.mjs +0 -21
  187. package/dist/BeatStore-C7-PIhpB.mjs +0 -163
  188. package/dist/BudgetUtil-H9igoNVm.mjs +0 -479
  189. package/dist/CashflowStore-BEi92kJg.mjs +0 -91
  190. package/dist/CategoryApi-CogDFScz.mjs +0 -29
  191. package/dist/CategoryStore-CA4NTaKH.mjs +0 -160
  192. package/dist/CategoryUtil-BJOHgYKS.mjs +0 -80
  193. package/dist/DebtsStore-BJlC2-yO.mjs +0 -63
  194. package/dist/EmbeddedCard-B9JoBaan.mjs +0 -811
  195. package/dist/FinstrongApi-FpmsS_sy.mjs +0 -19
  196. package/dist/FinstrongStore-DYawCv1d.mjs +0 -435
  197. package/dist/GlobalCopyApi-DkS-2Zf_.mjs +0 -41
  198. package/dist/Goal-MFBpoOIC.mjs +0 -29
  199. package/dist/GoalStore-BBAEbf43.mjs +0 -395
  200. package/dist/Localization-C_HZg9tJ.mjs +0 -15
  201. package/dist/Localization-CkQ49EKr.mjs +0 -26
  202. package/dist/MerchantApi-D8ahYxiG.mjs +0 -15
  203. package/dist/MerchantStore-CyZTv-BM.mjs +0 -26
  204. package/dist/NetWorthStore-BY-B_hxy.mjs +0 -168
  205. package/dist/NotificationApi-DF0obHoR.mjs +0 -20
  206. package/dist/NotificationStore-DlAM5Ue0.mjs +0 -69
  207. package/dist/RecurringTransactions-DCt94TN4.mjs +0 -297
  208. package/dist/RecurringTransactionsStore-CFJYC7lI.mjs +0 -264
  209. package/dist/RepeatingTransaction-D2gmBTd0.mjs +0 -7
  210. package/dist/RepeatingTransactionsApi-BNZgZPLs.mjs +0 -17
  211. package/dist/SettingsApi-D9d7SLhB.mjs +0 -22
  212. package/dist/SettingsStore-BcbuKfFO.mjs +0 -250
  213. package/dist/Transaction-Cn5_iFm0.mjs +0 -5
  214. package/dist/TransactionApi-CLG2eSNe.mjs +0 -86
  215. package/dist/TransactionStore-amPYxHnA.mjs +0 -710
  216. package/dist/TrendsStore-bYjIGqyR.mjs +0 -183
  217. package/dist/WidgetApi-C0BA2cFX.mjs +0 -102
  218. package/dist/accounts/stores/UiStore.d.ts +0 -10
  219. package/dist/accounts/utils/index.d.ts +0 -1
  220. package/dist/cashflow/stores/CashflowStore.d.ts +0 -8
  221. package/dist/categories/stores/UiStore.d.ts +0 -20
  222. package/dist/common/stores/index.d.ts +0 -3
  223. package/dist/common/utils/Categories.d.ts +0 -6
  224. package/dist/common/utils/Localization.d.ts +0 -3
  225. package/dist/debts/store/DebtsStore.d.ts +0 -10
  226. package/dist/debts/store/DebtsUiStore.d.ts +0 -13
  227. package/dist/debts/utils/DebtStore.d.ts +0 -4
  228. package/dist/debts/utils/DebtsWidget.d.ts +0 -20
  229. package/dist/debts/utils/shared.d.ts +0 -12
  230. package/dist/exportTransactionsToCSV-CSvbZrvL.mjs +0 -133
  231. package/dist/help/constants/index.d.ts +0 -1
  232. package/dist/help/utils/getAccessibleHelpCategories.d.ts +0 -3
  233. package/dist/transactions/analytics.d.ts +0 -3
  234. package/dist/transactions/constants/Transaction.d.ts +0 -2
  235. package/dist/transactions/constants/TransactionsTable.d.ts +0 -17
  236. package/dist/transactions/stores/UiStore.d.ts +0 -25
  237. package/dist/transactions/utils/exportTransactionsToCSV.d.ts +0 -9
  238. package/dist/transactions/utils/sortAndFilterTransactions.d.ts +0 -3
  239. /package/dist/{common → core}/constants/Category.d.ts +0 -0
  240. /package/dist/{common → core}/constants/DateFormats.d.ts +0 -0
  241. /package/dist/{debts/constants/index.d.ts → core/constants/Debts.d.ts} +0 -0
  242. /package/dist/{help → core}/constants/Help.d.ts +0 -0
  243. /package/dist/{investments/constants/index.d.ts → core/constants/Investments.d.ts} +0 -0
  244. /package/dist/{common → core}/constants/Numbers.d.ts +0 -0
  245. /package/dist/{common → core}/constants/Table.d.ts +0 -0
  246. /package/dist/{common → core}/utils/DateUtil.d.ts +0 -0
@@ -1,181 +1,101 @@
1
- import { jsx as e, jsxs as s, Fragment as $ } from "react/jsx-runtime";
2
- import g from "react";
3
- import { observer as D } from "mobx-react-lite";
4
- import f from "@mui/material/Stack";
5
- import { useTheme as Y, Card as Ce, Stack as _, Box as W } from "@mui/material";
6
- import { Text as l, P as ve, H3 as Le, InstitutionLogo as $e, Icon as oe } from "@mxenabled/mxui";
7
- import { intervalToDuration as Oe, formatDuration as He } from "date-fns";
8
- import { addMonths as ue } from "date-fns/addMonths";
9
- import { fromUnixTime as be } from "date-fns/fromUnixTime";
10
- import { getUnixTime as _e } from "date-fns/getUnixTime";
11
- import { a as N, M as We, I as Ge } from "../DebtsStore-BJlC2-yO.mjs";
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 { b as E } from "../Localization-CkQ49EKr.mjs";
19
- import { A as Ke, u as Ue } from "../AccountDetailsHeader-CzefHTWU.mjs";
20
- import qe from "@mui/material/Card";
21
- import Xe from "@mui/material/CardContent";
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 Je } from "@mui/material/styles";
25
- import { LineChart as Qe } from "@mui/x-charts/LineChart";
26
- import { A } from "../Analytics-CzGzz_sE.mjs";
27
- import ye from "@mui/material/Tab";
28
- import et from "@mui/material/Tabs";
29
- import De from "@mui/material/List";
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 tt, I as rt, O as nt } from "../OriginalBalanceAction-CWQ0CK-T.mjs";
32
- import ot from "@mui/material/TextField";
33
- import { L as re } from "../ListItemAction-CNpknVvo.mjs";
34
- import { C as se } from "../CurrencyInput-BMbUVSvz.mjs";
35
- import fe from "@mui/material/Alert";
36
- import xe from "@mui/material/AlertTitle";
37
- import ge from "@mui/material/Paper";
38
- import { Error as at, CheckCircle as Se } from "@mxenabled/mx-icons";
39
- import { T as we } from "../TabContentContainer-CnMXkVqr.mjs";
40
- import { DataGridPro as it } from "@mui/x-data-grid-pro";
41
- import { H as j } from "../HeaderCell-P8w6CmfO.mjs";
42
- import { e as lt, A as z } from "../Account-CMjOp7S2.mjs";
43
- import Te from "@mui/material/Button";
44
- import st from "@mui/material/IconButton";
45
- import ct from "@mui/material/ListItem";
46
- import dt from "@mui/material/Popover";
47
- import { u as pt } from "../useWidgetLoadTimer-BZjr-BiE.mjs";
48
- import { L as ht } from "../Loader-CxeBwuPG.mjs";
49
- import { W as mt } from "../WidgetContainer-BPJoDkhL.mjs";
50
- import { E as ut } from "../EmptyState-DHAkGsjk.mjs";
51
- import { C as bt } from "../ConnectDrawer-DNnuF80E.mjs";
52
- const _t = (r, o = 0, n = 0) => {
53
- if (n === 0) return 0;
54
- const t = o / (We * Ge);
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
- }, yt = (r, o, n, t, a) => {
59
- const i = [];
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((u) => u.balance >= 0.01 && !u.is_impossible); ) {
136
- let u = !1;
137
- for (const [x, b] of t.entries()) {
138
- if (b.balance <= 0.01 || b.is_impossible) continue;
139
- const M = (b.interest_rate ?? 0) / 100 / 12, k = b.balance * M;
140
- let v = b.monthly_payment ?? 0;
141
- x === 0 && n && (v += n), b.balance += k;
142
- const S = Math.min(b.balance, v + i);
143
- if (S <= k) {
144
- b.is_impossible = !0;
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
- b.balance -= S, b.balance = b.balance < 0.01 ? 0 : b.balance, a += k, b.balance <= 0 && (i += v), S > 0 && (u = !0);
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
- u && c.setMonth(c.getMonth() + 1);
69
+ m && c.setMonth(c.getMonth() + 1);
150
70
  }
151
- const p = t.some((u) => u.is_impossible && u.balance > 0), h = Oe({ start: d, end: c });
71
+ const b = t.some((m) => m.is_impossible && m.balance > 0), u = Re({ start: d, end: c });
152
72
  return {
153
- payoffSavings: p ? "N/A" : P(a, "0,0.00"),
154
- payoffDate: p ? "Never" : J(c, Q.MONTH_YEAR),
155
- payoffDuration: p ? "Stagnant" : He(h, { format: ["years", "months"] }) || "0 months"
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 L = () => {
159
- if (!g.useContext(ze))
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
- }, wt = ({ debts: r, onClickCta: o, sx: n }) => {
163
- const t = Y(), { isMobile: a } = ae(), { debts: i } = C(), { selectedDebtPriority: d } = L(), { monthlyCashFlowProfile: c } = V(), { payoffDate: p, payoffSavings: h, payoffDuration: u } = g.useMemo(() => {
164
- const x = c?.extra_payment ?? 0;
165
- return gt(r, d, x);
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
- Ce,
88
+ ge,
169
89
  {
170
90
  sx: {
171
91
  boxShadow: t.shadows[2],
172
92
  width: a ? "100%" : "186px",
173
93
  minWidth: "186px",
174
- ...n
94
+ ...o
175
95
  },
176
- children: /* @__PURE__ */ s(_, { sx: { gap: "12px", p: "16px" }, children: [
177
- /* @__PURE__ */ s(
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(l, { variant: "caption", children: i.snowball_card_date_description }),
188
- /* @__PURE__ */ e(l, { bold: !0, color: t.palette.primary.main, variant: "body2", children: p })
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__ */ s(_, { gap: a ? "4px" : "0", children: [
193
- /* @__PURE__ */ e(l, { bold: !0, variant: "body2", children: h }),
194
- /* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "caption", children: i.snowball_card_amount_description })
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__ */ s(_, { gap: a ? "4px" : "0", children: [
197
- /* @__PURE__ */ e(l, { bold: !0, variant: "body2", children: u }),
198
- /* @__PURE__ */ e(l, { variant: "caption", children: i.snowball_card_duration_description })
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
- l,
121
+ i,
202
122
  {
203
123
  bold: !0,
204
124
  color: t.palette.primary.main,
205
- onClick: o,
125
+ onClick: n,
206
126
  sx: { cursor: "pointer" },
207
127
  variant: "body2",
208
- children: i.snowball_card_cta
128
+ children: s.snowball_card_cta
209
129
  }
210
130
  )
211
131
  ] })
212
132
  }
213
133
  );
214
- }, Ct = D(wt), vt = ({ isOpen: r, onClose: o }) => {
215
- const n = Y(), { debts: t } = C(), [a, i] = g.useState(!1);
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: o,
141
+ onClose: n,
222
142
  title: t.snowball_drawer_title,
223
- children: /* @__PURE__ */ s(_, { bgcolor: n.palette.background.default, height: "100%", children: [
224
- /* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
225
- /* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
226
- /* @__PURE__ */ e(l, { mb: 12, variant: "h3", children: t.snowball_drawer_subtitle }),
227
- /* @__PURE__ */ e(l, { color: n.palette.secondary.main, variant: "body2", children: t.snowball_drawer_amount_description }),
228
- /* @__PURE__ */ e(ve, { variant: "h1", children: t.snowball_drawer_savings }),
229
- /* @__PURE__ */ e(l, { color: n.palette.secondary.main, variant: "body2", children: t.snowball_drawer_duration_description })
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__ */ s(Ce, { sx: { display: "grid", py: 16, px: 24 }, children: [
232
- /* @__PURE__ */ e(l, { mb: 4, variant: "h3", children: t.snowball_drawer_question }),
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
- l,
154
+ i,
235
155
  {
236
- color: n.palette.secondary.main,
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
- l,
164
+ i,
245
165
  {
246
166
  bold: !0,
247
- color: n.palette.primary.main,
248
- onClick: () => i(!a),
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__ */ s(_, { children: [
176
+ /* @__PURE__ */ l(h, { children: [
257
177
  /* @__PURE__ */ e(
258
- l,
178
+ i,
259
179
  {
260
- color: n.palette.secondary.main,
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__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
268
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 1) }),
269
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
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__ */ s(_, { bgcolor: n.palette.background.paper, mb: 24, children: [
272
- /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
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: n.palette.success.main,
203
+ backgroundColor: o.palette.success.main,
284
204
  marginRight: 12
285
205
  },
286
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
206
+ children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
287
207
  }
288
208
  ),
289
- /* @__PURE__ */ s(
290
- _,
209
+ /* @__PURE__ */ l(
210
+ h,
291
211
  {
292
212
  sx: {
293
- borderBottom: `1px solid ${n.palette.neutral.light}`,
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__ */ s(_, { flexGrow: 1, children: [
301
- /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "A") }),
302
- /* @__PURE__ */ s(l, { color: n.palette.secondary.main, variant: "caption", children: [
303
- E(
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: E(t.snowball_drawer_debt_label, "B") }),
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__ */ s(_, { children: [
312
- /* @__PURE__ */ e(l, { variant: "body1", children: "$100.00" }),
231
+ /* @__PURE__ */ l(h, { children: [
232
+ /* @__PURE__ */ e(i, { variant: "body1", children: "$100.00" }),
313
233
  /* @__PURE__ */ e(
314
- l,
234
+ i,
315
235
  {
316
236
  bold: !0,
317
- color: n.palette.success.main,
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__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
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 ${n.palette.neutral.main}`
257
+ border: `3px solid ${o.palette.neutral.main}`
338
258
  }
339
259
  }
340
260
  ),
341
- /* @__PURE__ */ s(
342
- _,
261
+ /* @__PURE__ */ l(
262
+ h,
343
263
  {
344
264
  sx: {
345
- borderBottom: `1px solid ${n.palette.neutral.light}`,
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(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "B") }),
353
- /* @__PURE__ */ e(l, { variant: "body1", children: "$400.00" })
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__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, py: 14, children: [
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 ${n.palette.neutral.main}`
287
+ border: `3px solid ${o.palette.neutral.main}`
368
288
  }
369
289
  }
370
290
  ),
371
- /* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
372
- /* @__PURE__ */ e(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }),
373
- /* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
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__ */ s(
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 ${n.palette.neutral.light}`,
385
- borderBottom: `1px solid ${n.palette.neutral.light}`
304
+ borderTop: `1px solid ${o.palette.neutral.light}`,
305
+ borderBottom: `1px solid ${o.palette.neutral.light}`
386
306
  },
387
307
  children: [
388
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
389
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
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__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
395
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 2) }),
396
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
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__ */ s(_, { bgcolor: n.palette.background.paper, mb: 24, children: [
399
- /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
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: n.palette.success.main,
330
+ backgroundColor: o.palette.success.main,
411
331
  marginRight: 12
412
332
  },
413
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
333
+ children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
414
334
  }
415
335
  ),
416
- /* @__PURE__ */ s(
417
- _,
336
+ /* @__PURE__ */ l(
337
+ h,
418
338
  {
419
339
  sx: {
420
- borderBottom: `1px solid ${n.palette.neutral.light}`,
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__ */ s(_, { flexGrow: 1, children: [
428
- /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "B") }),
429
- /* @__PURE__ */ s(l, { color: n.palette.secondary.main, variant: "caption", children: [
430
- E(
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: E(t.snowball_drawer_debt_label, "C") }),
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__ */ s(_, { children: [
439
- /* @__PURE__ */ e(l, { variant: "body1", children: "$500.00" }),
358
+ /* @__PURE__ */ l(h, { children: [
359
+ /* @__PURE__ */ e(i, { variant: "body1", children: "$500.00" }),
440
360
  /* @__PURE__ */ e(
441
- l,
361
+ i,
442
362
  {
443
363
  bold: !0,
444
- color: n.palette.success.main,
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__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
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 ${n.palette.neutral.main}`
384
+ border: `3px solid ${o.palette.neutral.main}`
465
385
  }
466
386
  }
467
387
  ),
468
- /* @__PURE__ */ s(
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(l, { flexGrow: 1, variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }),
479
- /* @__PURE__ */ e(l, { variant: "body1", children: "$1,000.00" })
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__ */ s(
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 ${n.palette.neutral.light}`,
493
- borderBottom: `1px solid ${n.palette.neutral.light}`
412
+ borderTop: `1px solid ${o.palette.neutral.light}`,
413
+ borderBottom: `1px solid ${o.palette.neutral.light}`
494
414
  },
495
415
  children: [
496
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
497
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
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__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
503
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: E(t.snowball_drawer_month_header, 3) }),
504
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: t.snowball_drawer_payment_header })
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__ */ s(_, { bgcolor: n.palette.background.paper, mb: 24, children: [
507
- /* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
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: n.palette.success.main,
438
+ backgroundColor: o.palette.success.main,
519
439
  marginRight: 12
520
440
  },
521
- children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
441
+ children: /* @__PURE__ */ e(i, { color: "white", fontWeight: 700, variant: "body2", children: "✓" })
522
442
  }
523
443
  ),
524
- /* @__PURE__ */ s(
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(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "body1", children: E(t.snowball_drawer_debt_label, "C") }) }),
536
- /* @__PURE__ */ s(_, { children: [
537
- /* @__PURE__ */ e(l, { variant: "body1", children: "$1,500.00" }),
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
- l,
459
+ i,
540
460
  {
541
461
  bold: !0,
542
- color: n.palette.success.main,
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__ */ s(
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 ${n.palette.neutral.light}`,
562
- borderBottom: `1px solid ${n.palette.neutral.light}`
481
+ borderTop: `1px solid ${o.palette.neutral.light}`,
482
+ borderBottom: `1px solid ${o.palette.neutral.light}`
563
483
  },
564
484
  children: [
565
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: t.snowball_drawer_total_label }),
566
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: "$1,500.00" })
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
- }, Dt = D(vt), St = "#FF7B08";
576
- function Tt(r, o) {
577
- const [n, t, a] = r.replace(/^#/, "").match(/.{1,2}/g).map((d) => parseInt(d, 16)), i = [
578
- Math.max(0, Math.min(255, Math.round(n * o))),
579
- Math.max(0, Math.min(255, Math.round(t * o))),
580
- Math.max(0, Math.min(255, Math.round(a * o)))
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(${i[0]}, ${i[1]}, ${i[2]})`;
502
+ return `rgb(${s[0]}, ${s[1]}, ${s[2]})`;
583
503
  }
584
- const Ee = ({
504
+ const De = ({
585
505
  sx: r,
586
- height: o = 500,
587
- width: n,
506
+ height: n = 500,
507
+ width: o,
588
508
  debts: t,
589
509
  hoveredDebtGuid: a,
590
- onClickArea: i,
510
+ onClickArea: s,
591
511
  onHoverArea: d
592
512
  }) => {
593
- const c = Je(), { onEvent: p } = B(), h = t.filter((m) => !m.is_impossible), u = [
513
+ const c = qe(), { onEvent: b } = k(), u = t.filter((p) => !p.is_impossible), m = [
594
514
  ...new Set(
595
- h.flatMap((m) => m.dataset.map((w) => new Date(w.x).getTime()))
515
+ u.flatMap((p) => p.dataset.map((g) => new Date(g.x).getTime()))
596
516
  )
597
- ].sort((m, w) => m - w).map((m) => new Date(m)), x = h.map((m) => {
598
- const w = new Map(m.dataset.map((F) => [new Date(F.x).getTime(), F.y]));
599
- let T = w.get(u[0].getTime()) ?? 0;
600
- const R = u.map((F) => {
601
- const K = w.get(F.getTime()) ?? T;
602
- return T = K, { x: F, y: K };
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 { ...m, dataset: R };
605
- }), b = x.reduce(
606
- (m, w) => m + (w.dataset[0]?.y ?? 0),
524
+ return { ...p, dataset: M };
525
+ }), x = v.reduce(
526
+ (p, g) => p + (g.dataset[0]?.y ?? 0),
607
527
  0
608
- ), I = u.map((m, w) => {
609
- const T = w / (u.length - 1), R = b * (1 - T);
610
- return { x: m, y: R };
611
- }), M = Math.ceil(b / 100) * 100, k = u, v = x.map((m, w) => {
612
- const T = 1 - w / x.length * 0.5, R = Tt(St, T);
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-${w}`,
615
- guid: m.guid,
616
- label: m.name,
617
- data: m.dataset.map((F) => F.y),
618
- color: R,
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
- v.push({
546
+ A.push({
627
547
  id: "payoff-line",
628
548
  label: "Payoff Line",
629
- data: I.map((m) => m.y),
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 S = (m) => v.findIndex((w) => w?.guid === m);
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
- Qe,
574
+ Xe,
655
575
  {
656
576
  axisHighlight: { x: "none" },
657
577
  disableLineItemHighlight: !0,
658
- height: o,
578
+ height: n,
659
579
  hideLegend: !0,
660
580
  margin: { bottom: 24, left: 32, right: 72, top: 48 },
661
- onAreaClick: (m, w) => {
662
- i?.();
663
- const T = v.find((R) => R.id === w.seriesId);
664
- p(A.DEBTS_CLICK_CHART_AREA, { account_guid: T?.guid });
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: (m) => {
667
- const w = v.find((T) => T.id === m?.seriesId)?.guid;
668
- d?.(w ?? "");
586
+ onHighlightChange: (p) => {
587
+ const g = A.find((D) => D.id === p?.seriesId)?.guid;
588
+ d?.(g ?? "");
669
589
  },
670
- series: v,
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-${S(a ?? "0")}`]: {
610
+ [`& .MuiLineElement-series-debt-${E(a ?? "0")}`]: {
691
611
  opacity: 1
692
612
  },
693
- [`& .MuiAreaElement-series-debt-${S(a ?? "0")}`]: {
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: n,
621
+ width: o,
702
622
  xAxis: [
703
623
  {
704
- data: k,
624
+ data: N,
705
625
  disableTicks: !0,
706
- min: u[0],
626
+ min: m[0],
707
627
  scaleType: "time",
708
628
  tickLabelMinGap: 24,
709
- valueFormatter: (m) => J(m, Q.MONTH_SHORT_YEAR)
629
+ valueFormatter: (p) => J(p, Q.MONTH_SHORT_YEAR)
710
630
  }
711
631
  ],
712
632
  yAxis: [
713
633
  {
714
634
  min: 0,
715
- max: M,
635
+ max: L,
716
636
  disableTicks: !0,
717
- valueFormatter: (m) => P(m, "0a")
637
+ valueFormatter: (p) => I(p, "0a")
718
638
  }
719
639
  ]
720
640
  }
721
641
  )
722
642
  }
723
643
  );
724
- }, At = () => {
725
- const r = Y(), { debts: o } = C(), { selectedDebtChartData: n } = L();
726
- return /* @__PURE__ */ s($, { children: [
727
- /* @__PURE__ */ s(
728
- qe,
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(Ze, { sx: { pb: 0 }, title: /* @__PURE__ */ e(Le, { sx: { pb: 4 }, children: o.details_chart_title }) }),
737
- /* @__PURE__ */ e(Xe, { sx: { p: 0 }, children: /* @__PURE__ */ e(Ee, { debts: [n], height: 250 }) })
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
- l,
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: o.details_chart_description
667
+ children: n.details_chart_description
748
668
  }
749
669
  )
750
670
  ] });
751
- }, Et = D(At), It = () => {
752
- const r = Y(), { onEvent: o } = B(), { debts: n } = C(), { selectedDebtChartData: t, showCompleted: a, showError: i } = L();
753
- return g.useEffect(() => o(A.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(De, { children: i || a ? /* @__PURE__ */ e(
754
- l,
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: i ? n.schedule_error_message : n.schedule_complete_message
680
+ children: s ? o.schedule_error_message : o.schedule_complete_message
761
681
  }
762
- ) : /* @__PURE__ */ s($, { children: [
763
- /* @__PURE__ */ s(f, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
764
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: n.schedule_month_heading }),
765
- /* @__PURE__ */ e(l, { bold: !0, variant: "caption", children: n.schedule_amount_heading })
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: p }) => /* @__PURE__ */ e(f, { bgcolor: r.palette.background.paper, children: /* @__PURE__ */ e(f, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
768
- f,
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__ */ s(f, { flexGrow: 1, children: [
779
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: J(d, Q.MONTH_YEAR) }),
780
- /* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "caption", children: n.schedule_month_label })
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__ */ s(f, { children: [
783
- /* @__PURE__ */ e(l, { bold: !0, variant: "body1", children: P(c, "0,0.00") }),
702
+ /* @__PURE__ */ l(y, { children: [
703
+ /* @__PURE__ */ e(i, { bold: !0, variant: "body1", children: I(c, "0,0.00") }),
784
704
  /* @__PURE__ */ e(
785
- l,
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: `+${P(p, "0,0")}`
711
+ children: `+${I(b, "0,0")}`
792
712
  }
793
713
  )
794
714
  ] })
795
715
  ]
796
716
  }
797
717
  ) }) }, String(d))),
798
- /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
799
- f,
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(l, { flexGrow: 1, variant: "body1", children: n.schedule_payoff_label }),
810
- /* @__PURE__ */ e(l, { variant: "body1", children: "-" })
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
- }, Mt = D(It), kt = D(({ debt: r }) => {
816
- const { debts: o } = C(), { updateAccount: n } = te(), { onEvent: t } = B(), [a, i] = g.useState(r.interest_rate ?? 0), d = a < 0, c = async () => {
817
- await n({ ...r.account, interest_rate: a }), r.interest_rate = a, t(A.DEBTS_SAVE_RATE_ACTION, { account_guid: r.guid });
818
- }, p = () => {
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
- i(r.interest_rate ?? 0);
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: `${o.details_interest_rate} (%)`,
828
- onCancel: p,
747
+ label: `${n.details_interest_rate} (%)`,
748
+ onCancel: b,
829
749
  onSave: c,
830
- primaryText: o.details_interest_rate,
831
- secondaryText: je(Number(r.interest_rate) / 100),
832
- zeroStateText: r.interest_rate ? void 0 : o.add_interest_rate,
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
- ot,
754
+ tt,
835
755
  {
836
756
  error: d,
837
757
  fullWidth: !0,
838
- onChange: (h) => i(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
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
- }), Nt = D(({ debt: r }) => {
846
- const { debts: o } = C(), { updateAccount: n } = te(), { onEvent: t } = B(), [a, i] = g.useState(r.monthly_payment ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
847
- await n({ ...r.account, minimum_payment: a }), r.monthly_payment = a, t(A.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: r.guid });
848
- }, p = () => {
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
- i(r.monthly_payment ?? 0);
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: o.details_monthly_payment,
858
- onCancel: p,
777
+ label: n.details_monthly_payment,
778
+ onCancel: b,
859
779
  onSave: c,
860
- primaryText: o.details_monthly_payment,
861
- secondaryText: P(r.monthly_payment, "0,0"),
862
- zeroStateText: r.monthly_payment ? void 0 : o.add_monthly_payment,
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: (h) => i(isNaN(Number(h)) ? a : Number(h)),
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
- }), Pt = D(({ debt: r }) => {
878
- const { debts: o } = C(), { updateAccount: n } = te(), { onEvent: t } = B(), [a, i] = g.useState(r.original_balance ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
879
- await n({ ...r.account, original_balance: a }), r.original_balance = a, t(A.DEBTS_SAVE_BALANCE_ACTION, { account_guid: r.guid });
880
- }, p = () => {
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
- i(r.original_balance ?? 0);
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: o.details_original_balance,
890
- onCancel: p,
809
+ label: n.details_original_balance,
810
+ onCancel: b,
891
811
  onSave: c,
892
- primaryText: o.details_original_balance,
893
- secondaryText: P(r.original_balance, "0,0"),
894
- zeroStateText: r.original_balance ? void 0 : o.add_original_balance,
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: (h) => i(isNaN(Number(h)) ? a : Number(h)),
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
- }), Rt = () => {
910
- const { onEvent: r } = B(), { selectedDebtChartData: o } = L();
911
- return g.useEffect(() => r(A.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(f, { bgcolor: "background.paper", children: [
912
- o?.goal && /* @__PURE__ */ s($, { children: [
913
- /* @__PURE__ */ e(tt, { goal: o.goal }),
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(rt, { goal: o.goal }),
835
+ /* @__PURE__ */ e(Qe, { goal: n.goal }),
916
836
  /* @__PURE__ */ e(G, {}),
917
- /* @__PURE__ */ e(nt, { goal: o.goal }),
837
+ /* @__PURE__ */ e(et, { goal: n.goal }),
918
838
  /* @__PURE__ */ e(G, {})
919
839
  ] }),
920
- !o?.goal && o?.account && /* @__PURE__ */ s($, { children: [
921
- /* @__PURE__ */ e(Nt, { debt: o }),
840
+ !n?.goal && n?.account && /* @__PURE__ */ l(R, { children: [
841
+ /* @__PURE__ */ e(St, { debt: n }),
922
842
  /* @__PURE__ */ e(G, {}),
923
- /* @__PURE__ */ e(kt, { debt: o }),
843
+ /* @__PURE__ */ e(Dt, { debt: n }),
924
844
  /* @__PURE__ */ e(G, {}),
925
- /* @__PURE__ */ e(Pt, { debt: o }),
845
+ /* @__PURE__ */ e(At, { debt: n }),
926
846
  /* @__PURE__ */ e(G, {})
927
847
  ] })
928
848
  ] });
929
- }, Bt = D(Rt), Ft = ({ setTabValue: r, sx: o }) => {
930
- const { debts: n } = C(), { showError: t, showCompleted: a } = L();
931
- return g.useEffect(() => {
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($, {}) : /* @__PURE__ */ s(f, { gap: 16, children: [
934
- /* @__PURE__ */ e(ge, { sx: { my: 16, mx: 24, ...o }, children: /* @__PURE__ */ s(
935
- fe,
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(at, { filled: !0 }) : /* @__PURE__ */ e(Se, { color: "success", filled: !0 }),
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(xe, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: t ? n.status_error_title : n.status_complete_title }),
951
- /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: t ? n.status_error_description : n.status_complete_description })
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(ge, { sx: { mb: 16, mt: 100, mx: 24, ...o }, children: /* @__PURE__ */ s(
956
- fe,
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(xe, { sx: { fontWeight: 600, marginTop: 2 }, variant: "body1", children: n.status_info_title }),
969
- /* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "subtitle2", children: n.status_info_description })
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
- }, Lt = D(Ft), $t = () => {
975
- const { debts: r } = C(), { showError: o, showCompleted: n } = L(), [t, a] = g.useState(0);
976
- return /* @__PURE__ */ s($, { children: [
977
- (o || n) && /* @__PURE__ */ e(Lt, { setTabValue: a, sx: { mt: -24 } }),
978
- /* @__PURE__ */ s(
979
- et,
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: (i, d) => a(d),
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
- ye,
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
- ye,
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(we, { index: 0, name: "debt-schedule", value: t, children: /* @__PURE__ */ e(Mt, {}) }),
1008
- /* @__PURE__ */ e(we, { index: 1, name: "debt-details", value: t, children: /* @__PURE__ */ e(Bt, {}) })
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
- }, Ot = D($t), Ht = ({ isOpen: r, onClose: o }) => {
1011
- const { debts: n } = C(), { showError: t, showCompleted: a } = L(), i = t || a ? /* @__PURE__ */ e($, {}) : /* @__PURE__ */ e(Et, {});
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: n.details_close_aria,
935
+ ariaLabelClose: o.details_close_aria,
1016
936
  isOpen: r,
1017
- onClose: o,
1018
- title: n.details_title,
1019
- children: /* @__PURE__ */ s(f, { bgcolor: "background.default", children: [
1020
- /* @__PURE__ */ e(Ke, { customDetailsChart: i }),
1021
- /* @__PURE__ */ e(Ot, {})
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
- }, Wt = D(() => {
1026
- const { debts: r } = C(), { monthlyCashFlowProfile: o, updateMonthlyCashFlowProfile: n } = V(), { onEvent: t } = B(), [a, i] = g.useState(o?.extra_payment ?? 0), d = a < 0 || a > 9999999999e-2, c = async () => {
1027
- o && (await n({ ...o, extra_payment: a }), o.extra_payment = a, t(A.DEBTS_SAVE_PAYDOWN_ACTION, {
1028
- user_guid: o?.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
- }, p = () => {
950
+ }, b = () => {
1031
951
  setTimeout(() => {
1032
- i(o?.extra_payment ?? 0);
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: p,
960
+ onCancel: b,
1041
961
  onSave: c,
1042
962
  primaryText: r.paydown_drawer_extra_payment,
1043
- secondaryText: P(o?.extra_payment, "0,0"),
1044
- zeroStateText: o?.extra_payment ? void 0 : r.add_extra_payment,
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: (h) => i(isNaN(Number(h)) ? a : Number(h)),
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
- }), Gt = () => {
1060
- const { debts: r } = C(), { totalMonthlyPayments: o } = ee(), { monthlyCashFlowProfile: n } = V(), t = o + Number(n?.extra_payment);
1061
- return /* @__PURE__ */ s(f, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
1062
- /* @__PURE__ */ s(f, { p: 24, children: [
1063
- /* @__PURE__ */ s(f, { alignItems: "center", gap: 4, mb: 24, children: [
1064
- /* @__PURE__ */ e(l, { variant: "body1", children: r.paydown_drawer_mimimum_label }),
1065
- /* @__PURE__ */ e(ve, { bold: !0, variant: "h1", children: P(o, "0,0") }),
1066
- /* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "body2", width: 208, children: r.paydown_drawer_minimum_info })
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__ */ s(f, { children: [
1069
- /* @__PURE__ */ e(l, { variant: "h3", children: r.paydown_drawer_subtitle }),
1070
- /* @__PURE__ */ e(l, { truncate: !1, variant: "subtitle2", children: r.paydown_drawer_description })
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(f, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(Wt, {}) }),
1074
- /* @__PURE__ */ e(f, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(f, { gap: 4, children: [
1075
- /* @__PURE__ */ e(l, { variant: "body2", children: r.paydown_drawer_total_payment }),
1076
- /* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "body1", children: P(t, "0,0") })
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
- }, jt = D(Gt), zt = ({ isOpen: r, onClose: o }) => {
1080
- const { debts: n } = C();
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: n.paydown_drawer_close_aria,
1004
+ ariaLabelClose: o.paydown_drawer_close_aria,
1085
1005
  isOpen: r,
1086
- onClose: o,
1087
- title: n.paydown_drawer_title,
1088
- children: /* @__PURE__ */ e(jt, {})
1006
+ onClose: n,
1007
+ title: o.paydown_drawer_title,
1008
+ children: /* @__PURE__ */ e(Lt, {})
1089
1009
  }
1090
1010
  );
1091
1011
  };
1092
- function Yt(r, o) {
1093
- const n = (t) => {
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 n(r) - n(o);
1018
+ return o(r) - o(n);
1099
1019
  }
1100
- function Vt(r) {
1020
+ function Ot(r) {
1101
1021
  return r.is_paid_off ? "✓" : r.priority === void 0 || r.is_impossible ? "!" : r.priority;
1102
1022
  }
1103
- const Kt = (r) => {
1104
- const o = {
1023
+ const Wt = (r) => {
1024
+ const n = {
1105
1025
  text: "#121417",
1106
1026
  background: "#FFB252"
1107
1027
  };
1108
- return r === "!" && (o.text = "#FFFFFF", o.background = "#DF320C"), r === "✓" && (o.text = "#FFFFFF", o.background = "#09A57F"), o;
1109
- }, Ut = (r) => {
1110
- const o = String(r.formattedValue), n = Kt(o);
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: n.background,
1042
+ backgroundColor: o.background,
1123
1043
  marginLeft: "10px"
1124
1044
  },
1125
- children: /* @__PURE__ */ e(l, { color: n.text, fontWeight: 700, variant: "body2", children: o })
1045
+ children: /* @__PURE__ */ e(i, { color: o.text, fontWeight: 700, variant: "body2", children: n })
1126
1046
  }
1127
1047
  );
1128
- }, qt = (r) => {
1129
- const o = r.row.account, n = lt[o.account_type];
1130
- return /* @__PURE__ */ s(f, { alignItems: "center", flexDirection: "row", children: [
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
- $e,
1052
+ Pe,
1133
1053
  {
1134
- alt: `${o.institutionName}`,
1135
- institutionGuid: o.institution_guid || ""
1054
+ alt: `${n.institutionName}`,
1055
+ institutionGuid: n.institution_guid || ""
1136
1056
  }
1137
1057
  ),
1138
- /* @__PURE__ */ s(f, { ml: 12, children: [
1139
- /* @__PURE__ */ e(l, { variant: "body2", children: o.name }),
1140
- /* @__PURE__ */ e(l, { variant: "caption", children: n })
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
- }, Xt = ({
1063
+ }, zt = ({
1144
1064
  sx: r = {},
1145
- debts: o,
1146
- hoveredDebtGuid: n,
1065
+ debts: n,
1066
+ hoveredDebtGuid: o,
1147
1067
  onHoverRow: t,
1148
1068
  onClickRow: a
1149
1069
  }) => {
1150
- const i = Y(), { onEvent: d } = B(), { isMobile: c } = ae(), { debts: p, common: h } = C(), [u, x] = g.useState([
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
- ]), b = [
1072
+ ]), x = [
1153
1073
  {
1154
1074
  field: "priority",
1155
- headerName: p.table_column_priority,
1156
- renderHeader: j,
1157
- renderCell: Ut,
1158
- sortComparator: Yt,
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: p.table_column_account,
1170
- renderHeader: j,
1171
- renderCell: qt,
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: p.table_column_balance,
1182
- renderHeader: j,
1183
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: P(y.value, "0,0") }),
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: p.table_column_interest_rate,
1195
- renderHeader: j,
1196
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: isNaN(y.value) ? "---" : `${Number(y.value).toFixed(2)}%` }),
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: p.table_column_payoff_date,
1208
- renderHeader: j,
1209
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: y.value ? J(y.value, Q.MONTH_SHORT_YEAR) : "---" }),
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: p.table_column_amount_due,
1221
- renderHeader: j,
1222
- renderCell: (y) => /* @__PURE__ */ e(l, { color: i.palette.text.primary, variant: "body2", children: typeof y.value == "number" ? P(y.value, "0,0") : "---" }),
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
- ], I = [
1232
- ...b.slice(0, 3),
1151
+ ], $ = [
1152
+ ...x.slice(0, 3),
1233
1153
  {
1234
1154
  field: "chevron",
1235
1155
  headerClassName: "chevron-header",
1236
1156
  headerName: "",
1237
- renderCell: () => /* @__PURE__ */ e(_, { "aria-label": h.see_details, role: "button", children: /* @__PURE__ */ e(oe, { name: "chevron_right" }) }),
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
- ], M = g.useMemo(() => o.map((y, m) => ({
1246
- ...y,
1247
- id: m,
1248
- priority: Vt(y)
1249
- })), [o]), k = (y) => {
1250
- const T = y.target.closest("[data-id]")?.getAttribute("data-id"), R = o[Number(T)];
1251
- t?.(R?.guid ?? "");
1252
- }, v = (y) => {
1253
- c || k(y);
1254
- }, S = (y) => {
1255
- c && k(y);
1256
- }, O = (y) => M.find((m) => m.guid === y)?.id;
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
- it,
1190
+ ot,
1271
1191
  {
1272
- columns: c ? I : b,
1192
+ columns: c ? $ : x,
1273
1193
  disableColumnFilter: !0,
1274
1194
  disableColumnMenu: !0,
1275
1195
  hideFooter: !0,
1276
- initialState: { sorting: { sortModel: u } },
1277
- onRowClick: (y) => {
1278
- a(), d(A.DEBTS_CLICK_TABLE_ROW, { account_guid: y.row.guid });
1196
+ initialState: { sorting: { sortModel: m } },
1197
+ onRowClick: (_) => {
1198
+ a(), d(S.DEBTS_CLICK_TABLE_ROW, { account_guid: _.row.guid });
1279
1199
  },
1280
- onSortModelChange: (y) => {
1281
- x(y), d(A.DEBTS_CLICK_TABLE_SORT);
1200
+ onSortModelChange: (_) => {
1201
+ v(_), d(S.DEBTS_CLICK_TABLE_SORT);
1282
1202
  },
1283
- rows: M,
1203
+ rows: L,
1284
1204
  slotProps: {
1285
1205
  baseIconButton: { color: "secondary", sx: { ml: 8 } },
1286
1206
  row: {
1287
- onMouseEnter: v,
1207
+ onMouseEnter: A,
1288
1208
  onMouseLeave: () => !c && t?.(""),
1289
- onTouchStart: S,
1290
- onClick: c ? S : void 0
1209
+ onTouchStart: E,
1210
+ onClick: c ? E : void 0
1291
1211
  }
1292
1212
  },
1293
- sortModel: u,
1213
+ sortModel: m,
1294
1214
  sortingOrder: ["asc", "desc"],
1295
1215
  sx: {
1296
1216
  "& .chevron-header": { display: "none" },
1297
- [`& .MuiDataGrid-row[data-id="${O(n)}"]`]: {
1298
- backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
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
- }, Zt = ({
1226
+ }, jt = ({
1307
1227
  buttonText: r,
1308
- disabled: o,
1309
- isDesktop: n = !1,
1228
+ disabled: n,
1229
+ isDesktop: o = !1,
1310
1230
  isOpen: t,
1311
1231
  onClick: a
1312
1232
  }) => {
1313
- const i = t ? "unfold_less" : "unfold_more";
1314
- return n ? /* @__PURE__ */ e(
1315
- Te,
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: o,
1241
+ disabled: n,
1322
1242
  onClick: a,
1323
- startIcon: /* @__PURE__ */ e(oe, { name: i }),
1243
+ startIcon: /* @__PURE__ */ e(ne, { name: s }),
1324
1244
  sx: { justifyContent: "start" },
1325
1245
  children: r
1326
1246
  }
1327
1247
  ) : /* @__PURE__ */ e(
1328
- st,
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: o,
1254
+ disabled: n,
1335
1255
  onClick: a,
1336
- children: /* @__PURE__ */ e(oe, { name: i })
1256
+ children: /* @__PURE__ */ e(ne, { name: s })
1337
1257
  }
1338
1258
  );
1339
- }, Jt = D(({ buttonEl: r, onClose: o }) => {
1340
- const { onEvent: n } = B(), { debts: t } = C(), { selectedDebtPriority: a, setSelectedDebtPriority: i } = L(), d = !!r, c = [
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: N.FASTEST_PAYOFF_FIRST,
1262
+ priority: F.FASTEST_PAYOFF_FIRST,
1343
1263
  text: t.priority_sort_fastest_payoff
1344
1264
  },
1345
1265
  {
1346
- priority: N.HIGHEST_INTEREST,
1266
+ priority: F.HIGHEST_INTEREST,
1347
1267
  text: t.priority_sort_highest_interest
1348
1268
  },
1349
1269
  {
1350
- priority: N.LOWEST_BALANCE,
1270
+ priority: F.LOWEST_BALANCE,
1351
1271
  text: t.priority_sort_lowest_balance
1352
1272
  },
1353
1273
  {
1354
- priority: N.HIGHEST_BALANCE,
1274
+ priority: F.HIGHEST_BALANCE,
1355
1275
  text: t.priority_sort_highest_balance
1356
1276
  }
1357
- ], p = (h) => {
1358
- i(h), n(A.DEBTS_CLICK_PRIORITY, { debts_priority: h });
1277
+ ], b = (u) => {
1278
+ s(u), o(S.DEBTS_CLICK_PRIORITY, { debts_priority: u });
1359
1279
  };
1360
1280
  return /* @__PURE__ */ e(
1361
- dt,
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: o,
1289
+ onClose: n,
1370
1290
  open: d,
1371
1291
  transformOrigin: {
1372
1292
  vertical: "top",
1373
1293
  horizontal: "left"
1374
1294
  },
1375
- children: /* @__PURE__ */ e(De, { children: c.map(({ priority: h, text: u }) => /* @__PURE__ */ s(
1376
- ct,
1295
+ children: /* @__PURE__ */ e(we, { children: c.map(({ priority: u, text: m }) => /* @__PURE__ */ l(
1296
+ it,
1377
1297
  {
1378
- onClick: () => p(h),
1298
+ onClick: () => b(u),
1379
1299
  sx: {
1380
- bgcolor: a === h ? "primary.main" : void 0,
1381
- color: a === h ? "#fff" : void 0,
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(l, { color: "inherit", variant: "body2", children: u }),
1395
- a === h && /* @__PURE__ */ e(Se, { color: "inherit", filled: !0, fontSize: "small" })
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
- h
1318
+ u
1399
1319
  )) })
1400
1320
  }
1401
1321
  );
1402
- }), Qt = D(({ disabled: r, isDesktop: o }) => {
1403
- const { onEvent: n } = B(), { debts: t } = C(), { selectedDebtPriority: a } = L(), [i, d] = g.useState(null), c = (x) => {
1404
- d(x.currentTarget), n(A.DEBTS_CLICK_PRIORITIZE);
1405
- }, p = () => {
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
- }, h = !!i, u = g.useMemo(() => ({
1408
- [N.FASTEST_PAYOFF_FIRST]: t.priority_sort_fastest_payoff,
1409
- [N.HIGHEST_INTEREST]: t.priority_sort_highest_interest,
1410
- [N.HIGHEST_BALANCE]: t.priority_sort_highest_balance,
1411
- [N.LOWEST_BALANCE]: t.priority_sort_lowest_balance
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__ */ s(_, { children: [
1333
+ return /* @__PURE__ */ l(h, { children: [
1414
1334
  /* @__PURE__ */ e(
1415
- Zt,
1335
+ jt,
1416
1336
  {
1417
- buttonText: u,
1337
+ buttonText: m,
1418
1338
  disabled: r,
1419
- isDesktop: o,
1420
- isOpen: h,
1339
+ isDesktop: n,
1340
+ isOpen: u,
1421
1341
  onClick: c
1422
1342
  }
1423
1343
  ),
1424
- /* @__PURE__ */ e(Jt, { buttonEl: i, onClose: p })
1344
+ /* @__PURE__ */ e(Vt, { buttonEl: s, onClose: b })
1425
1345
  ] });
1426
- }), er = (r, o, n = 0) => {
1427
- const t = r.map((p) => ({ ...p }));
1428
- Ae(t, o);
1429
- const a = /* @__PURE__ */ new Date(), i = [];
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: o,
1356
+ onClick: n,
1479
1357
  sx: { justifyContent: "start" },
1480
- children: E(d, P(i, "0,0"))
1358
+ children: T(d, I(s, "0,0"))
1481
1359
  }
1482
1360
  ) });
1483
- }), nr = ({ onBackClick: r, onMenuClick: o, sx: n }) => {
1484
- const { isDesktop: t, isMobile: a } = ae(), { connect: i, debts: d } = C(), { onEvent: c } = B(), {
1485
- config: { show_connections_widget_in_master: p }
1486
- } = Ye(), { isInitialized: h } = Ve(), { setSelectedAccount: u } = Ue(), { selectedDebtPriority: x, setSelectedDebtChartData: b } = L(), {
1487
- isAccountDataLoaded: I,
1488
- loadAccountData: M,
1489
- detailedAccounts: k,
1490
- visibleDebtAccounts: v
1491
- } = te(), { isAllGoalDataLoaded: S, loadGoalData: O, monthlyCashFlowProfile: y } = V(), { debts: m } = ee(), [w, T] = g.useState(!1), [R, F] = g.useState(!1), [K, ce] = g.useState(!1), [U, Ie] = g.useState(""), [Me, de] = g.useState(!1);
1492
- pt({
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: S
1372
+ isLoaded: E
1495
1373
  });
1496
- const q = g.useMemo(() => {
1497
- const H = y?.extra_payment ?? 0;
1498
- return er(m, x, H);
1499
- }, [m, x, y]);
1500
- g.useEffect(() => {
1501
- I || M().finally(), c(A.DEBTS_VIEW);
1502
- }, []), g.useEffect(() => {
1503
- h && O().finally();
1504
- }, [h]);
1505
- const pe = (H) => Ie(H), he = () => {
1506
- const H = v.find((ne) => ne.guid === U), me = q.find((ne) => ne.guid === U);
1507
- H && u(H), me && b(me), T(!0);
1508
- }, ke = () => c(A.DEBTS_CLICK_FILTER), Ne = () => {
1509
- ce(!0), c(A.DEBTS_CLICK_SNOWBALL_CTA);
1510
- }, Pe = () => {
1511
- F(!0), c(A.DEBTS_CLICK_PAYDOWN);
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 (!h || !S)
1514
- return /* @__PURE__ */ e(ht, {});
1515
- const Re = k.length === 0, Be = v.length === 0, Fe = m.length === 0, X = Re || Be || Fe, Z = tr(
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
- p,
1395
+ b,
1518
1396
  () => de(!0)
1519
1397
  );
1520
- return /* @__PURE__ */ s(
1521
- mt,
1398
+ return /* @__PURE__ */ l(
1399
+ dt,
1522
1400
  {
1523
- actions: [/* @__PURE__ */ e(Qt, { disabled: X }, "prioritize-debts")],
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: ke,
1410
+ onAccountsFilterClick: Te,
1533
1411
  onBackClick: r,
1534
- onMenuClick: o,
1535
- slotComponent: /* @__PURE__ */ e(rr, { disabled: X, onClick: Pe }, "extra-paydown"),
1536
- sx: n,
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__ */ s(f, { sx: { pt: 48, px: t ? "48px" : "24px" }, children: [
1417
+ /* @__PURE__ */ l(y, { sx: { pt: 48, px: t ? "48px" : "24px" }, children: [
1540
1418
  X && /* @__PURE__ */ e(
1541
- ut,
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__ */ s($, { children: [
1552
- /* @__PURE__ */ s(
1553
- f,
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
- Ee,
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
- Ct,
1451
+ bt,
1574
1452
  {
1575
1453
  debts: q,
1576
- onClickCta: Ne,
1454
+ onClickCta: Ee,
1577
1455
  sx: { mb: a ? "0px" : "64px" }
1578
1456
  }
1579
1457
  )
1580
1458
  ]
1581
1459
  }
1582
1460
  ),
1583
- /* @__PURE__ */ e(f, { sx: { mx: a ? "-24px" : 0 }, children: /* @__PURE__ */ e(
1584
- Xt,
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
- Dt,
1473
+ yt,
1596
1474
  {
1597
1475
  isOpen: K,
1598
1476
  onClose: () => ce(!1)
1599
1477
  }
1600
1478
  ),
1601
- /* @__PURE__ */ e(Ht, { isOpen: w, onClose: () => T(!1) }),
1602
- /* @__PURE__ */ e(zt, { isOpen: R, onClose: () => F(!1) }),
1479
+ /* @__PURE__ */ e(Bt, { isOpen: g, onClose: () => D(!1) }),
1480
+ /* @__PURE__ */ e(Ft, { isOpen: M, onClose: () => B(!1) }),
1603
1481
  /* @__PURE__ */ e(
1604
- bt,
1482
+ ht,
1605
1483
  {
1606
1484
  onClose: () => de(!1),
1607
- showConnectWidget: Me,
1608
- title: i.mini_title
1485
+ showConnectWidget: Ae,
1486
+ title: s.mini_title
1609
1487
  }
1610
1488
  )
1611
1489
  ]
1612
1490
  }
1613
1491
  );
1614
- }, en = D(nr);
1492
+ }, Hr = C(Ut);
1615
1493
  export {
1616
- Ee as DebtsChart,
1617
- nn as DebtsStore,
1618
- Xt as DebtsTable,
1619
- en as DebtsWidget
1494
+ De as DebtsChart,
1495
+ zt as DebtsTable,
1496
+ Hr as DebtsWidget
1620
1497
  };