@mx-cartographer/experiences 6.26.33-alpha.mm0 → 7.0.0-alpha.mega1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -3
- package/dist/Account-DY6nxO7y.mjs +30 -0
- package/dist/AccountDetailsContent-DvPs81kL.mjs +677 -0
- package/dist/AccountDetailsHeader-W2U7ZVm_.mjs +119 -0
- package/dist/AccountFields-DAVcbZy5.mjs +135 -0
- package/dist/AccountListItem-DFlbdcmT.mjs +90 -0
- package/dist/AccountStore-CU7qV3vg.mjs +230 -0
- package/dist/Accounts-BLlrQA5m.mjs +9 -0
- package/dist/BeatApi-DLu87ijw.mjs +21 -0
- package/dist/BeatStore-By4aGoRM.mjs +81 -0
- package/dist/BudgetUtil-Ci1TN0J5.mjs +101 -0
- package/dist/CashflowStore-D9Dpuz7X.mjs +91 -0
- package/dist/Category-5S6uwuXz.mjs +301 -0
- package/dist/CategorySelectorDrawer-rHyHHYuh.mjs +397 -0
- package/dist/CategoryStore-B5EW6I1d.mjs +183 -0
- package/dist/CategoryUtil-DRyruNgi.mjs +78 -0
- package/dist/ConnectDrawer-D9cR5phc.mjs +508 -0
- package/dist/ConnectionsDrawer-BzGqljSp.mjs +52 -0
- package/dist/CurrencyInput-D74cemI2.mjs +83 -0
- package/dist/CurrencyText-YUhH2caW.mjs +20 -0
- package/dist/DateUtil-BcuH7ErC.mjs +48 -0
- package/dist/DebtsStore-S0l9kr0r.mjs +60 -0
- package/dist/Dialog-CWW597AF.mjs +123 -0
- package/dist/Donut-1UMNcG67.mjs +57 -0
- package/dist/Drawer-kEE73B87.mjs +113 -0
- package/dist/EmptyState-Dcb-o2tl.mjs +55 -0
- package/dist/Fetch-CkFKy79O.mjs +116 -0
- package/dist/FinstrongStore-mkALvztw.mjs +101 -0
- package/dist/GoalStore-DioeeL-s.mjs +263 -0
- package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
- package/dist/Help-DhcC-C05.mjs +320 -0
- package/dist/Help-DpYRO8oA.mjs +3181 -0
- package/dist/IconBacking-B9oC6uL2.mjs +39 -0
- package/dist/InvestmentUtil-jOyOgzIB.mjs +134 -0
- package/dist/LineChart-CcyX38kK.mjs +499 -0
- package/dist/ListItemAction-BabpYivr.mjs +69 -0
- package/dist/Loader-Dp1P2gNw.mjs +14 -0
- package/dist/Localization-2MODESHW.mjs +30 -0
- package/dist/ManageIncome-ndMuhJMG.mjs +535 -0
- package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
- package/dist/MicroWidgetContainer-CsvHLYKX.mjs +45 -0
- package/dist/MiniWidgetContainer-BoOp-A05.mjs +39 -0
- package/dist/NetWorthStore-PD-RUe09.mjs +150 -0
- package/dist/Notification-AMGWM1Al.mjs +78 -0
- package/dist/NotificationSettings-VhHuMAFU.mjs +667 -0
- package/dist/NotificationStore-DHtSGySy.mjs +67 -0
- package/dist/NumberFormatting-CtWHhyBX.mjs +40 -0
- package/dist/OriginalBalanceAction-D39mx6uE.mjs +115 -0
- package/dist/RecurringSettings-D_HnMYZP.mjs +57 -0
- package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +263 -0
- package/dist/RepeatingTransaction-BPWfaB3f.mjs +282 -0
- package/dist/SearchBox-B2_zLv8-.mjs +42 -0
- package/dist/SettingsStore-CE7jDVFL.mjs +265 -0
- package/dist/SingleSegmentDonut-BgbLgwHi.mjs +69 -0
- package/dist/SpendingData-BkrxzHdr.mjs +55 -0
- package/dist/StatusBar-BK_uYHAB.mjs +30 -0
- package/dist/TabContentContainer-j01JYR_7.mjs +21 -0
- package/dist/Transaction-CA0FW2Ij.mjs +312 -0
- package/dist/TransactionApi-DbbcjI2L.mjs +86 -0
- package/dist/TransactionDetails-WBHFmbxL.mjs +1283 -0
- package/dist/TransactionStore-CeLdmVnC.mjs +669 -0
- package/dist/TrendsStore-BHJUapXF.mjs +487 -0
- package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +1959 -0
- package/dist/WidgetContainer-DWCusxYI.mjs +556 -0
- package/dist/accounts/index.es.js +752 -0
- package/dist/analytics/index.es.js +171 -0
- package/dist/budgets/index.es.js +1075 -0
- package/dist/cashflow/index.es.js +1098 -0
- package/dist/categories/index.es.js +9 -0
- package/dist/common/components/WidgetContainer.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +0 -1
- package/dist/common/constants/Analytics.d.ts +10 -20
- package/dist/common/context/hooks.d.ts +13 -13
- package/dist/common/index.es.js +1451 -0
- package/dist/dashboard/index.es.js +181 -0
- package/dist/debts/index.es.js +1460 -0
- package/dist/exportTransactionsToCSV-CmwsKl2D.mjs +47 -0
- package/dist/finstrong/index.es.js +1455 -0
- package/dist/goals/index.es.js +1209 -0
- package/dist/help/components/content/section/index.d.ts +15 -15
- package/dist/help/index.es.js +14 -0
- package/dist/hooks-30y_BLwc.mjs +71 -0
- package/dist/index.d.ts +0 -22
- package/dist/insights/index.d.ts +1 -0
- package/dist/insights/index.es.js +4 -0
- package/dist/investments/index.es.js +1638 -0
- package/dist/merchants/index.es.js +79 -0
- package/dist/microinsights/components/carouselheader/CarouselHeader.d.ts +0 -1
- package/dist/microinsights/components/microBeatCarousel/MicroBeatCarousel.d.ts +0 -1
- package/dist/microinsights/index.es.js +16 -0
- package/dist/networth/index.es.js +576 -0
- package/dist/notifications/index.es.js +192 -0
- package/dist/recurringtransactions/index.es.js +879 -0
- package/dist/settings/index.es.js +879 -0
- package/dist/spending/index.es.js +570 -0
- package/dist/transactions/index.es.js +587 -0
- package/dist/trends/index.es.js +1086 -0
- package/dist/useCombineEvents-DaDBSR_1.mjs +92 -0
- package/dist/useDimensions-27p2evRx.mjs +36 -0
- package/dist/useScreenSize-B6JyS_Lj.mjs +36 -0
- package/package.json +155 -3
- package/dist/index.es.js +0 -30564
- package/dist/index.es.js.map +0 -1
- package/dist/trends/constants/TrendsWidget.d.ts +0 -3
@@ -0,0 +1,1455 @@
|
|
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 Ie } from "@mui/x-charts";
|
6
|
+
import { ChevronRight as j, Check as Oe, TrendingUp as De, ArrowRightAlt as Me, TrendingDown as Te, AccountBalance as me, ExpandMore as we, Payments as Re, CalendarMonth as Fe, CreditCard as ue, Savings as Pe, ContentCopy as Ge, MultilineChart as Le } from "@mxenabled/mx-icons";
|
7
|
+
import { Text as W, P as y, H3 as H, Icon as Ee } from "@mxenabled/mxui";
|
8
|
+
import { format as he } from "date-fns/format";
|
9
|
+
import C from "react";
|
10
|
+
import We from "@mui/material/Avatar";
|
11
|
+
import _e 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, a as z, w as $, o as Y, c as ge, e as fe, k as Ke } from "../hooks-30y_BLwc.mjs";
|
21
|
+
import { L as N } from "../Loader-Dp1P2gNw.mjs";
|
22
|
+
import { F as Xo, a as jo } from "../FinstrongStore-mkALvztw.mjs";
|
23
|
+
import q from "@mui/material/Button";
|
24
|
+
import J from "@mui/material/Card";
|
25
|
+
import { L as ye } from "../LineChart-CcyX38kK.mjs";
|
26
|
+
import { j as be } from "../ConnectDrawer-D9cR5phc.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-BzGqljSp.mjs";
|
33
|
+
import { R as Je } from "../RecurringSettings-D_HnMYZP.mjs";
|
34
|
+
import Qe from "@mui/material/TextField";
|
35
|
+
import { u as xe } 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-CtWHhyBX.mjs";
|
44
|
+
import { T as ne } from "../TabContentContainer-j01JYR_7.mjs";
|
45
|
+
import it from "@mui/icons-material/FiberManualRecordRounded";
|
46
|
+
import st from "@mui/lab/Timeline";
|
47
|
+
import at, { timelineItemClasses as ct } from "@mui/lab/TimelineItem";
|
48
|
+
import lt from "@mui/lab/TimelineConnector";
|
49
|
+
import dt from "@mui/lab/TimelineContent";
|
50
|
+
import pt from "@mui/lab/TimelineDot";
|
51
|
+
import mt from "@mui/lab/TimelineSeparator";
|
52
|
+
import { W as ut } from "../WidgetContainer-DWCusxYI.mjs";
|
53
|
+
var A = /* @__PURE__ */ ((n) => (n.Connections = "connections", n.CreditScore = "credit_score", n.DateOfBirth = "date_of_birth", n.MonthlyIncome = "monthly_income", n))(A || {});
|
54
|
+
const ht = ({ list: n, onClickItem: o }) => /* @__PURE__ */ e(x, { sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(
|
55
|
+
Be,
|
56
|
+
{
|
57
|
+
sx: {
|
58
|
+
"& .MuiListItemSecondaryAction-root": {
|
59
|
+
color: "text.primary",
|
60
|
+
pr: 24
|
61
|
+
}
|
62
|
+
},
|
63
|
+
children: n.map((t, i) => /* @__PURE__ */ u(C.Fragment, { children: [
|
64
|
+
/* @__PURE__ */ e(He, { secondaryAction: /* @__PURE__ */ e(j, {}), children: /* @__PURE__ */ u($e, { onClick: () => o(t.key), children: [
|
65
|
+
/* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(
|
66
|
+
We,
|
67
|
+
{
|
68
|
+
sx: {
|
69
|
+
bgcolor: "primary.main",
|
70
|
+
...!t.isComplete && {
|
71
|
+
bgcolor: "transparent",
|
72
|
+
borderColor: "action.active",
|
73
|
+
borderStyle: "solid",
|
74
|
+
borderWidth: 1,
|
75
|
+
color: "action.active"
|
76
|
+
}
|
77
|
+
},
|
78
|
+
children: t.icon
|
79
|
+
}
|
80
|
+
) }),
|
81
|
+
/* @__PURE__ */ e(
|
82
|
+
Ne,
|
83
|
+
{
|
84
|
+
primary: /* @__PURE__ */ e(W, { sx: { color: "text.secondary" }, variant: "caption", children: t.primaryText }),
|
85
|
+
secondary: /* @__PURE__ */ e(W, { sx: { color: "text.primary", fontWeight: 600 }, variant: "body1", children: t.secondaryText })
|
86
|
+
}
|
87
|
+
)
|
88
|
+
] }) }),
|
89
|
+
i < n.length - 1 && /* @__PURE__ */ e(_e, { sx: { color: "divider", ml: 68 } })
|
90
|
+
] }, t.key))
|
91
|
+
}
|
92
|
+
) }), _t = ht, le = (n) => n * (180 / Math.PI), ie = (n, o) => [
|
93
|
+
{
|
94
|
+
description: o.vulnerable_description,
|
95
|
+
max: 25,
|
96
|
+
scoreContent: o.accordion_details_text.vulnerable,
|
97
|
+
status: o.vulnerable
|
98
|
+
},
|
99
|
+
{
|
100
|
+
description: o.building_description,
|
101
|
+
max: 50,
|
102
|
+
scoreContent: o.accordion_details_text.building,
|
103
|
+
status: o.building
|
104
|
+
},
|
105
|
+
{
|
106
|
+
description: o.stable_description,
|
107
|
+
max: 75,
|
108
|
+
scoreContent: o.accordion_details_text.stable,
|
109
|
+
status: o.stable
|
110
|
+
},
|
111
|
+
{
|
112
|
+
description: o.strong_description,
|
113
|
+
max: 100,
|
114
|
+
scoreContent: o.accordion_details_text.strong,
|
115
|
+
status: o.strong
|
116
|
+
}
|
117
|
+
].find((d) => n > 0 && n <= d.max) || { status: o.insufficient_data, description: "", scoreContent: "" }, D = {
|
118
|
+
POOR: "#8C0E0E",
|
119
|
+
FAIR: "#E32727",
|
120
|
+
GOOD: "#FFB70D",
|
121
|
+
VERY_GOOD: "#0EA26C",
|
122
|
+
EXCEPTIONAL: "#005C3D"
|
123
|
+
}, M = {
|
124
|
+
POOR: "#B21C1C",
|
125
|
+
FAIR: "#FF3232",
|
126
|
+
GOOD: "#FFC02C",
|
127
|
+
VERY_GOOD: "#29C76B",
|
128
|
+
EXCEPTIONAL: "#008A5A"
|
129
|
+
}, gt = (n, o, t) => n >= 300 && n < 580 ? {
|
130
|
+
status: t.poor,
|
131
|
+
color: o ? M.POOR : D.POOR
|
132
|
+
} : n >= 580 && n < 670 ? {
|
133
|
+
status: t.fair,
|
134
|
+
color: o ? M.FAIR : D.FAIR
|
135
|
+
} : n >= 670 && n < 740 ? {
|
136
|
+
status: t.good,
|
137
|
+
color: o ? M.GOOD : D.GOOD
|
138
|
+
} : n >= 740 && n < 800 ? {
|
139
|
+
status: t.very_good,
|
140
|
+
color: o ? M.VERY_GOOD : D.VERY_GOOD
|
141
|
+
} : n >= 800 && n <= 850 ? {
|
142
|
+
status: t.exceptional,
|
143
|
+
color: o ? M.EXCEPTIONAL : D.EXCEPTIONAL
|
144
|
+
} : { status: t.missing_data }, ft = (n, o, t, i) => {
|
145
|
+
const d = n.reduce((r, a) => r + a.value, 0);
|
146
|
+
let l = 0;
|
147
|
+
const s = n.map((r) => {
|
148
|
+
const a = r.value / d * o, c = t + l, p = c + a;
|
149
|
+
return l += a, {
|
150
|
+
...r,
|
151
|
+
startAngle: c,
|
152
|
+
endAngle: p
|
153
|
+
};
|
154
|
+
});
|
155
|
+
return [s[i].startAngle, s[i].endAngle];
|
156
|
+
}, yt = (n, o, t, i, d) => {
|
157
|
+
let l = 0, s = 0;
|
158
|
+
const r = Math.floor(i), a = i - r;
|
159
|
+
return r > t ? (l = n, s = o) : r === t && a > 0 && (l = n, s = d), [l, s];
|
160
|
+
}, bt = (n, o, t = 0) => {
|
161
|
+
const i = n * Math.sin(o - t), d = -n * Math.cos(o - t);
|
162
|
+
return [i, d];
|
163
|
+
}, xt = ({
|
164
|
+
dynamicCopy: n,
|
165
|
+
fallbackLabel: o,
|
166
|
+
icon: t,
|
167
|
+
key: i,
|
168
|
+
label: d,
|
169
|
+
value: l
|
170
|
+
}) => {
|
171
|
+
const s = !!l, r = s ? Ct(i, l) : n && b(n, o) || o;
|
172
|
+
return {
|
173
|
+
icon: s ? /* @__PURE__ */ e(Oe, {}) : t,
|
174
|
+
isComplete: s,
|
175
|
+
key: i,
|
176
|
+
primaryText: d,
|
177
|
+
secondaryText: r
|
178
|
+
};
|
179
|
+
}, Ct = (n, o) => ({
|
180
|
+
[A.DateOfBirth]: (i) => he(new Date(Number(i) * 1e3), "MMM d, yyyy"),
|
181
|
+
[A.MonthlyIncome]: (i) => `$${i}`
|
182
|
+
})[n]?.(o) ?? String(o), de = (n) => n !== null ? Math.round(n * 100) : null, St = ({
|
183
|
+
dialScoreData: n,
|
184
|
+
dataIndex: o,
|
185
|
+
arcColor: t,
|
186
|
+
arcStartAngle: i,
|
187
|
+
totalAngularSpan: d,
|
188
|
+
centerX: l,
|
189
|
+
centerY: s,
|
190
|
+
arcRadius: r,
|
191
|
+
innerArcRadius: a,
|
192
|
+
outterArcRadius: c,
|
193
|
+
progressEndAngle: p,
|
194
|
+
unitsPerSegment: h,
|
195
|
+
isFinacialStrengthGraph: m
|
196
|
+
}) => {
|
197
|
+
const _ = G(), R = [
|
198
|
+
{ offset: "13.62%", color: _.palette.chartMono.chartMono2 },
|
199
|
+
{ offset: "36.67%", color: _.palette.chartMono.chartMono3 },
|
200
|
+
{ offset: "59.72%", color: _.palette.chartMono.chartMono4 },
|
201
|
+
{ offset: "83.46%", color: _.palette.chartMono.chartMono5 }
|
202
|
+
], [T, v] = ft(
|
203
|
+
n,
|
204
|
+
d,
|
205
|
+
i,
|
206
|
+
o
|
207
|
+
), [L, E] = yt(
|
208
|
+
T,
|
209
|
+
v,
|
210
|
+
o,
|
211
|
+
h,
|
212
|
+
p
|
213
|
+
), 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);
|
214
|
+
return /* @__PURE__ */ u(re, { children: [
|
215
|
+
/* @__PURE__ */ e(
|
216
|
+
"path",
|
217
|
+
{
|
218
|
+
d: K({}),
|
219
|
+
fill: m ? _.palette.divider : t
|
220
|
+
}
|
221
|
+
),
|
222
|
+
m && /* @__PURE__ */ e("path", { d: F({}), fill: "url(#arcGradient)" }),
|
223
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
|
224
|
+
"linearGradient",
|
225
|
+
{
|
226
|
+
gradientTransform: `rotate(5, ${l}, ${s})`,
|
227
|
+
gradientUnits: "userSpaceOnUse",
|
228
|
+
id: "arcGradient",
|
229
|
+
x1: l + r * 0.8 * Math.cos(Math.PI / 1.35),
|
230
|
+
x2: l - r * 0.8 * Math.cos(Math.PI / 1.35),
|
231
|
+
y1: s + r * 0.8 * Math.sin(Math.PI / 1.35),
|
232
|
+
y2: s - r * 0.8 * Math.sin(Math.PI / 1.35),
|
233
|
+
children: R.map((w, O) => /* @__PURE__ */ e("stop", { offset: w.offset, stopColor: w.color }, O))
|
234
|
+
}
|
235
|
+
) })
|
236
|
+
] });
|
237
|
+
}, Ce = ({
|
238
|
+
arcRadius: n = 100,
|
239
|
+
healthScore: o,
|
240
|
+
size: t = "L",
|
241
|
+
dialScoreData: i,
|
242
|
+
minValue: d = 0,
|
243
|
+
maxValue: l = 100,
|
244
|
+
markerColor: s,
|
245
|
+
healthScoreStatus: r,
|
246
|
+
footerCenterContent: a,
|
247
|
+
footerLeftContent: c,
|
248
|
+
footerRightContent: p,
|
249
|
+
isFinacialStrengthGraph: h = !1
|
250
|
+
}) => {
|
251
|
+
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, ve] = bt(U, E, Z), ke = o / 25, se = {
|
252
|
+
L: { markerSize: 12, healthScoreFontSize: 64 },
|
253
|
+
M: { markerSize: 10, healthScoreFontSize: 48 },
|
254
|
+
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
255
|
+
}, Ae = a === 0 ? Me : Te;
|
256
|
+
return /* @__PURE__ */ u(
|
257
|
+
g,
|
258
|
+
{
|
259
|
+
sx: {
|
260
|
+
width: O,
|
261
|
+
height: O,
|
262
|
+
position: "relative",
|
263
|
+
alignSelf: "center"
|
264
|
+
},
|
265
|
+
children: [
|
266
|
+
/* @__PURE__ */ e(
|
267
|
+
Ie,
|
268
|
+
{
|
269
|
+
height: O,
|
270
|
+
margin: { top: 0, right: 0, bottom: 0, left: 0 },
|
271
|
+
series: [
|
272
|
+
{
|
273
|
+
data: i,
|
274
|
+
innerRadius: w,
|
275
|
+
outerRadius: F,
|
276
|
+
startAngle: Math.round(le(_)),
|
277
|
+
// Use Math.degrees to convert
|
278
|
+
endAngle: Math.round(le(R))
|
279
|
+
// Use Math.degrees to convert
|
280
|
+
}
|
281
|
+
],
|
282
|
+
skipAnimation: !0,
|
283
|
+
slotProps: {
|
284
|
+
legend: { hidden: !0 }
|
285
|
+
},
|
286
|
+
slots: {
|
287
|
+
pieArc: (ae) => /* @__PURE__ */ e(
|
288
|
+
St,
|
289
|
+
{
|
290
|
+
arcColor: ae.color,
|
291
|
+
arcRadius: n,
|
292
|
+
arcStartAngle: _,
|
293
|
+
centerX: k,
|
294
|
+
centerY: P,
|
295
|
+
dataIndex: ae.dataIndex,
|
296
|
+
dialScoreData: i,
|
297
|
+
innerArcRadius: w,
|
298
|
+
isFinacialStrengthGraph: h,
|
299
|
+
outterArcRadius: F,
|
300
|
+
progressEndAngle: E,
|
301
|
+
totalAngularSpan: T,
|
302
|
+
unitsPerSegment: ke
|
303
|
+
}
|
304
|
+
)
|
305
|
+
},
|
306
|
+
sx: {
|
307
|
+
"& path": {
|
308
|
+
stroke: "none"
|
309
|
+
}
|
310
|
+
},
|
311
|
+
width: O,
|
312
|
+
children: o >= d && o <= l && /* @__PURE__ */ e(
|
313
|
+
"circle",
|
314
|
+
{
|
315
|
+
cx: k + ee,
|
316
|
+
cy: P + ve,
|
317
|
+
fill: m.palette.common.white,
|
318
|
+
r: se[t].markerSize,
|
319
|
+
stroke: h ? "url(#arcGradient)" : s,
|
320
|
+
strokeWidth: t !== "SM" ? 3 : 1
|
321
|
+
}
|
322
|
+
)
|
323
|
+
}
|
324
|
+
),
|
325
|
+
/* @__PURE__ */ e(
|
326
|
+
x,
|
327
|
+
{
|
328
|
+
sx: {
|
329
|
+
position: "absolute",
|
330
|
+
top: `${P}px`,
|
331
|
+
left: `${k}px`,
|
332
|
+
transform: "translate(-50%, -50%)",
|
333
|
+
textAlign: "center"
|
334
|
+
},
|
335
|
+
children: /* @__PURE__ */ u(
|
336
|
+
g,
|
337
|
+
{
|
338
|
+
spacing: 1,
|
339
|
+
sx: { alignItems: "center", justifyContent: "center", gap: t !== "M" ? 10 : 3 },
|
340
|
+
children: [
|
341
|
+
/* @__PURE__ */ e(
|
342
|
+
y,
|
343
|
+
{
|
344
|
+
sx: {
|
345
|
+
fontSize: se[t].healthScoreFontSize,
|
346
|
+
lineHeight: t !== "SM" ? "48px" : "100%"
|
347
|
+
},
|
348
|
+
variant: "H1",
|
349
|
+
children: o
|
350
|
+
}
|
351
|
+
),
|
352
|
+
t !== "SM" && /* @__PURE__ */ e(y, { sx: { fontWeight: 600 }, variant: t === "L" ? "body1" : "body2", children: r })
|
353
|
+
]
|
354
|
+
}
|
355
|
+
)
|
356
|
+
}
|
357
|
+
),
|
358
|
+
a !== void 0 && /* @__PURE__ */ e(
|
359
|
+
x,
|
360
|
+
{
|
361
|
+
sx: {
|
362
|
+
position: "absolute",
|
363
|
+
top: `${P * 2 * 0.83}px`,
|
364
|
+
left: `${k}px`,
|
365
|
+
transform: "translate(-50%, -50%)",
|
366
|
+
textAlign: "center"
|
367
|
+
},
|
368
|
+
children: typeof a == "number" ? /* @__PURE__ */ u(g, { sx: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
369
|
+
a > 0 ? /* @__PURE__ */ e(De, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(Ae, { size: 16, sx: { color: "text.secondary" } }),
|
370
|
+
/* @__PURE__ */ e(
|
371
|
+
y,
|
372
|
+
{
|
373
|
+
sx: {
|
374
|
+
fontWeight: 600,
|
375
|
+
color: a > 0 ? "success.main" : "text.secondary"
|
376
|
+
},
|
377
|
+
variant: "body1",
|
378
|
+
children: a
|
379
|
+
}
|
380
|
+
)
|
381
|
+
] }) : /* @__PURE__ */ e(y, { sx: { color: "text.secondary" }, variant: "subtitle2", children: a })
|
382
|
+
}
|
383
|
+
),
|
384
|
+
c !== void 0 && /* @__PURE__ */ e(
|
385
|
+
x,
|
386
|
+
{
|
387
|
+
sx: {
|
388
|
+
position: "absolute",
|
389
|
+
top: `${P * 2 * 0.83}px`,
|
390
|
+
left: `${k - k / 2}px`,
|
391
|
+
// shift left from center
|
392
|
+
transform: "translate(-50%, -50%)",
|
393
|
+
textAlign: "left"
|
394
|
+
},
|
395
|
+
children: /* @__PURE__ */ e(y, { variant: "body1", children: c })
|
396
|
+
}
|
397
|
+
),
|
398
|
+
p !== void 0 && /* @__PURE__ */ e(
|
399
|
+
x,
|
400
|
+
{
|
401
|
+
sx: {
|
402
|
+
position: "absolute",
|
403
|
+
top: `${P * 2 * 0.83}px`,
|
404
|
+
left: `${k + k / 2}px`,
|
405
|
+
transform: "translate(-50%, -50%)",
|
406
|
+
textAlign: "right"
|
407
|
+
},
|
408
|
+
children: /* @__PURE__ */ e(y, { variant: "body1", children: p })
|
409
|
+
}
|
410
|
+
)
|
411
|
+
]
|
412
|
+
}
|
413
|
+
);
|
414
|
+
}, Se = I(
|
415
|
+
({ arcRadius: n, size: o = "L", healthScore: t, footerCenterContent: i }) => {
|
416
|
+
const d = [
|
417
|
+
{ id: 1, label: "Group A", value: 25 },
|
418
|
+
{ id: 2, label: "Group B", value: 25 },
|
419
|
+
{ id: 3, label: "Group C", value: 25 },
|
420
|
+
{ id: 4, label: "Group D", value: 25 }
|
421
|
+
], { finstrong: l } = S(), s = ie(t, l);
|
422
|
+
return /* @__PURE__ */ e(
|
423
|
+
Ce,
|
424
|
+
{
|
425
|
+
arcRadius: n,
|
426
|
+
dialScoreData: d,
|
427
|
+
footerCenterContent: o === "L" ? l.footer_center_content_updated_just_now : i,
|
428
|
+
healthScore: t,
|
429
|
+
healthScoreStatus: s.status,
|
430
|
+
isFinacialStrengthGraph: !0,
|
431
|
+
size: o
|
432
|
+
}
|
433
|
+
);
|
434
|
+
}
|
435
|
+
), zo = I(
|
436
|
+
({
|
437
|
+
arcRadius: n,
|
438
|
+
size: o = "L",
|
439
|
+
healthScore: t,
|
440
|
+
maxValue: i = 850,
|
441
|
+
minValue: d = 300,
|
442
|
+
footerCenterContent: l
|
443
|
+
}) => {
|
444
|
+
const r = G().palette.mode === "dark", a = [
|
445
|
+
{
|
446
|
+
id: 1,
|
447
|
+
label: "Poor",
|
448
|
+
value: 279,
|
449
|
+
color: r ? M.POOR : D.POOR
|
450
|
+
},
|
451
|
+
{
|
452
|
+
id: 2,
|
453
|
+
label: "Fair",
|
454
|
+
value: 89,
|
455
|
+
color: r ? M.FAIR : D.FAIR
|
456
|
+
},
|
457
|
+
{
|
458
|
+
id: 3,
|
459
|
+
label: "Good",
|
460
|
+
value: 69,
|
461
|
+
color: r ? M.GOOD : D.GOOD
|
462
|
+
},
|
463
|
+
{
|
464
|
+
id: 4,
|
465
|
+
label: "Very Good",
|
466
|
+
value: 59,
|
467
|
+
color: r ? M.VERY_GOOD : D.VERY_GOOD
|
468
|
+
},
|
469
|
+
{
|
470
|
+
id: 5,
|
471
|
+
label: "Exceptional",
|
472
|
+
value: 50,
|
473
|
+
color: r ? M.EXCEPTIONAL : D.EXCEPTIONAL
|
474
|
+
}
|
475
|
+
], { finstrong: c } = S(), { isCopyLoaded: p } = z();
|
476
|
+
if (!p) return /* @__PURE__ */ e(N, {});
|
477
|
+
const { status: h, color: m = "none" } = gt(
|
478
|
+
t,
|
479
|
+
r,
|
480
|
+
c.credit_score_status
|
481
|
+
);
|
482
|
+
return /* @__PURE__ */ e(
|
483
|
+
Ce,
|
484
|
+
{
|
485
|
+
arcRadius: n,
|
486
|
+
dialScoreData: a,
|
487
|
+
footerCenterContent: l,
|
488
|
+
footerLeftContent: d,
|
489
|
+
footerRightContent: i,
|
490
|
+
healthScore: t,
|
491
|
+
healthScoreStatus: h,
|
492
|
+
markerColor: m,
|
493
|
+
maxValue: i,
|
494
|
+
minValue: d,
|
495
|
+
size: o
|
496
|
+
}
|
497
|
+
);
|
498
|
+
}
|
499
|
+
), Q = ({
|
500
|
+
isDashboard: n = !1,
|
501
|
+
hasIcon: o = !0,
|
502
|
+
buttonText: t,
|
503
|
+
title: i,
|
504
|
+
description: d,
|
505
|
+
sx: l
|
506
|
+
}) => {
|
507
|
+
const [s, r] = C.useState(!1), { connect: a, finstrong: c } = S();
|
508
|
+
return /* @__PURE__ */ u(
|
509
|
+
J,
|
510
|
+
{
|
511
|
+
sx: {
|
512
|
+
pb: 24,
|
513
|
+
pt: 18,
|
514
|
+
px: 24,
|
515
|
+
width: "100%",
|
516
|
+
...l
|
517
|
+
},
|
518
|
+
children: [
|
519
|
+
/* @__PURE__ */ u(
|
520
|
+
g,
|
521
|
+
{
|
522
|
+
sx: {
|
523
|
+
gap: 8,
|
524
|
+
...n && { flexDirection: "row", alignItems: "center" }
|
525
|
+
},
|
526
|
+
children: [
|
527
|
+
o && /* @__PURE__ */ e(me, { sx: { height: 20, width: 20 } }),
|
528
|
+
/* @__PURE__ */ e(H, { className: "connect-more-accounts-title", sx: { ...n && { fontSize: 15 } }, children: i || c.connect_more_accounts_title })
|
529
|
+
]
|
530
|
+
}
|
531
|
+
),
|
532
|
+
/* @__PURE__ */ e(
|
533
|
+
y,
|
534
|
+
{
|
535
|
+
className: "connect-more-accounts-description",
|
536
|
+
sx: { color: "text.secondary", mt: 8 },
|
537
|
+
variant: "subtitle1",
|
538
|
+
children: d || c.connect_more_accounts_description
|
539
|
+
}
|
540
|
+
),
|
541
|
+
/* @__PURE__ */ e(
|
542
|
+
q,
|
543
|
+
{
|
544
|
+
endIcon: /* @__PURE__ */ e(j, {}),
|
545
|
+
onClick: () => r(!0),
|
546
|
+
size: "small",
|
547
|
+
sx: { p: 0, mt: 8, "&:hover": { backgroundColor: "transparent" } },
|
548
|
+
children: /* @__PURE__ */ e(W, { sx: { fontWeight: 600 }, variant: "body2", children: t || c.connect_more_accounts_button })
|
549
|
+
}
|
550
|
+
),
|
551
|
+
/* @__PURE__ */ e(
|
552
|
+
be,
|
553
|
+
{
|
554
|
+
onClose: () => r(!1),
|
555
|
+
showConnectWidget: s,
|
556
|
+
title: a.mini_title
|
557
|
+
}
|
558
|
+
)
|
559
|
+
]
|
560
|
+
}
|
561
|
+
);
|
562
|
+
}, vt = I(() => {
|
563
|
+
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);
|
564
|
+
return !d || !l ? /* @__PURE__ */ e(N, {}) : /* @__PURE__ */ u(J, { ref: o, sx: { p: 16 }, children: [
|
565
|
+
/* @__PURE__ */ e(
|
566
|
+
Ve,
|
567
|
+
{
|
568
|
+
action: /* @__PURE__ */ e(
|
569
|
+
q,
|
570
|
+
{
|
571
|
+
endIcon: /* @__PURE__ */ e(j, {}),
|
572
|
+
sx: {
|
573
|
+
fontSize: 13,
|
574
|
+
lineHeight: "16px",
|
575
|
+
fontWeight: 600,
|
576
|
+
color: "primary.main"
|
577
|
+
},
|
578
|
+
variant: "text",
|
579
|
+
children: i.financial_strength_header_action
|
580
|
+
}
|
581
|
+
),
|
582
|
+
subheader: /* @__PURE__ */ e(H, { color: "text.primary", children: i.financial_strength_header }),
|
583
|
+
sx: {
|
584
|
+
p: 0,
|
585
|
+
"& .MuiCardHeader-content": {
|
586
|
+
overflow: "hidden"
|
587
|
+
}
|
588
|
+
}
|
589
|
+
}
|
590
|
+
),
|
591
|
+
/* @__PURE__ */ e(g, { sx: { justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ e(
|
592
|
+
Se,
|
593
|
+
{
|
594
|
+
arcRadius: t <= 323 ? 73 : 154,
|
595
|
+
footerCenterContent: r,
|
596
|
+
healthScore: s?.health_score || 0,
|
597
|
+
size: t <= 323 ? "M" : "L"
|
598
|
+
}
|
599
|
+
) }),
|
600
|
+
s?.health_score ? /* @__PURE__ */ u(
|
601
|
+
Xe,
|
602
|
+
{
|
603
|
+
sx: {
|
604
|
+
px: 16,
|
605
|
+
backgroundColor: a ? "grey.800" : "grey.50",
|
606
|
+
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
607
|
+
"&.Mui-expanded": {
|
608
|
+
m: 0
|
609
|
+
},
|
610
|
+
"&::before": {
|
611
|
+
display: "none"
|
612
|
+
}
|
613
|
+
},
|
614
|
+
children: [
|
615
|
+
/* @__PURE__ */ e(
|
616
|
+
Ue,
|
617
|
+
{
|
618
|
+
expandIcon: /* @__PURE__ */ e(we, { size: 20 }),
|
619
|
+
sx: {
|
620
|
+
height: 52,
|
621
|
+
p: 0,
|
622
|
+
"&.Mui-expanded": {
|
623
|
+
minHeight: 0
|
624
|
+
}
|
625
|
+
},
|
626
|
+
children: /* @__PURE__ */ e(y, { sx: { fontWeight: 600 }, variant: "body1", children: i.accordion_title_text })
|
627
|
+
}
|
628
|
+
),
|
629
|
+
/* @__PURE__ */ e(je, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(y, { variant: "subtitle1", children: c.scoreContent }) })
|
630
|
+
]
|
631
|
+
}
|
632
|
+
) : /* @__PURE__ */ e(
|
633
|
+
Q,
|
634
|
+
{
|
635
|
+
buttonText: i.connect_more_accounts_title,
|
636
|
+
description: i.health_score_zero_description,
|
637
|
+
hasIcon: !1,
|
638
|
+
isDashboard: !0,
|
639
|
+
sx: {
|
640
|
+
backgroundColor: a ? "grey.800" : "grey.50",
|
641
|
+
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
642
|
+
".connect-more-accounts-title": {
|
643
|
+
fontWeight: 600,
|
644
|
+
lineHeight: "20px",
|
645
|
+
color: "text.primary"
|
646
|
+
},
|
647
|
+
".connect-more-accounts-description": { color: "text.primary" }
|
648
|
+
},
|
649
|
+
title: i.health_score_zero_title
|
650
|
+
}
|
651
|
+
)
|
652
|
+
] });
|
653
|
+
}), kt = ({ isOpen: n, onClose: o }) => {
|
654
|
+
const { common: t, finstrong: i } = S(), { isMobile: d } = xe(), { updateUser: l, user: s } = Y(), [r, a] = C.useState(s.credit_score || 0), c = !isNaN(r), p = () => {
|
655
|
+
o(), setTimeout(() => a(s.credit_score || 0), 300);
|
656
|
+
}, h = () => {
|
657
|
+
!r || r === s.credit_score || l({ ...s, credit_score: r });
|
658
|
+
};
|
659
|
+
return /* @__PURE__ */ e(
|
660
|
+
Ze,
|
661
|
+
{
|
662
|
+
copy: { close_aria: t.close_aria, title: i.edit_credit_score },
|
663
|
+
disablePrimaryButton: !r || !c,
|
664
|
+
isOpen: n,
|
665
|
+
maxWidth: "xs",
|
666
|
+
onClose: p,
|
667
|
+
onPrimaryAction: h,
|
668
|
+
primaryColor: "primary",
|
669
|
+
primaryText: t.save_button,
|
670
|
+
sx: {
|
671
|
+
"& .MuiDialog-paper": {
|
672
|
+
minWidth: d ? "100%" : 400
|
673
|
+
}
|
674
|
+
},
|
675
|
+
children: /* @__PURE__ */ e(
|
676
|
+
Qe,
|
677
|
+
{
|
678
|
+
error: !c,
|
679
|
+
fullWidth: !0,
|
680
|
+
inputMode: "numeric",
|
681
|
+
inputProps: {
|
682
|
+
noValidate: !0,
|
683
|
+
pattern: "[0-9]*"
|
684
|
+
},
|
685
|
+
onChange: (m) => a(Number(m.target.value)),
|
686
|
+
value: c ? r : ""
|
687
|
+
}
|
688
|
+
)
|
689
|
+
}
|
690
|
+
);
|
691
|
+
}, At = I(kt), It = ({ isOpen: n, onClose: o }) => {
|
692
|
+
const { finstrong: t } = S(), i = G(), { updateUser: d, user: l } = Y(), [s, r] = C.useState(l.birthday), a = (p) => {
|
693
|
+
r(Math.floor(new Date(p).getTime() / 1e3));
|
694
|
+
};
|
695
|
+
return /* @__PURE__ */ e(
|
696
|
+
V,
|
697
|
+
{
|
698
|
+
isOpen: n,
|
699
|
+
onClose: o,
|
700
|
+
onPrimaryAction: () => {
|
701
|
+
!s || s === l.birthday || (d({ ...l, birthday: s }), o());
|
702
|
+
},
|
703
|
+
onSecondaryAction: o,
|
704
|
+
title: t.date_of_birth,
|
705
|
+
children: /* @__PURE__ */ e(ot, { dateAdapter: et, children: /* @__PURE__ */ e(
|
706
|
+
tt,
|
707
|
+
{
|
708
|
+
disableFuture: !0,
|
709
|
+
onChange: a,
|
710
|
+
slotProps: {
|
711
|
+
nextIconButton: {
|
712
|
+
sx: {
|
713
|
+
color: "primary.main",
|
714
|
+
"&:hover": { bgcolor: te(i.palette.primary.light, 0.1) }
|
715
|
+
}
|
716
|
+
},
|
717
|
+
previousIconButton: {
|
718
|
+
sx: {
|
719
|
+
color: "primary.main",
|
720
|
+
"&:hover": { bgcolor: te(i.palette.primary.light, 0.1) }
|
721
|
+
}
|
722
|
+
}
|
723
|
+
},
|
724
|
+
slots: {
|
725
|
+
actionBar: () => null,
|
726
|
+
toolbar: () => null
|
727
|
+
},
|
728
|
+
sx: {
|
729
|
+
width: "100%",
|
730
|
+
"& .MuiIconButton-edgeEnd": {
|
731
|
+
color: "primary.main",
|
732
|
+
"&:hover": { bgcolor: te(i.palette.primary.light, 0.1) }
|
733
|
+
}
|
734
|
+
},
|
735
|
+
value: s ? new Date(s * 1e3) : /* @__PURE__ */ new Date()
|
736
|
+
}
|
737
|
+
) })
|
738
|
+
}
|
739
|
+
);
|
740
|
+
}, Ot = I(It), Dt = ({ value: n, completeCopy: o }) => /* @__PURE__ */ u(g, { sx: { gap: 8 }, children: [
|
741
|
+
/* @__PURE__ */ e(g, { sx: { flexDirection: "row", gap: 4 }, children: Array.from({ length: 4 }).map((t, i) => /* @__PURE__ */ e(
|
742
|
+
x,
|
743
|
+
{
|
744
|
+
sx: {
|
745
|
+
bgcolor: i < n ? "primary.main" : "neutral.light",
|
746
|
+
borderRadius: "24px",
|
747
|
+
height: 4,
|
748
|
+
width: "100%"
|
749
|
+
}
|
750
|
+
},
|
751
|
+
i
|
752
|
+
)) }),
|
753
|
+
/* @__PURE__ */ u(W, { sx: { color: "text.secondary" }, variant: "body2", children: [
|
754
|
+
n / 4 * 100,
|
755
|
+
"% ",
|
756
|
+
o
|
757
|
+
] })
|
758
|
+
] }), Mt = ({ isOpen: n, onClose: o }) => {
|
759
|
+
const { visibleFinstrongAccounts: t } = ge(), { incomeBudget: i } = fe(), {
|
760
|
+
accounts: d,
|
761
|
+
common: l,
|
762
|
+
finstrong: s
|
763
|
+
} = S(), { user: r } = Y(), [a, c] = C.useState(null), h = [
|
764
|
+
{
|
765
|
+
dynamicCopy: s.add_profile_item,
|
766
|
+
fallbackLabel: s.monthly_income,
|
767
|
+
icon: /* @__PURE__ */ e(Re, {}),
|
768
|
+
key: A.MonthlyIncome,
|
769
|
+
label: s.monthly_income,
|
770
|
+
value: i
|
771
|
+
},
|
772
|
+
{
|
773
|
+
dynamicCopy: s.add_profile_item,
|
774
|
+
fallbackLabel: s.date_of_birth,
|
775
|
+
icon: /* @__PURE__ */ e(Fe, {}),
|
776
|
+
key: A.DateOfBirth,
|
777
|
+
label: s.date_of_birth,
|
778
|
+
value: r.birthday
|
779
|
+
},
|
780
|
+
{
|
781
|
+
dynamicCopy: s.add_profile_item,
|
782
|
+
fallbackLabel: s.credit_score,
|
783
|
+
icon: /* @__PURE__ */ e(ue, {}),
|
784
|
+
key: A.CreditScore,
|
785
|
+
label: s.credit_score,
|
786
|
+
value: r.credit_score
|
787
|
+
},
|
788
|
+
{
|
789
|
+
fallbackLabel: s.connect_your_accounts,
|
790
|
+
icon: /* @__PURE__ */ e(me, {}),
|
791
|
+
key: A.Connections,
|
792
|
+
label: s.connections,
|
793
|
+
value: t.length > 0 ? b(
|
794
|
+
s.connected_account,
|
795
|
+
String(t.length),
|
796
|
+
t.length > 1 ? s.accounts : s.account
|
797
|
+
) : void 0
|
798
|
+
}
|
799
|
+
].map((m) => xt(m));
|
800
|
+
return /* @__PURE__ */ u(V, { isOpen: n, onClose: o, title: s.financial_profile, children: [
|
801
|
+
/* @__PURE__ */ u(g, { sx: { gap: 20, p: 24 }, children: [
|
802
|
+
/* @__PURE__ */ u(g, { sx: { gap: 8 }, children: [
|
803
|
+
/* @__PURE__ */ e(H, { children: s.your_financial_profile }),
|
804
|
+
/* @__PURE__ */ e(y, { children: s.financial_profile_description })
|
805
|
+
] }),
|
806
|
+
/* @__PURE__ */ e(
|
807
|
+
Dt,
|
808
|
+
{
|
809
|
+
completeCopy: s.complete,
|
810
|
+
value: h.reduce((m, _) => m + (_.isComplete ? 1 : 0), 0)
|
811
|
+
}
|
812
|
+
)
|
813
|
+
] }),
|
814
|
+
/* @__PURE__ */ e(_t, { list: h, onClickItem: c }),
|
815
|
+
/* @__PURE__ */ e(x, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
816
|
+
Q,
|
817
|
+
{
|
818
|
+
description: s.connect_more_accounts_to_view_more_accurate_financial_picture,
|
819
|
+
isDashboard: !0,
|
820
|
+
title: s.dont_see_all_your_accounts
|
821
|
+
}
|
822
|
+
) }),
|
823
|
+
/* @__PURE__ */ e(
|
824
|
+
V,
|
825
|
+
{
|
826
|
+
isOpen: a === A.MonthlyIncome,
|
827
|
+
onClose: () => c(null),
|
828
|
+
title: l.settings,
|
829
|
+
children: /* @__PURE__ */ e(Je, {})
|
830
|
+
}
|
831
|
+
),
|
832
|
+
/* @__PURE__ */ e(Ot, { isOpen: a === A.DateOfBirth, onClose: () => c(null) }),
|
833
|
+
/* @__PURE__ */ e(At, { isOpen: a === A.CreditScore, onClose: () => c(null) }),
|
834
|
+
/* @__PURE__ */ e(
|
835
|
+
qe,
|
836
|
+
{
|
837
|
+
onClose: () => c(null),
|
838
|
+
showConnectionsWidget: a === A.Connections,
|
839
|
+
title: d.manage_connections
|
840
|
+
}
|
841
|
+
)
|
842
|
+
] });
|
843
|
+
}, Tt = I(Mt), X = {
|
844
|
+
creditScore: {
|
845
|
+
poor: 600,
|
846
|
+
good: 720
|
847
|
+
},
|
848
|
+
daysOfCashOnHand: {
|
849
|
+
poor: 30,
|
850
|
+
good: 90
|
851
|
+
},
|
852
|
+
debtToIncomeRatio: {
|
853
|
+
poor: 40,
|
854
|
+
good: 30
|
855
|
+
},
|
856
|
+
emergencySavings: {
|
857
|
+
poor: 750,
|
858
|
+
good: 1e3
|
859
|
+
},
|
860
|
+
spendToIncomeRatio: {
|
861
|
+
poor: 110,
|
862
|
+
good: 100
|
863
|
+
}
|
864
|
+
}, f = {
|
865
|
+
GOOD: "Good",
|
866
|
+
FAIR: "Fair",
|
867
|
+
OFF_TRACK: "Off Track",
|
868
|
+
MISSING: "Missing"
|
869
|
+
}, B = ({
|
870
|
+
title: n,
|
871
|
+
description: o,
|
872
|
+
cardState: t = f.MISSING,
|
873
|
+
stateTitle: i
|
874
|
+
}) => {
|
875
|
+
const d = {
|
876
|
+
[f.GOOD]: { backgroundColor: "success.lighter", color: "success.main" },
|
877
|
+
[f.FAIR]: { backgroundColor: "warning.lighter", color: "warning.main" },
|
878
|
+
[f.OFF_TRACK]: { backgroundColor: "error.lighter", color: "error.main" },
|
879
|
+
[f.MISSING]: { backgroundColor: "divider", color: "text.secondary" }
|
880
|
+
}[t];
|
881
|
+
return /* @__PURE__ */ u(
|
882
|
+
g,
|
883
|
+
{
|
884
|
+
alignItems: "center",
|
885
|
+
flexDirection: "row",
|
886
|
+
gap: 12,
|
887
|
+
justifyContent: "space-between",
|
888
|
+
sx: {
|
889
|
+
p: 16,
|
890
|
+
border: "1px solid",
|
891
|
+
borderColor: "divider",
|
892
|
+
borderRadius: 2
|
893
|
+
},
|
894
|
+
children: [
|
895
|
+
/* @__PURE__ */ u(x, { sx: { minHeight: 48 }, children: [
|
896
|
+
/* @__PURE__ */ u(g, { flexDirection: "row", gap: 4, children: [
|
897
|
+
/* @__PURE__ */ e(y, { fontWeight: 600, sx: { mb: 8 }, truncate: !0, variant: "body1", children: n }),
|
898
|
+
/* @__PURE__ */ e(
|
899
|
+
x,
|
900
|
+
{
|
901
|
+
sx: {
|
902
|
+
borderRadius: 3,
|
903
|
+
backgroundColor: d.backgroundColor,
|
904
|
+
px: 8,
|
905
|
+
py: 2,
|
906
|
+
height: 16
|
907
|
+
},
|
908
|
+
children: /* @__PURE__ */ e(y, { fontWeight: 700, sx: { minHeight: 12 }, uppercase: !0, variant: "tiny", children: i })
|
909
|
+
}
|
910
|
+
)
|
911
|
+
] }),
|
912
|
+
/* @__PURE__ */ e(y, { color: "secondary", variant: "subtitle2", children: o })
|
913
|
+
] }),
|
914
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(Ee, { color: "secondary", name: "chevron_right", size: 24 }) })
|
915
|
+
]
|
916
|
+
}
|
917
|
+
);
|
918
|
+
}, wt = () => {
|
919
|
+
const { healthScore: n } = $(), { finstrong: o } = S(), { key_indicators_spend: t } = o, i = (r) => {
|
920
|
+
const { good: a, poor: c } = X.spendToIncomeRatio;
|
921
|
+
let p = f.MISSING, h = t.ratio_missing_description, m = o.key_indicators_missing;
|
922
|
+
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)), {
|
923
|
+
cardState: p,
|
924
|
+
description: h,
|
925
|
+
title: t.ratio_card_title,
|
926
|
+
stateTitle: m
|
927
|
+
};
|
928
|
+
}, d = (r) => {
|
929
|
+
let a = f.MISSING, c = t.count_missing_description, p = o.key_indicators_missing;
|
930
|
+
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)), {
|
931
|
+
cardState: a,
|
932
|
+
description: c,
|
933
|
+
title: t.count_card_title,
|
934
|
+
stateTitle: p
|
935
|
+
};
|
936
|
+
}, { spendToIncomeRatio: l, spendFeeCount: s } = C.useMemo(() => {
|
937
|
+
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);
|
938
|
+
return { spendToIncomeRatio: a, spendFeeCount: c };
|
939
|
+
}, [
|
940
|
+
n.spend_to_income_ratio,
|
941
|
+
n.spending_fee_transaction_count,
|
942
|
+
t,
|
943
|
+
o
|
944
|
+
]);
|
945
|
+
return /* @__PURE__ */ u(g, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
946
|
+
/* @__PURE__ */ e(
|
947
|
+
B,
|
948
|
+
{
|
949
|
+
cardState: l.cardState,
|
950
|
+
description: l.description,
|
951
|
+
stateTitle: l.stateTitle,
|
952
|
+
title: l.title
|
953
|
+
}
|
954
|
+
),
|
955
|
+
/* @__PURE__ */ e(
|
956
|
+
B,
|
957
|
+
{
|
958
|
+
cardState: s.cardState,
|
959
|
+
description: s.description,
|
960
|
+
stateTitle: s.stateTitle,
|
961
|
+
title: s.title
|
962
|
+
}
|
963
|
+
)
|
964
|
+
] });
|
965
|
+
}, Rt = () => {
|
966
|
+
const { healthScore: n } = $(), { finstrong: o } = S(), { key_indicators_save: t } = o, i = (r) => {
|
967
|
+
const { good: a, poor: c } = X.daysOfCashOnHand;
|
968
|
+
let p = f.MISSING, h = t.days_of_cash_missing_description, m = o.key_indicators_missing;
|
969
|
+
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)), {
|
970
|
+
cardState: p,
|
971
|
+
description: h,
|
972
|
+
title: t.days_of_cash_title,
|
973
|
+
stateTitle: m
|
974
|
+
};
|
975
|
+
}, d = (r) => {
|
976
|
+
const { good: a, poor: c } = X.emergencySavings;
|
977
|
+
let p = f.MISSING, h = t.emergency_savings_missing_description, m = o.key_indicators_missing;
|
978
|
+
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(
|
979
|
+
t.emergency_savings_fair_description,
|
980
|
+
rt(r, "0,0.00")
|
981
|
+
), m = o.key_indicators_fair) : r < c && (p = f.OFF_TRACK, h = t.emergency_savings_off_track_description, m = o.key_indicators_off_track)), {
|
982
|
+
cardState: p,
|
983
|
+
description: h,
|
984
|
+
title: t.emergency_savings_title,
|
985
|
+
stateTitle: m
|
986
|
+
};
|
987
|
+
}, { daysOfCashOnHand: l, emergencySavings: s } = C.useMemo(() => {
|
988
|
+
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);
|
989
|
+
return { daysOfCashOnHand: a, emergencySavings: p };
|
990
|
+
}, [
|
991
|
+
n.months_of_cash_on_hand,
|
992
|
+
n.emergency_savings_on_hand,
|
993
|
+
t,
|
994
|
+
o
|
995
|
+
]);
|
996
|
+
return /* @__PURE__ */ u(g, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
997
|
+
/* @__PURE__ */ e(
|
998
|
+
B,
|
999
|
+
{
|
1000
|
+
cardState: l.cardState,
|
1001
|
+
description: l.description,
|
1002
|
+
stateTitle: l.stateTitle,
|
1003
|
+
title: l.title
|
1004
|
+
}
|
1005
|
+
),
|
1006
|
+
/* @__PURE__ */ e(
|
1007
|
+
B,
|
1008
|
+
{
|
1009
|
+
cardState: s.cardState,
|
1010
|
+
description: s.description,
|
1011
|
+
stateTitle: s.stateTitle,
|
1012
|
+
title: s.title
|
1013
|
+
}
|
1014
|
+
)
|
1015
|
+
] });
|
1016
|
+
}, Ft = () => {
|
1017
|
+
const { healthScore: n } = $(), { finstrong: o } = S(), { key_indicators_borrow: t } = o, { user: i } = Y(), d = (a) => {
|
1018
|
+
const { good: c, poor: p } = X.debtToIncomeRatio;
|
1019
|
+
let h = f.MISSING, m = t.manage_debit_missing_description, _ = o.key_indicators_missing;
|
1020
|
+
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(
|
1021
|
+
t.manage_debit_off_track_description,
|
1022
|
+
a
|
1023
|
+
), _ = o.key_indicators_off_track)), {
|
1024
|
+
cardState: h,
|
1025
|
+
description: m,
|
1026
|
+
title: t.manage_debit_title,
|
1027
|
+
stateTitle: _
|
1028
|
+
};
|
1029
|
+
}, l = (a) => {
|
1030
|
+
const { good: c, poor: p } = X.creditScore;
|
1031
|
+
let h = f.MISSING, m = t.credit_score_missing_description, _ = o.key_indicators_missing;
|
1032
|
+
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(
|
1033
|
+
t.credit_score_off_track_description,
|
1034
|
+
a
|
1035
|
+
), _ = o.key_indicators_off_track)), {
|
1036
|
+
cardState: h,
|
1037
|
+
description: m,
|
1038
|
+
title: t.credit_score_title,
|
1039
|
+
stateTitle: _
|
1040
|
+
};
|
1041
|
+
}, { manageDebtStatus: s, creditScoreStatus: r } = C.useMemo(() => {
|
1042
|
+
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);
|
1043
|
+
return {
|
1044
|
+
manageDebtStatus: c,
|
1045
|
+
creditScoreStatus: p
|
1046
|
+
};
|
1047
|
+
}, [n.debt_to_income_ratio, i.credit_score, t, o]);
|
1048
|
+
return /* @__PURE__ */ u(g, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
1049
|
+
/* @__PURE__ */ e(
|
1050
|
+
B,
|
1051
|
+
{
|
1052
|
+
cardState: s.cardState,
|
1053
|
+
description: s.description,
|
1054
|
+
stateTitle: s.stateTitle,
|
1055
|
+
title: s.title
|
1056
|
+
}
|
1057
|
+
),
|
1058
|
+
/* @__PURE__ */ e(
|
1059
|
+
B,
|
1060
|
+
{
|
1061
|
+
cardState: r.cardState,
|
1062
|
+
description: r.description,
|
1063
|
+
stateTitle: r.stateTitle,
|
1064
|
+
title: r.title
|
1065
|
+
}
|
1066
|
+
)
|
1067
|
+
] });
|
1068
|
+
}, Pt = () => {
|
1069
|
+
const [n, o] = C.useState(0), { finstrong: t } = S();
|
1070
|
+
return /* @__PURE__ */ u(re, { children: [
|
1071
|
+
/* @__PURE__ */ u(
|
1072
|
+
nt,
|
1073
|
+
{
|
1074
|
+
"aria-label": "Key Indicators",
|
1075
|
+
centered: !0,
|
1076
|
+
onChange: (i, d) => o(d),
|
1077
|
+
sx: { mb: 0 },
|
1078
|
+
textColor: "primary",
|
1079
|
+
value: n,
|
1080
|
+
variant: "fullWidth",
|
1081
|
+
children: [
|
1082
|
+
/* @__PURE__ */ e(
|
1083
|
+
oe,
|
1084
|
+
{
|
1085
|
+
"aria-controls": "spend-details-tabpanel-0",
|
1086
|
+
icon: /* @__PURE__ */ e(ue, { sx: { mr: 8 } }),
|
1087
|
+
iconPosition: "start",
|
1088
|
+
id: "spend-details-tab-0",
|
1089
|
+
label: t.key_indicators_spend.title,
|
1090
|
+
sx: { minHeight: 44 }
|
1091
|
+
}
|
1092
|
+
),
|
1093
|
+
/* @__PURE__ */ e(
|
1094
|
+
oe,
|
1095
|
+
{
|
1096
|
+
"aria-controls": "save-details-tabpanel-1",
|
1097
|
+
icon: /* @__PURE__ */ e(Pe, { sx: { mr: 8 } }),
|
1098
|
+
iconPosition: "start",
|
1099
|
+
id: "save-details-tab-1",
|
1100
|
+
label: t.key_indicators_save.title,
|
1101
|
+
sx: { minHeight: 44 }
|
1102
|
+
}
|
1103
|
+
),
|
1104
|
+
/* @__PURE__ */ e(
|
1105
|
+
oe,
|
1106
|
+
{
|
1107
|
+
"aria-controls": "borrow-details-tabpanel-2",
|
1108
|
+
icon: /* @__PURE__ */ e(Ge, { sx: { mr: 8 } }),
|
1109
|
+
iconPosition: "start",
|
1110
|
+
id: "borrow-details-tab-2",
|
1111
|
+
label: t.key_indicators_borrow.title,
|
1112
|
+
sx: { minHeight: 44 }
|
1113
|
+
}
|
1114
|
+
)
|
1115
|
+
]
|
1116
|
+
}
|
1117
|
+
),
|
1118
|
+
/* @__PURE__ */ e(ne, { index: 0, name: "spend-details", value: n, children: /* @__PURE__ */ e(wt, {}) }),
|
1119
|
+
/* @__PURE__ */ e(ne, { index: 1, name: "save-details", value: n, children: /* @__PURE__ */ e(Rt, {}) }),
|
1120
|
+
/* @__PURE__ */ e(ne, { index: 2, name: "borrow-details", value: n, children: /* @__PURE__ */ e(Ft, {}) })
|
1121
|
+
] });
|
1122
|
+
}, Gt = ({
|
1123
|
+
additionalContent: n,
|
1124
|
+
children: o,
|
1125
|
+
description: t,
|
1126
|
+
drawerTitle: i,
|
1127
|
+
isOpen: d,
|
1128
|
+
loadConnectAccountsCard: l = !0,
|
1129
|
+
onClose: s,
|
1130
|
+
stickyComponent: r,
|
1131
|
+
title: a
|
1132
|
+
}) => {
|
1133
|
+
const { finstrong: c } = S(), { isCopyLoaded: p } = z();
|
1134
|
+
return p ? /* @__PURE__ */ u(V, { isOpen: d, onClose: s, title: i || c.key_indicators, children: [
|
1135
|
+
(a || t) && /* @__PURE__ */ u(g, { sx: { p: 24, pb: 0, gap: 8, backgroundColor: "background.paper" }, children: [
|
1136
|
+
a && /* @__PURE__ */ e(H, { children: a }),
|
1137
|
+
t && /* @__PURE__ */ e(y, { children: t })
|
1138
|
+
] }),
|
1139
|
+
r && /* @__PURE__ */ e(
|
1140
|
+
x,
|
1141
|
+
{
|
1142
|
+
sx: {
|
1143
|
+
position: "sticky",
|
1144
|
+
top: 0,
|
1145
|
+
zIndex: 1
|
1146
|
+
},
|
1147
|
+
children: r
|
1148
|
+
}
|
1149
|
+
),
|
1150
|
+
n && /* @__PURE__ */ e(x, { children: n }),
|
1151
|
+
/* @__PURE__ */ e(_e, {}),
|
1152
|
+
/* @__PURE__ */ u(g, { sx: { p: 24, gap: 24 }, children: [
|
1153
|
+
o,
|
1154
|
+
l && /* @__PURE__ */ e(Q, { isDashboard: !0 })
|
1155
|
+
] })
|
1156
|
+
] }) : /* @__PURE__ */ e(N, {});
|
1157
|
+
}, Lt = I(Gt), pe = ({
|
1158
|
+
content: n,
|
1159
|
+
islast: o = !1
|
1160
|
+
}) => /* @__PURE__ */ u(at, { sx: { minHeight: 0 }, children: [
|
1161
|
+
/* @__PURE__ */ u(mt, { children: [
|
1162
|
+
/* @__PURE__ */ e(pt, { sx: { bgcolor: "divider", borderWidth: 1, p: 3 } }),
|
1163
|
+
!o && /* @__PURE__ */ e(lt, { sx: { bgcolor: "divider", width: 0.1 } })
|
1164
|
+
] }),
|
1165
|
+
/* @__PURE__ */ e(dt, { sx: { pb: 16, pl: 12, pr: 0, pt: 5 }, children: /* @__PURE__ */ e(y, { fontSize: 13, fontWeight: 400, variant: "subtitle2", children: n }) })
|
1166
|
+
] }), Et = ({ report: n }) => {
|
1167
|
+
const { finstrong: o } = S(), { score_history_drawer_timeline: t } = o, {
|
1168
|
+
health_score_point_difference: i,
|
1169
|
+
newer_credit_score: d,
|
1170
|
+
older_credit_score: l,
|
1171
|
+
older_spend_to_income_ratio: s,
|
1172
|
+
newer_spend_to_income_ratio: r,
|
1173
|
+
older_health_score: a,
|
1174
|
+
newer_health_score: c,
|
1175
|
+
newer_score_calculated_at: p
|
1176
|
+
} = n, h = he(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 = () => {
|
1177
|
+
if (i === 0) return null;
|
1178
|
+
const T = i > 0 ? t.up_from : t.down_from, v = b(T, a, c);
|
1179
|
+
return /* @__PURE__ */ u(re, { children: [
|
1180
|
+
/* @__PURE__ */ e(it, { sx: { fontSize: 8, mx: 4, p: 1 } }),
|
1181
|
+
" ",
|
1182
|
+
v
|
1183
|
+
] });
|
1184
|
+
};
|
1185
|
+
return /* @__PURE__ */ e(J, { children: /* @__PURE__ */ u(g, { sx: { backgroundColor: "background.paper" }, children: [
|
1186
|
+
/* @__PURE__ */ e(x, { sx: { borderBottom: "1px solid", borderBottomColor: "divider", p: 16 }, children: /* @__PURE__ */ u(
|
1187
|
+
g,
|
1188
|
+
{
|
1189
|
+
flexDirection: "row",
|
1190
|
+
sx: { alignItems: "center", gap: 16, height: 48, width: "100%" },
|
1191
|
+
children: [
|
1192
|
+
/* @__PURE__ */ e(
|
1193
|
+
g,
|
1194
|
+
{
|
1195
|
+
sx: {
|
1196
|
+
alignItems: "center",
|
1197
|
+
backgroundColor: m(),
|
1198
|
+
borderRadius: 999,
|
1199
|
+
height: 48,
|
1200
|
+
justifyContent: "center",
|
1201
|
+
minWidth: 48
|
1202
|
+
},
|
1203
|
+
children: /* @__PURE__ */ e(y, { sx: { fontWeight: 600 }, variant: "Body", children: i > 0 ? `+${i}` : i })
|
1204
|
+
}
|
1205
|
+
),
|
1206
|
+
/* @__PURE__ */ u(g, { sx: { gap: 2, width: "80%" }, children: [
|
1207
|
+
/* @__PURE__ */ e(W, { fontWeight: 600, variant: "Body", children: _() }),
|
1208
|
+
/* @__PURE__ */ u(W, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
|
1209
|
+
h,
|
1210
|
+
" ",
|
1211
|
+
R()
|
1212
|
+
] })
|
1213
|
+
] })
|
1214
|
+
]
|
1215
|
+
}
|
1216
|
+
) }),
|
1217
|
+
i !== 0 && /* @__PURE__ */ e(x, { sx: { color: "text.secondary", pb: 8, pl: 32, pr: 16, pt: 12 }, children: /* @__PURE__ */ u(
|
1218
|
+
st,
|
1219
|
+
{
|
1220
|
+
sx: {
|
1221
|
+
[`& .${ct.root}:before`]: {
|
1222
|
+
flex: 0,
|
1223
|
+
padding: 0
|
1224
|
+
},
|
1225
|
+
m: 0,
|
1226
|
+
p: 0
|
1227
|
+
},
|
1228
|
+
children: [
|
1229
|
+
/* @__PURE__ */ e(
|
1230
|
+
pe,
|
1231
|
+
{
|
1232
|
+
content: b(
|
1233
|
+
t.spend_to_income_description,
|
1234
|
+
de(s),
|
1235
|
+
de(r)
|
1236
|
+
)
|
1237
|
+
}
|
1238
|
+
),
|
1239
|
+
/* @__PURE__ */ e(
|
1240
|
+
pe,
|
1241
|
+
{
|
1242
|
+
content: b(
|
1243
|
+
t.credit_score_description,
|
1244
|
+
l,
|
1245
|
+
d
|
1246
|
+
),
|
1247
|
+
islast: !0
|
1248
|
+
}
|
1249
|
+
)
|
1250
|
+
]
|
1251
|
+
}
|
1252
|
+
) })
|
1253
|
+
] }) });
|
1254
|
+
}, Wt = I(Et), Bt = ({ isOpen: n, onClose: o }) => {
|
1255
|
+
const t = G(), { finstrong: i } = S(), { isCopyLoaded: d, isInitialized: l } = z(), { healthScore: s, healthScoreChangeReports: r, augmentedChartData: a } = $();
|
1256
|
+
if (!d || !l) return /* @__PURE__ */ e(N, {});
|
1257
|
+
const c = ie(s.health_score || 0, i), p = r.slice().reverse();
|
1258
|
+
return /* @__PURE__ */ e(
|
1259
|
+
Lt,
|
1260
|
+
{
|
1261
|
+
additionalContent: /* @__PURE__ */ e(g, { sx: { pl: 18, backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(
|
1262
|
+
ye,
|
1263
|
+
{
|
1264
|
+
axisColor: t.palette.divider,
|
1265
|
+
baseline: "min",
|
1266
|
+
colors: [t.palette.primary.main],
|
1267
|
+
curveType: "natural",
|
1268
|
+
datasets: [a],
|
1269
|
+
height: 160,
|
1270
|
+
labels: [i.key_indicators_label],
|
1271
|
+
margin: { top: 12, left: 24 },
|
1272
|
+
showArea: !0,
|
1273
|
+
showAverage: !0,
|
1274
|
+
title: i.peer_average,
|
1275
|
+
useCustomMark: !0
|
1276
|
+
}
|
1277
|
+
) }),
|
1278
|
+
drawerTitle: i.score_history,
|
1279
|
+
isOpen: n,
|
1280
|
+
loadConnectAccountsCard: !1,
|
1281
|
+
onClose: o,
|
1282
|
+
stickyComponent: /* @__PURE__ */ u(
|
1283
|
+
g,
|
1284
|
+
{
|
1285
|
+
direction: "row",
|
1286
|
+
sx: { backgroundColor: "background.paper", gap: 16, pb: 12, pt: 8, px: 24 },
|
1287
|
+
children: [
|
1288
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
|
1289
|
+
Se,
|
1290
|
+
{
|
1291
|
+
arcRadius: 20,
|
1292
|
+
healthScore: s?.health_score,
|
1293
|
+
size: "SM"
|
1294
|
+
}
|
1295
|
+
) }),
|
1296
|
+
/* @__PURE__ */ u(x, { children: [
|
1297
|
+
/* @__PURE__ */ e(y, { fontSize: 18, fontWeight: 700, sx: { mb: 4 }, variant: "subtitle1", children: c.status }),
|
1298
|
+
/* @__PURE__ */ e(y, { variant: "caption", children: c.description })
|
1299
|
+
] })
|
1300
|
+
]
|
1301
|
+
}
|
1302
|
+
),
|
1303
|
+
children: /* @__PURE__ */ e(g, { sx: { gap: 16 }, children: p.map((h, m) => /* @__PURE__ */ e(Wt, { report: h }, m)) })
|
1304
|
+
}
|
1305
|
+
);
|
1306
|
+
}, Ht = I(Bt), zt = ({ onClick: n }) => {
|
1307
|
+
const { finstrong: o } = S(), { isCopyLoaded: t } = z();
|
1308
|
+
return t ? /* @__PURE__ */ u(g, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
|
1309
|
+
/* @__PURE__ */ e(Le, { size: 48 }),
|
1310
|
+
/* @__PURE__ */ u(g, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
|
1311
|
+
/* @__PURE__ */ e(H, { children: o.missing_data_title }),
|
1312
|
+
/* @__PURE__ */ e(y, { sx: { width: { sm: 348 } }, variant: "subtitle1", children: o.missing_data_description })
|
1313
|
+
] }),
|
1314
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(
|
1315
|
+
q,
|
1316
|
+
{
|
1317
|
+
endIcon: /* @__PURE__ */ e(j, {}),
|
1318
|
+
onClick: n,
|
1319
|
+
size: "small",
|
1320
|
+
sx: {
|
1321
|
+
fontSize: 13,
|
1322
|
+
":hover": {
|
1323
|
+
bgcolor: "transparent"
|
1324
|
+
}
|
1325
|
+
},
|
1326
|
+
variant: "text",
|
1327
|
+
children: o.connect_more_accounts_button
|
1328
|
+
}
|
1329
|
+
) })
|
1330
|
+
] }) : /* @__PURE__ */ e(N, {});
|
1331
|
+
}, $t = I(zt), Nt = ({ onBackClick: n, sx: o }) => {
|
1332
|
+
const t = G(), { visibleAccounts: i } = ge(), { dateRange: d, isDataLoaded: l, loadBudgetData: s, setTheme: r } = fe(), { 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 } = xe(), [F, w] = C.useState(!1);
|
1333
|
+
C.useEffect(() => {
|
1334
|
+
r(t);
|
1335
|
+
}, []), C.useEffect(() => E(i), [i]), C.useEffect(() => {
|
1336
|
+
v && (p().finally(), m().finally());
|
1337
|
+
}, [v]), C.useEffect(() => {
|
1338
|
+
v && (a(L, d.start, d.end), l || s());
|
1339
|
+
}, [d, l, v, L]);
|
1340
|
+
const [O, k] = C.useState(!1), [P, U] = C.useState(!1);
|
1341
|
+
if (!T || !v) return /* @__PURE__ */ e(N, {});
|
1342
|
+
const Z = () => {
|
1343
|
+
}, ee = () => k(!0);
|
1344
|
+
return /* @__PURE__ */ u(
|
1345
|
+
ut,
|
1346
|
+
{
|
1347
|
+
accountOptions: i,
|
1348
|
+
actions: [
|
1349
|
+
{
|
1350
|
+
iconName: "person",
|
1351
|
+
label: _.profile,
|
1352
|
+
onClick: ee
|
1353
|
+
}
|
1354
|
+
],
|
1355
|
+
hasDivider: !0,
|
1356
|
+
onAccountsFilterClick: Z,
|
1357
|
+
onBackClick: n,
|
1358
|
+
sx: o,
|
1359
|
+
title: _.title,
|
1360
|
+
children: [
|
1361
|
+
/* @__PURE__ */ u(
|
1362
|
+
g,
|
1363
|
+
{
|
1364
|
+
sx: {
|
1365
|
+
flexDirection: { md: "row" },
|
1366
|
+
gap: 24,
|
1367
|
+
justifyContent: "center",
|
1368
|
+
pt: K ? 24 : 16,
|
1369
|
+
px: 24
|
1370
|
+
},
|
1371
|
+
children: [
|
1372
|
+
/* @__PURE__ */ u(g, { sx: { gap: 24, width: { md: 432 } }, children: [
|
1373
|
+
/* @__PURE__ */ e(vt, {}),
|
1374
|
+
/* @__PURE__ */ e(
|
1375
|
+
Q,
|
1376
|
+
{
|
1377
|
+
description: _.connect_more_accounts_description,
|
1378
|
+
title: _.connect_more_accounts_title
|
1379
|
+
}
|
1380
|
+
)
|
1381
|
+
] }),
|
1382
|
+
/* @__PURE__ */ e(g, { sx: { maxWidth: 848, minWidth: 288, width: { md: 720 } }, children: /* @__PURE__ */ u(J, { sx: { background: t.palette.background.paper, p: 16 }, children: [
|
1383
|
+
/* @__PURE__ */ u(g, { direction: "row", sx: { alignItems: "center", justifyContent: "space-between" }, children: [
|
1384
|
+
/* @__PURE__ */ e(H, { children: _.key_indicators }),
|
1385
|
+
/* @__PURE__ */ e(
|
1386
|
+
q,
|
1387
|
+
{
|
1388
|
+
endIcon: /* @__PURE__ */ e(j, {}),
|
1389
|
+
onClick: () => U(!0),
|
1390
|
+
sx: {
|
1391
|
+
fontSize: 13
|
1392
|
+
},
|
1393
|
+
variant: "text",
|
1394
|
+
children: _.whats_changed
|
1395
|
+
}
|
1396
|
+
)
|
1397
|
+
] }),
|
1398
|
+
c.length ? /* @__PURE__ */ e(
|
1399
|
+
ye,
|
1400
|
+
{
|
1401
|
+
axisColor: t.palette.divider,
|
1402
|
+
baseline: "min",
|
1403
|
+
colors: [t.palette.primary.main],
|
1404
|
+
curveType: "natural",
|
1405
|
+
customLegendVariant: "XSmall",
|
1406
|
+
datasets: [c],
|
1407
|
+
height: 300,
|
1408
|
+
isGraphClippingXAxis: !0,
|
1409
|
+
labelBackgroundColor: t.palette.border.dark,
|
1410
|
+
labelFontColor: t.palette.common.white,
|
1411
|
+
labelFontSize: typeof t.typography.XSmall?.fontSize == "string" ? parseFloat(t.typography.XSmall.fontSize) : t.typography.XSmall?.fontSize,
|
1412
|
+
labels: [_.key_indicators_label],
|
1413
|
+
margin: { right: 20, left: 25 },
|
1414
|
+
showArea: !0,
|
1415
|
+
showAverage: !0,
|
1416
|
+
showLegend: !0,
|
1417
|
+
showMarkLabel: !0,
|
1418
|
+
showXAxis: !0,
|
1419
|
+
title: _.peer_average,
|
1420
|
+
useCustomMark: !0
|
1421
|
+
}
|
1422
|
+
) : /* @__PURE__ */ e($t, { onClick: () => w(!0) }),
|
1423
|
+
h.health_score !== null && /* @__PURE__ */ e(Pt, {})
|
1424
|
+
] }) })
|
1425
|
+
]
|
1426
|
+
}
|
1427
|
+
),
|
1428
|
+
/* @__PURE__ */ e(Tt, { isOpen: O, onClose: () => k(!1) }),
|
1429
|
+
/* @__PURE__ */ e(
|
1430
|
+
be,
|
1431
|
+
{
|
1432
|
+
onClose: () => w(!1),
|
1433
|
+
showConnectWidget: F,
|
1434
|
+
title: R.mini_title
|
1435
|
+
}
|
1436
|
+
),
|
1437
|
+
/* @__PURE__ */ e(
|
1438
|
+
Ht,
|
1439
|
+
{
|
1440
|
+
isOpen: P,
|
1441
|
+
onClose: () => U(!1)
|
1442
|
+
}
|
1443
|
+
)
|
1444
|
+
]
|
1445
|
+
}
|
1446
|
+
);
|
1447
|
+
}, $o = I(Nt);
|
1448
|
+
export {
|
1449
|
+
zo as CreditScoreGraph,
|
1450
|
+
Ce as DialScoreCard,
|
1451
|
+
Se as FinancialStrengthGraph,
|
1452
|
+
Xo as FinstrongApi,
|
1453
|
+
jo as FinstrongStore,
|
1454
|
+
$o as FinstrongWidget
|
1455
|
+
};
|