@mx-cartographer/experiences 8.0.0-alpha.bb2 → 8.0.0-alpha.bb4

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 (222) hide show
  1. package/CHANGELOG.md +128 -1
  2. package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
  3. package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
  4. package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
  5. package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
  6. package/dist/AccountListItem-wgmlex-_.mjs +90 -0
  7. package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
  8. package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
  9. package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
  10. package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
  11. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
  12. package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
  13. package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
  14. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
  15. package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
  16. package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
  17. package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
  18. package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
  19. package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
  20. package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
  21. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
  22. package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
  23. package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
  24. package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
  25. package/dist/Drawer-BF40nbsH.mjs +163 -0
  26. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  27. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
  28. package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
  29. package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
  30. package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
  31. package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
  32. package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
  33. package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
  34. package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
  35. package/dist/LineChart-C1PxNf7P.mjs +581 -0
  36. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
  37. package/dist/Loader-Ckqi9Rx6.mjs +21 -0
  38. package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
  39. package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
  40. package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
  41. package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
  42. package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
  43. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
  44. package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
  45. package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
  46. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
  47. package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
  48. package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
  49. package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
  50. package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
  51. package/dist/SearchBox-B7km148n.mjs +39 -0
  52. package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
  53. package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
  54. package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
  55. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
  56. package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
  57. package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
  58. package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
  59. package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
  60. package/dist/TransactionApi-CjBoLleL.mjs +86 -0
  61. package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
  62. package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
  63. package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
  64. package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
  65. package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
  66. package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
  67. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  68. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
  69. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
  70. package/dist/accounts/index.es.js +228 -199
  71. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  72. package/dist/analytics/index.es.js +27 -27
  73. package/dist/budgets/index.es.js +459 -462
  74. package/dist/cashflow/index.es.js +419 -428
  75. package/dist/categories/index.es.js +2 -2
  76. package/dist/categories/stores/CategoryStore.d.ts +1 -1
  77. package/dist/common/components/ErrorBoundary.d.ts +1 -1
  78. package/dist/common/components/Loader.d.ts +1 -2
  79. package/dist/common/components/Select.d.ts +4 -2
  80. package/dist/common/components/SkeletonLoader.d.ts +7 -0
  81. package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
  82. package/dist/common/components/charts/LineChart.d.ts +12 -2
  83. package/dist/common/components/charts/index.d.ts +0 -3
  84. package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
  85. package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
  86. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  87. package/dist/common/components/drawer/Footer.d.ts +17 -0
  88. package/dist/common/components/index.d.ts +0 -1
  89. package/dist/common/hooks/index.d.ts +0 -1
  90. package/dist/common/hooks/useAriaLive.d.ts +1 -1
  91. package/dist/common/index.es.js +413 -674
  92. package/dist/common/stores/GlobalStore.d.ts +7 -1
  93. package/dist/common/stores/GlobalUiStore.d.ts +3 -2
  94. package/dist/common/types/Finstrong.d.ts +54 -0
  95. package/dist/common/types/Global.d.ts +1 -0
  96. package/dist/common/types/Widgets.d.ts +1 -0
  97. package/dist/common/types/index.d.ts +1 -1
  98. package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
  99. package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
  100. package/dist/common/utils/Theme.d.ts +1 -3
  101. package/dist/dashboard/index.es.js +21 -21
  102. package/dist/debts/components/DebtsChart.d.ts +1 -2
  103. package/dist/debts/index.es.js +673 -665
  104. package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
  105. package/dist/finstrong/FinstrongWidget.d.ts +1 -1
  106. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  107. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  108. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  109. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  110. package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
  111. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  112. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  113. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  114. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  115. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  116. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  117. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  118. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  119. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  120. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  121. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  122. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  123. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  124. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  125. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  126. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  127. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  128. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  129. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  130. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  131. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  132. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  133. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  134. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
  135. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  136. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  137. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  138. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  139. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  140. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  141. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  142. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  143. package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
  144. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  145. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  146. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  147. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  148. package/dist/finstrong/constants/index.d.ts +9 -0
  149. package/dist/finstrong/index.es.js +3175 -1067
  150. package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
  151. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  152. package/dist/goals/index.es.js +580 -570
  153. package/dist/help/components/content/BottomImageContent.d.ts +1 -1
  154. package/dist/help/components/content/LeftImageContent.d.ts +1 -1
  155. package/dist/help/components/content/RightImageContent.d.ts +1 -1
  156. package/dist/help/components/content/TopImageContent.d.ts +1 -1
  157. package/dist/help/index.es.js +6 -6
  158. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  159. package/dist/insights/index.es.js +1 -1
  160. package/dist/investments/index.es.js +537 -536
  161. package/dist/merchants/index.es.js +9 -9
  162. package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
  163. package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
  164. package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
  165. package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
  166. package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
  167. package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
  168. package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
  169. package/dist/microinsights/carousel/BeatList.d.ts +10 -0
  170. package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
  171. package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
  172. package/dist/microinsights/constants/App.d.ts +0 -1
  173. package/dist/microinsights/index.d.ts +3 -3
  174. package/dist/microinsights/index.es.js +7 -7
  175. package/dist/microinsights/interfaces.d.ts +0 -6
  176. package/dist/networth/components/NetWorthChange.d.ts +3 -1
  177. package/dist/networth/index.es.js +262 -254
  178. package/dist/notifications/index.es.js +90 -91
  179. package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
  180. package/dist/recurringtransactions/index.es.js +586 -562
  181. package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
  182. package/dist/settings/index.es.js +371 -365
  183. package/dist/spending/index.es.js +267 -419
  184. package/dist/spending/utils/SpendingData.d.ts +2 -1
  185. package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
  186. package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
  187. package/dist/transactions/index.es.js +231 -226
  188. package/dist/transactions/stores/TransactionStore.d.ts +1 -1
  189. package/dist/transactions/stores/UiStore.d.ts +0 -2
  190. package/dist/trends/index.es.js +988 -612
  191. package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
  192. package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
  193. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  194. package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
  195. package/package.json +51 -56
  196. package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
  197. package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
  198. package/dist/AccountListItem-JFMZROh7.mjs +0 -90
  199. package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
  200. package/dist/Drawer-kEE73B87.mjs +0 -113
  201. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  202. package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
  203. package/dist/LineChart-D4GI7nVh.mjs +0 -541
  204. package/dist/Loader-DUaFpDGv.mjs +0 -24
  205. package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
  206. package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
  207. package/dist/SearchBox-B2_zLv8-.mjs +0 -42
  208. package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
  209. package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
  210. package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
  211. package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
  212. package/dist/common/components/barchart/Bar.d.ts +0 -25
  213. package/dist/common/components/barchart/BarChart.d.ts +0 -34
  214. package/dist/common/components/barchart/BarColumn.d.ts +0 -37
  215. package/dist/common/components/barchart/Legend.d.ts +0 -8
  216. package/dist/common/components/barchart/Util.d.ts +0 -42
  217. package/dist/common/components/barchart/index.d.ts +0 -1
  218. package/dist/common/hooks/usePrevious.d.ts +0 -2
  219. package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
  220. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
  221. package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
  222. package/dist/useAriaLive-B3_pRUio.mjs +0 -35
@@ -1,157 +1,156 @@
1
- import { g as ue, T as d, G as me, a as We, M as J, C as ye, b as Pe } from "../GoalStore-D-aB35SY.mjs";
2
- import { c as Yn, d as Zn } from "../GoalStore-D-aB35SY.mjs";
3
- import { jsxs as r, jsx as e, Fragment as U } from "react/jsx-runtime";
4
- import y from "react";
1
+ import { g as _e, T as u, G as ue, a as Ve, M as J, C as Te, b as Pe } from "../GoalStore-C1-w3Y1E.mjs";
2
+ import { c as Zn, d as qn } from "../GoalStore-C1-w3Y1E.mjs";
3
+ import { jsxs as i, jsx as e, Fragment as Y } from "react/jsx-runtime";
4
+ import f from "react";
5
5
  import { observer as D } from "mobx-react-lite";
6
- import Ve from "@mui/material/Alert";
7
- import je from "@mui/material/Snackbar";
8
- import f from "@mui/material/Stack";
6
+ import je from "@mui/material/Alert";
7
+ import ze from "@mui/material/Snackbar";
8
+ import g from "@mui/material/Stack";
9
9
  import le from "@mui/material/Tab";
10
10
  import Fe from "@mui/material/Tabs";
11
- import { Text as A, H2 as _e, P as W, H3 as ze, Icon as He, InstitutionLogo as ne } from "@mxenabled/mxui";
12
- import pe from "@mui/material/Button";
13
- import Ae from "@mui/material/Card";
14
- import Te from "@mui/material/CardActionArea";
15
- import Ce from "@mui/material/CardContent";
16
- import ge from "@mui/material/Unstable_Grid2";
17
- import oe from "@mui/material/Avatar";
18
- import $e from "@mui/material/CardHeader";
19
- import { Payments as Se, NoteStack as Re, Person as Ee, ChevronRight as M, DragHandle as Xe, CheckCircle as Ue, Icon as be, ExpandLess as Ye, ExpandMore as Ze, AddBox as xe, Trophy as qe } from "@mxenabled/mx-icons";
20
- import { u as C, l as I, a as ve, d as V, p as Ie, g as Ge, b as Ne } from "../hooks-D6XlXHf4.mjs";
21
- import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
22
- import { f as x } from "../NumberFormatting-Buh7u8Oi.mjs";
23
- import { S as Je } from "../StatusBar-BK_uYHAB.mjs";
11
+ import { Text as A, H2 as pe, P as V, H3 as He, Icon as $e, InstitutionLogo as oe } from "@mxenabled/mxui";
12
+ import he from "@mui/material/Button";
13
+ import Ce from "@mui/material/Card";
14
+ import Se from "@mui/material/CardActionArea";
15
+ import Re from "@mui/material/CardContent";
16
+ import ye from "@mui/material/Grid";
17
+ import ae from "@mui/material/Avatar";
18
+ import Ue from "@mui/material/CardHeader";
19
+ import { Payments as Ee, NoteStack as xe, Person as ve, ChevronRight as M, DragHandle as Ye, CheckCircle as Ze, Icon as fe, ExpandLess as qe, ExpandMore as Je, AddBox as Ie, Trophy as Qe } from "@mxenabled/mx-icons";
20
+ import { S as Xe } from "../StatusBar-CPfSXe80.mjs";
21
+ import { u as C, l as I, b as be, a as Ge, d as j, p as Ne, g as ke, n as et } from "../hooks-C41HAxM5.mjs";
22
+ import { u as ge } from "../useScreenSize-B5afALev.mjs";
23
+ import { f as x } from "../NumberFormatting-DjTD0t3W.mjs";
24
24
  import E from "@mui/material/Divider";
25
- import L from "@mui/material/List";
26
- import { L as ee } from "../ListItemAction-DHa3KJPs.mjs";
27
- import { C as ke } from "../CurrencyInput-DUsQbkXb.mjs";
25
+ import O from "@mui/material/List";
26
+ import { C as we } from "../CurrencyInput-D1cjbdCI.mjs";
27
+ import { L as X } from "../ListItemAction-BNCWQAN_.mjs";
28
28
  import { fromUnixTime as Q } from "date-fns/fromUnixTime";
29
29
  import N from "@mui/material/ListItem";
30
30
  import k from "@mui/material/ListItemButton";
31
31
  import w from "@mui/material/ListItemText";
32
- import { DataGridPro as Qe } from "@mui/x-data-grid-pro";
33
- import { D as j } from "../Drawer-kEE73B87.mjs";
34
- import { b as B } from "../Localization-2MODESHW.mjs";
35
- import { f as ae, D as re, a as et } from "../Dialog-CWW597AF.mjs";
32
+ import { DataGridPro as tt } from "@mui/x-data-grid-pro";
33
+ import { D as z } from "../Drawer-BF40nbsH.mjs";
34
+ import { b as L } from "../Localization-2MODESHW.mjs";
35
+ import { f as re, a as ie, D as nt } from "../Dialog-CDV0kKxj.mjs";
36
36
  import P from "@mui/material/ListItemAvatar";
