@mx-cartographer/experiences 7.2.12 → 7.2.13-alpha-ram1-finstrongtesting-wec-965

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 (127) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Account-B-CuHOYf.mjs → Account-CBQnFO6w.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-bqByD9ea.mjs → AccountDetailsContent-BkurfGCr.mjs} +10 -10
  4. package/dist/{AccountDetailsHeader-vcy67tuH.mjs → AccountDetailsHeader-CaIoP_2Q.mjs} +8 -8
  5. package/dist/{AccountFields-cUP-9Hm6.mjs → AccountFields-CLbLAhLf.mjs} +5 -5
  6. package/dist/{AccountListItem-DChcf3SN.mjs → AccountListItem-CPm3572e.mjs} +4 -4
  7. package/dist/{AccountStore-D6KiXA1B.mjs → AccountStore-DttEGFeu.mjs} +40 -29
  8. package/dist/{Accounts-IeEtQjzA.mjs → Accounts-B5Yr0e_o.mjs} +1 -1
  9. package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-wjoNuj7B.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-ZO9N26Kx.mjs} +3 -3
  11. package/dist/{CategoryStore-BCcpI3oJ.mjs → CategoryStore-C1IfDPCE.mjs} +1 -1
  12. package/dist/{CategoryUtil-BR3H5i6n.mjs → CategoryUtil-DUM8NuGO.mjs} +1 -1
  13. package/dist/{ConnectDrawer-DaFRU5st.mjs → ConnectDrawer-FyY0AWYQ.mjs} +2 -2
  14. package/dist/{ConnectionsDrawer-DHJ7qdWL.mjs → ConnectionsDrawer-Cd_rztVC.mjs} +3 -3
  15. package/dist/{CurrencyInput-DUsQbkXb.mjs → CurrencyInput-xH-hqry9.mjs} +1 -1
  16. package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CBdcsyuk.mjs} +3 -3
  17. package/dist/{DebtsStore-z3VARSO6.mjs → DebtsStore-DB5U2WMC.mjs} +1 -1
  18. package/dist/{Dialog-CWW597AF.mjs → Dialog-BPTr3qHE.mjs} +2 -2
  19. package/dist/Donut-oaQFlbit.mjs +86 -0
  20. package/dist/Drawer-BEtCk82g.mjs +163 -0
  21. package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
  22. package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-DlGZfm4y.mjs} +3 -3
  23. package/dist/FinstrongStore-CJBV4K5Y.mjs +432 -0
  24. package/dist/{GoalStore-TD0BfzWX.mjs → GoalStore-deVLYr7n.mjs} +3 -3
  25. package/dist/{Help-B6dIcujh.mjs → Help-BnPXM_N2.mjs} +2 -2
  26. package/dist/{LineChart-D4GI7nVh.mjs → LineChart-Ct9DNmhS.mjs} +209 -181
  27. package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-uobBrm_a.mjs} +10 -10
  28. package/dist/{ManageIncome-CQPFKdYB.mjs → ManageIncome-CqNstpx_.mjs} +63 -61
  29. package/dist/{MicroWidgetContainer-DpeqN9n3.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
  30. package/dist/{MiniWidgetContainer-D0gfmbaF.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
  31. package/dist/{NetWorthStore-B_1oulrt.mjs → NetWorthStore-CUz0bwVm.mjs} +2 -2
  32. package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-BKKuULAd.mjs} +5 -5
  33. package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-CCmnsd7y.mjs} +3 -3
  34. package/dist/{RecurringSettings-DDaGTnfz.mjs → RecurringSettings-DfAMEAuh.mjs} +4 -4
  35. package/dist/{RecurringTransactions-ej39mgA6.mjs → RecurringTransactions-CngsRZ3K.mjs} +45 -44
  36. package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-C4RVULF8.mjs} +1 -1
  37. package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-BuJ03S9d.mjs} +16 -16
  38. package/dist/SpendingLegend-CW8mIzqd.mjs +196 -0
  39. package/dist/{TransactionDetails-DW7T0W0z.mjs → TransactionDetails-CabNHK_I.mjs} +11 -8
  40. package/dist/{TransactionStore-DxPLdF3B.mjs → TransactionStore-DvOEbOzL.mjs} +3 -3
  41. package/dist/{TrendsStore-DCYbpXPO.mjs → TrendsStore-BVNxGsE4.mjs} +14 -14
  42. package/dist/{User-BQUxBeZV.mjs → User-wXzDI4M8.mjs} +2 -2
  43. package/dist/{WidgetContainer-C88Ecu2W.mjs → WidgetContainer-GoNq8wwm.mjs} +4 -4
  44. package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
  45. package/dist/accounts/index.es.js +14 -14
  46. package/dist/accounts/stores/AccountStore.d.ts +2 -0
  47. package/dist/analytics/index.es.js +2 -2
  48. package/dist/budgets/index.es.js +456 -431
  49. package/dist/cashflow/index.es.js +45 -45
  50. package/dist/categories/index.es.js +2 -2
  51. package/dist/common/components/Select.d.ts +4 -2
  52. package/dist/common/components/charts/LineChart.d.ts +8 -2
  53. package/dist/common/components/charts/linechart/CustomMark.d.ts +4 -0
  54. package/dist/common/components/drawer/Drawer.d.ts +3 -0
  55. package/dist/common/components/drawer/Footer.d.ts +17 -0
  56. package/dist/common/index.es.js +35 -35
  57. package/dist/common/types/Finstrong.d.ts +50 -0
  58. package/dist/common/types/index.d.ts +1 -1
  59. package/dist/common/types/localization/FinstrongCopy.d.ts +58 -1
  60. package/dist/dashboard/index.es.js +2 -2
  61. package/dist/debts/index.es.js +11 -11
  62. package/dist/{exportTransactionsToCSV-7bVS7KXf.mjs → exportTransactionsToCSV-hrNpJ77n.mjs} +2 -2
  63. package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
  64. package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
  65. package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
  66. package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
  67. package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
  68. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
  69. package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
  70. package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
  71. package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
  72. package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
  73. package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
  74. package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
  75. package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
  76. package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
  77. package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
  78. package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
  79. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
  80. package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
  81. package/dist/finstrong/components/ProgressBar.d.ts +15 -0
  82. package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
  83. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
  84. package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
  85. package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
  86. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
  87. package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
  88. package/dist/finstrong/components/StatusChip.d.ts +5 -0
  89. package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
  90. package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +11 -0
  91. package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
  92. package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
  93. package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
  94. package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
  95. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
  96. package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
  97. package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
  98. package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
  99. package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
  100. package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
  101. package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
  102. package/dist/finstrong/components/shared/TransactionList.d.ts +15 -0
  103. package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
  104. package/dist/finstrong/constants/index.d.ts +8 -0
  105. package/dist/finstrong/index.es.js +3136 -1062
  106. package/dist/finstrong/stores/FinstrongStore.d.ts +9 -1
  107. package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
  108. package/dist/goals/index.es.js +15 -15
  109. package/dist/help/index.es.js +3 -3
  110. package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
  111. package/dist/investments/index.es.js +6 -6
  112. package/dist/merchants/index.es.js +1 -1
  113. package/dist/networth/index.es.js +35 -35
  114. package/dist/notifications/index.es.js +4 -4
  115. package/dist/recurringtransactions/index.es.js +13 -13
  116. package/dist/settings/index.es.js +8 -8
  117. package/dist/spending/index.es.js +273 -398
  118. package/dist/transactions/index.es.js +174 -201
  119. package/dist/trends/index.es.js +95 -95
  120. package/dist/{useAccountDisplayName-BcRqfar8.mjs → useAccountDisplayName-B5O6hQ1B.mjs} +2 -2
  121. package/dist/useAriaLive-B3_pRUio.mjs +35 -0
  122. package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  123. package/package.json +1 -1
  124. package/dist/Donut-1UMNcG67.mjs +0 -57
  125. package/dist/Drawer-kEE73B87.mjs +0 -113
  126. package/dist/FinstrongStore-F2c607dj.mjs +0 -101
  127. package/dist/finstrong/utils/Finstrong.d.ts +0 -6
