@mx-cartographer/experiences 7.6.3 → 7.6.5
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 +8 -0
- package/dist/{Account-CQ5cFk24.mjs → Account-CInGmc0-.mjs} +1 -1
- package/dist/{AccountDetailsContent-D4oOgcoI.mjs → AccountDetailsContent-C13fWjE9.mjs} +7 -7
- package/dist/{AccountDetailsHeader-D8wbZdBk.mjs → AccountDetailsHeader-CHnRF8JO.mjs} +4 -4
- package/dist/{AccountFields-D9Jil_7P.mjs → AccountFields-C1HYZrHp.mjs} +2 -2
- package/dist/{AccountListItem-Dikzsimi.mjs → AccountListItem-0Ue0FDFm.mjs} +3 -3
- package/dist/{AccountStore-CMEXKMhd.mjs → AccountStore-4NJz-RwU.mjs} +1 -1
- package/dist/{Accounts-HzJ6c9bx.mjs → Accounts-oiIKNL3g.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-D-RLoTEZ.mjs → CategorySelectorDrawer-DBOfaz2W.mjs} +1 -1
- package/dist/{ConnectDrawer-cXpqSnbj.mjs → ConnectDrawer-DJV-yWGN.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CecygbxT.mjs → ConnectionsDrawer-BFC4fpyR.mjs} +2 -2
- package/dist/{DebtsStore-DR1ZoH_X.mjs → DebtsStore-CwY5g3GU.mjs} +1 -1
- package/dist/{Drawer-HUhV0NVP.mjs → Drawer-DV4NTsFg.mjs} +21 -22
- package/dist/{FinstrongStore-DzK8bMoz.mjs → FinstrongStore-DA67hQcM.mjs} +1 -1
- package/dist/{GoalStore-DJ60VuL8.mjs → GoalStore-nm-xgH5C.mjs} +1 -1
- package/dist/{Help-C95envUC.mjs → Help-DODxp9uw.mjs} +1 -1
- package/dist/{ManageIncome-CV5uVBTz.mjs → ManageIncome-DO3i-WA4.mjs} +3 -3
- package/dist/{NetWorthStore-Ck9sCyqe.mjs → NetWorthStore-btN67ddi.mjs} +2 -2
- package/dist/{NotificationSettings-CdfobwhN.mjs → NotificationSettings-Bp3Zsojv.mjs} +1 -1
- package/dist/{RecurringSettings-CS7FWUf4.mjs → RecurringSettings-B1hgFaEZ.mjs} +2 -2
- package/dist/{SpendingLegend-u3H8xKq0.mjs → SpendingLegend-CJFdclHt.mjs} +1 -1
- package/dist/{TransactionDetails-C9i9wuQA.mjs → TransactionDetails-vXstDuDk.mjs} +3 -3
- package/dist/{WidgetContainer-DyotIGdv.mjs → WidgetContainer-8RexRzms.mjs} +2 -2
- package/dist/accounts/index.es.js +13 -13
- package/dist/budgets/index.es.js +6 -6
- package/dist/cashflow/index.es.js +6 -6
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +11 -11
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/dashboard/index.es.js +1 -1
- package/dist/debts/index.es.js +6 -6
- package/dist/finstrong/index.es.js +498 -491
- package/dist/goals/index.es.js +8 -8
- package/dist/help/index.es.js +2 -2
- package/dist/investments/index.es.js +3 -3
- package/dist/networth/index.es.js +5 -5
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +6 -6
- package/dist/settings/index.es.js +6 -6
- package/dist/spending/index.es.js +4 -4
- package/dist/transactions/index.es.js +6 -6
- package/dist/trends/index.es.js +200 -185
- package/dist/{useAccountDisplayName-DSUFGGaF.mjs → useAccountDisplayName-DcNHwMST.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsxs as a, Fragment as E, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import k from "@mui/material/Box";
|
|
3
3
|
import p from "@mui/material/Stack";
|
|
4
|
-
import { useTheme as G, alpha as
|
|
4
|
+
import { useTheme as G, alpha as se } from "@mui/material/styles";
|
|
5
5
|
import { PieChart as nn } from "@mui/x-charts/PieChart";
|
|
6
6
|
import { P as M, H3 as K, Text as I, InstitutionLogo as ct, H2 as Le, MerchantLogo as on, Icon as rn } from "@mxenabled/mxui";
|
|
7
7
|
import { TrendingUp as lt, ArrowRightAlt as an, TrendingDown as sn, AccountBalance as dt, ChevronRight as J, MultilineChart as pt, CreditCard as Ge, CheckCircle as cn, Cancel as ln, Savings as dn, ContentCopy as pn, Add as _t, Cardiology as _n, Payments as hn, CalendarMonth as un, ExpandMore as mn } from "@mxenabled/mx-icons";
|
|
8
|
-
import { g as gn, a as yn, r as Je, b as bn, c as He, d as ht, C as we, e as ke, f as fn, h as xn, i as Sn, j as ut, k as et, l as Cn, m as tt, n as vn, o as mt, p as wn, q as gt, s as Oe, t as yt, u as kn, v as bt, w as Mn, A as ne, x as Dn, P as In } from "../FinstrongStore-
|
|
9
|
-
import { y as bi, F as fi } from "../FinstrongStore-
|
|
8
|
+
import { g as gn, a as yn, r as Je, b as bn, c as He, d as ht, C as we, e as ke, f as fn, h as xn, i as Sn, j as ut, k as et, l as Cn, m as tt, n as vn, o as mt, p as wn, q as gt, s as Oe, t as yt, u as kn, v as bt, w as Mn, A as ne, x as Dn, P as In } from "../FinstrongStore-DA67hQcM.mjs";
|
|
9
|
+
import { y as bi, F as fi } from "../FinstrongStore-DA67hQcM.mjs";
|
|
10
10
|
import * as nt from "d3";
|
|
11
|
-
import { observer as
|
|
12
|
-
import { u as
|
|
11
|
+
import { observer as w } from "mobx-react-lite";
|
|
12
|
+
import { u as x, b as U, a as Ne, o as ee, z as L, p as An, d as Se, m as je, f as Tn, j as Ke, h as On, i as Rn } from "../hooks-ZMp65DFz.mjs";
|
|
13
13
|
import { L as te } from "../Loader-DUaFpDGv.mjs";
|
|
14
14
|
import m from "react";
|
|
15
15
|
import P from "@mui/material/Button";
|
|
16
16
|
import V from "@mui/material/Card";
|
|
17
17
|
import { L as Ve } from "../LineChart-BF4QA-Lx.mjs";
|
|
18
|
-
import { C as ft } from "../ConnectionsDrawer-
|
|
19
|
-
import { l as re, g as xt, A as ze } from "../ConnectDrawer-
|
|
20
|
-
import
|
|
18
|
+
import { C as ft } from "../ConnectionsDrawer-BFC4fpyR.mjs";
|
|
19
|
+
import { l as re, g as xt, A as ze } from "../ConnectDrawer-DJV-yWGN.mjs";
|
|
20
|
+
import ce from "@mui/material/Tab";
|
|
21
21
|
import Xe from "@mui/material/Tabs";
|
|
22
22
|
import Re from "@mui/material/TextField";
|
|
23
23
|
import { u as Ye } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
24
24
|
import { D as Fn, f as Ln, a as Bn } from "../Dialog-BlnUNqVo.mjs";
|
|
25
25
|
import { u as St } from "../useDimensions-27p2evRx.mjs";
|
|
26
26
|
import Pn from "@mui/material/Chip";
|
|
27
|
-
import { D as oe } from "../Drawer-
|
|
28
|
-
import
|
|
29
|
-
import
|
|
27
|
+
import { D as oe } from "../Drawer-DV4NTsFg.mjs";
|
|
28
|
+
import de from "@mui/material/Divider";
|
|
29
|
+
import be from "@mui/material/ListItem";
|
|
30
30
|
import Ct from "@mui/material/ListItemAvatar";
|
|
31
|
-
import
|
|
32
|
-
import { g as vt } from "../AccountFields-
|
|
31
|
+
import fe from "@mui/material/ListItemText";
|
|
32
|
+
import { g as vt } from "../AccountFields-C1HYZrHp.mjs";
|
|
33
33
|
import Ee from "@mui/material/List";
|
|
34
34
|
import Wn from "@mui/material/ListItemButton";
|
|
35
35
|
import $n from "@mui/material/ListSubheader";
|
|
@@ -38,8 +38,8 @@ import { b as j } from "../Localization-2MODESHW.mjs";
|
|
|
38
38
|
import { S as ot, F as wt, e as zn, R as kt } from "../RecurringTransactions-BQ383pPY.mjs";
|
|
39
39
|
import { S as En } from "../StatusBar-BK_uYHAB.mjs";
|
|
40
40
|
import { h as Mt } from "../DateUtil-RJ9d88qV.mjs";
|
|
41
|
-
import { T as Gn, s as Hn, h as Nn, S as jn, b as Kn } from "../TransactionDetails-
|
|
42
|
-
import { T as
|
|
41
|
+
import { T as Gn, s as Hn, h as Nn, S as jn, b as Kn } from "../TransactionDetails-vXstDuDk.mjs";
|
|
42
|
+
import { T as le } from "../TabContentContainer-j01JYR_7.mjs";
|
|
43
43
|
import { E as Fe } from "../EmptyState-DoxNUae-.mjs";
|
|
44
44
|
import Vn from "@mui/material/useMediaQuery";
|
|
45
45
|
import { BarPlot as Xn } from "@mui/x-charts/BarChart";
|
|
@@ -48,15 +48,15 @@ import { ChartsXAxis as qn } from "@mui/x-charts/ChartsXAxis";
|
|
|
48
48
|
import { ChartsYAxis as Un } from "@mui/x-charts/ChartsYAxis";
|
|
49
49
|
import { startOfMonth as Dt } from "date-fns/startOfMonth";
|
|
50
50
|
import { endOfMonth as It } from "date-fns/endOfMonth";
|
|
51
|
-
import { g as Qn, S as Zn, b as Jn } from "../SpendingLegend-
|
|
51
|
+
import { g as Qn, S as Zn, b as Jn } from "../SpendingLegend-CJFdclHt.mjs";
|
|
52
52
|
import { formatISO as eo } from "date-fns/formatISO";
|
|
53
53
|
import { fromUnixTime as to } from "date-fns/fromUnixTime";
|
|
54
54
|
import { startOfToday as rt } from "date-fns/startOfToday";
|
|
55
55
|
import { subDays as no } from "date-fns/subDays";
|
|
56
|
-
import { c as oo, d as at, S as ro, i as ao } from "../ManageIncome-
|
|
56
|
+
import { c as oo, d as at, S as ro, i as ao } from "../ManageIncome-DO3i-WA4.mjs";
|
|
57
57
|
import { LocalizationProvider as io, DatePicker as so, StaticDatePicker as co } from "@mui/x-date-pickers";
|
|
58
58
|
import { AdapterDateFns as At } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
59
|
-
import { R as lo } from "../RecurringSettings-
|
|
59
|
+
import { R as lo } from "../RecurringSettings-B1hgFaEZ.mjs";
|
|
60
60
|
import { LocalizationProvider as po } from "@mui/x-date-pickers/LocalizationProvider";
|
|
61
61
|
import { format as _o } from "date-fns/format";
|
|
62
62
|
import ho from "@mui/lab/Timeline";
|
|
@@ -70,7 +70,7 @@ import So from "@mui/material/AccordionDetails";
|
|
|
70
70
|
import Co from "@mui/material/AccordionSummary";
|
|
71
71
|
import vo from "@mui/material/CardHeader";
|
|
72
72
|
import { u as wo } from "../useWidgetLoadTimer-hIOioiKx.mjs";
|
|
73
|
-
import { W as ko } from "../WidgetContainer-
|
|
73
|
+
import { W as ko } from "../WidgetContainer-8RexRzms.mjs";
|
|
74
74
|
const Mo = ({
|
|
75
75
|
dialScoreData: t,
|
|
76
76
|
dataIndex: o,
|
|
@@ -80,38 +80,38 @@ const Mo = ({
|
|
|
80
80
|
centerX: i,
|
|
81
81
|
centerY: l,
|
|
82
82
|
arcRadius: c,
|
|
83
|
-
innerArcRadius:
|
|
84
|
-
outterArcRadius:
|
|
85
|
-
progressEndAngle:
|
|
86
|
-
unitsPerSegment:
|
|
83
|
+
innerArcRadius: d,
|
|
84
|
+
outterArcRadius: _,
|
|
85
|
+
progressEndAngle: u,
|
|
86
|
+
unitsPerSegment: h,
|
|
87
87
|
isFinacialStrengthGraph: y
|
|
88
88
|
}) => {
|
|
89
|
-
const
|
|
90
|
-
{ offset: "13.62%", color:
|
|
91
|
-
{ offset: "36.67%", color:
|
|
92
|
-
{ offset: "59.72%", color:
|
|
93
|
-
{ offset: "83.46%", color:
|
|
94
|
-
], [
|
|
89
|
+
const S = G(), v = [
|
|
90
|
+
{ offset: "13.62%", color: S.palette.chartMono.chartMono2 },
|
|
91
|
+
{ offset: "36.67%", color: S.palette.chartMono.chartMono3 },
|
|
92
|
+
{ offset: "59.72%", color: S.palette.chartMono.chartMono4 },
|
|
93
|
+
{ offset: "83.46%", color: S.palette.chartMono.chartMono5 }
|
|
94
|
+
], [f, D] = gn(
|
|
95
95
|
t,
|
|
96
96
|
s,
|
|
97
97
|
r,
|
|
98
98
|
o
|
|
99
99
|
), [C, g] = yn(
|
|
100
|
-
|
|
100
|
+
f,
|
|
101
101
|
D,
|
|
102
102
|
o,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
), b = nt.arc().innerRadius(
|
|
103
|
+
h,
|
|
104
|
+
u
|
|
105
|
+
), b = nt.arc().innerRadius(d).outerRadius(_).startAngle(f).endAngle(D).padAngle(0.02).cornerRadius(8), R = nt.arc().innerRadius(d).outerRadius(_).startAngle(C).endAngle(g).padAngle(0.02).cornerRadius(8);
|
|
106
106
|
return /* @__PURE__ */ a(E, { children: [
|
|
107
107
|
/* @__PURE__ */ e(
|
|
108
108
|
"path",
|
|
109
109
|
{
|
|
110
110
|
d: b({}),
|
|
111
|
-
fill: y ?
|
|
111
|
+
fill: y ? S.palette.divider : n
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
|
-
y && /* @__PURE__ */ e("path", { d:
|
|
114
|
+
y && /* @__PURE__ */ e("path", { d: R({}), fill: "url(#arcGradient)" }),
|
|
115
115
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e(
|
|
116
116
|
"linearGradient",
|
|
117
117
|
{
|
|
@@ -122,7 +122,7 @@ const Mo = ({
|
|
|
122
122
|
x2: i - c * 0.8 * Math.cos(Math.PI / 1.35),
|
|
123
123
|
y1: l + c * 0.8 * Math.sin(Math.PI / 1.35),
|
|
124
124
|
y2: l - c * 0.8 * Math.sin(Math.PI / 1.35),
|
|
125
|
-
children:
|
|
125
|
+
children: v.map((B, Y) => /* @__PURE__ */ e("stop", { offset: B.offset, stopColor: B.color }, Y))
|
|
126
126
|
}
|
|
127
127
|
) })
|
|
128
128
|
] });
|
|
@@ -135,23 +135,23 @@ const Mo = ({
|
|
|
135
135
|
maxValue: i = 100,
|
|
136
136
|
margin: l,
|
|
137
137
|
markerColor: c,
|
|
138
|
-
healthScoreStatus:
|
|
139
|
-
footerCenterContent:
|
|
140
|
-
footerLeftContent:
|
|
141
|
-
footerRightContent:
|
|
138
|
+
healthScoreStatus: d,
|
|
139
|
+
footerCenterContent: _,
|
|
140
|
+
footerLeftContent: u,
|
|
141
|
+
footerRightContent: h,
|
|
142
142
|
isFinacialStrengthGraph: y = !1
|
|
143
143
|
}) => {
|
|
144
|
-
const
|
|
144
|
+
const S = G(), v = -Math.PI / 1.35, f = Math.PI / 1.35, D = f - v, C = D / (i - s), g = (o - s) * C, b = v + g + 0.02, R = n !== "SM" ? 0.1 : 0.12, B = t, Y = t * (1 - R), T = B * 2, $ = T / 2, z = T / 2, _e = (Y + B) / 2, ve = o !== 25 && o !== 50 && o !== 75 && o !== 100 ? 0 : 0.12, [Q, X] = bn(_e, b, ve), he = o / 25, H = {
|
|
145
145
|
L: { markerSize: 12, healthScoreFontSize: 64 },
|
|
146
146
|
M: { markerSize: 8, healthScoreFontSize: 48 },
|
|
147
147
|
SM: { markerSize: 3, healthScoreFontSize: 14 }
|
|
148
|
-
},
|
|
148
|
+
}, ue = {
|
|
149
149
|
top: 0,
|
|
150
150
|
right: 0,
|
|
151
151
|
bottom: 0,
|
|
152
152
|
left: 0,
|
|
153
153
|
...l
|
|
154
|
-
}, N =
|
|
154
|
+
}, N = _ === 0 ? an : sn, ae = n !== "SM" ? 3 : 1, De = ae * 4, me = H[n].markerSize * 2 + De;
|
|
155
155
|
return /* @__PURE__ */ a(
|
|
156
156
|
p,
|
|
157
157
|
{
|
|
@@ -168,15 +168,15 @@ const Mo = ({
|
|
|
168
168
|
{
|
|
169
169
|
height: n === "SM" ? T - 7 : T,
|
|
170
170
|
hideLegend: !0,
|
|
171
|
-
margin:
|
|
171
|
+
margin: ue,
|
|
172
172
|
series: [
|
|
173
173
|
{
|
|
174
174
|
data: r,
|
|
175
175
|
innerRadius: Y,
|
|
176
176
|
outerRadius: B,
|
|
177
|
-
startAngle: Math.round(Je(
|
|
177
|
+
startAngle: Math.round(Je(v)),
|
|
178
178
|
// Use Math.degrees to convert
|
|
179
|
-
endAngle: Math.round(Je(
|
|
179
|
+
endAngle: Math.round(Je(f))
|
|
180
180
|
// Use Math.degrees to convert
|
|
181
181
|
}
|
|
182
182
|
],
|
|
@@ -187,7 +187,7 @@ const Mo = ({
|
|
|
187
187
|
{
|
|
188
188
|
arcColor: q.color,
|
|
189
189
|
arcRadius: t,
|
|
190
|
-
arcStartAngle:
|
|
190
|
+
arcStartAngle: v,
|
|
191
191
|
centerX: $,
|
|
192
192
|
centerY: z,
|
|
193
193
|
dataIndex: q.dataIndex,
|
|
@@ -197,7 +197,7 @@ const Mo = ({
|
|
|
197
197
|
outterArcRadius: B,
|
|
198
198
|
progressEndAngle: b,
|
|
199
199
|
totalAngularSpan: D,
|
|
200
|
-
unitsPerSegment:
|
|
200
|
+
unitsPerSegment: he
|
|
201
201
|
}
|
|
202
202
|
)
|
|
203
203
|
},
|
|
@@ -212,21 +212,21 @@ const Mo = ({
|
|
|
212
212
|
o >= s && o <= i && /* @__PURE__ */ e(
|
|
213
213
|
"svg",
|
|
214
214
|
{
|
|
215
|
-
height:
|
|
215
|
+
height: me,
|
|
216
216
|
style: {
|
|
217
217
|
position: "absolute",
|
|
218
218
|
left: $ + Q - H[n].markerSize - 5,
|
|
219
219
|
top: z + X - H[n].markerSize - 5,
|
|
220
220
|
overflow: "visible"
|
|
221
221
|
},
|
|
222
|
-
viewBox: `${$ + Q - H[n].markerSize - 5} ${z + X - H[n].markerSize - 5} ${
|
|
223
|
-
width:
|
|
222
|
+
viewBox: `${$ + Q - H[n].markerSize - 5} ${z + X - H[n].markerSize - 5} ${me} ${me}`,
|
|
223
|
+
width: me,
|
|
224
224
|
children: /* @__PURE__ */ e(
|
|
225
225
|
"circle",
|
|
226
226
|
{
|
|
227
227
|
cx: $ + Q,
|
|
228
228
|
cy: z + X,
|
|
229
|
-
fill:
|
|
229
|
+
fill: S.palette.common.white,
|
|
230
230
|
r: H[n].markerSize,
|
|
231
231
|
stroke: y ? "url(#arcGradient)" : c,
|
|
232
232
|
strokeWidth: ae
|
|
@@ -261,13 +261,13 @@ const Mo = ({
|
|
|
261
261
|
children: o
|
|
262
262
|
}
|
|
263
263
|
),
|
|
264
|
-
n !== "SM" && /* @__PURE__ */ e(M, { sx: { fontWeight: 600 }, variant: n === "L" ? "body1" : "body2", children:
|
|
264
|
+
n !== "SM" && /* @__PURE__ */ e(M, { sx: { fontWeight: 600 }, variant: n === "L" ? "body1" : "body2", children: d })
|
|
265
265
|
]
|
|
266
266
|
}
|
|
267
267
|
)
|
|
268
268
|
}
|
|
269
269
|
),
|
|
270
|
-
|
|
270
|
+
_ !== void 0 && /* @__PURE__ */ e(
|
|
271
271
|
k,
|
|
272
272
|
{
|
|
273
273
|
sx: {
|
|
@@ -277,7 +277,7 @@ const Mo = ({
|
|
|
277
277
|
transform: "translate(-50%, -50%)",
|
|
278
278
|
textAlign: "center"
|
|
279
279
|
},
|
|
280
|
-
children: typeof
|
|
280
|
+
children: typeof _ == "number" ? /* @__PURE__ */ a(
|
|
281
281
|
p,
|
|
282
282
|
{
|
|
283
283
|
sx: {
|
|
@@ -287,24 +287,24 @@ const Mo = ({
|
|
|
287
287
|
mt: 24
|
|
288
288
|
},
|
|
289
289
|
children: [
|
|
290
|
-
|
|
290
|
+
_ > 0 ? /* @__PURE__ */ e(lt, { size: 16, sx: { color: "success.main" } }) : /* @__PURE__ */ e(N, { size: 16, sx: { color: "text.secondary" } }),
|
|
291
291
|
/* @__PURE__ */ e(
|
|
292
292
|
M,
|
|
293
293
|
{
|
|
294
294
|
sx: {
|
|
295
295
|
fontWeight: 600,
|
|
296
|
-
color:
|
|
296
|
+
color: _ > 0 ? "success.main" : "text.secondary"
|
|
297
297
|
},
|
|
298
298
|
variant: "body1",
|
|
299
|
-
children: Math.abs(
|
|
299
|
+
children: Math.abs(_)
|
|
300
300
|
}
|
|
301
301
|
)
|
|
302
302
|
]
|
|
303
303
|
}
|
|
304
|
-
) : /* @__PURE__ */ e(M, { sx: { color: "text.secondary" }, variant: "subtitle2", children:
|
|
304
|
+
) : /* @__PURE__ */ e(M, { sx: { color: "text.secondary" }, variant: "subtitle2", children: _ })
|
|
305
305
|
}
|
|
306
306
|
),
|
|
307
|
-
|
|
307
|
+
u !== void 0 && /* @__PURE__ */ e(
|
|
308
308
|
k,
|
|
309
309
|
{
|
|
310
310
|
sx: {
|
|
@@ -315,10 +315,10 @@ const Mo = ({
|
|
|
315
315
|
transform: "translate(-50%, -50%)",
|
|
316
316
|
textAlign: "left"
|
|
317
317
|
},
|
|
318
|
-
children: /* @__PURE__ */ e(M, { variant: "body1", children:
|
|
318
|
+
children: /* @__PURE__ */ e(M, { variant: "body1", children: u })
|
|
319
319
|
}
|
|
320
320
|
),
|
|
321
|
-
|
|
321
|
+
h !== void 0 && /* @__PURE__ */ e(
|
|
322
322
|
k,
|
|
323
323
|
{
|
|
324
324
|
sx: {
|
|
@@ -328,13 +328,13 @@ const Mo = ({
|
|
|
328
328
|
transform: "translate(-50%, -50%)",
|
|
329
329
|
textAlign: "right"
|
|
330
330
|
},
|
|
331
|
-
children: /* @__PURE__ */ e(M, { variant: "body1", children:
|
|
331
|
+
children: /* @__PURE__ */ e(M, { variant: "body1", children: h })
|
|
332
332
|
}
|
|
333
333
|
)
|
|
334
334
|
]
|
|
335
335
|
}
|
|
336
336
|
);
|
|
337
|
-
}, Ot =
|
|
337
|
+
}, Ot = w(
|
|
338
338
|
({
|
|
339
339
|
arcRadius: t,
|
|
340
340
|
size: o = "L",
|
|
@@ -347,7 +347,7 @@ const Mo = ({
|
|
|
347
347
|
{ id: 2, label: "Group B", value: 25 },
|
|
348
348
|
{ id: 3, label: "Group C", value: 25 },
|
|
349
349
|
{ id: 4, label: "Group D", value: 25 }
|
|
350
|
-
], { finstrong: l } =
|
|
350
|
+
], { finstrong: l } = x(), c = He(n, l);
|
|
351
351
|
return /* @__PURE__ */ e(
|
|
352
352
|
Tt,
|
|
353
353
|
{
|
|
@@ -362,7 +362,7 @@ const Mo = ({
|
|
|
362
362
|
}
|
|
363
363
|
);
|
|
364
364
|
}
|
|
365
|
-
), Do =
|
|
365
|
+
), Do = w(
|
|
366
366
|
({
|
|
367
367
|
arcRadius: t,
|
|
368
368
|
size: o = "L",
|
|
@@ -371,7 +371,7 @@ const Mo = ({
|
|
|
371
371
|
minValue: s = 300,
|
|
372
372
|
footerCenterContent: i
|
|
373
373
|
}) => {
|
|
374
|
-
const c = G().palette.mode === "dark",
|
|
374
|
+
const c = G().palette.mode === "dark", d = [
|
|
375
375
|
{
|
|
376
376
|
id: 1,
|
|
377
377
|
label: "Poor",
|
|
@@ -402,23 +402,23 @@ const Mo = ({
|
|
|
402
402
|
value: 12,
|
|
403
403
|
color: c ? we.EXCEPTIONAL : ke.EXCEPTIONAL
|
|
404
404
|
}
|
|
405
|
-
], { finstrong:
|
|
406
|
-
if (!
|
|
407
|
-
const { status:
|
|
405
|
+
], { finstrong: _ } = x(), { isCopyLoaded: u } = U();
|
|
406
|
+
if (!u) return /* @__PURE__ */ e(te, {});
|
|
407
|
+
const { status: h, color: y = "none" } = ht(
|
|
408
408
|
n,
|
|
409
409
|
c,
|
|
410
|
-
|
|
410
|
+
_.credit_score_status
|
|
411
411
|
);
|
|
412
412
|
return /* @__PURE__ */ e(
|
|
413
413
|
Tt,
|
|
414
414
|
{
|
|
415
415
|
arcRadius: t,
|
|
416
|
-
dialScoreData:
|
|
416
|
+
dialScoreData: d,
|
|
417
417
|
footerCenterContent: i,
|
|
418
418
|
footerLeftContent: s,
|
|
419
419
|
footerRightContent: r,
|
|
420
420
|
healthScore: n,
|
|
421
|
-
healthScoreStatus:
|
|
421
|
+
healthScoreStatus: h,
|
|
422
422
|
markerColor: y,
|
|
423
423
|
maxValue: r,
|
|
424
424
|
minValue: s,
|
|
@@ -436,7 +436,7 @@ const Mo = ({
|
|
|
436
436
|
description: l,
|
|
437
437
|
sx: c
|
|
438
438
|
}) => {
|
|
439
|
-
const [
|
|
439
|
+
const [d, _] = m.useState(!1), { connect: u, finstrong: h } = x(), { config: y } = Ne();
|
|
440
440
|
return t && y.show_connections_widget_in_master ? /* @__PURE__ */ a(
|
|
441
441
|
V,
|
|
442
442
|
{
|
|
@@ -457,7 +457,7 @@ const Mo = ({
|
|
|
457
457
|
},
|
|
458
458
|
children: [
|
|
459
459
|
n && /* @__PURE__ */ e(dt, { sx: { height: 20, width: 20 } }),
|
|
460
|
-
/* @__PURE__ */ e(K, { className: "connect-more-accounts-title", sx: { ...o && { fontSize: 15 } }, children: s ||
|
|
460
|
+
/* @__PURE__ */ e(K, { className: "connect-more-accounts-title", sx: { ...o && { fontSize: 15 } }, children: s || h.connect_more_accounts_title })
|
|
461
461
|
]
|
|
462
462
|
}
|
|
463
463
|
),
|
|
@@ -467,55 +467,55 @@ const Mo = ({
|
|
|
467
467
|
className: "connect-more-accounts-description",
|
|
468
468
|
sx: { color: "text.secondary", mt: 8 },
|
|
469
469
|
variant: "subtitle1",
|
|
470
|
-
children: l ||
|
|
470
|
+
children: l || h.connect_more_accounts_description
|
|
471
471
|
}
|
|
472
472
|
),
|
|
473
473
|
/* @__PURE__ */ e(
|
|
474
474
|
P,
|
|
475
475
|
{
|
|
476
476
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
477
|
-
onClick: () =>
|
|
477
|
+
onClick: () => _(!0),
|
|
478
478
|
size: "small",
|
|
479
479
|
sx: { p: 0, mt: 8, "&:hover": { backgroundColor: "transparent" } },
|
|
480
|
-
children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: r ||
|
|
480
|
+
children: /* @__PURE__ */ e(I, { sx: { fontWeight: 600 }, variant: "body2", children: r || h.connect_more_accounts_button })
|
|
481
481
|
}
|
|
482
482
|
),
|
|
483
483
|
t === "connectDrawer" && /* @__PURE__ */ e(
|
|
484
484
|
re,
|
|
485
485
|
{
|
|
486
|
-
onClose: () =>
|
|
487
|
-
showConnectWidget:
|
|
488
|
-
title: i ||
|
|
486
|
+
onClose: () => _(!1),
|
|
487
|
+
showConnectWidget: d,
|
|
488
|
+
title: i || u.mini_title
|
|
489
489
|
}
|
|
490
490
|
),
|
|
491
491
|
t === "connectionsDrawer" && /* @__PURE__ */ e(
|
|
492
492
|
ft,
|
|
493
493
|
{
|
|
494
|
-
onClose: () =>
|
|
495
|
-
showConnectionsWidget:
|
|
496
|
-
title: i ||
|
|
494
|
+
onClose: () => _(!1),
|
|
495
|
+
showConnectionsWidget: d,
|
|
496
|
+
title: i || u.mini_title
|
|
497
497
|
}
|
|
498
498
|
)
|
|
499
499
|
]
|
|
500
500
|
}
|
|
501
501
|
) : null;
|
|
502
502
|
};
|
|
503
|
-
var
|
|
503
|
+
var pe = /* @__PURE__ */ ((t) => (t.SpendLessThanYouMake = "spendLessThanYouMake", t.PayBillsOnTime = "payBillsOnTime", t.SaveEnoughToLiveOn = "saveEnoughToLiveOn", t.MaintainEmergencySavings = "maintainEmergencySavings", t.HaveManageableDebt = "haveManageableDebt", t.HaveAGoodCreditScore = "haveAGoodCreditScore", t))(pe || {});
|
|
504
504
|
const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_animation_final.gif", Ao = ({ isOpen: t, onClose: o }) => {
|
|
505
|
-
const { common: n, finstrong: r } =
|
|
506
|
-
o(), setTimeout(() =>
|
|
507
|
-
},
|
|
505
|
+
const { common: n, finstrong: r } = x(), { isMobile: s } = Ye(), { updateUser: i, user: l } = ee(), [c, d] = m.useState(l.credit_score || 0), _ = !isNaN(c), u = () => {
|
|
506
|
+
o(), setTimeout(() => d(l.credit_score || 0), 300);
|
|
507
|
+
}, h = () => {
|
|
508
508
|
!c || c === l.credit_score || i({ ...l, credit_score: c });
|
|
509
509
|
};
|
|
510
510
|
return /* @__PURE__ */ e(
|
|
511
511
|
Fn,
|
|
512
512
|
{
|
|
513
513
|
copy: { close_aria: n.close_aria, title: r.edit_credit_score },
|
|
514
|
-
disablePrimaryButton: !c || !
|
|
514
|
+
disablePrimaryButton: !c || !_,
|
|
515
515
|
isOpen: t,
|
|
516
516
|
maxWidth: "xs",
|
|
517
|
-
onClose:
|
|
518
|
-
onPrimaryAction:
|
|
517
|
+
onClose: u,
|
|
518
|
+
onPrimaryAction: h,
|
|
519
519
|
primaryColor: "primary",
|
|
520
520
|
primaryText: n.save_button,
|
|
521
521
|
sx: {
|
|
@@ -527,28 +527,28 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
527
527
|
"form",
|
|
528
528
|
{
|
|
529
529
|
onSubmit: (y) => {
|
|
530
|
-
y.preventDefault(),
|
|
530
|
+
y.preventDefault(), h(), u();
|
|
531
531
|
},
|
|
532
532
|
children: /* @__PURE__ */ e(
|
|
533
533
|
Re,
|
|
534
534
|
{
|
|
535
|
-
error: !
|
|
535
|
+
error: !_,
|
|
536
536
|
fullWidth: !0,
|
|
537
537
|
inputMode: "numeric",
|
|
538
538
|
inputProps: {
|
|
539
539
|
noValidate: !0,
|
|
540
540
|
pattern: "[0-9]*"
|
|
541
541
|
},
|
|
542
|
-
onChange: (y) =>
|
|
543
|
-
value:
|
|
542
|
+
onChange: (y) => d(Number(y.target.value)),
|
|
543
|
+
value: _ ? c : ""
|
|
544
544
|
}
|
|
545
545
|
)
|
|
546
546
|
}
|
|
547
547
|
)
|
|
548
548
|
}
|
|
549
549
|
);
|
|
550
|
-
}, Rt =
|
|
551
|
-
const o = G(), n = o.palette.mode === "dark", { monthlySummaries: r } =
|
|
550
|
+
}, Rt = w(Ao), To = ({ chartFor: t }) => {
|
|
551
|
+
const o = G(), n = o.palette.mode === "dark", { monthlySummaries: r } = L(), { user: s } = ee(), { finstrong: i } = x(), [l, { width: c }] = St(), d = {
|
|
552
552
|
savingsOverTime: {
|
|
553
553
|
icon: /* @__PURE__ */ e(lt, { size: 48, sx: { marginBottom: 8 } }),
|
|
554
554
|
title: i.key_indicators_save.zero_state_title,
|
|
@@ -564,7 +564,7 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
564
564
|
title: i.credit_over_time_title,
|
|
565
565
|
description: i.credit_over_time_zero_state_desc
|
|
566
566
|
}
|
|
567
|
-
}[t],
|
|
567
|
+
}[t], u = {
|
|
568
568
|
savingsOverTime: {
|
|
569
569
|
title: i.key_indicators_save.savings_over_time,
|
|
570
570
|
valueKey: "available_cash"
|
|
@@ -577,28 +577,28 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
577
577
|
title: i.credit_over_time_title,
|
|
578
578
|
valueKey: "credit_score"
|
|
579
579
|
}
|
|
580
|
-
}[t],
|
|
581
|
-
let
|
|
580
|
+
}[t], h = fn(r, u.valueKey), y = r.map((B) => B[u.valueKey]), S = Math.max(...y), v = Math.min(...y), f = () => S >= 1e6 ? { formatter: "0.000a", leftMargin: -7 } : S >= 1e3 ? { formatter: "0a", leftMargin: -27 } : { formatter: "0a", leftMargin: -32 }, { formatter: D, leftMargin: C } = f(), g = u.title, b = t === "creditOverTime";
|
|
581
|
+
let R;
|
|
582
582
|
if (b) {
|
|
583
583
|
const { color: B } = ht(
|
|
584
584
|
s?.credit_score ?? 0,
|
|
585
585
|
n,
|
|
586
586
|
i.credit_score_status
|
|
587
587
|
);
|
|
588
|
-
|
|
588
|
+
R = B;
|
|
589
589
|
}
|
|
590
|
-
return /* @__PURE__ */ e(V, { ref: l, sx: { backgroundColor: "background.paper" }, children:
|
|
590
|
+
return /* @__PURE__ */ e(V, { ref: l, sx: { backgroundColor: "background.paper" }, children: h.length >= 1 ? /* @__PURE__ */ a(p, { gap: 8, sx: { pl: 18 }, children: [
|
|
591
591
|
/* @__PURE__ */ e(M, { sx: { pb: 8, pt: 16 }, variant: "h3", children: g }),
|
|
592
592
|
/* @__PURE__ */ e(
|
|
593
593
|
Ve,
|
|
594
594
|
{
|
|
595
|
-
areaColor:
|
|
595
|
+
areaColor: R,
|
|
596
596
|
axisColor: o.palette.divider,
|
|
597
597
|
baseline: "min",
|
|
598
598
|
chartFor: t,
|
|
599
599
|
colors: [o.palette.primary.main],
|
|
600
600
|
curveType: b ? "linear" : "natural",
|
|
601
|
-
datasets:
|
|
601
|
+
datasets: h ? [h] : [],
|
|
602
602
|
height: 244,
|
|
603
603
|
labelFontColor: b ? "text.primary" : "",
|
|
604
604
|
labelFontSize: b ? 13 : void 0,
|
|
@@ -607,16 +607,16 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
607
607
|
markStyles: (B) => b ? {
|
|
608
608
|
markLabelStyles: {
|
|
609
609
|
marginLeft: 16,
|
|
610
|
-
transform: B ===
|
|
610
|
+
transform: B === h.length - 1 ? "translateX(-16px)" : "translateX(16px)",
|
|
611
611
|
fontWeight: 600,
|
|
612
612
|
fill: o.palette.text.primary
|
|
613
613
|
},
|
|
614
|
-
stroke:
|
|
614
|
+
stroke: R
|
|
615
615
|
} : {},
|
|
616
616
|
maxRange: b ? 850 : void 0,
|
|
617
617
|
minRange: (() => {
|
|
618
618
|
if (b)
|
|
619
|
-
return
|
|
619
|
+
return v < 300 ? 0 : 300;
|
|
620
620
|
})(),
|
|
621
621
|
showArea: !0,
|
|
622
622
|
showAverage: !b,
|
|
@@ -631,12 +631,12 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
631
631
|
}
|
|
632
632
|
)
|
|
633
633
|
] }) : /* @__PURE__ */ a(p, { gap: 8, sx: { alignItems: "center", p: 24, pb: 48 }, children: [
|
|
634
|
-
|
|
635
|
-
/* @__PURE__ */ e(M, { fontWeight: 600, variant: "body1", children:
|
|
636
|
-
/* @__PURE__ */ e(M, { align: "center", variant: "subtitle1", children:
|
|
634
|
+
d.icon,
|
|
635
|
+
/* @__PURE__ */ e(M, { fontWeight: 600, variant: "body1", children: d.title }),
|
|
636
|
+
/* @__PURE__ */ e(M, { align: "center", variant: "subtitle1", children: d.description })
|
|
637
637
|
] }) });
|
|
638
|
-
}, qe =
|
|
639
|
-
const { healthScoreChangeReports: t } =
|
|
638
|
+
}, qe = w(To), Oo = () => {
|
|
639
|
+
const { healthScoreChangeReports: t } = L(), { finstrong: o } = x(), { user: n } = ee(), { availableWidth: r } = An(), { isSmallMobile: s } = Ye(r), [i, l] = m.useState(!1), c = t.at(-1);
|
|
640
640
|
return /* @__PURE__ */ a(k, { children: [
|
|
641
641
|
/* @__PURE__ */ a(p, { sx: { gap: 28 }, children: [
|
|
642
642
|
/* @__PURE__ */ e(
|
|
@@ -653,8 +653,8 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
653
653
|
] }),
|
|
654
654
|
/* @__PURE__ */ e(Rt, { isOpen: i, onClose: () => l(!1) })
|
|
655
655
|
] });
|
|
656
|
-
}, Ro =
|
|
657
|
-
const { finstrong: o } =
|
|
656
|
+
}, Ro = w(Oo), Pe = ({ status: t }) => {
|
|
657
|
+
const { finstrong: o } = x(), n = xn(Sn[t]), r = {
|
|
658
658
|
GOOD: o.key_indicators_good,
|
|
659
659
|
FAIR: o.key_indicators_fair,
|
|
660
660
|
OFF_TRACK: o.key_indicators_off_track,
|
|
@@ -682,12 +682,12 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
682
682
|
}
|
|
683
683
|
);
|
|
684
684
|
}, Fo = () => {
|
|
685
|
-
const { finstrong: t } =
|
|
685
|
+
const { finstrong: t } = x(), { user: o } = ee(), n = ut(o.credit_score ?? null);
|
|
686
686
|
return /* @__PURE__ */ a(p, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
687
687
|
/* @__PURE__ */ e(K, { children: t.credit_score_keep_strong_credit_score }),
|
|
688
688
|
/* @__PURE__ */ e(Pe, { status: n })
|
|
689
689
|
] });
|
|
690
|
-
}, Lo =
|
|
690
|
+
}, Lo = w(Fo), Bo = ({
|
|
691
691
|
additionalContent: t,
|
|
692
692
|
connectTitle: o,
|
|
693
693
|
connectDescription: n,
|
|
@@ -696,28 +696,29 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
696
696
|
drawerTitle: i,
|
|
697
697
|
isOpen: l,
|
|
698
698
|
loadConnectAccountsCard: c = !0,
|
|
699
|
-
onClose:
|
|
700
|
-
stickyComponent:
|
|
701
|
-
title:
|
|
702
|
-
drawerType:
|
|
699
|
+
onClose: d,
|
|
700
|
+
stickyComponent: _,
|
|
701
|
+
title: u,
|
|
702
|
+
drawerType: h
|
|
703
703
|
}) => {
|
|
704
|
-
const { finstrong: y } =
|
|
705
|
-
return
|
|
706
|
-
(
|
|
704
|
+
const { finstrong: y } = x(), { isCopyLoaded: S } = U();
|
|
705
|
+
return S ? /* @__PURE__ */ e(oe, { isOpen: l, onClose: d, title: i || y.key_indicators, children: /* @__PURE__ */ a(p, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
706
|
+
(u || s) && /* @__PURE__ */ a(
|
|
707
707
|
p,
|
|
708
708
|
{
|
|
709
709
|
sx: {
|
|
710
710
|
backgroundColor: "background.paper",
|
|
711
711
|
gap: 8,
|
|
712
|
-
p: 24
|
|
712
|
+
p: 24,
|
|
713
|
+
pb: _ ? 0 : 24
|
|
713
714
|
},
|
|
714
715
|
children: [
|
|
715
|
-
|
|
716
|
+
u && typeof u == "string" ? /* @__PURE__ */ e(K, { children: u }) : u,
|
|
716
717
|
s && /* @__PURE__ */ e(M, { sx: { lineHeight: "24px" }, children: s })
|
|
717
718
|
]
|
|
718
719
|
}
|
|
719
720
|
),
|
|
720
|
-
|
|
721
|
+
_ && /* @__PURE__ */ e(
|
|
721
722
|
k,
|
|
722
723
|
{
|
|
723
724
|
sx: {
|
|
@@ -725,7 +726,7 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
725
726
|
top: 0,
|
|
726
727
|
zIndex: 1
|
|
727
728
|
},
|
|
728
|
-
children:
|
|
729
|
+
children: _
|
|
729
730
|
}
|
|
730
731
|
),
|
|
731
732
|
t && /* @__PURE__ */ e(k, { children: t }),
|
|
@@ -735,7 +736,7 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
735
736
|
Be,
|
|
736
737
|
{
|
|
737
738
|
description: n,
|
|
738
|
-
drawerType:
|
|
739
|
+
drawerType: h,
|
|
739
740
|
isDashboard: !0,
|
|
740
741
|
sx: { backgroundColor: "background.paper" },
|
|
741
742
|
title: o
|
|
@@ -743,95 +744,95 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
743
744
|
)
|
|
744
745
|
] })
|
|
745
746
|
] }) }) : /* @__PURE__ */ e(te, {});
|
|
746
|
-
}, Ft =
|
|
747
|
+
}, Ft = w(Bo), Po = ({
|
|
747
748
|
onClick: t,
|
|
748
749
|
shouldShowBalance: o = !0,
|
|
749
750
|
loadAccounts: n
|
|
750
751
|
}) => {
|
|
751
|
-
const { config: r } = Ne(), { accounts: s } =
|
|
752
|
-
(
|
|
753
|
-
t?.(
|
|
752
|
+
const { config: r } = Ne(), { accounts: s } = x(), { selectedAccounts: i } = U(), l = m.useCallback(
|
|
753
|
+
(d) => {
|
|
754
|
+
t?.(d);
|
|
754
755
|
},
|
|
755
756
|
[t]
|
|
756
757
|
), c = m.useMemo(
|
|
757
|
-
() => Array.from(new Set(i.map((
|
|
758
|
-
(
|
|
758
|
+
() => Array.from(new Set(i.map((d) => d.account_type))).filter(
|
|
759
|
+
(d) => n ? n.includes(d) : !0
|
|
759
760
|
),
|
|
760
761
|
[i, n]
|
|
761
762
|
);
|
|
762
|
-
return i.length ? /* @__PURE__ */ e(m.Fragment, { children: c.map((
|
|
763
|
-
const { accountsForType:
|
|
764
|
-
(
|
|
763
|
+
return i.length ? /* @__PURE__ */ e(m.Fragment, { children: c.map((d) => {
|
|
764
|
+
const { accountsForType: _, totalBalanceForType: u } = i.reduce(
|
|
765
|
+
(h, y) => (y.account_type === d && (h.accountsForType.push(y), h.totalBalanceForType += y.balance || 0), h),
|
|
765
766
|
{ accountsForType: [], totalBalanceForType: 0 }
|
|
766
767
|
);
|
|
767
768
|
return /* @__PURE__ */ a(
|
|
768
769
|
Ee,
|
|
769
770
|
{
|
|
770
771
|
subheader: /* @__PURE__ */ e($n, { sx: { pb: 4, position: "static", pt: 12, px: 24 }, children: /* @__PURE__ */ a(p, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: [
|
|
771
|
-
/* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: s.account_types[
|
|
772
|
-
o && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: W(
|
|
772
|
+
/* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: s.account_types[d] }),
|
|
773
|
+
o && /* @__PURE__ */ e(I, { bold: !0, variant: "caption", children: W(u, "0,0.00") })
|
|
773
774
|
] }) }),
|
|
774
775
|
sx: { bgcolor: "background.paper" },
|
|
775
776
|
children: [
|
|
776
|
-
|
|
777
|
-
const { firstValue:
|
|
777
|
+
_.map((h, y) => {
|
|
778
|
+
const { firstValue: S } = vt(h, s), v = xt(h, {
|
|
778
779
|
allowNickname: r?.show_account_nicknames_in_master
|
|
779
|
-
}),
|
|
780
|
-
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(ct, { alt: "MX", institutionGuid:
|
|
780
|
+
}), f = /* @__PURE__ */ a(E, { children: [
|
|
781
|
+
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(ct, { alt: "MX", institutionGuid: h.institution_guid ?? "" }) }),
|
|
781
782
|
/* @__PURE__ */ e(
|
|
782
|
-
|
|
783
|
+
fe,
|
|
783
784
|
{
|
|
784
|
-
primary: `${
|
|
785
|
+
primary: `${v}${h.account_number ? ` *${h.account_number}` : ""}`,
|
|
785
786
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
786
787
|
}
|
|
787
788
|
),
|
|
788
|
-
o && /* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: W(
|
|
789
|
+
o && /* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: W(S ?? 0, "0,0.00") })
|
|
789
790
|
] });
|
|
790
791
|
return /* @__PURE__ */ a(m.Fragment, { children: [
|
|
791
|
-
/* @__PURE__ */ e(
|
|
792
|
-
y !==
|
|
793
|
-
] },
|
|
792
|
+
/* @__PURE__ */ e(be, { sx: { px: t ? 0 : 24 }, children: t ? /* @__PURE__ */ e(Wn, { onClick: () => l(h), children: f }) : f }),
|
|
793
|
+
y !== _.length - 1 && /* @__PURE__ */ e(de, { variant: "inset" })
|
|
794
|
+
] }, h.guid);
|
|
794
795
|
}),
|
|
795
|
-
/* @__PURE__ */ e(
|
|
796
|
+
/* @__PURE__ */ e(de, {})
|
|
796
797
|
]
|
|
797
798
|
},
|
|
798
|
-
|
|
799
|
+
d
|
|
799
800
|
);
|
|
800
801
|
}) }) : null;
|
|
801
|
-
}, Lt =
|
|
802
|
-
const n = G(), { config: r } = Ne(), { connect: s, finstrong: i } =
|
|
802
|
+
}, Lt = w(Po), Wo = ({ loadAccounts: t, loadMoreLabel: o }) => {
|
|
803
|
+
const n = G(), { config: r } = Ne(), { connect: s, finstrong: i } = x(), { accounts: l } = x(), { selectedAccounts: c } = U(), [d, _] = m.useState(!1), [u, h] = m.useState(!1), y = m.useMemo(
|
|
803
804
|
() => c.filter(
|
|
804
|
-
(
|
|
805
|
+
(f) => t ? t.includes(f.account_type) : !0
|
|
805
806
|
),
|
|
806
807
|
[c, t]
|
|
807
|
-
),
|
|
808
|
-
const { firstValue: D } = vt(
|
|
808
|
+
), S = m.useMemo(() => y.slice(0, 3), [y]), v = (f) => {
|
|
809
|
+
const { firstValue: D } = vt(f, l);
|
|
809
810
|
return D;
|
|
810
811
|
};
|
|
811
812
|
return y.length >= 1 ? /* @__PURE__ */ a(E, { children: [
|
|
812
|
-
/* @__PURE__ */ e(k, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children:
|
|
813
|
-
/* @__PURE__ */ a(
|
|
814
|
-
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(ct, { alt: "MX", institutionGuid:
|
|
813
|
+
/* @__PURE__ */ e(k, { sx: { border: `1px solid ${n.palette.divider}`, borderRadius: 2 }, children: S.map((f, D) => /* @__PURE__ */ a(m.Fragment, { children: [
|
|
814
|
+
/* @__PURE__ */ a(be, { sx: { px: 24 }, children: [
|
|
815
|
+
/* @__PURE__ */ e(Ct, { children: /* @__PURE__ */ e(ct, { alt: "MX", institutionGuid: f.institution_guid ?? "" }) }),
|
|
815
816
|
/* @__PURE__ */ e(
|
|
816
|
-
|
|
817
|
+
fe,
|
|
817
818
|
{
|
|
818
|
-
primary: `${xt(
|
|
819
|
+
primary: `${xt(f, {
|
|
819
820
|
allowNickname: r?.show_account_nicknames_in_master
|
|
820
821
|
})}
|
|
821
|
-
${
|
|
822
|
+
${f.account_number ? ` *${f.account_number}` : ""}`,
|
|
822
823
|
primaryTypographyProps: { noWrap: !0, pr: 4, variant: "body1" }
|
|
823
824
|
}
|
|
824
825
|
),
|
|
825
|
-
/* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: W(
|
|
826
|
+
/* @__PURE__ */ e(M, { bold: !0, variant: "body2", children: W(v(f), "0,0.00") })
|
|
826
827
|
] }),
|
|
827
|
-
D <
|
|
828
|
-
] },
|
|
828
|
+
D < S.length - 1 && /* @__PURE__ */ e(de, { variant: "inset" })
|
|
829
|
+
] }, f.guid)) }),
|
|
829
830
|
y.length > 3 && /* @__PURE__ */ a(E, { children: [
|
|
830
831
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
831
832
|
P,
|
|
832
833
|
{
|
|
833
834
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
834
|
-
onClick: () =>
|
|
835
|
+
onClick: () => _(!0),
|
|
835
836
|
size: "small",
|
|
836
837
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
837
838
|
children: /* @__PURE__ */ a(I, { bold: !0, variant: "body1", children: [
|
|
@@ -841,13 +842,13 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
841
842
|
] })
|
|
842
843
|
}
|
|
843
844
|
) }),
|
|
844
|
-
/* @__PURE__ */ e(oe, { isOpen:
|
|
845
|
+
/* @__PURE__ */ e(oe, { isOpen: d, onClose: () => _(!1), title: i.accounts, children: /* @__PURE__ */ e(Lt, { loadAccounts: t }) })
|
|
845
846
|
] })
|
|
846
847
|
] }) : /* @__PURE__ */ a(E, { children: [
|
|
847
848
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
848
849
|
P,
|
|
849
850
|
{
|
|
850
|
-
onClick: () =>
|
|
851
|
+
onClick: () => h(!0),
|
|
851
852
|
size: "small",
|
|
852
853
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
853
854
|
variant: "contained",
|
|
@@ -857,13 +858,13 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
857
858
|
/* @__PURE__ */ e(
|
|
858
859
|
re,
|
|
859
860
|
{
|
|
860
|
-
onClose: () =>
|
|
861
|
-
showConnectWidget:
|
|
861
|
+
onClose: () => h(!1),
|
|
862
|
+
showConnectWidget: u,
|
|
862
863
|
title: s.mini_title
|
|
863
864
|
}
|
|
864
865
|
)
|
|
865
866
|
] });
|
|
866
|
-
}, Bt =
|
|
867
|
+
}, Bt = w(Wo), Ce = ({ balance: t, title: o, sx: n }) => /* @__PURE__ */ a(
|
|
867
868
|
p,
|
|
868
869
|
{
|
|
869
870
|
sx: {
|
|
@@ -883,7 +884,7 @@ const Io = "https://content.moneydesktop.com/storage/MD_Assets/serenity/loading_
|
|
|
883
884
|
);
|
|
884
885
|
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 || {}), Me = /* @__PURE__ */ ((t) => (t[t.Months = 1] = "Months", t[t.Years = 2] = "Years", t[t.Days = 3] = "Days", t))(Me || {}), Z = /* @__PURE__ */ ((t) => (t[t.Monthly = 1] = "Monthly", t[t.BiWeekly = 2] = "BiWeekly", t[t.Weekly = 3] = "Weekly", t[t.Daily = 4] = "Daily", t))(Z || {});
|
|
885
886
|
const $o = ({ total: t }) => {
|
|
886
|
-
const { finstrong: o } =
|
|
887
|
+
const { finstrong: o } = x(), n = [
|
|
887
888
|
{ id: Z.Monthly, label: o.maintain_emergency_savings_monthly },
|
|
888
889
|
{ id: Z.BiWeekly, label: o.maintain_emergency_savings_bi_weekly },
|
|
889
890
|
{ id: Z.Weekly, label: o.maintain_emergency_savings_weekly },
|
|
@@ -897,30 +898,30 @@ const $o = ({ total: t }) => {
|
|
|
897
898
|
{ id: Me.Months, label: o.maintain_emergency_savings_months },
|
|
898
899
|
{ id: Me.Years, label: o.maintain_emergency_savings_years },
|
|
899
900
|
{ id: Me.Days, label: o.maintain_emergency_savings_days }
|
|
900
|
-
], i = Math.ceil((t + 1) / 1e3) * 1e3, [l, c] = m.useState(0), [
|
|
901
|
+
], i = Math.ceil((t + 1) / 1e3) * 1e3, [l, c] = m.useState(0), [d, _] = m.useState(et(t)), [u, h] = m.useState(
|
|
901
902
|
et(t)
|
|
902
|
-
), [y,
|
|
903
|
+
), [y, S] = m.useState(i), [v, f] = m.useState(Cn(t)), [D, C] = m.useState(Me.Months);
|
|
903
904
|
m.useEffect(() => {
|
|
904
905
|
c(
|
|
905
906
|
tt({
|
|
906
|
-
contribution:
|
|
907
|
+
contribution: u,
|
|
907
908
|
goalAmount: y,
|
|
908
|
-
goalPeriod:
|
|
909
|
+
goalPeriod: v,
|
|
909
910
|
targetPeriod: D,
|
|
910
911
|
totalSaved: t
|
|
911
912
|
})
|
|
912
|
-
),
|
|
913
|
+
), _(u);
|
|
913
914
|
}, []);
|
|
914
915
|
const g = (b) => {
|
|
915
916
|
b.preventDefault(), c(
|
|
916
917
|
tt({
|
|
917
|
-
contribution:
|
|
918
|
+
contribution: u,
|
|
918
919
|
goalAmount: y,
|
|
919
|
-
goalPeriod:
|
|
920
|
+
goalPeriod: v,
|
|
920
921
|
targetPeriod: D,
|
|
921
922
|
totalSaved: t
|
|
922
923
|
})
|
|
923
|
-
),
|
|
924
|
+
), _(u);
|
|
924
925
|
};
|
|
925
926
|
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e("form", { onSubmit: g, children: /* @__PURE__ */ a(p, { sx: { gap: 24, pb: 24, pt: 16, px: 16 }, children: [
|
|
926
927
|
/* @__PURE__ */ e(
|
|
@@ -930,7 +931,7 @@ const $o = ({ total: t }) => {
|
|
|
930
931
|
/* @__PURE__ */ e(I, { variant: "h2", children: W(l, "0,0") }),
|
|
931
932
|
/* @__PURE__ */ a(I, { sx: { alignSelf: "end", height: 24 }, variant: "subtitle2", children: [
|
|
932
933
|
"/",
|
|
933
|
-
r[
|
|
934
|
+
r[d]
|
|
934
935
|
] })
|
|
935
936
|
] }),
|
|
936
937
|
title: o.maintain_emergency_savings_estimated_contribution
|
|
@@ -950,7 +951,7 @@ const $o = ({ total: t }) => {
|
|
|
950
951
|
},
|
|
951
952
|
label: o.maintain_emergency_savings_savings_goal,
|
|
952
953
|
onChange: (b) => {
|
|
953
|
-
b.target.value &&
|
|
954
|
+
b.target.value && S(Number(b.target.value.replace(/[^0-9]/g, "")));
|
|
954
955
|
},
|
|
955
956
|
value: y ? W(y, "0,0") : ""
|
|
956
957
|
}
|
|
@@ -959,10 +960,10 @@ const $o = ({ total: t }) => {
|
|
|
959
960
|
ot,
|
|
960
961
|
{
|
|
961
962
|
label: o.maintain_emergency_savings_how_often_contribute,
|
|
962
|
-
onChange:
|
|
963
|
+
onChange: h,
|
|
963
964
|
options: n,
|
|
964
965
|
required: !0,
|
|
965
|
-
value:
|
|
966
|
+
value: u
|
|
966
967
|
}
|
|
967
968
|
),
|
|
968
969
|
/* @__PURE__ */ a(p, { sx: { flexDirection: "row" }, children: [
|
|
@@ -977,7 +978,7 @@ const $o = ({ total: t }) => {
|
|
|
977
978
|
},
|
|
978
979
|
label: o.maintain_emergency_savings_meet_your_goal_within,
|
|
979
980
|
onChange: (b) => {
|
|
980
|
-
isNaN(Number(b.target.value)) ||
|
|
981
|
+
isNaN(Number(b.target.value)) || f(Number(b.target.value));
|
|
981
982
|
},
|
|
982
983
|
sx: {
|
|
983
984
|
"& .MuiInputBase-root": {
|
|
@@ -988,7 +989,7 @@ const $o = ({ total: t }) => {
|
|
|
988
989
|
}
|
|
989
990
|
}
|
|
990
991
|
},
|
|
991
|
-
value:
|
|
992
|
+
value: v
|
|
992
993
|
}
|
|
993
994
|
),
|
|
994
995
|
/* @__PURE__ */ e(
|
|
@@ -1009,8 +1010,8 @@ const $o = ({ total: t }) => {
|
|
|
1009
1010
|
] }),
|
|
1010
1011
|
/* @__PURE__ */ e(P, { fullWidth: !0, onClick: g, type: "submit", variant: "contained", children: o.maintain_emergency_savings_calculate })
|
|
1011
1012
|
] }) }) });
|
|
1012
|
-
}, zo =
|
|
1013
|
-
const { savingsAccounts: t } = Se(), { finstrong: o } =
|
|
1013
|
+
}, zo = w($o), Eo = () => {
|
|
1014
|
+
const { savingsAccounts: t } = Se(), { finstrong: o } = x(), [n, r] = m.useState(!1), s = m.useMemo(
|
|
1014
1015
|
() => t.reduce((i, l) => i + (l.balance ?? 0), 0),
|
|
1015
1016
|
[t]
|
|
1016
1017
|
);
|
|
@@ -1035,7 +1036,7 @@ const $o = ({ total: t }) => {
|
|
|
1035
1036
|
}
|
|
1036
1037
|
)
|
|
1037
1038
|
] });
|
|
1038
|
-
}, Go =
|
|
1039
|
+
}, Go = w(Eo), We = w(
|
|
1039
1040
|
({ label: t, value: o, status: n, bottomComponent: r, statusBarData: s = [] }) => {
|
|
1040
1041
|
const i = {
|
|
1041
1042
|
GOOD: {
|
|
@@ -1050,8 +1051,8 @@ const $o = ({ total: t }) => {
|
|
|
1050
1051
|
MISSING: {
|
|
1051
1052
|
progressBarColor: "text.secondary"
|
|
1052
1053
|
}
|
|
1053
|
-
}[n], l = s.map((c,
|
|
1054
|
-
color:
|
|
1054
|
+
}[n], l = s.map((c, d) => s.length === 2 ? {
|
|
1055
|
+
color: d === 0 ? "primary.main" : c.color || i?.progressBarColor,
|
|
1055
1056
|
percentage: c.percentage
|
|
1056
1057
|
} : {
|
|
1057
1058
|
color: c.color || i?.progressBarColor,
|
|
@@ -1064,7 +1065,6 @@ const $o = ({ total: t }) => {
|
|
|
1064
1065
|
backgroundColor: "background.paper",
|
|
1065
1066
|
gap: 8,
|
|
1066
1067
|
p: 24,
|
|
1067
|
-
pt: 0,
|
|
1068
1068
|
borderBottom: "1px solid",
|
|
1069
1069
|
borderColor: "divider"
|
|
1070
1070
|
},
|
|
@@ -1098,13 +1098,13 @@ const $o = ({ total: t }) => {
|
|
|
1098
1098
|
), Ho = {
|
|
1099
1099
|
sticky_label: "You have saved"
|
|
1100
1100
|
}, No = ["$0", "$250", "$500", "$750", "$1k"], jo = () => {
|
|
1101
|
-
const { healthScore: t } =
|
|
1101
|
+
const { healthScore: t } = L(), o = Math.round(t.emergency_savings_on_hand ?? NaN) || null, n = vn(o), r = mt(o);
|
|
1102
1102
|
return /* @__PURE__ */ e(
|
|
1103
1103
|
We,
|
|
1104
1104
|
{
|
|
1105
1105
|
bottomComponent: /* @__PURE__ */ e(p, { sx: { flexDirection: "row", justifyContent: "space-between" }, children: No.map((s) => /* @__PURE__ */ a(p, { sx: { alignItems: "center", height: 24, width: 30 }, children: [
|
|
1106
1106
|
/* @__PURE__ */ e(
|
|
1107
|
-
|
|
1107
|
+
de,
|
|
1108
1108
|
{
|
|
1109
1109
|
orientation: "vertical",
|
|
1110
1110
|
sx: {
|
|
@@ -1126,21 +1126,21 @@ const $o = ({ total: t }) => {
|
|
|
1126
1126
|
value: W(o ?? 0, "0,0.00")
|
|
1127
1127
|
}
|
|
1128
1128
|
);
|
|
1129
|
-
}, Ko =
|
|
1129
|
+
}, Ko = w(jo), $e = ({
|
|
1130
1130
|
transactions: t = [],
|
|
1131
1131
|
amountColor: o = "success.main",
|
|
1132
1132
|
amountPosition: n = "center",
|
|
1133
1133
|
formatDate: r = Mt,
|
|
1134
1134
|
secondaryIcon: s
|
|
1135
1135
|
}) => {
|
|
1136
|
-
const i = G(), { connect: l, finstrong: c, categories:
|
|
1136
|
+
const i = G(), { connect: l, finstrong: c, categories: d } = x(), [_, u] = m.useState(!1), [h, y] = m.useState(!1), { getCategoryName: S } = je(), v = 3, f = t.length > v, D = t.length - v;
|
|
1137
1137
|
let C = t;
|
|
1138
|
-
return
|
|
1138
|
+
return f && (C = t.map((g) => ({
|
|
1139
1139
|
...g,
|
|
1140
|
-
category:
|
|
1140
|
+
category: d.default_categories[g.top_level_category_guid]?.replace(
|
|
1141
1141
|
/&/g,
|
|
1142
1142
|
"&"
|
|
1143
|
-
) ??
|
|
1143
|
+
) ?? S(g.top_level_category_guid)
|
|
1144
1144
|
})).sort((g, b) => b.date - g.date)), !t || t.length === 0 ? /* @__PURE__ */ a(E, { children: [
|
|
1145
1145
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
1146
1146
|
P,
|
|
@@ -1156,12 +1156,12 @@ const $o = ({ total: t }) => {
|
|
|
1156
1156
|
re,
|
|
1157
1157
|
{
|
|
1158
1158
|
onClose: () => y(!1),
|
|
1159
|
-
showConnectWidget:
|
|
1159
|
+
showConnectWidget: h,
|
|
1160
1160
|
title: l.mini_title
|
|
1161
1161
|
}
|
|
1162
1162
|
)
|
|
1163
1163
|
] }) : /* @__PURE__ */ a(p, { sx: { gap: 16 }, children: [
|
|
1164
|
-
/* @__PURE__ */ e(k, { sx: { border: `1px solid ${i.palette.divider}`, borderRadius: 2 }, children: t.slice(0,
|
|
1164
|
+
/* @__PURE__ */ e(k, { sx: { border: `1px solid ${i.palette.divider}`, borderRadius: 2 }, children: t.slice(0, v).sort((g, b) => b.date - g.date).map((g, b) => /* @__PURE__ */ a(
|
|
1165
1165
|
p,
|
|
1166
1166
|
{
|
|
1167
1167
|
sx: {
|
|
@@ -1188,7 +1188,7 @@ const $o = ({ total: t }) => {
|
|
|
1188
1188
|
flexDirection: "row",
|
|
1189
1189
|
gap: 12,
|
|
1190
1190
|
justifyContent: "space-between",
|
|
1191
|
-
...b < Math.min(t.length,
|
|
1191
|
+
...b < Math.min(t.length, v) - 1 && {
|
|
1192
1192
|
borderBottom: `1px solid ${i.palette.divider}`
|
|
1193
1193
|
},
|
|
1194
1194
|
pb: 13,
|
|
@@ -1212,12 +1212,12 @@ const $o = ({ total: t }) => {
|
|
|
1212
1212
|
},
|
|
1213
1213
|
b
|
|
1214
1214
|
)) }),
|
|
1215
|
-
|
|
1215
|
+
f && /* @__PURE__ */ a(E, { children: [
|
|
1216
1216
|
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
1217
1217
|
P,
|
|
1218
1218
|
{
|
|
1219
1219
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
1220
|
-
onClick: () =>
|
|
1220
|
+
onClick: () => u(!0),
|
|
1221
1221
|
size: "small",
|
|
1222
1222
|
sx: { my: 0, px: 16, py: 12, width: "100%" },
|
|
1223
1223
|
children: /* @__PURE__ */ a(I, { bold: !0, variant: "body1", children: [
|
|
@@ -1230,8 +1230,8 @@ const $o = ({ total: t }) => {
|
|
|
1230
1230
|
/* @__PURE__ */ e(
|
|
1231
1231
|
oe,
|
|
1232
1232
|
{
|
|
1233
|
-
isOpen:
|
|
1234
|
-
onClose: () =>
|
|
1233
|
+
isOpen: _,
|
|
1234
|
+
onClose: () => u(!1),
|
|
1235
1235
|
title: c.key_indicators_borrow.have_manageable_debt_drawer.have_manageable_debt_transactions,
|
|
1236
1236
|
children: /* @__PURE__ */ e(Gn, { transaction: C })
|
|
1237
1237
|
}
|
|
@@ -1243,7 +1243,7 @@ const $o = ({ total: t }) => {
|
|
|
1243
1243
|
finstrong: {
|
|
1244
1244
|
key_indicators_spend: { pay_bills_on_time_drawer: t }
|
|
1245
1245
|
}
|
|
1246
|
-
} =
|
|
1246
|
+
} = x(), { getSpendingFeeTransactions: o, allTransactions: n } = L();
|
|
1247
1247
|
return m.useEffect(() => {
|
|
1248
1248
|
o().finally();
|
|
1249
1249
|
}, []), /* @__PURE__ */ e(E, { children: n.spendingFee.length === 0 ? /* @__PURE__ */ a(
|
|
@@ -1288,14 +1288,13 @@ const $o = ({ total: t }) => {
|
|
|
1288
1288
|
]
|
|
1289
1289
|
}
|
|
1290
1290
|
) });
|
|
1291
|
-
}, Xo =
|
|
1292
|
-
const { healthScore: t } =
|
|
1291
|
+
}, Xo = w(Vo), Yo = () => {
|
|
1292
|
+
const { healthScore: t } = L(), { finstrong: o } = x(), { key_indicators_spend: n } = o, { pay_bills_on_time_drawer: r } = n, s = wn(t.spending_fee_transaction_count);
|
|
1293
1293
|
return /* @__PURE__ */ a(
|
|
1294
1294
|
p,
|
|
1295
1295
|
{
|
|
1296
1296
|
sx: {
|
|
1297
|
-
|
|
1298
|
-
pb: 24,
|
|
1297
|
+
p: 24,
|
|
1299
1298
|
backgroundColor: "background.paper",
|
|
1300
1299
|
borderBottom: "1px solid",
|
|
1301
1300
|
borderColor: "divider"
|
|
@@ -1313,8 +1312,8 @@ const $o = ({ total: t }) => {
|
|
|
1313
1312
|
]
|
|
1314
1313
|
}
|
|
1315
1314
|
);
|
|
1316
|
-
}, qo =
|
|
1317
|
-
const { savingsAndCheckingAccountsBalance: t } = Se(), { finstrong: o } =
|
|
1315
|
+
}, qo = w(Yo), Uo = () => {
|
|
1316
|
+
const { savingsAndCheckingAccountsBalance: t } = Se(), { finstrong: o } = x();
|
|
1318
1317
|
return /* @__PURE__ */ a(p, { gap: 16, sx: { p: 16 }, children: [
|
|
1319
1318
|
/* @__PURE__ */ e(
|
|
1320
1319
|
Ce,
|
|
@@ -1331,20 +1330,20 @@ const $o = ({ total: t }) => {
|
|
|
1331
1330
|
}
|
|
1332
1331
|
)
|
|
1333
1332
|
] });
|
|
1334
|
-
}, Qo =
|
|
1335
|
-
const { finstrong: t } =
|
|
1333
|
+
}, Qo = w(Uo), Zo = () => {
|
|
1334
|
+
const { finstrong: t } = x(), {
|
|
1336
1335
|
isSpendingInitialized: o,
|
|
1337
1336
|
healthScore: n,
|
|
1338
1337
|
allTransactions: r,
|
|
1339
1338
|
loadSpendTransactions: s,
|
|
1340
1339
|
loadDebtSpend: i
|
|
1341
|
-
} =
|
|
1340
|
+
} = L();
|
|
1342
1341
|
m.useEffect(() => {
|
|
1343
1342
|
o || (s().finally(), i().finally());
|
|
1344
1343
|
}, [o]);
|
|
1345
1344
|
const l = m.useMemo(() => {
|
|
1346
|
-
const c = r.spend.map((
|
|
1347
|
-
return [...c, ...
|
|
1345
|
+
const c = r.spend.map((_) => _.transaction), d = r.debtSpend.map((_) => _.transaction);
|
|
1346
|
+
return [...c, ...d];
|
|
1348
1347
|
}, [r.spend, r.debtSpend]);
|
|
1349
1348
|
return o ? /* @__PURE__ */ a(p, { gap: 16, sx: { p: 16 }, children: [
|
|
1350
1349
|
/* @__PURE__ */ e(
|
|
@@ -1356,8 +1355,8 @@ const $o = ({ total: t }) => {
|
|
|
1356
1355
|
),
|
|
1357
1356
|
/* @__PURE__ */ e($e, { amountColor: "text.primary", transactions: l })
|
|
1358
1357
|
] }) : /* @__PURE__ */ e(te, {});
|
|
1359
|
-
}, Jo =
|
|
1360
|
-
const [t, o] = m.useState(0), { finstrong: n } =
|
|
1358
|
+
}, Jo = w(Zo), er = () => {
|
|
1359
|
+
const [t, o] = m.useState(0), { finstrong: n } = x();
|
|
1361
1360
|
return /* @__PURE__ */ a(E, { children: [
|
|
1362
1361
|
/* @__PURE__ */ a(V, { children: [
|
|
1363
1362
|
/* @__PURE__ */ a(
|
|
@@ -1372,7 +1371,7 @@ const $o = ({ total: t }) => {
|
|
|
1372
1371
|
variant: "fullWidth",
|
|
1373
1372
|
children: [
|
|
1374
1373
|
/* @__PURE__ */ e(
|
|
1375
|
-
|
|
1374
|
+
ce,
|
|
1376
1375
|
{
|
|
1377
1376
|
"aria-controls": "available-details-tabpanel-0",
|
|
1378
1377
|
label: n.key_indicators_save.drawer_available,
|
|
@@ -1380,7 +1379,7 @@ const $o = ({ total: t }) => {
|
|
|
1380
1379
|
}
|
|
1381
1380
|
),
|
|
1382
1381
|
/* @__PURE__ */ e(
|
|
1383
|
-
|
|
1382
|
+
ce,
|
|
1384
1383
|
{
|
|
1385
1384
|
"aria-controls": "spending-details-tabpanel-1",
|
|
1386
1385
|
label: n.key_indicators_save.drawer_spending,
|
|
@@ -1390,13 +1389,13 @@ const $o = ({ total: t }) => {
|
|
|
1390
1389
|
]
|
|
1391
1390
|
}
|
|
1392
1391
|
),
|
|
1393
|
-
/* @__PURE__ */ e(
|
|
1394
|
-
/* @__PURE__ */ e(
|
|
1392
|
+
/* @__PURE__ */ e(le, { index: 0, name: "available-details", value: t, children: /* @__PURE__ */ e(Qo, {}) }),
|
|
1393
|
+
/* @__PURE__ */ e(le, { index: 1, name: "spending-details", value: t, children: /* @__PURE__ */ e(Jo, {}) })
|
|
1395
1394
|
] }),
|
|
1396
1395
|
/* @__PURE__ */ e(qe, { chartFor: "savingsOverTime" })
|
|
1397
1396
|
] });
|
|
1398
|
-
}, tr =
|
|
1399
|
-
const { finstrong: t } =
|
|
1397
|
+
}, tr = w(er), nr = () => {
|
|
1398
|
+
const { finstrong: t } = x(), { healthScore: o } = L(), n = o.months_of_cash_on_hand, r = gt(n ? n * 30 : null), s = 183 / 6, i = Math.floor(n), l = Math.round((n - i) * s), c = n / 6 * 100;
|
|
1400
1399
|
return /* @__PURE__ */ e(
|
|
1401
1400
|
We,
|
|
1402
1401
|
{
|
|
@@ -1410,7 +1409,7 @@ const $o = ({ total: t }) => {
|
|
|
1410
1409
|
mt: 2,
|
|
1411
1410
|
px: 1
|
|
1412
1411
|
},
|
|
1413
|
-
children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((
|
|
1412
|
+
children: ["0 Mo", "1 Mo", "2 Mo", "3 Mo", "4 Mo", "5 Mo", "6 Mo"].map((_) => /* @__PURE__ */ a(
|
|
1414
1413
|
p,
|
|
1415
1414
|
{
|
|
1416
1415
|
sx: {
|
|
@@ -1419,7 +1418,7 @@ const $o = ({ total: t }) => {
|
|
|
1419
1418
|
},
|
|
1420
1419
|
children: [
|
|
1421
1420
|
/* @__PURE__ */ e(
|
|
1422
|
-
|
|
1421
|
+
de,
|
|
1423
1422
|
{
|
|
1424
1423
|
orientation: "vertical",
|
|
1425
1424
|
sx: {
|
|
@@ -1428,10 +1427,10 @@ const $o = ({ total: t }) => {
|
|
|
1428
1427
|
}
|
|
1429
1428
|
}
|
|
1430
1429
|
),
|
|
1431
|
-
/* @__PURE__ */ e(I, { variant: "XSmall", children:
|
|
1430
|
+
/* @__PURE__ */ e(I, { variant: "XSmall", children: _ })
|
|
1432
1431
|
]
|
|
1433
1432
|
},
|
|
1434
|
-
|
|
1433
|
+
_
|
|
1435
1434
|
))
|
|
1436
1435
|
}
|
|
1437
1436
|
),
|
|
@@ -1445,8 +1444,8 @@ const $o = ({ total: t }) => {
|
|
|
1445
1444
|
value: j(t.key_indicators_save.drawer_progress_bar_value, i, l)
|
|
1446
1445
|
}
|
|
1447
1446
|
);
|
|
1448
|
-
}, or =
|
|
1449
|
-
const { healthScore: t } =
|
|
1447
|
+
}, or = w(nr), rr = () => {
|
|
1448
|
+
const { healthScore: t } = L(), { finstrong: o } = x(), n = Oe(t.debt_to_income_ratio), r = yt(n);
|
|
1450
1449
|
return /* @__PURE__ */ e(
|
|
1451
1450
|
We,
|
|
1452
1451
|
{
|
|
@@ -1481,7 +1480,7 @@ const $o = ({ total: t }) => {
|
|
|
1481
1480
|
},
|
|
1482
1481
|
children: [
|
|
1483
1482
|
/* @__PURE__ */ e(
|
|
1484
|
-
|
|
1483
|
+
de,
|
|
1485
1484
|
{
|
|
1486
1485
|
orientation: "vertical",
|
|
1487
1486
|
sx: {
|
|
@@ -1525,8 +1524,8 @@ const $o = ({ total: t }) => {
|
|
|
1525
1524
|
value: W(t.ninety_day_debt_spend, "0,0.00")
|
|
1526
1525
|
}
|
|
1527
1526
|
);
|
|
1528
|
-
}, ar =
|
|
1529
|
-
const { healthScore: t, allTransactions: o } =
|
|
1527
|
+
}, ar = w(rr), ir = () => {
|
|
1528
|
+
const { healthScore: t, allTransactions: o } = L(), { connect: n, finstrong: r } = x(), [s, i] = m.useState(!1);
|
|
1530
1529
|
return /* @__PURE__ */ a(p, { gap: 16, sx: { p: 16 }, children: [
|
|
1531
1530
|
/* @__PURE__ */ e(
|
|
1532
1531
|
Ce,
|
|
@@ -1558,8 +1557,8 @@ const $o = ({ total: t }) => {
|
|
|
1558
1557
|
}
|
|
1559
1558
|
)
|
|
1560
1559
|
] });
|
|
1561
|
-
}, sr =
|
|
1562
|
-
const { allTransactions: t, healthScore: o } =
|
|
1560
|
+
}, sr = w(ir), cr = () => {
|
|
1561
|
+
const { allTransactions: t, healthScore: o } = L(), { connect: n, finstrong: r } = x(), [s, i] = m.useState(!1);
|
|
1563
1562
|
return /* @__PURE__ */ a(p, { gap: 16, sx: { p: 16 }, children: [
|
|
1564
1563
|
/* @__PURE__ */ e(
|
|
1565
1564
|
Ce,
|
|
@@ -1597,18 +1596,18 @@ const $o = ({ total: t }) => {
|
|
|
1597
1596
|
}
|
|
1598
1597
|
)
|
|
1599
1598
|
] });
|
|
1600
|
-
}, lr =
|
|
1599
|
+
}, lr = w(cr), dr = ({
|
|
1601
1600
|
color: t,
|
|
1602
1601
|
data: o,
|
|
1603
1602
|
series: n,
|
|
1604
1603
|
style: r,
|
|
1605
1604
|
...s
|
|
1606
1605
|
}) => {
|
|
1607
|
-
const i = G(), l = m.useRef(null), c = m.useRef(null), [
|
|
1606
|
+
const i = G(), l = m.useRef(null), c = m.useRef(null), [d, _] = m.useState(r.width || 0);
|
|
1608
1607
|
m.useLayoutEffect(() => {
|
|
1609
|
-
|
|
1608
|
+
_(r.width || 0);
|
|
1610
1609
|
}, [r.width]), m.useLayoutEffect(() => {
|
|
1611
|
-
const
|
|
1610
|
+
const f = new ResizeObserver(() => {
|
|
1612
1611
|
window.requestAnimationFrame(() => {
|
|
1613
1612
|
if (l.current) {
|
|
1614
1613
|
const { width: D } = l.current.getBoundingClientRect(), C = D / 2, g = l.current.querySelector("text");
|
|
@@ -1616,16 +1615,16 @@ const $o = ({ total: t }) => {
|
|
|
1616
1615
|
}
|
|
1617
1616
|
});
|
|
1618
1617
|
});
|
|
1619
|
-
return l.current &&
|
|
1620
|
-
l.current &&
|
|
1618
|
+
return l.current && f.observe(l.current), () => {
|
|
1619
|
+
l.current && f.unobserve(l.current);
|
|
1621
1620
|
};
|
|
1622
1621
|
}, []);
|
|
1623
|
-
const { formattedComparison:
|
|
1622
|
+
const { formattedComparison: u, formattedMain: h } = o[n.index], y = n.type === 0 ? h : u, S = {
|
|
1624
1623
|
...r,
|
|
1625
1624
|
transition: "all 0.3s ease-in-out"
|
|
1626
|
-
},
|
|
1625
|
+
}, v = `translate(${d / 2}, -5)`;
|
|
1627
1626
|
return /* @__PURE__ */ a("g", { children: [
|
|
1628
|
-
/* @__PURE__ */ e("rect", { ...s, fill: t, ref: l, rx: 2, style:
|
|
1627
|
+
/* @__PURE__ */ e("rect", { ...s, fill: t, ref: l, rx: 2, style: S }),
|
|
1629
1628
|
/* @__PURE__ */ e(
|
|
1630
1629
|
"text",
|
|
1631
1630
|
{
|
|
@@ -1635,7 +1634,7 @@ const $o = ({ total: t }) => {
|
|
|
1635
1634
|
ref: c,
|
|
1636
1635
|
style: { transition: "transform 0.3s ease-in-out" },
|
|
1637
1636
|
textAnchor: "middle",
|
|
1638
|
-
transform:
|
|
1637
|
+
transform: v,
|
|
1639
1638
|
x: r.x,
|
|
1640
1639
|
y: r.y,
|
|
1641
1640
|
children: y
|
|
@@ -1654,11 +1653,11 @@ const $o = ({ total: t }) => {
|
|
|
1654
1653
|
legendLabelMain: i,
|
|
1655
1654
|
legendLabelComparison: l,
|
|
1656
1655
|
totalComparison: c,
|
|
1657
|
-
totalMain:
|
|
1656
|
+
totalMain: d
|
|
1658
1657
|
}) => {
|
|
1659
|
-
const
|
|
1658
|
+
const _ = G(), u = Vn(_.breakpoints.down("xs")), h = m.useMemo(
|
|
1660
1659
|
() => o.sort((g, b) => g.month - b.month).map((g) => {
|
|
1661
|
-
const b = kn(g.month),
|
|
1660
|
+
const b = kn(g.month), R = {
|
|
1662
1661
|
spending_vs_income: {
|
|
1663
1662
|
main: g.standard_spend,
|
|
1664
1663
|
comparison: g.income,
|
|
@@ -1674,17 +1673,17 @@ const $o = ({ total: t }) => {
|
|
|
1674
1673
|
};
|
|
1675
1674
|
return {
|
|
1676
1675
|
label: b,
|
|
1677
|
-
...
|
|
1676
|
+
...R[t]
|
|
1678
1677
|
};
|
|
1679
1678
|
}),
|
|
1680
1679
|
[o, t]
|
|
1681
1680
|
), y = {
|
|
1682
1681
|
dataKey: "label",
|
|
1683
1682
|
scaleType: "band"
|
|
1684
|
-
},
|
|
1683
|
+
}, S = Math.max(...h.map((g) => Math.max(g.main, g.comparison))), f = Math.min(...h.map((g) => Math.min(g.main, g.comparison))) === 0 && S === 0 ? 100 : Math.ceil(S * 1.2 / 1e3) * 1e3, D = f / 3, C = {
|
|
1685
1684
|
scaleType: "linear",
|
|
1686
1685
|
min: 0,
|
|
1687
|
-
max:
|
|
1686
|
+
max: f,
|
|
1688
1687
|
tickNumber: 4,
|
|
1689
1688
|
tickMinStep: D,
|
|
1690
1689
|
valueFormatter: (g) => g === 0 ? "$0" : W(g, "0.[0]a")
|
|
@@ -1744,7 +1743,7 @@ const $o = ({ total: t }) => {
|
|
|
1744
1743
|
i,
|
|
1745
1744
|
" "
|
|
1746
1745
|
] }),
|
|
1747
|
-
!
|
|
1746
|
+
!u && d && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: d })
|
|
1748
1747
|
] })
|
|
1749
1748
|
] }),
|
|
1750
1749
|
/* @__PURE__ */ a(p, { alignItems: "center", direction: "row", spacing: 8, children: [
|
|
@@ -1764,15 +1763,15 @@ const $o = ({ total: t }) => {
|
|
|
1764
1763
|
l,
|
|
1765
1764
|
" "
|
|
1766
1765
|
] }),
|
|
1767
|
-
!
|
|
1766
|
+
!u && c && /* @__PURE__ */ e(I, { sx: { fontWeight: 700 }, variant: "subtitle2", children: c })
|
|
1768
1767
|
] })
|
|
1769
1768
|
] })
|
|
1770
1769
|
] }),
|
|
1771
1770
|
/* @__PURE__ */ a(
|
|
1772
1771
|
Yn,
|
|
1773
1772
|
{
|
|
1774
|
-
colors: [`${
|
|
1775
|
-
dataset:
|
|
1773
|
+
colors: [`${_.palette.chartMono.chartMono3}`, `${_.palette.chartMono.chartMono5}`],
|
|
1774
|
+
dataset: h,
|
|
1776
1775
|
height: 240,
|
|
1777
1776
|
margin: { top: 14, bottom: 10, right: 2, left: -2 },
|
|
1778
1777
|
series: [
|
|
@@ -1787,13 +1786,13 @@ const $o = ({ total: t }) => {
|
|
|
1787
1786
|
{
|
|
1788
1787
|
slots: {
|
|
1789
1788
|
bar: (g) => {
|
|
1790
|
-
const { ownerState: b, ...
|
|
1789
|
+
const { ownerState: b, ...R } = g;
|
|
1791
1790
|
return /* @__PURE__ */ e(
|
|
1792
1791
|
dr,
|
|
1793
1792
|
{
|
|
1794
|
-
...
|
|
1793
|
+
...R,
|
|
1795
1794
|
color: b.color,
|
|
1796
|
-
data:
|
|
1795
|
+
data: h,
|
|
1797
1796
|
series: {
|
|
1798
1797
|
index: b.dataIndex,
|
|
1799
1798
|
type: Number(b.id.toString().split("-").pop())
|
|
@@ -1814,10 +1813,10 @@ const $o = ({ total: t }) => {
|
|
|
1814
1813
|
{
|
|
1815
1814
|
sx: () => ({
|
|
1816
1815
|
".MuiChartsAxis-line": {
|
|
1817
|
-
stroke:
|
|
1816
|
+
stroke: _.palette.divider
|
|
1818
1817
|
},
|
|
1819
1818
|
".MuiChartsAxis-tick": {
|
|
1820
|
-
stroke:
|
|
1819
|
+
stroke: _.palette.divider
|
|
1821
1820
|
},
|
|
1822
1821
|
".MuiChartsAxis-tickLabel": {
|
|
1823
1822
|
transform: "translateY(10px)"
|
|
@@ -1834,10 +1833,10 @@ const $o = ({ total: t }) => {
|
|
|
1834
1833
|
{
|
|
1835
1834
|
sx: () => ({
|
|
1836
1835
|
".MuiChartsAxis-line": {
|
|
1837
|
-
stroke:
|
|
1836
|
+
stroke: _.palette.divider
|
|
1838
1837
|
},
|
|
1839
1838
|
".MuiChartsAxis-tick": {
|
|
1840
|
-
stroke:
|
|
1839
|
+
stroke: _.palette.divider
|
|
1841
1840
|
},
|
|
1842
1841
|
".MuiChartsAxis-tickLabel": {
|
|
1843
1842
|
transform: "translateX(-8px)"
|
|
@@ -1856,7 +1855,7 @@ const $o = ({ total: t }) => {
|
|
|
1856
1855
|
}
|
|
1857
1856
|
);
|
|
1858
1857
|
}, pr = () => {
|
|
1859
|
-
const { isIncomeInitialized: t, loadDebtSpend: o, loadIncome: n, monthlySummaries: r } =
|
|
1858
|
+
const { isIncomeInitialized: t, loadDebtSpend: o, loadIncome: n, monthlySummaries: r } = L(), [s, i] = m.useState(0), { finstrong: l } = x();
|
|
1860
1859
|
return m.useEffect(() => {
|
|
1861
1860
|
t || (o().finally(), n().finally());
|
|
1862
1861
|
}, [t]), t ? /* @__PURE__ */ a(E, { children: [
|
|
@@ -1866,14 +1865,14 @@ const $o = ({ total: t }) => {
|
|
|
1866
1865
|
{
|
|
1867
1866
|
"aria-label": l.key_indicators_save.drawer_title,
|
|
1868
1867
|
centered: !0,
|
|
1869
|
-
onChange: (c,
|
|
1868
|
+
onChange: (c, d) => i(d),
|
|
1870
1869
|
selectionFollowsFocus: !0,
|
|
1871
1870
|
sx: { mb: 0 },
|
|
1872
1871
|
value: s,
|
|
1873
1872
|
variant: "fullWidth",
|
|
1874
1873
|
children: [
|
|
1875
1874
|
/* @__PURE__ */ e(
|
|
1876
|
-
|
|
1875
|
+
ce,
|
|
1877
1876
|
{
|
|
1878
1877
|
"aria-controls": "income-details-tabpanel-0",
|
|
1879
1878
|
id: "income-details-tab-0",
|
|
@@ -1882,7 +1881,7 @@ const $o = ({ total: t }) => {
|
|
|
1882
1881
|
}
|
|
1883
1882
|
),
|
|
1884
1883
|
/* @__PURE__ */ e(
|
|
1885
|
-
|
|
1884
|
+
ce,
|
|
1886
1885
|
{
|
|
1887
1886
|
"aria-controls": "debt-payment-details-tabpanel-1",
|
|
1888
1887
|
id: "debt-payment-details-tab-1",
|
|
@@ -1894,7 +1893,7 @@ const $o = ({ total: t }) => {
|
|
|
1894
1893
|
}
|
|
1895
1894
|
),
|
|
1896
1895
|
/* @__PURE__ */ e(
|
|
1897
|
-
|
|
1896
|
+
le,
|
|
1898
1897
|
{
|
|
1899
1898
|
"aria-labelledby": "income-details-tab-0",
|
|
1900
1899
|
index: 0,
|
|
@@ -1904,7 +1903,7 @@ const $o = ({ total: t }) => {
|
|
|
1904
1903
|
}
|
|
1905
1904
|
),
|
|
1906
1905
|
/* @__PURE__ */ e(
|
|
1907
|
-
|
|
1906
|
+
le,
|
|
1908
1907
|
{
|
|
1909
1908
|
"aria-labelledby": "debt-payment-details-tab-1",
|
|
1910
1909
|
index: 1,
|
|
@@ -1961,8 +1960,8 @@ const $o = ({ total: t }) => {
|
|
|
1961
1960
|
)
|
|
1962
1961
|
] })
|
|
1963
1962
|
] }) : /* @__PURE__ */ e(te, {});
|
|
1964
|
-
}, _r =
|
|
1965
|
-
const { healthScore: t } =
|
|
1963
|
+
}, _r = w(pr), hr = () => {
|
|
1964
|
+
const { healthScore: t } = L(), { finstrong: o } = x(), n = Oe(t.spend_to_income_ratio), r = n ?? 0, s = Object.keys(t).length === 0, i = bt(n), l = {
|
|
1966
1965
|
GOOD: [{ percentage: `${r}%` }],
|
|
1967
1966
|
FAIR: [{ percentage: "100%" }, { percentage: `${r - 100}%` }],
|
|
1968
1967
|
OFF_TRACK: [{ percentage: "100%" }, { percentage: `${r - 100}%` }],
|
|
@@ -2000,8 +1999,8 @@ const $o = ({ total: t }) => {
|
|
|
2000
1999
|
value: s ? "$0" : W(t.ninety_day_spend, "0,0.00")
|
|
2001
2000
|
}
|
|
2002
2001
|
);
|
|
2003
|
-
}, ur =
|
|
2004
|
-
const { accounts: t } = Se(), { categories: o, dateRangeCategoryTotals: n, loadDateRangeCategoryTotals: r } = je(), { monthlySummaries: s, handleFinstrongWidgetPrimaryCtaClick: i } =
|
|
2002
|
+
}, ur = w(hr), mr = () => {
|
|
2003
|
+
const { accounts: t } = Se(), { categories: o, dateRangeCategoryTotals: n, loadDateRangeCategoryTotals: r } = je(), { monthlySummaries: s, handleFinstrongWidgetPrimaryCtaClick: i } = L(), { appDataStore: l } = Tn(), { finstrong: c, goals: d, spending: _ } = x(), u = G(), [h, y] = m.useState("");
|
|
2005
2004
|
m.useEffect(() => {
|
|
2006
2005
|
r(
|
|
2007
2006
|
t,
|
|
@@ -2009,12 +2008,12 @@ const $o = ({ total: t }) => {
|
|
|
2009
2008
|
It(/* @__PURE__ */ new Date())
|
|
2010
2009
|
).finally();
|
|
2011
2010
|
}, [t]);
|
|
2012
|
-
const
|
|
2013
|
-
() => Qn(o,
|
|
2011
|
+
const S = m.useMemo(
|
|
2012
|
+
() => Qn(o, d, u, n),
|
|
2014
2013
|
[o, n]
|
|
2015
|
-
),
|
|
2016
|
-
y(
|
|
2017
|
-
}, { totalSpending:
|
|
2014
|
+
), v = (C) => {
|
|
2015
|
+
y(h === C ? "" : C);
|
|
2016
|
+
}, { totalSpending: f, totalIncome: D } = m.useMemo(() => s?.reduce(
|
|
2018
2017
|
(C, { standard_spend: g = 0, income: b = 0 }) => ({
|
|
2019
2018
|
totalSpending: C.totalSpending + g,
|
|
2020
2019
|
totalIncome: C.totalIncome + b
|
|
@@ -2035,7 +2034,7 @@ const $o = ({ total: t }) => {
|
|
|
2035
2034
|
onClick: () => i("trends")(),
|
|
2036
2035
|
title: c.key_indicators_spend.spend_less_than_you_make_drawer.trends,
|
|
2037
2036
|
totalComparison: W(D, "0,0.00"),
|
|
2038
|
-
totalMain: W(
|
|
2037
|
+
totalMain: W(f, "0,0.00")
|
|
2039
2038
|
}
|
|
2040
2039
|
) : /* @__PURE__ */ e(
|
|
2041
2040
|
Fe,
|
|
@@ -2058,7 +2057,7 @@ const $o = ({ total: t }) => {
|
|
|
2058
2057
|
variant: "no-buttons"
|
|
2059
2058
|
}
|
|
2060
2059
|
),
|
|
2061
|
-
|
|
2060
|
+
S ? /* @__PURE__ */ a(
|
|
2062
2061
|
V,
|
|
2063
2062
|
{
|
|
2064
2063
|
sx: {
|
|
@@ -2099,18 +2098,18 @@ const $o = ({ total: t }) => {
|
|
|
2099
2098
|
/* @__PURE__ */ e(
|
|
2100
2099
|
Zn,
|
|
2101
2100
|
{
|
|
2102
|
-
data:
|
|
2103
|
-
onSelected:
|
|
2104
|
-
selectedId:
|
|
2105
|
-
totalLabel:
|
|
2101
|
+
data: S,
|
|
2102
|
+
onSelected: v,
|
|
2103
|
+
selectedId: h,
|
|
2104
|
+
totalLabel: _.total_spending
|
|
2106
2105
|
}
|
|
2107
2106
|
),
|
|
2108
2107
|
/* @__PURE__ */ e(
|
|
2109
2108
|
Jn,
|
|
2110
2109
|
{
|
|
2111
|
-
data:
|
|
2112
|
-
onSelected:
|
|
2113
|
-
selectedId:
|
|
2110
|
+
data: S,
|
|
2111
|
+
onSelected: v,
|
|
2112
|
+
selectedId: h
|
|
2114
2113
|
}
|
|
2115
2114
|
)
|
|
2116
2115
|
] })
|
|
@@ -2138,12 +2137,12 @@ const $o = ({ total: t }) => {
|
|
|
2138
2137
|
}
|
|
2139
2138
|
)
|
|
2140
2139
|
] });
|
|
2141
|
-
}, gr =
|
|
2140
|
+
}, gr = w(mr), yr = ({
|
|
2142
2141
|
drawerFor: t,
|
|
2143
2142
|
isOpen: o,
|
|
2144
2143
|
onClose: n
|
|
2145
2144
|
}) => {
|
|
2146
|
-
const { finstrong: r } =
|
|
2145
|
+
const { finstrong: r } = x(), i = {
|
|
2147
2146
|
spendLessThanYouMake: {
|
|
2148
2147
|
title: r.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_title,
|
|
2149
2148
|
description: r.key_indicators_spend.spend_less_than_you_make_drawer.spend_less_than_you_make_description,
|
|
@@ -2212,14 +2211,14 @@ const $o = ({ total: t }) => {
|
|
|
2212
2211
|
children: /* @__PURE__ */ e(p, { sx: { gap: 16 }, children: i.content })
|
|
2213
2212
|
}
|
|
2214
2213
|
);
|
|
2215
|
-
}, br =
|
|
2214
|
+
}, br = w(yr), xe = ({
|
|
2216
2215
|
drawerFor: t,
|
|
2217
2216
|
title: o,
|
|
2218
2217
|
description: n,
|
|
2219
2218
|
cardState: r = "MISSING"
|
|
2220
2219
|
}) => {
|
|
2221
|
-
const { finstrong: s } =
|
|
2222
|
-
(
|
|
2220
|
+
const { finstrong: s } = x(), [i, l] = m.useState(!1), c = (d) => {
|
|
2221
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), l(!0));
|
|
2223
2222
|
};
|
|
2224
2223
|
return /* @__PURE__ */ a(E, { children: [
|
|
2225
2224
|
/* @__PURE__ */ a(
|
|
@@ -2263,24 +2262,24 @@ const $o = ({ total: t }) => {
|
|
|
2263
2262
|
)
|
|
2264
2263
|
] });
|
|
2265
2264
|
}, fr = () => {
|
|
2266
|
-
const { finstrong: t } =
|
|
2267
|
-
const c = bt(l),
|
|
2265
|
+
const { finstrong: t } = x(), { key_indicators_spend: o } = t, { healthScore: n } = L(), r = (l) => {
|
|
2266
|
+
const c = bt(l), d = {
|
|
2268
2267
|
GOOD: o.ratio_good_description,
|
|
2269
2268
|
FAIR: o.ratio_fair_description,
|
|
2270
2269
|
OFF_TRACK: o.ratio_off_track_description,
|
|
2271
2270
|
MISSING: o.ratio_missing_description
|
|
2272
|
-
},
|
|
2271
|
+
}, _ = c === "MISSING" ? d[c] : j(d[c], l);
|
|
2273
2272
|
return {
|
|
2274
2273
|
cardState: c,
|
|
2275
|
-
description:
|
|
2274
|
+
description: _,
|
|
2276
2275
|
title: o.ratio_card_title
|
|
2277
2276
|
};
|
|
2278
2277
|
}, { spendToIncomeRatio: s, spendFeeCount: i } = m.useMemo(() => {
|
|
2279
|
-
const l = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, c = r(l),
|
|
2278
|
+
const l = n.spend_to_income_ratio !== null ? Math.round(n.spend_to_income_ratio * 100) : null, c = r(l), d = Mn(
|
|
2280
2279
|
n.spending_fee_transaction_count,
|
|
2281
2280
|
o
|
|
2282
2281
|
);
|
|
2283
|
-
return { spendToIncomeRatio: c, spendFeeCount:
|
|
2282
|
+
return { spendToIncomeRatio: c, spendFeeCount: d };
|
|
2284
2283
|
}, [
|
|
2285
2284
|
n.spend_to_income_ratio,
|
|
2286
2285
|
n.spending_fee_transaction_count,
|
|
@@ -2293,7 +2292,7 @@ const $o = ({ total: t }) => {
|
|
|
2293
2292
|
{
|
|
2294
2293
|
cardState: s.cardState,
|
|
2295
2294
|
description: s.description,
|
|
2296
|
-
drawerFor:
|
|
2295
|
+
drawerFor: pe.SpendLessThanYouMake,
|
|
2297
2296
|
title: s.title
|
|
2298
2297
|
}
|
|
2299
2298
|
),
|
|
@@ -2302,43 +2301,43 @@ const $o = ({ total: t }) => {
|
|
|
2302
2301
|
{
|
|
2303
2302
|
cardState: i.cardState,
|
|
2304
2303
|
description: i.description,
|
|
2305
|
-
drawerFor:
|
|
2304
|
+
drawerFor: pe.PayBillsOnTime,
|
|
2306
2305
|
title: i.title
|
|
2307
2306
|
}
|
|
2308
2307
|
)
|
|
2309
2308
|
] });
|
|
2310
|
-
}, xr =
|
|
2311
|
-
const { healthScore: t } =
|
|
2312
|
-
const
|
|
2309
|
+
}, xr = w(fr), Sr = () => {
|
|
2310
|
+
const { healthScore: t } = L(), { finstrong: o } = x(), { key_indicators_save: n } = o, r = (c) => {
|
|
2311
|
+
const d = gt(c), _ = {
|
|
2313
2312
|
GOOD: n.days_of_cash_good_description,
|
|
2314
2313
|
FAIR: n.days_of_cash_fair_description,
|
|
2315
2314
|
OFF_TRACK: n.days_of_cash_off_track_description,
|
|
2316
2315
|
MISSING: n.days_of_cash_missing_description
|
|
2317
|
-
},
|
|
2316
|
+
}, u = d === "MISSING" ? _[d] : j(_[d], c);
|
|
2318
2317
|
return {
|
|
2319
|
-
cardState:
|
|
2320
|
-
description:
|
|
2318
|
+
cardState: d,
|
|
2319
|
+
description: u,
|
|
2321
2320
|
title: n.days_of_cash_title
|
|
2322
2321
|
};
|
|
2323
2322
|
}, s = (c) => {
|
|
2324
|
-
const
|
|
2323
|
+
const d = mt(c), _ = {
|
|
2325
2324
|
GOOD: n.emergency_savings_good_description,
|
|
2326
2325
|
FAIR: n.emergency_savings_fair_description,
|
|
2327
2326
|
OFF_TRACK: n.emergency_savings_off_track_description,
|
|
2328
2327
|
MISSING: n.emergency_savings_missing_description
|
|
2329
2328
|
};
|
|
2330
|
-
let
|
|
2331
|
-
return
|
|
2332
|
-
d
|
|
2329
|
+
let u;
|
|
2330
|
+
return d === "FAIR" && c !== null ? u = j(
|
|
2331
|
+
_[d],
|
|
2333
2332
|
W(c, "0,0.00")
|
|
2334
|
-
) :
|
|
2335
|
-
cardState:
|
|
2336
|
-
description:
|
|
2333
|
+
) : u = _[d], {
|
|
2334
|
+
cardState: d,
|
|
2335
|
+
description: u,
|
|
2337
2336
|
title: n.emergency_savings_title
|
|
2338
2337
|
};
|
|
2339
2338
|
}, { daysOfCashOnHand: i, emergencySavings: l } = m.useMemo(() => {
|
|
2340
|
-
const c = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null,
|
|
2341
|
-
return { daysOfCashOnHand:
|
|
2339
|
+
const c = t.months_of_cash_on_hand !== null ? Math.round(t.months_of_cash_on_hand * 30) : null, d = r(c), _ = t.emergency_savings_on_hand !== null ? Math.round(t.emergency_savings_on_hand) : null, u = s(_);
|
|
2340
|
+
return { daysOfCashOnHand: d, emergencySavings: u };
|
|
2342
2341
|
}, [
|
|
2343
2342
|
t.months_of_cash_on_hand,
|
|
2344
2343
|
t.emergency_savings_on_hand,
|
|
@@ -2351,7 +2350,7 @@ const $o = ({ total: t }) => {
|
|
|
2351
2350
|
{
|
|
2352
2351
|
cardState: i.cardState,
|
|
2353
2352
|
description: i.description,
|
|
2354
|
-
drawerFor:
|
|
2353
|
+
drawerFor: pe.SaveEnoughToLiveOn,
|
|
2355
2354
|
title: i.title
|
|
2356
2355
|
}
|
|
2357
2356
|
),
|
|
@@ -2360,41 +2359,41 @@ const $o = ({ total: t }) => {
|
|
|
2360
2359
|
{
|
|
2361
2360
|
cardState: l.cardState,
|
|
2362
2361
|
description: l.description,
|
|
2363
|
-
drawerFor:
|
|
2362
|
+
drawerFor: pe.MaintainEmergencySavings,
|
|
2364
2363
|
title: l.title
|
|
2365
2364
|
}
|
|
2366
2365
|
)
|
|
2367
2366
|
] });
|
|
2368
|
-
}, Cr =
|
|
2369
|
-
const { healthScore: t } =
|
|
2370
|
-
const
|
|
2367
|
+
}, Cr = w(Sr), vr = () => {
|
|
2368
|
+
const { healthScore: t } = L(), { finstrong: o } = x(), { key_indicators_borrow: n } = o, { user: r } = ee(), s = (d) => {
|
|
2369
|
+
const _ = yt(d), u = {
|
|
2371
2370
|
GOOD: n.manage_debit_good_description,
|
|
2372
2371
|
FAIR: n.manage_debit_fair_description,
|
|
2373
2372
|
OFF_TRACK: n.manage_debit_off_track_description,
|
|
2374
2373
|
MISSING: n.manage_debit_missing_description
|
|
2375
|
-
},
|
|
2374
|
+
}, h = _ === "FAIR" || _ === "OFF_TRACK" ? j(u[_], d) : u[_];
|
|
2376
2375
|
return {
|
|
2377
|
-
cardState:
|
|
2378
|
-
description:
|
|
2376
|
+
cardState: _,
|
|
2377
|
+
description: h,
|
|
2379
2378
|
title: n.manage_debit_title
|
|
2380
2379
|
};
|
|
2381
|
-
}, i = (
|
|
2382
|
-
const
|
|
2380
|
+
}, i = (d) => {
|
|
2381
|
+
const _ = ut(d), u = {
|
|
2383
2382
|
GOOD: n.credit_score_good_description,
|
|
2384
2383
|
FAIR: n.credit_score_fair_description,
|
|
2385
2384
|
OFF_TRACK: n.credit_score_off_track_description,
|
|
2386
2385
|
MISSING: n.credit_score_missing_description
|
|
2387
|
-
},
|
|
2386
|
+
}, h = _ === "MISSING" ? u[_] : j(u[_], d);
|
|
2388
2387
|
return {
|
|
2389
|
-
cardState:
|
|
2390
|
-
description:
|
|
2388
|
+
cardState: _,
|
|
2389
|
+
description: h,
|
|
2391
2390
|
title: n.credit_score_title
|
|
2392
2391
|
};
|
|
2393
2392
|
}, { manageDebtStatus: l, creditScoreStatus: c } = m.useMemo(() => {
|
|
2394
|
-
const
|
|
2393
|
+
const d = t.debt_to_income_ratio !== null ? Math.round(t.debt_to_income_ratio * 100) : null, _ = s(d), u = i(r.credit_score || null);
|
|
2395
2394
|
return {
|
|
2396
|
-
manageDebtStatus:
|
|
2397
|
-
creditScoreStatus:
|
|
2395
|
+
manageDebtStatus: _,
|
|
2396
|
+
creditScoreStatus: u
|
|
2398
2397
|
};
|
|
2399
2398
|
}, [t.debt_to_income_ratio, r.credit_score, n, o]);
|
|
2400
2399
|
return /* @__PURE__ */ a(p, { direction: "column", gap: 24, sx: { p: 8, pt: 24 }, children: [
|
|
@@ -2403,7 +2402,7 @@ const $o = ({ total: t }) => {
|
|
|
2403
2402
|
{
|
|
2404
2403
|
cardState: l.cardState,
|
|
2405
2404
|
description: l.description,
|
|
2406
|
-
drawerFor:
|
|
2405
|
+
drawerFor: pe.HaveManageableDebt,
|
|
2407
2406
|
title: l.title
|
|
2408
2407
|
}
|
|
2409
2408
|
),
|
|
@@ -2412,13 +2411,13 @@ const $o = ({ total: t }) => {
|
|
|
2412
2411
|
{
|
|
2413
2412
|
cardState: c.cardState,
|
|
2414
2413
|
description: c.description,
|
|
2415
|
-
drawerFor:
|
|
2414
|
+
drawerFor: pe.HaveAGoodCreditScore,
|
|
2416
2415
|
title: c.title
|
|
2417
2416
|
}
|
|
2418
2417
|
)
|
|
2419
2418
|
] });
|
|
2420
|
-
}, wr =
|
|
2421
|
-
const [t, o] = m.useState(0), { finstrong: n } =
|
|
2419
|
+
}, wr = w(vr), kr = () => {
|
|
2420
|
+
const [t, o] = m.useState(0), { finstrong: n } = x();
|
|
2422
2421
|
return /* @__PURE__ */ a(E, { children: [
|
|
2423
2422
|
/* @__PURE__ */ a(
|
|
2424
2423
|
Xe,
|
|
@@ -2438,7 +2437,7 @@ const $o = ({ total: t }) => {
|
|
|
2438
2437
|
variant: "fullWidth",
|
|
2439
2438
|
children: [
|
|
2440
2439
|
/* @__PURE__ */ e(
|
|
2441
|
-
|
|
2440
|
+
ce,
|
|
2442
2441
|
{
|
|
2443
2442
|
"aria-controls": "spend-details-tabpanel-0",
|
|
2444
2443
|
icon: /* @__PURE__ */ e(Ge, { sx: { mr: 8 } }),
|
|
@@ -2449,7 +2448,7 @@ const $o = ({ total: t }) => {
|
|
|
2449
2448
|
}
|
|
2450
2449
|
),
|
|
2451
2450
|
/* @__PURE__ */ e(
|
|
2452
|
-
|
|
2451
|
+
ce,
|
|
2453
2452
|
{
|
|
2454
2453
|
"aria-controls": "save-details-tabpanel-1",
|
|
2455
2454
|
icon: /* @__PURE__ */ e(dn, { sx: { mr: 8 } }),
|
|
@@ -2460,7 +2459,7 @@ const $o = ({ total: t }) => {
|
|
|
2460
2459
|
}
|
|
2461
2460
|
),
|
|
2462
2461
|
/* @__PURE__ */ e(
|
|
2463
|
-
|
|
2462
|
+
ce,
|
|
2464
2463
|
{
|
|
2465
2464
|
"aria-controls": "borrow-details-tabpanel-2",
|
|
2466
2465
|
icon: /* @__PURE__ */ e(pn, { sx: { mr: 8 } }),
|
|
@@ -2473,12 +2472,12 @@ const $o = ({ total: t }) => {
|
|
|
2473
2472
|
]
|
|
2474
2473
|
}
|
|
2475
2474
|
),
|
|
2476
|
-
/* @__PURE__ */ e(
|
|
2477
|
-
/* @__PURE__ */ e(
|
|
2478
|
-
/* @__PURE__ */ e(
|
|
2475
|
+
/* @__PURE__ */ e(le, { index: 0, name: "spend-details", value: t, children: /* @__PURE__ */ e(xr, {}) }),
|
|
2476
|
+
/* @__PURE__ */ e(le, { index: 1, name: "save-details", value: t, children: /* @__PURE__ */ e(Cr, {}) }),
|
|
2477
|
+
/* @__PURE__ */ e(le, { index: 2, name: "borrow-details", value: t, children: /* @__PURE__ */ e(wr, {}) })
|
|
2479
2478
|
] });
|
|
2480
|
-
}, Mr =
|
|
2481
|
-
const { finstrong: o } =
|
|
2479
|
+
}, Mr = w(kr), Dr = ({ onClick: t }) => {
|
|
2480
|
+
const { finstrong: o } = x(), { isCopyLoaded: n } = U();
|
|
2482
2481
|
return n ? /* @__PURE__ */ a(p, { sx: { alignItems: "center", gap: 12, pt: 12, pb: 32 }, children: [
|
|
2483
2482
|
/* @__PURE__ */ e(pt, { size: 48 }),
|
|
2484
2483
|
/* @__PURE__ */ a(p, { sx: { alignItems: "center", gap: 4, textAlign: "center" }, children: [
|
|
@@ -2502,7 +2501,7 @@ const $o = ({ total: t }) => {
|
|
|
2502
2501
|
}
|
|
2503
2502
|
) })
|
|
2504
2503
|
] }) : /* @__PURE__ */ e(te, {});
|
|
2505
|
-
}, Ir =
|
|
2504
|
+
}, Ir = w(Dr), Ar = ({
|
|
2506
2505
|
firstDay: t,
|
|
2507
2506
|
frequency: o,
|
|
2508
2507
|
secondDay: n,
|
|
@@ -2511,21 +2510,21 @@ const $o = ({ total: t }) => {
|
|
|
2511
2510
|
setFirstDay: i,
|
|
2512
2511
|
setFrequency: l,
|
|
2513
2512
|
setSecondDay: c,
|
|
2514
|
-
transaction:
|
|
2513
|
+
transaction: d
|
|
2515
2514
|
}) => {
|
|
2516
|
-
const { finstrong:
|
|
2515
|
+
const { finstrong: _ } = x();
|
|
2517
2516
|
return /* @__PURE__ */ a(m.Fragment, { children: [
|
|
2518
2517
|
/* @__PURE__ */ a(p, { children: [
|
|
2519
|
-
!!r.length && /* @__PURE__ */ e(k, { sx: { pb: 24 }, children: r.reduce((
|
|
2520
|
-
if (
|
|
2521
|
-
const
|
|
2522
|
-
return
|
|
2518
|
+
!!r.length && /* @__PURE__ */ e(k, { sx: { pb: 24 }, children: r.reduce((u, h, y) => {
|
|
2519
|
+
if (h.guid === d.guid) return u;
|
|
2520
|
+
const S = Hn(y, r), v = Nn(y, r);
|
|
2521
|
+
return u.push(
|
|
2523
2522
|
/* @__PURE__ */ a(m.Fragment, { children: [
|
|
2524
|
-
|
|
2525
|
-
/* @__PURE__ */ e(Kn, { transaction:
|
|
2526
|
-
/* @__PURE__ */ e(
|
|
2527
|
-
] },
|
|
2528
|
-
),
|
|
2523
|
+
S && /* @__PURE__ */ e(jn, { children: Mt(h.date) }),
|
|
2524
|
+
/* @__PURE__ */ e(Kn, { transaction: h }),
|
|
2525
|
+
/* @__PURE__ */ e(de, { sx: { ml: v ? 44 : 0 } })
|
|
2526
|
+
] }, h.guid)
|
|
2527
|
+
), u;
|
|
2529
2528
|
}, []) }),
|
|
2530
2529
|
/* @__PURE__ */ e(
|
|
2531
2530
|
oo,
|
|
@@ -2536,7 +2535,7 @@ const $o = ({ total: t }) => {
|
|
|
2536
2535
|
onFrequencyChange: l,
|
|
2537
2536
|
onSecondDayChange: c,
|
|
2538
2537
|
secondDay: n,
|
|
2539
|
-
transaction:
|
|
2538
|
+
transaction: d
|
|
2540
2539
|
}
|
|
2541
2540
|
)
|
|
2542
2541
|
] }),
|
|
@@ -2546,12 +2545,12 @@ const $o = ({ total: t }) => {
|
|
|
2546
2545
|
fullWidth: !0,
|
|
2547
2546
|
onClick: () => s({ step: O.MonthlyIncome, type: "main" }),
|
|
2548
2547
|
startIcon: /* @__PURE__ */ e(_t, {}),
|
|
2549
|
-
children:
|
|
2548
|
+
children: _.onboarding_add_more_income
|
|
2550
2549
|
}
|
|
2551
2550
|
) })
|
|
2552
2551
|
] });
|
|
2553
|
-
}, Tr =
|
|
2554
|
-
const { finstrong: n } =
|
|
2552
|
+
}, Tr = w(Ar), Or = ({ selectedDate: t, setSelectedDate: o }) => {
|
|
2553
|
+
const { finstrong: n } = x(), r = G(), s = (i) => {
|
|
2555
2554
|
o(Math.floor(new Date(i).getTime() / 1e3));
|
|
2556
2555
|
};
|
|
2557
2556
|
return /* @__PURE__ */ e(k, { sx: { p: 24 }, children: /* @__PURE__ */ e(io, { dateAdapter: At, children: /* @__PURE__ */ e(
|
|
@@ -2564,13 +2563,13 @@ const $o = ({ total: t }) => {
|
|
|
2564
2563
|
nextIconButton: {
|
|
2565
2564
|
sx: {
|
|
2566
2565
|
color: "primary.main",
|
|
2567
|
-
"&:hover": { bgcolor:
|
|
2566
|
+
"&:hover": { bgcolor: se(r.palette.primary.light, 0.1) }
|
|
2568
2567
|
}
|
|
2569
2568
|
},
|
|
2570
2569
|
previousIconButton: {
|
|
2571
2570
|
sx: {
|
|
2572
2571
|
color: "primary.main",
|
|
2573
|
-
"&:hover": { bgcolor:
|
|
2572
|
+
"&:hover": { bgcolor: se(r.palette.primary.light, 0.1) }
|
|
2574
2573
|
}
|
|
2575
2574
|
}
|
|
2576
2575
|
},
|
|
@@ -2578,14 +2577,14 @@ const $o = ({ total: t }) => {
|
|
|
2578
2577
|
width: "100%",
|
|
2579
2578
|
"& .MuiIconButton-edgeEnd": {
|
|
2580
2579
|
color: "primary.main",
|
|
2581
|
-
"&:hover": { bgcolor:
|
|
2580
|
+
"&:hover": { bgcolor: se(r.palette.primary.light, 0.1) }
|
|
2582
2581
|
}
|
|
2583
2582
|
},
|
|
2584
2583
|
value: t ? new Date(t * 1e3) : null
|
|
2585
2584
|
}
|
|
2586
2585
|
) }) });
|
|
2587
|
-
}, Rr =
|
|
2588
|
-
const { finstrong: n } =
|
|
2586
|
+
}, Rr = w(Or), Fr = ({ creditScore: t, setCreditScore: o }) => {
|
|
2587
|
+
const { finstrong: n } = x(), r = !isNaN(t);
|
|
2589
2588
|
return /* @__PURE__ */ e(k, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
2590
2589
|
Re,
|
|
2591
2590
|
{
|
|
@@ -2601,7 +2600,7 @@ const $o = ({ total: t }) => {
|
|
|
2601
2600
|
value: r ? t : ""
|
|
2602
2601
|
}
|
|
2603
2602
|
) });
|
|
2604
|
-
}, Lr =
|
|
2603
|
+
}, Lr = w(Fr), Wt = ({ value: t, completeCopy: o }) => /* @__PURE__ */ a(p, { sx: { gap: 8 }, children: [
|
|
2605
2604
|
/* @__PURE__ */ e(p, { sx: { flexDirection: "row", gap: 4 }, children: Array.from({ length: 4 }).map((n, r) => /* @__PURE__ */ e(
|
|
2606
2605
|
k,
|
|
2607
2606
|
{
|
|
@@ -2634,13 +2633,13 @@ const $o = ({ total: t }) => {
|
|
|
2634
2633
|
step: O.ConnectAccounts,
|
|
2635
2634
|
type: "main"
|
|
2636
2635
|
}, Pr = ({ isOpen: t, onClose: o }) => {
|
|
2637
|
-
const { visibleAccounts: n } = Se(), { calculateHealthScore: r } =
|
|
2636
|
+
const { visibleAccounts: n } = Se(), { calculateHealthScore: r } = L(), { finstrong: s } = x(), { setSelectedAccounts: i } = U(), { addRepeatingTransaction: l, setDateRange: c } = Ke(), { filter: d, setFilter: _, transactions: u } = On(), { user: h, userProfile: y, updateUser: S, updateUserProfile: v } = ee(), [f, D] = m.useState(h.credit_score || 0), [C, g] = m.useState(
|
|
2638
2637
|
it
|
|
2639
|
-
), [b,
|
|
2638
|
+
), [b, R] = m.useState(1), [B, Y] = m.useState(wt.EveryMonth), [T, $] = m.useState([]), [z, _e] = m.useState(!1), [ve, Q] = m.useState(!1), [X, he] = m.useState(h.birthday), [H, ue] = m.useState(15), [N, ae] = m.useState("");
|
|
2640
2639
|
m.useEffect(() => {
|
|
2641
2640
|
c({ start: Dt(rt()), end: It(rt()) });
|
|
2642
2641
|
}, []), m.useEffect(() => {
|
|
2643
|
-
|
|
2642
|
+
_({
|
|
2644
2643
|
accounts: n.map((A) => A.guid),
|
|
2645
2644
|
dateRange: {
|
|
2646
2645
|
start: no(/* @__PURE__ */ new Date(), 90),
|
|
@@ -2650,21 +2649,21 @@ const $o = ({ total: t }) => {
|
|
|
2650
2649
|
}), i(n);
|
|
2651
2650
|
}, [n]);
|
|
2652
2651
|
const De = m.useMemo(
|
|
2653
|
-
() =>
|
|
2654
|
-
[N,
|
|
2655
|
-
),
|
|
2652
|
+
() => u.find((A) => A.guid === N),
|
|
2653
|
+
[N, u]
|
|
2654
|
+
), me = m.useMemo(() => ({
|
|
2656
2655
|
[O.ConnectAccounts]: !0,
|
|
2657
2656
|
[O.MonthlyIncome]: !!N,
|
|
2658
|
-
[O.Birthday]: !!
|
|
2659
|
-
[O.CreditScore]: !!
|
|
2660
|
-
})[C.step], [
|
|
2657
|
+
[O.Birthday]: !!h.birthday || !!X,
|
|
2658
|
+
[O.CreditScore]: !!h.credit_score || !!f
|
|
2659
|
+
})[C.step], [f, C, X, N, h]), q = n.length > 0, $t = m.useMemo(() => {
|
|
2661
2660
|
const { step: A } = C;
|
|
2662
|
-
let
|
|
2663
|
-
return A >= O.MonthlyIncome && q &&
|
|
2664
|
-
}, [C.step, q, T.length,
|
|
2665
|
-
|
|
2666
|
-
...
|
|
2667
|
-
custom: (
|
|
2661
|
+
let F = 0;
|
|
2662
|
+
return A >= O.MonthlyIncome && q && F++, A >= O.Birthday && T.length && F++, A >= O.CreditScore && (h.birthday || h.credit_score) && F++, F;
|
|
2663
|
+
}, [C.step, q, T.length, h.birthday, h.credit_score]), zt = (A) => {
|
|
2664
|
+
_({
|
|
2665
|
+
...d,
|
|
2666
|
+
custom: (F) => A ? ao(F, A) : at(F)
|
|
2668
2667
|
});
|
|
2669
2668
|
}, Et = {
|
|
2670
2669
|
[O.ConnectAccounts]: {
|
|
@@ -2682,15 +2681,15 @@ const $o = ({ total: t }) => {
|
|
|
2682
2681
|
incomeTransactions: T,
|
|
2683
2682
|
secondDay: H,
|
|
2684
2683
|
setCurrentStep: (A) => {
|
|
2685
|
-
g(A), $((
|
|
2686
|
-
if (
|
|
2687
|
-
const Ae =
|
|
2688
|
-
return Ae ? [...
|
|
2684
|
+
g(A), $((F) => {
|
|
2685
|
+
if (F.some((ie) => ie.guid === N)) return F.filter((ie) => ie.guid !== N);
|
|
2686
|
+
const Ae = u.find((ie) => ie.guid === N);
|
|
2687
|
+
return Ae ? [...F, { ...Ae, firstDay: b, frequency: B, secondDay: H }] : F;
|
|
2689
2688
|
});
|
|
2690
2689
|
},
|
|
2691
|
-
setFirstDay:
|
|
2690
|
+
setFirstDay: R,
|
|
2692
2691
|
setFrequency: Y,
|
|
2693
|
-
setSecondDay:
|
|
2692
|
+
setSecondDay: ue,
|
|
2694
2693
|
transaction: De
|
|
2695
2694
|
}
|
|
2696
2695
|
),
|
|
@@ -2709,21 +2708,21 @@ const $o = ({ total: t }) => {
|
|
|
2709
2708
|
secondaryText: s.onboarding_add_income_secondary
|
|
2710
2709
|
},
|
|
2711
2710
|
[O.Birthday]: {
|
|
2712
|
-
main: /* @__PURE__ */ e(Rr, { selectedDate: X, setSelectedDate:
|
|
2711
|
+
main: /* @__PURE__ */ e(Rr, { selectedDate: X, setSelectedDate: he }),
|
|
2713
2712
|
mainActionContent: s.onboarding_next,
|
|
2714
2713
|
primaryText: s.onboarding_birthday_primary,
|
|
2715
2714
|
secondaryText: s.onboarding_birthday_secondary
|
|
2716
2715
|
},
|
|
2717
2716
|
[O.CreditScore]: {
|
|
2718
|
-
main: /* @__PURE__ */ e(Lr, { creditScore:
|
|
2717
|
+
main: /* @__PURE__ */ e(Lr, { creditScore: f, setCreditScore: D }),
|
|
2719
2718
|
mainActionContent: s.onboarding_next,
|
|
2720
2719
|
primaryText: s.onboarding_credit_score_primary,
|
|
2721
2720
|
secondaryText: s.onboarding_credit_score_secondary
|
|
2722
2721
|
}
|
|
2723
2722
|
}, Ue = () => {
|
|
2724
|
-
g(it),
|
|
2723
|
+
g(it), _e(!1), ae(""), o();
|
|
2725
2724
|
}, Qe = async () => {
|
|
2726
|
-
|
|
2725
|
+
_e(!0), await jt(T), await r(), await v({ ...y, has_completed_finstrong_onboarding: !0 }), Ue();
|
|
2727
2726
|
}, Gt = () => {
|
|
2728
2727
|
if (C.step === O.CreditScore) {
|
|
2729
2728
|
Qe();
|
|
@@ -2731,17 +2730,17 @@ const $o = ({ total: t }) => {
|
|
|
2731
2730
|
}
|
|
2732
2731
|
g({ step: C.step + 1, type: "main" });
|
|
2733
2732
|
}, Ht = () => {
|
|
2734
|
-
const { step: A } = C,
|
|
2733
|
+
const { step: A } = C, F = A + 1;
|
|
2735
2734
|
switch (A) {
|
|
2736
2735
|
case O.Birthday:
|
|
2737
|
-
X && X !==
|
|
2736
|
+
X && X !== h.birthday && S({ ...h, birthday: X });
|
|
2738
2737
|
break;
|
|
2739
2738
|
case O.CreditScore:
|
|
2740
|
-
|
|
2739
|
+
f && f !== h.credit_score && S({ ...h, credit_score: f }), Qe();
|
|
2741
2740
|
return;
|
|
2742
2741
|
case O.MonthlyIncome:
|
|
2743
|
-
N && T.findIndex(({ guid:
|
|
2744
|
-
...
|
|
2742
|
+
N && T.findIndex(({ guid: ye }) => ye === N) === -1 && $((ye) => [
|
|
2743
|
+
...ye,
|
|
2745
2744
|
{ ...De, firstDay: b, frequency: B, secondDay: H }
|
|
2746
2745
|
]);
|
|
2747
2746
|
break;
|
|
@@ -2752,10 +2751,10 @@ const $o = ({ total: t }) => {
|
|
|
2752
2751
|
}
|
|
2753
2752
|
break;
|
|
2754
2753
|
}
|
|
2755
|
-
|
|
2754
|
+
F in O && g({ step: F, type: "main" });
|
|
2756
2755
|
}, Nt = () => {
|
|
2757
|
-
const { step: A, type:
|
|
2758
|
-
if (
|
|
2756
|
+
const { step: A, type: F } = C;
|
|
2757
|
+
if (F === "detail") {
|
|
2759
2758
|
g({ step: A, type: "main" });
|
|
2760
2759
|
return;
|
|
2761
2760
|
}
|
|
@@ -2765,9 +2764,9 @@ const $o = ({ total: t }) => {
|
|
|
2765
2764
|
}
|
|
2766
2765
|
A > O.ConnectAccounts && g({ step: A - 1, type: "main" });
|
|
2767
2766
|
}, jt = async (A) => {
|
|
2768
|
-
for (const
|
|
2767
|
+
for (const F of A) {
|
|
2769
2768
|
const {
|
|
2770
|
-
account_guid:
|
|
2769
|
+
account_guid: ye,
|
|
2771
2770
|
amount: Ae,
|
|
2772
2771
|
date: ie,
|
|
2773
2772
|
description: Xt,
|
|
@@ -2778,8 +2777,8 @@ const $o = ({ total: t }) => {
|
|
|
2778
2777
|
merchant_guid: Qt,
|
|
2779
2778
|
payee: Zt,
|
|
2780
2779
|
transaction_type: Jt
|
|
2781
|
-
} =
|
|
2782
|
-
account_guid:
|
|
2780
|
+
} = F, en = zn(Ze, to(ie)), tn = {
|
|
2781
|
+
account_guid: ye,
|
|
2783
2782
|
amount: Ae,
|
|
2784
2783
|
created_by: 0,
|
|
2785
2784
|
description: Zt || Xt || Yt,
|
|
@@ -2790,11 +2789,11 @@ const $o = ({ total: t }) => {
|
|
|
2790
2789
|
repeating_transaction_type: kt.Income,
|
|
2791
2790
|
second_recurrence_day: Ut,
|
|
2792
2791
|
transaction_type: Jt,
|
|
2793
|
-
user_guid:
|
|
2792
|
+
user_guid: h.guid
|
|
2794
2793
|
};
|
|
2795
|
-
await l(tn,
|
|
2794
|
+
await l(tn, F);
|
|
2796
2795
|
}
|
|
2797
|
-
},
|
|
2796
|
+
}, ge = Et[C.step], Ie = C.step === O.ConnectAccounts, Kt = {
|
|
2798
2797
|
fullWidth: !0,
|
|
2799
2798
|
...Ie && !q && { startIcon: /* @__PURE__ */ e(_t, {}) }
|
|
2800
2799
|
}, Vt = !Ie || Ie && !q;
|
|
@@ -2805,11 +2804,11 @@ const $o = ({ total: t }) => {
|
|
|
2805
2804
|
footerStyles: { px: 24, py: 16 },
|
|
2806
2805
|
hasSecondaryAction: !Ie,
|
|
2807
2806
|
isOpen: t,
|
|
2808
|
-
isPrimaryDisabled: !
|
|
2807
|
+
isPrimaryDisabled: !me,
|
|
2809
2808
|
onClose: Ue,
|
|
2810
2809
|
onSecondaryAction: Nt,
|
|
2811
2810
|
primaryButtonProps: Kt,
|
|
2812
|
-
primaryText:
|
|
2811
|
+
primaryText: ge?.mainActionContent,
|
|
2813
2812
|
secondaryColor: "primary",
|
|
2814
2813
|
secondaryText: s.onboarding_back,
|
|
2815
2814
|
title: s.title,
|
|
@@ -2820,21 +2819,21 @@ const $o = ({ total: t }) => {
|
|
|
2820
2819
|
/* @__PURE__ */ e(Le, { children: s.onboarding_calculate_primary }),
|
|
2821
2820
|
/* @__PURE__ */ e(M, { sx: { textAlign: "center" }, variant: "subtitle1", children: s.onboarding_calculate_secondary })
|
|
2822
2821
|
] }),
|
|
2823
|
-
|
|
2822
|
+
ge && !z && /* @__PURE__ */ a(m.Fragment, { children: [
|
|
2824
2823
|
/* @__PURE__ */ e(
|
|
2825
2824
|
Br,
|
|
2826
2825
|
{
|
|
2827
2826
|
completeCopy: s.complete,
|
|
2828
|
-
primaryText:
|
|
2829
|
-
secondaryText:
|
|
2827
|
+
primaryText: ge.primaryText,
|
|
2828
|
+
secondaryText: ge.secondaryText,
|
|
2830
2829
|
value: $t
|
|
2831
2830
|
}
|
|
2832
2831
|
),
|
|
2833
2832
|
C.type === "main" && /* @__PURE__ */ a(k, { sx: { bgcolor: "background.default" }, children: [
|
|
2834
|
-
|
|
2833
|
+
ge.main,
|
|
2835
2834
|
Vt && /* @__PURE__ */ e(p, { sx: { alignItems: "center", px: 24, py: 12 }, children: /* @__PURE__ */ e(P, { fullWidth: !0, onClick: Gt, children: s.onboarding_do_it_later }) })
|
|
2836
2835
|
] }),
|
|
2837
|
-
C.type === "detail" &&
|
|
2836
|
+
C.type === "detail" && ge.detail
|
|
2838
2837
|
] })
|
|
2839
2838
|
] })
|
|
2840
2839
|
}
|
|
@@ -2848,8 +2847,8 @@ const $o = ({ total: t }) => {
|
|
|
2848
2847
|
}
|
|
2849
2848
|
)
|
|
2850
2849
|
] });
|
|
2851
|
-
}, Wr =
|
|
2852
|
-
const { finstrong: t } =
|
|
2850
|
+
}, Wr = w(Pr), $r = () => {
|
|
2851
|
+
const { finstrong: t } = x(), [o, n] = m.useState(!1);
|
|
2853
2852
|
return /* @__PURE__ */ a(m.Fragment, { children: [
|
|
2854
2853
|
/* @__PURE__ */ a(
|
|
2855
2854
|
p,
|
|
@@ -2876,8 +2875,8 @@ const $o = ({ total: t }) => {
|
|
|
2876
2875
|
/* @__PURE__ */ e(Wr, { isOpen: o, onClose: () => n(!1) })
|
|
2877
2876
|
] });
|
|
2878
2877
|
}, zr = ({ isOpen: t, onClose: o }) => {
|
|
2879
|
-
const { finstrong: n } =
|
|
2880
|
-
c(Math.floor(new Date(
|
|
2878
|
+
const { finstrong: n } = x(), r = G(), { updateUser: s, user: i } = ee(), [l, c] = m.useState(i.birthday), d = (u) => {
|
|
2879
|
+
c(Math.floor(new Date(u).getTime() / 1e3));
|
|
2881
2880
|
};
|
|
2882
2881
|
return /* @__PURE__ */ e(
|
|
2883
2882
|
oe,
|
|
@@ -2893,18 +2892,24 @@ const $o = ({ total: t }) => {
|
|
|
2893
2892
|
co,
|
|
2894
2893
|
{
|
|
2895
2894
|
disableFuture: !0,
|
|
2896
|
-
onChange:
|
|
2895
|
+
onChange: d,
|
|
2897
2896
|
slotProps: {
|
|
2898
2897
|
nextIconButton: {
|
|
2899
2898
|
sx: {
|
|
2900
2899
|
color: "primary.main",
|
|
2901
|
-
"&:hover": { bgcolor:
|
|
2900
|
+
"&:hover": { bgcolor: se(r.palette.primary.light, 0.1) }
|
|
2902
2901
|
}
|
|
2903
2902
|
},
|
|
2904
2903
|
previousIconButton: {
|
|
2905
2904
|
sx: {
|
|
2906
2905
|
color: "primary.main",
|
|
2907
|
-
"&:hover": { bgcolor:
|
|
2906
|
+
"&:hover": { bgcolor: se(r.palette.primary.light, 0.1) }
|
|
2907
|
+
}
|
|
2908
|
+
},
|
|
2909
|
+
switchViewButton: {
|
|
2910
|
+
sx: {
|
|
2911
|
+
color: "primary.main",
|
|
2912
|
+
"&:hover": { bgcolor: se(r.palette.primary.light, 0.1) }
|
|
2908
2913
|
}
|
|
2909
2914
|
}
|
|
2910
2915
|
},
|
|
@@ -2916,7 +2921,7 @@ const $o = ({ total: t }) => {
|
|
|
2916
2921
|
width: "100%",
|
|
2917
2922
|
"& .MuiIconButton-edgeEnd": {
|
|
2918
2923
|
color: "primary.main",
|
|
2919
|
-
"&:hover": { bgcolor:
|
|
2924
|
+
"&:hover": { bgcolor: se(r.palette.primary.light, 0.1) }
|
|
2920
2925
|
}
|
|
2921
2926
|
},
|
|
2922
2927
|
value: l ? new Date(l * 1e3) : /* @__PURE__ */ new Date()
|
|
@@ -2924,15 +2929,16 @@ const $o = ({ total: t }) => {
|
|
|
2924
2929
|
) }) })
|
|
2925
2930
|
}
|
|
2926
2931
|
);
|
|
2927
|
-
}, Er =
|
|
2932
|
+
}, Er = w(zr), Gr = ({ isOpen: t, onClose: o }) => {
|
|
2928
2933
|
const { visibleFinstrongAccounts: n } = Se(), {
|
|
2929
2934
|
accounts: r,
|
|
2930
2935
|
common: s,
|
|
2931
|
-
finstrong: i
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
+
finstrong: i,
|
|
2937
|
+
recurring: l
|
|
2938
|
+
} = x(), { repeatingTransactions: c } = Ke(), { user: d } = ee(), _ = c.reduce((v, f) => {
|
|
2939
|
+
const { repeating_transaction_type: D, transactions: C, recurrence_type: g, amount: b } = f;
|
|
2940
|
+
return D === kt.Income && (C.length > 0 || g === wt.EveryYear) ? v + b : v;
|
|
2941
|
+
}, 0), [u, h] = m.useState(null), S = [
|
|
2936
2942
|
{
|
|
2937
2943
|
dynamicCopy: i.add_profile_item,
|
|
2938
2944
|
fallbackLabel: i.monthly_income,
|
|
@@ -2947,7 +2953,7 @@ const $o = ({ total: t }) => {
|
|
|
2947
2953
|
icon: /* @__PURE__ */ e(un, {}),
|
|
2948
2954
|
key: ne.DateOfBirth,
|
|
2949
2955
|
label: i.date_of_birth,
|
|
2950
|
-
value:
|
|
2956
|
+
value: d.birthday
|
|
2951
2957
|
},
|
|
2952
2958
|
{
|
|
2953
2959
|
dynamicCopy: i.add_profile_item,
|
|
@@ -2955,7 +2961,7 @@ const $o = ({ total: t }) => {
|
|
|
2955
2961
|
icon: /* @__PURE__ */ e(Ge, {}),
|
|
2956
2962
|
key: ne.CreditScore,
|
|
2957
2963
|
label: i.credit_score,
|
|
2958
|
-
value:
|
|
2964
|
+
value: d.credit_score
|
|
2959
2965
|
},
|
|
2960
2966
|
{
|
|
2961
2967
|
fallbackLabel: i.connect_your_accounts,
|
|
@@ -2968,7 +2974,7 @@ const $o = ({ total: t }) => {
|
|
|
2968
2974
|
n.length > 1 ? i.accounts : i.account
|
|
2969
2975
|
) : void 0
|
|
2970
2976
|
}
|
|
2971
|
-
].map((
|
|
2977
|
+
].map((v) => Dn(v));
|
|
2972
2978
|
return /* @__PURE__ */ a(oe, { isOpen: t, onClose: o, title: i.financial_profile, children: [
|
|
2973
2979
|
/* @__PURE__ */ a(p, { sx: { bgcolor: "background.default", height: "100%" }, children: [
|
|
2974
2980
|
/* @__PURE__ */ a(p, { sx: { gap: 20, p: 24 }, children: [
|
|
@@ -2980,11 +2986,11 @@ const $o = ({ total: t }) => {
|
|
|
2980
2986
|
Wt,
|
|
2981
2987
|
{
|
|
2982
2988
|
completeCopy: i.complete,
|
|
2983
|
-
value:
|
|
2989
|
+
value: S.reduce((v, f) => v + (f.isComplete ? 1 : 0), 0)
|
|
2984
2990
|
}
|
|
2985
2991
|
)
|
|
2986
2992
|
] }),
|
|
2987
|
-
/* @__PURE__ */ e(In, { list:
|
|
2993
|
+
/* @__PURE__ */ e(In, { list: S, onClickItem: h }),
|
|
2988
2994
|
/* @__PURE__ */ e(k, { sx: { p: 24 }, children: /* @__PURE__ */ e(
|
|
2989
2995
|
Be,
|
|
2990
2996
|
{
|
|
@@ -2999,24 +3005,25 @@ const $o = ({ total: t }) => {
|
|
|
2999
3005
|
/* @__PURE__ */ e(
|
|
3000
3006
|
oe,
|
|
3001
3007
|
{
|
|
3002
|
-
isOpen:
|
|
3008
|
+
isOpen: u === ne.MonthlyIncome,
|
|
3003
3009
|
onClose: () => h(null),
|
|
3004
|
-
|
|
3010
|
+
shouldShowHeaderBorders: !1,
|
|
3011
|
+
title: l.action_title,
|
|
3005
3012
|
children: /* @__PURE__ */ e(lo, {})
|
|
3006
3013
|
}
|
|
3007
3014
|
),
|
|
3008
|
-
/* @__PURE__ */ e(Er, { isOpen:
|
|
3009
|
-
/* @__PURE__ */ e(Rt, { isOpen:
|
|
3015
|
+
/* @__PURE__ */ e(Er, { isOpen: u === ne.DateOfBirth, onClose: () => h(null) }),
|
|
3016
|
+
/* @__PURE__ */ e(Rt, { isOpen: u === ne.CreditScore, onClose: () => h(null) }),
|
|
3010
3017
|
/* @__PURE__ */ e(
|
|
3011
3018
|
ft,
|
|
3012
3019
|
{
|
|
3013
3020
|
onClose: () => h(null),
|
|
3014
|
-
showConnectionsWidget:
|
|
3021
|
+
showConnectionsWidget: u === ne.Connections,
|
|
3015
3022
|
title: r.manage_connections
|
|
3016
3023
|
}
|
|
3017
3024
|
)
|
|
3018
3025
|
] });
|
|
3019
|
-
}, Hr =
|
|
3026
|
+
}, Hr = w(Gr), st = ({
|
|
3020
3027
|
content: t,
|
|
3021
3028
|
islast: o = !1
|
|
3022
3029
|
}) => /* @__PURE__ */ a(uo, { sx: { minHeight: 0 }, children: [
|
|
@@ -3026,18 +3033,18 @@ const $o = ({ total: t }) => {
|
|
|
3026
3033
|
] }),
|
|
3027
3034
|
/* @__PURE__ */ e(yo, { sx: { pb: 16, pl: 12, pr: 0, pt: 5 }, children: /* @__PURE__ */ e(M, { fontSize: 13, fontWeight: 400, variant: "subtitle2", children: t }) })
|
|
3028
3035
|
] }), Nr = ({ report: t }) => {
|
|
3029
|
-
const { finstrong: o } =
|
|
3036
|
+
const { finstrong: o } = x(), { score_history_drawer_timeline: n } = o, {
|
|
3030
3037
|
health_score_point_difference: r,
|
|
3031
3038
|
newer_credit_score: s,
|
|
3032
3039
|
older_credit_score: i,
|
|
3033
3040
|
older_spend_to_income_ratio: l,
|
|
3034
3041
|
newer_spend_to_income_ratio: c,
|
|
3035
|
-
older_health_score:
|
|
3036
|
-
newer_health_score:
|
|
3037
|
-
newer_score_calculated_at:
|
|
3038
|
-
} = t,
|
|
3042
|
+
older_health_score: d,
|
|
3043
|
+
newer_health_score: _,
|
|
3044
|
+
newer_score_calculated_at: u
|
|
3045
|
+
} = t, h = _o(new Date(u), "MMM d"), y = () => r === 0 ? "info.lighter" : r > 0 ? "success.lighter" : "error.lighter", S = () => r === 0 ? j(n.stayed_at, d) : r > 0 ? n.less_spending : n.more_spending, v = () => {
|
|
3039
3046
|
if (r === 0) return null;
|
|
3040
|
-
const
|
|
3047
|
+
const f = r > 0 ? n.up_from : n.down_from, D = j(f, d, _);
|
|
3041
3048
|
return /* @__PURE__ */ a(E, { children: [
|
|
3042
3049
|
/* @__PURE__ */ e(
|
|
3043
3050
|
rn,
|
|
@@ -3081,11 +3088,11 @@ const $o = ({ total: t }) => {
|
|
|
3081
3088
|
}
|
|
3082
3089
|
),
|
|
3083
3090
|
/* @__PURE__ */ a(p, { sx: { gap: 2, width: "80%" }, children: [
|
|
3084
|
-
/* @__PURE__ */ e(I, { fontWeight: 600, variant: "Body", children:
|
|
3091
|
+
/* @__PURE__ */ e(I, { fontWeight: 600, variant: "Body", children: S() }),
|
|
3085
3092
|
/* @__PURE__ */ a(I, { sx: { color: "text.secondary" }, variant: "subtitle2", children: [
|
|
3086
|
-
|
|
3093
|
+
h,
|
|
3087
3094
|
" ",
|
|
3088
|
-
|
|
3095
|
+
v()
|
|
3089
3096
|
] })
|
|
3090
3097
|
] })
|
|
3091
3098
|
]
|
|
@@ -3130,10 +3137,10 @@ const $o = ({ total: t }) => {
|
|
|
3130
3137
|
}
|
|
3131
3138
|
) })
|
|
3132
3139
|
] });
|
|
3133
|
-
}, jr =
|
|
3134
|
-
const n = G(), { finstrong: r } =
|
|
3140
|
+
}, jr = w(Nr), Kr = ({ isOpen: t, onClose: o }) => {
|
|
3141
|
+
const n = G(), { finstrong: r } = x(), { isCopyLoaded: s, isInitialized: i } = U(), { augmentedChartData: l, healthScore: c, healthScoreChangeReports: d, peerScore: _ } = L();
|
|
3135
3142
|
if (!s || !i) return /* @__PURE__ */ e(te, {});
|
|
3136
|
-
const
|
|
3143
|
+
const u = He(c.health_score || 0, r), h = d.slice().reverse();
|
|
3137
3144
|
return /* @__PURE__ */ e(
|
|
3138
3145
|
Ft,
|
|
3139
3146
|
{
|
|
@@ -3149,7 +3156,7 @@ const $o = ({ total: t }) => {
|
|
|
3149
3156
|
isGraphClippingXAxis: !0,
|
|
3150
3157
|
labels: [r.key_indicators_label],
|
|
3151
3158
|
margin: { top: 24, bottom: 6, right: 24, left: -17 },
|
|
3152
|
-
peerAverage: Math.round(
|
|
3159
|
+
peerAverage: Math.round(_?.average_health_score?.average_health_score || 0),
|
|
3153
3160
|
showArea: !0,
|
|
3154
3161
|
showAverage: !0,
|
|
3155
3162
|
title: r.peer_average,
|
|
@@ -3182,16 +3189,16 @@ const $o = ({ total: t }) => {
|
|
|
3182
3189
|
}
|
|
3183
3190
|
),
|
|
3184
3191
|
/* @__PURE__ */ a(p, { sx: { gap: 4 }, children: [
|
|
3185
|
-
/* @__PURE__ */ e(M, { variant: "h3", children:
|
|
3186
|
-
/* @__PURE__ */ e(M, { variant: "XSmall", children:
|
|
3192
|
+
/* @__PURE__ */ e(M, { variant: "h3", children: u.status }),
|
|
3193
|
+
/* @__PURE__ */ e(M, { variant: "XSmall", children: u.description })
|
|
3187
3194
|
] })
|
|
3188
3195
|
] })
|
|
3189
3196
|
}
|
|
3190
3197
|
),
|
|
3191
|
-
children: /* @__PURE__ */ e(p, { sx: { gap: 16 }, children:
|
|
3198
|
+
children: /* @__PURE__ */ e(p, { sx: { gap: 16 }, children: h.map((y, S) => /* @__PURE__ */ e(jr, { report: y }, S)) })
|
|
3192
3199
|
}
|
|
3193
3200
|
);
|
|
3194
|
-
}, Vr =
|
|
3201
|
+
}, Vr = w(Kr), Xr = ({ copy: t }) => {
|
|
3195
3202
|
const o = G(), n = [
|
|
3196
3203
|
o.palette.chartMono.chartMono5,
|
|
3197
3204
|
o.palette.chartMono.chartMono4,
|
|
@@ -3252,7 +3259,7 @@ const $o = ({ total: t }) => {
|
|
|
3252
3259
|
] })
|
|
3253
3260
|
] });
|
|
3254
3261
|
}, Yr = ({ isOpen: t, onClose: o }) => {
|
|
3255
|
-
const { finstrong: n } =
|
|
3262
|
+
const { finstrong: n } = x(), { isCopyLoaded: r } = U();
|
|
3256
3263
|
return r ? /* @__PURE__ */ e(oe, { isOpen: t, onClose: o, title: n.score_rubric, children: /* @__PURE__ */ a(p, { sx: { bgcolor: "background.default", gap: 36, height: "100%", p: 24 }, children: [
|
|
3257
3264
|
/* @__PURE__ */ a(p, { sx: { gap: 20 }, children: [
|
|
3258
3265
|
/* @__PURE__ */ a(p, { sx: { gap: 8 }, children: [
|
|
@@ -3283,15 +3290,15 @@ const $o = ({ total: t }) => {
|
|
|
3283
3290
|
}
|
|
3284
3291
|
},
|
|
3285
3292
|
children: [
|
|
3286
|
-
/* @__PURE__ */ e(
|
|
3287
|
-
|
|
3293
|
+
/* @__PURE__ */ e(be, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(
|
|
3294
|
+
fe,
|
|
3288
3295
|
{
|
|
3289
3296
|
primary: n.understand_your_habits,
|
|
3290
3297
|
secondary: n.understand_your_habits_description
|
|
3291
3298
|
}
|
|
3292
3299
|
) }),
|
|
3293
|
-
/* @__PURE__ */ e(
|
|
3294
|
-
|
|
3300
|
+
/* @__PURE__ */ e(be, { sx: { display: "list-item", pt: 16 }, children: /* @__PURE__ */ e(
|
|
3301
|
+
fe,
|
|
3295
3302
|
{
|
|
3296
3303
|
primary: n.see_whats_possible,
|
|
3297
3304
|
secondary: n.see_whats_possible_description
|
|
@@ -3324,15 +3331,15 @@ const $o = ({ total: t }) => {
|
|
|
3324
3331
|
}
|
|
3325
3332
|
},
|
|
3326
3333
|
children: [
|
|
3327
|
-
/* @__PURE__ */ e(
|
|
3328
|
-
/* @__PURE__ */ e(
|
|
3334
|
+
/* @__PURE__ */ e(be, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(fe, { secondary: n.we_ask_questions_description_1 }) }),
|
|
3335
|
+
/* @__PURE__ */ e(be, { sx: { display: "list-item" }, children: /* @__PURE__ */ e(fe, { secondary: n.we_ask_questions_description_2 }) })
|
|
3329
3336
|
]
|
|
3330
3337
|
}
|
|
3331
3338
|
)
|
|
3332
3339
|
] })
|
|
3333
3340
|
] }) }) : /* @__PURE__ */ e(te, {});
|
|
3334
|
-
}, qr =
|
|
3335
|
-
const [t, o] = m.useState(!1), n = G(), [r, { width: s }] = St(), { finstrong: i } =
|
|
3341
|
+
}, qr = w(Yr), Ur = w(() => {
|
|
3342
|
+
const [t, o] = m.useState(!1), n = G(), [r, { width: s }] = St(), { finstrong: i } = x(), { isCopyLoaded: l, isInitialized: c } = U(), { healthScore: d, healthScoreChange: _ } = L(), u = n.palette.mode === "dark", h = He(d?.health_score, i);
|
|
3336
3343
|
return !l || !c ? /* @__PURE__ */ e(te, {}) : /* @__PURE__ */ a(V, { ref: r, sx: { p: 16, display: "flex", flexDirection: "column", gap: 8 }, children: [
|
|
3337
3344
|
/* @__PURE__ */ e(
|
|
3338
3345
|
vo,
|
|
@@ -3365,17 +3372,17 @@ const $o = ({ total: t }) => {
|
|
|
3365
3372
|
Ot,
|
|
3366
3373
|
{
|
|
3367
3374
|
arcRadius: s <= 323 ? 72.5 : 154,
|
|
3368
|
-
footerCenterContent:
|
|
3369
|
-
healthScore:
|
|
3375
|
+
footerCenterContent: _,
|
|
3376
|
+
healthScore: d?.health_score || 0,
|
|
3370
3377
|
size: s <= 323 ? "M" : "L"
|
|
3371
3378
|
}
|
|
3372
3379
|
) }),
|
|
3373
|
-
|
|
3380
|
+
d?.health_score ? /* @__PURE__ */ a(
|
|
3374
3381
|
xo,
|
|
3375
3382
|
{
|
|
3376
3383
|
sx: {
|
|
3377
3384
|
px: 16,
|
|
3378
|
-
backgroundColor:
|
|
3385
|
+
backgroundColor: u ? "grey.800" : "grey.50",
|
|
3379
3386
|
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3380
3387
|
"&.Mui-expanded": {
|
|
3381
3388
|
m: 0
|
|
@@ -3399,7 +3406,7 @@ const $o = ({ total: t }) => {
|
|
|
3399
3406
|
children: /* @__PURE__ */ e(M, { sx: { fontWeight: 600 }, variant: "body1", children: i.accordion_title_text })
|
|
3400
3407
|
}
|
|
3401
3408
|
),
|
|
3402
|
-
/* @__PURE__ */ e(So, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(M, { variant: "subtitle1", children:
|
|
3409
|
+
/* @__PURE__ */ e(So, { sx: { "&.MuiAccordionDetails-root": { padding: 0, pb: 16 } }, children: /* @__PURE__ */ e(M, { variant: "subtitle1", children: h.scoreContent }) })
|
|
3403
3410
|
]
|
|
3404
3411
|
}
|
|
3405
3412
|
) : /* @__PURE__ */ e(
|
|
@@ -3411,7 +3418,7 @@ const $o = ({ total: t }) => {
|
|
|
3411
3418
|
hasIcon: !1,
|
|
3412
3419
|
isDashboard: !0,
|
|
3413
3420
|
sx: {
|
|
3414
|
-
backgroundColor:
|
|
3421
|
+
backgroundColor: u ? "grey.800" : "grey.50",
|
|
3415
3422
|
//TODO: Need to change the background color to palette (supporting both darkmode and lightmode)
|
|
3416
3423
|
".connect-more-accounts-title": {
|
|
3417
3424
|
fontWeight: 600,
|
|
@@ -3432,29 +3439,29 @@ const $o = ({ total: t }) => {
|
|
|
3432
3439
|
)
|
|
3433
3440
|
] });
|
|
3434
3441
|
}), Qr = ({ onBackClick: t, sx: o, onPrimaryCtaClick: n }) => {
|
|
3435
|
-
const { visibleAccounts: r } = Se(), { dateRange: s, isDataLoaded: i, loadBudgetData: l, setTheme: c } = Rn(), { reloadCategoryTotals:
|
|
3436
|
-
augmentedChartData:
|
|
3437
|
-
calculateHealthScore:
|
|
3442
|
+
const { visibleAccounts: r } = Se(), { dateRange: s, isDataLoaded: i, loadBudgetData: l, setTheme: c } = Rn(), { reloadCategoryTotals: d } = je(), _ = L(), {
|
|
3443
|
+
augmentedChartData: u,
|
|
3444
|
+
calculateHealthScore: h,
|
|
3438
3445
|
healthScore: y,
|
|
3439
|
-
loadAugmentedChartData:
|
|
3440
|
-
loadMonthlySummaries:
|
|
3441
|
-
loadPeerScore:
|
|
3446
|
+
loadAugmentedChartData: S,
|
|
3447
|
+
loadMonthlySummaries: v,
|
|
3448
|
+
loadPeerScore: f,
|
|
3442
3449
|
peerScore: D
|
|
3443
|
-
} =
|
|
3450
|
+
} = _, { finstrong: C, connect: g } = x(), { isCopyLoaded: b, isInitialized: R } = U(), { loadRepeatingTransactions: B } = Ke(), { isSmallMobile: Y } = Ye(), T = G(), { userProfile: $ } = ee(), [z, _e] = m.useState(!1), [ve, Q] = m.useState(!1), [X, he] = m.useState(!1), [H, ue] = m.useState(!1);
|
|
3444
3451
|
if (wo({
|
|
3445
3452
|
widgetName: "FinstrongWidget",
|
|
3446
3453
|
isLoaded: z
|
|
3447
3454
|
}), m.useEffect(() => {
|
|
3448
3455
|
c(T);
|
|
3449
3456
|
}, []), m.useEffect(() => {
|
|
3450
|
-
n && (
|
|
3451
|
-
}, [n,
|
|
3452
|
-
|
|
3453
|
-
}, [
|
|
3454
|
-
|
|
3455
|
-
|
|
3457
|
+
n && (_.handleFinstrongWidgetPrimaryCtaClick = n);
|
|
3458
|
+
}, [n, _]), m.useEffect(() => {
|
|
3459
|
+
R && (v().finally(), f().finally(), h().finally(), S().finally());
|
|
3460
|
+
}, [R]), m.useEffect(() => {
|
|
3461
|
+
R && (d(r, s.start, s.end).finally(() => {
|
|
3462
|
+
_e(!0);
|
|
3456
3463
|
}), i || (l(), B().finally()));
|
|
3457
|
-
}, [s, i,
|
|
3464
|
+
}, [s, i, R, r]), !b || !R || !z) return /* @__PURE__ */ e(te, {});
|
|
3458
3465
|
const N = () => Q(!0), ae = Math.round(D?.average_health_score?.average_health_score || 0);
|
|
3459
3466
|
return /* @__PURE__ */ a(
|
|
3460
3467
|
ko,
|
|
@@ -3506,7 +3513,7 @@ const $o = ({ total: t }) => {
|
|
|
3506
3513
|
P,
|
|
3507
3514
|
{
|
|
3508
3515
|
endIcon: /* @__PURE__ */ e(J, {}),
|
|
3509
|
-
onClick: () =>
|
|
3516
|
+
onClick: () => he(!0),
|
|
3510
3517
|
size: "small",
|
|
3511
3518
|
variant: "text",
|
|
3512
3519
|
children: /* @__PURE__ */ e(I, { bold: !0, sx: { flexShrink: 0 }, variant: "body2", children: C.whats_changed })
|
|
@@ -3515,7 +3522,7 @@ const $o = ({ total: t }) => {
|
|
|
3515
3522
|
]
|
|
3516
3523
|
}
|
|
3517
3524
|
),
|
|
3518
|
-
|
|
3525
|
+
u.length ? /* @__PURE__ */ e(
|
|
3519
3526
|
Ve,
|
|
3520
3527
|
{
|
|
3521
3528
|
axisColor: T.palette.divider,
|
|
@@ -3525,7 +3532,7 @@ const $o = ({ total: t }) => {
|
|
|
3525
3532
|
customLegendBoxSx: { borderRadius: "2px" },
|
|
3526
3533
|
customLegendSx: { left: 0 },
|
|
3527
3534
|
customLegendVariant: "XSmall",
|
|
3528
|
-
datasets: [
|
|
3535
|
+
datasets: [u],
|
|
3529
3536
|
height: 300,
|
|
3530
3537
|
isGraphClippingXAxis: !0,
|
|
3531
3538
|
labelBackgroundColor: T.palette.border.dark,
|
|
@@ -3543,7 +3550,7 @@ const $o = ({ total: t }) => {
|
|
|
3543
3550
|
useCustomMark: !0,
|
|
3544
3551
|
xAxisScaleType: "band"
|
|
3545
3552
|
}
|
|
3546
|
-
) : /* @__PURE__ */ e(Ir, { onClick: () =>
|
|
3553
|
+
) : /* @__PURE__ */ e(Ir, { onClick: () => ue(!0) }),
|
|
3547
3554
|
y.health_score !== null && /* @__PURE__ */ e(Mr, {})
|
|
3548
3555
|
] }) })
|
|
3549
3556
|
]
|
|
@@ -3553,7 +3560,7 @@ const $o = ({ total: t }) => {
|
|
|
3553
3560
|
/* @__PURE__ */ e(
|
|
3554
3561
|
re,
|
|
3555
3562
|
{
|
|
3556
|
-
onClose: () =>
|
|
3563
|
+
onClose: () => ue(!1),
|
|
3557
3564
|
showConnectWidget: H,
|
|
3558
3565
|
title: g.mini_title
|
|
3559
3566
|
}
|
|
@@ -3562,13 +3569,13 @@ const $o = ({ total: t }) => {
|
|
|
3562
3569
|
Vr,
|
|
3563
3570
|
{
|
|
3564
3571
|
isOpen: X,
|
|
3565
|
-
onClose: () =>
|
|
3572
|
+
onClose: () => he(!1)
|
|
3566
3573
|
}
|
|
3567
3574
|
)
|
|
3568
3575
|
]
|
|
3569
3576
|
}
|
|
3570
3577
|
);
|
|
3571
|
-
}, mi =
|
|
3578
|
+
}, mi = w(Qr);
|
|
3572
3579
|
export {
|
|
3573
3580
|
Do as CreditScoreGraph,
|
|
3574
3581
|
Tt as DialScoreCard,
|