37
- import { g as we, A as fe } from "../ConnectDrawer-BQNs-hjk.mjs";
38
- import tt from "@mui/material/Collapse";
39
- import nt from "@mui/material/ListItemIcon";
40
- import ot from "@mui/material/Checkbox";
41
- import { u as at, A as rt } from "../AccountDetailsHeader-JtSX6Uf9.mjs";
42
- import { A as it } from "../AccountDetailsContent-CAM9y39M.mjs";
43
- import { u as st } from "../useAccountDisplayName-BUAApBIb.mjs";
44
- import De from "@mui/material/TextField";
45
- import { M as lt, I as ct, O as dt } from "../OriginalBalanceAction-CWuVvRq9.mjs";
46
- import { getUnixTime as mt } from "date-fns/getUnixTime";
47
- import { isValid as ut } from "date-fns/isValid";
48
- import { AdapterDateFns as _t } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
- import { DatePicker as pt } from "@mui/x-date-pickers";
50
- import { LocalizationProvider as ht } from "@mui/x-date-pickers/LocalizationProvider";
51
- import { A as Y, W as gt } from "../WidgetContainer-BHWANqT4.mjs";
52
- import { L as Ke } from "../Loader-DUaFpDGv.mjs";
53
- import { E as bt } from "../EmptyState-DA_lfRBv.mjs";
54
- import ft from "@mui/material/Stack/Stack";
55
- import yt from "@mui/material/Box";
56
- import At from "@mui/material/styles/useTheme";
57
- import { S as Tt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
58
- import { M as Ct } from "../MicroWidgetContainer-DpeqN9n3.mjs";
59
- function ce({ title: t, subtitle: n }) {
60
- return /* @__PURE__ */ r(f, { children: [
61
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t }),
62
- /* @__PURE__ */ e(A, { sx: { fontWeight: 400 }, variant: "Body", children: n })
37
+ import { g as De, A as Ae } from "../ConnectDrawer-DVp54lUH.mjs";
38
+ import ot from "@mui/material/Collapse";
39
+ import at from "@mui/material/ListItemIcon";
40
+ import rt from "@mui/material/Checkbox";
41
+ import { u as it, A as st } from "../AccountDetailsHeader-DRjFuyJT.mjs";
42
+ import { A as ct } from "../AccountDetailsContent-adZTkM52.mjs";
43
+ import { u as lt } from "../useAccountDisplayName-CcIp09Xc.mjs";
44
+ import Ke from "@mui/material/TextField";
45
+ import { M as dt, I as mt, O as ut } from "../OriginalBalanceAction-2Y_3U_mg.mjs";
46
+ import { getUnixTime as _t } from "date-fns/getUnixTime";
47
+ import { isValid as pt } from "date-fns/isValid";
48
+ import { AdapterDateFns as ht } from "@mui/x-date-pickers/AdapterDateFnsV3";
49
+ import { DatePicker as bt } from "@mui/x-date-pickers";
50
+ import { LocalizationProvider as gt } from "@mui/x-date-pickers/LocalizationProvider";
51
+ import { L as Me } from "../Loader-Ckqi9Rx6.mjs";
52
+ import { A as Z, W as yt } from "../WidgetContainer-CDh9fjpR.mjs";
53
+ import { E as ft } from "../EmptyState-DoxNUae-.mjs";
54
+ import At from "@mui/material/Box";
55
+ import { useTheme as Tt } from "@mui/material/styles";
56
+ import { S as Ct } from "../SingleSegmentDonut-7Uy6VEld.mjs";
57
+ import { M as St } from "../MicroWidgetContainer-BGpNl5ZS.mjs";
58
+ function de({ title: t, subtitle: n }) {
59
+ return /* @__PURE__ */ i(g, { children: [
60
+ /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: t }),
61
+ /* @__PURE__ */ e(A, { sx: { fontWeight: 400 }, variant: "body1", children: n })
63
62
  ] });
64
63
  }
65
- const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
64
+ const Rt = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
66
65
  /(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
67
66
  "$1$2$3"
68
- ) : x(t, "0,0.00"), Me = D(
69
- ({ goal: t, isInDrawer: n = !1, onClick: i }) => {
70
- const { goals: s } = C(), { isMobile: p, isTablet: a } = he(), _ = p || a, {
71
- backgroundColor: g,
72
- color: l,
73
- percentage: h,
74
- percentageText: o,
75
- projectedText: m
76
- } = ue(s, t), c = t.track_type === d.DEBT_TRACK ? t.initial_amount : t.amount, u = [
67
+ ) : x(t, "0,0.00"), Le = D(
68
+ ({ goal: t, isInDrawer: n = !1, onClick: s }) => {
69
+ const { goals: l } = C(), { isMobile: p, isTablet: a } = ge(), _ = p || a, {
70
+ backgroundColor: h,
71
+ color: b,
72
+ percentage: r,
73
+ percentageText: m,
74
+ projectedText: o
75
+ } = _e(l, t), d = t.track_type === u.DEBT_TRACK ? t.initial_amount : t.amount, c = [
77
76
  {
78
- color: g,
79
- percentage: `${h}`
77
+ color: h,
78
+ percentage: `${r}`
80
79
  }
81
80
  ];
82
- let b = /* @__PURE__ */ e(Se, {});
83
- return t.track_type === d.DEBT_TRACK ? b = /* @__PURE__ */ e(Re, {}) : t.track_type === d.RETIREMENT_TRACK && (b = /* @__PURE__ */ e(Ee, {})), /* @__PURE__ */ e(Ae, { elevation: 2, children: /* @__PURE__ */ r(Te, { disabled: !i, onClick: i, children: [
81
+ let y = /* @__PURE__ */ e(Ee, {});
82
+ return t.track_type === u.DEBT_TRACK ? y = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (y = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ i(Se, { disabled: !s, onClick: s, children: [
84
83
  /* @__PURE__ */ e(
85
- $e,
84
+ Ue,
86
85
  {
87
- avatar: /* @__PURE__ */ e(oe, { sx: { bgcolor: g, color: l, height: 48, width: 48 }, variant: "rounded", children: b }),
88
- subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${St(
89
- c,
86
+ avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: h, color: b, height: 48, width: 48 }, variant: "rounded", children: y }),
87
+ subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "h3" : "h2", children: `${x(t.current_amount, _ ? "0,0" : "0,0.00")} / ${Rt(
88
+ d,
90
89
  _
91
90
  )}` }),
92
- title: /* @__PURE__ */ e(_e, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
91
+ title: /* @__PURE__ */ e(pe, { color: "text.secondary", fontWeight: 400, variant: "body1", children: t.name })
93
92
  }
94
93
  ),
95
- /* @__PURE__ */ e(Ce, { sx: { pt: 0 }, children: /* @__PURE__ */ r(f, { gap: 6, children: [
96
- /* @__PURE__ */ e(Je, { data: u, height: 24 }),
97
- /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
98
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o }),
99
- t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: m })
94
+ /* @__PURE__ */ e(Re, { sx: { pt: 0 }, children: /* @__PURE__ */ i(g, { gap: 6, children: [
95
+ /* @__PURE__ */ e(Xe, { data: c, height: 24 }),
96
+ /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
97
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "caption", children: m }),
98
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "caption", children: o })
100
99
  ] })
101
100
  ] }) })
102
101
  ] }) });
103
102
  }