@@ -1,280 +1,172 @@
1
- import { jsx as e, jsxs as u, Fragment as re } from "react/jsx-runtime";
2
- import x from "@mui/material/Box";
3
- import g from "@mui/material/Stack";
4
- import { useTheme as G, alpha as te } from "@mui/material/styles";
5
- import { PieChart as Oe } from "@mui/x-charts";
6
- import { ChevronRight as j, Check as De, TrendingUp as Me, ArrowRightAlt as Te, TrendingDown as we, AccountBalance as me, ExpandMore as Re, Payments as Fe, CalendarMonth as Pe, CreditCard as ue, Savings as Ge, ContentCopy as Le, MultilineChart as Ee } from "@mxenabled/mx-icons";
7
- import { Text as W, P as y, H3 as H, Icon as he } from "@mxenabled/mxui";
8
- import { format as _e } from "date-fns/format";
9
- import C from "react";
10
- import We from "@mui/material/Avatar";
11
- import ge from "@mui/material/Divider";
12
- import Be from "@mui/material/List";
13
- import He from "@mui/material/ListItem";
14
- import ze from "@mui/material/ListItemAvatar";
15
- import $e from "@mui/material/ListItemButton";
16
- import Ne from "@mui/material/ListItemText";
17
- import { b } from "../Localization-2MODESHW.mjs";
18
- import * as ce from "d3";
19
- import { observer as I } from "mobx-react-lite";
20
- import { u as S, b as z, x as $, p as Y, d as fe, i as ye, m as Ke } from "../hooks-D6XlXHf4.mjs";
21
- import { L as N } from "../Loader-DUaFpDGv.mjs";
22
- import { F as No, a as Ko } from "../FinstrongStore-F2c607dj.mjs";
23
- import q from "@mui/material/Button";
24
- import J from "@mui/material/Card";
25
- import { L as be } from "../LineChart-D4GI7nVh.mjs";
26
- import { l as xe } from "../ConnectDrawer-DaFRU5st.mjs";
27
- import Xe from "@mui/material/Accordion";
28
- import je from "@mui/material/AccordionDetails";
29
- import Ue from "@mui/material/AccordionSummary";
30
- import Ve from "@mui/material/CardHeader";
31
- import { u as Ye } from "../useDimensions-27p2evRx.mjs";
32
- import { C as qe } from "../ConnectionsDrawer-DHJ7qdWL.mjs";
33
- import { R as Je } from "../RecurringSettings-DDaGTnfz.mjs";
34
- import Qe from "@mui/material/TextField";
35
- import { u as Ce } from "../useScreenSize-B6JyS_Lj.mjs";
36
- import { a as Ze } from "../Dialog-CWW597AF.mjs";
37
- import { AdapterDateFns as et } from "@mui/x-date-pickers/AdapterDateFnsV3";
38
- import { StaticDatePicker as tt } from "@mui/x-date-pickers";
39
- import { LocalizationProvider as ot } from "@mui/x-date-pickers/LocalizationProvider";
40
- import { D as V } from "../Drawer-kEE73B87.mjs";
41
- import oe from "@mui/material/Tab";
42
- import nt from "@mui/material/Tabs";
43
- import { f as rt } from "../NumberFormatting-Buh7u8Oi.mjs";
44
- import { T as ne } from "../TabContentContainer-j01JYR_7.mjs";
45
- import it from "@mui/lab/Timeline";
46
- import st, { timelineItemClasses as at } from "@mui/lab/TimelineItem";
47
- import ct from "@mui/lab/TimelineConnector";
48
- import lt from "@mui/lab/TimelineContent";
49
- import dt from "@mui/lab/TimelineDot";
50
- import pt from "@mui/lab/TimelineSeparator";
51
- import { W as mt } from "../WidgetContainer-C88Ecu2W.mjs";
52
- var A = /* @__PURE__ */ ((n) => (n.Connections = "connections", n.CreditScore = "credit_score", n.DateOfBirth = "date_of_birth", n.MonthlyIncome = "monthly_income", n))(A || {});
53
- const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(
54
- Be,
55
- {
56
- sx: {
57
- "& .MuiListItemSecondaryAction-root": {
58
- color: "text.primary",
59
- pr: 24
60
- }
61
- },
62
- children: n.map((t, i) => /* @__PURE__ */ u(C.Fragment, { children: [
63
- /* @__PURE__ */ e(He, { secondaryAction: /* @__PURE__ */ e(j, {}), children: /* @__PURE__ */ u($e, { onClick: () => o(t.key), children: [
64
- /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(
65
- We,
66
- {
67
- sx: {
68
- bgcolor: "primary.main",
69
- ...!t.isComplete && {
70
- bgcolor: "transparent",
71
- borderColor: "action.active",
72
- borderStyle: "solid",
73
- borderWidth: 1,
74
- color: "action.active"
75
- }
76
- },
77
- children: t.icon
78
- }
79
- ) }),
80
- /* @__PURE__ */ e(
81
- Ne,
82
- {
83
- primary: /* @__PURE__ */ e(W, { sx: { color: "text.secondary" }, variant: "caption", children: t.primaryText }),
84
- secondary: /* @__PURE__ */ e(W, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: t.secondaryText })
85
- }
86
- )
87
- ] }) }),
88
- i < n.length - 1 && /* @__PURE__ */ e(ge, { sx: { color: "divider", ml: 68 } })
89
- ] }, t.key))
90
- }
91
- ) }), ht = ut, le = (n) => n * (180 / Math.PI), ie = (n, o) => [
92
- {
93
- description: o.vulnerable_description,
94
- max: 25,
95
- scoreContent: o.accordion_details_text.vulnerable,
96
- status: o.vulnerable
97
- },
98
- {
99
- description: o.building_description,
100
- max: 50,
101
- scoreContent: o.accordion_details_text.building,
102
- status: o.building
103
- },
104
- {
105
- description: o.stable_description,
106
- max: 75,
107
- scoreContent: o.accordion_details_text.stable,
108
- status: o.stable
109
- },
110
- {
111
- description: o.strong_description,
112
- max: 100,
113
- scoreContent: o.accordion_details_text.strong,
114
- status: o.strong
115
- }
116
- ].find((d) => n > 0 && n <= d.max) || { status: o.insufficient_data, description: "", scoreContent: "" }, D = {
117
- POOR: "#8C0E0E",
118
- FAIR: "#E32727",
119
- GOOD: "#FFB70D",
120
- VERY_GOOD: "#0EA26C",
121
- EXCEPTIONAL: "#005C3D"
122
- }, M = {
123
- POOR: "#B21C1C",
124
- FAIR: "#FF3232",
125
- GOOD: "#FFC02C",
126
- VERY_GOOD: "#29C76B",
127
- EXCEPTIONAL: "#008A5A"
128
- }, _t = (n, o, t) => n >= 300 && n < 580 ? {
129
- status: t.poor,
130
- color: o ? M.POOR : D.POOR
131
- } : n >= 580 && n < 670 ? {
132
- status: t.fair,
133
- color: o ? M.FAIR : D.FAIR
134
- } : n >= 670 && n < 740 ? {
135
- status: t.good,
136
- color: o ? M.GOOD : D.GOOD
137
- } : n >= 740 && n < 800 ? {
138
- status: t.very_good,
139
- color: o ? M.VERY_GOOD : D.VERY_GOOD
140
- } : n >= 800 && n <= 850 ? {
141
- status: t.exceptional,
142
- color: o ? M.EXCEPTIONAL : D.EXCEPTIONAL
143
- } : { status: t.missing_data }, gt = (n, o, t, i) => {
144
- const d = n.reduce((r, a) => r + a.value, 0);
145
- let l = 0;
146
- const s = n.map((r) => {
147
- const a = r.value / d * o, c = t + l, p = c + a;
148
- return l += a, {
149
- ...r,
150
- startAngle: c,
151
- endAngle: p
152
- };
153
- });
154
- return [s[i].startAngle, s[i].endAngle];
155
- }, ft = (n, o, t, i, d) => {
156
- let l = 0, s = 0;
157
- const r = Math.floor(i), a = i - r;
158
- return r > t ? (l = n, s = o) : r === t && a > 0 && (l = n, s = d), [l, s];
159
- }, yt = (n, o, t = 0) => {
160
- const i = n * Math.sin(o - t), d = -n * Math.cos(o - t);
161
- return [i, d];
162
- }, bt = ({
163
- dynamicCopy: n,
164
- fallbackLabel: o,
165
- icon: t,
166
- key: i,
167
- label: d,
168
- value: l
169
- }) => {
170
- const s = !!l, r = s ? xt(i, l) : n && b(n, o) || o;
171
- return {
172
- icon: s ? /* @__PURE__ */ e(De, {}) : t,
173
- isComplete: s,
174
- key: i,
175
- primaryText: d,
176
- secondaryText: r
177
- };
178
- }, xt = (n, o) => ({
179
- [A.DateOfBirth]: (i) => _e(new Date(Number(i) * 1e3), "MMM d, yyyy"),
180
- [A.MonthlyIncome]: (i) => `$${i}`
181
- })[n]?.(o) ?? String(o), de = (n) => n !== null ? Math.round(n * 100) : null, Ct = ({
182
- dialScoreData: n,
1
+ import { jsxs as a, Fragment as z, jsx as e } from "react/jsx-runtime";
2
+ import C from "@mui/material/Box";
3
+ import u from "@mui/material/Stack";
4
+ import { useTheme as E, alpha as _e } from "@mui/material/styles";
5
+ import { PieChart as Vt, BarPlot as Yt } from "@mui/x-charts";
6
+ import { TrendingUp as dt, ArrowRightAlt as Xt, TrendingDown as Ut, AccountBalance as pt, ChevronRight as Z, MultilineChart as ut, CreditCard as Ee, CheckCircle as qt, Cancel as Zt, Savings as Qt, ContentCopy as Jt, Add as _t, Cardiology as en, Payments as tn, CalendarMonth as nn, ExpandMore as on } from "@mxenabled/mx-icons";
7
+ import { P as M, H3 as K, Text as A, InstitutionLogo as ht, H2 as Ie, MerchantLogo as rn, Icon as an } from "@mxenabled/mxui";
8
+ import { g as sn, a as cn, r as Qe, b as ln, c as Ge, d as mt, C as be, e as fe, f as dn, h as pn, i as un, j as gt, k as Je, l as _n, m as et, n as hn, o as yt, p as mn, q as bt, s as ke, t as gn, u as yn, v as bn, w as fn, A as ee, x as xn, P as Sn } from "../FinstrongStore-CJBV4K5Y.mjs";
9
+ import { y as yi, F as bi } from "../FinstrongStore-CJBV4K5Y.mjs";
10
+ import * as tt from "d3";
11
+ import { observer as S } from "mobx-react-lite";
12
+ import { u as v, b as V, p as Q, z as R, q as Cn, a as ft, d as Se, m as He, g as vn, f as wn, j as kn, h as Mn, i as xt } from "../hooks-C41HAxM5.mjs";
13
+ import { L as J } from "../Loader-DUaFpDGv.mjs";
14
+ import h from "react";
15
+ import $ from "@mui/material/Button";
16
+ import j from "@mui/material/Card";
17
+ import { L as Ne } from "../LineChart-Ct9DNmhS.mjs";
18
+ import { C as St } from "../ConnectionsDrawer-Cd_rztVC.mjs";
19
+ import { l as oe, g as Ct, A as We } from "../ConnectDrawer-FyY0AWYQ.mjs";
20
+ import ae from "@mui/material/Tab";
21
+ import Ke from "@mui/material/Tabs";
22
+ import Me from "@mui/material/TextField";
23
+ import { u as je } from "../useScreenSize-B6JyS_Lj.mjs";
24
+ import { D as Dn, f as An, a as In } from "../Dialog-BPTr3qHE.mjs";
25
+ import { u as vt } from "../useDimensions-27p2evRx.mjs";
26
+ import Tn from "@mui/material/Chip";
27
+ import { D as te } from "../Drawer-BEtCk82g.mjs";
28
+ import ne from "@mui/material/Divider";
29
+ import pe from "@mui/material/ListItem";
30
+ import wt from "@mui/material/ListItemAvatar";
31
+ import ue from "@mui/material/ListItemText";
32
+ import { g as kt } from "../AccountFields-CLbLAhLf.mjs";
33
+ import De from "@mui/material/List";
34
+ import On from "@mui/material/ListItemButton";
35
+ import Rn from "@mui/material/ListSubheader";
36
+ import { f as B } from "../NumberFormatting-Buh7u8Oi.mjs";
37
+ import { S as nt, F as Fn } from "../RecurringTransactions-CngsRZ3K.mjs";
38
+ import { Button as Pn } from "@mui/material";
39
+ import { S as Bn } from "../StatusBar-BK_uYHAB.mjs";
40
+ import { h as Ve } from "../DateUtil-CBdcsyuk.mjs";
41
+ import { useVirtualizer as Ln } from "@tanstack/react-virtual";
42
+ import { u as $n, s as ze, h as Mt, S as Dt, b as At, Z as Wn } from "../TransactionDetails-CabNHK_I.mjs";
43
+ import { A as zn, W as En } from "../WidgetContainer-GoNq8wwm.mjs";
44
+ import { T as ie } from "../TabContentContainer-j01JYR_7.mjs";
45
+ import { b as X } from "../Localization-2MODESHW.mjs";
46
+ import { E as Ae } from "../EmptyState-DoxNUae-.mjs";
47
+ import Gn from "@mui/material/useMediaQuery";
48
+ import { ChartsXAxis as Hn } from "@mui/x-charts/ChartsXAxis";
49
+ import { ChartsYAxis as Nn } from "@mui/x-charts/ChartsYAxis";
50
+ import { ResponsiveChartContainer as Kn } from "@mui/x-charts/ResponsiveChartContainer";
51
+ import { useSpring as jn, animated as ot } from "@react-spring/web";
52
+ import { startOfMonth as It } from "date-fns/startOfMonth";
53
+ import { endOfMonth as Tt } from "date-fns/endOfMonth";
54
+ import { g as Vn, S as Yn, b as Xn } from "../SpendingLegend-CW8mIzqd.mjs";
55
+ import { startOfToday as rt } from "date-fns/startOfToday";
56
+ import { subDays as Un } from "date-fns/subDays";
57
+ import { c as qn, d as at, S as Zn, i as Qn } from "../ManageIncome-CqNstpx_.mjs";
58
+ import { LocalizationProvider as Jn, DatePicker as eo, StaticDatePicker as to } from "@mui/x-date-pickers";
59
+ import { AdapterDateFns as Ot } from "@mui/x-date-pickers/AdapterDateFnsV3";
60
+ import { R as no } from "../RecurringSettings-DfAMEAuh.mjs";
61
+ import { LocalizationProvider as oo } from "@mui/x-date-pickers/LocalizationProvider";
62
+ import { format as ro } from "date-fns/format";
63
+ import ao from "@mui/lab/Timeline";
64
+ import io, { timelineItemClasses as so } from "@mui/lab/TimelineItem";
65
+ import co from "@mui/lab/TimelineConnector";
66
+ import lo from "@mui/lab/TimelineContent";
67
+ import po from "@mui/lab/TimelineDot";
68
+ import uo from "@mui/lab/TimelineSeparator";
69
+ import _o from "@mui/material/Accordion";
70
+ import ho from "@mui/material/AccordionDetails";
71
+ import mo from "@mui/material/AccordionSummary";
72
+ import go from "@mui/material/CardHeader";
73
+ const yo = ({
74
+ dialScoreData: t,
183
75
  dataIndex: o,
184
- arcColor: t,
185
- arcStartAngle: i,
186
- totalAngularSpan: d,
187
- centerX: l,
188
- centerY: s,
189
- arcRadius: r,
190
- innerArcRadius: a,
191
- outterArcRadius: c,
192
- progressEndAngle: p,
193
- unitsPerSegment: h,
194
- isFinacialStrengthGraph: m
76
+ arcColor: n,
77
+ arcStartAngle: r,
78
+ totalAngularSpan: c,
79
+ centerX: s,
80
+ centerY: i,
81
+ arcRadius: d,
82
+ innerArcRadius: l,
83
+ outterArcRadius: p,
84
+ progressEndAngle: _,
85
+ unitsPerSegment: m,
86
+ isFinacialStrengthGraph: g
195
87
  }) => {
196
- const _ = G(), R = [
197
- { offset: "13.62%", color: _.palette.chartMono.chartMono2 },
198
- { offset: "36.67%", color: _.palette.chartMono.chartMono3 },
199
- { offset: "59.72%", color: _.palette.chartMono.chartMono4 },
200
- { offset: "83.46%", color: _.palette.chartMono.chartMono5 }
201
- ], [T, v] = gt(
202
- n,
203
- d,
204
- i,
88
+ const b = E(), w = [
89
+ { offset: "13.62%", color: b.palette.chartMono.chartMono2 },
90
+ { offset: "36.67%", color: b.palette.chartMono.chartMono3 },
91
+ { offset: "59.72%", color: b.palette.chartMono.chartMono4 },
92
+ { offset: "83.46%", color: b.palette.chartMono.chartMono5 }
93
+ ], [f, x] = sn(
94
+ t,
95
+ c,
96
+ r,
205
97
  o
206
- ), [L, E] = ft(
207
- T,
208
- v,
98
+ ), [y, k] = cn(
99
+ f,
100
+ x,
209
101
  o,
210
- h,
211
- p
212
- ), K = ce.arc().innerRadius(a).outerRadius(c).startAngle(T).endAngle(v).padAngle(0.02).cornerRadius(8), F = ce.arc().innerRadius(a).outerRadius(c).startAngle(L).endAngle(E).padAngle(0.02).cornerRadius(8);
213
- return /* @__PURE__ */ u(re, { children: [
102
+ m,
103
+ _
104
+ ), D = tt.arc().innerRadius(l).outerRadius(p).startAngle(f).endAngle(x).padAngle(0.02).cornerRadius(8), I = tt.arc().innerRadius(l).outerRadius(p).startAngle(y).endAngle(k).padAngle(0.02).cornerRadius(8);
105
+ return /* @__PURE__ */ a(z, { children: [
214
106
  /* @__PURE__ */ e(
215
107
  "path",
216
108
  {
217
- d: K({}),
218
- fill: m ? _.palette.divider : t
109
+ d: D({}),
110
+ fill: g ? b.palette.divider : n
219
111
  }
220
112
  ),
221
- m && /* @__PURE__ */ e("path", { d: F({}), fill: "url(#arcGradient)" }),
113
+ g && /* @__PURE__ */ e("path", { d: I({}), fill: "url(#arcGradient)" }),
222
114
  /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
223
115
  "linearGradient",
224
116
  {
225
- gradientTransform: `rotate(5, ${l}, ${s})`,
117
+ gradientTransform: `rotate(5, ${s}, ${i})`,
226
118
  gradientUnits: "userSpaceOnUse",
227
119
  id: "arcGradient",
228
- x1: l + r * 0.8 * Math.cos(Math.PI / 1.35),
229
- x2: l - r * 0.8 * Math.cos(Math.PI / 1.35),
230
- y1: s + r * 0.8 * Math.sin(Math.PI / 1.35),
231
- y2: s - r * 0.8 * Math.sin(Math.PI / 1.35),
232
- children: R.map((w, O) => /* @__PURE__ */ e("stop", { offset: w.offset, stopColor: w.color }, O))
120
+ x1: s + d * 0.8 * Math.cos(Math.PI / 1.35),
121
+ x2: s - d * 0.8 * Math.cos(Math.PI / 1.35),
122
+ y1: i + d * 0.8 * Math.sin(Math.PI / 1.35),
123
+ y2: i - d * 0.8 * Math.sin(Math.PI / 1.35),
124
+ children: w.map((N, G) => /* @__PURE__ */ e("stop", { offset: N.offset, stopColor: N.color }, G))
233
125
  }
234
126
  ) })
235
127
  ] });
236
- }, Se = ({
237
- arcRadius: n = 100,
128
+ }, Rt = ({
129
+ arcRadius: t = 100,
238
130
  healthScore: o,
239
- size: t = "L",
240
- dialScoreData: i,
241
- minValue: d = 0,
242
- maxValue: l = 100,
243
- markerColor: s,
244
- healthScoreStatus: r,
245
- footerCenterContent: a,
246
- footerLeftContent: c,
247
- footerRightContent: p,
248
- isFinacialStrengthGraph: h = !1
131
+ size: n = "L",
132
+ dialScoreData: r,
133
+ minValue: c = 0,
134
+ maxValue: s = 100,
135
+ markerColor: i,
136
+ healthScoreStatus: d,
137
+ footerCenterContent: l,
138
+ footerLeftContent: p,
139
+ footerRightContent: _,
140
+ isFinacialStrengthGraph: m = !1
249
141
  }) => {
250
- const m = G(), _ = -Math.PI / 1.35, R = Math.PI / 1.35, T = R - _, v = T / (l - d), L = (o - d) * v, E = _ + L + 0.02, K = t !== "SM" ? 0.1 : 0.12, F = n, w = n * (1 - K), O = F * 2.5, k = O / 2, P = O / 2, U = (w + F) / 2, Z = o !== 25 && o !== 50 && o !== 75 && o !== 100 ? 0 : 0.12, [ee, ke] = yt(U, E, Z), Ae = o / 25, se = {
142
+ const g = E(), b = -Math.PI / 1.35, w = Math.PI / 1.35, f = w - b, x = f / (s - c), y = (o - c) * x, k = b + y + 0.02, D = n !== "SM" ? 0.1 : 0.12, I = t, N = t * (1 - D), G = I * 2.5, H = G / 2, W = G / 2, ce = (N + I) / 2, Y = o !== 25 && o !== 50 && o !== 75 && o !== 100 ? 0 : 0.12, [re, le] = ln(ce, k, Y), ge = o / 25, U = {
251
143
  L: { markerSize: 12, healthScoreFontSize: 64 },
252
144
  M: { markerSize: 10, healthScoreFontSize: 48 },
253
145
  SM: { markerSize: 3, healthScoreFontSize: 14 }
254
- }, Ie = a === 0 ? Te : we;
255
- return /* @__PURE__ */ u(
256
- g,
146
+ }, Pe = l === 0 ? Xt : Ut;
147
+ return /* @__PURE__ */ a(
148
+ u,
257
149
  {
258
150
  sx: {
259
- width: O,
260
- height: O,
151
+ width: G,
152
+ height: G,
261
153
  position: "relative",
262
154
  alignSelf: "center"
263
155
  },
264
156
  children: [
265
157
  /* @__PURE__ */ e(
266
- Oe,
158
+ Vt,
267
159
  {
268
- height: O,
160
+ height: G,
269
161
  margin: { top: 0, right: 0, bottom: 0, left: 0 },
270
162
  series: [
271
163
  {
272
- data: i,
273
- innerRadius: w,
274
- outerRadius: F,
275
- startAngle: Math.round(le(_)),
164
+ data: r,
165
+ innerRadius: N,
166
+ outerRadius: I,
167
+ startAngle: Math.round(Qe(b)),
276
168
  // Use Math.degrees to convert
277
- endAngle: Math.round(le(R))
169
+ endAngle: Math.round(Qe(w))
278
170
  // Use Math.degrees to convert
279
171
  }
280
172
  ],
@@ -283,22 +175,22 @@ const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor
283
175
  legend: { hidden: !0 }
284
176
  },
285
177
  slots: {
286
- pieArc: (ae) => /* @__PURE__ */ e(
287
- Ct,
178
+ pieArc: (Ce) => /* @__PURE__ */ e(
179
+ yo,
288
180
  {
289
- arcColor: ae.color,
290
- arcRadius: n,
291
- arcStartAngle: _,
292
- centerX: k,
293
- centerY: P,
294
- dataIndex: ae.dataIndex,
295
- dialScoreData: i,
296
- innerArcRadius: w,
297
- isFinacialStrengthGraph: h,
298
- outterArcRadius: F,
299
- progressEndAngle: E,
300
- totalAngularSpan: T,
301
- unitsPerSegment: Ae
181
+ arcColor: Ce.color,
182
+ arcRadius: t,
183
+ arcStartAngle: b,
184
+ centerX: H,
185
+ centerY: W,
186
+ dataIndex: Ce.dataIndex,
187
+ dialScoreData: r,
188
+ innerArcRadius: N,
189
+ isFinacialStrengthGraph: m,
190
+ outterArcRadius: I,
191
+ progressEndAngle: k,
192
+ totalAngularSpan: f,
193
+ unitsPerSegment: ge
302
194
  }
303
195
  )
304
196
  },
@@ -307,923 +199,2885 @@ const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor
307
199
  stroke: "none"
308
200
  }
309
201
  },
310
- width: O,
311
- children: o >= d && o <= l && /* @__PURE__ */ e(
202
+ width: G,
203
+ children: o >= c && o <= s && /* @__PURE__ */ e(
312
204
  "circle",
313
205
  {
314
- cx: k + ee,
315
- cy: P + ke,
316
- fill: m.palette.common.white,
317
- r: se[t].markerSize,
318
- stroke: h ? "url(#arcGradient)" : s,
319
- strokeWidth: t !== "SM" ? 3 : 1
206
+ cx: H + re,
207
+ cy: W + le,
208
+ fill: g.palette.common.white,
209
+ r: U[n].markerSize,
210
+ stroke: m ? "url(#arcGradient)" : i,
211
+ strokeWidth: n !== "SM" ? 3 : 1
320
212
  }
321
213
  )
322
214
  }
323
215
  ),
324
216
  /* @__PURE__ */ e(
325
- x,
217
+ C,
326
218
  {
327
219
  sx: {
328
220
  position: "absolute",
329
- top: `${P}px`,
330
- left: `${k}px`,
221
+ top: `${W}px`,
222
+ left: `${H}px`,
331
223
  transform: "translate(-50%, -50%)",
332
224
  textAlign: "center"
333
225
  },
334
- children: /* @__PURE__ */ u(
335
- g,
226
+ children: /* @__PURE__ */ a(
227
+ u,
336
228
  {
337
229
  spacing: 1,
338
- sx: { alignItems: "center", justifyContent: "center", gap: t !== "M" ? 10 : 3 },
230
+ sx: { alignItems: "center", justifyContent: "center", gap: n !== "M" ? 10 : 3 },
339
231
  children: [
340
232
  /* @__PURE__ */ e(
341
- y,
233
+ M,
342
234
  {
343
235
  sx: {
344
- fontSize: se[t].healthScoreFontSize,
345
- lineHeight: t !== "SM" ? "48px" : "100%"
236
+ fontSize: U[n].healthScoreFontSize,
237
+ lineHeight: n !== "SM" ? "48px" : "100%"
346
238
  },
347
239
  variant: "H1",
348
240
  children: o
349
241
  }
350
242
  ),
351
- t !== "SM" && /* @__PURE__ */ e(y, { sx: { fontWeight: 600 }, variant: t === "L" ? "body1" : "body2", children: r })
243
+ n !== "SM" && /* @__PURE__ */ e(M, { sx: { fontWeight: 600 }, variant: n === "L" ? "body1" : "body2", children: d })
352
244
  ]
353
245
  }
354
246
  )
355
247
  }
356
248
  ),
357
- a !== void 0 && /* @__PURE__ */ e(
358
- x,
249
+ l !== void 0 && /* @__PURE__ */ e(
250
+ C,
359
251
  {
360
252
  sx: {
361
253
  position: "absolute",
362
- top: `${P * 2 * 0.83}px`,
363
- left: `${k}px`,
254
+ top: `${W * 2 * 0.83}px`,
255
+ left: `${H}px`,
364
256
  transform: "translate(-50%, -50%)",
365
257
  textAlign: "center"
366
258
  },
367
- children: typeof a == "number" ? /* @__PURE__ */ u(g, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
368
- a > 0 ? /* @__PURE__ */ e(Me, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(Ie, { size: 16, sx: { color: "text.secondary" } }),
259
+ children: typeof l == "number" ? /* @__PURE__ */ a(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
260
+ l > 0 ? /* @__PURE__ */ e(dt, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(Pe, { size: 16, sx: { color: "text.secondary" } }),
369
261
  /* @__PURE__ */ e(
370
- y,
262
+ M,
371
263
  {
372
264
  sx: {
373
265
  fontWeight: 600,
374
- color: a > 0 ? "success.main" : "text.secondary"
266
+ color: l > 0 ? "success.main" : "text.secondary"
375
267
  },
376
268
  variant: "body1",
377
- children: a
269
+ children: l
378
270
  }
379
271
  )
380
- ] }) : /* @__PURE__ */ e(y, { sx: { color: "text.secondary" }, variant: "subtitle2", children: a })
272
+ ] }) : /* @__PURE__ */ e(M, { sx: { color: "text.secondary" }, variant: "subtitle2", children: l })
381
273
  }
382
274
  ),
383
- c !== void 0 && /* @__PURE__ */ e(
384
- x,
275
+ p !== void 0 && /* @__PURE__ */ e(
276
+ C,
385
277
  {
386
278
  sx: {
387
279
  position: "absolute",
388
- top: `${P * 2 * 0.83}px`,
389
- left: `${k - k / 2}px`,
280
+ top: `${W * 2 * 0.83}px`,
281
+ left: `${H - H / 2}px`,
390
282
  // shift left from center
391
283
  transform: "translate(-50%, -50%)",
392
284
  textAlign: "left"
393
285
  },
394
- children: /* @__PURE__ */ e(y, { variant: "body1", children: c })
286
+ children: /* @__PURE__ */ e(M, { variant: "body1", children: p })
395
287
  }
396
288
  ),
397
- p !== void 0 && /* @__PURE__ */ e(
398
- x,
289
+ _ !== void 0 && /* @__PURE__ */ e(
290
+ C,
399
291
  {
400
292
  sx: {
401
293
  position: "absolute",
402
- top: `${P * 2 * 0.83}px`,
403
- left: `${k + k / 2}px`,
294
+ top: `${W * 2 * 0.83}px`,
295
+ left: `${H + H / 2}px`,
404
296
  transform: "translate(-50%, -50%)",
405
297
  textAlign: "right"
406
298
  },
407
- children: /* @__PURE__ */ e(y, { variant: "body1", children: p })
299
+ children: /* @__PURE__ */ e(M, { variant: "body1", children: _ })
408
300
  }
409
301
  )
410
302
  ]
411
303
  }
412
304
  );
413
- }, ve = I(
414
- ({ arcRadius: n, size: o = "L", healthScore: t, footerCenterContent: i }) => {
415
- const d = [
305
+ }, Ft = S(
306
+ ({ arcRadius: t, size: o = "L", healthScore: n, footerCenterContent: r }) => {
307
+ const c = [
416
308
  { id: 1, label: "Group A", value: 25 },
417
309
  { id: 2, label: "Group B", value: 25 },
418
310
  { id: 3, label: "Group C", value: 25 },
419
311
  { id: 4, label: "Group D", value: 25 }
420
- ], { finstrong: l } = S(), s = ie(t, l);
312
+ ], { finstrong: s } = v(), i = Ge(n, s);
421
313
  return /* @__PURE__ */ e(
422
- Se,
314
+ Rt,
423
315
  {
424
- arcRadius: n,
425
- dialScoreData: d,
426
- footerCenterContent: o === "L" ? l.footer_center_content_updated_just_now : i,
427
- healthScore: t,
428
- healthScoreStatus: s.status,
316
+ arcRadius: t,
317
+ dialScoreData: c,
318
+ footerCenterContent: o === "L" ? s.footer_center_content_updated_just_now : r,
319
+ healthScore: n,
320
+ healthScoreStatus: i.status,
429
321
  isFinacialStrengthGraph: !0,
430
322
  size: o
431
323
  }
432
324
  );
433
325
  }
434
- ), Bo = I(
326
+ ), bo = S(
435
327
  ({
436
- arcRadius: n,
328
+ arcRadius: t,
437
329
  size: o = "L",
438
- healthScore: t,
439
- maxValue: i = 850,
440
- minValue: d = 300,
441
- footerCenterContent: l
330
+ healthScore: n,
331
+ maxValue: r = 850,
332
+ minValue: c = 300,
333
+ footerCenterContent: s
442
334
  }) => {
443
- const r = G().palette.mode === "dark", a = [
335
+ const d = E().palette.mode === "dark", l = [
444
336
  {
445
337
  id: 1,
446
338
  label: "Poor",
447
- value: 279,
448
- color: r ? M.POOR : D.POOR
339
+ value: 29,
340
+ color: d ? be.POOR : fe.POOR
449
341
  },
450
342
  {
451
343
  id: 2,
452
344
  label: "Fair",
453
- value: 89,
454
- color: r ? M.FAIR : D.FAIR
345
+ value: 25,
346
+ color: d ? be.FAIR : fe.FAIR
455
347
  },
456
348
  {
457
349
  id: 3,
458
350
  label: "Good",
459
- value: 69,
460
- color: r ? M.GOOD : D.GOOD
351
+ value: 17,
352
+ color: d ? be.GOOD : fe.GOOD
461
353
  },
462
354
  {
463
355
  id: 4,
464
356
  label: "Very Good",
465
- value: 59,
466
- color: r ? M.VERY_GOOD : D.VERY_GOOD
357
+ value: 17,
358
+ color: d ? be.VERY_GOOD : fe.VERY_GOOD
467
359
  },
468
360
  {
469
361
  id: 5,
470
362
  label: "Exceptional",
471
- value: 50,
472
- color: r ? M.EXCEPTIONAL : D.EXCEPTIONAL
363
+ value: 12,
364
+ color: d ? be.EXCEPTIONAL : fe.EXCEPTIONAL
473
365
  }
474
- ], { finstrong: c } = S(), { isCopyLoaded: p } = z();
475
- if (!p) return /* @__PURE__ */ e(N, {});
476
- const { status: h, color: m = "none" } = _t(
477
- t,
478
- r,
479
- c.credit_score_status
366
+ ], { finstrong: p } = v(), { isCopyLoaded: _ } = V();
367
+ if (!_) return /* @__PURE__ */ e(J, {});
368
+ const { status: m, color: g = "none" } = mt(
369
+ n,
370
+ d,
371
+ p.credit_score_status
480
372
  );
481
373
  return /* @__PURE__ */ e(
482
- Se,
374
+ Rt,
483
375
  {
484
- arcRadius: n,
485
- dialScoreData: a,
486
- footerCenterContent: l,
487
- footerLeftContent: d,
488
- footerRightContent: i,
489
- healthScore: t,
490
- healthScoreStatus: h,
491
- markerColor: m,
492
- maxValue: i,
493
- minValue: d,
376
+ arcRadius: t,
377
+ dialScoreData: l,
378
+ footerCenterContent: s,
379
+ footerLeftContent: c,
380
+ footerRightContent: r,
381
+ healthScore: n,
382
+ healthScoreStatus: m,
383
+ markerColor: g,
384
+ maxValue: r,
385
+ minValue: c,
494
386
  size: o
495
387
  }
496
388
  );
497
389
  }
498
- ), Q = ({
499
- isDashboard: n = !1,
500
- hasIcon: o = !0,
501
- buttonText: t,
502
- title: i,
503
- description: d,
504
- sx: l
390
+ ), Te = ({
391
+ drawerType: t,
392
+ isDashboard: o = !1,
393
+ hasIcon: n = !0,
394
+ buttonText: r,
395
+ title: c,
396
+ titleDrawer: s,
397
+ description: i,
398
+ sx: d
505
399
  }) => {
506
- const [s, r] = C.useState(!1), { connect: a, finstrong: c } = S();
507
- return /* @__PURE__ */ u(
508
- J,
400
+ const [l, p] = h.useState(!1), { connect: _, finstrong: m } = v();
401
+ return t ? /* @__PURE__ */ a(
402
+ j,
509
403
  {
510
404
  sx: {
511
405
  pb: 24,
512
406
  pt: 18,
513
407
  px: 24,
514
408
  width: "100%",
515
- ...l
409
+ ...d
516
410
  },
517
411
  children: [
518
- /* @__PURE__ */ u(
519
- g,
412
+ /* @__PURE__ */ a(
413
+ u,
520
414
  {
521
415
  sx: {
522
416
  gap: 8,
523
- ...n && { flexDirection: "row", alignItems: "center" }
417
+ ...o && { flexDirection: "row", alignItems: "center" }
524
418
  },
525
419
  children: [
526
- o && /* @__PURE__ */ e(me, { sx: { height: 20, width: 20 } }),
527
- /* @__PURE__ */ e(H, { className: "connect-more-accounts-title", sx: { ...n && { fontSize: 15 } }, children: i || c.connect_more_accounts_title })
420
+ n && /* @__PURE__ */ e(pt, { sx: { height: 20, width: 20 } }),
421
+ /* @__PURE__ */ e(K, { className: "connect-more-accounts-title", sx: { ...o && { fontSize: 15 } }, children: c || m.connect_more_accounts_title })
528
422
  ]
529
423
  }
530
424
  ),
531
425
  /* @__PURE__ */ e(
532
- y,
426
+ M,
533
427
  {
534
428
  className: "connect-more-accounts-description",
535
429
  sx: { color: "text.secondary", mt: 8 },
536
430
  variant: "subtitle1",
537
- children: d || c.connect_more_accounts_description
431
+ children: i || m.connect_more_accounts_description
538
432
  }
539
433
  ),
540
434
  /* @__PURE__ */ e(
541
- q,
435
+ $,
542
436
  {
543
- endIcon: /* @__PURE__ */ e(j, {}),
544
- onClick: () => r(!0),
437
+ endIcon: /* @__PURE__ */ e(Z, {}),
438
+ onClick: () => p(!0),
545
439
  size: "small",
546
440
  sx: { p: 0, mt: 8, "&:hover": { backgroundColor: "transparent" } },
547
- children: /* @__PURE__ */ e(W, { sx: { fontWeight: 600 }, variant: "body2", children: t || c.connect_more_accounts_button })
441
+ children: /* @__PURE__ */ e(A, { sx: { fontWeight: 600 }, variant: "body2", children: r || m.connect_more_accounts_button })
548
442
  }
549
443
  ),
550
- /* @__PURE__ */ e(
551
- xe,
444
+ t === "connectDrawer" && /* @__PURE__ */ e(
445
+ oe,
446
+ {
447
+ onClose: () => p(!1),
448
+ showConnectWidget: l,
449
+ title: s || _.mini_title
450
+ }
451
+ ),
452
+ t === "connectionsDrawer" && /* @__PURE__ */ e(
453
+ St,
552
454
  {
553
- onClose: () => r(!1),
554
- showConnectWidget: s,
555
- title: a.mini_title
455
+ onClose: () => p(!1),
456
+ showConnectionsWidget: l,
457
+ title: s || _.mini_title
556
458
  }
557
459
  )
558
460
  ]
559
461
  }
560
- );
561
- }, St = I(() => {
562
- const n = G(), [o, { width: t }] = Ye(), { finstrong: i } = S(), { isCopyLoaded: d, isInitialized: l } = z(), { healthScore: s, healthScoreChange: r } = $(), a = n.palette.mode === "dark", c = ie(s?.health_score, i);
563
- return !d || !l ? /* @__PURE__ */ e(N, {}) : /* @__PURE__ */ u(J, { ref: o, sx: { p: 16 }, children: [
564
- /* @__PURE__ */ e(
565
- Ve,
566
- {
567
- action: /* @__PURE__ */ e(
568
- q,
569
- {
570
- endIcon: /* @__PURE__ */ e(j, {}),
571
- sx: {
572
- fontSize: 13,
573
- lineHeight: "16px",
574
- fontWeight: 600,
575
- color: "primary.main"
576
- },
577
- variant: "text",
578
- children: i.financial_strength_header_action
579
- }
580
- ),
581
- subheader: /* @__PURE__ */ e(H, { color: "text.primary", children: i.financial_strength_header }),
582
- sx: {
583
- p: 0,
584
- "& .MuiCardHeader-content": {
585
- overflow: "hidden"
586
- }
587
- }
588
- }
589
- ),
590
- /* @__PURE__ */ e(g, { sx: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(
591
- ve,
592
- {
593
- arcRadius: t <= 323 ? 73 : 154,
594
- footerCenterContent: r,
595
- healthScore: s?.health_score || 0,
596
- size: t <= 323 ? "M" : "L"
597
- }
598
- ) }),
599
- s?.health_score ? /* @__PURE__ */ u(
600
- Xe,
601
- {
602
- sx: {
603
- px: 16,
604
- backgroundColor: a ? "grey.800" : "grey.50",
605
- //TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
606
- "&.Mui-expanded": {
607
- m: 0
608
- },
609
- "&::before": {
610
- display: "none"
611
- }
612
- },
613
- children: [
614
- /* @__PURE__ */ e(
615
- Ue,
616
- {
617
- expandIcon: /* @__PURE__ */ e(Re, { size: 20 }),
618
- sx: {
619
- height: 52,
620
- p: 0,
621
- "&.Mui-expanded": {
622
- minHeight: 0
623
- }
624
- },
625
- children: /* @__PURE__ */ e(y, { sx: { fontWeight: 600 }, variant: "body1", children: i.accordion_title_text })
626
- }
627
- ),
628
- /* @__PURE__ */ e(je, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(y, { variant: "subtitle1", children: c.scoreContent }) })
629
- ]
630
- }
631
- ) : /* @__PURE__ */ e(
632
- Q,
633
- {
634
- buttonText: i.connect_more_accounts_title,
635
- description: i.health_score_zero_description,
636
- hasIcon: !1,
637
- isDashboard: !0,
638
- sx: {
639
- backgroundColor: a ? "grey.800" : "grey.50",
640
- //TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
641
- ".connect-more-accounts-title": {
642
- fontWeight: 600,
643
- lineHeight: "20px",
644
- color: "text.primary"
645
- },
646
- ".connect-more-accounts-description": { color: "text.primary" }
647
- },
648
- title: i.health_score_zero_title
649
- }
650
- )
651
- ] });
652
- }), vt = ({ isOpen: n, onClose: o }) => {
653
- const { common: t, finstrong: i } = S(), { isMobile: d } = Ce(), { updateUser: l, user: s } = Y(), [r, a] = C.useState(s.credit_score || 0), c = !isNaN(r), p = () => {
654
- o(), setTimeout(() => a(s.credit_score || 0), 300);
655
- }, h = () => {
656
- !r || r === s.credit_score || l({ ...s, credit_score: r });
462
+ ) : null;
463
+ };
464
+ var se = /* @__PURE__ */ ((t) => (t.SpendLessThanYouMake = "spendLessThanYouMake", t.PayBillsOnTime = "payBillsOnTime", t.SaveEnoughToLiveOn = "saveEnoughToLiveOn", t.MaintainEmergencySavings = "maintainEmergencySavings", t.HaveManageableDebt = "haveManageableDebt", t.HaveAGoodCreditScore = "haveAGoodCreditScore", t))(se || {});
465
+ const fo = ({ isOpen: t, onClose: o }) => {
466
+ const { common: n, finstrong: r } = v(), { isMobile: c } = je(), { updateUser: s, user: i } = Q(), [d, l] = h.useState(i.credit_score || 0), p = !isNaN(d), _ = () => {
467
+ o(), setTimeout(() => l(i.credit_score || 0), 300);
468
+ }, m = () => {
469
+ !d || d === i.credit_score || s({ ...i, credit_score: d });
657
470
  };
658
471
  return /* @__PURE__ */ e(
659
- Ze,
472
+ Dn,
660
473
  {
661
- copy: { close_aria: t.close_aria, title: i.edit_credit_score },
662
- disablePrimaryButton: !r || !c,
663
- isOpen: n,
474
+ copy: { close_aria: n.close_aria, title: r.edit_credit_score },
475
+ disablePrimaryButton: !d || !p,
476
+ isOpen: t,
664
477
  maxWidth: "xs",
665
- onClose: p,
666
- onPrimaryAction: h,
478
+ onClose: _,
479
+ onPrimaryAction: m,
667
480
  primaryColor: "primary",
668
- primaryText: t.save_button,
481
+ primaryText: n.save_button,
669
482
  sx: {
670
483
  "& .MuiDialog-paper": {
671
- minWidth: d ? "100%" : 400
484
+ minWidth: c ? "100%" : 400
672
485
  }
673
486
  },
674
487
  children: /* @__PURE__ */ e(
675
- Qe,
676
- {
677
- error: !c,
678
- fullWidth: !0,
679
- inputMode: "numeric",
680
- inputProps: {
681
- noValidate: !0,
682
- pattern: "[0-9]*"
683
- },
684
- onChange: (m) => a(Number(m.target.value)),
685
- value: c ? r : ""
686
- }
687
- )
688
- }
689
- );
690
- }, kt = I(vt), At = ({ isOpen: n, onClose: o }) => {
691
- const { finstrong: t } = S(), i = G(), { updateUser: d, user: l } = Y(), [s, r] = C.useState(l.birthday), a = (p) => {
692
- r(Math.floor(new Date(p).getTime() / 1e3));
693
- };
694
- return /* @__PURE__ */ e(
695
- V,
696
- {
697
- isOpen: n,
698
- onClose: o,
699
- onPrimaryAction: () => {
700
- !s || s === l.birthday || (d({ ...l, birthday: s }), o());
701
- },
702
- onSecondaryAction: o,
703
- title: t.date_of_birth,
704
- children: /* @__PURE__ */ e(ot, { dateAdapter: et, children: /* @__PURE__ */ e(
705
- tt,
488
+ "form",
706
489
  {
707
- disableFuture: !0,
708
- onChange: a,
709
- slotProps: {
710
- nextIconButton: {
711
- sx: {
712
- color: "primary.main",
713
- "&:hover": { bgcolor: te(i.palette.primary.light, 0.1) }
714
- }
715
- },
716
- previousIconButton: {
717
- sx: {
718
- color: "primary.main",
719
- "&:hover": { bgcolor: te(i.palette.primary.light, 0.1) }
720
- }
721
- }
722
- },
723
- slots: {
724
- actionBar: () => null,
725
- toolbar: () => null
490
+ onSubmit: (g) => {
491
+ g.preventDefault(), m(), _();
726
492
  },
727
- sx: {
728
- width: "100%",
729
- "& .MuiIconButton-edgeEnd": {
730
- color: "primary.main",
731
- "&:hover": { bgcolor: te(i.palette.primary.light, 0.1) }
493
+ children: /* @__PURE__ */ e(
494
+ Me,
495
+ {
496
+ error: !p,
497
+ fullWidth: !0,
498
+ inputMode: "numeric",
499
+ inputProps: {
500
+ noValidate: !0,
501
+ pattern: "[0-9]*"
502
+ },
503
+ onChange: (g) => l(Number(g.target.value)),
504
+ value: p ? d : ""
732
505
  }
733
- },
734
- value: s ? new Date(s * 1e3) : /* @__PURE__ */ new Date()
506
+ )
735
507
  }
736
- ) })
508
+ )
737
509
  }
738
510
  );
739
- }, It = I(At), Ot = ({ value: n, completeCopy: o }) => /* @__PURE__ */ u(g, { sx: { gap: 8 }, children: [
740
- /* @__PURE__ */ e(g, { sx: { flexDirection: "row", gap: 4 }, children: Array.from({ length: 4 }).map((t, i) => /* @__PURE__ */ e(
741
- x,
742
- {
743
- sx: {
744
- bgcolor: i < n ? "primary.main" : "neutral.light",
745
- borderRadius: "24px",
746
- height: 4,
747
- width: "100%"
748
- }
511
+ }, Pt = S(fo), Be = {
512
+ credit_over_time_title: "Your Credit Over Time",
513
+ credit_over_time_zero_state_desc: "Add your credit score to start building a full picture of your credit health."
514
+ }, xo = ({ chartFor: t }) => {
515
+ const o = E(), n = o.palette.mode === "dark", { monthlySummaries: r } = R(), { user: c } = Q(), { finstrong: s } = v(), [i, { width: d }] = vt(), l = {
516
+ savingsOverTime: {
517
+ icon: /* @__PURE__ */ e(dt, { size: 48, sx: { marginBottom: 8 } }),
518
+ title: s.key_indicators_save.zero_state_title,
519
+ description: s.key_indicators_save.zero_state_description
749
520
  },
750
- i
751
- )) }),
752
- /* @__PURE__ */ u(W, { sx: { color: "text.secondary" }, variant: "body2", children: [
753
- n / 4 * 100,
754
- "% ",
755
- o
756
- ] })
757
- ] }), Dt = ({ isOpen: n, onClose: o }) => {
758
- const { visibleFinstrongAccounts: t } = fe(), { incomeBudget: i } = ye(), {
759
- accounts: d,
760
- common: l,
761
- finstrong: s
762
- } = S(), { user: r } = Y(), [a, c] = C.useState(null), h = [
763
- {
764
- dynamicCopy: s.add_profile_item,
765
- fallbackLabel: s.monthly_income,
766
- icon: /* @__PURE__ */ e(Fe, {}),
767
- key: A.MonthlyIncome,
768
- label: s.monthly_income,
769
- value: i
521
+ debtOverTime: {
522
+ icon: /* @__PURE__ */ e(ut, { size: 48, sx: { marginBottom: 8 } }),
523
+ title: "",
524
+ description: ""
770
525
  },
771
- {
772
- dynamicCopy: s.add_profile_item,
773
- fallbackLabel: s.date_of_birth,
774
- icon: /* @__PURE__ */ e(Pe, {}),
775
- key: A.DateOfBirth,
776
- label: s.date_of_birth,
777
- value: r.birthday
526
+ creditOverTime: {
527
+ icon: /* @__PURE__ */ e(Ee, { size: 48, sx: { marginBottom: 8 } }),
528
+ title: Be.credit_over_time_title,
529
+ description: Be.credit_over_time_zero_state_desc
530
+ }
531
+ }[t], _ = {
532
+ savingsOverTime: {
533
+ title: s.key_indicators_save.savings_over_time,
534
+ valueKey: "available_cash"
778
535
  },
779
- {
780
- dynamicCopy: s.add_profile_item,
781
- fallbackLabel: s.credit_score,
782
- icon: /* @__PURE__ */ e(ue, {}),
783
- key: A.CreditScore,
784
- label: s.credit_score,
785
- value: r.credit_score
536
+ debtOverTime: {
537
+ title: s.key_indicators_borrow.have_manageable_debt_drawer.debt_over_time,
538
+ valueKey: "debt_balance"
786
539
  },
787
- {
788
- fallbackLabel: s.connect_your_accounts,
789
- icon: /* @__PURE__ */ e(me, {}),
790
- key: A.Connections,
791
- label: s.connections,
792
- value: t.length > 0 ? b(
793
- s.connected_account,
794
- String(t.length),
795
- t.length > 1 ? s.accounts : s.account
796
- ) : void 0
540
+ creditOverTime: {
541
+ title: Be.credit_over_time_title,
542
+ valueKey: "credit_score"
797
543
  }
798
- ].map((m) => bt(m));
799
- return /* @__PURE__ */ u(V, { isOpen: n, onClose: o, title: s.financial_profile, children: [
800
- /* @__PURE__ */ u(g, { sx: { gap: 20, p: 24 }, children: [
801
- /* @__PURE__ */ u(g, { sx: { gap: 8 }, children: [
802
- /* @__PURE__ */ e(H, { children: s.your_financial_profile }),
803
- /* @__PURE__ */ e(y, { children: s.financial_profile_description })
804
- ] }),
805
- /* @__PURE__ */ e(
806
- Ot,
807
- {
808
- completeCopy: s.complete,
809
- value: h.reduce((m, _) => m + (_.isComplete ? 1 : 0), 0)
810
- }
811
- )
812
- ] }),
813
- /* @__PURE__ */ e(ht, { list: h, onClickItem: c }),
814
- /* @__PURE__ */ e(x, { sx: { p: 24 }, children: /* @__PURE__ */ e(
815
- Q,
816
- {
817
- description: s.connect_more_accounts_to_view_more_accurate_financial_picture,
818
- isDashboard: !0,
819
- title: s.dont_see_all_your_accounts
820
- }
821
- ) }),
544
+ }[t], m = dn(r, _.valueKey), g = Math.max(...r.map((D) => D[_.valueKey])), b = () => g >= 1e6 ? { formatter: "0.000a", leftMargin: 55 } : g >= 1e3 ? { formatter: "0a", leftMargin: 35 } : { formatter: "0a", leftMargin: 30 }, { formatter: w, leftMargin: f } = b(), x = _.title, y = t === "creditOverTime";
545
+ let k;
546
+ if (y) {
547
+ const { color: D } = mt(
548
+ c?.credit_score ?? 0,
549
+ n,
550
+ s.credit_score_status
551
+ );
552
+ k = D;
553
+ }
554
+ return /* @__PURE__ */ e(j, { ref: i, sx: { backgroundColor: "background.paper" }, children: m.length >= 1 ? /* @__PURE__ */ a(u, { gap: 8, sx: { pl: 18 }, children: [
555
+ /* @__PURE__ */ e(M, { sx: { pb: 8, pt: 16 }, variant: "h3", children: x }),
822
556
  /* @__PURE__ */ e(
823
- V,
557
+ Ne,
824
558
  {
825
- isOpen: a === A.MonthlyIncome,
826
- onClose: () => c(null),
827
- title: l.settings,
828
- children: /* @__PURE__ */ e(Je, {})
559
+ areaColor: k,
560
+ axisColor: o.palette.divider,
561
+ baseline: "min",
562
+ chartFor: t,
563
+ colors: [o.palette.primary.main],
564
+ curveType: y ? "linear" : "natural",
565
+ datasets: m ? [m] : [],
566
+ height: 244,
567
+ labelFontColor: y ? "text.primary" : "",
568
+ labelFontSize: y ? 13 : void 0,
569
+ labels: [s.key_indicators_label],
570
+ margin: { left: f, top: y ? 25 : 15, right: 20 },
571
+ markStyles: (D) => y ? {
572
+ markLabelStyles: {
573
+ marginLeft: 16,
574
+ transform: D === m.length - 1 ? "translateX(-16px)" : "translateX(16px)",
575
+ fontWeight: 600
576
+ }
577
+ } : {},
578
+ maxRange: y ? 850 : void 0,
579
+ minRange: y ? 300 : void 0,
580
+ showArea: !0,
581
+ showAverage: !y,
582
+ showMark: !y,
583
+ showMarkLabel: y,
584
+ showXAxis: !0,
585
+ showYAxis: y,
586
+ showYAxisTicks: y,
587
+ useCustomMark: !0,
588
+ valueFormatterString: y ? void 0 : w,
589
+ width: d < 342 ? d - 48 : 342
829
590
  }
830
- ),
831
- /* @__PURE__ */ e(It, { isOpen: a === A.DateOfBirth, onClose: () => c(null) }),
832
- /* @__PURE__ */ e(kt, { isOpen: a === A.CreditScore, onClose: () => c(null) }),
591
+ )
592
+ ] }) : /* @__PURE__ */ a(u, { gap: 8, sx: { alignItems: "center", p: 24, pb: 48 }, children: [
593
+ l.icon,
594
+ /* @__PURE__ */ e(M, { fontWeight: 600, variant: "body1", children: l.title }),
595
+ /* @__PURE__ */ e(M, { align: "center", variant: "subtitle1", children: l.description })
596
+ ] }) });
597
+ }, Ye = S(xo), So = {
598
+ updated_score: "Updated Score"
599
+ }, Co = () => {
600
+ const { healthScoreChange: t } = R(), { user: o } = Q(), { availableWidth: n } = Cn(), { isSmallMobile: r } = je(n), [c, s] = h.useState(!1);
601
+ return /* @__PURE__ */ a(u, { sx: { gap: 28 }, children: [
833
602
  /* @__PURE__ */ e(
834
- qe,
603
+ bo,
835
604
  {
836
- onClose: () => c(null),
837
- showConnectionsWidget: a === A.Connections,
838
- title: d.manage_connections
605
+ arcRadius: r ? 124 : 154,
606
+ footerCenterContent: t,
607
+ healthScore: o.credit_score ?? 0,
608
+ size: r ? "M" : "L"
839
609
  }
840
- )
610
+ ),
611
+ /* @__PURE__ */ e($, { onClick: () => s(!0), variant: "contained", children: So.updated_score }),
612
+ /* @__PURE__ */ e(Pt, { isOpen: c, onClose: () => s(!1) }),
613
+ /* @__PURE__ */ e(Ye, { chartFor: "creditOverTime" })
841
614
  ] });
842
- }, Mt = I(Dt), X = {
843
- creditScore: {
844
- poor: 600,
845
- good: 720
846
- },
847
- daysOfCashOnHand: {
848
- poor: 30,
849
- good: 90
850
- },
851
- debtToIncomeRatio: {
852
- poor: 40,
853
- good: 30
854
- },
855
- emergencySavings: {
856
- poor: 750,
857
- good: 1e3
858
- },
859
- spendToIncomeRatio: {
860
- poor: 110,
861
- good: 100
862
- }
863
- }, f = {
864
- GOOD: "Good",
865
- FAIR: "Fair",
866
- OFF_TRACK: "Off Track",
867
- MISSING: "Missing"
868
- }, B = ({
869
- title: n,
870
- description: o,
871
- cardState: t = f.MISSING,
872
- stateTitle: i
873
- }) => {
874
- const d = {
875
- [f.GOOD]: { backgroundColor: "success.lighter", color: "success.main" },
876
- [f.FAIR]: { backgroundColor: "warning.lighter", color: "warning.main" },
877
- [f.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.main" },
878
- [f.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
615
+ }, vo = S(Co), Oe = ({ status: t }) => {
616
+ const { finstrong: o } = v(), n = pn(un[t]), r = {
617
+ GOOD: o.key_indicators_good,
618
+ FAIR: o.key_indicators_fair,
619
+ OFF_TRACK: o.key_indicators_off_track,
620
+ MISSING: o.key_indicators_missing
879
621
  }[t];
880
- return /* @__PURE__ */ u(
881
- g,
622
+ return /* @__PURE__ */ e(
623
+ Tn,
882
624
  {
883
- alignItems: "center",
884
- flexDirection: "row",
885
- gap: 12,
886
- justifyContent: "space-between",
625
+ label: /* @__PURE__ */ e(
626
+ M,
627
+ {
628
+ fontWeight: 700,
629
+ sx: { color: n.color, minHeight: 12 },
630
+ uppercase: !0,
631
+ variant: "tiny",
632
+ children: r
633
+ }
634
+ ),
635
+ size: "small",
887
636
  sx: {
888
- p: 16,
889
- border: "1px solid",
890
- borderColor: "divider",
891
- borderRadius: 2
637
+ bgcolor: n.backgroundColor,
638
+ height: 16
892
639
  },
893
- children: [
894
- /* @__PURE__ */ u(x, { sx: { minHeight: 48 }, children: [
895
- /* @__PURE__ */ u(g, { flexDirection: "row", gap: 4, children: [
896
- /* @__PURE__ */ e(y, { fontWeight: 600, sx: { mb: 8 }, truncate: !0, variant: "body1", children: n }),
897
- /* @__PURE__ */ e(
898
- x,
899
- {
900
- sx: {
901
- borderRadius: 3,
902
- backgroundColor: d.backgroundColor,
903
- px: 8,
904
- py: 2,
905
- height: 16
906
- },
907
- children: /* @__PURE__ */ e(y, { fontWeight: 700, sx: { minHeight: 12 }, uppercase: !0, variant: "tiny", children: i })
908
- }
909
- )
910
- ] }),
911
- /* @__PURE__ */ e(y, { color: "secondary", variant: "subtitle2", children: o })
912
- ] }),
913
- /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(he, { color: "secondary", name: "chevron_right", size: 24 }) })
914
- ]
640
+ variant: "filled"
915
641
  }
916
642
  );
917
- }, Tt = () => {
918
- const { healthScore: n } = $(), { finstrong: o } = S(), { key_indicators_spend: t } = o, i = (r) => {
919
- const { good: a, poor: c } = X.spendToIncomeRatio;
920
- let p = f.MISSING, h = t.ratio_missing_description, m = o.key_indicators_missing;
921
- return r !== null && (r < a ? (p = f.GOOD, h = b(t.ratio_good_description, r), m = o.key_indicators_good) : r >= a && r < c ? (p = f.FAIR, h = b(t.ratio_fair_description, r), m = o.key_indicators_fair) : r >= c && (p = f.OFF_TRACK, h = b(t.ratio_off_track_description, r), m = o.key_indicators_off_track)), {
922
- cardState: p,
923
- description: h,
924
- title: t.ratio_card_title,
925
- stateTitle: m
926
- };
927
- }, d = (r) => {
928
- let a = f.MISSING, c = t.count_missing_description, p = o.key_indicators_missing;
929
- return r !== null && (r === 0 ? (a = f.GOOD, c = t.count_good_description, p = o.key_indicators_good) : r >= 1 && (a = f.OFF_TRACK, c = t.count_off_track_description, p = o.key_indicators_off_track)), {
930
- cardState: a,
931
- description: c,
932
- title: t.count_card_title,
933
- stateTitle: p
934
- };
935
- }, { spendToIncomeRatio: l, spendFeeCount: s } = C.useMemo(() => {
936
- const r = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, a = i(r), c = d(n.spending_fee_transaction_count);
937
- return { spendToIncomeRatio: a, spendFeeCount: c };
938
- }, [
939
- n.spend_to_income_ratio,
940
- n.spending_fee_transaction_count,
941
- t,
942
- o
943
- ]);
944
- return /* @__PURE__ */ u(g, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
945
- /* @__PURE__ */ e(
946
- B,
947
- {
948
- cardState: l.cardState,
949
- description: l.description,
950
- stateTitle: l.stateTitle,
951
- title: l.title
952
- }
953
- ),
954
- /* @__PURE__ */ e(
955
- B,
956
- {
957
- cardState: s.cardState,
958
- description: s.description,
959
- stateTitle: s.stateTitle,
960
- title: s.title
961
- }
962
- )
643
+ }, wo = {
644
+ keep_strong_credit_score: "Keep a Strong Credit Score"
645
+ }, ko = () => {
646
+ const { user: t } = Q(), o = gt(t.credit_score ?? null);
647
+ return /* @__PURE__ */ a(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
648
+ /* @__PURE__ */ e(K, { children: wo.keep_strong_credit_score }),
649
+ /* @__PURE__ */ e(Oe, { status: o })
963
650
  ] });
964
- }, wt = () => {
965
- const { healthScore: n } = $(), { finstrong: o } = S(), { key_indicators_save: t } = o, i = (r) => {
966
- const { good: a, poor: c } = X.daysOfCashOnHand;
967
- let p = f.MISSING, h = t.days_of_cash_missing_description, m = o.key_indicators_missing;
968
- return r !== null && (r >= a ? (p = f.GOOD, h = b(t.days_of_cash_good_description, r), m = o.key_indicators_good) : r < a && r >= c ? (p = f.FAIR, h = b(t.days_of_cash_fair_description, r), m = o.key_indicators_fair) : r < c && (p = f.OFF_TRACK, h = b(t.days_of_cash_off_track_description, r), m = o.key_indicators_off_track)), {
969
- cardState: p,
970
- description: h,
971
- title: t.days_of_cash_title,
972
- stateTitle: m
973
- };
974
- }, d = (r) => {
975
- const { good: a, poor: c } = X.emergencySavings;
976
- let p = f.MISSING, h = t.emergency_savings_missing_description, m = o.key_indicators_missing;
977
- return r !== null && (r >= a ? (p = f.GOOD, h = t.emergency_savings_good_description, m = o.key_indicators_good) : r < a && r >= c ? (p = f.FAIR, h = b(
978
- t.emergency_savings_fair_description,
979
- rt(r, "0,0.00")
980
- ), m = o.key_indicators_fair) : r < c && (p = f.OFF_TRACK, h = t.emergency_savings_off_track_description, m = o.key_indicators_off_track)), {
981
- cardState: p,
982
- description: h,
983
- title: t.emergency_savings_title,
984
- stateTitle: m
985
- };
986
- }, { daysOfCashOnHand: l, emergencySavings: s } = C.useMemo(() => {
987
- const r = n.months_of_cash_on_hand !== null ? Math.round(n.months_of_cash_on_hand * 30) : null, a = i(r), c = n.emergency_savings_on_hand !== null ? Math.round(n.emergency_savings_on_hand) : null, p = d(c);
988
- return { daysOfCashOnHand: a, emergencySavings: p };
989
- }, [
990
- n.months_of_cash_on_hand,
991
- n.emergency_savings_on_hand,
992
- t,
993
- o
994
- ]);
995
- return /* @__PURE__ */ u(g, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
996
- /* @__PURE__ */ e(
997
- B,
651
+ }, Mo = S(ko), Do = ({
652
+ additionalContent: t,
653
+ connectTitle: o,
654
+ connectDescription: n,
655
+ children: r,
656
+ description: c,
657
+ drawerTitle: s,
658
+ isOpen: i,
659
+ loadConnectAccountsCard: d = !0,
660
+ onClose: l,
661
+ stickyComponent: p,
662
+ title: _,
663
+ drawerType: m
664
+ }) => {
665
+ const { finstrong: g } = v(), { isCopyLoaded: b } = V();
666
+ return b ? /* @__PURE__ */ a(te, { isOpen: i, onClose: l, title: s || g.key_indicators, children: [
667
+ (_ || c) && /* @__PURE__ */ a(
668
+ u,
998
669
  {
999
- cardState: l.cardState,
1000
- description: l.description,
1001
- stateTitle: l.stateTitle,
1002
- title: l.title
670
+ sx: {
671
+ backgroundColor: "background.paper",
672
+ gap: 8,
673
+ p: 24
674
+ },
675
+ children: [
676
+ _ && typeof _ == "string" ? /* @__PURE__ */ e(K, { children: _ }) : _,
677
+ c && /* @__PURE__ */ e(M, { sx: { lineHeight: "24px" }, children: c })
678
+ ]
1003
679
  }
1004
680
  ),
1005
- /* @__PURE__ */ e(
1006
- B,
1007
- {
1008
- cardState: s.cardState,
1009
- description: s.description,
1010
- stateTitle: s.stateTitle,
1011
- title: s.title
1012
- }
1013
- )
1014
- ] });
1015
- }, Rt = () => {
1016
- const { healthScore: n } = $(), { finstrong: o } = S(), { key_indicators_borrow: t } = o, { user: i } = Y(), d = (a) => {
1017
- const { good: c, poor: p } = X.debtToIncomeRatio;
1018
- let h = f.MISSING, m = t.manage_debit_missing_description, _ = o.key_indicators_missing;
1019
- return a != null && (a <= c ? (h = f.GOOD, m = t.manage_debit_good_description, _ = o.key_indicators_good) : a > c && a <= p ? (h = f.FAIR, m = b(t.manage_debit_fair_description, a), _ = o.key_indicators_fair) : a > p && (h = f.OFF_TRACK, m = b(
1020
- t.manage_debit_off_track_description,
1021
- a
1022
- ), _ = o.key_indicators_off_track)), {
1023
- cardState: h,
1024
- description: m,
1025
- title: t.manage_debit_title,
1026
- stateTitle: _
1027
- };
1028
- }, l = (a) => {
1029
- const { good: c, poor: p } = X.creditScore;
1030
- let h = f.MISSING, m = t.credit_score_missing_description, _ = o.key_indicators_missing;
1031
- return a !== null && (a >= c ? (h = f.GOOD, m = b(t.credit_score_good_description, a), _ = o.key_indicators_good) : a < c && a >= p ? (h = f.FAIR, m = b(t.credit_score_fair_description, a), _ = o.key_indicators_fair) : a < p && (h = f.OFF_TRACK, m = b(
1032
- t.credit_score_off_track_description,
1033
- a
1034
- ), _ = o.key_indicators_off_track)), {
1035
- cardState: h,
1036
- description: m,
1037
- title: t.credit_score_title,
1038
- stateTitle: _
1039
- };
1040
- }, { manageDebtStatus: s, creditScoreStatus: r } = C.useMemo(() => {
1041
- const a = n.debt_to_income_ratio !== null ? Math.round(n.debt_to_income_ratio * 100) : null, c = d(a), p = l(i.credit_score || null);
1042
- return {
1043
- manageDebtStatus: c,
1044
- creditScoreStatus: p
1045
- };
1046
- }, [n.debt_to_income_ratio, i.credit_score, t, o]);
1047
- return /* @__PURE__ */ u(g, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
1048
- /* @__PURE__ */ e(
1049
- B,
681
+ p && /* @__PURE__ */ e(
682
+ C,
1050
683
  {
1051
- cardState: s.cardState,
1052
- description: s.description,
1053
- stateTitle: s.stateTitle,
1054
- title: s.title
684
+ sx: {
685
+ position: "sticky",
686
+ top: 0,
687
+ zIndex: 1
688
+ },
689
+ children: p
1055
690
  }
1056
691
  ),
1057
- /* @__PURE__ */ e(
1058
- B,
1059
- {
1060
- cardState: r.cardState,
1061
- description: r.description,
1062
- stateTitle: r.stateTitle,
1063
- title: r.title
692
+ t && /* @__PURE__ */ e(C, { children: t }),
693
+ /* @__PURE__ */ a(u, { sx: { p: 24, gap: 24 }, children: [
694
+ r,
695
+ d && /* @__PURE__ */ e(
696
+ Te,
697
+ {
698
+ description: n,
699
+ drawerType: m,
700
+ isDashboard: !0,
701
+ sx: { backgroundColor: "background.paper" },
702
+ title: o
703
+ }
704
+ )
705
+ ] })
706
+ ] }) : /* @__PURE__ */ e(J, {});
707
+ }, Bt = S(Do), Ao = ({
708
+ onClick: t,
709
+ shouldShowBalance: o = !0,
710
+ loadAccounts: n
711
+ }) => {
712
+ const { config: r } = ft(), { accounts: c } = v(), { selectedAccounts: s } = V(), i = h.useCallback(
713
+ (l) => {
714
+ t?.(l);
715
+ },
716
+ [t]
717
+ ), d = h.useMemo(
718
+ () => Array.from(new Set(s.map((l) => l.account_type))).filter(
719
+ (l) => n ? n.includes(l) : !0
720
+ ),
721
+ [s, n]
722
+ );
723
+ return s.length ? /* @__PURE__ */ e(h.Fragment, { children: d.map((l) => {
724
+ const { accountsForType: p, totalBalanceForType: _ } = s.reduce(
725
+ (m, g) => (g.account_type === l && (m.accountsForType.push(g), m.totalBalanceForType += g.balance || 0), m),
726
+ { accountsForType: [], totalBalanceForType: 0 }
727
+ );
728
+ return /* @__PURE__ */ a(
729
+ De,
730
+ {
731
+ subheader: /* @__PURE__ */ e(Rn, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */ a(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
732
+ /* @__PURE__ */ e(A, { bold: !0, variant: "caption", children: c.account_types[l] }),
733
+ o && /* @__PURE__ */ e(A, { bold: !0, variant: "caption", children: B(_, "0,0.00") })
734
+ ] }) }),
735
+ sx: { bgcolor: "background.paper" },
736
+ children: [
737
+ p.map((m, g) => {
738
+ const { firstValue: b } = kt(m, c), w = Ct(m, {
739
+ allowNickname: r?.show_account_nicknames_in_master
740
+ }), f = /* @__PURE__ */ a(z, { children: [
741
+ /* @__PURE__ */ e(wt, { children: /* @__PURE__ */ e(ht, { alt: "MX", institutionGuid: m.institution_guid ?? "" }) }),
742
+ /* @__PURE__ */ e(
743
+ ue,
744
+ {
745
+ primary: `${w}${m.account_number ? ` *${m.account_number}` : ""}`,
746
+ primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
747
+ }
748
+ ),
749
+ o && /* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: B(b ?? 0, "0,0.00") })
750
+ ] });
751
+ return /* @__PURE__ */ a(h.Fragment, { children: [
752
+ /* @__PURE__ */ e(pe, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(On, { onClick: () => i(m), children: f }) : f }),
753
+ g !== p.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
754
+ ] }, m.guid);
755
+ }),
756
+ /* @__PURE__ */ e(ne, {})
757
+ ]
758
+ },
759
+ l
760
+ );
761
+ }) }) : null;
762
+ }, Lt = S(Ao), Io = ({ loadAccounts: t, loadMoreLabel: o }) => {
763
+ const n = E(), { config: r } = ft(), { connect: c, finstrong: s } = v(), { accounts: i } = v(), { selectedAccounts: d } = V(), [l, p] = h.useState(!1), [_, m] = h.useState(!1), g = h.useMemo(
764
+ () => d.filter(
765
+ (f) => t ? t.includes(f.account_type) : !0
766
+ ),
767
+ [d, t]
768
+ ), b = h.useMemo(() => g.slice(0, 3), [g]), w = (f) => {
769
+ const { firstValue: x } = kt(f, i);
770
+ return x;
771
+ };
772
+ return g.length >= 1 ? /* @__PURE__ */ a(z, { children: [
773
+ /* @__PURE__ */ e(C, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: b.map((f, x) => /* @__PURE__ */ a(h.Fragment, { children: [
774
+ /* @__PURE__ */ a(pe, { sx: { px: 24 }, children: [
775
+ /* @__PURE__ */ e(wt, { children: /* @__PURE__ */ e(ht, { alt: "MX", institutionGuid: f.institution_guid ?? "" }) }),
776
+ /* @__PURE__ */ e(
777
+ ue,
778
+ {
779
+ primary: `${Ct(f, {
780
+ allowNickname: r?.show_account_nicknames_in_master
781
+ })}
782
+ ${f.account_number ? ` *${f.account_number}` : ""}`,
783
+ primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
784
+ }
785
+ ),
786
+ /* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: B(w(f), "0,0.00") })
787
+ ] }),
788
+ x < b.length - 1 && /* @__PURE__ */ e(ne, { variant: "inset" })
789
+ ] }, f.guid)) }),
790
+ g.length > 3 && /* @__PURE__ */ a(z, { children: [
791
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
792
+ $,
793
+ {
794
+ endIcon: /* @__PURE__ */ e(Z, {}),
795
+ onClick: () => p(!0),
796
+ size: "small",
797
+ sx: { my: 0, px: 16, py: 12, width: "100%" },
798
+ children: /* @__PURE__ */ a(A, { bold: !0, variant: "body1", children: [
799
+ g.length - 3,
800
+ " ",
801
+ o
802
+ ] })
803
+ }
804
+ ) }),
805
+ /* @__PURE__ */ e(te, { isOpen: l, onClose: () => p(!1), title: s.accounts, children: /* @__PURE__ */ e(Lt, { loadAccounts: t }) })
806
+ ] })
807
+ ] }) : /* @__PURE__ */ a(z, { children: [
808
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
809
+ $,
810
+ {
811
+ onClick: () => m(!0),
812
+ size: "small",
813
+ sx: { my: 0, px: 16, py: 12, width: "100%" },
814
+ variant: "contained",
815
+ children: /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: s.connect_more_accounts_button })
816
+ }
817
+ ) }),
818
+ /* @__PURE__ */ e(
819
+ oe,
820
+ {
821
+ onClose: () => m(!1),
822
+ showConnectWidget: _,
823
+ title: c.mini_title
824
+ }
825
+ )
826
+ ] });
827
+ }, $t = S(Io), me = ({ balance: t, title: o, sx: n }) => /* @__PURE__ */ a(
828
+ u,
829
+ {
830
+ sx: {
831
+ alignItems: "center",
832
+ backgroundColor: "background.default",
833
+ borderRadius: 2,
834
+ height: 72,
835
+ justifyContent: "center",
836
+ p: 12,
837
+ ...n
838
+ },
839
+ children: [
840
+ typeof t == "number" ? /* @__PURE__ */ e(M, { variant: "h2", children: B(t, "0,0.00") }) : t,
841
+ /* @__PURE__ */ e(M, { color: "text.secondary", fontWeight: "400", variant: "subtitle2", children: o })
842
+ ]
843
+ }
844
+ );
845
+ var O = /* @__PURE__ */ ((t) => (t[t.ConnectAccounts = 1] = "ConnectAccounts", t[t.MonthlyIncome = 2] = "MonthlyIncome", t[t.Birthday = 3] = "Birthday", t[t.CreditScore = 4] = "CreditScore", t))(O || {}), xe = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(xe || {}), q = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(q || {});
846
+ const P = {
847
+ bi_weekly: "Bi-Weekly",
848
+ calculate: "Calculate",
849
+ daily: "Daily",
850
+ day: "day",
851
+ days: "Days",
852
+ estimated_contribution: "Estimated Contribution",
853
+ estimated_period_bi_weekly: "bi-weekly",
854
+ estimated_period_daily: "day",
855
+ estimated_period_monthly: "month",
856
+ estimated_period_weekly: "week",
857
+ how_often_contribute: "How often will you contribute?",
858
+ meet_your_goal_within: "Meet your goal within",
859
+ months: "Months",
860
+ monthly: "Monthly",
861
+ savings_goal: "Savings Goal",
862
+ suggested_goal: "Suggested Goal: $25,000",
863
+ weekly: "Weekly",
864
+ years: "Years"
865
+ }, To = [
866
+ { id: q.Monthly, label: P.monthly },
867
+ { id: q.BiWeekly, label: P.bi_weekly },
868
+ { id: q.Weekly, label: P.weekly },
869
+ { id: q.Daily, label: P.daily }
870
+ ], Oo = {
871
+ [q.Monthly]: P.estimated_period_monthly,
872
+ [q.BiWeekly]: P.estimated_period_bi_weekly,
873
+ [q.Weekly]: P.estimated_period_weekly,
874
+ [q.Daily]: P.estimated_period_daily
875
+ }, Ro = [
876
+ { id: xe.Months, label: P.months },
877
+ { id: xe.Years, label: P.years },
878
+ { id: xe.Days, label: P.days }
879
+ ], Fo = ({ total: t }) => {
880
+ const o = Math.ceil((t + 1) / 1e3) * 1e3, [n, r] = h.useState(0), [c, s] = h.useState(Je(t)), [i, d] = h.useState(
881
+ Je(t)
882
+ ), [l, p] = h.useState(o), [_, m] = h.useState(_n(t)), [g, b] = h.useState(xe.Months);
883
+ h.useEffect(() => {
884
+ r(
885
+ et({
886
+ contribution: i,
887
+ goalAmount: l,
888
+ goalPeriod: _,
889
+ targetPeriod: g,
890
+ totalSaved: t
891
+ })
892
+ ), s(i);
893
+ }, []);
894
+ const w = (f) => {
895
+ f.preventDefault(), r(
896
+ et({
897
+ contribution: i,
898
+ goalAmount: l,
899
+ goalPeriod: _,
900
+ targetPeriod: g,
901
+ totalSaved: t
902
+ })
903
+ ), s(i);
904
+ };
905
+ return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e("form", { onSubmit: w, children: /* @__PURE__ */ a(u, { sx: { gap: 24, pb: 24, pt: 16, px: 16 }, children: [
906
+ /* @__PURE__ */ e(
907
+ me,
908
+ {
909
+ balance: /* @__PURE__ */ a(u, { sx: { flexDirection: "row", height: 32 }, children: [
910
+ /* @__PURE__ */ e(A, { variant: "h2", children: B(n, "0,0") }),
911
+ /* @__PURE__ */ a(A, { sx: { alignSelf: "end", height: 24 }, variant: "subtitle2", children: [
912
+ "/",
913
+ Oo[c]
914
+ ] })
915
+ ] }),
916
+ title: P.estimated_contribution
917
+ }
918
+ ),
919
+ /* @__PURE__ */ e(
920
+ Me,
921
+ {
922
+ "aria-label": P.savings_goal,
923
+ helperText: P.suggested_goal,
924
+ inputProps: {
925
+ noValidate: !0,
926
+ pattern: "[0-9]*"
927
+ },
928
+ label: P.savings_goal,
929
+ onChange: (f) => {
930
+ f.target.value && p(Number(f.target.value.replace(/[^0-9]/g, "")));
931
+ },
932
+ value: l ? B(l, "0,0") : ""
933
+ }
934
+ ),
935
+ /* @__PURE__ */ e(
936
+ nt,
937
+ {
938
+ label: P.how_often_contribute,
939
+ onChange: d,
940
+ options: To,
941
+ required: !0,
942
+ value: i
943
+ }
944
+ ),
945
+ /* @__PURE__ */ a(u, { sx: { flexDirection: "row" }, children: [
946
+ /* @__PURE__ */ e(
947
+ Me,
948
+ {
949
+ "aria-label": P.meet_your_goal_within,
950
+ fullWidth: !0,
951
+ inputProps: {
952
+ noValidate: !0,
953
+ pattern: "[0-9]*"
954
+ },
955
+ label: P.meet_your_goal_within,
956
+ onChange: (f) => m(Number(f.target.value)),
957
+ sx: {
958
+ "& .MuiInputBase-root": {
959
+ borderBottomRightRadius: 0,
960
+ borderTopRightRadius: 0,
961
+ fieldset: {
962
+ borderRightWidth: 0.5
963
+ }
964
+ }
965
+ },
966
+ value: _
967
+ }
968
+ ),
969
+ /* @__PURE__ */ e(
970
+ C,
971
+ {
972
+ sx: {
973
+ "& .MuiInputBase-root": {
974
+ borderBottomLeftRadius: 0,
975
+ borderTopLeftRadius: 0,
976
+ fieldset: {
977
+ borderLeftWidth: 0.5
978
+ }
979
+ }
980
+ },
981
+ children: /* @__PURE__ */ e(nt, { label: "", onChange: b, options: Ro, value: g })
982
+ }
983
+ )
984
+ ] }),
985
+ /* @__PURE__ */ e($, { fullWidth: !0, onClick: w, type: "submit", variant: "contained", children: P.calculate })
986
+ ] }) }) });
987
+ }, Po = S(Fo), we = {
988
+ connect_accounts: "Connect Accounts",
989
+ more_accounts: "More Accounts",
990
+ your_savings: "Your Savings"
991
+ }, Bo = () => {
992
+ const { savingsAccounts: t } = Se(), [o, n] = h.useState(!1), r = h.useMemo(
993
+ () => t.reduce((c, s) => c + (s.balance ?? 0), 0),
994
+ [t]
995
+ );
996
+ return /* @__PURE__ */ a(u, { sx: { gap: 24 }, children: [
997
+ /* @__PURE__ */ e(j, { sx: { bgcolor: "background.paper", p: 16 }, children: /* @__PURE__ */ a(u, { sx: { gap: 16 }, children: [
998
+ /* @__PURE__ */ e(me, { balance: r, title: we.your_savings }),
999
+ t.length ? /* @__PURE__ */ e($t, { loadAccounts: [We.SAVINGS], loadMoreLabel: we.connect_accounts }) : /* @__PURE__ */ e(Pn, { onClick: () => n(!0), variant: "contained", children: we.connect_accounts })
1000
+ ] }) }),
1001
+ /* @__PURE__ */ e(Po, { total: r }),
1002
+ /* @__PURE__ */ e(
1003
+ oe,
1004
+ {
1005
+ onClose: () => n(!1),
1006
+ showConnectWidget: o,
1007
+ title: we.connect_accounts
1008
+ }
1009
+ )
1010
+ ] });
1011
+ }, Lo = S(Bo), Re = S(
1012
+ ({ label: t, value: o, status: n, bottomComponent: r, statusBarData: c = [] }) => {
1013
+ const s = {
1014
+ GOOD: {
1015
+ progressBarColor: "primary.main"
1016
+ },
1017
+ FAIR: {
1018
+ progressBarColor: "warning.main"
1019
+ },
1020
+ OFF_TRACK: {
1021
+ progressBarColor: "error.main"
1022
+ },
1023
+ MISSING: {
1024
+ progressBarColor: "text.secondary"
1025
+ }
1026
+ }[n], i = c.map((d, l) => c.length === 2 ? {
1027
+ color: l === 0 ? "primary.main" : d.color || s?.progressBarColor,
1028
+ percentage: d.percentage
1029
+ } : {
1030
+ color: d.color || s?.progressBarColor,
1031
+ percentage: d.percentage
1032
+ });
1033
+ return /* @__PURE__ */ a(
1034
+ u,
1035
+ {
1036
+ sx: {
1037
+ backgroundColor: "background.paper",
1038
+ gap: 8,
1039
+ p: 24,
1040
+ pt: 0,
1041
+ borderBottom: "1px solid",
1042
+ borderColor: "divider"
1043
+ },
1044
+ children: [
1045
+ /* @__PURE__ */ a(u, { sx: { gap: 2 }, children: [
1046
+ /* @__PURE__ */ e(A, { variant: "body2", children: t }),
1047
+ /* @__PURE__ */ a(
1048
+ u,
1049
+ {
1050
+ sx: {
1051
+ alignItems: "center",
1052
+ flexDirection: "row",
1053
+ gap: 12,
1054
+ justifyContent: "space-between"
1055
+ },
1056
+ children: [
1057
+ /* @__PURE__ */ e(Ie, { children: o }),
1058
+ /* @__PURE__ */ e(Oe, { status: n })
1059
+ ]
1060
+ }
1061
+ )
1062
+ ] }),
1063
+ /* @__PURE__ */ a(u, { children: [
1064
+ /* @__PURE__ */ e(Bn, { data: i, height: 16 }),
1065
+ r
1066
+ ] })
1067
+ ]
1068
+ }
1069
+ );
1070
+ }
1071
+ ), $o = {
1072
+ sticky_label: "You have saved"
1073
+ }, Wo = ["$0", "$250", "$500", "$750", "$1k"], zo = () => {
1074
+ const { healthScore: t } = R(), o = Math.round(t.emergency_savings_on_hand ?? NaN) || null, n = hn(o), r = yt(o);
1075
+ return /* @__PURE__ */ e(
1076
+ Re,
1077
+ {
1078
+ bottomComponent: /* @__PURE__ */ e(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: Wo.map((c) => /* @__PURE__ */ a(u, { sx: { alignItems: "center", height: 24, width: 30 }, children: [
1079
+ /* @__PURE__ */ e(
1080
+ ne,
1081
+ {
1082
+ orientation: "vertical",
1083
+ sx: {
1084
+ borderWidth: 0.5,
1085
+ height: 8,
1086
+ mt: 2
1087
+ }
1088
+ }
1089
+ ),
1090
+ /* @__PURE__ */ e(A, { variant: "caption", children: c })
1091
+ ] }, c)) }),
1092
+ label: $o.sticky_label,
1093
+ status: r,
1094
+ statusBarData: [
1095
+ {
1096
+ percentage: n
1097
+ }
1098
+ ],
1099
+ value: B(o ?? 0, "0,0.00")
1100
+ }
1101
+ );
1102
+ }, Eo = S(zo), it = 65, st = 34, Go = ({
1103
+ transactions: t,
1104
+ bgcolor: o,
1105
+ height: n = "calc(100dvh - 36px)",
1106
+ loader: r = /* @__PURE__ */ e(J, { label: "Loading", size: 40 }),
1107
+ onClick: c,
1108
+ showInsights: s = !1,
1109
+ showLoader: i = !1,
1110
+ width: d = "100%",
1111
+ zeroState: l = /* @__PURE__ */ e(Wn, {})
1112
+ }) => {
1113
+ const { getCategoryName: p } = He(), { onEvent: _ } = vn(), { categories: m } = v(), { clearExpandedSplits: g, setShowInsights: b, toggleSplit: w } = $n(), f = (k) => {
1114
+ const D = t.find((I) => I.guid === k);
1115
+ if (D?.has_been_split) {
1116
+ w(D.guid);
1117
+ return;
1118
+ }
1119
+ _(zn.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
1120
+ account_guid: D?.account_guid,
1121
+ transaction_guid: k
1122
+ }), c?.(k);
1123
+ }, x = h.useRef(null), y = Ln({
1124
+ count: t.length,
1125
+ getScrollElement: () => x.current,
1126
+ estimateSize: (k) => it + (ze(k, t) ? st : 0),
1127
+ overscan: 5
1128
+ });
1129
+ return h.useEffect(() => y.measure(), [t]), h.useEffect(() => b(s), [s]), h.useEffect(() => () => g(), []), /* @__PURE__ */ e(De, { sx: { width: d }, children: /* @__PURE__ */ e(C, { height: n, overflow: "auto", ref: x, width: d, children: /* @__PURE__ */ a(
1130
+ C,
1131
+ {
1132
+ height: (
1133
+ // set the height to auto when there are no transactions so the zero state isn't set to 0
1134
+ y.getVirtualItems().length === 0 ? "auto" : y.getTotalSize()
1135
+ ),
1136
+ position: "relative",
1137
+ width: "100%",
1138
+ children: [
1139
+ i && r,
1140
+ !i && y.getVirtualItems().length === 0 && l,
1141
+ !i && y.getVirtualItems().length > 0 && y.getVirtualItems().map((k) => {
1142
+ const D = t[k.index], I = ze(k.index, t), N = Mt(k.index, t), G = it + (I ? st : 0);
1143
+ return /* @__PURE__ */ a(
1144
+ C,
1145
+ {
1146
+ sx: {
1147
+ height: G,
1148
+ position: "absolute",
1149
+ transform: `translateY(${k.start}px)`,
1150
+ width: "100%"
1151
+ },
1152
+ children: [
1153
+ I && /* @__PURE__ */ e(Dt, { bgcolor: o, children: Ve(D.date) }),
1154
+ /* @__PURE__ */ e(
1155
+ At,
1156
+ {
1157
+ ...c && { onClick: f },
1158
+ transaction: {
1159
+ ...D,
1160
+ category: m.default_categories[D.top_level_category_guid]?.replace(
1161
+ /&amp;/g,
1162
+ "&"
1163
+ ) ?? p(D.top_level_category_guid)
1164
+ }
1165
+ }
1166
+ ),
1167
+ /* @__PURE__ */ e(ne, { sx: { ml: N ? 24 : 0 } })
1168
+ ]
1169
+ },
1170
+ D.guid
1171
+ );
1172
+ })
1173
+ ]
1174
+ }
1175
+ ) }) });
1176
+ }, Ho = S(Go), Fe = ({
1177
+ transactions: t = [],
1178
+ amountColor: o = "success.main",
1179
+ amountPosition: n = "center",
1180
+ formatDate: r = Ve,
1181
+ secondaryIcon: c
1182
+ }) => {
1183
+ const s = E(), { connect: i, finstrong: d } = v(), [l, p] = h.useState(!1), [_, m] = h.useState(!1), g = 3, b = t.length > g, w = t.length - g;
1184
+ return !t || t.length === 0 ? /* @__PURE__ */ a(z, { children: [
1185
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
1186
+ $,
1187
+ {
1188
+ onClick: () => m(!0),
1189
+ size: "small",
1190
+ sx: { my: 0, px: 16, py: 12, width: "100%" },
1191
+ variant: "contained",
1192
+ children: /* @__PURE__ */ e(A, { bold: !0, variant: "body1", children: d.connect_more_accounts_button })
1193
+ }
1194
+ ) }),
1195
+ /* @__PURE__ */ e(
1196
+ oe,
1197
+ {
1198
+ onClose: () => m(!1),
1199
+ showConnectWidget: _,
1200
+ title: i.mini_title
1201
+ }
1202
+ )
1203
+ ] }) : /* @__PURE__ */ a(u, { sx: { gap: 16 }, children: [
1204
+ /* @__PURE__ */ e(C, { sx: { border: `1px solid ${s.palette.divider}`, borderRadius: 2 }, children: t.slice(0, g).map((f, x) => /* @__PURE__ */ a(
1205
+ u,
1206
+ {
1207
+ sx: {
1208
+ alignItems: "center",
1209
+ flexDirection: "row",
1210
+ gap: 16,
1211
+ pl: 24,
1212
+ pt: 14
1213
+ },
1214
+ children: [
1215
+ /* @__PURE__ */ e(u, { sx: { pb: 14 }, children: /* @__PURE__ */ e(
1216
+ rn,
1217
+ {
1218
+ categoryGuid: f.top_level_category_guid || "",
1219
+ merchantGuid: f.merchant_guid || "",
1220
+ size: 32
1221
+ }
1222
+ ) }),
1223
+ /* @__PURE__ */ a(
1224
+ u,
1225
+ {
1226
+ sx: {
1227
+ alignItems: n,
1228
+ flexDirection: "row",
1229
+ gap: 12,
1230
+ justifyContent: "space-between",
1231
+ ...x < Math.min(t.length, g) - 1 && {
1232
+ borderBottom: `1px solid ${s.palette.divider}`
1233
+ },
1234
+ pb: 14,
1235
+ pr: 24,
1236
+ width: "100%"
1237
+ },
1238
+ children: [
1239
+ /* @__PURE__ */ a(u, { sx: { gap: 4 }, children: [
1240
+ /* @__PURE__ */ e(M, { bold: !0, variant: "body1", children: f.description }),
1241
+ /* @__PURE__ */ a(u, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
1242
+ !!c && c,
1243
+ /* @__PURE__ */ e(A, { variant: "caption", children: r(f.date) })
1244
+ ] })
1245
+ ] }),
1246
+ /* @__PURE__ */ e(M, { bold: !0, sx: { color: o, flexShrink: 0 }, variant: "body1", children: B(f.amount, "0,0.00") })
1247
+ ]
1248
+ },
1249
+ f.guid || x
1250
+ )
1251
+ ]
1252
+ },
1253
+ x
1254
+ )) }),
1255
+ b && /* @__PURE__ */ a(z, { children: [
1256
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
1257
+ $,
1258
+ {
1259
+ endIcon: /* @__PURE__ */ e(Z, {}),
1260
+ onClick: () => p(!0),
1261
+ size: "small",
1262
+ sx: { my: 0, px: 16, py: 12, width: "100%" },
1263
+ children: /* @__PURE__ */ a(A, { bold: !0, variant: "body1", children: [
1264
+ w,
1265
+ " ",
1266
+ d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_more_transactions
1267
+ ] })
1268
+ }
1269
+ ) }),
1270
+ /* @__PURE__ */ e(
1271
+ te,
1272
+ {
1273
+ isOpen: l,
1274
+ onClose: () => p(!1),
1275
+ title: d.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_transactions,
1276
+ children: /* @__PURE__ */ e(Ho, { transactions: t })
1277
+ }
1278
+ )
1279
+ ] })
1280
+ ] });
1281
+ }, No = () => {
1282
+ const {
1283
+ finstrong: {
1284
+ key_indicators_spend: { pay_bills_on_time_drawer: t }
1285
+ }
1286
+ } = v(), { getSpendingFeeTransactions: o, allTransactions: n } = R();
1287
+ return h.useEffect(() => {
1288
+ o().finally();
1289
+ }, []), /* @__PURE__ */ e(z, { children: n.spendingFee.length === 0 ? /* @__PURE__ */ a(
1290
+ j,
1291
+ {
1292
+ sx: {
1293
+ backgroundColor: "background.paper",
1294
+ pb: 48,
1295
+ pt: 32,
1296
+ px: 24,
1297
+ textAlign: "center",
1298
+ width: "100%"
1299
+ },
1300
+ children: [
1301
+ /* @__PURE__ */ e(qt, { filled: !0, size: 48, sx: { color: "success.main" } }),
1302
+ /* @__PURE__ */ a(u, { sx: { alignItems: "center", gap: 4, pt: 24 }, children: [
1303
+ /* @__PURE__ */ e(K, { children: t.pay_bills_on_time_zero_fees_title }),
1304
+ /* @__PURE__ */ e(M, { variant: "subtitle1", children: t.pay_bills_on_time_zero_fees_description })
1305
+ ] })
1306
+ ]
1307
+ }
1308
+ ) : /* @__PURE__ */ a(
1309
+ j,
1310
+ {
1311
+ sx: {
1312
+ p: 16,
1313
+ width: "100%",
1314
+ backgroundColor: "background.paper"
1315
+ },
1316
+ children: [
1317
+ /* @__PURE__ */ e(K, { sx: { textAlign: "left", pb: 8 }, children: t.pay_bills_on_time_sticky_fee_count }),
1318
+ /* @__PURE__ */ e(
1319
+ Fe,
1320
+ {
1321
+ amountColor: "text.primary",
1322
+ amountPosition: "flex-start",
1323
+ formatDate: (r) => An(new Date(r * 1e3), In.MONTH_DAY),
1324
+ secondaryIcon: /* @__PURE__ */ e(Zt, { color: "error", filled: !0, size: 12 }),
1325
+ transactions: n.spendingFee
1326
+ }
1327
+ )
1328
+ ]
1329
+ }
1330
+ ) });
1331
+ }, Ko = S(No), jo = () => {
1332
+ const { healthScore: t } = R(), { finstrong: o } = v(), { key_indicators_spend: n } = o, { pay_bills_on_time_drawer: r } = n, c = mn(t.spending_fee_transaction_count);
1333
+ return /* @__PURE__ */ a(
1334
+ u,
1335
+ {
1336
+ sx: {
1337
+ p: 24,
1338
+ backgroundColor: "background.paper",
1339
+ borderBottom: "1px solid",
1340
+ borderColor: "divider"
1341
+ },
1342
+ children: [
1343
+ /* @__PURE__ */ e(M, { variant: "body2", children: r.pay_bills_on_time_sticky_description }),
1344
+ /* @__PURE__ */ a(u, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
1345
+ /* @__PURE__ */ a(Ie, { children: [
1346
+ t.spending_fee_transaction_count,
1347
+ " ",
1348
+ r.pay_bills_on_time_sticky_fee_count
1349
+ ] }),
1350
+ /* @__PURE__ */ e(Oe, { status: c })
1351
+ ] })
1352
+ ]
1353
+ }
1354
+ );
1355
+ }, Vo = S(jo), Yo = () => {
1356
+ const { savingsAndCheckingAccountsBalance: t } = Se(), { finstrong: o } = v();
1357
+ return /* @__PURE__ */ a(u, { gap: 16, sx: { p: 16 }, children: [
1358
+ /* @__PURE__ */ e(
1359
+ me,
1360
+ {
1361
+ balance: t,
1362
+ title: o.key_indicators_save.drawer_available_balance
1363
+ }
1364
+ ),
1365
+ /* @__PURE__ */ e(
1366
+ $t,
1367
+ {
1368
+ loadAccounts: [We.SAVINGS, We.CHECKING],
1369
+ loadMoreLabel: o.more_accounts
1370
+ }
1371
+ )
1372
+ ] });
1373
+ }, Xo = S(Yo), Uo = () => {
1374
+ const { finstrong: t } = v(), { healthScore: o, allTransactions: n, loadSpendTransactions: r, loadDebtSpend: c } = R(), { isInitialized: s } = V();
1375
+ h.useEffect(() => {
1376
+ s && (r().finally(), c().finally());
1377
+ }, [s]);
1378
+ const i = h.useMemo(() => {
1379
+ const d = n.spend.map((p) => p.transaction), l = n.debtSpend.map((p) => p.transaction);
1380
+ return [...d, ...l];
1381
+ }, [n.spend, n.debtSpend]);
1382
+ return s ? /* @__PURE__ */ a(u, { gap: 16, sx: { p: 16 }, children: [
1383
+ /* @__PURE__ */ e(
1384
+ me,
1385
+ {
1386
+ balance: o.ninety_day_spend / 90,
1387
+ title: t.key_indicators_save.drawer_daily_spend
1388
+ }
1389
+ ),
1390
+ /* @__PURE__ */ e(Fe, { amountColor: "text.primary", transactions: i })
1391
+ ] }) : /* @__PURE__ */ e(J, {});
1392
+ }, qo = S(Uo), Zo = () => {
1393
+ const [t, o] = h.useState(0), { finstrong: n } = v();
1394
+ return /* @__PURE__ */ a(z, { children: [
1395
+ /* @__PURE__ */ a(j, { children: [
1396
+ /* @__PURE__ */ a(
1397
+ Ke,
1398
+ {
1399
+ "aria-label": n.key_indicators_save.drawer_title,
1400
+ centered: !0,
1401
+ onChange: (r, c) => o(c),
1402
+ sx: { mb: 0 },
1403
+ value: t,
1404
+ variant: "fullWidth",
1405
+ children: [
1406
+ /* @__PURE__ */ e(
1407
+ ae,
1408
+ {
1409
+ "aria-controls": "available-details-tabpanel-0",
1410
+ label: n.key_indicators_save.drawer_available,
1411
+ sx: { minHeight: 44 }
1412
+ }
1413
+ ),
1414
+ /* @__PURE__ */ e(
1415
+ ae,
1416
+ {
1417
+ "aria-controls": "spending-details-tabpanel-1",
1418
+ label: n.key_indicators_save.drawer_spending,
1419
+ sx: { minHeight: 44 }
1420
+ }
1421
+ )
1422
+ ]
1423
+ }
1424
+ ),
1425
+ /* @__PURE__ */ e(ie, { index: 0, name: "available-details", value: t, children: /* @__PURE__ */ e(Xo, {}) }),
1426
+ /* @__PURE__ */ e(ie, { index: 1, name: "spending-details", value: t, children: /* @__PURE__ */ e(qo, {}) })
1427
+ ] }),
1428
+ /* @__PURE__ */ e(Ye, { chartFor: "savingsOverTime" })
1429
+ ] });
1430
+ }, Qo = S(Zo), Jo = () => {
1431
+ const { finstrong: t } = v(), { healthScore: o } = R(), n = o.months_of_cash_on_hand, r = bt(n ? n * 30 : null), c = 183 / 6, s = Math.floor(n), i = Math.round((n - s) * c), d = n / 6 * 100;
1432
+ return /* @__PURE__ */ e(
1433
+ Re,
1434
+ {
1435
+ bottomComponent: /* @__PURE__ */ e(
1436
+ u,
1437
+ {
1438
+ sx: {
1439
+ flexDirection: "row",
1440
+ height: 24,
1441
+ justifyContent: "space-between",
1442
+ mt: 2,
1443
+ px: 1
1444
+ },
1445
+ children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((p) => /* @__PURE__ */ a(
1446
+ u,
1447
+ {
1448
+ sx: {
1449
+ alignItems: "center",
1450
+ height: 24
1451
+ },
1452
+ children: [
1453
+ /* @__PURE__ */ e(
1454
+ ne,
1455
+ {
1456
+ orientation: "vertical",
1457
+ sx: {
1458
+ borderWidth: 1,
1459
+ height: 8
1460
+ }
1461
+ }
1462
+ ),
1463
+ /* @__PURE__ */ e(A, { variant: "XSmall", children: p })
1464
+ ]
1465
+ },
1466
+ p
1467
+ ))
1468
+ }
1469
+ ),
1470
+ label: t.key_indicators_save.drawer_progress_bar_label,
1471
+ status: r,
1472
+ statusBarData: [
1473
+ {
1474
+ percentage: `${d}%`
1475
+ }
1476
+ ],
1477
+ value: X(t.key_indicators_save.drawer_progress_bar_value, s, i)
1478
+ }
1479
+ );
1480
+ }, er = S(Jo), tr = () => {
1481
+ const { healthScore: t } = R(), { finstrong: o } = v(), n = ke(t.debt_to_income_ratio) ?? 0, r = Object.keys(t).length === 0, s = ((i) => r ? "MISSING" : i <= 30 ? "GOOD" : i >= 31 && i <= 39 ? "FAIR" : i >= 40 ? "OFF_TRACK" : "MISSING")(n);
1482
+ return /* @__PURE__ */ e(
1483
+ Re,
1484
+ {
1485
+ bottomComponent: /* @__PURE__ */ a(
1486
+ u,
1487
+ {
1488
+ sx: {
1489
+ alignItems: "flex-end",
1490
+ flexDirection: "row",
1491
+ height: 24,
1492
+ justifyContent: "space-between",
1493
+ mt: 2,
1494
+ position: "relative"
1495
+ },
1496
+ children: [
1497
+ /* @__PURE__ */ e(
1498
+ C,
1499
+ {
1500
+ sx: {
1501
+ left: "30%",
1502
+ position: "absolute",
1503
+ transform: "translateX(-50%)"
1504
+ },
1505
+ children: /* @__PURE__ */ a(
1506
+ u,
1507
+ {
1508
+ sx: {
1509
+ alignItems: "center",
1510
+ flexDirection: "column",
1511
+ height: 24,
1512
+ justifyContent: "flex-end"
1513
+ },
1514
+ children: [
1515
+ /* @__PURE__ */ e(
1516
+ ne,
1517
+ {
1518
+ orientation: "vertical",
1519
+ sx: {
1520
+ borderWidth: 1,
1521
+ height: 8
1522
+ }
1523
+ }
1524
+ ),
1525
+ /* @__PURE__ */ e(A, { sx: { color: "text.primary" }, variant: "XSmall", children: "30%" })
1526
+ ]
1527
+ }
1528
+ )
1529
+ }
1530
+ ),
1531
+ /* @__PURE__ */ e(
1532
+ C,
1533
+ {
1534
+ sx: {
1535
+ display: "flex",
1536
+ flexDirection: "column",
1537
+ height: 24,
1538
+ justifyContent: "center",
1539
+ marginLeft: "auto"
1540
+ },
1541
+ children: /* @__PURE__ */ e(A, { variant: "Small", children: X(
1542
+ o.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_sticky_description,
1543
+ n
1544
+ ) })
1545
+ }
1546
+ )
1547
+ ]
1548
+ }
1549
+ ),
1550
+ label: o.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_sticky_title,
1551
+ status: s,
1552
+ statusBarData: [
1553
+ {
1554
+ percentage: `${n}%`
1555
+ }
1556
+ ],
1557
+ value: B(t.ninety_day_debt_spend, "0,0.00")
1558
+ }
1559
+ );
1560
+ }, nr = S(tr), or = () => {
1561
+ const { healthScore: t, allTransactions: o } = R(), { connect: n, finstrong: r } = v(), [c, s] = h.useState(!1);
1562
+ return /* @__PURE__ */ a(u, { gap: 16, sx: { p: 16 }, children: [
1563
+ /* @__PURE__ */ e(
1564
+ me,
1565
+ {
1566
+ balance: t.ninety_day_income,
1567
+ sx: { flexDirection: "column-reverse" },
1568
+ title: r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_income
1569
+ }
1570
+ ),
1571
+ o.income.length ? (
1572
+ // TODO: Need to add More Transactions functionality
1573
+ /* @__PURE__ */ e(Fe, { transactions: o.income.map((i) => i.transaction) })
1574
+ ) : /* @__PURE__ */ e(
1575
+ $,
1576
+ {
1577
+ onClick: () => {
1578
+ s(!0);
1579
+ },
1580
+ variant: "contained",
1581
+ children: r.connect_more_accounts_button
1582
+ }
1583
+ ),
1584
+ /* @__PURE__ */ e(
1585
+ oe,
1586
+ {
1587
+ onClose: () => s(!1),
1588
+ showConnectWidget: c,
1589
+ title: n.mini_title
1590
+ }
1591
+ )
1592
+ ] });
1593
+ }, rr = S(or), ar = () => {
1594
+ const { allTransactions: t, healthScore: o } = R(), { connect: n, finstrong: r } = v(), [c, s] = h.useState(!1);
1595
+ return /* @__PURE__ */ a(u, { gap: 16, sx: { p: 16 }, children: [
1596
+ /* @__PURE__ */ e(
1597
+ me,
1598
+ {
1599
+ balance: o.ninety_day_debt_spend,
1600
+ sx: { flexDirection: "column-reverse" },
1601
+ title: r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_payments
1602
+ }
1603
+ ),
1604
+ t.debtSpend.length ? (
1605
+ //TODO: Need to add More Transactions functionality
1606
+ /* @__PURE__ */ e(
1607
+ Fe,
1608
+ {
1609
+ amountColor: "text.primary",
1610
+ transactions: t.debtSpend.map((i) => i.transaction)
1611
+ }
1612
+ )
1613
+ ) : /* @__PURE__ */ e(
1614
+ $,
1615
+ {
1616
+ onClick: () => {
1617
+ s(!0);
1618
+ },
1619
+ variant: "contained",
1620
+ children: r.connect_more_accounts_button
1621
+ }
1622
+ ),
1623
+ /* @__PURE__ */ e(
1624
+ oe,
1625
+ {
1626
+ onClose: () => s(!1),
1627
+ showConnectWidget: c,
1628
+ title: n.mini_title
1629
+ }
1630
+ )
1631
+ ] });
1632
+ }, ir = S(ar), sr = ({
1633
+ color: t,
1634
+ data: o,
1635
+ series: n,
1636
+ style: r,
1637
+ ...c
1638
+ }) => {
1639
+ const s = E(), i = h.useRef(null), { width: d } = jn({
1640
+ width: r.width
1641
+ });
1642
+ h.useLayoutEffect(() => {
1643
+ const m = new ResizeObserver(() => {
1644
+ window.requestAnimationFrame(() => {
1645
+ if (i.current) {
1646
+ const { width: g } = i.current.getBoundingClientRect(), b = g / 2, w = i.current.querySelector("text");
1647
+ w && w.setAttribute("transform", `translate(${b}, -8)`);
1648
+ }
1649
+ });
1650
+ });
1651
+ return i.current && m.observe(i.current), () => {
1652
+ i.current && m.unobserve(i.current);
1653
+ };
1654
+ }, []);
1655
+ const { formattedComparison: l, formattedMain: p } = o[n.index], _ = n.type === 0 ? p : l;
1656
+ return /* @__PURE__ */ a("g", { children: [
1657
+ /* @__PURE__ */ e(ot.rect, { ...c, fill: t, ref: i, rx: 2, style: r }),
1658
+ /* @__PURE__ */ e(
1659
+ ot.text,
1660
+ {
1661
+ fill: s.palette.text.secondary,
1662
+ fontSize: 9,
1663
+ fontWeight: 400,
1664
+ textAnchor: "middle",
1665
+ transform: d.to((m) => `translate(${m / 2}, -5)`),
1666
+ x: r.x,
1667
+ y: r.y,
1668
+ children: _
1669
+ }
1670
+ )
1671
+ ] });
1672
+ }, Wt = ({
1673
+ chartFor: t,
1674
+ data: o,
1675
+ title: n,
1676
+ buttonLabel: r,
1677
+ onClick: c,
1678
+ legendLabelMain: s,
1679
+ legendLabelComparison: i,
1680
+ totalComparison: d,
1681
+ totalMain: l
1682
+ }) => {
1683
+ const p = E(), _ = Gn(p.breakpoints.down("xs")), m = h.useMemo(
1684
+ () => o.sort((y, k) => y.month - k.month).map((y) => {
1685
+ const k = gn(y.month), D = {
1686
+ spending_vs_income: {
1687
+ main: y.standard_spend,
1688
+ comparison: y.income,
1689
+ formattedMain: B(y.standard_spend, "0.0a"),
1690
+ formattedComparison: B(y.income, "0.0a")
1691
+ },
1692
+ debt_payment_vs_income: {
1693
+ main: y.income,
1694
+ comparison: y.debt_spend,
1695
+ formattedMain: B(y.income, "0.0a"),
1696
+ formattedComparison: B(y.debt_spend, "0.0a")
1697
+ }
1698
+ };
1699
+ return {
1700
+ label: k,
1701
+ ...D[t]
1702
+ };
1703
+ }),
1704
+ [o, t]
1705
+ ), g = {
1706
+ dataKey: "label",
1707
+ scaleType: "band"
1708
+ }, b = Math.max(...m.map((y) => Math.max(y.main, y.comparison))), w = Math.ceil(b * 1.2 / 1e3) * 1e3, f = w / 3, x = {
1709
+ scaleType: "linear",
1710
+ min: 0,
1711
+ max: w,
1712
+ tickNumber: 4,
1713
+ tickMinStep: f,
1714
+ valueFormatter: (y) => y === 0 ? "$0" : `$${(y / 1e3).toFixed(0)}K`
1715
+ };
1716
+ return /* @__PURE__ */ a(
1717
+ j,
1718
+ {
1719
+ sx: {
1720
+ px: 16,
1721
+ py: 24
1722
+ },
1723
+ children: [
1724
+ /* @__PURE__ */ a(
1725
+ u,
1726
+ {
1727
+ sx: {
1728
+ alignItems: "center",
1729
+ flexDirection: "row",
1730
+ justifyContent: "space-between",
1731
+ gap: 12,
1732
+ pb: 8
1733
+ },
1734
+ children: [
1735
+ /* @__PURE__ */ e(K, { children: n }),
1736
+ r && /* @__PURE__ */ e(
1737
+ $,
1738
+ {
1739
+ endIcon: /* @__PURE__ */ e(Z, {}),
1740
+ onClick: c,
1741
+ size: "small",
1742
+ sx: {
1743
+ pl: 8,
1744
+ height: 24
1745
+ },
1746
+ variant: "text",
1747
+ children: r
1748
+ }
1749
+ )
1750
+ ]
1751
+ }
1752
+ ),
1753
+ /* @__PURE__ */ a(u, { sx: { alignItems: "center", flexDirection: "row", gap: 24, py: 4 }, children: [
1754
+ /* @__PURE__ */ a(u, { sx: { gap: 8, alignItems: "center", flexDirection: "row" }, children: [
1755
+ /* @__PURE__ */ e(
1756
+ C,
1757
+ {
1758
+ sx: {
1759
+ width: 10,
1760
+ height: 10,
1761
+ backgroundColor: "chartMono.chartMono3",
1762
+ borderRadius: "2px"
1763
+ }
1764
+ }
1765
+ ),
1766
+ /* @__PURE__ */ a(u, { sx: { alignItems: "center", flexDirection: "row" }, children: [
1767
+ /* @__PURE__ */ a(A, { variant: "subtitle2", children: [
1768
+ s,
1769
+ " "
1770
+ ] }),
1771
+ !_ && l && /* @__PURE__ */ e(A, { bold: !0, sx: { fontWeight: 700 }, variant: "subtitle2", children: l })
1772
+ ] })
1773
+ ] }),
1774
+ /* @__PURE__ */ a(u, { alignItems: "center", direction: "row", spacing: 8, children: [
1775
+ /* @__PURE__ */ e(
1776
+ C,
1777
+ {
1778
+ sx: {
1779
+ width: 10,
1780
+ height: 10,
1781
+ backgroundColor: "chartMono.chartMono5",
1782
+ borderRadius: "2px"
1783
+ }
1784
+ }
1785
+ ),
1786
+ /* @__PURE__ */ a(u, { sx: { alignItems: "center", flexDirection: "row" }, children: [
1787
+ /* @__PURE__ */ a(A, { variant: "subtitle2", children: [
1788
+ i,
1789
+ " "
1790
+ ] }),
1791
+ !_ && d && /* @__PURE__ */ e(A, { bold: !0, sx: { fontWeight: 700 }, variant: "subtitle2", children: d })
1792
+ ] })
1793
+ ] })
1794
+ ] }),
1795
+ /* @__PURE__ */ a(
1796
+ Kn,
1797
+ {
1798
+ colors: [`${p.palette.chartMono.chartMono3}`, `${p.palette.chartMono.chartMono5}`],
1799
+ dataset: m,
1800
+ height: 240,
1801
+ margin: { top: 20, bottom: 30, right: 10, left: 43 },
1802
+ series: [
1803
+ { dataKey: "main", type: "bar" },
1804
+ { dataKey: "comparison", type: "bar" }
1805
+ ],
1806
+ xAxis: [g],
1807
+ yAxis: [x],
1808
+ children: [
1809
+ /* @__PURE__ */ e(
1810
+ Yt,
1811
+ {
1812
+ slots: {
1813
+ bar: (y) => {
1814
+ const { ownerState: k, style: D, ...I } = y;
1815
+ return /* @__PURE__ */ e(
1816
+ sr,
1817
+ {
1818
+ ...I,
1819
+ color: k.color,
1820
+ data: m,
1821
+ series: {
1822
+ index: k.dataIndex,
1823
+ type: Number(k.id.toString().split("-").pop())
1824
+ },
1825
+ style: D
1826
+ }
1827
+ );
1828
+ }
1829
+ }
1830
+ }
1831
+ ),
1832
+ /* @__PURE__ */ e(
1833
+ Hn,
1834
+ {
1835
+ sx: () => ({
1836
+ ".MuiChartsAxis-line": {
1837
+ stroke: p.palette.divider
1838
+ },
1839
+ ".MuiChartsAxis-tick": {
1840
+ stroke: p.palette.divider
1841
+ },
1842
+ ".MuiChartsAxis-tickLabel": {
1843
+ transform: "translateY(10px)"
1844
+ }
1845
+ }),
1846
+ tickLabelStyle: {
1847
+ fontSize: 11,
1848
+ fill: "text.secondary"
1849
+ }
1850
+ }
1851
+ ),
1852
+ /* @__PURE__ */ e(
1853
+ Nn,
1854
+ {
1855
+ sx: () => ({
1856
+ ".MuiChartsAxis-line": {
1857
+ stroke: p.palette.divider
1858
+ },
1859
+ ".MuiChartsAxis-tick": {
1860
+ stroke: p.palette.divider
1861
+ },
1862
+ ".MuiChartsAxis-tickLabel": {
1863
+ transform: "translateX(-8px)"
1864
+ }
1865
+ }),
1866
+ tickLabelStyle: {
1867
+ fontSize: 11,
1868
+ fill: "text.secondary"
1869
+ }
1870
+ }
1871
+ )
1872
+ ]
1873
+ }
1874
+ )
1875
+ ]
1876
+ }
1877
+ );
1878
+ }, cr = () => {
1879
+ const { loadDebtSpend: t, loadIncome: o, monthlySummaries: n } = R(), { isInitialized: r } = V(), [c, s] = h.useState(0), { finstrong: i } = v();
1880
+ return h.useEffect(() => {
1881
+ r && (t().finally(), o().finally());
1882
+ }, [r]), /* @__PURE__ */ a(z, { children: [
1883
+ /* @__PURE__ */ a(j, { children: [
1884
+ /* @__PURE__ */ a(
1885
+ Ke,
1886
+ {
1887
+ "aria-label": i.key_indicators_save.drawer_title,
1888
+ centered: !0,
1889
+ onChange: (d, l) => s(l),
1890
+ sx: { mb: 0 },
1891
+ value: c,
1892
+ variant: "fullWidth",
1893
+ children: [
1894
+ /* @__PURE__ */ e(
1895
+ ae,
1896
+ {
1897
+ "aria-controls": "income-details-tabpanel-0",
1898
+ id: "income-details-tab-0",
1899
+ label: i.key_indicators_borrow.have_manageable_debt_drawer.income,
1900
+ sx: { minHeight: 44 }
1901
+ }
1902
+ ),
1903
+ /* @__PURE__ */ e(
1904
+ ae,
1905
+ {
1906
+ "aria-controls": "debt-payment-details-tabpanel-1",
1907
+ id: "debt-payment-details-tab-1",
1908
+ label: i.key_indicators_borrow.have_manageable_debt_drawer.debt_payment,
1909
+ sx: { minHeight: 44 }
1910
+ }
1911
+ )
1912
+ ]
1913
+ }
1914
+ ),
1915
+ /* @__PURE__ */ e(
1916
+ ie,
1917
+ {
1918
+ "aria-labelledby": "income-details-tab-0",
1919
+ index: 0,
1920
+ name: "income-details",
1921
+ value: c,
1922
+ children: /* @__PURE__ */ e(rr, {})
1923
+ }
1924
+ ),
1925
+ /* @__PURE__ */ e(
1926
+ ie,
1927
+ {
1928
+ "aria-labelledby": "debt-payment-details-tab-1",
1929
+ index: 1,
1930
+ name: "debt-payment-details",
1931
+ value: c,
1932
+ children: /* @__PURE__ */ e(ir, {})
1933
+ }
1934
+ )
1935
+ ] }),
1936
+ n.length ? /* @__PURE__ */ a(z, { children: [
1937
+ /* @__PURE__ */ e(
1938
+ Wt,
1939
+ {
1940
+ chartFor: "debt_payment_vs_income",
1941
+ data: n,
1942
+ legendLabelComparison: i.key_indicators_borrow.have_manageable_debt_drawer.debt_payment,
1943
+ legendLabelMain: i.key_indicators_borrow.have_manageable_debt_drawer.income,
1944
+ title: i.key_indicators_borrow.have_manageable_debt_drawer.debt_payment
1945
+ }
1946
+ ),
1947
+ /* @__PURE__ */ e(Ye, { chartFor: "debtOverTime" })
1948
+ ] }) : /* @__PURE__ */ a(z, { children: [
1949
+ /* @__PURE__ */ e(
1950
+ Ae,
1951
+ {
1952
+ header: i.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_double_bar_chart_empty_state_header,
1953
+ icon: "multiline_chart",
1954
+ subText: i.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_double_bar_chart_empty_state_description,
1955
+ sx: {
1956
+ backgroundColor: "background.paper",
1957
+ borderRadius: "8px",
1958
+ boxShadow: 1,
1959
+ p: 24,
1960
+ pb: 48
1961
+ },
1962
+ variant: "no-buttons"
1963
+ }
1964
+ ),
1965
+ /* @__PURE__ */ e(
1966
+ Ae,
1967
+ {
1968
+ header: i.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_line_chart_empty_state_header,
1969
+ icon: "multiline_chart",
1970
+ subText: i.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_line_chart_empty_state_description,
1971
+ sx: {
1972
+ backgroundColor: "background.paper",
1973
+ borderRadius: "8px",
1974
+ boxShadow: 1,
1975
+ p: 24,
1976
+ pb: 48
1977
+ },
1978
+ variant: "no-buttons"
1979
+ }
1980
+ )
1981
+ ] })
1982
+ ] });
1983
+ }, lr = S(cr), dr = () => {
1984
+ const { healthScore: t } = R(), { finstrong: o } = v(), n = ke(t.spend_to_income_ratio) ?? 0, r = Object.keys(t).length === 0, s = ((d) => r ? "MISSING" : d < 100 ? "GOOD" : d >= 100 && d <= 109 ? "FAIR" : d >= 110 ? "OFF_TRACK" : "MISSING")(n), i = {
1985
+ GOOD: [{ percentage: `${n}%` }],
1986
+ FAIR: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
1987
+ OFF_TRACK: [{ percentage: "100%" }, { percentage: `${n - 100}%` }],
1988
+ MISSING: [{ percentage: "0%" }]
1989
+ }[s];
1990
+ return /* @__PURE__ */ e(
1991
+ Re,
1992
+ {
1993
+ bottomComponent: /* @__PURE__ */ a(
1994
+ u,
1995
+ {
1996
+ sx: {
1997
+ flexDirection: "row",
1998
+ justifyContent: "space-between",
1999
+ alignItems: "center",
2000
+ mt: 8
2001
+ },
2002
+ children: [
2003
+ /* @__PURE__ */ a(A, { variant: "body2", children: [
2004
+ r ? "-" : B(t.ninety_day_income, "0,0.00"),
2005
+ " ",
2006
+ o?.key_indicators_spend.spend_less_than_you_make_drawer.income
2007
+ ] }),
2008
+ /* @__PURE__ */ a(A, { variant: "body2", children: [
2009
+ r ? "-%" : `${n}%`,
2010
+ " ",
2011
+ o?.key_indicators_spend.spend_less_than_you_make_drawer.spent
2012
+ ] })
2013
+ ]
2014
+ }
2015
+ ),
2016
+ label: o?.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_sticky_description,
2017
+ status: s,
2018
+ statusBarData: i,
2019
+ value: r ? "$0" : B(t.ninety_day_spend, "0,0.00")
2020
+ }
2021
+ );
2022
+ }, pr = S(dr), ur = () => {
2023
+ const t = E(), { monthlySummaries: o } = R(), { finstrong: n, goals: r, spending: c } = v(), { selectedAccounts: s } = V(), { categories: i, dateRangeCategoryTotals: d, loadDateRangeCategoryTotals: l } = He(), { appDataStore: p } = wn(), [_, m] = h.useState("");
2024
+ h.useEffect(() => {
2025
+ l(
2026
+ s,
2027
+ It(/* @__PURE__ */ new Date()),
2028
+ Tt(/* @__PURE__ */ new Date())
2029
+ ).finally();
2030
+ }, [s]);
2031
+ const g = h.useMemo(
2032
+ () => Vn(i, r, t, d),
2033
+ [i, d]
2034
+ ), b = (x) => {
2035
+ m(_ === x ? "" : x);
2036
+ }, { totalSpending: w, totalIncome: f } = h.useMemo(() => o?.reduce(
2037
+ (x, { standard_spend: y = 0, income: k = 0 }) => ({
2038
+ totalSpending: x.totalSpending + y,
2039
+ totalIncome: x.totalIncome + k
2040
+ }),
2041
+ { totalSpending: 0, totalIncome: 0 }
2042
+ ), [o]);
2043
+ return /* @__PURE__ */ a(u, { sx: { gap: 24 }, children: [
2044
+ o.length ? /* @__PURE__ */ e(
2045
+ Wt,
2046
+ {
2047
+ ...p.appData.client_profile?.allow_trends_widget && {
2048
+ buttonLabel: n.key_indicators_spend.spend_less_than_you_make_drawer.view_more
2049
+ },
2050
+ chartFor: "spending_vs_income",
2051
+ data: o,
2052
+ legendLabelComparison: n.key_indicators_spend.spend_less_than_you_make_drawer.income,
2053
+ legendLabelMain: n.key_indicators_spend.spend_less_than_you_make_drawer.spending,
2054
+ title: n.key_indicators_spend.spend_less_than_you_make_drawer.trends,
2055
+ totalComparison: B(f, "0,0.00"),
2056
+ totalMain: B(w, "0,0.00")
2057
+ }
2058
+ ) : /* @__PURE__ */ e(
2059
+ Ae,
2060
+ {
2061
+ header: n.key_indicators_spend.spend_less_than_you_make_drawer.trends_zero_state_title,
2062
+ icon: "multiline_chart",
2063
+ subText: n.key_indicators_spend.spend_less_than_you_make_drawer.trends_zero_state_description,
2064
+ sx: {
2065
+ backgroundColor: "background.paper",
2066
+ borderRadius: "8px",
2067
+ boxShadow: 1,
2068
+ p: 24,
2069
+ pb: 48,
2070
+ ".empty-state-subtext": {
2071
+ fontSize: 15,
2072
+ lineHeight: "24px",
2073
+ mt: 8
2074
+ }
2075
+ },
2076
+ variant: "no-buttons"
2077
+ }
2078
+ ),
2079
+ g ? /* @__PURE__ */ a(
2080
+ j,
2081
+ {
2082
+ sx: {
2083
+ px: 16,
2084
+ py: 24
2085
+ },
2086
+ children: [
2087
+ /* @__PURE__ */ a(
2088
+ u,
2089
+ {
2090
+ sx: {
2091
+ alignItems: "center",
2092
+ flexDirection: "row",
2093
+ justifyContent: "space-between",
2094
+ gap: 12,
2095
+ pb: 8
2096
+ },
2097
+ children: [
2098
+ /* @__PURE__ */ e(K, { children: n.key_indicators_spend.spend_less_than_you_make_drawer.spending }),
2099
+ p.appData.client_profile?.allow_spending_widget && /* @__PURE__ */ e(
2100
+ $,
2101
+ {
2102
+ endIcon: /* @__PURE__ */ e(Z, {}),
2103
+ size: "small",
2104
+ sx: {
2105
+ pl: 8,
2106
+ height: 24
2107
+ },
2108
+ variant: "text",
2109
+ children: n.key_indicators_spend.spend_less_than_you_make_drawer.view_more
2110
+ }
2111
+ )
2112
+ ]
2113
+ }
2114
+ ),
2115
+ /* @__PURE__ */ a(u, { sx: { gap: 12, py: 16, flexDirection: "row", justifyContent: "center" }, children: [
2116
+ /* @__PURE__ */ e(
2117
+ Yn,
2118
+ {
2119
+ data: g,
2120
+ onSelected: b,
2121
+ selectedId: _,
2122
+ totalLabel: c.total_spending
2123
+ }
2124
+ ),
2125
+ /* @__PURE__ */ e(
2126
+ Xn,
2127
+ {
2128
+ data: g,
2129
+ onSelected: b,
2130
+ selectedId: _
2131
+ }
2132
+ )
2133
+ ] })
2134
+ ]
2135
+ }
2136
+ ) : /* @__PURE__ */ e(
2137
+ Ae,
2138
+ {
2139
+ header: n.key_indicators_spend.spend_less_than_you_make_drawer.spending_zero_state_title,
2140
+ icon: "donut_small",
2141
+ subText: n.key_indicators_spend.spend_less_than_you_make_drawer.spending_zero_state_description,
2142
+ sx: {
2143
+ backgroundColor: "background.paper",
2144
+ borderRadius: "8px",
2145
+ boxShadow: 1,
2146
+ p: 24,
2147
+ pb: 48,
2148
+ ".empty-state-subtext": {
2149
+ fontSize: 15,
2150
+ lineHeight: "24px",
2151
+ mt: 8
2152
+ }
2153
+ },
2154
+ variant: "no-buttons"
2155
+ }
2156
+ )
2157
+ ] });
2158
+ }, _r = S(ur), Le = {
2159
+ credit_score_description: "Credit scores usually go from 300 to 850. Think of 700+ as good, 800+ as awesome, and below 600 as needing work. You can often check yours for free with your bank or credit card company.",
2160
+ maintain_emergency_savings_description: "With at least $1,000 saved, you're ready for surprises, freeing you to save for major goals.",
2161
+ maintain_emergency_savings_title: "Maintain Emergency Savings"
2162
+ }, hr = ({
2163
+ drawerFor: t,
2164
+ isOpen: o,
2165
+ onClose: n
2166
+ }) => {
2167
+ const { finstrong: r } = v(), s = {
2168
+ spendLessThanYouMake: {
2169
+ title: r.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_title,
2170
+ description: r.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_description,
2171
+ stickyComponent: /* @__PURE__ */ e(pr, {}),
2172
+ content: /* @__PURE__ */ e(_r, {}),
2173
+ drawerType: "connectDrawer",
2174
+ connectTitle: r.connect_your_accounts,
2175
+ connectDescription: r.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
2176
+ },
2177
+ payBillsOnTime: {
2178
+ title: r.key_indicators_spend.pay_bills_on_time_drawer.pay_bills_on_time_title,
2179
+ description: r.key_indicators_spend.pay_bills_on_time_drawer.pay_bills_on_time_description,
2180
+ stickyComponent: /* @__PURE__ */ e(Vo, {}),
2181
+ content: /* @__PURE__ */ e(Ko, {}),
2182
+ drawerType: "connectDrawer",
2183
+ connectTitle: r.connect_your_accounts,
2184
+ connectDescription: r.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
2185
+ },
2186
+ maintainEmergencySavings: {
2187
+ content: /* @__PURE__ */ e(Lo, {}),
2188
+ description: Le.maintain_emergency_savings_description,
2189
+ stickyComponent: /* @__PURE__ */ e(Eo, {}),
2190
+ title: Le.maintain_emergency_savings_title,
2191
+ drawerType: "connectDrawer",
2192
+ connectTitle: r.connect_your_accounts,
2193
+ connectDescription: r.connect_more_accounts_to_unlock_a_fuller_understanding_of_your_finances
2194
+ },
2195
+ haveManageableDebt: {
2196
+ title: r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_title,
2197
+ description: r.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_description,
2198
+ stickyComponent: /* @__PURE__ */ e(nr, {}),
2199
+ content: /* @__PURE__ */ e(lr, {}),
2200
+ drawerType: "connectDrawer",
2201
+ connectTitle: r.dont_see_all_your_accounts,
2202
+ connectDescription: r.connect_more_accounts_to_view_more_accurate_financial_picture
2203
+ },
2204
+ haveAGoodCreditScore: {
2205
+ title: /* @__PURE__ */ e(Mo, {}),
2206
+ description: Le.credit_score_description,
2207
+ stickyComponent: null,
2208
+ content: /* @__PURE__ */ e(vo, {})
2209
+ },
2210
+ saveEnoughToLiveOn: {
2211
+ title: r.key_indicators_save.drawer_title,
2212
+ description: r.key_indicators_save.drawer_description,
2213
+ stickyComponent: /* @__PURE__ */ e(er, {}),
2214
+ content: /* @__PURE__ */ e(Qo, {}),
2215
+ drawerType: "connectDrawer",
2216
+ connectTitle: r.dont_see_all_your_accounts,
2217
+ connectDescription: r.connect_more_accounts_to_view_more_accurate_financial_picture
2218
+ }
2219
+ }[t];
2220
+ return /* @__PURE__ */ e(
2221
+ Bt,
2222
+ {
2223
+ connectDescription: s?.connectDescription,
2224
+ connectTitle: s?.connectTitle,
2225
+ description: s?.description,
2226
+ drawerTitle: r.key_indicators,
2227
+ drawerType: s.drawerType,
2228
+ isOpen: o,
2229
+ loadConnectAccountsCard: !0,
2230
+ onClose: n,
2231
+ stickyComponent: s.stickyComponent,
2232
+ title: s.title,
2233
+ children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: s.content })
2234
+ }
2235
+ );
2236
+ }, mr = S(hr), he = ({
2237
+ drawerFor: t,
2238
+ title: o,
2239
+ description: n,
2240
+ cardState: r = "MISSING"
2241
+ }) => {
2242
+ const [c, s] = h.useState(!1);
2243
+ return /* @__PURE__ */ a(z, { children: [
2244
+ /* @__PURE__ */ a(
2245
+ u,
2246
+ {
2247
+ onClick: () => s(!0),
2248
+ sx: {
2249
+ alignItems: "center",
2250
+ flexDirection: "row",
2251
+ justifyContent: "space-between",
2252
+ gap: 12,
2253
+ p: 16,
2254
+ border: "1px solid",
2255
+ borderColor: "divider",
2256
+ borderRadius: 2,
2257
+ cursor: "pointer"
2258
+ },
2259
+ children: [
2260
+ /* @__PURE__ */ a(u, { sx: { gap: 4 }, children: [
2261
+ /* @__PURE__ */ a(u, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
2262
+ /* @__PURE__ */ e(M, { sx: { fontWeight: 600 }, variant: "body1", children: o }),
2263
+ /* @__PURE__ */ e(Oe, { status: r })
2264
+ ] }),
2265
+ /* @__PURE__ */ e(M, { color: "secondary", variant: "subtitle2", children: n })
2266
+ ] }),
2267
+ /* @__PURE__ */ e(Z, { color: "secondary", size: 24 })
2268
+ ]
2269
+ }
2270
+ ),
2271
+ /* @__PURE__ */ e(
2272
+ mr,
2273
+ {
2274
+ drawerFor: t,
2275
+ isOpen: c,
2276
+ onClose: () => s(!1)
2277
+ }
2278
+ )
2279
+ ] });
2280
+ }, gr = () => {
2281
+ const { finstrong: t } = v(), { key_indicators_spend: o } = t, { healthScore: n } = R(), r = (i) => {
2282
+ const d = bn(i), l = {
2283
+ GOOD: o.ratio_good_description,
2284
+ FAIR: o.ratio_fair_description,
2285
+ OFF_TRACK: o.ratio_off_track_description,
2286
+ MISSING: o.ratio_missing_description
2287
+ }, p = d === "MISSING" ? l[d] : X(l[d], i);
2288
+ return {
2289
+ cardState: d,
2290
+ description: p,
2291
+ title: o.ratio_card_title
2292
+ };
2293
+ }, { spendToIncomeRatio: c, spendFeeCount: s } = h.useMemo(() => {
2294
+ const i = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, d = r(i), l = yn(
2295
+ n.spending_fee_transaction_count,
2296
+ o
2297
+ );
2298
+ return { spendToIncomeRatio: d, spendFeeCount: l };
2299
+ }, [
2300
+ n.spend_to_income_ratio,
2301
+ n.spending_fee_transaction_count,
2302
+ o,
2303
+ t
2304
+ ]);
2305
+ return /* @__PURE__ */ a(u, { sx: { gap: 24, p: 8, pt: 24 }, children: [
2306
+ /* @__PURE__ */ e(
2307
+ he,
2308
+ {
2309
+ cardState: c.cardState,
2310
+ description: c.description,
2311
+ drawerFor: se.SpendLessThanYouMake,
2312
+ title: c.title
2313
+ }
2314
+ ),
2315
+ /* @__PURE__ */ e(
2316
+ he,
2317
+ {
2318
+ cardState: s.cardState,
2319
+ description: s.description,
2320
+ drawerFor: se.PayBillsOnTime,
2321
+ title: s.title
2322
+ }
2323
+ )
2324
+ ] });
2325
+ }, yr = S(gr), br = () => {
2326
+ const { healthScore: t } = R(), { finstrong: o } = v(), { key_indicators_save: n } = o, r = (d) => {
2327
+ const l = bt(d), p = {
2328
+ GOOD: n.days_of_cash_good_description,
2329
+ FAIR: n.days_of_cash_fair_description,
2330
+ OFF_TRACK: n.days_of_cash_off_track_description,
2331
+ MISSING: n.days_of_cash_missing_description
2332
+ }, _ = l === "MISSING" ? p[l] : X(p[l], d);
2333
+ return {
2334
+ cardState: l,
2335
+ description: _,
2336
+ title: n.days_of_cash_title
2337
+ };
2338
+ }, c = (d) => {
2339
+ const l = yt(d), p = {
2340
+ GOOD: n.emergency_savings_good_description,
2341
+ FAIR: n.emergency_savings_fair_description,
2342
+ OFF_TRACK: n.emergency_savings_off_track_description,
2343
+ MISSING: n.emergency_savings_missing_description
2344
+ };
2345
+ let _;
2346
+ return l === "FAIR" && d !== null ? _ = X(
2347
+ p[l],
2348
+ B(d, "0,0.00")
2349
+ ) : _ = p[l], {
2350
+ cardState: l,
2351
+ description: _,
2352
+ title: n.emergency_savings_title
2353
+ };
2354
+ }, { daysOfCashOnHand: s, emergencySavings: i } = h.useMemo(() => {
2355
+ const d = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null, l = r(d), p = t.emergency_savings_on_hand !== null ? Math.round(t.emergency_savings_on_hand) : null, _ = c(p);
2356
+ return { daysOfCashOnHand: l, emergencySavings: _ };
2357
+ }, [
2358
+ t.months_of_cash_on_hand,
2359
+ t.emergency_savings_on_hand,
2360
+ n,
2361
+ o
2362
+ ]);
2363
+ return /* @__PURE__ */ a(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
2364
+ /* @__PURE__ */ e(
2365
+ he,
2366
+ {
2367
+ cardState: s.cardState,
2368
+ description: s.description,
2369
+ drawerFor: se.SaveEnoughToLiveOn,
2370
+ title: s.title
2371
+ }
2372
+ ),
2373
+ /* @__PURE__ */ e(
2374
+ he,
2375
+ {
2376
+ cardState: i.cardState,
2377
+ description: i.description,
2378
+ drawerFor: se.MaintainEmergencySavings,
2379
+ title: i.title
2380
+ }
2381
+ )
2382
+ ] });
2383
+ }, fr = S(br), xr = () => {
2384
+ const { healthScore: t } = R(), { finstrong: o } = v(), { key_indicators_borrow: n } = o, { user: r } = Q(), c = (l) => {
2385
+ const p = fn(l), _ = {
2386
+ GOOD: n.manage_debit_good_description,
2387
+ FAIR: n.manage_debit_fair_description,
2388
+ OFF_TRACK: n.manage_debit_off_track_description,
2389
+ MISSING: n.manage_debit_missing_description
2390
+ }, m = p === "FAIR" || p === "OFF_TRACK" ? X(_[p], l) : _[p];
2391
+ return {
2392
+ cardState: p,
2393
+ description: m,
2394
+ title: n.manage_debit_title
2395
+ };
2396
+ }, s = (l) => {
2397
+ const p = gt(l), _ = {
2398
+ GOOD: n.credit_score_good_description,
2399
+ FAIR: n.credit_score_fair_description,
2400
+ OFF_TRACK: n.credit_score_off_track_description,
2401
+ MISSING: n.credit_score_missing_description
2402
+ }, m = p === "MISSING" ? _[p] : X(_[p], l);
2403
+ return {
2404
+ cardState: p,
2405
+ description: m,
2406
+ title: n.credit_score_title
2407
+ };
2408
+ }, { manageDebtStatus: i, creditScoreStatus: d } = h.useMemo(() => {
2409
+ const l = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, p = c(l), _ = s(r.credit_score || null);
2410
+ return {
2411
+ manageDebtStatus: p,
2412
+ creditScoreStatus: _
2413
+ };
2414
+ }, [t.debt_to_income_ratio, r.credit_score, n, o]);
2415
+ return /* @__PURE__ */ a(u, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
2416
+ /* @__PURE__ */ e(
2417
+ he,
2418
+ {
2419
+ cardState: i.cardState,
2420
+ description: i.description,
2421
+ drawerFor: se.HaveManageableDebt,
2422
+ title: i.title
2423
+ }
2424
+ ),
2425
+ /* @__PURE__ */ e(
2426
+ he,
2427
+ {
2428
+ cardState: d.cardState,
2429
+ description: d.description,
2430
+ drawerFor: se.HaveAGoodCreditScore,
2431
+ title: d.title
2432
+ }
2433
+ )
2434
+ ] });
2435
+ }, Sr = S(xr), Cr = () => {
2436
+ const [t, o] = h.useState(0), { finstrong: n } = v();
2437
+ return /* @__PURE__ */ a(z, { children: [
2438
+ /* @__PURE__ */ a(
2439
+ Ke,
2440
+ {
2441
+ "aria-label": "Key Indicators",
2442
+ centered: !0,
2443
+ onChange: (r, c) => o(c),
2444
+ sx: {
2445
+ mb: 0,
2446
+ "& .MuiTab-root": {
2447
+ minWidth: 0
2448
+ }
2449
+ },
2450
+ textColor: "primary",
2451
+ value: t,
2452
+ variant: "fullWidth",
2453
+ children: [
2454
+ /* @__PURE__ */ e(
2455
+ ae,
2456
+ {
2457
+ "aria-controls": "spend-details-tabpanel-0",
2458
+ icon: /* @__PURE__ */ e(Ee, { sx: { mr: 8 } }),
2459
+ iconPosition: "start",
2460
+ id: "spend-details-tab-0",
2461
+ label: n.key_indicators_spend.title,
2462
+ sx: { minHeight: 44 }
2463
+ }
2464
+ ),
2465
+ /* @__PURE__ */ e(
2466
+ ae,
2467
+ {
2468
+ "aria-controls": "save-details-tabpanel-1",
2469
+ icon: /* @__PURE__ */ e(Qt, { sx: { mr: 8 } }),
2470
+ iconPosition: "start",
2471
+ id: "save-details-tab-1",
2472
+ label: n.key_indicators_save.title,
2473
+ sx: { minHeight: 44 }
2474
+ }
2475
+ ),
2476
+ /* @__PURE__ */ e(
2477
+ ae,
2478
+ {
2479
+ "aria-controls": "borrow-details-tabpanel-2",
2480
+ icon: /* @__PURE__ */ e(Jt, { sx: { mr: 8 } }),
2481
+ iconPosition: "start",
2482
+ id: "borrow-details-tab-2",
2483
+ label: n.key_indicators_borrow.title,
2484
+ sx: { minHeight: 44 }
2485
+ }
2486
+ )
2487
+ ]
2488
+ }
2489
+ ),
2490
+ /* @__PURE__ */ e(ie, { index: 0, name: "spend-details", value: t, children: /* @__PURE__ */ e(yr, {}) }),
2491
+ /* @__PURE__ */ e(ie, { index: 1, name: "save-details", value: t, children: /* @__PURE__ */ e(fr, {}) }),
2492
+ /* @__PURE__ */ e(ie, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(Sr, {}) })
2493
+ ] });
2494
+ }, vr = S(Cr), wr = ({ onClick: t }) => {
2495
+ const { finstrong: o } = v(), { isCopyLoaded: n } = V();
2496
+ return n ? /* @__PURE__ */ a(u, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
2497
+ /* @__PURE__ */ e(ut, { size: 48 }),
2498
+ /* @__PURE__ */ a(u, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
2499
+ /* @__PURE__ */ e(K, { children: o.missing_data_title }),
2500
+ /* @__PURE__ */ e(M, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: o.missing_data_description })
2501
+ ] }),
2502
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
2503
+ $,
2504
+ {
2505
+ endIcon: /* @__PURE__ */ e(Z, {}),
2506
+ onClick: t,
2507
+ size: "small",
2508
+ sx: {
2509
+ fontSize: 13,
2510
+ ":hover": {
2511
+ bgcolor: "transparent"
2512
+ }
2513
+ },
2514
+ variant: "text",
2515
+ children: o.connect_more_accounts_button
2516
+ }
2517
+ ) })
2518
+ ] }) : /* @__PURE__ */ e(J, {});
2519
+ }, kr = S(wr), Mr = {
2520
+ add_more_income: "Add More Income"
2521
+ }, Dr = ({
2522
+ incomeTransactions: t,
2523
+ setCurrentStep: o,
2524
+ transaction: n
2525
+ }) => /* @__PURE__ */ a(h.Fragment, { children: [
2526
+ /* @__PURE__ */ a(u, { children: [
2527
+ !!t.length && /* @__PURE__ */ e(C, { sx: { pb: 24 }, children: t.reduce((r, c, s) => {
2528
+ if (c.guid === n.guid) return r;
2529
+ const i = ze(s, t), d = Mt(s, t);
2530
+ return r.push(
2531
+ /* @__PURE__ */ a(h.Fragment, { children: [
2532
+ i && /* @__PURE__ */ e(Dt, { children: Ve(c.date) }),
2533
+ /* @__PURE__ */ e(At, { transaction: c }),
2534
+ /* @__PURE__ */ e(ne, { sx: { ml: d ? 44 : 0 } })
2535
+ ] }, c.guid)
2536
+ ), r;
2537
+ }, []) }),
2538
+ /* @__PURE__ */ e(
2539
+ qn,
2540
+ {
2541
+ firstDay: 1,
2542
+ frequency: Fn.EveryMonth,
2543
+ onFirstDayChange: () => {
2544
+ },
2545
+ onFrequencyChange: () => {
2546
+ },
2547
+ onSecondDayChange: () => {
2548
+ },
2549
+ secondDay: 15,
2550
+ transaction: n
2551
+ }
2552
+ )
2553
+ ] }),
2554
+ /* @__PURE__ */ e(C, { sx: { px: 24 }, children: /* @__PURE__ */ e(
2555
+ $,
2556
+ {
2557
+ fullWidth: !0,
2558
+ onClick: () => o({ step: O.MonthlyIncome, type: "main" }),
2559
+ startIcon: /* @__PURE__ */ e(_t, {}),
2560
+ children: Mr.add_more_income
2561
+ }
2562
+ ) })
2563
+ ] }), Ar = S(Dr), Ir = {
2564
+ select_date: "Select Date"
2565
+ }, Tr = ({ selectedDate: t, setSelectedDate: o }) => {
2566
+ const n = E(), r = (c) => {
2567
+ o(Math.floor(new Date(c).getTime() / 1e3));
2568
+ };
2569
+ return /* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(Jn, { dateAdapter: Ot, children: /* @__PURE__ */ e(
2570
+ eo,
2571
+ {
2572
+ disableFuture: !0,
2573
+ label: Ir.select_date,
2574
+ onChange: r,
2575
+ slotProps: {
2576
+ nextIconButton: {
2577
+ sx: {
2578
+ color: "primary.main",
2579
+ "&:hover": { bgcolor: _e(n.palette.primary.light, 0.1) }
2580
+ }
2581
+ },
2582
+ previousIconButton: {
2583
+ sx: {
2584
+ color: "primary.main",
2585
+ "&:hover": { bgcolor: _e(n.palette.primary.light, 0.1) }
2586
+ }
2587
+ }
2588
+ },
2589
+ sx: {
2590
+ width: "100%",
2591
+ "& .MuiIconButton-edgeEnd": {
2592
+ color: "primary.main",
2593
+ "&:hover": { bgcolor: _e(n.palette.primary.light, 0.1) }
2594
+ }
2595
+ },
2596
+ value: t ? new Date(t * 1e3) : null
2597
+ }
2598
+ ) }) });
2599
+ }, Or = S(Tr), Rr = {
2600
+ credit_score: "Credit Score"
2601
+ }, Fr = ({ creditScore: t, setCreditScore: o }) => {
2602
+ const n = !isNaN(t);
2603
+ return /* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(
2604
+ Me,
2605
+ {
2606
+ error: !n,
2607
+ fullWidth: !0,
2608
+ inputMode: "numeric",
2609
+ inputProps: {
2610
+ noValidate: !0,
2611
+ pattern: "[0-9]*"
2612
+ },
2613
+ label: Rr.credit_score,
2614
+ onChange: (r) => o(Number(r.target.value)),
2615
+ value: n ? t : ""
2616
+ }
2617
+ ) });
2618
+ }, Pr = S(Fr), zt = ({ value: t, completeCopy: o }) => /* @__PURE__ */ a(u, { sx: { gap: 8 }, children: [
2619
+ /* @__PURE__ */ e(u, { sx: { flexDirection: "row", gap: 4 }, children: Array.from({ length: 4 }).map((n, r) => /* @__PURE__ */ e(
2620
+ C,
2621
+ {
2622
+ sx: {
2623
+ bgcolor: r < t ? "primary.main" : "neutral.light",
2624
+ borderRadius: "24px",
2625
+ height: 4,
2626
+ width: "100%"
2627
+ }
2628
+ },
2629
+ r
2630
+ )) }),
2631
+ /* @__PURE__ */ a(A, { sx: { color: "text.secondary" }, variant: "body2", children: [
2632
+ t / 4 * 100,
2633
+ "% ",
2634
+ o
2635
+ ] })
2636
+ ] }), Br = ({
2637
+ completeCopy: t,
2638
+ primaryText: o,
2639
+ secondaryText: n,
2640
+ value: r
2641
+ }) => /* @__PURE__ */ a(u, { sx: { gap: 20, p: 24 }, children: [
2642
+ /* @__PURE__ */ a(u, { sx: { gap: 8 }, children: [
2643
+ /* @__PURE__ */ e(K, { children: o }),
2644
+ /* @__PURE__ */ e(M, { variant: "subtitle1", children: n })
2645
+ ] }),
2646
+ /* @__PURE__ */ e(zt, { completeCopy: t, value: r })
2647
+ ] }), ct = {
2648
+ step: O.ConnectAccounts,
2649
+ type: "main"
2650
+ }, F = {
2651
+ add_accounts: "Add Accounts",
2652
+ add_income_primary: "What is your monthly income?",
2653
+ add_income_secondary: "Add your income so that we can accurately measure your financial strength.",
2654
+ add_more_income: "Add More Income",
2655
+ back: "Back",
2656
+ birthday_primary: "When is your birthday?",
2657
+ birthday_secondary: "Get the most helpful tips and see how you’re doing compared to others your age.",
2658
+ calculate_primary: "Calculating now ...",
2659
+ calculate_secondary: "We’re analyzing your financial data to calculate your FinStrong score. Hold tight!",
2660
+ confirm_income: "Confirm Income",
2661
+ connect_accounts: "Connect Accounts",
2662
+ connect_your_accounts_primary: "Connect Your Accounts",
2663
+ connect_your_accounts_secondary: "Connect all of your accounts to get the most accurate FinStrong score.",
2664
+ credit_score_primary: "What is your credit score?",
2665
+ credit_score_secondary: "Your ability to borrow money is a key part of your financial strength score.",
2666
+ do_it_later: "Do It Later",
2667
+ next: "Next"
2668
+ }, Lr = ({ isOpen: t, onClose: o }) => {
2669
+ const { visibleAccounts: n } = Se(), { calculateHealthScore: r } = R(), { finstrong: c } = v(), { setSelectedAccounts: s } = V(), { setDateRange: i } = kn(), { filter: d, setFilter: l, transactions: p } = Mn(), { user: _, userProfile: m, updateUser: g, updateUserProfile: b } = Q(), [w, f] = h.useState(_.credit_score || 0), [x, y] = h.useState(
2670
+ ct
2671
+ ), [k, D] = h.useState([]), [I, N] = h.useState(!1), [G, H] = h.useState(!1), [W, ce] = h.useState(_.birthday), [Y, re] = h.useState("");
2672
+ h.useEffect(() => {
2673
+ i({ start: It(rt()), end: Tt(rt()) });
2674
+ }, []), h.useEffect(() => {
2675
+ l({
2676
+ accounts: n.map((T) => T.guid),
2677
+ dateRange: {
2678
+ start: Un(/* @__PURE__ */ new Date(), 90),
2679
+ end: /* @__PURE__ */ new Date()
2680
+ },
2681
+ custom: at
2682
+ }), s(n);
2683
+ }, [n]);
2684
+ const le = h.useMemo(
2685
+ () => p.find((T) => T.guid === Y),
2686
+ [Y, p]
2687
+ ), ge = h.useMemo(() => ({
2688
+ [O.ConnectAccounts]: !0,
2689
+ [O.MonthlyIncome]: !!Y,
2690
+ [O.Birthday]: !!_.birthday || !!W,
2691
+ [O.CreditScore]: !!_.credit_score || !!w
2692
+ })[x.step], [w, x, W, Y, _]), U = n.length > 0, Pe = h.useMemo(() => {
2693
+ const { step: T } = x;
2694
+ let L = 0;
2695
+ return T >= O.MonthlyIncome && U && L++, T >= O.Birthday && k.length && L++, T >= O.CreditScore && (_.birthday || _.credit_score) && L++, L;
2696
+ }, [x.step, U, k.length, _.birthday, _.credit_score]), Ce = (T) => {
2697
+ l({
2698
+ ...d,
2699
+ custom: (L) => T ? Qn(L, T) : at(L)
2700
+ });
2701
+ }, Et = {
2702
+ [O.ConnectAccounts]: {
2703
+ main: U ? /* @__PURE__ */ e(Lt, { shouldShowBalance: !1 }) : null,
2704
+ mainActionContent: U ? F.next : F.add_accounts,
2705
+ primaryText: F.connect_your_accounts_primary,
2706
+ secondaryText: F.connect_your_accounts_secondary
2707
+ },
2708
+ [O.MonthlyIncome]: {
2709
+ detail: /* @__PURE__ */ e(
2710
+ Ar,
2711
+ {
2712
+ incomeTransactions: k,
2713
+ setCurrentStep: (T) => {
2714
+ y(T), D((L) => {
2715
+ if (L.some((ye) => ye.guid === Y)) return L.filter((ye) => ye.guid !== Y);
2716
+ const Ze = p.find((ye) => ye.guid === Y);
2717
+ return Ze ? [...L, Ze] : L;
2718
+ });
2719
+ },
2720
+ transaction: le
2721
+ }
2722
+ ),
2723
+ detailActionContent: F.confirm_income,
2724
+ main: /* @__PURE__ */ e(
2725
+ Zn,
2726
+ {
2727
+ onSearch: Ce,
2728
+ onSelected: (T) => {
2729
+ y({ step: O.MonthlyIncome, type: "detail" }), re(T);
2730
+ }
2731
+ }
2732
+ ),
2733
+ mainActionContent: F.confirm_income,
2734
+ primaryText: F.add_income_primary,
2735
+ secondaryText: F.add_income_secondary
2736
+ },
2737
+ [O.Birthday]: {
2738
+ main: /* @__PURE__ */ e(Or, { selectedDate: W, setSelectedDate: ce }),
2739
+ mainActionContent: F.next,
2740
+ primaryText: F.birthday_primary,
2741
+ secondaryText: F.birthday_secondary
2742
+ },
2743
+ [O.CreditScore]: {
2744
+ main: /* @__PURE__ */ e(Pr, { creditScore: w, setCreditScore: f }),
2745
+ mainActionContent: F.next,
2746
+ primaryText: F.credit_score_primary,
2747
+ secondaryText: F.credit_score_secondary
2748
+ }
2749
+ }, Xe = () => {
2750
+ y(ct), N(!1), re(""), o();
2751
+ }, Ue = async () => {
2752
+ N(!0), await r(), await b({ ...m, has_completed_finstrong_onboarding: !0 }), Xe();
2753
+ }, Gt = () => {
2754
+ if (x.step === O.CreditScore) {
2755
+ Ue();
2756
+ return;
2757
+ }
2758
+ y({ step: x.step + 1, type: "main" });
2759
+ }, Ht = () => {
2760
+ const { step: T } = x, L = T + 1;
2761
+ switch (T) {
2762
+ case O.Birthday:
2763
+ W && W !== _.birthday && g({ ..._, birthday: W });
2764
+ break;
2765
+ case O.CreditScore:
2766
+ w && w !== _.credit_score && g({ ..._, credit_score: w }), Ue();
2767
+ return;
2768
+ case O.MonthlyIncome:
2769
+ Y && k.length === 0 && D((qe) => [...qe, le]);
2770
+ break;
2771
+ case O.ConnectAccounts:
2772
+ if (!U) {
2773
+ H(!0);
2774
+ return;
2775
+ }
2776
+ break;
2777
+ }
2778
+ L in O && y({ step: L, type: "main" });
2779
+ }, Nt = () => {
2780
+ const { step: T, type: L } = x;
2781
+ if (L === "detail") {
2782
+ y({ step: T, type: "main" });
2783
+ return;
2784
+ }
2785
+ if (T === O.Birthday && k.length) {
2786
+ y({ step: T - 1, type: "detail" });
2787
+ return;
2788
+ }
2789
+ T > O.ConnectAccounts && y({ step: T - 1, type: "main" });
2790
+ }, de = Et[x.step], ve = x.step === O.ConnectAccounts, Kt = {
2791
+ fullWidth: !0,
2792
+ ...ve && !U && { startIcon: /* @__PURE__ */ e(_t, {}) }
2793
+ }, jt = !ve || ve && !U;
2794
+ return /* @__PURE__ */ a(h.Fragment, { children: [
2795
+ /* @__PURE__ */ a(
2796
+ te,
2797
+ {
2798
+ footerStyles: { px: 24, py: 16 },
2799
+ hasSecondaryAction: !ve,
2800
+ isOpen: t,
2801
+ isPrimaryDisabled: !ge,
2802
+ onClose: Xe,
2803
+ onSecondaryAction: Nt,
2804
+ primaryButtonProps: Kt,
2805
+ primaryText: de?.mainActionContent,
2806
+ secondaryColor: "primary",
2807
+ secondaryText: F.back,
2808
+ title: c.title,
2809
+ ...!I && { onPrimaryAction: Ht },
2810
+ children: [
2811
+ I && /* @__PURE__ */ a(u, { sx: { alignItems: "center", gap: 24, position: "relative", px: 16, top: 126 }, children: [
2812
+ /* @__PURE__ */ e(Ie, { children: F.calculate_primary }),
2813
+ /* @__PURE__ */ e(M, { sx: { textAlign: "center" }, variant: "subtitle1", children: F.calculate_secondary })
2814
+ ] }),
2815
+ de && !I && /* @__PURE__ */ a(h.Fragment, { children: [
2816
+ /* @__PURE__ */ e(
2817
+ Br,
2818
+ {
2819
+ completeCopy: c.complete,
2820
+ primaryText: de.primaryText,
2821
+ secondaryText: de.secondaryText,
2822
+ value: Pe
2823
+ }
2824
+ ),
2825
+ x.type === "main" && /* @__PURE__ */ a(C, { children: [
2826
+ de.main,
2827
+ jt && /* @__PURE__ */ e(u, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e($, { fullWidth: !0, onClick: Gt, children: F.do_it_later }) })
2828
+ ] }),
2829
+ x.type === "detail" && de.detail
2830
+ ] })
2831
+ ]
2832
+ }
2833
+ ),
2834
+ /* @__PURE__ */ e(
2835
+ oe,
2836
+ {
2837
+ onClose: () => H(!1),
2838
+ showConnectWidget: G,
2839
+ title: F.connect_accounts
1064
2840
  }
1065
2841
  )
1066
2842
  ] });
1067
- }, Ft = () => {
1068
- const [n, o] = C.useState(0), { finstrong: t } = S();
1069
- return /* @__PURE__ */ u(re, { children: [
1070
- /* @__PURE__ */ u(
1071
- nt,
2843
+ }, $r = S(Lr), $e = {
2844
+ onboarding_title: "Financial Strength Starts Here",
2845
+ onboarding_subtitle: "By analyzing your spending and saving, FinStrong provides a score and guidance to help you improve your financial habits.",
2846
+ get_started: "Get Started"
2847
+ }, Wr = () => {
2848
+ const [t, o] = h.useState(!1);
2849
+ return /* @__PURE__ */ a(h.Fragment, { children: [
2850
+ /* @__PURE__ */ a(
2851
+ u,
1072
2852
  {
1073
- "aria-label": "Key Indicators",
1074
- centered: !0,
1075
- onChange: (i, d) => o(d),
1076
- sx: { mb: 0 },
1077
- textColor: "primary",
1078
- value: n,
1079
- variant: "fullWidth",
2853
+ sx: {
2854
+ alignItems: "center",
2855
+ gap: 48,
2856
+ pb: 24,
2857
+ pt: 72,
2858
+ px: 16
2859
+ },
1080
2860
  children: [
1081
- /* @__PURE__ */ e(
1082
- oe,
1083
- {
1084
- "aria-controls": "spend-details-tabpanel-0",
1085
- icon: /* @__PURE__ */ e(ue, { sx: { mr: 8 } }),
1086
- iconPosition: "start",
1087
- id: "spend-details-tab-0",
1088
- label: t.key_indicators_spend.title,
1089
- sx: { minHeight: 44 }
1090
- }
1091
- ),
1092
- /* @__PURE__ */ e(
1093
- oe,
1094
- {
1095
- "aria-controls": "save-details-tabpanel-1",
1096
- icon: /* @__PURE__ */ e(Ge, { sx: { mr: 8 } }),
1097
- iconPosition: "start",
1098
- id: "save-details-tab-1",
1099
- label: t.key_indicators_save.title,
1100
- sx: { minHeight: 44 }
1101
- }
1102
- ),
1103
- /* @__PURE__ */ e(
1104
- oe,
1105
- {
1106
- "aria-controls": "borrow-details-tabpanel-2",
1107
- icon: /* @__PURE__ */ e(Le, { sx: { mr: 8 } }),
1108
- iconPosition: "start",
1109
- id: "borrow-details-tab-2",
1110
- label: t.key_indicators_borrow.title,
1111
- sx: { minHeight: 44 }
1112
- }
1113
- )
2861
+ /* @__PURE__ */ a(u, { sx: { alignItems: { sm: "center" }, gap: 24, width: "100%" }, children: [
2862
+ /* @__PURE__ */ e(C, { sx: { textAlign: "center" }, children: /* @__PURE__ */ e(en, { size: 72 }) }),
2863
+ /* @__PURE__ */ a(u, { sx: { gap: 4, textAlign: "center", width: { sm: 400 } }, children: [
2864
+ /* @__PURE__ */ e(Ie, { children: $e.onboarding_title }),
2865
+ /* @__PURE__ */ e(M, { sx: { color: "text.secondary" }, variant: "subtitle1", children: $e.onboarding_subtitle })
2866
+ ] })
2867
+ ] }),
2868
+ /* @__PURE__ */ e($, { onClick: () => o(!0), variant: "contained", children: $e.get_started })
1114
2869
  ]
1115
2870
  }
1116
2871
  ),
1117
- /* @__PURE__ */ e(ne, { index: 0, name: "spend-details", value: n, children: /* @__PURE__ */ e(Tt, {}) }),
1118
- /* @__PURE__ */ e(ne, { index: 1, name: "save-details", value: n, children: /* @__PURE__ */ e(wt, {}) }),
1119
- /* @__PURE__ */ e(ne, { index: 2, name: "borrow-details", value: n, children: /* @__PURE__ */ e(Rt, {}) })
2872
+ /* @__PURE__ */ e($r, { isOpen: t, onClose: () => o(!1) })
1120
2873
  ] });
1121
- }, Pt = ({
1122
- additionalContent: n,
1123
- children: o,
1124
- description: t,
1125
- drawerTitle: i,
1126
- isOpen: d,
1127
- loadConnectAccountsCard: l = !0,
1128
- onClose: s,
1129
- stickyComponent: r,
1130
- title: a
1131
- }) => {
1132
- const { finstrong: c } = S(), { isCopyLoaded: p } = z();
1133
- return p ? /* @__PURE__ */ u(V, { isOpen: d, onClose: s, title: i || c.key_indicators, children: [
1134
- (a || t) && /* @__PURE__ */ u(g, { sx: { p: 24, pb: 0, gap: 8, backgroundColor: "background.paper" }, children: [
1135
- a && /* @__PURE__ */ e(H, { children: a }),
1136
- t && /* @__PURE__ */ e(y, { children: t })
2874
+ }, zr = ({ isOpen: t, onClose: o }) => {
2875
+ const { finstrong: n } = v(), r = E(), { updateUser: c, user: s } = Q(), [i, d] = h.useState(s.birthday), l = (_) => {
2876
+ d(Math.floor(new Date(_).getTime() / 1e3));
2877
+ };
2878
+ return /* @__PURE__ */ e(
2879
+ te,
2880
+ {
2881
+ isOpen: t,
2882
+ onClose: o,
2883
+ onPrimaryAction: () => {
2884
+ !i || i === s.birthday || (c({ ...s, birthday: i }), o());
2885
+ },
2886
+ onSecondaryAction: o,
2887
+ title: n.date_of_birth,
2888
+ children: /* @__PURE__ */ e(oo, { dateAdapter: Ot, children: /* @__PURE__ */ e(
2889
+ to,
2890
+ {
2891
+ disableFuture: !0,
2892
+ onChange: l,
2893
+ slotProps: {
2894
+ nextIconButton: {
2895
+ sx: {
2896
+ color: "primary.main",
2897
+ "&:hover": { bgcolor: _e(r.palette.primary.light, 0.1) }
2898
+ }
2899
+ },
2900
+ previousIconButton: {
2901
+ sx: {
2902
+ color: "primary.main",
2903
+ "&:hover": { bgcolor: _e(r.palette.primary.light, 0.1) }
2904
+ }
2905
+ }
2906
+ },
2907
+ slots: {
2908
+ actionBar: () => null,
2909
+ toolbar: () => null
2910
+ },
2911
+ sx: {
2912
+ width: "100%",
2913
+ "& .MuiIconButton-edgeEnd": {
2914
+ color: "primary.main",
2915
+ "&:hover": { bgcolor: _e(r.palette.primary.light, 0.1) }
2916
+ }
2917
+ },
2918
+ value: i ? new Date(i * 1e3) : /* @__PURE__ */ new Date()
2919
+ }
2920
+ ) })
2921
+ }
2922
+ );
2923
+ }, Er = S(zr), Gr = ({ isOpen: t, onClose: o }) => {
2924
+ const { visibleFinstrongAccounts: n } = Se(), { incomeBudget: r } = xt(), {
2925
+ accounts: c,
2926
+ common: s,
2927
+ finstrong: i
2928
+ } = v(), { user: d } = Q(), [l, p] = h.useState(null), m = [
2929
+ {
2930
+ dynamicCopy: i.add_profile_item,
2931
+ fallbackLabel: i.monthly_income,
2932
+ icon: /* @__PURE__ */ e(tn, {}),
2933
+ key: ee.MonthlyIncome,
2934
+ label: i.monthly_income,
2935
+ value: r
2936
+ },
2937
+ {
2938
+ dynamicCopy: i.add_profile_item,
2939
+ fallbackLabel: i.date_of_birth,
2940
+ icon: /* @__PURE__ */ e(nn, {}),
2941
+ key: ee.DateOfBirth,
2942
+ label: i.date_of_birth,
2943
+ value: d.birthday
2944
+ },
2945
+ {
2946
+ dynamicCopy: i.add_profile_item,
2947
+ fallbackLabel: i.credit_score,
2948
+ icon: /* @__PURE__ */ e(Ee, {}),
2949
+ key: ee.CreditScore,
2950
+ label: i.credit_score,
2951
+ value: d.credit_score
2952
+ },
2953
+ {
2954
+ fallbackLabel: i.connect_your_accounts,
2955
+ icon: /* @__PURE__ */ e(pt, {}),
2956
+ key: ee.Connections,
2957
+ label: i.connections,
2958
+ value: n.length > 0 ? X(
2959
+ i.connected_account,
2960
+ String(n.length),
2961
+ n.length > 1 ? i.accounts : i.account
2962
+ ) : void 0
2963
+ }
2964
+ ].map((g) => xn(g));
2965
+ return /* @__PURE__ */ a(te, { isOpen: t, onClose: o, title: i.financial_profile, children: [
2966
+ /* @__PURE__ */ a(u, { sx: { gap: 20, p: 24 }, children: [
2967
+ /* @__PURE__ */ a(u, { sx: { gap: 8 }, children: [
2968
+ /* @__PURE__ */ e(K, { children: i.your_financial_profile }),
2969
+ /* @__PURE__ */ e(M, { children: i.financial_profile_description })
2970
+ ] }),
2971
+ /* @__PURE__ */ e(
2972
+ zt,
2973
+ {
2974
+ completeCopy: i.complete,
2975
+ value: m.reduce((g, b) => g + (b.isComplete ? 1 : 0), 0)
2976
+ }
2977
+ )
1137
2978
  ] }),
1138
- r && /* @__PURE__ */ e(
1139
- x,
2979
+ /* @__PURE__ */ e(Sn, { list: m, onClickItem: p }),
2980
+ /* @__PURE__ */ e(C, { sx: { p: 24 }, children: /* @__PURE__ */ e(
2981
+ Te,
1140
2982
  {
1141
- sx: {
1142
- position: "sticky",
1143
- top: 0,
1144
- zIndex: 1
1145
- },
1146
- children: r
2983
+ description: i.connect_more_accounts_to_view_more_accurate_financial_picture,
2984
+ drawerType: "connectDrawer",
2985
+ isDashboard: !0,
2986
+ title: i.dont_see_all_your_accounts,
2987
+ titleDrawer: s.add_accounts
2988
+ }
2989
+ ) }),
2990
+ /* @__PURE__ */ e(
2991
+ te,
2992
+ {
2993
+ isOpen: l === ee.MonthlyIncome,
2994
+ onClose: () => p(null),
2995
+ title: s.settings,
2996
+ children: /* @__PURE__ */ e(no, {})
1147
2997
  }
1148
2998
  ),
1149
- n && /* @__PURE__ */ e(x, { children: n }),
1150
- /* @__PURE__ */ e(ge, {}),
1151
- /* @__PURE__ */ u(g, { sx: { p: 24, gap: 24 }, children: [
1152
- o,
1153
- l && /* @__PURE__ */ e(Q, { isDashboard: !0 })
1154
- ] })
1155
- ] }) : /* @__PURE__ */ e(N, {});
1156
- }, Gt = I(Pt), pe = ({
1157
- content: n,
2999
+ /* @__PURE__ */ e(Er, { isOpen: l === ee.DateOfBirth, onClose: () => p(null) }),
3000
+ /* @__PURE__ */ e(Pt, { isOpen: l === ee.CreditScore, onClose: () => p(null) }),
3001
+ /* @__PURE__ */ e(
3002
+ St,
3003
+ {
3004
+ onClose: () => p(null),
3005
+ showConnectionsWidget: l === ee.Connections,
3006
+ title: c.manage_connections
3007
+ }
3008
+ )
3009
+ ] });
3010
+ }, Hr = S(Gr), lt = ({
3011
+ content: t,
1158
3012
  islast: o = !1
1159
- }) => /* @__PURE__ */ u(st, { sx: { minHeight: 0 }, children: [
1160
- /* @__PURE__ */ u(pt, { children: [
1161
- /* @__PURE__ */ e(dt, { sx: { bgcolor: "divider", borderWidth: 1, p: 3 } }),
1162
- !o && /* @__PURE__ */ e(ct, { sx: { bgcolor: "divider", width: 0.1 } })
3013
+ }) => /* @__PURE__ */ a(io, { sx: { minHeight: 0 }, children: [
3014
+ /* @__PURE__ */ a(uo, { children: [
3015
+ /* @__PURE__ */ e(po, { sx: { bgcolor: "divider", borderWidth: 1, p: 3 } }),
3016
+ !o && /* @__PURE__ */ e(co, { sx: { bgcolor: "divider", width: 0.1 } })
1163
3017
  ] }),
1164
- /* @__PURE__ */ e(lt, { sx: { pb: 16, pl: 12, pr: 0, pt: 5 }, children: /* @__PURE__ */ e(y, { fontSize: 13, fontWeight: 400, variant: "subtitle2", children: n }) })
1165
- ] }), Lt = ({ report: n }) => {
1166
- const { finstrong: o } = S(), { score_history_drawer_timeline: t } = o, {
1167
- health_score_point_difference: i,
1168
- newer_credit_score: d,
1169
- older_credit_score: l,
1170
- older_spend_to_income_ratio: s,
1171
- newer_spend_to_income_ratio: r,
1172
- older_health_score: a,
1173
- newer_health_score: c,
1174
- newer_score_calculated_at: p
1175
- } = n, h = _e(new Date(p), "MMM d"), m = () => i === 0 ? "info.lighter" : i > 0 ? "success.lighter" : "error.lighter", _ = () => i === 0 ? b(t.stayed_at, a) : i > 0 ? t.less_spending : t.more_spending, R = () => {
1176
- if (i === 0) return null;
1177
- const T = i > 0 ? t.up_from : t.down_from, v = b(T, a, c);
1178
- return /* @__PURE__ */ u(re, { children: [
3018
+ /* @__PURE__ */ e(lo, { sx: { pb: 16, pl: 12, pr: 0, pt: 5 }, children: /* @__PURE__ */ e(M, { fontSize: 13, fontWeight: 400, variant: "subtitle2", children: t }) })
3019
+ ] }), Nr = ({ report: t }) => {
3020
+ const { finstrong: o } = v(), { score_history_drawer_timeline: n } = o, {
3021
+ health_score_point_difference: r,
3022
+ newer_credit_score: c,
3023
+ older_credit_score: s,
3024
+ older_spend_to_income_ratio: i,
3025
+ newer_spend_to_income_ratio: d,
3026
+ older_health_score: l,
3027
+ newer_health_score: p,
3028
+ newer_score_calculated_at: _
3029
+ } = t, m = ro(new Date(_), "MMM d"), g = () => r === 0 ? "info.lighter" : r > 0 ? "success.lighter" : "error.lighter", b = () => r === 0 ? X(n.stayed_at, l) : r > 0 ? n.less_spending : n.more_spending, w = () => {
3030
+ if (r === 0) return null;
3031
+ const f = r > 0 ? n.up_from : n.down_from, x = X(f, l, p);
3032
+ return /* @__PURE__ */ a(z, { children: [
1179
3033
  /* @__PURE__ */ e(
1180
- he,
3034
+ an,
1181
3035
  {
1182
3036
  fill: !0,
1183
3037
  name: "circle",
1184
3038
  sx: { color: "text.secondary", fontSize: 8, mx: 4, p: 1 }
1185
3039
  }
1186
3040
  ),
1187
- v
3041
+ x
1188
3042
  ] });
1189
3043
  };
1190
- return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ u(g, { sx: { backgroundColor: "background.paper" }, children: [
1191
- /* @__PURE__ */ e(x, { sx: { borderBottom: "1px solid", borderBottomColor: "divider", p: 16 }, children: /* @__PURE__ */ u(
1192
- g,
3044
+ return /* @__PURE__ */ e(j, { children: /* @__PURE__ */ a(u, { sx: { backgroundColor: "background.paper" }, children: [
3045
+ /* @__PURE__ */ e(C, { sx: { borderBottom: "1px solid", borderBottomColor: "divider", p: 16 }, children: /* @__PURE__ */ a(
3046
+ u,
1193
3047
  {
1194
3048
  flexDirection: "row",
1195
3049
  sx: { alignItems: "center", gap: 16, height: 48, width: "100%" },
1196
3050
  children: [
1197
3051
  /* @__PURE__ */ e(
1198
- g,
3052
+ u,
1199
3053
  {
1200
3054
  sx: {
1201
3055
  alignItems: "center",
1202
- backgroundColor: m(),
3056
+ backgroundColor: g(),
1203
3057
  borderRadius: 999,
1204
3058
  height: 48,
1205
3059
  justifyContent: "center",
1206
3060
  minWidth: 48
1207
3061
  },
1208
- children: /* @__PURE__ */ e(y, { sx: { fontWeight: 600 }, variant: "Body", children: i > 0 ? `+${i}` : i })
3062
+ children: /* @__PURE__ */ e(M, { sx: { fontWeight: 600 }, variant: "Body", children: r > 0 ? `+${r}` : r })
1209
3063
  }
1210
3064
  ),
1211
- /* @__PURE__ */ u(g, { sx: { gap: 2, width: "80%" }, children: [
1212
- /* @__PURE__ */ e(W, { fontWeight: 600, variant: "Body", children: _() }),
1213
- /* @__PURE__ */ u(W, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
1214
- h,
3065
+ /* @__PURE__ */ a(u, { sx: { gap: 2, width: "80%" }, children: [
3066
+ /* @__PURE__ */ e(A, { fontWeight: 600, variant: "Body", children: b() }),
3067
+ /* @__PURE__ */ a(A, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
3068
+ m,
1215
3069
  " ",
1216
- R()
3070
+ w()
1217
3071
  ] })
1218
3072
  ] })
1219
3073
  ]
1220
3074
  }
1221
3075
  ) }),
1222
- i !== 0 && /* @__PURE__ */ e(x, { sx: { color: "text.secondary", pb: 8, pl: 32, pr: 16, pt: 12 }, children: /* @__PURE__ */ u(
1223
- it,
3076
+ r !== 0 && /* @__PURE__ */ e(C, { sx: { color: "text.secondary", pb: 8, pl: 32, pr: 16, pt: 12 }, children: /* @__PURE__ */ a(
3077
+ ao,
1224
3078
  {
1225
3079
  sx: {
1226
- [`& .${at.root}:before`]: {
3080
+ [`& .${so.root}:before`]: {
1227
3081
  flex: 0,
1228
3082
  padding: 0
1229
3083
  },
@@ -1232,22 +3086,22 @@ const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor
1232
3086
  },
1233
3087
  children: [
1234
3088
  /* @__PURE__ */ e(
1235
- pe,
3089
+ lt,
1236
3090
  {
1237
- content: b(
1238
- t.spend_to_income_description,
1239
- de(s),
1240
- de(r)
3091
+ content: X(
3092
+ n.spend_to_income_description,
3093
+ ke(i),
3094
+ ke(d)
1241
3095
  )
1242
3096
  }
1243
3097
  ),
1244
3098
  /* @__PURE__ */ e(
1245
- pe,
3099
+ lt,
1246
3100
  {
1247
- content: b(
1248
- t.credit_score_description,
1249
- l,
1250
- d
3101
+ content: X(
3102
+ n.credit_score_description,
3103
+ s,
3104
+ c
1251
3105
  ),
1252
3106
  islast: !0
1253
3107
  }
@@ -1256,205 +3110,425 @@ const ut = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor
1256
3110
  }
1257
3111
  ) })
1258
3112
  ] }) });
1259
- }, Et = I(Lt), Wt = ({ isOpen: n, onClose: o }) => {
1260
- const t = G(), { finstrong: i } = S(), { isCopyLoaded: d, isInitialized: l } = z(), { healthScore: s, healthScoreChangeReports: r, augmentedChartData: a } = $();
1261
- if (!d || !l) return /* @__PURE__ */ e(N, {});
1262
- const c = ie(s.health_score || 0, i), p = r.slice().reverse();
3113
+ }, Kr = S(Nr), jr = ({ isOpen: t, onClose: o }) => {
3114
+ const n = E(), { finstrong: r } = v(), { isCopyLoaded: c, isInitialized: s } = V(), { healthScore: i, healthScoreChangeReports: d, augmentedChartData: l } = R();
3115
+ if (!c || !s) return /* @__PURE__ */ e(J, {});
3116
+ const p = Ge(i.health_score || 0, r), _ = d.slice().reverse();
1263
3117
  return /* @__PURE__ */ e(
1264
- Gt,
3118
+ Bt,
1265
3119
  {
1266
- additionalContent: /* @__PURE__ */ e(g, { sx: { pl: 18, backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(
1267
- be,
3120
+ additionalContent: /* @__PURE__ */ e(u, { sx: { pl: 18, backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(
3121
+ Ne,
1268
3122
  {
1269
- axisColor: t.palette.divider,
3123
+ axisColor: n.palette.divider,
1270
3124
  baseline: "min",
1271
- colors: [t.palette.primary.main],
3125
+ colors: [n.palette.primary.main],
1272
3126
  curveType: "natural",
1273
- datasets: [a],
3127
+ datasets: [l],
1274
3128
  height: 160,
1275
- labels: [i.key_indicators_label],
3129
+ labels: [r.key_indicators_label],
1276
3130
  margin: { top: 12, left: 24 },
1277
3131
  showArea: !0,
1278
3132
  showAverage: !0,
1279
- title: i.peer_average,
3133
+ title: r.peer_average,
1280
3134
  useCustomMark: !0
1281
3135
  }
1282
3136
  ) }),
1283
- drawerTitle: i.score_history,
1284
- isOpen: n,
3137
+ drawerTitle: r.score_history,
3138
+ isOpen: t,
1285
3139
  loadConnectAccountsCard: !1,
1286
3140
  onClose: o,
1287
- stickyComponent: /* @__PURE__ */ u(
1288
- g,
3141
+ stickyComponent: /* @__PURE__ */ a(
3142
+ u,
1289
3143
  {
1290
3144
  direction: "row",
1291
3145
  sx: { backgroundColor: "background.paper", gap: 16, pb: 12, pt: 8, px: 24 },
1292
3146
  children: [
1293
- /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
1294
- ve,
3147
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(
3148
+ Ft,
1295
3149
  {
1296
3150
  arcRadius: 20,
1297
- healthScore: s?.health_score,
3151
+ healthScore: i?.health_score,
1298
3152
  size: "SM"
1299
3153
  }
1300
3154
  ) }),
1301
- /* @__PURE__ */ u(x, { children: [
1302
- /* @__PURE__ */ e(y, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children: c.status }),
1303
- /* @__PURE__ */ e(y, { variant: "caption", children: c.description })
3155
+ /* @__PURE__ */ a(C, { children: [
3156
+ /* @__PURE__ */ e(M, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children: p.status }),
3157
+ /* @__PURE__ */ e(M, { variant: "caption", children: p.description })
1304
3158
  ] })
1305
3159
  ]
1306
3160
  }
1307
3161
  ),
1308
- children: /* @__PURE__ */ e(g, { sx: { gap: 16 }, children: p.map((h, m) => /* @__PURE__ */ e(Et, { report: h }, m)) })
3162
+ children: /* @__PURE__ */ e(u, { sx: { gap: 16 }, children: _.map((m, g) => /* @__PURE__ */ e(Kr, { report: m }, g)) })
1309
3163
  }
1310
3164
  );
1311
- }, Bt = I(Wt), Ht = ({ onClick: n }) => {
1312
- const { finstrong: o } = S(), { isCopyLoaded: t } = z();
1313
- return t ? /* @__PURE__ */ u(g, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
1314
- /* @__PURE__ */ e(Ee, { size: 48 }),
1315
- /* @__PURE__ */ u(g, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
1316
- /* @__PURE__ */ e(H, { children: o.missing_data_title }),
1317
- /* @__PURE__ */ e(y, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: o.missing_data_description })
3165
+ }, Vr = S(jr), Yr = ({ copy: t }) => {
3166
+ const o = E(), n = [
3167
+ o.palette.chartMono.chartMono5,
3168
+ o.palette.chartMono.chartMono4,
3169
+ o.palette.chartMono.chartMono3,
3170
+ o.palette.chartMono.chartMono2
3171
+ ];
3172
+ return /* @__PURE__ */ a(u, { sx: { gap: 8 }, children: [
3173
+ /* @__PURE__ */ e(u, { sx: { flexDirection: "row", gap: 8, px: 2 }, children: [
3174
+ { color: "chartMono.chartMono2", text: t.vulnerable, value: "0-25" },
3175
+ { color: "chartMono.chartMono3", text: t.building, value: "26-50" },
3176
+ { color: "chartMono.chartMono4", text: t.stable, value: "51-75" },
3177
+ { color: "chartMono.chartMono5", text: t.strong, value: "76-100" }
3178
+ ].map(({ color: r, text: c, value: s }) => /* @__PURE__ */ a(u, { sx: { gap: 4, textAlign: "center", width: "100%" }, children: [
3179
+ /* @__PURE__ */ a(C, { children: [
3180
+ /* @__PURE__ */ e(M, { sx: { fontWeight: 700, textTransform: "uppercase" }, variant: "caption", children: c }),
3181
+ /* @__PURE__ */ a(A, { sx: { color: "text.secondary" }, variant: "caption", children: [
3182
+ "(",
3183
+ s,
3184
+ ")"
3185
+ ] })
3186
+ ] }),
3187
+ /* @__PURE__ */ e(C, { sx: { border: "2px solid", borderColor: r, borderRadius: "3px" } })
3188
+ ] }, c)) }),
3189
+ /* @__PURE__ */ a(C, { children: [
3190
+ /* @__PURE__ */ e(
3191
+ C,
3192
+ {
3193
+ sx: {
3194
+ background: `linear-gradient(to left, ${n.join(", ")})`,
3195
+ borderRadius: "4px",
3196
+ height: 16
3197
+ }
3198
+ }
3199
+ ),
3200
+ /* @__PURE__ */ e(u, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100].map((r) => /* @__PURE__ */ a(
3201
+ u,
3202
+ {
3203
+ sx: { alignItems: "center", height: 20, justifyContent: "space-between", width: 24 },
3204
+ children: [
3205
+ /* @__PURE__ */ e(
3206
+ C,
3207
+ {
3208
+ sx: {
3209
+ borderBottom: "1px solid",
3210
+ borderColor: "divider",
3211
+ position: "relative",
3212
+ rotate: "90deg",
3213
+ top: 3.5,
3214
+ width: 8
3215
+ }
3216
+ }
3217
+ ),
3218
+ /* @__PURE__ */ e(A, { sx: { color: "text.secondary" }, variant: "tiny", children: r })
3219
+ ]
3220
+ },
3221
+ r
3222
+ )) })
3223
+ ] })
3224
+ ] });
3225
+ }, Xr = ({ isOpen: t, onClose: o }) => {
3226
+ const { finstrong: n } = v(), { isCopyLoaded: r } = V();
3227
+ return r ? /* @__PURE__ */ e(te, { isOpen: t, onClose: o, title: n.score_rubric, children: /* @__PURE__ */ a(u, { sx: { gap: 36, p: 24 }, children: [
3228
+ /* @__PURE__ */ a(u, { sx: { gap: 20 }, children: [
3229
+ /* @__PURE__ */ a(u, { sx: { gap: 8 }, children: [
3230
+ /* @__PURE__ */ e(K, { sx: { textWrap: "wrap" }, children: n.your_path_to_financial_freedom }),
3231
+ /* @__PURE__ */ e(M, { variant: "subtitle1", children: n.finstrong_freedom_description })
3232
+ ] }),
3233
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(Yr, { copy: n }) })
3234
+ ] }),
3235
+ /* @__PURE__ */ a(u, { sx: { gap: 12 }, children: [
3236
+ /* @__PURE__ */ e(A, { sx: { fontWeight: 600 }, variant: "body1", children: n.how_do_we_do_this }),
3237
+ /* @__PURE__ */ a(
3238
+ De,
3239
+ {
3240
+ component: "ol",
3241
+ sx: {
3242
+ listStyleType: "decimal",
3243
+ pl: 20,
3244
+ pr: 16,
3245
+ "& li": {
3246
+ "::marker": {
3247
+ fontWeight: 600
3248
+ }
3249
+ },
3250
+ "& .MuiListItemText-secondary": {
3251
+ fontSize: 15,
3252
+ lineHeight: "24px",
3253
+ pt: 4
3254
+ }
3255
+ },
3256
+ children: [
3257
+ /* @__PURE__ */ e(pe, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(
3258
+ ue,
3259
+ {
3260
+ primary: n.understand_your_habits,
3261
+ secondary: n.understand_your_habits_description
3262
+ }
3263
+ ) }),
3264
+ /* @__PURE__ */ e(pe, { sx: { display: "list-item", pt: 16 }, children: /* @__PURE__ */ e(
3265
+ ue,
3266
+ {
3267
+ primary: n.see_whats_possible,
3268
+ secondary: n.see_whats_possible_description
3269
+ }
3270
+ ) })
3271
+ ]
3272
+ }
3273
+ )
1318
3274
  ] }),
1319
- /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
1320
- q,
3275
+ /* @__PURE__ */ a(u, { sx: { gap: 4 }, children: [
3276
+ /* @__PURE__ */ e(A, { sx: { fontWeight: 600, pb: 4 }, variant: "body1", children: n.we_ask_questions }),
3277
+ /* @__PURE__ */ a(
3278
+ De,
3279
+ {
3280
+ component: "ol",
3281
+ sx: {
3282
+ listStyleType: "initial",
3283
+ pl: 20,
3284
+ pr: 16,
3285
+ "& li": {
3286
+ minHeight: "max-content",
3287
+ "::marker": {
3288
+ color: "text.secondary",
3289
+ fontWeight: 600
3290
+ }
3291
+ },
3292
+ "& .MuiListItemText-secondary": {
3293
+ fontSize: 15,
3294
+ lineHeight: "24px"
3295
+ }
3296
+ },
3297
+ children: [
3298
+ /* @__PURE__ */ e(pe, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(ue, { secondary: n.we_ask_questions_description_1 }) }),
3299
+ /* @__PURE__ */ e(pe, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(ue, { secondary: n.we_ask_questions_description_2 }) })
3300
+ ]
3301
+ }
3302
+ )
3303
+ ] })
3304
+ ] }) }) : /* @__PURE__ */ e(J, {});
3305
+ }, Ur = S(Xr), qr = S(() => {
3306
+ const [t, o] = h.useState(!1), n = E(), [r, { width: c }] = vt(), { finstrong: s } = v(), { isCopyLoaded: i, isInitialized: d } = V(), { healthScore: l, healthScoreChange: p } = R(), _ = n.palette.mode === "dark", m = Ge(l?.health_score, s);
3307
+ return !i || !d ? /* @__PURE__ */ e(J, {}) : /* @__PURE__ */ a(j, { ref: r, sx: { p: 16 }, children: [
3308
+ /* @__PURE__ */ e(
3309
+ go,
1321
3310
  {
1322
- endIcon: /* @__PURE__ */ e(j, {}),
1323
- onClick: n,
1324
- size: "small",
3311
+ action: /* @__PURE__ */ e(
3312
+ $,
3313
+ {
3314
+ endIcon: /* @__PURE__ */ e(Z, {}),
3315
+ onClick: () => o(!0),
3316
+ sx: {
3317
+ fontSize: 13,
3318
+ lineHeight: "16px",
3319
+ fontWeight: 600,
3320
+ color: "primary.main"
3321
+ },
3322
+ variant: "text",
3323
+ children: s.financial_strength_header_action
3324
+ }
3325
+ ),
3326
+ subheader: /* @__PURE__ */ e(K, { color: "text.primary", children: s.financial_strength_header }),
1325
3327
  sx: {
1326
- fontSize: 13,
1327
- ":hover": {
1328
- bgcolor: "transparent"
3328
+ p: 0,
3329
+ "& .MuiCardHeader-content": {
3330
+ overflow: "hidden"
3331
+ }
3332
+ }
3333
+ }
3334
+ ),
3335
+ /* @__PURE__ */ e(u, { sx: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(
3336
+ Ft,
3337
+ {
3338
+ arcRadius: c <= 323 ? 73 : 154,
3339
+ footerCenterContent: p,
3340
+ healthScore: l?.health_score || 0,
3341
+ size: c <= 323 ? "M" : "L"
3342
+ }
3343
+ ) }),
3344
+ l?.health_score ? /* @__PURE__ */ a(
3345
+ _o,
3346
+ {
3347
+ sx: {
3348
+ px: 16,
3349
+ backgroundColor: _ ? "grey.800" : "grey.50",
3350
+ //TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
3351
+ "&.Mui-expanded": {
3352
+ m: 0
3353
+ },
3354
+ "&::before": {
3355
+ display: "none"
1329
3356
  }
1330
3357
  },
1331
- variant: "text",
1332
- children: o.connect_more_accounts_button
3358
+ children: [
3359
+ /* @__PURE__ */ e(
3360
+ mo,
3361
+ {
3362
+ expandIcon: /* @__PURE__ */ e(on, { size: 20 }),
3363
+ sx: {
3364
+ height: 52,
3365
+ p: 0,
3366
+ "&.Mui-expanded": {
3367
+ minHeight: 0
3368
+ }
3369
+ },
3370
+ children: /* @__PURE__ */ e(M, { sx: { fontWeight: 600 }, variant: "body1", children: s.accordion_title_text })
3371
+ }
3372
+ ),
3373
+ /* @__PURE__ */ e(ho, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(M, { variant: "subtitle1", children: m.scoreContent }) })
3374
+ ]
1333
3375
  }
1334
- ) })
1335
- ] }) : /* @__PURE__ */ e(N, {});
1336
- }, zt = I(Ht), $t = ({ onBackClick: n, sx: o }) => {
1337
- const t = G(), { visibleAccounts: i } = fe(), { dateRange: d, isDataLoaded: l, loadBudgetData: s, setTheme: r } = ye(), { reloadCategoryTotals: a } = Ke(), { augmentedChartData: c, calculateHealthScore: p, healthScore: h, loadAugmentedChartData: m } = $(), { finstrong: _, connect: R } = S(), { isCopyLoaded: T, isInitialized: v, selectedAccounts: L, setSelectedAccounts: E } = z(), { isMobile: K } = Ce(), [F, w] = C.useState(!1);
1338
- C.useEffect(() => {
1339
- r(t);
1340
- }, []), C.useEffect(() => E(i), [i]), C.useEffect(() => {
1341
- v && (p().finally(), m().finally());
1342
- }, [v]), C.useEffect(() => {
1343
- v && (a(L, d.start, d.end), l || s());
1344
- }, [d, l, v, L]);
1345
- const [O, k] = C.useState(!1), [P, U] = C.useState(!1);
1346
- if (!T || !v) return /* @__PURE__ */ e(N, {});
1347
- const Z = () => {
1348
- }, ee = () => k(!0);
1349
- return /* @__PURE__ */ u(
1350
- mt,
3376
+ ) : /* @__PURE__ */ e(
3377
+ Te,
3378
+ {
3379
+ buttonText: s.connect_more_accounts_title,
3380
+ description: s.health_score_zero_description,
3381
+ drawerType: "connectDrawer",
3382
+ hasIcon: !1,
3383
+ isDashboard: !0,
3384
+ sx: {
3385
+ backgroundColor: _ ? "grey.800" : "grey.50",
3386
+ //TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
3387
+ ".connect-more-accounts-title": {
3388
+ fontWeight: 600,
3389
+ lineHeight: "20px",
3390
+ color: "text.primary"
3391
+ },
3392
+ ".connect-more-accounts-description": { color: "text.primary" }
3393
+ },
3394
+ title: s.health_score_zero_title
3395
+ }
3396
+ ),
3397
+ /* @__PURE__ */ e(
3398
+ Ur,
3399
+ {
3400
+ isOpen: t,
3401
+ onClose: () => o(!1)
3402
+ }
3403
+ )
3404
+ ] });
3405
+ }), Zr = ({ onBackClick: t, sx: o }) => {
3406
+ const { visibleAccounts: n } = Se(), { dateRange: r, isDataLoaded: c, loadBudgetData: s, setTheme: i } = xt(), { reloadCategoryTotals: d } = He(), {
3407
+ augmentedChartData: l,
3408
+ calculateHealthScore: p,
3409
+ healthScore: _,
3410
+ loadAugmentedChartData: m,
3411
+ loadMonthlySummaries: g
3412
+ } = R(), { finstrong: b, connect: w } = v(), { isCopyLoaded: f, isInitialized: x, selectedAccounts: y, setSelectedAccounts: k } = V(), { isMobile: D } = je(), I = E(), { userProfile: N } = Q(), [G, H] = h.useState(!1), [W, ce] = h.useState(!1), [Y, re] = h.useState(!1);
3413
+ if (h.useEffect(() => {
3414
+ i(I);
3415
+ }, []), h.useEffect(() => k(n), [n]), h.useEffect(() => {
3416
+ x && (p().finally(), m().finally(), g().finally());
3417
+ }, [x]), h.useEffect(() => {
3418
+ x && (d(y, r.start, r.end), c || s());
3419
+ }, [r, c, x, y]), !f || !x) return /* @__PURE__ */ e(J, {});
3420
+ const le = () => {
3421
+ }, ge = () => H(!0);
3422
+ return /* @__PURE__ */ a(
3423
+ En,
1351
3424
  {
1352
- accountOptions: i,
3425
+ accountOptions: n,
1353
3426
  actions: [
1354
3427
  {
1355
3428
  iconName: "person",
1356
- label: _.profile,
1357
- onClick: ee
3429
+ label: b.profile,
3430
+ onClick: ge
1358
3431
  }
1359
3432
  ],
1360
3433
  hasDivider: !0,
1361
- onAccountsFilterClick: Z,
1362
- onBackClick: n,
3434
+ onAccountsFilterClick: le,
3435
+ onBackClick: t,
1363
3436
  sx: o,
1364
- title: _.title,
3437
+ title: b.title,
1365
3438
  children: [
1366
- /* @__PURE__ */ u(
1367
- g,
3439
+ N.has_completed_finstrong_onboarding ? /* @__PURE__ */ a(
3440
+ u,
1368
3441
  {
1369
3442
  sx: {
1370
3443
  flexDirection: { md: "row" },
1371
3444
  gap: 24,
1372
3445
  justifyContent: "center",
1373
- pt: K ? 24 : 16,
3446
+ pt: D ? 24 : 16,
1374
3447
  px: 24
1375
3448
  },
1376
3449
  children: [
1377
- /* @__PURE__ */ u(g, { sx: { gap: 24, width: { md: 432 } }, children: [
1378
- /* @__PURE__ */ e(St, {}),
3450
+ /* @__PURE__ */ a(u, { sx: { gap: 24, width: { md: 432 } }, children: [
3451
+ /* @__PURE__ */ e(qr, {}),
1379
3452
  /* @__PURE__ */ e(
1380
- Q,
3453
+ Te,
1381
3454
  {
1382
- description: _.connect_more_accounts_description,
1383
- title: _.connect_more_accounts_title
3455
+ description: b.connect_more_accounts_description,
3456
+ drawerType: "connectDrawer",
3457
+ title: b.connect_more_accounts_title
1384
3458
  }
1385
3459
  )
1386
3460
  ] }),
1387
- /* @__PURE__ */ e(g, { sx: { maxWidth: 848, minWidth: 288, width: { md: 720 } }, children: /* @__PURE__ */ u(J, { sx: { background: t.palette.background.paper, p: 16 }, children: [
1388
- /* @__PURE__ */ u(g, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
1389
- /* @__PURE__ */ e(H, { children: _.key_indicators }),
3461
+ /* @__PURE__ */ e(u, { sx: { maxWidth: 848, minWidth: 288, width: { md: 720 } }, children: /* @__PURE__ */ a(j, { sx: { background: I.palette.background.paper, p: 16 }, children: [
3462
+ /* @__PURE__ */ a(u, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
3463
+ /* @__PURE__ */ e(K, { children: b.key_indicators }),
1390
3464
  /* @__PURE__ */ e(
1391
- q,
3465
+ $,
1392
3466
  {
1393
- endIcon: /* @__PURE__ */ e(j, {}),
1394
- onClick: () => U(!0),
3467
+ endIcon: /* @__PURE__ */ e(Z, {}),
3468
+ onClick: () => ce(!0),
1395
3469
  sx: {
1396
3470
  fontSize: 13
1397
3471
  },
1398
3472
  variant: "text",
1399
- children: _.whats_changed
3473
+ children: b.whats_changed
1400
3474
  }
1401
3475
  )
1402
3476
  ] }),
1403
- c.length ? /* @__PURE__ */ e(
1404
- be,
3477
+ l.length ? /* @__PURE__ */ e(
3478
+ Ne,
1405
3479
  {
1406
- axisColor: t.palette.divider,
3480
+ axisColor: I.palette.divider,
1407
3481
  baseline: "min",
1408
- colors: [t.palette.primary.main],
3482
+ colors: [I.palette.primary.main],
1409
3483
  curveType: "natural",
1410
3484
  customLegendVariant: "XSmall",
1411
- datasets: [c],
3485
+ datasets: [l],
1412
3486
  height: 300,
1413
3487
  isGraphClippingXAxis: !0,
1414
- labelBackgroundColor: t.palette.border.dark,
1415
- labelFontColor: t.palette.common.white,
1416
- labelFontSize: typeof t.typography.XSmall?.fontSize == "string" ? parseFloat(t.typography.XSmall.fontSize) : t.typography.XSmall?.fontSize,
1417
- labels: [_.key_indicators_label],
3488
+ labelBackgroundColor: I.palette.border.dark,
3489
+ labelFontColor: I.palette.common.white,
3490
+ labelFontSize: typeof I.typography.XSmall?.fontSize == "string" ? parseFloat(I.typography.XSmall.fontSize) : I.typography.XSmall?.fontSize,
3491
+ labels: [b.key_indicators_label],
1418
3492
  margin: { right: 20, left: 25 },
1419
3493
  showArea: !0,
1420
3494
  showAverage: !0,
1421
3495
  showLegend: !0,
1422
3496
  showMarkLabel: !0,
1423
3497
  showXAxis: !0,
1424
- title: _.peer_average,
3498
+ title: b.peer_average,
1425
3499
  useCustomMark: !0
1426
3500
  }
1427
- ) : /* @__PURE__ */ e(zt, { onClick: () => w(!0) }),
1428
- h.health_score !== null && /* @__PURE__ */ e(Ft, {})
3501
+ ) : /* @__PURE__ */ e(kr, { onClick: () => re(!0) }),
3502
+ _.health_score !== null && /* @__PURE__ */ e(vr, {})
1429
3503
  ] }) })
1430
3504
  ]
1431
3505
  }
1432
- ),
1433
- /* @__PURE__ */ e(Mt, { isOpen: O, onClose: () => k(!1) }),
3506
+ ) : /* @__PURE__ */ e(Wr, {}),
3507
+ /* @__PURE__ */ e(Hr, { isOpen: G, onClose: () => H(!1) }),
1434
3508
  /* @__PURE__ */ e(
1435
- xe,
3509
+ oe,
1436
3510
  {
1437
- onClose: () => w(!1),
1438
- showConnectWidget: F,
1439
- title: R.mini_title
3511
+ onClose: () => re(!1),
3512
+ showConnectWidget: Y,
3513
+ title: w.mini_title
1440
3514
  }
1441
3515
  ),
1442
3516
  /* @__PURE__ */ e(
1443
- Bt,
3517
+ Vr,
1444
3518
  {
1445
- isOpen: P,
1446
- onClose: () => U(!1)
3519
+ isOpen: W,
3520
+ onClose: () => ce(!1)
1447
3521
  }
1448
3522
  )
1449
3523
  ]
1450
3524
  }
1451
3525
  );
1452
- }, Ho = I($t);
3526
+ }, hi = S(Zr);
1453
3527
  export {
1454
- Bo as CreditScoreGraph,
1455
- Se as DialScoreCard,
1456
- ve as FinancialStrengthGraph,
1457
- No as FinstrongApi,
1458
- Ko as FinstrongStore,
1459
- Ho as FinstrongWidget
3528
+ bo as CreditScoreGraph,
3529
+ Rt as DialScoreCard,
3530
+ Ft as FinancialStrengthGraph,
3531
+ yi as FinstrongApi,
3532
+ bi as FinstrongStore,
3533
+ hi as FinstrongWidget
1460
3534
  };