@mx-cartographer/experiences 7.0.23-alpha.al0 → 7.0.23-alpha.al10
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/dist/{Account-BW3-oYEs.mjs → Account-CVVDlNDC.mjs} +1 -1
- package/dist/{AccountDetailsContent-UxSEMBo_.mjs → AccountDetailsContent-bQKVSCZF.mjs} +8 -8
- package/dist/{AccountDetailsHeader-Eb3WvBGm.mjs → AccountDetailsHeader-BGQAu0Xm.mjs} +8 -8
- package/dist/{AccountFields-CIz-r3gP.mjs → AccountFields-CC7kzfPK.mjs} +2 -2
- package/dist/{AccountListItem-B-ZjJ4Gp.mjs → AccountListItem-wgvQjLxW.mjs} +3 -3
- package/dist/{AccountStore-BaMynkQT.mjs → AccountStore-DpglOysH.mjs} +19 -19
- package/dist/{Accounts-CA-nqAjT.mjs → Accounts-ByViymVi.mjs} +1 -1
- package/dist/{BudgetUtil-CeSLAcsl.mjs → BudgetUtil-gzgNEDE7.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-BJ9jlCyt.mjs → CategorySelectorDrawer-LpZcwQPa.mjs} +4 -4
- package/dist/{ConnectDrawer-phFH6OHt.mjs → ConnectDrawer-C2minBK_.mjs} +1 -1
- package/dist/{ConnectionsDrawer-ihxkAi1P.mjs → ConnectionsDrawer-Cd4dZuWL.mjs} +2 -2
- package/dist/{CurrencyInput-bEx2Mbd0.mjs → CurrencyInput-Dz4r9Rfe.mjs} +1 -1
- package/dist/{DebtsStore-VkyMADzd.mjs → DebtsStore-B51DTXVj.mjs} +1 -1
- package/dist/{GoalStore-eSOkI6uE.mjs → GoalStore-DqQ2FMx5.mjs} +2 -2
- package/dist/{Help-KAAMEubC.mjs → Help-DVPbIxMM.mjs} +1 -1
- package/dist/{LineChart-BWWmmJxV.mjs → LineChart-DLk-bww5.mjs} +1 -1
- package/dist/{ListItemAction-DNZZ5fSa.mjs → ListItemAction-DE6S0N5o.mjs} +1 -1
- package/dist/{ManageIncome-DbsiKUoO.mjs → ManageIncome-BokhnWOn.mjs} +4 -4
- package/dist/{MicroWidgetContainer-Dxz8uBN9.mjs → MicroWidgetContainer-5YscP1xa.mjs} +1 -1
- package/dist/{MiniWidgetContainer-CTyjmE1h.mjs → MiniWidgetContainer-BlsgwNew.mjs} +1 -1
- package/dist/{NetWorthStore-B6xF9eGH.mjs → NetWorthStore-C0hQSRzt.mjs} +2 -2
- package/dist/{NotificationSettings-BJFyyZYE.mjs → NotificationSettings-CWx6H-2z.mjs} +2 -2
- package/dist/{OriginalBalanceAction-DepsKiJz.mjs → OriginalBalanceAction-BKsSQVnI.mjs} +3 -3
- package/dist/{RecurringSettings-Dj29piAQ.mjs → RecurringSettings-CICRt51C.mjs} +3 -3
- package/dist/{TransactionDetails-C-z3HGTT.mjs → TransactionDetails-BXl0m15s.mjs} +37 -37
- package/dist/{TransactionStore-0tLtBEIC.mjs → TransactionStore-BElBVYfk.mjs} +248 -209
- package/dist/TrendsStore-DRuzsVVE.mjs +505 -0
- package/dist/TrendsWidget-CRi8EO04.mjs +6 -0
- package/dist/{User-Dq9Qj764.mjs → User-DtwqVm3K.mjs} +1 -1
- package/dist/{WidgetContainer-CdBs9WOZ.mjs → WidgetContainer-DK8aZO5l.mjs} +2 -2
- package/dist/accounts/index.es.js +12 -12
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +10 -10
- package/dist/cashflow/index.es.js +7 -7
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +577 -518
- package/dist/dashboard/index.es.js +9 -9
- package/dist/debts/index.es.js +9 -9
- package/dist/{exportTransactionsToCSV-BDlt8u0n.mjs → exportTransactionsToCSV-Cf5VRYVr.mjs} +1 -1
- package/dist/finstrong/index.es.js +6 -6
- package/dist/goals/index.es.js +11 -11
- package/dist/help/index.es.js +3 -3
- package/dist/{hooks-DkUqN6JE.mjs → hooks-DUeXom8C.mjs} +13 -13
- package/dist/investments/index.es.js +3 -3
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1969 -14
- package/dist/networth/index.es.js +7 -7
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +8 -8
- package/dist/settings/index.es.js +24 -24
- package/dist/spending/index.es.js +21 -21
- package/dist/transactions/index.es.js +270 -259
- package/dist/trends/index.es.js +407 -780
- package/package.json +1 -1
- package/dist/ExportCsvAction-CbMfQ2Wa.mjs +0 -24
- package/dist/ResponsiveButton-DZFp78fJ.mjs +0 -45
- package/dist/TrendsStore-WrHxzdbQ.mjs +0 -565
- package/dist/ViewMoreMicroCard-DFAY0tA8.mjs +0 -1974
package/dist/common/index.es.js
CHANGED
|
@@ -1,79 +1,83 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import { A as
|
|
1
|
+
import { G as $ } from "../useCombineEvents-DaDBSR_1.mjs";
|
|
2
|
+
import { A as us, a as hs, u as gs, b as ps } from "../useCombineEvents-DaDBSR_1.mjs";
|
|
3
3
|
import { F as y, A as l } from "../Fetch-CkFKy79O.mjs";
|
|
4
|
-
import { B as
|
|
5
|
-
import { C as
|
|
6
|
-
import { a as
|
|
7
|
-
import { N as
|
|
8
|
-
import { a as
|
|
9
|
-
import { T as
|
|
10
|
-
import { C as
|
|
11
|
-
import { H as
|
|
12
|
-
import { E as
|
|
13
|
-
import { M as
|
|
14
|
-
import { M as
|
|
15
|
-
import { A as
|
|
16
|
-
import { i as
|
|
17
|
-
import { C as
|
|
18
|
-
import { L as
|
|
19
|
-
import {
|
|
20
|
-
import { S as
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { C as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import { useTokens as x, Text as
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import { S as
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import { a as
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
|
|
76
|
-
|
|
4
|
+
import { B as _s } from "../BeatApi-DLu87ijw.mjs";
|
|
5
|
+
import { C as at } from "../CategoryStore-BOyzQjQp.mjs";
|
|
6
|
+
import { a as fs } from "../CategoryStore-BOyzQjQp.mjs";
|
|
7
|
+
import { N as ot } from "../NotificationStore-DHtSGySy.mjs";
|
|
8
|
+
import { a as bs } from "../NotificationStore-DHtSGySy.mjs";
|
|
9
|
+
import { T as nt } from "../User-DtwqVm3K.mjs";
|
|
10
|
+
import { C as xs, b as Cs, L as Ds, a as vs } from "../User-DtwqVm3K.mjs";
|
|
11
|
+
import { H as it } from "../Help-DhcC-C05.mjs";
|
|
12
|
+
import { E as Es } from "../Help-DhcC-C05.mjs";
|
|
13
|
+
import { M as Is } from "../MicroWidgetContainer-5YscP1xa.mjs";
|
|
14
|
+
import { M as Ns } from "../MiniWidgetContainer-BlsgwNew.mjs";
|
|
15
|
+
import { A as Ms, D as $s, W as Ls } from "../WidgetContainer-DK8aZO5l.mjs";
|
|
16
|
+
import { i as ks, a as Us, e as Os, l as Gs, A as Hs, f as Ps, j as Ws, d as qs, k as Qs, E as Ys, h as zs, N as Xs, g as Ks, P as js, m as Vs, S as Zs } from "../ConnectDrawer-C2minBK_.mjs";
|
|
17
|
+
import { C as tr } from "../CurrencyInput-Dz4r9Rfe.mjs";
|
|
18
|
+
import { L as sr } from "../Loader-DUaFpDGv.mjs";
|
|
19
|
+
import { T as ct } from "../TransactionStore-BElBVYfk.mjs";
|
|
20
|
+
import { R as ar, S as or } from "../TransactionStore-BElBVYfk.mjs";
|
|
21
|
+
import { S as ir } from "../SearchBox-B2_zLv8-.mjs";
|
|
22
|
+
import { T as dr } from "../TabContentContainer-j01JYR_7.mjs";
|
|
23
|
+
import { I as ur } from "../IconBacking-B9oC6uL2.mjs";
|
|
24
|
+
import { D as gr, F as pr, a as mr, c as _r, R as yr, S as fr } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
25
|
+
import { C as dt } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
26
|
+
import { I as br } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
27
|
+
import { d as lt } from "../GoalStore-DqQ2FMx5.mjs";
|
|
28
|
+
import { C as xr, G as Cr, M as Dr, T as vr } from "../GoalStore-DqQ2FMx5.mjs";
|
|
29
|
+
import { C as Er } from "../CurrencyText-YUhH2caW.mjs";
|
|
30
|
+
import { E as Ir } from "../EmptyState-C0lr9E5T.mjs";
|
|
31
|
+
import { L as Nr } from "../ListItemAction-DE6S0N5o.mjs";
|
|
32
|
+
import { jsxs as h, jsx as o } from "react/jsx-runtime";
|
|
33
|
+
import tt, { useRef as ut, useEffect as ht } from "react";
|
|
34
|
+
import gt from "@mui/material/ListItem";
|
|
35
|
+
import pt from "@mui/material/ListItemButton";
|
|
36
|
+
import O from "@mui/material/ListItemIcon";
|
|
37
|
+
import mt from "@mui/material/ListItemText";
|
|
38
|
+
import T from "@mui/material/Stack";
|
|
39
|
+
import { useTokens as x, Text as S } from "@mxenabled/mxui";
|
|
40
|
+
import { A as Mr, B as $r, I as Lr, N as Rr, T as kr, a as Ur } from "../Notification-ByMBpJ5u.mjs";
|
|
41
|
+
import { css as C, keyframes as _t } from "@mxenabled/cssinjs";
|
|
42
|
+
import { D as Gr } from "../Donut-1UMNcG67.mjs";
|
|
43
|
+
import { L as Pr } from "../LineChart-DLk-bww5.mjs";
|
|
44
|
+
import { T as yt } from "../TrendsStore-DRuzsVVE.mjs";
|
|
45
|
+
import { S as qr, u as Qr } from "../TrendsStore-DRuzsVVE.mjs";
|
|
46
|
+
import { S as zr } from "../StatusBar-BK_uYHAB.mjs";
|
|
47
|
+
import { D as Kr, a as jr, O as Vr, b as Zr, f as Jr } from "../Dialog-CWW597AF.mjs";
|
|
48
|
+
import { D as ft, a as St } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
49
|
+
import { S as ea } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
50
|
+
import { D as ra } from "../Drawer-kEE73B87.mjs";
|
|
51
|
+
import { I as oa, P as na, S as ia } from "../Account-CVVDlNDC.mjs";
|
|
52
|
+
import { b as I } from "../Category-CevNQ03n.mjs";
|
|
53
|
+
import { C as da, c as la, a as ua, P as ha } from "../Category-CevNQ03n.mjs";
|
|
54
|
+
import { C as pa, f as ma, b as _a, a as ya, g as fa, i as Sa } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
55
|
+
import { R as bt } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
56
|
+
import { S as wa, T as xa } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
57
|
+
import { G as Da, A as va, B as Aa, W as Ea, c as Ta, l as Ia, e as Ba, v as Na, j as Fa, x as Ma, g as $a, w as La, u as Ra, k as ka, a as Ua, i as Oa, y as Ga, t as Ha, b as Pa, q as Wa, m as qa, z as Qa, f as Ya, r as za, n as Xa, s as Ka, o as ja, p as Va } from "../hooks-DUeXom8C.mjs";
|
|
58
|
+
import { u as Ja } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
59
|
+
import { makeAutoObservable as _, runInAction as m, reaction as wt } from "mobx";
|
|
60
|
+
import { a as xt } from "../AccountStore-DpglOysH.mjs";
|
|
61
|
+
import Ct from "posthog-js";
|
|
62
|
+
import { B as Dt } from "../BeatStore-By4aGoRM.mjs";
|
|
63
|
+
import { endOfMonth as et } from "date-fns/endOfMonth";
|
|
64
|
+
import { startOfMonth as st } from "date-fns/startOfMonth";
|
|
65
|
+
import { startOfToday as G } from "date-fns/startOfToday";
|
|
66
|
+
import { f as vt, a as At, b as H } from "../BudgetUtil-gzgNEDE7.mjs";
|
|
67
|
+
import { g as eo, e as so, c as ro, d as ao, i as oo } from "../BudgetUtil-gzgNEDE7.mjs";
|
|
68
|
+
import { a as Et } from "../DebtsStore-B51DTXVj.mjs";
|
|
69
|
+
import { a as Tt } from "../FinstrongStore-mkALvztw.mjs";
|
|
70
|
+
import { A as It, m as Bt, a as Nt, b as Ft } from "../InvestmentUtil-jOyOgzIB.mjs";
|
|
71
|
+
import { M as Mt } from "../MerchantStore-DVH-QOf0.mjs";
|
|
72
|
+
import { N as $t } from "../NetWorthStore-C0hQSRzt.mjs";
|
|
73
|
+
import { a as Lt } from "../SettingsStore-B4gi6oOw.mjs";
|
|
74
|
+
import { addMonths as Rt } from "date-fns/addMonths";
|
|
75
|
+
import { getMonth as B } from "date-fns/getMonth";
|
|
76
|
+
import { i as io } from "../DateUtil-BcuH7ErC.mjs";
|
|
77
|
+
import { b as lo, a as uo, g as ho } from "../Localization-2MODESHW.mjs";
|
|
78
|
+
import { alpha as kt, lighten as P, darken as W } from "@mui/material";
|
|
79
|
+
var Ut = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.EveryWeek = 1] = "EveryWeek", s[s.EveryOtherWeek = 2] = "EveryOtherWeek", s[s.EveryMonth = 3] = "EveryMonth", s[s.EveryOtherMonth = 4] = "EveryOtherMonth", s[s.EveryQuarter = 5] = "EveryQuarter", s[s.EveryOtherQuarter = 6] = "EveryOtherQuarter", s[s.EveryYear = 7] = "EveryYear", s))(Ut || {});
|
|
80
|
+
const Je = [
|
|
77
81
|
{ id: 0, copy: "frequency_unknown" },
|
|
78
82
|
{ id: 1, copy: "frequency_every_week" },
|
|
79
83
|
{ id: 2, copy: "frequency_every_other_week" },
|
|
@@ -82,43 +86,43 @@ const qe = [
|
|
|
82
86
|
{ id: 5, copy: "frequency_every_quarter" },
|
|
83
87
|
{ id: 6, copy: "frequency_every_other_quarter" },
|
|
84
88
|
{ id: 7, copy: "frequency_every_year" }
|
|
85
|
-
],
|
|
89
|
+
], ts = {
|
|
86
90
|
ERROR: "ERROR",
|
|
87
91
|
LOADING: "LOADING",
|
|
88
92
|
SUCCESS: "SUCCESS"
|
|
89
93
|
};
|
|
90
|
-
var
|
|
91
|
-
const
|
|
92
|
-
const e = s.palette.mode === "dark",
|
|
93
|
-
const
|
|
94
|
+
var Ot = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))(Ot || {}), Gt = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))(Gt || {});
|
|
95
|
+
const es = (s, t) => {
|
|
96
|
+
const e = s.palette.mode === "dark", r = (d, c) => {
|
|
97
|
+
const i = t?.[d];
|
|
94
98
|
return {
|
|
95
|
-
lighter:
|
|
96
|
-
light:
|
|
97
|
-
main:
|
|
98
|
-
dark:
|
|
99
|
-
darker:
|
|
99
|
+
lighter: i ? P(i, 0.5) : c.lighter,
|
|
100
|
+
light: i ? P(i, 0.25) : c.light,
|
|
101
|
+
main: i || c.main,
|
|
102
|
+
dark: i ? W(i, 0.25) : c.dark,
|
|
103
|
+
darker: i ? W(i, 0.5) : c.darker
|
|
100
104
|
};
|
|
101
|
-
},
|
|
102
|
-
primary:
|
|
103
|
-
secondary:
|
|
104
|
-
error:
|
|
105
|
-
warning:
|
|
106
|
-
info:
|
|
107
|
-
success:
|
|
108
|
-
},
|
|
105
|
+
}, a = {
|
|
106
|
+
primary: r(e ? "primary_color_dark" : "primary_color", s.palette.primary),
|
|
107
|
+
secondary: r(e ? "neutral_color_dark" : "neutral_color", s.palette.secondary),
|
|
108
|
+
error: r(e ? "error_color_dark" : "error_color", s.palette.error),
|
|
109
|
+
warning: r(e ? "warning_color_dark" : "warning_color", s.palette.warning),
|
|
110
|
+
info: r(e ? "info_color_dark" : "info_color", s.palette.info),
|
|
111
|
+
success: r(e ? "success_color_dark" : "success_color", s.palette.success)
|
|
112
|
+
}, n = {
|
|
109
113
|
MuiTabs: {
|
|
110
114
|
styleOverrides: {
|
|
111
115
|
indicator: {
|
|
112
|
-
backgroundColor:
|
|
116
|
+
backgroundColor: a.primary.light
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
119
|
},
|
|
116
120
|
MuiPickersCalendarHeader: {
|
|
117
121
|
styleOverrides: {
|
|
118
122
|
switchViewButton: {
|
|
119
|
-
color:
|
|
123
|
+
color: a.primary.lighter,
|
|
120
124
|
"&:hover": {
|
|
121
|
-
backgroundColor:
|
|
125
|
+
backgroundColor: kt(a.primary.light, 0.1)
|
|
122
126
|
}
|
|
123
127
|
}
|
|
124
128
|
}
|
|
@@ -213,14 +217,14 @@ const Qe = (s, t) => {
|
|
|
213
217
|
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
214
218
|
}
|
|
215
219
|
},
|
|
216
|
-
palette:
|
|
217
|
-
components:
|
|
220
|
+
palette: a,
|
|
221
|
+
components: n,
|
|
218
222
|
shape: {
|
|
219
223
|
borderRadius: t?.button_corner_radius ?? s.shape.borderRadius
|
|
220
224
|
}
|
|
221
225
|
};
|
|
222
226
|
};
|
|
223
|
-
class
|
|
227
|
+
class q {
|
|
224
228
|
fetchInstance;
|
|
225
229
|
constructor(t) {
|
|
226
230
|
this.fetchInstance = new y(t, "", {
|
|
@@ -231,13 +235,13 @@ class P {
|
|
|
231
235
|
getBanner = async (t) => {
|
|
232
236
|
try {
|
|
233
237
|
const e = `/banner/${t}/account_widget_banner`;
|
|
234
|
-
return this.fetchInstance?.get(e).then((
|
|
238
|
+
return this.fetchInstance?.get(e).then((r) => r.banner) ?? {};
|
|
235
239
|
} catch (e) {
|
|
236
240
|
return console.error("Error fetching banner:", e), null;
|
|
237
241
|
}
|
|
238
242
|
};
|
|
239
243
|
}
|
|
240
|
-
class
|
|
244
|
+
class ss {
|
|
241
245
|
fetchInstance;
|
|
242
246
|
constructor(t, e) {
|
|
243
247
|
this.fetchInstance = new y(t, e);
|
|
@@ -245,7 +249,7 @@ class Ye {
|
|
|
245
249
|
getLocalizedCopy = async (t) => this.fetchInstance.post(l.LOCALIZED_COPY, t).then((e) => e);
|
|
246
250
|
getLocalizedContent = async (t) => this.fetchInstance.post(`${l.LOCALIZED_CONTENT}/${t}`).then((e) => e);
|
|
247
251
|
}
|
|
248
|
-
class
|
|
252
|
+
class rs {
|
|
249
253
|
fetchInstance;
|
|
250
254
|
constructor(t, e) {
|
|
251
255
|
this.fetchInstance = new y(t, e);
|
|
@@ -253,13 +257,13 @@ class ze {
|
|
|
253
257
|
addScheduledPayment = async (t) => this.fetchInstance.post(l.SCHEDULED_PAYMENTS, {
|
|
254
258
|
...t,
|
|
255
259
|
is_recurring: "true",
|
|
256
|
-
transaction_type:
|
|
260
|
+
transaction_type: nt.DEBIT
|
|
257
261
|
}).then((e) => e.scheduled_payment);
|
|
258
262
|
getScheduledPayments = async () => this.fetchInstance.get(l.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
|
|
259
263
|
updateScheduledPayment = async (t) => this.fetchInstance.put(`${l.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
|
|
260
264
|
deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${l.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
|
|
261
265
|
}
|
|
262
|
-
class
|
|
266
|
+
class L {
|
|
263
267
|
fetchInstance;
|
|
264
268
|
constructor(t, e) {
|
|
265
269
|
this.fetchInstance = new y(t, e);
|
|
@@ -268,31 +272,31 @@ class $ {
|
|
|
268
272
|
updateUser = async (t) => this.fetchInstance.put(l.USER, t).then((e) => e.user);
|
|
269
273
|
updateUserProfile = async (t) => this.fetchInstance.put(`${l.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
|
|
270
274
|
}
|
|
271
|
-
class
|
|
275
|
+
class Q {
|
|
272
276
|
fetchInstance;
|
|
273
277
|
constructor(t, e) {
|
|
274
278
|
this.fetchInstance = new y(t, e);
|
|
275
279
|
}
|
|
276
280
|
requestWidgetUrl = async (t) => this.fetchInstance.post(l.WIDGET_URLS, t).then((e) => e.widget_url);
|
|
277
281
|
}
|
|
278
|
-
const
|
|
279
|
-
const t =
|
|
280
|
-
return
|
|
282
|
+
const as = (s) => {
|
|
283
|
+
const t = ut();
|
|
284
|
+
return ht(() => {
|
|
281
285
|
t.current = s;
|
|
282
286
|
}, [s]), t.current;
|
|
283
|
-
},
|
|
284
|
-
const
|
|
285
|
-
return /* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
/* @__PURE__ */
|
|
287
|
+
}, Ht = ({ color: s, labelAverage: t, labelMain: e }) => {
|
|
288
|
+
const r = x(), a = Pt(r, s);
|
|
289
|
+
return /* @__PURE__ */ h("div", { className: `mx-cmn-bar-chart-legend ${a}`, children: [
|
|
290
|
+
/* @__PURE__ */ o("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
|
|
291
|
+
/* @__PURE__ */ o(S, { variant: "XSmall", children: e }),
|
|
292
|
+
/* @__PURE__ */ h("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
|
|
293
|
+
/* @__PURE__ */ o("div", { className: "mx-cmn-dot" }),
|
|
294
|
+
/* @__PURE__ */ o("div", { className: "mx-cmn-dot" }),
|
|
295
|
+
/* @__PURE__ */ o("div", { className: "mx-cmn-dot" })
|
|
292
296
|
] }),
|
|
293
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ o(S, { variant: "XSmall", children: t })
|
|
294
298
|
] });
|
|
295
|
-
},
|
|
299
|
+
}, Pt = (s, t) => C({
|
|
296
300
|
alignItems: "center",
|
|
297
301
|
display: "flex",
|
|
298
302
|
gap: s.Spacing.XSmall,
|
|
@@ -318,48 +322,48 @@ const Xe = (s) => {
|
|
|
318
322
|
"& > .kyper-text": {
|
|
319
323
|
marginRight: s.Spacing.XSmall
|
|
320
324
|
}
|
|
321
|
-
}),
|
|
325
|
+
}), Y = ({
|
|
322
326
|
ariaLabel: s,
|
|
323
327
|
color: t,
|
|
324
328
|
height: e,
|
|
325
|
-
index:
|
|
326
|
-
label:
|
|
327
|
-
onClick:
|
|
329
|
+
index: r,
|
|
330
|
+
label: a,
|
|
331
|
+
onClick: n,
|
|
328
332
|
selectedIndex: d,
|
|
329
|
-
value:
|
|
333
|
+
value: c
|
|
330
334
|
}) => {
|
|
331
|
-
const
|
|
332
|
-
|
|
333
|
-
}, f = d === void 0 || d ===
|
|
334
|
-
|
|
335
|
+
const i = x(), u = Wt(i, t, e), g = (b) => {
|
|
336
|
+
n && (b.key === " " || b.key === "Enter") && n(r);
|
|
337
|
+
}, f = d === void 0 || d === r ? "primary" : "secondary", p = () => /* @__PURE__ */ o(
|
|
338
|
+
S,
|
|
335
339
|
{
|
|
336
340
|
"aria-hidden": !0,
|
|
337
|
-
bold: d ===
|
|
341
|
+
bold: d === r,
|
|
338
342
|
className: "mx-cmn-bar-text",
|
|
339
343
|
color: f,
|
|
340
344
|
component: "div",
|
|
341
345
|
variant: "Small",
|
|
342
|
-
children:
|
|
346
|
+
children: a
|
|
343
347
|
}
|
|
344
348
|
);
|
|
345
|
-
return /* @__PURE__ */
|
|
346
|
-
|
|
347
|
-
/* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ h("div", { className: `mx-cmn-bar-container ${u} ${c < 0 ? "mx-cmn-negative" : ""}`, children: [
|
|
350
|
+
c >= 0 && /* @__PURE__ */ o(p, {}),
|
|
351
|
+
/* @__PURE__ */ o(
|
|
348
352
|
"div",
|
|
349
353
|
{
|
|
350
354
|
"aria-label": s,
|
|
351
|
-
className: `mx-cmn-bar ${
|
|
352
|
-
onClick:
|
|
353
|
-
onKeyDown:
|
|
355
|
+
className: `mx-cmn-bar ${n ? "mx-cmn-clickable" : ""} ${c < 0 ? "mx-cmn-bar-negative" : ""}`,
|
|
356
|
+
onClick: n ? () => n?.(r) : void 0,
|
|
357
|
+
onKeyDown: g,
|
|
354
358
|
role: s ? "button" : void 0,
|
|
355
359
|
tabIndex: s ? 0 : void 0
|
|
356
360
|
}
|
|
357
361
|
),
|
|
358
|
-
|
|
362
|
+
c < 0 && /* @__PURE__ */ o(p, {})
|
|
359
363
|
] });
|
|
360
|
-
},
|
|
361
|
-
const
|
|
362
|
-
return
|
|
364
|
+
}, Wt = (s, t, e) => {
|
|
365
|
+
const r = `expandBar-${Math.round(e)}`, a = _t(r, { from: { height: 0 }, to: { height: e } });
|
|
366
|
+
return C({
|
|
363
367
|
display: "flex",
|
|
364
368
|
flexDirection: "column",
|
|
365
369
|
justifyContent: "flex-end",
|
|
@@ -371,7 +375,7 @@ const Xe = (s) => {
|
|
|
371
375
|
animationDelay: ".5s",
|
|
372
376
|
animationDuration: "1s",
|
|
373
377
|
animationFillMode: "forwards",
|
|
374
|
-
animationName:
|
|
378
|
+
animationName: a,
|
|
375
379
|
animationTimingFunction: s.Easing.Default,
|
|
376
380
|
backgroundColor: t,
|
|
377
381
|
borderRadius: `${s.BorderRadius.Medium}px ${s.BorderRadius.Medium}px 0 0`,
|
|
@@ -390,60 +394,60 @@ const Xe = (s) => {
|
|
|
390
394
|
width: "100%"
|
|
391
395
|
}
|
|
392
396
|
});
|
|
393
|
-
},
|
|
397
|
+
}, z = ({
|
|
394
398
|
ariaLabel: s,
|
|
395
399
|
averageLineHeight: t,
|
|
396
400
|
bottomHeight: e,
|
|
397
|
-
color:
|
|
398
|
-
index:
|
|
399
|
-
onClick:
|
|
401
|
+
color: r,
|
|
402
|
+
index: a = -1,
|
|
403
|
+
onClick: n,
|
|
400
404
|
range: d,
|
|
401
|
-
selectedIndex:
|
|
402
|
-
topHeight:
|
|
405
|
+
selectedIndex: c,
|
|
406
|
+
topHeight: i,
|
|
403
407
|
value: u,
|
|
404
|
-
valueLabel:
|
|
408
|
+
valueLabel: g = "",
|
|
405
409
|
width: f,
|
|
406
|
-
xAxisLabel:
|
|
410
|
+
xAxisLabel: p = ""
|
|
407
411
|
}) => {
|
|
408
|
-
const
|
|
409
|
-
return /* @__PURE__ */
|
|
410
|
-
/* @__PURE__ */
|
|
411
|
-
|
|
412
|
+
const b = x(), D = qt(b, f), v = u / d * i, A = Math.abs(u) / d * e, E = c === void 0 || c === a ? "primary" : "secondary";
|
|
413
|
+
return /* @__PURE__ */ h("div", { className: `mx-cmn-barchart-bar-column ${D}`, children: [
|
|
414
|
+
/* @__PURE__ */ o("div", { style: { height: i }, children: u >= 0 && /* @__PURE__ */ o(
|
|
415
|
+
Y,
|
|
412
416
|
{
|
|
413
417
|
ariaLabel: s,
|
|
414
|
-
color:
|
|
415
|
-
height:
|
|
416
|
-
index:
|
|
417
|
-
label:
|
|
418
|
-
onClick:
|
|
419
|
-
selectedIndex:
|
|
418
|
+
color: r,
|
|
419
|
+
height: v,
|
|
420
|
+
index: a,
|
|
421
|
+
label: g,
|
|
422
|
+
onClick: n,
|
|
423
|
+
selectedIndex: c,
|
|
420
424
|
value: u
|
|
421
425
|
}
|
|
422
426
|
) }),
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
t !== 0 && /* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
|
|
427
|
+
/* @__PURE__ */ o("div", { className: "mx-cmn-zero-line" }),
|
|
428
|
+
t !== 0 && /* @__PURE__ */ o("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
|
|
429
|
+
/* @__PURE__ */ o("div", { style: { height: e }, children: u < 0 && /* @__PURE__ */ o(
|
|
430
|
+
Y,
|
|
427
431
|
{
|
|
428
432
|
ariaLabel: s,
|
|
429
|
-
color:
|
|
430
|
-
height:
|
|
431
|
-
index:
|
|
432
|
-
label:
|
|
433
|
-
onClick:
|
|
433
|
+
color: r,
|
|
434
|
+
height: A,
|
|
435
|
+
index: a,
|
|
436
|
+
label: g,
|
|
437
|
+
onClick: n,
|
|
434
438
|
value: u
|
|
435
439
|
}
|
|
436
440
|
) }),
|
|
437
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ o(
|
|
438
442
|
"div",
|
|
439
443
|
{
|
|
440
|
-
className: `mx-cmn-bar-label ${
|
|
441
|
-
onClick:
|
|
442
|
-
children: /* @__PURE__ */
|
|
444
|
+
className: `mx-cmn-bar-label ${n ? "mx-cmn-clickable" : ""}`,
|
|
445
|
+
onClick: n ? () => n(a) : void 0,
|
|
446
|
+
children: /* @__PURE__ */ o(S, { bold: c === a, color: E, variant: "Small", children: p })
|
|
443
447
|
}
|
|
444
448
|
)
|
|
445
449
|
] });
|
|
446
|
-
},
|
|
450
|
+
}, qt = (s, t) => C({
|
|
447
451
|
display: "flex",
|
|
448
452
|
flexDirection: "column",
|
|
449
453
|
flexGrow: t === void 0 ? 1 : 0,
|
|
@@ -468,61 +472,61 @@ const Xe = (s) => {
|
|
|
468
472
|
"& .mx-cmn-clickable": {
|
|
469
473
|
cursor: "pointer"
|
|
470
474
|
}
|
|
471
|
-
}),
|
|
472
|
-
const
|
|
473
|
-
return s ?
|
|
474
|
-
},
|
|
475
|
+
}), Qt = (s, t) => s + t, Yt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, zt = (s, t) => [...s, t.value], X = (s, t, e) => {
|
|
476
|
+
const r = s && t ? e / 2 : e;
|
|
477
|
+
return s ? r : 0;
|
|
478
|
+
}, Xt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, Kt = ({
|
|
475
479
|
average: s,
|
|
476
480
|
barWidth: t = "8%",
|
|
477
481
|
color: e,
|
|
478
|
-
data:
|
|
479
|
-
height:
|
|
480
|
-
legendLabelAverage:
|
|
482
|
+
data: r,
|
|
483
|
+
height: a,
|
|
484
|
+
legendLabelAverage: n,
|
|
481
485
|
legendLabelMain: d,
|
|
482
|
-
onBarClick:
|
|
483
|
-
selectedIndex:
|
|
484
|
-
valueFormatter: u = (
|
|
486
|
+
onBarClick: c,
|
|
487
|
+
selectedIndex: i,
|
|
488
|
+
valueFormatter: u = (g) => `${g}`
|
|
485
489
|
}) => {
|
|
486
|
-
const
|
|
487
|
-
|
|
490
|
+
const g = x(), f = jt(g), p = r.reduce(zt, []), b = s !== void 0 ? s : p.reduce(Qt, 0) / p.length, D = Math.max(...p), v = Math.min(...p), A = p.reduce(Yt, 0), E = D >= 0, R = v < 0, N = X(E, R, a), F = X(R, E, a), k = Xt(b, D, v, N || F), rt = (w) => i === void 0 || w === i ? e : `${e}80`, U = () => /* @__PURE__ */ o(
|
|
491
|
+
z,
|
|
488
492
|
{
|
|
489
|
-
averageLineHeight:
|
|
490
|
-
bottomHeight:
|
|
493
|
+
averageLineHeight: k,
|
|
494
|
+
bottomHeight: F,
|
|
491
495
|
color: "",
|
|
492
|
-
range:
|
|
493
|
-
topHeight:
|
|
496
|
+
range: A,
|
|
497
|
+
topHeight: N,
|
|
494
498
|
value: 0,
|
|
495
499
|
width: void 0
|
|
496
500
|
}
|
|
497
501
|
);
|
|
498
|
-
return /* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
|
|
502
|
+
return /* @__PURE__ */ h("div", { className: `mx-cmn-bar-chart ${f}`, children: [
|
|
503
|
+
/* @__PURE__ */ h("div", { className: "mx-cmn-chart-container", children: [
|
|
504
|
+
/* @__PURE__ */ o(U, {}),
|
|
505
|
+
r.map((w, M) => /* @__PURE__ */ h(tt.Fragment, { children: [
|
|
506
|
+
/* @__PURE__ */ o(
|
|
507
|
+
z,
|
|
504
508
|
{
|
|
505
|
-
ariaLabel:
|
|
506
|
-
averageLineHeight:
|
|
507
|
-
bottomHeight:
|
|
508
|
-
color:
|
|
509
|
-
index:
|
|
510
|
-
onClick:
|
|
511
|
-
range:
|
|
512
|
-
selectedIndex:
|
|
513
|
-
topHeight:
|
|
514
|
-
value:
|
|
515
|
-
valueLabel: u(
|
|
509
|
+
ariaLabel: w.ariaLabel,
|
|
510
|
+
averageLineHeight: k,
|
|
511
|
+
bottomHeight: F,
|
|
512
|
+
color: rt(M),
|
|
513
|
+
index: M,
|
|
514
|
+
onClick: c,
|
|
515
|
+
range: A,
|
|
516
|
+
selectedIndex: i,
|
|
517
|
+
topHeight: N,
|
|
518
|
+
value: w.value,
|
|
519
|
+
valueLabel: u(w.value),
|
|
516
520
|
width: t,
|
|
517
|
-
xAxisLabel:
|
|
521
|
+
xAxisLabel: w.label
|
|
518
522
|
}
|
|
519
523
|
),
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
] }, `column-${
|
|
524
|
+
/* @__PURE__ */ o(U, {})
|
|
525
|
+
] }, `column-${M}`))
|
|
522
526
|
] }),
|
|
523
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ o(Ht, { color: e, labelAverage: n, labelMain: d })
|
|
524
528
|
] });
|
|
525
|
-
},
|
|
529
|
+
}, jt = (s) => C({
|
|
526
530
|
"& .mx-cmn-chart-container": {
|
|
527
531
|
alignItems: "flex-end",
|
|
528
532
|
display: "flex",
|
|
@@ -530,47 +534,47 @@ const Xe = (s) => {
|
|
|
530
534
|
marginTop: s.Spacing.Large,
|
|
531
535
|
marginBottom: s.Spacing.Medium
|
|
532
536
|
}
|
|
533
|
-
}),
|
|
537
|
+
}), os = Kt, Vt = ({
|
|
534
538
|
hasGap: s = !1,
|
|
535
539
|
segments: t,
|
|
536
|
-
size: e =
|
|
537
|
-
strokeWidth:
|
|
538
|
-
children:
|
|
540
|
+
size: e = ft,
|
|
541
|
+
strokeWidth: r = St,
|
|
542
|
+
children: a
|
|
539
543
|
}) => {
|
|
540
|
-
const
|
|
541
|
-
let u = -90 - (s ? 1 : 0),
|
|
542
|
-
return /* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */
|
|
544
|
+
const n = x(), d = Zt(n, e), c = (e - r) / 2, i = e / 2;
|
|
545
|
+
let u = -90 - (s ? 1 : 0), g = 0;
|
|
546
|
+
return /* @__PURE__ */ h("div", { className: `mx-cmn-multi-segment-donut ${d}`, children: [
|
|
547
|
+
/* @__PURE__ */ h("svg", { height: e, width: e, children: [
|
|
548
|
+
/* @__PURE__ */ o(
|
|
545
549
|
"circle",
|
|
546
550
|
{
|
|
547
|
-
cx:
|
|
548
|
-
cy:
|
|
551
|
+
cx: i,
|
|
552
|
+
cy: i,
|
|
549
553
|
fill: "none",
|
|
550
|
-
r:
|
|
551
|
-
stroke:
|
|
552
|
-
strokeWidth:
|
|
554
|
+
r: c,
|
|
555
|
+
stroke: n.Color.Neutral300,
|
|
556
|
+
strokeWidth: r
|
|
553
557
|
}
|
|
554
558
|
),
|
|
555
|
-
t.map((f,
|
|
559
|
+
t.map((f, p) => (u += 360 * g + (s ? 1 : 0), g = (f.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ o(
|
|
556
560
|
"circle",
|
|
557
561
|
{
|
|
558
|
-
cx:
|
|
559
|
-
cy:
|
|
562
|
+
cx: i,
|
|
563
|
+
cy: i,
|
|
560
564
|
fill: "none",
|
|
561
|
-
r:
|
|
565
|
+
r: c,
|
|
562
566
|
stroke: f.color,
|
|
563
|
-
strokeDasharray: 2 * Math.PI *
|
|
564
|
-
strokeDashoffset: 2 * Math.PI *
|
|
565
|
-
strokeWidth:
|
|
566
|
-
transform: `rotate(${u}, ${
|
|
567
|
+
strokeDasharray: 2 * Math.PI * c,
|
|
568
|
+
strokeDashoffset: 2 * Math.PI * c * (1 - g),
|
|
569
|
+
strokeWidth: r,
|
|
570
|
+
transform: `rotate(${u}, ${i}, ${i})`
|
|
567
571
|
},
|
|
568
|
-
|
|
572
|
+
p
|
|
569
573
|
)))
|
|
570
574
|
] }),
|
|
571
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ o("div", { className: "mx-cmn-multi-segment-donut-children", children: a })
|
|
572
576
|
] });
|
|
573
|
-
},
|
|
577
|
+
}, Zt = (s, t) => C({
|
|
574
578
|
height: t,
|
|
575
579
|
marginTop: `-${s.Spacing.XSmall}px`,
|
|
576
580
|
position: "relative",
|
|
@@ -582,38 +586,93 @@ const Xe = (s) => {
|
|
|
582
586
|
top: "50%",
|
|
583
587
|
transform: "translate(-50%, -50%)"
|
|
584
588
|
}
|
|
585
|
-
}),
|
|
586
|
-
|
|
589
|
+
}), ns = Vt, is = ({
|
|
590
|
+
onClick: s,
|
|
591
|
+
leftIcon: t,
|
|
592
|
+
rightIcon: e,
|
|
593
|
+
title: r,
|
|
594
|
+
subtitle: a,
|
|
595
|
+
rightContent: n,
|
|
596
|
+
titleBold: d = !0,
|
|
597
|
+
rightContentBold: c = !0
|
|
598
|
+
}) => {
|
|
599
|
+
const i = /* @__PURE__ */ h(tt.Fragment, { children: [
|
|
600
|
+
t && /* @__PURE__ */ o(O, { sx: { ml: 0 }, children: t }),
|
|
601
|
+
/* @__PURE__ */ o(mt, { children: /* @__PURE__ */ h(
|
|
602
|
+
T,
|
|
603
|
+
{
|
|
604
|
+
sx: {
|
|
605
|
+
alignItems: "center",
|
|
606
|
+
flexDirection: "row",
|
|
607
|
+
marginLeft: 12
|
|
608
|
+
},
|
|
609
|
+
children: [
|
|
610
|
+
/* @__PURE__ */ h(T, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
611
|
+
/* @__PURE__ */ o(S, { bold: d, variant: "body1", children: r }),
|
|
612
|
+
a && /* @__PURE__ */ o(S, { variant: "caption", children: a })
|
|
613
|
+
] }),
|
|
614
|
+
/* @__PURE__ */ h(T, { sx: { flexDirection: "row", alignItems: "center", gap: 1 }, children: [
|
|
615
|
+
n && /* @__PURE__ */ o(S, { bold: c, display: "flex", variant: "body1", children: n }),
|
|
616
|
+
e && /* @__PURE__ */ o(O, { children: e })
|
|
617
|
+
] })
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
) })
|
|
621
|
+
] });
|
|
622
|
+
return /* @__PURE__ */ o(gt, { sx: { bgcolor: "background.paper" }, children: s ? /* @__PURE__ */ o(
|
|
623
|
+
pt,
|
|
624
|
+
{
|
|
625
|
+
onClick: s,
|
|
626
|
+
sx: {
|
|
627
|
+
py: 14
|
|
628
|
+
},
|
|
629
|
+
children: i
|
|
630
|
+
}
|
|
631
|
+
) : /* @__PURE__ */ o(
|
|
632
|
+
T,
|
|
633
|
+
{
|
|
634
|
+
sx: {
|
|
635
|
+
py: 14,
|
|
636
|
+
px: 24,
|
|
637
|
+
width: "100%",
|
|
638
|
+
flexDirection: "row",
|
|
639
|
+
alignItems: "center"
|
|
640
|
+
},
|
|
641
|
+
children: i
|
|
642
|
+
}
|
|
643
|
+
) });
|
|
644
|
+
};
|
|
645
|
+
class Jt {
|
|
587
646
|
globalStore;
|
|
588
|
-
api = new
|
|
647
|
+
api = new $("/", "");
|
|
589
648
|
copy = {};
|
|
590
649
|
featureNamespace = "experiences";
|
|
591
650
|
isInitialized = !1;
|
|
592
651
|
constructor(t) {
|
|
593
|
-
this.globalStore = t, this.api = new
|
|
652
|
+
this.globalStore = t, this.api = new $(t.endpoint, t.sessionToken), _(this);
|
|
594
653
|
}
|
|
595
654
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
596
655
|
// TODO: Remove this function
|
|
597
656
|
initialize = async (t, e) => {
|
|
598
|
-
this.api = new
|
|
657
|
+
this.api = new $(t, e), await this.loadCopy();
|
|
599
658
|
};
|
|
600
659
|
loadCopy = async () => {
|
|
601
|
-
await this.getCopy(this.featureNamespace),
|
|
660
|
+
await this.getCopy(this.featureNamespace), m(() => {
|
|
602
661
|
this.isInitialized = !0;
|
|
603
662
|
});
|
|
604
663
|
};
|
|
605
664
|
getCopy = async (t, e = "") => {
|
|
606
665
|
try {
|
|
607
|
-
const
|
|
608
|
-
|
|
609
|
-
this.copy =
|
|
666
|
+
const r = await this.api.getGlobalCopy(t, e);
|
|
667
|
+
m(() => {
|
|
668
|
+
this.copy = r[t];
|
|
610
669
|
});
|
|
611
|
-
} catch (
|
|
612
|
-
console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${
|
|
670
|
+
} catch (r) {
|
|
671
|
+
console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${r}`);
|
|
613
672
|
}
|
|
614
673
|
};
|
|
615
674
|
}
|
|
616
|
-
class
|
|
675
|
+
class te {
|
|
617
676
|
globalStore;
|
|
618
677
|
survey = null;
|
|
619
678
|
currentQuestionIndex = 0;
|
|
@@ -621,7 +680,7 @@ class Kt {
|
|
|
621
680
|
response = null;
|
|
622
681
|
responses = {};
|
|
623
682
|
constructor(t) {
|
|
624
|
-
this.globalStore = t,
|
|
683
|
+
this.globalStore = t, _(this);
|
|
625
684
|
}
|
|
626
685
|
get isLastQuestion() {
|
|
627
686
|
return this.currentQuestionIndex === this.surveyQuestions.length - 1;
|
|
@@ -643,11 +702,11 @@ class Kt {
|
|
|
643
702
|
return this.survey ? this.survey.questions : [];
|
|
644
703
|
}
|
|
645
704
|
loadSurvey = (t = !1) => {
|
|
646
|
-
|
|
647
|
-
|
|
705
|
+
Ct.getActiveMatchingSurveys((e) => {
|
|
706
|
+
m(() => {
|
|
648
707
|
if (e.length > 0) {
|
|
649
|
-
const
|
|
650
|
-
|
|
708
|
+
const r = e.find((a) => a.id === this.surveyId);
|
|
709
|
+
r && (this.survey = r, this.currentQuestionIndex = 0, this.question = r.questions[0], this.response = null, this.responses = {});
|
|
651
710
|
}
|
|
652
711
|
});
|
|
653
712
|
}, t);
|
|
@@ -662,18 +721,18 @@ class Kt {
|
|
|
662
721
|
this.response = t, this.question && (this.responses[`$survey_response_${this.question.id}`] = t);
|
|
663
722
|
};
|
|
664
723
|
}
|
|
665
|
-
class
|
|
724
|
+
class K {
|
|
666
725
|
fetchInstance;
|
|
667
726
|
constructor(t, e) {
|
|
668
727
|
this.fetchInstance = new y(t, e);
|
|
669
728
|
}
|
|
670
|
-
addBudget = async (t, e,
|
|
729
|
+
addBudget = async (t, e, r = null) => this.fetchInstance.post(l.BUDGETS, {
|
|
671
730
|
amount: e,
|
|
672
731
|
category_guid: t.guid,
|
|
673
732
|
category_name: t.name,
|
|
674
|
-
parent_guid:
|
|
675
|
-
}).then((
|
|
676
|
-
throw
|
|
733
|
+
parent_guid: r
|
|
734
|
+
}).then((a) => a.budget).catch((a) => {
|
|
735
|
+
throw a;
|
|
677
736
|
});
|
|
678
737
|
deleteBudget = async (t) => this.fetchInstance.delete(`${l.BUDGETS}/${t}`).then((e) => e).catch((e) => {
|
|
679
738
|
throw e;
|
|
@@ -683,40 +742,40 @@ class z {
|
|
|
683
742
|
throw e;
|
|
684
743
|
});
|
|
685
744
|
}
|
|
686
|
-
class
|
|
687
|
-
api = new
|
|
745
|
+
class ee {
|
|
746
|
+
api = new K("/", "");
|
|
688
747
|
globalStore;
|
|
689
748
|
alert = "";
|
|
690
|
-
dateRange = { start:
|
|
749
|
+
dateRange = { start: st(G()), end: et(G()) };
|
|
691
750
|
budgets = [];
|
|
692
751
|
selectedBudget;
|
|
693
752
|
selectedSubBudget;
|
|
694
753
|
isDataLoaded = !1;
|
|
695
754
|
theme = {};
|
|
696
755
|
constructor(t) {
|
|
697
|
-
this.globalStore = t, this.api = new
|
|
756
|
+
this.globalStore = t, this.api = new K(t.endpoint, t.sessionToken), _(this);
|
|
698
757
|
}
|
|
699
758
|
loadBudgetData = async () => {
|
|
700
|
-
await this.loadBudgets(),
|
|
759
|
+
await this.loadBudgets(), wt(
|
|
701
760
|
() => this.detailedBudgets,
|
|
702
761
|
(t) => {
|
|
703
762
|
if (t) {
|
|
704
763
|
const e = this.selectedBudget;
|
|
705
|
-
e && (this.selectedBudget =
|
|
706
|
-
const
|
|
707
|
-
|
|
764
|
+
e && (this.selectedBudget = vt(t, e.guid));
|
|
765
|
+
const r = this.selectedSubBudget;
|
|
766
|
+
r && r.parent_guid && (this.selectedSubBudget = At(
|
|
708
767
|
t,
|
|
709
|
-
|
|
710
|
-
|
|
768
|
+
r.guid,
|
|
769
|
+
r.parent_guid
|
|
711
770
|
));
|
|
712
771
|
}
|
|
713
772
|
}
|
|
714
773
|
);
|
|
715
774
|
};
|
|
716
775
|
get detailedBudgets() {
|
|
717
|
-
return
|
|
776
|
+
return H(
|
|
718
777
|
this.budgets.filter(
|
|
719
|
-
(t) => t.category_guid !==
|
|
778
|
+
(t) => t.category_guid !== I.INCOME && t.category_guid !== I.TRANSFER && t.category_guid !== I.INVESTMENTS
|
|
720
779
|
),
|
|
721
780
|
this.globalStore.categoryStore.detailedCategories,
|
|
722
781
|
this.globalStore.copyStore.copy.budgets,
|
|
@@ -724,13 +783,13 @@ class jt {
|
|
|
724
783
|
).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
|
|
725
784
|
}
|
|
726
785
|
get incomeBudget() {
|
|
727
|
-
return
|
|
728
|
-
this.budgets.filter((
|
|
786
|
+
return H(
|
|
787
|
+
this.budgets.filter((r) => !r.parent_guid),
|
|
729
788
|
this.globalStore.categoryStore.detailedCategories,
|
|
730
789
|
this.globalStore.copyStore.copy.budgets,
|
|
731
790
|
this.theme
|
|
732
791
|
).reduce(
|
|
733
|
-
(
|
|
792
|
+
(r, a) => a.category_guid !== I.INCOME ? r : !r || a.percentage > r.percentage ? a : r,
|
|
734
793
|
void 0
|
|
735
794
|
)?.amount;
|
|
736
795
|
}
|
|
@@ -742,20 +801,20 @@ class jt {
|
|
|
742
801
|
get totalBudgeted() {
|
|
743
802
|
return this.detailedBudgets.reduce((t, e) => t + e.amount, 0);
|
|
744
803
|
}
|
|
745
|
-
addBudget = async (t, e,
|
|
804
|
+
addBudget = async (t, e, r = null) => {
|
|
746
805
|
try {
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
this.budgets.push(
|
|
806
|
+
const a = await this.api.addBudget(t, e, r);
|
|
807
|
+
m(() => {
|
|
808
|
+
this.budgets.push(a);
|
|
750
809
|
});
|
|
751
|
-
} catch (
|
|
752
|
-
console.error(`Error adding budget: ${
|
|
810
|
+
} catch (a) {
|
|
811
|
+
console.error(`Error adding budget: ${a}`);
|
|
753
812
|
}
|
|
754
813
|
};
|
|
755
814
|
deleteBudget = async (t) => {
|
|
756
815
|
try {
|
|
757
|
-
await this.api.deleteBudget(t),
|
|
758
|
-
const e = this.budgets.findIndex((
|
|
816
|
+
await this.api.deleteBudget(t), m(() => {
|
|
817
|
+
const e = this.budgets.findIndex((r) => r.guid === t);
|
|
759
818
|
e >= 0 && this.budgets.splice(e, 1);
|
|
760
819
|
});
|
|
761
820
|
} catch (e) {
|
|
@@ -765,7 +824,7 @@ class jt {
|
|
|
765
824
|
loadBudgets = async () => {
|
|
766
825
|
try {
|
|
767
826
|
const t = await this.api.getBudgets();
|
|
768
|
-
|
|
827
|
+
m(() => {
|
|
769
828
|
this.budgets = t, this.isDataLoaded = !0;
|
|
770
829
|
});
|
|
771
830
|
} catch (t) {
|
|
@@ -783,18 +842,18 @@ class jt {
|
|
|
783
842
|
*/
|
|
784
843
|
recalculateBudgets = async (t) => {
|
|
785
844
|
try {
|
|
786
|
-
for (const
|
|
787
|
-
const
|
|
788
|
-
|
|
789
|
-
...
|
|
790
|
-
amount:
|
|
791
|
-
}) : await this.api.addBudget(
|
|
845
|
+
for (const r of t) {
|
|
846
|
+
const a = this.budgets.find((n) => n.category_guid === r.guid);
|
|
847
|
+
a ? await this.api.updateBudget({
|
|
848
|
+
...a,
|
|
849
|
+
amount: r.totalAverageAmount
|
|
850
|
+
}) : await this.api.addBudget(r, r.totalAverageAmount);
|
|
792
851
|
}
|
|
793
852
|
const e = this.budgets.filter(
|
|
794
|
-
(
|
|
853
|
+
(r) => !t.find((a) => a.guid === r.category_guid)
|
|
795
854
|
);
|
|
796
|
-
for (const
|
|
797
|
-
await this.api.deleteBudget(
|
|
855
|
+
for (const r of e)
|
|
856
|
+
await this.api.deleteBudget(r.guid);
|
|
798
857
|
return await this.loadBudgets(), { data: this.budgets, isSuccess: !0 };
|
|
799
858
|
} catch (e) {
|
|
800
859
|
return console.error("error recalculating budgets", e), { data: [], isSuccess: !1 };
|
|
@@ -803,48 +862,48 @@ class jt {
|
|
|
803
862
|
updateBudget = async (t) => {
|
|
804
863
|
try {
|
|
805
864
|
const e = await this.api.updateBudget(t);
|
|
806
|
-
|
|
807
|
-
const
|
|
808
|
-
|
|
865
|
+
m(() => {
|
|
866
|
+
const r = this.budgets.findIndex((a) => a.guid === t.guid);
|
|
867
|
+
r >= 0 && (this.budgets[r] = e);
|
|
809
868
|
});
|
|
810
869
|
} catch (e) {
|
|
811
870
|
console.error(`Error updating budget: ${e}`);
|
|
812
871
|
}
|
|
813
872
|
};
|
|
814
873
|
}
|
|
815
|
-
var
|
|
816
|
-
class
|
|
874
|
+
var se = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(se || {}), re = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(re || {}), ae = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(ae || {}), oe = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(oe || {});
|
|
875
|
+
class j {
|
|
817
876
|
fetchInstance;
|
|
818
877
|
constructor(t, e) {
|
|
819
878
|
this.fetchInstance = new y(t, e);
|
|
820
879
|
}
|
|
821
880
|
createSupportTicket = async (t) => this.fetchInstance.post(l.SUPPORT_TICKETS, t).then((e) => e);
|
|
822
881
|
}
|
|
823
|
-
const
|
|
882
|
+
const ne = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, ie = (s, t) => {
|
|
824
883
|
const e = [];
|
|
825
|
-
for (const
|
|
826
|
-
const
|
|
827
|
-
if (!
|
|
828
|
-
const
|
|
829
|
-
...
|
|
830
|
-
title:
|
|
831
|
-
topics:
|
|
884
|
+
for (const r of it) {
|
|
885
|
+
const a = t[r.guid];
|
|
886
|
+
if (!a) continue;
|
|
887
|
+
const n = {
|
|
888
|
+
...r,
|
|
889
|
+
title: a.label,
|
|
890
|
+
topics: r.topics.map(({ topicKey: d }, c) => ({
|
|
832
891
|
topicKey: d,
|
|
833
|
-
label:
|
|
892
|
+
label: a.topics[c]
|
|
834
893
|
}))
|
|
835
894
|
};
|
|
836
|
-
|
|
895
|
+
ne(n, s) && e.push(n);
|
|
837
896
|
}
|
|
838
897
|
return e;
|
|
839
898
|
};
|
|
840
|
-
class
|
|
899
|
+
class ce {
|
|
841
900
|
alert = { message: "", severity: void 0 };
|
|
842
|
-
api = new
|
|
901
|
+
api = new j("/", "");
|
|
843
902
|
appConfig;
|
|
844
903
|
globalStore;
|
|
845
904
|
isLoading = !1;
|
|
846
905
|
constructor(t) {
|
|
847
|
-
this.globalStore = t, this.api = new
|
|
906
|
+
this.globalStore = t, this.api = new j(t.endpoint, t.sessionToken), _(this);
|
|
848
907
|
}
|
|
849
908
|
createSupportTicket = async (t) => {
|
|
850
909
|
try {
|
|
@@ -861,19 +920,19 @@ class ae {
|
|
|
861
920
|
}
|
|
862
921
|
get helpCategories() {
|
|
863
922
|
const { client_communication_profile: t, client_profile: e } = this.globalStore.appDataStore.appData, {
|
|
864
|
-
help: { category_list:
|
|
923
|
+
help: { category_list: r }
|
|
865
924
|
} = this.globalStore.copyStore.copy;
|
|
866
|
-
return
|
|
925
|
+
return ie(
|
|
867
926
|
{
|
|
868
927
|
...t,
|
|
869
928
|
...e,
|
|
870
929
|
...this.globalStore.appConfig.config
|
|
871
930
|
},
|
|
872
|
-
|
|
931
|
+
r
|
|
873
932
|
);
|
|
874
933
|
}
|
|
875
934
|
}
|
|
876
|
-
class
|
|
935
|
+
class V {
|
|
877
936
|
fetchInstance;
|
|
878
937
|
constructor(t, e) {
|
|
879
938
|
this.fetchInstance = new y(t, e);
|
|
@@ -881,21 +940,21 @@ class K {
|
|
|
881
940
|
getHoldings = async () => this.fetchInstance.get(l.HOLDINGS).then((t) => t.holdings);
|
|
882
941
|
updateHoldings = async (t) => this.fetchInstance.put(`${l.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
|
|
883
942
|
}
|
|
884
|
-
class
|
|
885
|
-
analysisType =
|
|
886
|
-
api = new
|
|
943
|
+
class de {
|
|
944
|
+
analysisType = It.Stocks;
|
|
945
|
+
api = new V("/", "");
|
|
887
946
|
holdings = [];
|
|
888
947
|
holdingsLoaded = !1;
|
|
889
948
|
globalStore;
|
|
890
949
|
showConnectionsWidget = !1;
|
|
891
950
|
constructor(t) {
|
|
892
|
-
this.globalStore = t, this.api = new
|
|
951
|
+
this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken), _(this);
|
|
893
952
|
}
|
|
894
953
|
get analysisChartData() {
|
|
895
|
-
return
|
|
954
|
+
return Bt(Nt(this.visibleHoldings), this.analysisType);
|
|
896
955
|
}
|
|
897
956
|
get analysisDetails() {
|
|
898
|
-
return
|
|
957
|
+
return Ft(this.visibleHoldings)[this.analysisType] || {};
|
|
899
958
|
}
|
|
900
959
|
get visibleHoldings() {
|
|
901
960
|
return this.holdings.filter(
|
|
@@ -908,7 +967,7 @@ class re {
|
|
|
908
967
|
loadHoldings = async () => {
|
|
909
968
|
try {
|
|
910
969
|
const t = await this.api.getHoldings();
|
|
911
|
-
|
|
970
|
+
m(() => {
|
|
912
971
|
this.holdings = [...t], this.holdingsLoaded = !0;
|
|
913
972
|
});
|
|
914
973
|
} catch (t) {
|
|
@@ -921,11 +980,11 @@ class re {
|
|
|
921
980
|
updateHoldings = async (t) => {
|
|
922
981
|
this.holdingsLoaded = !1;
|
|
923
982
|
try {
|
|
924
|
-
const e = await this.api.updateHoldings(t),
|
|
925
|
-
if (
|
|
926
|
-
const
|
|
927
|
-
r
|
|
928
|
-
this.holdings =
|
|
983
|
+
const e = await this.api.updateHoldings(t), r = this.holdings.findIndex(({ guid: a }) => a === t.guid);
|
|
984
|
+
if (r >= 0) {
|
|
985
|
+
const a = [...this.holdings];
|
|
986
|
+
a[r] = e, m(() => {
|
|
987
|
+
this.holdings = a, this.holdingsLoaded = !0;
|
|
929
988
|
});
|
|
930
989
|
}
|
|
931
990
|
} catch (e) {
|
|
@@ -933,7 +992,7 @@ class re {
|
|
|
933
992
|
}
|
|
934
993
|
};
|
|
935
994
|
}
|
|
936
|
-
const
|
|
995
|
+
const Z = {
|
|
937
996
|
clientConfig: {},
|
|
938
997
|
clientStyleProfile: {},
|
|
939
998
|
config: {
|
|
@@ -1035,21 +1094,21 @@ const j = {
|
|
|
1035
1094
|
postHogPublicKey: "phc_1fVYJICC69TpW4wagp9o2XqQ8E7X98cAmcR5psSpfkE",
|
|
1036
1095
|
userFeatures: []
|
|
1037
1096
|
};
|
|
1038
|
-
class
|
|
1097
|
+
class J {
|
|
1039
1098
|
fetchInstance;
|
|
1040
1099
|
constructor(t, e) {
|
|
1041
1100
|
this.fetchInstance = new y(t, e);
|
|
1042
1101
|
}
|
|
1043
1102
|
getAppData = async () => this.fetchInstance.get(l.APP_DATA).then((t) => t);
|
|
1044
1103
|
}
|
|
1045
|
-
class
|
|
1104
|
+
class le {
|
|
1046
1105
|
globalStore;
|
|
1047
|
-
api = new
|
|
1048
|
-
bannerApi = new
|
|
1106
|
+
api = new J("/", "");
|
|
1107
|
+
bannerApi = new q("/");
|
|
1049
1108
|
appData = {};
|
|
1050
1109
|
banner = {};
|
|
1051
1110
|
constructor(t) {
|
|
1052
|
-
this.globalStore = t, this.api = new
|
|
1111
|
+
this.globalStore = t, this.api = new J(t.endpoint, t.sessionToken), _(this);
|
|
1053
1112
|
}
|
|
1054
1113
|
get appConfig() {
|
|
1055
1114
|
return this.globalStore.appConfig;
|
|
@@ -1072,8 +1131,8 @@ class oe {
|
|
|
1072
1131
|
loadAppData = async (t) => {
|
|
1073
1132
|
try {
|
|
1074
1133
|
const e = t || await this.api.getAppData();
|
|
1075
|
-
|
|
1076
|
-
this.appData = e, this.bannerApi = new
|
|
1134
|
+
m(() => {
|
|
1135
|
+
this.appData = e, this.bannerApi = new q(e.address?.bullseye || "/");
|
|
1077
1136
|
});
|
|
1078
1137
|
} catch (e) {
|
|
1079
1138
|
console.error(`Error loading app data: ${e}`);
|
|
@@ -1082,7 +1141,7 @@ class oe {
|
|
|
1082
1141
|
loadBanner = async () => {
|
|
1083
1142
|
try {
|
|
1084
1143
|
const t = this.user?.guid ?? null, e = t ? await this.bannerApi.getBanner(t) : {};
|
|
1085
|
-
|
|
1144
|
+
m(() => {
|
|
1086
1145
|
this.banner = e;
|
|
1087
1146
|
});
|
|
1088
1147
|
} catch (t) {
|
|
@@ -1093,28 +1152,28 @@ class oe {
|
|
|
1093
1152
|
setUserCommunicationProfile = (t) => this.appData.user_communication_profile = t;
|
|
1094
1153
|
setUserProfile = (t) => this.appData.user_profile = t;
|
|
1095
1154
|
}
|
|
1096
|
-
class
|
|
1155
|
+
class ue {
|
|
1097
1156
|
globalStore;
|
|
1098
|
-
widgetApi = new
|
|
1157
|
+
widgetApi = new Q("/", "");
|
|
1099
1158
|
constructor(t) {
|
|
1100
|
-
this.globalStore = t, this.widgetApi = new
|
|
1159
|
+
this.globalStore = t, this.widgetApi = new Q(t.endpoint, t.sessionToken), _(this);
|
|
1101
1160
|
}
|
|
1102
|
-
loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...
|
|
1103
|
-
widget_url: { widget_type: t, color_scheme: e, ...
|
|
1161
|
+
loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...r }) => await this.widgetApi.requestWidgetUrl({
|
|
1162
|
+
widget_url: { widget_type: t, color_scheme: e, ...r }
|
|
1104
1163
|
});
|
|
1105
1164
|
}
|
|
1106
|
-
class
|
|
1165
|
+
class he {
|
|
1107
1166
|
globalStore;
|
|
1108
1167
|
isInitialized = !1;
|
|
1109
1168
|
selectedAccounts = [];
|
|
1110
1169
|
selectedAccountGuids = this.selectedAccounts.map((t) => t.guid);
|
|
1111
1170
|
displayedDate = /* @__PURE__ */ new Date();
|
|
1112
1171
|
displayedDateRange = {
|
|
1113
|
-
start:
|
|
1114
|
-
end:
|
|
1172
|
+
start: st(this.displayedDate),
|
|
1173
|
+
end: et(this.displayedDate)
|
|
1115
1174
|
};
|
|
1116
1175
|
constructor(t) {
|
|
1117
|
-
|
|
1176
|
+
_(this), this.globalStore = t;
|
|
1118
1177
|
}
|
|
1119
1178
|
get isCopyLoaded() {
|
|
1120
1179
|
return this.globalStore.copyStore.isInitialized;
|
|
@@ -1131,8 +1190,8 @@ class ie {
|
|
|
1131
1190
|
};
|
|
1132
1191
|
// Sets an array of selected account guids for the AccountFilter component
|
|
1133
1192
|
setSelectedAccountGuids = async (t) => {
|
|
1134
|
-
const e = new Set(this.selectedAccountGuids),
|
|
1135
|
-
|
|
1193
|
+
const e = new Set(this.selectedAccountGuids), r = new Set(t), a = [...r].filter((d) => !e.has(d)), n = [...e].filter((d) => !r.has(d));
|
|
1194
|
+
a.length > 0 && this.globalStore.accountStore.updateAccountFiltering(a, !1), n.length > 0 && this.globalStore.accountStore.updateAccountFiltering(n, !0), this.selectedAccountGuids = t;
|
|
1136
1195
|
};
|
|
1137
1196
|
setDisplayedDate = (t, e) => {
|
|
1138
1197
|
this.displayedDate = e, this.displayedDateRange = {
|
|
@@ -1141,25 +1200,25 @@ class ie {
|
|
|
1141
1200
|
};
|
|
1142
1201
|
};
|
|
1143
1202
|
get shouldDisableNextDate() {
|
|
1144
|
-
const t =
|
|
1203
|
+
const t = B(this.displayedDate), e = B(Rt(/* @__PURE__ */ new Date(), 1));
|
|
1145
1204
|
return t === e;
|
|
1146
1205
|
}
|
|
1147
1206
|
get shouldDisablePrevDate() {
|
|
1148
|
-
const t =
|
|
1207
|
+
const t = B(this.displayedDate), e = B(/* @__PURE__ */ new Date());
|
|
1149
1208
|
return t === e;
|
|
1150
1209
|
}
|
|
1151
1210
|
}
|
|
1152
|
-
class
|
|
1211
|
+
class ge {
|
|
1153
1212
|
globalStore;
|
|
1154
|
-
api = new
|
|
1213
|
+
api = new L("/", "");
|
|
1155
1214
|
userFeatures = [];
|
|
1156
1215
|
constructor(t) {
|
|
1157
|
-
this.globalStore = t, this.api = new
|
|
1216
|
+
this.globalStore = t, this.api = new L(t.endpoint, t.sessionToken), _(this);
|
|
1158
1217
|
}
|
|
1159
1218
|
// DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
|
|
1160
1219
|
// TODO: Remove this function
|
|
1161
1220
|
initialize = async (t, e) => {
|
|
1162
|
-
this.api = new
|
|
1221
|
+
this.api = new L(t, e), await this.loadUserFeatures();
|
|
1163
1222
|
};
|
|
1164
1223
|
get userProfile() {
|
|
1165
1224
|
return this.globalStore.appDataStore.userProfile;
|
|
@@ -1170,7 +1229,7 @@ class ce {
|
|
|
1170
1229
|
loadUserFeatures = async (t) => {
|
|
1171
1230
|
try {
|
|
1172
1231
|
const e = t || await this.api.getUserFeatures();
|
|
1173
|
-
|
|
1232
|
+
m(() => {
|
|
1174
1233
|
this.userFeatures = e;
|
|
1175
1234
|
});
|
|
1176
1235
|
} catch (e) {
|
|
@@ -1194,9 +1253,9 @@ class ce {
|
|
|
1194
1253
|
}
|
|
1195
1254
|
};
|
|
1196
1255
|
}
|
|
1197
|
-
class
|
|
1256
|
+
class cs {
|
|
1198
1257
|
// Global properties
|
|
1199
|
-
appConfig =
|
|
1258
|
+
appConfig = Z;
|
|
1200
1259
|
endpoint = "/";
|
|
1201
1260
|
sessionToken = "";
|
|
1202
1261
|
// Data Stores
|
|
@@ -1224,8 +1283,8 @@ class Ve {
|
|
|
1224
1283
|
userStore;
|
|
1225
1284
|
// UI Stores
|
|
1226
1285
|
globalUiStore;
|
|
1227
|
-
constructor(t =
|
|
1228
|
-
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.accountStore = new
|
|
1286
|
+
constructor(t = Z, e = "/") {
|
|
1287
|
+
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.accountStore = new xt(this), this.appDataStore = new le(this), this.analyticsStore = new te(this), this.beatStore = new Dt(this), this.budgetsStore = new ee(this), this.cashflowStore = new dt(this), this.categoryStore = new at(this), this.connectStore = new ue(this), this.copyStore = new Jt(this), this.debtsStore = new Et(this), this.finstrongStore = new Tt(this), this.goalStore = new lt(this), this.helpStore = new ce(this), this.holdingStore = new de(this), this.merchantStore = new Mt(this), this.netWorthStore = new $t(this), this.notificationStore = new ot(this), this.recurringTransactionsStore = new bt(this), this.settingsStore = new Lt(this), this.transactionStore = new ct(this), this.trendsStore = new yt(this), this.userStore = new ge(this), this.globalUiStore = new he(this), _(this);
|
|
1229
1288
|
}
|
|
1230
1289
|
get isInitialized() {
|
|
1231
1290
|
return this.globalUiStore.isInitialized;
|
|
@@ -1233,182 +1292,182 @@ class Ve {
|
|
|
1233
1292
|
loadData = async ({
|
|
1234
1293
|
accounts: t,
|
|
1235
1294
|
appData: e,
|
|
1236
|
-
associatedBeats:
|
|
1237
|
-
categories:
|
|
1238
|
-
institutions:
|
|
1295
|
+
associatedBeats: r,
|
|
1296
|
+
categories: a,
|
|
1297
|
+
institutions: n,
|
|
1239
1298
|
transactionRules: d,
|
|
1240
|
-
transactions:
|
|
1241
|
-
userFeatures:
|
|
1299
|
+
transactions: c,
|
|
1300
|
+
userFeatures: i
|
|
1242
1301
|
} = {}) => {
|
|
1243
1302
|
await Promise.all([
|
|
1244
1303
|
// Load copy, config and quser data
|
|
1245
1304
|
this.copyStore.loadCopy(),
|
|
1246
1305
|
this.appDataStore.loadAppData(e),
|
|
1247
|
-
this.userStore.loadUserFeatures(
|
|
1306
|
+
this.userStore.loadUserFeatures(i)
|
|
1248
1307
|
]), await Promise.all([
|
|
1249
|
-
this.accountStore.loadAccountData({ accounts: t, institutions:
|
|
1250
|
-
this.categoryStore.loadCategories(
|
|
1308
|
+
this.accountStore.loadAccountData({ accounts: t, institutions: n }),
|
|
1309
|
+
this.categoryStore.loadCategories(a),
|
|
1251
1310
|
this.transactionStore.loadTransactionData({
|
|
1252
|
-
associatedBeats:
|
|
1311
|
+
associatedBeats: r,
|
|
1253
1312
|
transactionRules: d,
|
|
1254
|
-
transactions:
|
|
1313
|
+
transactions: c
|
|
1255
1314
|
})
|
|
1256
1315
|
]), this.globalUiStore.setInitialized(!0);
|
|
1257
1316
|
};
|
|
1258
1317
|
}
|
|
1259
1318
|
export {
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1319
|
+
Ms as ANALYTICS_EVENTS,
|
|
1320
|
+
ks as AccountFilter,
|
|
1321
|
+
Us as AccountIcon,
|
|
1322
|
+
Os as AccountIconVariants,
|
|
1323
|
+
Mr as AccountNotificationTypes,
|
|
1324
|
+
Gs as AccountSubType,
|
|
1325
|
+
Hs as AccountType,
|
|
1326
|
+
Ps as AccountTypeName,
|
|
1327
|
+
us as AnalyticsApi,
|
|
1269
1328
|
l as ApiEndpoints,
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1329
|
+
q as BannerApi,
|
|
1330
|
+
os as BarChart,
|
|
1331
|
+
_s as BeatApi,
|
|
1332
|
+
$r as BudgetNotificationTypes,
|
|
1333
|
+
xs as Calendar,
|
|
1334
|
+
Cs as CalendarSelectionTypes,
|
|
1335
|
+
fs as CategoryApi,
|
|
1336
|
+
da as CategoryColors,
|
|
1337
|
+
la as CategoryGuidToName,
|
|
1338
|
+
I as CategoryGuids,
|
|
1339
|
+
ua as CategoryIcon,
|
|
1340
|
+
xr as ConnectCard,
|
|
1341
|
+
Ws as ConnectDrawer,
|
|
1342
|
+
qs as ConnectionStatus,
|
|
1343
|
+
Qs as ConnectionStatusEnums,
|
|
1344
|
+
pa as CurrencyCodes,
|
|
1345
|
+
tr as CurrencyInput,
|
|
1346
|
+
Er as CurrencyText,
|
|
1347
|
+
Kr as DATE_FORMATS_INTL,
|
|
1348
|
+
ft as DEFAULT_DONUT_SIZE,
|
|
1349
|
+
St as DEFAULT_STROKE_WIDTH,
|
|
1350
|
+
gr as DataRow,
|
|
1351
|
+
$s as DateRangeSelector,
|
|
1352
|
+
jr as Dialog,
|
|
1353
|
+
Gr as Donut,
|
|
1354
|
+
ra as Drawer,
|
|
1355
|
+
Ir as EmptyState,
|
|
1356
|
+
Es as ErrorBoundary,
|
|
1357
|
+
Ys as ErrorStatuses,
|
|
1358
|
+
re as ExpenseStatus,
|
|
1300
1359
|
y as Fetch,
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1360
|
+
pr as Frequency,
|
|
1361
|
+
$ as GlobalCopyApi,
|
|
1362
|
+
Jt as GlobalCopyStore,
|
|
1363
|
+
Da as GlobalDataContext,
|
|
1364
|
+
va as GlobalDataProvider,
|
|
1365
|
+
cs as GlobalStore,
|
|
1366
|
+
Cr as GoalType,
|
|
1367
|
+
oa as INCOME_ACCOUNT_TYPES,
|
|
1368
|
+
ur as IconBacking,
|
|
1369
|
+
br as InformationTooltip,
|
|
1370
|
+
Lr as InsightNotificationTypes,
|
|
1371
|
+
Gt as IterationItemTypes,
|
|
1372
|
+
ts as LOADING_STATUS,
|
|
1373
|
+
Pr as LineChart,
|
|
1374
|
+
Nr as ListItemAction,
|
|
1375
|
+
is as ListItemRow,
|
|
1376
|
+
Ds as ListItemWrapper,
|
|
1377
|
+
sr as Loader,
|
|
1378
|
+
ss as LocalizedCopyApi,
|
|
1379
|
+
Dr as MetaType,
|
|
1380
|
+
zs as MfaStatuses,
|
|
1381
|
+
Is as MicroWidgetContainer,
|
|
1382
|
+
Ns as MiniWidgetContainer,
|
|
1383
|
+
ns as MultiSegmentDonut,
|
|
1384
|
+
Xs as NonConnectedStatuses,
|
|
1385
|
+
bs as NotificationApi,
|
|
1386
|
+
Rr as NotificationTypes,
|
|
1387
|
+
Vr as ORDINAL_DATE_FORMAT,
|
|
1388
|
+
Zr as ORDINAL_MONTH_DAY_YEAR_FORMAT,
|
|
1389
|
+
na as PAYMENT_ACCOUNT_TYPES,
|
|
1390
|
+
ha as PaymentCategories,
|
|
1391
|
+
Ot as PlanTypes,
|
|
1392
|
+
Ks as ProcessingStatuses,
|
|
1393
|
+
js as PropertyType,
|
|
1394
|
+
Vs as PropertyTypeName,
|
|
1395
|
+
Je as RECURRENCE_COPY,
|
|
1396
|
+
mr as RecurrenceStatus,
|
|
1397
|
+
_r as RecurrenceType,
|
|
1398
|
+
Ut as RecurrenceTypes,
|
|
1399
|
+
yr as RepeatingType,
|
|
1400
|
+
ar as ResponsiveButton,
|
|
1401
|
+
ia as SPENDING_ACCOUNT_TYPES,
|
|
1402
|
+
ae as ScheduledPaymentTypes,
|
|
1403
|
+
rs as ScheduledPaymentsApi,
|
|
1404
|
+
oe as ScreenSize,
|
|
1405
|
+
ir as SearchBox,
|
|
1406
|
+
fr as Select,
|
|
1407
|
+
or as SelectionBox,
|
|
1408
|
+
ea as SingleSegmentDonut,
|
|
1409
|
+
wa as Sizes,
|
|
1410
|
+
qr as StackedLineChart,
|
|
1411
|
+
zr as StatusBar,
|
|
1412
|
+
Zs as StatusName,
|
|
1413
|
+
xa as TOUCH_TARGET,
|
|
1414
|
+
dr as TabContentContainer,
|
|
1415
|
+
kr as ToggleButtonListItem,
|
|
1416
|
+
Ur as ToggleListItem,
|
|
1417
|
+
vr as TrackType,
|
|
1418
|
+
vs as TransactionStatus,
|
|
1419
|
+
nt as TransactionType,
|
|
1420
|
+
L as UserApi,
|
|
1421
|
+
ge as UserStore,
|
|
1422
|
+
se as UserVerification,
|
|
1423
|
+
Q as WidgetApi,
|
|
1424
|
+
Ls as WidgetContainer,
|
|
1425
|
+
Aa as WidgetContainerContext,
|
|
1426
|
+
Ea as WidgetContainerProvider,
|
|
1427
|
+
hs as analyticsSession,
|
|
1428
|
+
lo as buildDynamicCopy,
|
|
1429
|
+
uo as buildPluralCopy,
|
|
1430
|
+
ma as formatCurrency,
|
|
1431
|
+
Jr as formatDate,
|
|
1432
|
+
_a as formatOrdinal,
|
|
1433
|
+
ya as formatPercentage,
|
|
1434
|
+
io as fromTimestampToMonthYear,
|
|
1435
|
+
eo as getCategory,
|
|
1436
|
+
so as getCategoryTotalsByParent,
|
|
1437
|
+
es as getClientTheme,
|
|
1438
|
+
fa as getCurrencyCodes,
|
|
1439
|
+
ro as getDetailedCategory,
|
|
1440
|
+
ao as getDetailedSubCategory,
|
|
1441
|
+
ho as getLocale,
|
|
1442
|
+
oo as isIncome,
|
|
1443
|
+
Sa as isValidNumber,
|
|
1444
|
+
Ta as useAccountStore,
|
|
1445
|
+
Ia as useAppConfig,
|
|
1446
|
+
Ba as useBudgetsStore,
|
|
1447
|
+
Na as useCashflowStore,
|
|
1448
|
+
Fa as useCategoryStore,
|
|
1449
|
+
gs as useCombineEvents,
|
|
1450
|
+
ps as useCombinePageviews,
|
|
1451
|
+
Ma as useDebtStore,
|
|
1452
|
+
$a as useEvent,
|
|
1453
|
+
La as useFinstrongStore,
|
|
1454
|
+
Ra as useGlobalCopyStore,
|
|
1455
|
+
ka as useGlobalStore,
|
|
1456
|
+
Ua as useGlobalUiStore,
|
|
1457
|
+
Oa as useGoalStore,
|
|
1458
|
+
Ga as useHelpStore,
|
|
1459
|
+
Ha as useHoldingStore,
|
|
1460
|
+
Qr as useInsightsEnabled,
|
|
1461
|
+
Pa as useMerchantStore,
|
|
1462
|
+
Wa as useNetWorthStore,
|
|
1463
|
+
qa as useNotificationStore,
|
|
1464
|
+
Qa as usePageView,
|
|
1465
|
+
as as usePrevious,
|
|
1466
|
+
Ya as useRecurringTransactionsStore,
|
|
1467
|
+
Ja as useScreenSize,
|
|
1468
|
+
za as useSettingsStore,
|
|
1469
|
+
Xa as useTransactionStore,
|
|
1470
|
+
Ka as useTrendsStore,
|
|
1471
|
+
ja as useUserStore,
|
|
1472
|
+
Va as useWidgetContainerProvider
|
|
1414
1473
|
};
|