104
- ), Rt = D(({ trackType: t }) => {
105
- const { goals: n } = C(), { setAlert: i, monthlyCashFlowProfile: s, updateMonthlyCashFlowProfile: p } = I(), a = y.useMemo(() => {
106
- let h = 0;
107
- return t === d.SAVINGS_TRACK ? h = s?.amount_allocated_for_savings_goals || 0 : t === d.DEBT_TRACK ? h = s?.amount_allocated_for_debt_goals || 0 : t === d.RETIREMENT_TRACK && (h = s?.amount_allocated_for_retirement_goals || 0), h;
108
- }, [s]), [_, g] = y.useState(a), l = async () => {
109
- if (s) {
110
- const h = { ...s };
111
- t === d.SAVINGS_TRACK ? h.amount_allocated_for_savings_goals = _ : t === d.DEBT_TRACK ? h.amount_allocated_for_debt_goals = _ : t === d.RETIREMENT_TRACK && (h.amount_allocated_for_retirement_goals = _), await p(h), i(n.alert_contribution_updated);
103
+ ), Et = D(({ trackType: t }) => {
104
+ const { goals: n } = C(), { setAlert: s, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: p } = I(), a = f.useMemo(() => {
105
+ let r = 0;
106
+ return t === u.SAVINGS_TRACK ? r = l?.amount_allocated_for_savings_goals || 0 : t === u.DEBT_TRACK ? r = l?.amount_allocated_for_debt_goals || 0 : t === u.RETIREMENT_TRACK && (r = l?.amount_allocated_for_retirement_goals || 0), r;
107
+ }, [l]), [_, h] = f.useState(a), b = async () => {
108
+ if (l) {
109
+ const r = { ...l };
110
+ t === u.SAVINGS_TRACK ? r.amount_allocated_for_savings_goals = _ : t === u.DEBT_TRACK ? r.amount_allocated_for_debt_goals = _ : t === u.RETIREMENT_TRACK && (r.amount_allocated_for_retirement_goals = _), await p(r), s(n.alert_contribution_updated);
112
111
  }
113
112
  };
114
- return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
115
- ee,
113
+ return /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
114
+ X,
116
115
  {
117
116
  isSaveDisabled: !_ || isNaN(_),
118
117
  label: n.contribution_label,
119
- onCancel: () => g(a),
120
- onSave: l,
118
+ onCancel: () => h(a),
119
+ onSave: b,
121
120
  primaryText: n.contribution_label,
122
121
  secondaryText: x(a, "0,0.00"),
123
122
  children: /* @__PURE__ */ e(
124
- ke,
123
+ we,
125
124
  {
126
125
  amount: _,
127
126
  autoFocus: !0,
128
127
  error: !_ || isNaN(_),
129
128
  fullWidth: !0,
130
129
  minAmount: 0,
131
- setAmount: (h) => g(isNaN(Number(h)) ? _ : Number(h)),
132
- sx: { ".MuiTypography-Body": { p: 0 } }
130
+ setAmount: (r) => h(isNaN(Number(r)) ? _ : Number(r)),
131
+ sx: { ".MuiTypography-body1": { p: 0 } }
133
132
  }
134
133
  )
135
134
  }
136
135
  ) });
137
- }), Et = ({ goals: t }) => {
138
- const { goals: n, common: i } = C(), { reorderGoals: s, setAlert: p } = I(), [a, _] = y.useState(!1), [g, l] = y.useState(t.map((u) => ({ ...u })));
139
- y.useEffect(() => {
140
- a && l(t.map((u) => ({ ...u })));
136
+ }), xt = ({ goals: t }) => {
137
+ const { goals: n, common: s } = C(), { reorderGoals: l, setAlert: p } = I(), [a, _] = f.useState(!1), [h, b] = f.useState(t.map((c) => ({ ...c })));
138
+ f.useEffect(() => {
139
+ a && b(t.map((c) => ({ ...c })));
141
140
  }, [a]);
142
- const h = [
141
+ const r = [
143
142
  {
144
143
  field: "name",
145
144
  flex: 1,
146
- renderCell: (u) => {
147
- const b = u.row;
148
- return /* @__PURE__ */ r(f, { children: [
149
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: b.name }),
150
- /* @__PURE__ */ e(A, { variant: "XSmall", children: B(
145
+ renderCell: (c) => {
146
+ const y = c.row;
147
+ return /* @__PURE__ */ i(g, { children: [
148
+ /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: y.name }),
149
+ /* @__PURE__ */ e(A, { variant: "caption", children: L(
151
150
  n.goal_projection,
152
- ae(
153
- Q(b.projected_to_complete_at || 0),
154
- re.MONTH_SHORT_YEAR
151
+ re(
152
+ Q(y.projected_to_complete_at || 0),
153
+ ie.MONTH_SHORT_YEAR
155
154
  )
156
155
  ) })
157
156
  ] });
@@ -162,63 +161,63 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
162
161
  align: "right",
163
162
  field: "amount",
164
163
  minWidth: 140,
165
- renderCell: (u) => {
166
- const b = u.row;
167
- return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: x(b.amount, "0,0.00") });
164
+ renderCell: (c) => {
165
+ const y = c.row;
166
+ return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "body1", children: x(y.amount, "0,0.00") });
168
167
  },
169
168
  sortable: !1
170
169
  }
171
- ], o = g.map((u) => ({
172
- id: u.guid,
170
+ ], m = h.map((c) => ({
171
+ id: c.guid,
173
172
  isHovering: !1,
174
- __reorder__: u.name,
175
- ...u
176
- })), m = ({ oldIndex: u, targetIndex: b }) => {
177
- const T = [...g];
178
- T.splice(b, 0, T.splice(u, 1)[0]);
173
+ __reorder__: c.name,
174
+ ...c
175
+ })), o = ({ oldIndex: c, targetIndex: y }) => {
176
+ const T = [...h];
177
+ T.splice(y, 0, T.splice(c, 1)[0]);
179
178
  for (let S = 0; S < T.length; S += 1)
180
179
  T[S].position = S + 1;
181
- l(T);
182
- }, c = async () => {
183
- await s(g), p(n.alert_goals_reordered), _(!1);
180
+ b(T);
181
+ }, d = async () => {
182
+ await l(h), p(n.alert_goals_reordered), _(!1);
184
183
  };
185
- return /* @__PURE__ */ r(f, { children: [
186
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(
187
- f,
184
+ return /* @__PURE__ */ i(g, { children: [
185
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
186
+ g,
188
187
  {
189
188
  alignItems: "center",
190
189
  color: "action.active",
191
190
  direction: "row",
192
191
  justifyContent: "space-between",
193
192
  children: [
194
- /* @__PURE__ */ e(A, { color: "primary.light", variant: "Body", children: n.reorder_goals_title }),
193
+ /* @__PURE__ */ e(A, { color: "primary.light", variant: "body1", children: n.reorder_goals_title }),
195
194
  /* @__PURE__ */ e(M, { color: "primary" })
196
195
  ]
197
196
  }
198
197
  ) }) }) }),
199
198
  /* @__PURE__ */ e(
200
- j,
199
+ z,
201
200
  {
202
- ariaLabelClose: i.close_aria,
201
+ ariaLabelClose: s.close_aria,
203
202
  isOpen: a,
204
203
  onClose: () => _(!1),
205
- onPrimaryAction: c,
204
+ onPrimaryAction: d,
206
205
  title: n.reorder_goals_title,
207
- children: /* @__PURE__ */ r(f, { children: [
208
- /* @__PURE__ */ e(W, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
206
+ children: /* @__PURE__ */ i(g, { children: [
207
+ /* @__PURE__ */ e(V, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
209
208
  /* @__PURE__ */ e(
210
- Qe,
209
+ tt,
211
210
  {
212
211
  columnHeaderHeight: 0,
213
- columns: h,
212
+ columns: r,
214
213
  disableColumnFilter: !0,
215
214
  disableColumnMenu: !0,
216
215
  hideFooter: !0,
217
- onRowOrderChange: m,
216
+ onRowOrderChange: o,
218
217
  rowReordering: !0,
219
- rows: o,
218
+ rows: m,
220
219
  slots: {
221
- rowReorderIcon: () => /* @__PURE__ */ e(Xe, { sx: { ml: 12 } })
220
+ rowReorderIcon: () => /* @__PURE__ */ e(Ye, { sx: { ml: 12 } })
222
221
  //TODO: Add to mx-icons
223
222
  },
224
223
  sx: {
@@ -232,10 +231,10 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
232
231
  }
233
232
  )
234
233
  ] });
235
- }, xt = ({ goal: t, index: n }) => {
236
- const { goals: i } = C(), { percentage: s } = ue(i, t), p = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? i.goal_completed : B(i.goal_percentage_reached, `${s * 100}`);
237
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
238
- t.track_type !== d.RETIREMENT_TRACK && /* @__PURE__ */ e(
234
+ }, vt = ({ goal: t, index: n }) => {
235
+ const { goals: s } = C(), { percentage: l } = _e(s, t), p = t.goal_type === ue.KEEP_BALANCE_BELOW || t.has_been_spent ? s.goal_completed : L(s.goal_percentage_reached, `${l * 100}`);
236
+ return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
237
+ t.track_type !== u.RETIREMENT_TRACK && /* @__PURE__ */ e(
239
238
  P,
240
239
  {
241
240
  sx: {
@@ -244,112 +243,121 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
244
243
  justifyContent: "center",
245
244
  ".MuiAvatar-root": { height: "16px", width: "16px" }
246
245
  },
247
- children: /* @__PURE__ */ e(oe, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "XSmall", children: n + 1 }) })
246
+ children: /* @__PURE__ */ e(ae, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "caption", children: n + 1 }) })
248
247
  }
249
248
  ),
250
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
251
- /* @__PURE__ */ r(f, { children: [
252
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
253
- /* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? p : B(
254
- i.goal_projection,
255
- ae(
249
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
250
+ /* @__PURE__ */ i(g, { children: [
251
+ /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: t.name }),
252
+ /* @__PURE__ */ e(A, { variant: "caption", children: t.is_complete ? p : L(
253
+ s.goal_projection,
254
+ re(
256
255
  Q(t.projected_to_complete_at || 0),
257
- re.MONTH_SHORT_YEAR
256
+ ie.MONTH_SHORT_YEAR
258
257
  )
259
258
  ) })
260
259
  ] }),
261
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
260
+ /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: x(t.amount, "0,0.00") })
262
261
  ] }) })
263
262
  ] }) });
264
- }, vt = ({ goal: t }) => {
263
+ }, It = ({ goal: t }) => {
265
264
  const { goals: n } = C();
266
- return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { children: [
267
- /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
268
- /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
269
- /* @__PURE__ */ r(f, { children: [
270
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
271
- /* @__PURE__ */ e(A, { variant: "XSmall", children: B(
265
+ return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
266
+ /* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ze, { color: "success", filled: !0, size: 20 }) }),
267
+ /* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "body1" }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
268
+ /* @__PURE__ */ i(g, { children: [
269
+ /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: t.name }),
270
+ /* @__PURE__ */ e(A, { variant: "caption", children: L(
272
271
  n.completed_label,
273
- ae(
272
+ re(
274
273
  Q(t.completed_at || 0),
275
- re.MONTH_SHORT_YEAR
274
+ ie.MONTH_SHORT_YEAR
276
275
  )
277
276
  ) })
278
277
  ] }),
279
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(t.amount, "0,0.00") })
278
+ /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: x(t.amount, "0,0.00") })
280
279
  ] }) })
281
280
  ] }) }, t.guid);
282
- }, It = ({ trackType: t }) => {
283
- const { goals: n, common: i } = C(), { orderedGoals: s } = I(), p = s.filter((u) => u.track_type === t), a = p.filter(
284
- (u) => u.track_type === d.SAVINGS_TRACK && !u.has_been_spent || u.track_type !== d.SAVINGS_TRACK && !u.is_complete
281
+ }, Gt = ({ trackType: t }) => {
282
+ const { goals: n, common: s } = C(), { orderedGoals: l } = I(), p = l.filter((c) => c.track_type === t), a = p.filter(
283
+ (c) => c.track_type === u.SAVINGS_TRACK && !c.has_been_spent || c.track_type !== u.SAVINGS_TRACK && !c.is_complete
285
284
  ), _ = p.filter(
286
- (u) => u.track_type === d.SAVINGS_TRACK && u.has_been_spent || u.track_type !== d.SAVINGS_TRACK && u.is_complete
287
- ), [g, l] = y.useState(!1);
288
- let h = n.manage_saving_goals, o = n.manage_saving_drawer_title, m = n.manage_saving_title, c = n.manage_saving_description;
289
- return t === d.DEBT_TRACK ? (h = n.manage_debt_goals, o = n.manage_debt_drawer_title, m = n.manage_debt_title, c = n.manage_debt_description) : t === d.RETIREMENT_TRACK && (h = n.manage_retirement_goals, o = n.manage_retirement_drawer_title, m = n.manage_retirement_title, c = n.manage_retirement_description), /* @__PURE__ */ r(f, { children: [
290
- /* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => l(!0), children: h }),
285
+ (c) => c.track_type === u.SAVINGS_TRACK && c.has_been_spent || c.track_type !== u.SAVINGS_TRACK && c.is_complete
286
+ ), [h, b] = f.useState(!1);
287
+ let r = n.manage_saving_goals, m = n.manage_saving_drawer_title, o = n.manage_saving_title, d = n.manage_saving_description;
288
+ return t === u.DEBT_TRACK ? (r = n.manage_debt_goals, m = n.manage_debt_drawer_title, o = n.manage_debt_title, d = n.manage_debt_description) : t === u.RETIREMENT_TRACK && (r = n.manage_retirement_goals, m = n.manage_retirement_drawer_title, o = n.manage_retirement_title, d = n.manage_retirement_description), /* @__PURE__ */ i(g, { children: [
289
+ /* @__PURE__ */ e(he, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => b(!0), children: r }),
291
290
  /* @__PURE__ */ e(
292
- j,
291
+ z,
293
292
  {
294
- ariaLabelClose: i.close_aria,
295
- isOpen: g,
296
- onClose: () => l(!1),
297
- title: o,
298
- children: /* @__PURE__ */ r(f, { children: [
299
- /* @__PURE__ */ r(f, { m: 24, children: [
300
- /* @__PURE__ */ e(ze, { children: m }),
301
- /* @__PURE__ */ e(W, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: c })
293
+ ariaLabelClose: s.close_aria,
294
+ isOpen: h,
295
+ onClose: () => b(!1),
296
+ title: m,
297
+ children: /* @__PURE__ */ i(g, { children: [
298
+ /* @__PURE__ */ i(g, { m: 24, children: [
299
+ /* @__PURE__ */ e(He, { children: o }),
300
+ /* @__PURE__ */ e(V, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "subtitle2", children: d })
302
301
  ] }),
303
- /* @__PURE__ */ e(Rt, { trackType: t }),
304
- /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
305
- /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
306
- a.map((u, b) => {
307
- const T = b >= a.length - 1;
308
- return /* @__PURE__ */ r(f, { children: [
309
- /* @__PURE__ */ e(xt, { goal: u, index: b }),
302
+ /* @__PURE__ */ e(Et, { trackType: t }),
303
+ /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.goal_priority }),
304
+ /* @__PURE__ */ i(O, { sx: { bgcolor: "background.paper" }, children: [
305
+ a.map((c, y) => {
306
+ const T = y >= a.length - 1;
307
+ return /* @__PURE__ */ i(g, { children: [
308
+ /* @__PURE__ */ e(vt, { goal: c, index: y }),
310
309
  /* @__PURE__ */ e(
311
310
  E,
312
311
  {
313
- variant: T && t === d.RETIREMENT_TRACK ? "fullWidth" : "inset"
312
+ variant: T && t === u.RETIREMENT_TRACK ? "fullWidth" : "inset"
314
313
  }
315
314
  )
316
- ] }, `ongoing-${u.guid}`);
315
+ ] }, `ongoing-${c.guid}`);
317
316
  }),
318
- t !== d.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { children: [
319
- /* @__PURE__ */ e(Et, { goals: a }),
317
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(g, { children: [
318
+ /* @__PURE__ */ e(xt, { goals: a }),
320
319
  /* @__PURE__ */ e(E, {})
321
320
  ] })
322
321
  ] }),
323
- t !== d.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ r(f, { children: [
324
- /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
325
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((u, b) => {
326
- const T = b > a.length - 1;
327
- return /* @__PURE__ */ r(f, { children: [
328
- /* @__PURE__ */ e(vt, { goal: u }),
322
+ t !== u.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ i(g, { children: [
323
+ /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.complete_title }),
324
+ /* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: _.map((c, y) => {
325
+ const T = y > a.length - 1;
326
+ return /* @__PURE__ */ i(g, { children: [
327
+ /* @__PURE__ */ e(It, { goal: c }),
329
328
  /* @__PURE__ */ e(E, { variant: T ? "fullWidth" : "inset" })
330
- ] }, `complete-${u.guid}`);
329
+ ] }, `complete-${c.guid}`);
331
330
  }) })
332
331
  ] })
333
332
  ] })
334
333
  }
335
334
  )
336
335
  ] });
337
- }, de = D(({ trackType: t, onAddGoals: n }) => {
338
- const { isMobile: i } = he(), { goals: s } = C(), { orderedGoals: p, setSelectedGoal: a } = I(), _ = p.filter((o) => o.track_type === t), g = _.filter(
339
- (o) => o.track_type === d.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== d.SAVINGS_TRACK && !o.is_complete
340
- ), l = _.filter(
341
- (o) => o.track_type === d.SAVINGS_TRACK && o.has_been_spent || o.track_type !== d.SAVINGS_TRACK && o.is_complete
342
- ), h = t === d.DEBT_TRACK ? s.zero_state_complete_debt : s.zero_state_complete_savings;
343
- return /* @__PURE__ */ r(f, { mt: 16, mx: i ? 24 : 0, children: [
344
- /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
345
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.ongoing_title }),
346
- /* @__PURE__ */ e(It, { trackType: t })
336
+ }, me = D(({ trackType: t, onAddGoals: n }) => {
337
+ const { isMobile: s } = ge(), { goals: l } = C(), { selectedAccountGuids: p } = be(), { orderedGoals: a, setSelectedGoal: _ } = I(), h = a.filter(
338
+ (o) => o.track_type === t && p.includes(o.account_guid)
339
+ ), b = h.filter(
340
+ (o) => o.track_type === u.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && !o.is_complete
341
+ ), r = h.filter(
342
+ (o) => o.track_type === u.SAVINGS_TRACK && o.has_been_spent || o.track_type !== u.SAVINGS_TRACK && o.is_complete
343
+ ), m = t === u.DEBT_TRACK ? l.zero_state_complete_debt : l.zero_state_complete_savings;
344
+ return /* @__PURE__ */ i(g, { mt: 16, mx: s ? 24 : 0, children: [
345
+ /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
346
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "body2", children: l.ongoing_title }),
347
+ /* @__PURE__ */ e(Gt, { trackType: t })
347
348
  ] }),
348
- g.length > 0 ? /* @__PURE__ */ e(ge, { container: !0, spacing: 24, children: g.map((o, m, c) => (
349
+ b.length > 0 ? /* @__PURE__ */ e(ye, { container: !0, spacing: 24, children: b.map((o, d, c) => (
349
350
  // Goal should be full width in mobile or if it's the first goal (unless there are 2)
350
- /* @__PURE__ */ e(ge, { xs: i || m === 0 && c.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Me, { goal: o, onClick: () => a(o) }, o.guid) }, m)
351
- )) }) : /* @__PURE__ */ r(
352
- f,
351
+ /* @__PURE__ */ e(
352
+ ye,
353
+ {
354
+ size: { xs: s || d === 0 && c.length !== 2 ? 12 : 6 },
355
+ children: /* @__PURE__ */ e(Le, { goal: o, onClick: () => _(o) }, o.guid)
356
+ },
357
+ d
358
+ )
359
+ )) }) : /* @__PURE__ */ i(
360
+ g,
353
361
  {
354
362
  alignItems: "center",
355
363
  bgcolor: "background.default",
@@ -359,7 +367,7 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
359
367
  py: 18,
360
368
  children: [
361
369
  /* @__PURE__ */ e(
362
- W,
370
+ V,
363
371
  {
364
372
  sx: (o) => ({
365
373
  color: "text.secondary",
@@ -368,18 +376,18 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
368
376
  },
369
377
  width: { sm: 381 }
370
378
  }),
371
- variant: "Small",
372
- children: We(t, s)
379
+ variant: "body2",
380
+ children: Ve(t, l)
373
381
  }
374
382
  ),
375
- /* @__PURE__ */ e(pe, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: s.add_goals_button })
383
+ /* @__PURE__ */ e(he, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: l.add_goals_button })
376
384
  ]
377
385
  }
378
386
  ),
379
- t !== d.RETIREMENT_TRACK && /* @__PURE__ */ r(f, { gap: 16, mt: 48, children: [
380
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: s.complete_title }),
381
- l.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
382
- W,
387
+ t !== u.RETIREMENT_TRACK && /* @__PURE__ */ i(g, { gap: 16, mt: 48, children: [
388
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "body2", children: l.complete_title }),
389
+ r.length === 0 && /* @__PURE__ */ e(g, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
390
+ V,
383
391
  {
384
392
  sx: (o) => ({
385
393
  color: "text.secondary",
@@ -388,99 +396,99 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
388
396
  px: 10
389
397
  }
390
398
  }),
391
- variant: "Small",
392
- children: h
399
+ variant: "body2",
400
+ children: m
393
401
  }
394
402
  ) }),
395
- l.map((o) => /* @__PURE__ */ e(Ae, { elevation: 2, children: /* @__PURE__ */ e(Te, { onClick: () => a(o), children: /* @__PURE__ */ e(Ce, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
396
- /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", gap: 6, children: [
397
- /* @__PURE__ */ e(He, { color: "success", fill: !0, name: "check_circle", size: 20 }),
398
- /* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
403
+ r.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Se, { onClick: () => _(o), children: /* @__PURE__ */ e(Re, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
404
+ /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", gap: 6, children: [
405
+ /* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
406
+ /* @__PURE__ */ e(A, { color: "text.secondary", variant: "body1", children: o.name })
399
407
  ] }),
400
- /* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: x(o.amount, "0,0.00") })
408
+ /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: x(o.amount, "0,0.00") })
401
409
  ] }) }) }) }, o.guid))
402
410
  ] })
403
411
  ] });
404
- }), Gt = ({ goalType: t, onClick: n }) => {
405
- const { goals: i } = C(), { bgcolor: s, icon: p, label: a, description: _, subTypes: g, type: l } = t, [h, o] = y.useState(!1), m = g.length > 0;
406
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
407
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(
412
+ }), Nt = ({ goalType: t, onClick: n }) => {
413
+ const { goals: s } = C(), { bgcolor: l, icon: p, label: a, description: _, subTypes: h, type: b } = t, [r, m] = f.useState(!1), o = h.length > 0;
414
+ return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ i(O, { sx: { bgcolor: "background.paper" }, children: [
415
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(
408
416
  k,
409
417
  {
410
- onClick: m ? () => o(!h) : () => n(
411
- l === d.RETIREMENT_TRACK ? i.retirement : "",
412
- l === d.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
413
- l
418
+ onClick: o ? () => m(!r) : () => n(
419
+ b === u.RETIREMENT_TRACK ? s.retirement : "",
420
+ b === u.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
421
+ b
414
422
  ),
415
423
  children: [
416
- /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: s }, variant: "rounded", children: /* @__PURE__ */ e(be, { name: p, sx: { color: "grey.900" } }) }) }),
424
+ /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(fe, { name: p, sx: { color: "grey.900" } }) }) }),
417
425
  /* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
418
- !m && /* @__PURE__ */ e(M, {}),
419
- m && (h ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ e(Ze, {}))
426
+ !o && /* @__PURE__ */ e(M, {}),
427
+ o && (r ? /* @__PURE__ */ e(qe, {}) : /* @__PURE__ */ e(Je, {}))
420
428
  ]
421
429
  }
422
430
  ) }),
423
431
  /* @__PURE__ */ e(E, { variant: "inset" }),
424
- m && /* @__PURE__ */ e(tt, { in: h, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: g.map((c, u) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ r(k, { onClick: () => n(c.label, c.metaType, l), children: [
425
- /* @__PURE__ */ e(nt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(be, { name: c.icon }) }),
432
+ o && /* @__PURE__ */ e(ot, { in: r, children: /* @__PURE__ */ e(O, { sx: { bgcolor: "background.default" }, children: h.map((d, c) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ i(k, { onClick: () => n(d.label, d.metaType, b), children: [
433
+ /* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(fe, { name: d.icon }) }),
426
434
  /* @__PURE__ */ e(
427
435
  w,
428
436
  {
429
- primary: c.label,
430
- primaryTypographyProps: { variant: "Body" }
437
+ primary: d.label,
438
+ primaryTypographyProps: { variant: "body1" }
431
439
  }
432
440
  ),
433
441
  /* @__PURE__ */ e(M, {})
434
- ] }) }, u)) }) })
442
+ ] }) }, c)) }) })
435
443
  ] }) });
436
- }, Be = ({
444
+ }, Oe = ({
437
445
  accounts: t,
438
446
  isOpen: n,
439
- onClose: i,
440
- onSave: s,
447
+ onClose: s,
448
+ onSave: l,
441
449
  title: p
442
450
  }) => {
443
- const { goals: a, common: _ } = C(), { config: g } = ve(), [l, h] = y.useState([]), o = (m) => {
444
- const c = l.findIndex((b) => b.guid === m.guid), u = [...l];
445
- c >= 0 ? u.splice(c, 1) : u.push(m), h(u);
451
+ const { goals: a, common: _ } = C(), { config: h } = Ge(), [b, r] = f.useState([]), m = (o) => {
452
+ const d = b.findIndex((y) => y.guid === o.guid), c = [...b];
453
+ d >= 0 ? c.splice(d, 1) : c.push(o), r(c);
446
454
  };
447
- return /* @__PURE__ */ r(
448
- j,
455
+ return /* @__PURE__ */ i(
456
+ z,
449
457
  {
450
458
  ariaLabelClose: _.close_aria,
451
459
  isOpen: n,
452
- onClose: i,
453
- onPrimaryAction: () => s(l),
460
+ onClose: s,
461
+ onPrimaryAction: () => l(b),
454
462
  title: p,
455
463
  children: [
456
- /* @__PURE__ */ e(W, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
457
- /* @__PURE__ */ r(L, { sx: { bgcolor: "background.white" }, children: [
464
+ /* @__PURE__ */ e(V, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
465
+ /* @__PURE__ */ i(O, { sx: { bgcolor: "background.white" }, children: [
458
466
  /* @__PURE__ */ e(E, { variant: "fullWidth" }),
459
- t.map((m, c) => /* @__PURE__ */ r(y.Fragment, { children: [
460
- /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => o(m), children: [
467
+ t.map((o, d) => /* @__PURE__ */ i(f.Fragment, { children: [
468
+ /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => m(o), children: [
461
469
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
462
- ne,
470
+ oe,
463
471
  {
464
- alt: m?.name || "",
465
- institutionGuid: m?.institution_guid || ""
472
+ alt: o?.name || "",
473
+ institutionGuid: o?.institution_guid || ""
466
474
  }
467
475
  ) }),
468
476
  /* @__PURE__ */ e(
469
477
  w,
470
478
  {
471
- primary: we(m, {
472
- allowNickname: g?.show_account_nicknames_in_master
479
+ primary: De(o, {
480
+ allowNickname: h?.show_account_nicknames_in_master
473
481
  }),
474
- secondary: x(m.balance || 0, "0,0.00")
482
+ secondary: x(o.balance || 0, "0,0.00")
475
483
  }
476
484
  ),
477
- /* @__PURE__ */ e(ot, { checked: l.some((u) => u.guid === m.guid) })
485
+ /* @__PURE__ */ e(rt, { checked: b.some((c) => c.guid === o.guid) })
478
486
  ] }) }),
479
- /* @__PURE__ */ e(E, { variant: c < t.length - 1 ? "inset" : "fullWidth" })
480
- ] }, m.guid))
487
+ /* @__PURE__ */ e(E, { variant: d < t.length - 1 ? "inset" : "fullWidth" })
488
+ ] }, o.guid))
481
489
  ] }),
482
490
  /* @__PURE__ */ e(
483
- ye,
491
+ Te,
484
492
  {
485
493
  description: a.connect_description,
486
494
  label: a.connect_button,
@@ -490,58 +498,58 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
490
498
  ]
491
499
  }
492
500
  );
493
- }, Nt = ({ onClose: t }) => {
494
- const { goals: n } = C(), { addGoal: i, debtGoals: s, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = ve(), { visibleDebtAccounts: g } = V(), [l, h] = y.useState(!1), o = Pe(n), m = (u, b, T) => {
495
- T === d.DEBT_TRACK ? h(!0) : a({
501
+ }, kt = ({ onClose: t }) => {
502
+ const { goals: n } = C(), { addGoal: s, debtGoals: l, setAlert: p, setSelectedGoal: a } = I(), { config: _ } = Ge(), { visibleDebtAccounts: h } = j(), [b, r] = f.useState(!1), m = Pe(n), o = (c, y, T) => {
503
+ T === u.DEBT_TRACK ? r(!0) : a({
496
504
  amount: 0,
497
505
  current_amount: 0,
498
- goal_type: me.SAVE_AMOUNT,
506
+ goal_type: ue.SAVE_AMOUNT,
499
507
  initial_amount: 0,
500
- meta_type: b,
501
- name: u,
508
+ meta_type: y,
509
+ name: c,
502
510
  track_type: T
503
511
  });
504
- }, c = async (u) => {
505
- for (const b of u) {
512
+ }, d = async (c) => {
513
+ for (const y of c) {
506
514
  let T = J.CREDIT_CARD;
507
- b.account_type === fe.LOAN ? T = J.LOANS : b.account_type === fe.LINE_OF_CREDIT && (T = J.LINE_OF_CREDIT), await i({
508
- account_guid: b.guid,
515
+ y.account_type === Ae.LOAN ? T = J.LOANS : y.account_type === Ae.LINE_OF_CREDIT && (T = J.LINE_OF_CREDIT), await s({
516
+ account_guid: y.guid,
509
517
  amount: 0,
510
518
  current_amount: 0,
511
- goal_type: me.KEEP_BALANCE_BELOW,
512
- initial_amount: b.balance || 0,
513
- interest_rate: b.interest_rate || 0,
519
+ goal_type: ue.KEEP_BALANCE_BELOW,
520
+ initial_amount: y.balance || 0,
521
+ interest_rate: y.interest_rate || 0,
514
522
  meta_type: T,
515
- monthly_payment: b.minimum_payment || 0,
516
- name: we(b, {
523
+ monthly_payment: y.minimum_payment || 0,
524
+ name: De(y, {
517
525
  allowNickname: _?.show_account_nicknames_in_master
518
526
  }),
519
- track_type: d.DEBT_TRACK
527
+ track_type: u.DEBT_TRACK
520
528
  }), p(n.alert_goal_added);
521
529
  }
522
- h(!1), t?.(d.DEBT_TRACK);
530
+ r(!1), t?.(u.DEBT_TRACK);
523
531
  };
524
- return /* @__PURE__ */ r(f, { children: [
525
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((u, b) => /* @__PURE__ */ e(Gt, { goalType: u, onClick: m }, b)) }),
532
+ return /* @__PURE__ */ i(g, { children: [
533
+ /* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: m.map((c, y) => /* @__PURE__ */ e(Nt, { goalType: c, onClick: o }, y)) }),
526
534
  /* @__PURE__ */ e(
527
- Be,
535
+ Oe,
528
536
  {
529
- accounts: g.filter((u) => !s.find((b) => b.account_guid === u.guid)),
530
- isOpen: l,
531
- onClose: () => h(!1),
532
- onSave: c,
537
+ accounts: h.filter((c) => !l.find((y) => y.account_guid === c.guid)),
538
+ isOpen: b,
539
+ onClose: () => r(!1),
540
+ onSave: d,
533
541
  title: n.select_debt_accounts_title
534
542
  }
535
543
  )
536
544
  ] });
537
- }, Le = ({ account: t }) => {
538
- const { accounts: n } = C(), i = st(t), { setSelectedAccount: s } = at(), [p, a] = y.useState(!1);
539
- return /* @__PURE__ */ r(N, { sx: { bgcolor: "background.paper" }, children: [
540
- /* @__PURE__ */ r(k, { onClick: () => {
541
- s(t), a(!0);
545
+ }, Be = ({ account: t }) => {
546
+ const { accounts: n } = C(), s = lt(t), { setSelectedAccount: l } = it(), [p, a] = f.useState(!1);
547
+ return /* @__PURE__ */ i(N, { sx: { bgcolor: "background.paper" }, children: [
548
+ /* @__PURE__ */ i(k, { onClick: () => {
549
+ l(t), a(!0);
542
550
  }, children: [
543
551
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
544
- ne,
552
+ oe,
545
553
  {
546
554
  alt: t.name || "",
547
555
  institutionGuid: t.institution_guid || ""
@@ -550,114 +558,114 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
550
558
  /* @__PURE__ */ e(
551
559
  w,
552
560
  {
553
- primary: i,
561
+ primary: s,
554
562
  secondary: x(t.balance || 0, "0,0.00")
555
563
  }
556
564
  ),
557
565
  /* @__PURE__ */ e(M, {})
558
566
  ] }),
559
- /* @__PURE__ */ e(j, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ r(f, { children: [
560
- /* @__PURE__ */ e(rt, {}),
561
- /* @__PURE__ */ e(it, {})
567
+ /* @__PURE__ */ e(z, { isOpen: p, onClose: () => a(!1), title: n.account_details, children: /* @__PURE__ */ i(g, { children: [
568
+ /* @__PURE__ */ e(st, {}),
569
+ /* @__PURE__ */ e(ct, {})
562
570
  ] }) })
563
571
  ] });
564
- }, kt = D(({ goal: t }) => {
565
- const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.amount), g = !t.guid, l = a < 0 || a > 9999999999e-2, h = t.track_type === d.SAVINGS_TRACK && t.has_been_spent || t.track_type !== d.SAVINGS_TRACK && t.is_complete, o = async () => {
566
- const c = { ...t, amount: a };
567
- t.amount = a, g ? s(c) : (await p(c), i(n.alert_goal_updated_amount));
568
- }, m = () => {
572
+ }, wt = D(({ goal: t }) => {
573
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, _] = f.useState(t.amount), h = !t.guid, b = a < 0 || a > 9999999999e-2, r = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, m = async () => {
574
+ const d = { ...t, amount: a };
575
+ t.amount = a, h ? l(d) : (await p(d), s(n.alert_goal_updated_amount));
576
+ }, o = () => {
569
577
  setTimeout(() => {
570
578
  _(t.amount);
571
579
  }, 250);
572
580
  };
573
581
  return /* @__PURE__ */ e(
574
- ee,
582
+ X,
575
583
  {
576
- isDisabled: h,
577
- isSaveDisabled: l,
584
+ isDisabled: r,
585
+ isSaveDisabled: b,
578
586
  label: n.details_amount_to_save,
579
- onCancel: m,
580
- onSave: o,
587
+ onCancel: o,
588
+ onSave: m,
581
589
  primaryText: n.details_amount_to_save,
582
590
  secondaryText: x(t.amount, "0,0"),
583
- zeroStateText: g && t.amount === 0 ? n.add_amount : void 0,
591
+ zeroStateText: h && t.amount === 0 ? n.add_amount : void 0,
584
592
  children: /* @__PURE__ */ e(
585
- ke,
593
+ we,
586
594
  {
587
595
  amount: a,
588
596
  autoFocus: !0,
589
- error: l,
597
+ error: b,
590
598
  fullWidth: !0,
591
599
  minAmount: 0,
592
- setAmount: (c) => _(isNaN(Number(c)) ? a : Number(c)),
593
- sx: { ".MuiTypography-Body": { p: 0 } }
600
+ setAmount: (d) => _(isNaN(Number(d)) ? a : Number(d)),
601
+ sx: { ".MuiTypography-body1": { p: 0 } }
594
602
  }
595
603
  )
596
604
  }
597
605
  );
598
- }), wt = ({ goal: t }) => {
599
- const { visibleCheckingAccounts: n, visibleSavingsAccounts: i } = V(), { accounts: s, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: g } = I(), l = !t.guid, [h, o] = y.useState(!1), m = async ({ balance: c, guid: u }) => {
600
- const b = { ...t, account_guid: u, current_amount: c || 0 };
601
- l ? _(b) : (await g(b), a(p.alert_account_changed)), o(!1);
606
+ }), Dt = ({ goal: t }) => {
607
+ const { visibleCheckingAccounts: n, visibleSavingsAccounts: s } = j(), { accounts: l, goals: p } = C(), { setAlert: a, setSelectedGoal: _, updateGoal: h } = I(), b = !t.guid, [r, m] = f.useState(!1), o = async ({ balance: d, guid: c }) => {
608
+ const y = { ...t, account_guid: c, current_amount: d || 0 };
609
+ b ? _(y) : (await h(y), a(p.alert_account_changed)), m(!1);
602
610
  };
603
- return /* @__PURE__ */ r(f, { children: [
604
- l && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => o(!0), children: [
605
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
606
- /* @__PURE__ */ e(xe, { filled: !0 }),
611
+ return /* @__PURE__ */ i(g, { children: [
612
+ b && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => m(!0), children: [
613
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
614
+ /* @__PURE__ */ e(Ie, { filled: !0 }),
607
615
  p.details_add_account
608
616
  ] }) }),
609
617
  /* @__PURE__ */ e(M, { color: "primary" })
610
- ] }) }) : /* @__PURE__ */ r(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
611
- /* @__PURE__ */ e(pe, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
618
+ ] }) }) : /* @__PURE__ */ i(g, { sx: { gap: 8, my: 24, mx: 24 }, children: [
619
+ /* @__PURE__ */ e(he, { onClick: () => m(!0), variant: "text", children: p.details_change_account }),
612
620
  /* @__PURE__ */ e(
613
621
  A,
614
622
  {
615
623
  color: "text.secondary",
616
624
  sx: { textAlign: "center", whiteSpace: "wrap" },
617
- variant: "Paragraph",
618
- children: B(p.details_change_account_description, t.name)
625
+ variant: "subtitle1",
626
+ children: L(p.details_change_account_description, t.name)
619
627
  }
620
628
  )
621
629
  ] }),
622
- /* @__PURE__ */ e(j, { isOpen: h, onClose: () => o(!1), title: p.details_change_account, children: /* @__PURE__ */ r(f, { children: [
623
- n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[1] }),
624
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => m(c), children: [
630
+ /* @__PURE__ */ e(z, { isOpen: r, onClose: () => m(!1), title: p.details_change_account, children: /* @__PURE__ */ i(g, { children: [
631
+ n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: l.account_types[1] }),
632
+ /* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: n.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
625
633
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
626
- ne,
634
+ oe,
627
635
  {
628
- alt: c?.name || "",
629
- institutionGuid: c?.institution_guid || ""
636
+ alt: d?.name || "",
637
+ institutionGuid: d?.institution_guid || ""
630
638
  }
631
639
  ) }),
632
640
  /* @__PURE__ */ e(
633
641
  w,
634
642
  {
635
- primary: c?.name || c?.feed_name,
636
- secondary: x(c?.balance || 0, "0,0.00")
643
+ primary: d?.name || d?.feed_name,
644
+ secondary: x(d?.balance || 0, "0,0.00")
637
645
  }
638
646
  ),
639
647
  /* @__PURE__ */ e(M, {})
640
- ] }) }, c.guid)) }),
641
- i.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: s.account_types[2] }),
642
- /* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: i.map((c) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ r(k, { onClick: () => m(c), children: [
648
+ ] }) }, d.guid)) }),
649
+ s.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: l.account_types[2] }),
650
+ /* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: s.map((d) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => o(d), children: [
643
651
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
644
- ne,
652
+ oe,
645
653
  {
646
- alt: c?.name || "",
647
- institutionGuid: c?.institution_guid || ""
654
+ alt: d?.name || "",
655
+ institutionGuid: d?.institution_guid || ""
648
656
  }
649
657
  ) }),
650
658
  /* @__PURE__ */ e(
651
659
  w,
652
660
  {
653
- primary: c?.name || c?.feed_name,
654
- secondary: x(c?.balance || 0, "0,0.00")
661
+ primary: d?.name || d?.feed_name,
662
+ secondary: x(d?.balance || 0, "0,0.00")
655
663
  }
656
664
  ),
657
665
  /* @__PURE__ */ e(M, {})
658
- ] }) }, c.guid)) }),
666
+ ] }) }, d.guid)) }),
659
667
  /* @__PURE__ */ e(
660
- ye,
668
+ Te,
661
669
  {
662
670
  description: p.connect_description,
663
671
  label: p.connect_button,
@@ -666,345 +674,347 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
666
674
  )
667
675
  ] }) })
668
676
  ] });
669
- }, Dt = D(({ goal: t }) => {
670
- const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.name), g = !t.guid, l = t.track_type === d.SAVINGS_TRACK && t.has_been_spent || t.track_type !== d.SAVINGS_TRACK && t.is_complete, h = async () => {
671
- const m = { ...t, name: a };
672
- t.name = a, g ? s(m) : (await p(m), i(n.alert_goal_updated_name));
673
- }, o = () => {
677
+ }, Kt = D(({ goal: t }) => {
678
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, _] = f.useState(t.name), h = !t.guid, b = t.track_type === u.SAVINGS_TRACK && t.has_been_spent || t.track_type !== u.SAVINGS_TRACK && t.is_complete, r = async () => {
679
+ const o = { ...t, name: a };
680
+ t.name = a, h ? l(o) : (await p(o), s(n.alert_goal_updated_name));
681
+ }, m = () => {
674
682
  setTimeout(() => {
675
683
  _(t.name);
676
684
  }, 250);
677
685
  };
678
686
  return /* @__PURE__ */ e(
679
- ee,
687
+ X,
680
688
  {
681
- isDisabled: l,
689
+ isDisabled: b,
682
690
  isSaveDisabled: !a,
683
691
  label: n.details_goal_name,
684
- onCancel: o,
685
- onSave: h,
692
+ onCancel: m,
693
+ onSave: r,
686
694
  primaryText: n.details_goal_name,
687
695
  secondaryText: t.name,
688
696
  children: /* @__PURE__ */ e(
689
- De,
697
+ Ke,
690
698
  {
691
699
  error: !a,
692
700
  fullWidth: !0,
693
701
  label: n.details_goal_name,
694
- onChange: (m) => _(m.target.value),
702
+ onChange: (o) => _(o.target.value),
695
703
  value: a
696
704
  }
697
705
  )
698
706
  }
699
707
  );
700
- }), Kt = ({ goal: t }) => {
701
- const { goals: n } = C(), { setAlert: i, setSelectedGoal: s, updateGoal: p } = I(), [a, _] = y.useState(t.retirement_age || 65), g = !t.guid, l = async () => {
708
+ }), Mt = ({ goal: t }) => {
709
+ const { goals: n } = C(), { setAlert: s, setSelectedGoal: l, updateGoal: p } = I(), [a, _] = f.useState(t.retirement_age || 65), h = !t.guid, b = async () => {
702
710
  if (!isNaN(a)) {
703
- const m = { ...t, retirement_age: a };
704
- t.retirement_age = a, g ? s(m) : (await p(m), i(n.alert_goal_updated_retirement_age));
711
+ const o = { ...t, retirement_age: a };
712
+ t.retirement_age = a, h ? l(o) : (await p(o), s(n.alert_goal_updated_retirement_age));
705
713
  }
706
- }, h = () => {
714
+ }, r = () => {
707
715
  setTimeout(() => {
708
716
  _(t.retirement_age || 65);
709
717
  }, 250);
710
- }, o = !a || isNaN(a) || a < 20 || a >= 100;
718
+ }, m = !a || isNaN(a) || a < 20 || a >= 100;
711
719
  return /* @__PURE__ */ e(
712
- ee,
720
+ X,
713
721
  {
714
722
  isDisabled: t.is_complete,
715
- isSaveDisabled: o,
723
+ isSaveDisabled: m,
716
724
  label: n.details_retirement_age,
717
- onCancel: h,
718
- onSave: l,
725
+ onCancel: r,
726
+ onSave: b,
719
727
  primaryText: n.details_retirement_age,
720
728
  secondaryText: `${t.retirement_age}`,
721
- zeroStateText: g && !t.retirement_age ? n.add_age : void 0,
729
+ zeroStateText: h && !t.retirement_age ? n.add_age : void 0,
722
730
  children: /* @__PURE__ */ e(
723
- De,
731
+ Ke,
724
732
  {
725
- error: o,
733
+ error: m,
726
734
  fullWidth: !0,
727
735
  label: n.details_retirement_age,
728
- onChange: (m) => _(Number(m.target.value)),
736
+ onChange: (o) => _(Number(o.target.value)),
729
737
  value: isNaN(a) ? "" : a
730
738
  }
731
739
  )
732
740
  }
733
741
  );
734
- }, Mt = D(({ goal: t }) => {
735
- const { goals: n } = C(), { user: i, updateUser: s } = Ie(), { setAlert: p } = I(), [a, _] = y.useState(Q(i.birthday ?? 0)), [g, l] = y.useState(null), h = t.is_complete, o = async () => {
736
- a && ut(a) && (await s({ ...i, birthday: mt(a) }), p(n.alert_goal_updated_birthday));
742
+ }, Lt = D(({ goal: t }) => {
743
+ const { goals: n } = C(), { user: s, updateUser: l } = Ne(), { setAlert: p } = I(), [a, _] = f.useState(Q(s.birthday ?? 0)), [h, b] = f.useState(null), r = t.is_complete, m = async () => {
744
+ a && pt(a) && (await l({ ...s, birthday: _t(a) }), p(n.alert_goal_updated_birthday));
737
745
  };
738
746
  return /* @__PURE__ */ e(
739
- ee,
747
+ X,
740
748
  {
741
- isDisabled: h,
742
- isSaveDisabled: !!g,
749
+ isDisabled: r,
750
+ isSaveDisabled: !!h,
743
751
  label: n.details_birthday,
744
- onSave: o,
752
+ onSave: m,
745
753
  primaryText: n.details_birthday,
746
- secondaryText: `${ae(Q(i.birthday ?? 0), re.MONTH_DAY_YEAR)}`,
747
- zeroStateText: !t.guid && !i.birthday ? n.add_birthday : void 0,
748
- children: /* @__PURE__ */ e(ht, { dateAdapter: _t, children: /* @__PURE__ */ e(
749
- pt,
754
+ secondaryText: `${re(Q(s.birthday ?? 0), ie.MONTH_DAY_YEAR)}`,
755
+ zeroStateText: !t.guid && !s.birthday ? n.add_birthday : void 0,
756
+ children: /* @__PURE__ */ e(gt, { dateAdapter: ht, children: /* @__PURE__ */ e(
757
+ bt,
750
758
  {
751
759
  label: n.details_birthday,
752
760
  onChange: _,
753
- onError: (m) => l(m),
761
+ onError: (o) => b(o),
754
762
  sx: { width: "100%" },
755
763
  value: a
756
764
  }
757
765
  ) })
758
766
  }
759
767
  );
760
- }), Bt = ({ goal: t }) => {
761
- const { goals: n } = C(), { visibleRetirementAccounts: i } = V(), {
762
- addRetirementGoalAccount: s,
768
+ }), Ot = ({ goal: t }) => {
769
+ const { goals: n } = C(), { visibleRetirementAccounts: s } = j(), {
770
+ addRetirementGoalAccount: l,
763
771
  newRetirementGoalAccounts: p,
764
772
  retirementGoalAccounts: a,
765
773
  selectedGoal: _,
766
- setAlert: g,
767
- setNewRetirementGoalAccounts: l,
768
- setSelectedGoal: h
769
- } = I(), [o, m] = y.useState(!1), c = !t.guid, u = i.filter(
770
- (S) => c ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
771
- ), b = i.filter(
774
+ setAlert: h,
775
+ setNewRetirementGoalAccounts: b,
776
+ setSelectedGoal: r
777
+ } = I(), [m, o] = f.useState(!1), d = !t.guid, c = s.filter(
778
+ (S) => d ? p.find((R) => R.account_guid === S.guid) : a.find((R) => R.account_guid === S.guid)
779
+ ), y = s.filter(
772
780
  (S) => !a.find((R) => R.account_guid === S.guid)
773
781
  ), T = async (S) => {
774
782
  const R = S.map((v) => ({
775
783
  account_guid: v.guid,
776
784
  retirement_goal_guid: t.guid
777
785
  }));
778
- if (c)
779
- l(R);
786
+ if (d)
787
+ b(R);
780
788
  else
781
789
  for (const v of R)
782
- await s(v), g(n.alert_account_added);
783
- h({
790
+ await l(v), h(n.alert_account_added);
791
+ r({
784
792
  ..._,
785
- current_amount: S.reduce((v, F) => v + (F.balance || 0), 0)
786
- }), m(!1);
793
+ current_amount: S.reduce((v, K) => v + (K.balance || 0), 0)
794
+ }), o(!1);
787
795
  };
788
- return /* @__PURE__ */ r(f, { children: [
789
- u.map((S) => /* @__PURE__ */ r(f, { children: [
790
- /* @__PURE__ */ e(Le, { account: S }),
796
+ return /* @__PURE__ */ i(g, { children: [
797
+ c.map((S) => /* @__PURE__ */ i(g, { children: [
798
+ /* @__PURE__ */ e(Be, { account: S }),
791
799
  /* @__PURE__ */ e(E, {})
792
800
  ] }, S.guid)),
793
- /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ r(k, { onClick: () => m(!0), children: [
794
- /* @__PURE__ */ e(w, { children: /* @__PURE__ */ r(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
795
- /* @__PURE__ */ e(xe, { filled: !0 }),
801
+ /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => o(!0), children: [
802
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
803
+ /* @__PURE__ */ e(Ie, { filled: !0 }),
796
804
  n.details_add_account
797
805
  ] }) }),
798
806
  /* @__PURE__ */ e(M, { color: "primary" })
799
807
  ] }) }),
800
808
  /* @__PURE__ */ e(
801
- Be,
809
+ Oe,
802
810
  {
803
- accounts: b,
804
- isOpen: o,
805
- onClose: () => m(!1),
811
+ accounts: y,
812
+ isOpen: m,
813
+ onClose: () => o(!1),
806
814
  onSave: T,
807
815
  title: n.add_select_accounts
808
816
  }
809
817
  )
810
818
  ] });
811
- }, Lt = D(({ goal: t }) => {
812
- const { goals: n } = C(), { visibleAccounts: i } = V(), s = y.useMemo(
813
- () => i.find((_) => _.guid === t.account_guid),
814
- [i, t]
819
+ }, Bt = D(({ goal: t }) => {
820
+ const { goals: n } = C(), { visibleAccounts: s } = j(), l = f.useMemo(
821
+ () => s.find((_) => _.guid === t.account_guid),
822
+ [s, t]
815
823
  ), p = t.track_type;
816
824
  let a = n.details_save_title;
817
- return t.track_type === d.DEBT_TRACK ? a = n.details_debt_title : t.track_type === d.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ r(f, { children: [
818
- /* @__PURE__ */ r(f, { mx: 24, children: [
819
- /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
820
- /* @__PURE__ */ e(Me, { goal: t, isInDrawer: !0 }),
821
- /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
825
+ return t.track_type === u.DEBT_TRACK ? a = n.details_debt_title : t.track_type === u.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ i(g, { children: [
826
+ /* @__PURE__ */ i(g, { mx: 24, children: [
827
+ /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: a }),
828
+ /* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
829
+ /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: n.details_title })
822
830
  ] }),
823
- /* @__PURE__ */ r(L, { sx: { bgcolor: "background.paper" }, children: [
824
- /* @__PURE__ */ e(Dt, { goal: t }),
831
+ /* @__PURE__ */ i(O, { sx: { bgcolor: "background.paper" }, children: [
832
+ /* @__PURE__ */ e(Kt, { goal: t }),
825
833
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
826
- (p === d.SAVINGS_TRACK || p === d.RETIREMENT_TRACK) && /* @__PURE__ */ r(U, { children: [
827
- /* @__PURE__ */ e(kt, { goal: t }),
828
- /* @__PURE__ */ e(E, { sx: { ml: p === d.RETIREMENT_TRACK ? 24 : 0 } })
834
+ (p === u.SAVINGS_TRACK || p === u.RETIREMENT_TRACK) && /* @__PURE__ */ i(Y, { children: [
835
+ /* @__PURE__ */ e(wt, { goal: t }),
836
+ /* @__PURE__ */ e(E, { sx: { ml: p === u.RETIREMENT_TRACK ? 24 : 0 } })
829
837
  ] }),
830
- t.track_type === d.DEBT_TRACK && /* @__PURE__ */ r(U, { children: [
831
- /* @__PURE__ */ e(lt, { goal: t }),
838
+ t.track_type === u.DEBT_TRACK && /* @__PURE__ */ i(Y, { children: [
839
+ /* @__PURE__ */ e(dt, { goal: t }),
832
840
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
833
- /* @__PURE__ */ e(ct, { goal: t }),
841
+ /* @__PURE__ */ e(mt, { goal: t }),
834
842
  /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
835
- /* @__PURE__ */ e(dt, { goal: t }),
843
+ /* @__PURE__ */ e(ut, { goal: t }),
836
844
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
837
845
  ] }),
838
- t.track_type === d.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
839
- /* @__PURE__ */ e(Kt, { goal: t }),
840
- /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
846
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(Y, { children: [
841
847
  /* @__PURE__ */ e(Mt, { goal: t }),
848
+ /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
849
+ /* @__PURE__ */ e(Lt, { goal: t }),
842
850
  /* @__PURE__ */ e(E, { variant: "fullWidth" })
843
851
  ] })
844
852
  ] }),
845
- /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === d.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
846
- t.track_type !== d.RETIREMENT_TRACK && s && /* @__PURE__ */ r(U, { children: [
847
- /* @__PURE__ */ e(Le, { account: s }),
853
+ /* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: t.track_type === u.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
854
+ t.track_type !== u.RETIREMENT_TRACK && l && /* @__PURE__ */ i(Y, { children: [
855
+ /* @__PURE__ */ e(Be, { account: l }),
848
856
  /* @__PURE__ */ e(E, {})
849
857
  ] }),
850
- t.track_type === d.RETIREMENT_TRACK && /* @__PURE__ */ r(U, { children: [
851
- /* @__PURE__ */ e(Bt, { goal: t }),
858
+ t.track_type === u.RETIREMENT_TRACK && /* @__PURE__ */ i(Y, { children: [
859
+ /* @__PURE__ */ e(Ot, { goal: t }),
852
860
  /* @__PURE__ */ e(E, {})
853
861
  ] }),
854
- t.track_type === d.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(wt, { goal: t })
862
+ t.track_type === u.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Dt, { goal: t })
855
863
  ] });
856
- }), Ot = D(({ onClose: t }) => {
857
- const { visibleRetirementAccounts: n } = V(), { goals: i, common: s } = C(), {
864
+ }), Wt = D(({ onClose: t }) => {
865
+ const { visibleRetirementAccounts: n } = j(), { goals: s, common: l } = C(), {
858
866
  addGoal: p,
859
867
  addRetirementGoal: a,
860
868
  deleteGoal: _,
861
- deleteRetirementGoal: g,
862
- newRetirementGoalAccounts: l,
863
- retirementGoalAccounts: h,
864
- selectedGoal: o,
865
- setAlert: m,
866
- setSelectedGoal: c,
867
- updateGoal: u
868
- } = I(), { user: b } = Ie(), [T, S] = y.useState(!1), R = !o?.guid, v = o?.track_type === d.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, F = y.useMemo(() => {
869
- const G = R ? l : h;
870
- return n.filter(($) => G.some((K) => K.account_guid === $.guid));
871
- }, [R, n, l, h]), Z = y.useMemo(() => {
872
- if (!o) return !1;
869
+ deleteRetirementGoal: h,
870
+ newRetirementGoalAccounts: b,
871
+ retirementGoalAccounts: r,
872
+ selectedGoal: m,
873
+ setAlert: o,
874
+ setSelectedGoal: d,
875
+ updateGoal: c
876
+ } = I(), { user: y } = Ne(), [T, S] = f.useState(!1), R = !m?.guid, v = m?.track_type === u.SAVINGS_TRACK && m.is_complete && !m.has_been_spent, K = f.useMemo(() => {
877
+ const G = R ? b : r;
878
+ return n.filter((H) => G.some(($) => $.account_guid === H.guid));
879
+ }, [R, n, b, r]), se = f.useMemo(() => {
880
+ if (!m) return !1;
873
881
  if (!R && !v) return !0;
874
- const { account_guid: G, track_type: $, name: K, amount: q, retirement_age: O } = o;
875
- return $ === d.SAVINGS_TRACK ? G ? !!K && !!q : !1 : $ === d.RETIREMENT_TRACK ? F.length ? !!K && !!q && !!O && !!b.birthday : !1 : !0;
876
- }, [o, F, b.birthday]);
877
- let z = s.delete_button, H = () => S(!0);
878
- R ? (H = () => te(), z = s.save_button) : v && (H = () => se(), z = i.mark_as_complete_button);
879
- const te = async () => {
880
- if (o) {
881
- const G = o.track_type;
882
- G !== d.RETIREMENT_TRACK ? await p(o) : G === d.RETIREMENT_TRACK && await a({ ...o, target_amount: o.amount }), m(i.alert_goal_added), c(void 0), G && t?.(G);
882
+ const { account_guid: G, track_type: H, name: $, amount: B, retirement_age: ne } = m;
883
+ return H === u.SAVINGS_TRACK ? G ? !!$ && !!B : !1 : H === u.RETIREMENT_TRACK ? K.length ? !!$ && !!B && !!ne && !!y.birthday : !1 : !0;
884
+ }, [m, K, y.birthday]);
885
+ let W = l.delete_button, F = () => S(!0);
886
+ R ? (F = () => ee(), W = l.save_button) : v && (F = () => ce(), W = s.mark_as_complete_button);
887
+ const ee = async () => {
888
+ if (m) {
889
+ const G = m.track_type;
890
+ G !== u.RETIREMENT_TRACK ? await p(m) : G === u.RETIREMENT_TRACK && await a({ ...m, target_amount: m.amount }), o(s.alert_goal_added), d(void 0), G && t?.(G);
883
891
  }
884
- }, ie = async () => {
885
- o && (o.track_type !== d.RETIREMENT_TRACK ? await _(o.guid) : o.track_type === d.RETIREMENT_TRACK && await g(o), m(i.alert_goal_deleted), c(void 0));
886
- }, se = async () => {
892
+ }, te = async () => {
893
+ m && (m.track_type !== u.RETIREMENT_TRACK ? await _(m.guid) : m.track_type === u.RETIREMENT_TRACK && await h(m), o(s.alert_goal_deleted), d(void 0));
894
+ }, ce = async () => {
887
895
  const G = {
888
- ...o,
896
+ ...m,
889
897
  has_been_spent: !0
890
898
  };
891
- await u(G), m(i.alert_goal_completed), c(void 0);
899
+ await c(G), o(s.alert_goal_completed), d(void 0);
892
900
  };
893
- return /* @__PURE__ */ r(f, { children: [
901
+ return /* @__PURE__ */ i(g, { children: [
894
902
  /* @__PURE__ */ e(
895
- j,
903
+ z,
896
904
  {
897
- ariaLabelClose: s.close_aria,
905
+ ariaLabelClose: l.close_aria,
898
906
  hasSecondaryAction: R,
899
- isOpen: !!o,
900
- isPrimaryDisabled: !Z,
901
- onClose: () => c(void 0),
902
- onPrimaryAction: H,
907
+ isOpen: !!m,
908
+ isPrimaryDisabled: !se,
909
+ onClose: () => d(void 0),
910
+ onPrimaryAction: F,
903
911
  primaryColor: R || v ? "primary" : "error",
904
- primaryText: z,
912
+ primaryText: W,
905
913
  secondaryColor: "primary",
906
- title: i.goal_details,
907
- children: o && /* @__PURE__ */ e(Lt, { goal: o })
914
+ title: s.goal_details,
915
+ children: m && /* @__PURE__ */ e(Bt, { goal: m })
908
916
  }
909
917
  ),
910
918
  /* @__PURE__ */ e(
911
- et,
919
+ nt,
912
920
  {
913
- copy: { close_aria: s.close_aria, title: i.delete_goal },
921
+ copy: { close_aria: l.close_aria, title: s.delete_goal },
914
922
  isOpen: T,
915
923
  maxWidth: "xs",
916
924
  onClose: () => S(!1),
917
- onPrimaryAction: ie,
925
+ onPrimaryAction: te,
918
926
  primaryColor: "error",
919
- primaryText: s.delete_button,
920
- children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: B(i.delete_description, o?.name || "") })
927
+ primaryText: l.delete_button,
928
+ children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "subtitle1", children: L(s.delete_description, m?.name || "") })
921
929
  }
922
930
  )
923
931
  ] });
924
932
  }), Hn = D(({ onBackClick: t, sx: n }) => {
925
- const { onEvent: i } = Ge(), { isMobile: s } = he(), { visibleAccounts: p } = V(), { isCopyLoaded: a, isInitialized: _, setSelectedAccounts: g } = Ne(), { goals: l, common: h } = C(), { alert: o, goals: m, goalsLoaded: c, loadGoals: u, monthlyCashFlowProfile: b, setAlert: T, retirmentGoals: S } = I(), [R, v] = y.useState(0), [F, Z] = y.useState(!1), z = b?.amount_allocated_for_savings_goals || 0, H = b?.amount_allocated_for_debt_goals || 0, te = b?.amount_allocated_for_retirement_goals || 0, ie = a ? B(
926
- s ? l.tab_subtitle_mobile : l.tab_subtitle,
927
- x(z, "0,0")
928
- ) : "", se = a ? B(
929
- s ? l.tab_subtitle_mobile : l.tab_subtitle,
930
- x(H, "0,0")
931
- ) : "", G = a ? B(
932
- s ? l.tab_subtitle_mobile : l.tab_subtitle,
933
+ const { onEvent: s } = ke(), { onLoad: l } = et(), { isMobile: p } = ge(), { visibleAccounts: a } = j(), { isCopyLoaded: _, isInitialized: h, setSelectedAccounts: b } = be(), { goals: r, common: m } = C(), { alert: o, goals: d, goalsLoaded: c, loadGoals: y, monthlyCashFlowProfile: T, setAlert: S, retirmentGoals: R } = I(), [v, K] = f.useState(0), [se, W] = f.useState(!1), F = T?.amount_allocated_for_savings_goals || 0, ee = T?.amount_allocated_for_debt_goals || 0, te = T?.amount_allocated_for_retirement_goals || 0, ce = _ ? L(
934
+ p ? r.tab_subtitle_mobile : r.tab_subtitle,
935
+ x(F, "0,0")
936
+ ) : "", G = _ ? L(
937
+ p ? r.tab_subtitle_mobile : r.tab_subtitle,
938
+ x(ee, "0,0")
939
+ ) : "", H = _ ? L(
940
+ p ? r.tab_subtitle_mobile : r.tab_subtitle,
933
941
  x(te, "0,0")
934
942
  ) : "";
935
- y.useEffect(() => {
936
- g(p), i(Y.GOALS_VIEW);
937
- }, []), y.useEffect(() => {
938
- _ && u().finally();
939
- }, [_, z, H, te]);
943
+ f.useEffect(() => {
944
+ b(a), s(Z.GOALS_VIEW);
945
+ }, [a]), f.useEffect(() => {
946
+ h && y().finally(() => {
947
+ l?.("GoalsWidget");
948
+ });
949
+ }, [h, F, ee, te]);
940
950
  const $ = () => {
941
- i(Y.GOALS_CLICK_FILTER);
942
- }, K = () => {
943
- Z(!0), i(Y.GOALS_CLICK_ADD);
944
- }, q = (X) => {
945
- Z(!1), X === d.SAVINGS_TRACK ? v(0) : X === d.DEBT_TRACK ? v(1) : X === d.RETIREMENT_TRACK && v(2);
946
- }, O = y.useMemo(
947
- () => c && (m.length === 0 || m.every(({ track_type: X }) => !X) && S.length === 0),
948
- [m, c, S]
951
+ s(Z.GOALS_CLICK_FILTER);
952
+ }, B = () => {
953
+ W(!0), s(Z.GOALS_CLICK_ADD);
954
+ }, ne = (U) => {
955
+ W(!1), U === u.SAVINGS_TRACK ? K(0) : U === u.DEBT_TRACK ? K(1) : U === u.RETIREMENT_TRACK && K(2);
956
+ }, q = f.useMemo(
957
+ () => c && (d.length === 0 || d.every(({ track_type: U }) => !U) && R.length === 0),
958
+ [d, c, R]
949
959
  );
950
- return !c || !a || !_ ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ r(
951
- gt,
960
+ return !c || !_ || !h ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ i(
961
+ yt,
952
962
  {
953
- accountOptions: p,
963
+ accountOptions: a,
954
964
  actions: [
955
965
  {
956
966
  iconName: "add",
957
- label: l.add_title,
958
- onClick: K
967
+ label: r.add_title,
968
+ onClick: B
959
969
  }
960
970
  ],
961
971
  onAccountsFilterClick: $,
962
972
  onBackClick: t,
963
973
  sx: n,
964
- title: l.title,
974
+ title: r.title,
965
975
  children: [
966
- /* @__PURE__ */ r(f, { mx: s ? 0 : 48, my: 24, children: [
967
- /* @__PURE__ */ r(
976
+ /* @__PURE__ */ i(g, { mx: p ? 0 : 48, my: 24, children: [
977
+ /* @__PURE__ */ i(
968
978
  Fe,
969
979
  {
970
- onChange: (X, Oe) => v(Oe),
980
+ onChange: (U, We) => K(We),
971
981
  sx: { bgcolor: "background.paper" },
972
982
  textColor: "primary",
973
- value: O ? !1 : R,
983
+ value: q ? !1 : v,
974
984
  variant: "fullWidth",
975
985
  children: [
976
986
  /* @__PURE__ */ e(
977
987
  le,
978
988
  {
979
- disabled: O,
980
- label: /* @__PURE__ */ e(ce, { subtitle: ie, title: l.tab_saving_title })
989
+ disabled: q,
990
+ label: /* @__PURE__ */ e(de, { subtitle: ce, title: r.tab_saving_title })
981
991
  }
982
992
  ),
983
993
  /* @__PURE__ */ e(
984
994
  le,
985
995
  {
986
- disabled: O,
987
- label: /* @__PURE__ */ e(ce, { subtitle: se, title: l.tab_debt_title })
996
+ disabled: q,
997
+ label: /* @__PURE__ */ e(de, { subtitle: G, title: r.tab_debt_title })
988
998
  }
989
999
  ),
990
1000
  /* @__PURE__ */ e(
991
1001
  le,
992
1002
  {
993
- disabled: O,
994
- label: /* @__PURE__ */ e(ce, { subtitle: G, title: l.tab_retirement_title })
1003
+ disabled: q,
1004
+ label: /* @__PURE__ */ e(de, { subtitle: H, title: r.tab_retirement_title })
995
1005
  }
996
1006
  )
997
1007
  ]
998
1008
  }
999
1009
  ),
1000
- O ? /* @__PURE__ */ e(
1001
- bt,
1010
+ q ? /* @__PURE__ */ e(
1011
+ ft,
1002
1012
  {
1003
- header: l.create_goals_header,
1013
+ header: r.create_goals_header,
1004
1014
  icon: "trophy",
1005
- onClick: K,
1006
- primaryButton: l.add_goals_button,
1007
- subText: l.empty_state_subheader,
1015
+ onClick: B,
1016
+ primaryButton: r.add_goals_button,
1017
+ subText: r.empty_state_subheader,
1008
1018
  sx: {
1009
1019
  width: { sm: 432 },
1010
1020
  ".buttons-footer": {
@@ -1012,67 +1022,67 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1012
1022
  }
1013
1023
  }
1014
1024
  }
1015
- ) : /* @__PURE__ */ r(U, { children: [
1016
- R === 0 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.SAVINGS_TRACK }),
1017
- R === 1 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.DEBT_TRACK }),
1018
- R === 2 && /* @__PURE__ */ e(de, { onAddGoals: K, trackType: d.RETIREMENT_TRACK })
1025
+ ) : /* @__PURE__ */ i(Y, { children: [
1026
+ v === 0 && /* @__PURE__ */ e(me, { onAddGoals: B, trackType: u.SAVINGS_TRACK }),
1027
+ v === 1 && /* @__PURE__ */ e(me, { onAddGoals: B, trackType: u.DEBT_TRACK }),
1028
+ v === 2 && /* @__PURE__ */ e(me, { onAddGoals: B, trackType: u.RETIREMENT_TRACK })
1019
1029
  ] })
1020
1030
  ] }),
1021
- /* @__PURE__ */ e(Ot, { onClose: q }),
1031
+ /* @__PURE__ */ e(Wt, { onClose: ne }),
1022
1032
  /* @__PURE__ */ e(
1023
- j,
1033
+ z,
1024
1034
  {
1025
- ariaLabelClose: h.close_aria,
1026
- isOpen: F,
1027
- onClose: () => Z(!1),
1028
- title: l.add_goal_title,
1029
- children: /* @__PURE__ */ e(Nt, { onClose: q })
1035
+ ariaLabelClose: m.close_aria,
1036
+ isOpen: se,
1037
+ onClose: () => W(!1),
1038
+ title: r.add_goal_title,
1039
+ children: /* @__PURE__ */ e(kt, { onClose: ne })
1030
1040
  }
1031
1041
  ),
1032
- /* @__PURE__ */ e(je, { onClose: () => T(""), open: !!o, children: /* @__PURE__ */ e(Ve, { onClose: () => T(""), severity: "success", variant: "filled", children: o }) })
1042
+ /* @__PURE__ */ e(ze, { onClose: () => S(""), open: !!o, children: /* @__PURE__ */ e(je, { onClose: () => S(""), severity: "success", variant: "filled", children: o }) })
1033
1043
  ]
1034
1044
  }
1035
1045
  );
1036
- }), Wt = D(({ goal: t }) => {
1037
- const { goals: n } = C(), i = At(), {
1038
- backgroundColor: s,
1046
+ }), Vt = D(({ goal: t }) => {
1047
+ const { goals: n } = C(), s = Tt(), {
1048
+ backgroundColor: l,
1039
1049
  color: p,
1040
1050
  percentage: a,
1041
1051
  projectedText: _
1042
- } = ue(n, t), g = Math.round(a * 100);
1043
- let l = /* @__PURE__ */ e(Se, {});
1044
- return t.track_type === d.DEBT_TRACK ? l = /* @__PURE__ */ e(Re, {}) : t.track_type === d.RETIREMENT_TRACK && (l = /* @__PURE__ */ e(Ee, {})), /* @__PURE__ */ r(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1045
- /* @__PURE__ */ e(oe, { sx: { bgcolor: s, color: p, height: 32, width: 32 }, variant: "rounded", children: l }),
1046
- /* @__PURE__ */ r(yt, { sx: { width: "100%" }, children: [
1047
- /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1048
- t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
1052
+ } = _e(n, t), h = Math.round(a * 100);
1053
+ let b = /* @__PURE__ */ e(Ee, {});
1054
+ return t.track_type === u.DEBT_TRACK ? b = /* @__PURE__ */ e(xe, {}) : t.track_type === u.RETIREMENT_TRACK && (b = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
1055
+ /* @__PURE__ */ e(ae, { sx: { bgcolor: l, color: p, height: 32, width: 32 }, variant: "rounded", children: b }),
1056
+ /* @__PURE__ */ i(At, { sx: { width: "100%" }, children: [
1057
+ /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
1058
+ t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "caption", children: _ })
1049
1059
  ] }),
1050
1060
  /* @__PURE__ */ e(
1051
- Tt,
1061
+ Ct,
1052
1062
  {
1053
- backgroundStrokeColor: i.palette.border.lighter,
1054
- color: i.palette.primary.main,
1055
- percent: g,
1063
+ backgroundStrokeColor: s.palette.neutral.light,
1064
+ color: s.palette.primary.main,
1065
+ percent: h,
1056
1066
  size: 40,
1057
1067
  strokeWidth: 3,
1058
- children: /* @__PURE__ */ e(W, { fontWeight: 700, variant: "caption", children: `${g}%` })
1068
+ children: /* @__PURE__ */ e(V, { fontWeight: 700, variant: "caption", children: `${h}%` })
1059
1069
  }
1060
1070
  )
1061
1071
  ] });
1062
- }), Pt = ({ header: t, subText: n, sx: i }) => /* @__PURE__ */ r(
1063
- f,
1072
+ }), Pt = ({ header: t, subText: n, sx: s }) => /* @__PURE__ */ i(
1073
+ g,
1064
1074
  {
1065
1075
  sx: {
1066
1076
  alignItems: "center",
1067
1077
  alignSelf: "center",
1068
1078
  px: 24,
1069
- ...i
1079
+ ...s
1070
1080
  },
1071
1081
  children: [
1072
- /* @__PURE__ */ e(qe, { size: 32 }),
1073
- /* @__PURE__ */ e(_e, { fontSize: 15, fontWeight: 600, children: t }),
1082
+ /* @__PURE__ */ e(Qe, { size: 32 }),
1083
+ /* @__PURE__ */ e(pe, { fontSize: 15, fontWeight: 600, children: t }),
1074
1084
  /* @__PURE__ */ e(
1075
- W,
1085
+ V,
1076
1086
  {
1077
1087
  color: "text.secondary",
1078
1088
  sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
@@ -1083,45 +1093,45 @@ const St = (t, n) => n ? x(t, t < 1e3 ? "0" : "0.00a").replace(
1083
1093
  ]
1084
1094
  }
1085
1095
  ), $n = D(({ onCTAClick: t }) => {
1086
- const { visibleAccounts: n } = V(), { onEvent: i } = Ge(), { goals: s } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = Ne(), { ongoingGoalsForMicroWidget: g, loadGoals: l, goalsLoaded: h } = I();
1087
- y.useEffect(() => {
1096
+ const { visibleAccounts: n } = j(), { onEvent: s } = ke(), { goals: l } = C(), { isInitialized: p, setSelectedAccounts: a, isCopyLoaded: _ } = be(), { ongoingGoalsForMicroWidget: h, loadGoals: b, goalsLoaded: r } = I();
1097
+ f.useEffect(() => {
1088
1098
  a(n);
1089
- }, []), y.useEffect(() => {
1090
- p && (l().finally(), i(Y.GOALS_LOAD_WIDGET, {
1099
+ }, []), f.useEffect(() => {
1100
+ p && (b().finally(), s(Z.GOALS_LOAD_WIDGET, {
1091
1101
  state: n?.length ? "default" : "zeroState"
1092
1102
  }));
1093
1103
  }, [p]);
1094
- const o = y.useMemo(
1095
- () => h && g.length === 0,
1096
- [g, h]
1097
- ), m = () => {
1098
- i(
1099
- o ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
1104
+ const m = f.useMemo(
1105
+ () => r && h.length === 0,
1106
+ [h, r]
1107
+ ), o = () => {
1108
+ s(
1109
+ m ? Z.GOALS_CLICK_GET_STARTED : Z.GOALS_CLICK_VIEW_DETAILS
1100
1110
  ), t();
1101
1111
  };
1102
- return !h || !_ || !p ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ e(
1103
- Ct,
1112
+ return !r || !_ || !p ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
1113
+ St,
1104
1114
  {
1105
1115
  className: "mx-goals-microwidget",
1106
- ctaLabel: o ? s.get_started : s.view_details,
1107
- onCTAClick: m,
1108
- title: s.title,
1109
- children: o ? /* @__PURE__ */ e(
1116
+ ctaLabel: m ? l.get_started : l.view_details,
1117
+ onCTAClick: o,
1118
+ title: l.title,
1119
+ children: m ? /* @__PURE__ */ e(
1110
1120
  Pt,
1111
1121
  {
1112
- header: s.create_goals_header,
1113
- subText: s.micro_zero_state_description
1122
+ header: l.create_goals_header,
1123
+ subText: l.micro_zero_state_description
1114
1124
  }
1115
- ) : /* @__PURE__ */ e(ft, { sx: { justifyContent: "space-between" }, children: g.map((c, u) => /* @__PURE__ */ r(y.Fragment, { children: [
1116
- /* @__PURE__ */ e(Wt, { goal: c }),
1117
- u !== g.length - 1 && /* @__PURE__ */ e(E, {})
1118
- ] }, c.guid)) })
1125
+ ) : /* @__PURE__ */ e(g, { sx: { justifyContent: "space-between" }, children: h.map((d, c) => /* @__PURE__ */ i(f.Fragment, { children: [
1126
+ /* @__PURE__ */ e(Vt, { goal: d }),
1127
+ c !== h.length - 1 && /* @__PURE__ */ e(E, {})
1128
+ ] }, d.guid)) })
1119
1129
  }
1120
1130
  );
1121
1131
  });
1122
1132
  export {
1123
- Yn as GoalApi,
1124
- Zn as GoalStore,
1133
+ Zn as GoalApi,
1134
+ qn as GoalStore,
1125
1135
  $n as GoalsMicroWidget,
1126
1136
  Hn as GoalsWidget
1127
1137
  };