@mx-cartographer/experiences 7.0.28-alpha.mega1 → 7.0.28
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 +4 -0
- package/dist/common/index.es.js +566 -531
- package/dist/common/utils/Theme.d.ts +102 -24
- package/dist/debts/components/DebtDrawer.d.ts +2 -1
- package/dist/debts/components/PaydownDrawer.d.ts +2 -1
- package/dist/debts/components/SnowballDrawer.d.ts +2 -1
- package/dist/debts/index.es.js +281 -278
- package/dist/transactions/index.es.js +254 -254
- package/package.json +1 -1
package/dist/common/index.es.js
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import { A as
|
|
3
|
-
import { F as y, A as
|
|
4
|
-
import { B as
|
|
1
|
+
import { G as M } from "../useCombineEvents-DaDBSR_1.mjs";
|
|
2
|
+
import { A as ts, a as es, u as ss, b as as } from "../useCombineEvents-DaDBSR_1.mjs";
|
|
3
|
+
import { F as y, A as l } from "../Fetch-CkFKy79O.mjs";
|
|
4
|
+
import { B as os } from "../BeatApi-DLu87ijw.mjs";
|
|
5
5
|
import { C as et } from "../CategoryStore-BOyzQjQp.mjs";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as is } from "../CategoryStore-BOyzQjQp.mjs";
|
|
7
7
|
import { N as st } from "../NotificationStore-DHtSGySy.mjs";
|
|
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 { R as
|
|
20
|
-
import { S as
|
|
8
|
+
import { a as ds } from "../NotificationStore-DHtSGySy.mjs";
|
|
9
|
+
import { T as at } from "../User-D-O9EHMb.mjs";
|
|
10
|
+
import { C as us, b as hs, L as gs, a as ps } from "../User-D-O9EHMb.mjs";
|
|
11
|
+
import { H as rt } from "../Help-DhcC-C05.mjs";
|
|
12
|
+
import { E as _s } from "../Help-DhcC-C05.mjs";
|
|
13
|
+
import { M as fs } from "../MicroWidgetContainer-DPDsZIiS.mjs";
|
|
14
|
+
import { M as bs } from "../MiniWidgetContainer-BzW7V_04.mjs";
|
|
15
|
+
import { A as xs, D as Cs, W as Ds } from "../WidgetContainer-Bn6JPnY3.mjs";
|
|
16
|
+
import { i as As, a as Es, e as Ts, l as Bs, A as Is, f as Ns, j as Fs, d as Ms, k as $s, E as Rs, h as Us, N as ks, g as Ls, P as Os, m as Gs, S as Hs } from "../ConnectDrawer-D86nRDxQ.mjs";
|
|
17
|
+
import { C as qs } from "../CurrencyInput-BkflFU_-.mjs";
|
|
18
|
+
import { L as Qs } from "../Loader-DUaFpDGv.mjs";
|
|
19
|
+
import { R as zs } from "../ResponsiveButton-DZFp78fJ.mjs";
|
|
20
|
+
import { S as Ks } from "../SearchBox-B2_zLv8-.mjs";
|
|
21
21
|
import { T as ot } from "../TransactionStore-CZOvxcSw.mjs";
|
|
22
|
-
import { S as
|
|
23
|
-
import { T as
|
|
24
|
-
import { I as
|
|
25
|
-
import { D as
|
|
22
|
+
import { S as Vs } from "../TransactionStore-CZOvxcSw.mjs";
|
|
23
|
+
import { T as Js } from "../TabContentContainer-j01JYR_7.mjs";
|
|
24
|
+
import { I as ea } from "../IconBacking-B9oC6uL2.mjs";
|
|
25
|
+
import { D as aa, F as ra, a as oa, c as na, R as ia, S as ca } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
26
26
|
import { C as nt } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
27
|
-
import { I as
|
|
27
|
+
import { I as la } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
28
28
|
import { d as it } from "../GoalStore-BQRcowCN.mjs";
|
|
29
|
-
import { C as
|
|
30
|
-
import { C as
|
|
31
|
-
import { E as
|
|
32
|
-
import { L as
|
|
29
|
+
import { C as ha, G as ga, M as pa, T as ma } from "../GoalStore-BQRcowCN.mjs";
|
|
30
|
+
import { C as ya } from "../CurrencyText-YUhH2caW.mjs";
|
|
31
|
+
import { E as Sa } from "../EmptyState-C0lr9E5T.mjs";
|
|
32
|
+
import { L as wa } from "../ListItemAction-BgKx_n6d.mjs";
|
|
33
33
|
import { T as ct } from "../TrendsStore-pvzHAX6B.mjs";
|
|
34
|
-
import { L as
|
|
35
|
-
import { A as
|
|
36
|
-
import { jsxs as
|
|
37
|
-
import
|
|
34
|
+
import { L as Ca, S as Da } from "../TrendsStore-pvzHAX6B.mjs";
|
|
35
|
+
import { A as Aa, B as Ea, I as Ta, N as Ba, T as Ia, a as Na } from "../Notification-aGCHxikw.mjs";
|
|
36
|
+
import { jsxs as _, jsx as c } from "react/jsx-runtime";
|
|
37
|
+
import dt, { useRef as lt, useEffect as ut } from "react";
|
|
38
38
|
import { css as w, keyframes as ht } from "@mxenabled/cssinjs";
|
|
39
39
|
import { useTokens as x, Text as B } from "@mxenabled/mxui";
|
|
40
|
-
import { D as
|
|
41
|
-
import { L as
|
|
42
|
-
import { S as
|
|
43
|
-
import { D as
|
|
40
|
+
import { D as Ma } from "../Donut-1UMNcG67.mjs";
|
|
41
|
+
import { L as Ra } from "../LineChart-Dyps2sOy.mjs";
|
|
42
|
+
import { S as ka } from "../StatusBar-BK_uYHAB.mjs";
|
|
43
|
+
import { D as Oa, a as Ga, O as Ha, b as Pa, f as qa } from "../Dialog-CWW597AF.mjs";
|
|
44
44
|
import { D as gt, a as pt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
45
|
-
import { S as
|
|
46
|
-
import { D as
|
|
47
|
-
import { I as
|
|
48
|
-
import { b as
|
|
49
|
-
import { C as
|
|
50
|
-
import { C as
|
|
45
|
+
import { S as Qa } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
46
|
+
import { D as za } from "../Drawer-kEE73B87.mjs";
|
|
47
|
+
import { I as Ka, P as ja, S as Va } from "../Account-CK-DrCEa.mjs";
|
|
48
|
+
import { b as E } from "../Category-CevNQ03n.mjs";
|
|
49
|
+
import { C as Ja, c as tr, a as er, P as sr } from "../Category-CevNQ03n.mjs";
|
|
50
|
+
import { C as rr, f as or, b as nr, a as ir, g as cr, i as dr } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
51
51
|
import { R as mt } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
52
|
-
import { S as
|
|
53
|
-
import { G as
|
|
54
|
-
import { u as
|
|
55
|
-
import { u as
|
|
56
|
-
import { makeAutoObservable as
|
|
57
|
-
import { a as
|
|
58
|
-
import
|
|
52
|
+
import { S as ur, T as hr } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
53
|
+
import { G as pr, A as mr, B as _r, W as yr, c as fr, m as Sr, h as br, t as wr, l as xr, x as Cr, f as Dr, w as vr, u as Ar, e as Er, a as Tr, k as Br, y as Ir, s as Nr, b as Fr, q as Mr, n as $r, z as Rr, i as Ur, r as kr, g as Lr, v as Or, o as Gr, p as Hr } from "../hooks-DlI63qSB.mjs";
|
|
54
|
+
import { u as qr } from "../useInsightsEnabled-fGr6xrSj.mjs";
|
|
55
|
+
import { u as Qr } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
56
|
+
import { makeAutoObservable as m, runInAction as p, reaction as _t } from "mobx";
|
|
57
|
+
import { a as yt } from "../AccountStore-DiGbJBUT.mjs";
|
|
58
|
+
import ft from "posthog-js";
|
|
59
59
|
import { B as St } from "../BeatStore-By4aGoRM.mjs";
|
|
60
60
|
import { endOfMonth as Z } from "date-fns/endOfMonth";
|
|
61
61
|
import { startOfMonth as J } from "date-fns/startOfMonth";
|
|
62
|
-
import { startOfToday as
|
|
63
|
-
import { f as bt, a as wt, b as
|
|
64
|
-
import { g as
|
|
62
|
+
import { startOfToday as L } from "date-fns/startOfToday";
|
|
63
|
+
import { f as bt, a as wt, b as O } from "../BudgetUtil-D5jO0box.mjs";
|
|
64
|
+
import { g as zr, e as Xr, c as Kr, d as jr, i as Vr } from "../BudgetUtil-D5jO0box.mjs";
|
|
65
65
|
import { a as xt } from "../DebtsStore-qrqY9Abz.mjs";
|
|
66
66
|
import { a as Ct } from "../FinstrongStore-mkALvztw.mjs";
|
|
67
|
-
import { A as Dt, m as
|
|
68
|
-
import { M as
|
|
67
|
+
import { A as Dt, m as vt, a as At, b as Et } from "../InvestmentUtil-jOyOgzIB.mjs";
|
|
68
|
+
import { M as Tt } from "../MerchantStore-DVH-QOf0.mjs";
|
|
69
69
|
import { N as Bt } from "../NetWorthStore-DWG9Mkuu.mjs";
|
|
70
70
|
import { a as It } from "../SettingsStore-B0kRTFjD.mjs";
|
|
71
71
|
import { addMonths as Nt } from "date-fns/addMonths";
|
|
72
|
-
import { getMonth as
|
|
73
|
-
import { i as
|
|
74
|
-
import { b as
|
|
75
|
-
import { alpha as
|
|
76
|
-
var
|
|
77
|
-
const
|
|
72
|
+
import { getMonth as T } from "date-fns/getMonth";
|
|
73
|
+
import { i as Jr } from "../DateUtil-BcuH7ErC.mjs";
|
|
74
|
+
import { b as eo, a as so, g as ao } from "../Localization-2MODESHW.mjs";
|
|
75
|
+
import { alpha as Ft, lighten as G, darken as H } from "@mui/material";
|
|
76
|
+
var Mt = /* @__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))(Mt || {});
|
|
77
|
+
const qe = [
|
|
78
78
|
{ id: 0, copy: "frequency_unknown" },
|
|
79
79
|
{ id: 1, copy: "frequency_every_week" },
|
|
80
80
|
{ id: 2, copy: "frequency_every_other_week" },
|
|
@@ -83,110 +83,145 @@ const Ye = [
|
|
|
83
83
|
{ id: 5, copy: "frequency_every_quarter" },
|
|
84
84
|
{ id: 6, copy: "frequency_every_other_quarter" },
|
|
85
85
|
{ id: 7, copy: "frequency_every_year" }
|
|
86
|
-
],
|
|
86
|
+
], We = {
|
|
87
87
|
ERROR: "ERROR",
|
|
88
88
|
LOADING: "LOADING",
|
|
89
89
|
SUCCESS: "SUCCESS"
|
|
90
90
|
};
|
|
91
91
|
var $t = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))($t || {}), Rt = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))(Rt || {});
|
|
92
|
-
const
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"ParagraphSmall",
|
|
111
|
-
"subtitle2",
|
|
112
|
-
"Tiny",
|
|
113
|
-
"tiny"
|
|
114
|
-
], Ot = [
|
|
115
|
-
{ key: "primary", light: "primary_color", dark: "primary_color_dark" },
|
|
116
|
-
{ key: "secondary", light: "neutral_color", dark: "neutral_color_dark" },
|
|
117
|
-
{ key: "error", light: "error_color", dark: "error_color_dark" },
|
|
118
|
-
{ key: "warning", light: "warning_color", dark: "warning_color_dark" },
|
|
119
|
-
{ key: "info", light: "info_color", dark: "info_color_dark" },
|
|
120
|
-
{ key: "success", light: "success_color", dark: "success_color_dark" }
|
|
121
|
-
], ze = (s, t) => {
|
|
122
|
-
const e = s.palette.mode === "dark", r = t?.system_font ?? s.typography.fontFamily, a = (l, g) => l ? {
|
|
123
|
-
lighter: G(l, 0.5),
|
|
124
|
-
light: G(l, 0.25),
|
|
125
|
-
main: l,
|
|
126
|
-
dark: H(l, 0.25),
|
|
127
|
-
darker: H(l, 0.5)
|
|
128
|
-
} : g, o = Object.fromEntries(
|
|
129
|
-
Ot.map(({ key: l, light: g, dark: S }) => [
|
|
130
|
-
l,
|
|
131
|
-
a(
|
|
132
|
-
t?.[e ? S : g],
|
|
133
|
-
s.palette[l]
|
|
134
|
-
)
|
|
135
|
-
])
|
|
136
|
-
), d = Object.fromEntries(
|
|
137
|
-
Pt.map((l) => [
|
|
138
|
-
l,
|
|
139
|
-
l === "fontFamily" ? r : { fontFamily: r }
|
|
140
|
-
])
|
|
141
|
-
), c = {
|
|
92
|
+
const Qe = (s, t) => {
|
|
93
|
+
const e = s.palette.mode === "dark", a = (d, i) => {
|
|
94
|
+
const n = t?.[d];
|
|
95
|
+
return {
|
|
96
|
+
lighter: n ? G(n, 0.5) : i.lighter,
|
|
97
|
+
light: n ? G(n, 0.25) : i.light,
|
|
98
|
+
main: n || i.main,
|
|
99
|
+
dark: n ? H(n, 0.25) : i.dark,
|
|
100
|
+
darker: n ? H(n, 0.5) : i.darker
|
|
101
|
+
};
|
|
102
|
+
}, r = {
|
|
103
|
+
primary: a(e ? "primary_color_dark" : "primary_color", s.palette.primary),
|
|
104
|
+
secondary: a(e ? "neutral_color_dark" : "neutral_color", s.palette.secondary),
|
|
105
|
+
error: a(e ? "error_color_dark" : "error_color", s.palette.error),
|
|
106
|
+
warning: a(e ? "warning_color_dark" : "warning_color", s.palette.warning),
|
|
107
|
+
info: a(e ? "info_color_dark" : "info_color", s.palette.info),
|
|
108
|
+
success: a(e ? "success_color_dark" : "success_color", s.palette.success)
|
|
109
|
+
}, o = {
|
|
142
110
|
MuiTabs: {
|
|
143
111
|
styleOverrides: {
|
|
144
|
-
indicator: {
|
|
112
|
+
indicator: {
|
|
113
|
+
backgroundColor: r.primary.light
|
|
114
|
+
}
|
|
145
115
|
}
|
|
146
116
|
},
|
|
147
117
|
MuiPickersCalendarHeader: {
|
|
148
118
|
styleOverrides: {
|
|
149
119
|
switchViewButton: {
|
|
150
|
-
color:
|
|
151
|
-
"&:hover": {
|
|
120
|
+
color: r.primary.lighter,
|
|
121
|
+
"&:hover": {
|
|
122
|
+
backgroundColor: Ft(r.primary.light, 0.1)
|
|
123
|
+
}
|
|
152
124
|
}
|
|
153
125
|
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
...c,
|
|
157
|
-
...i && {
|
|
126
|
+
},
|
|
127
|
+
...t?.button_corner_radius ? {
|
|
158
128
|
MuiButton: {
|
|
159
129
|
styleOverrides: {
|
|
160
|
-
root: {
|
|
130
|
+
root: {
|
|
131
|
+
borderRadius: `${t.button_corner_radius}px`
|
|
132
|
+
}
|
|
161
133
|
}
|
|
162
|
-
}
|
|
163
|
-
|
|
134
|
+
}
|
|
135
|
+
} : {},
|
|
136
|
+
...t?.card_corner_radius ? {
|
|
137
|
+
MuiCard: {
|
|
164
138
|
styleOverrides: {
|
|
165
139
|
root: {
|
|
166
|
-
borderRadius: `${
|
|
167
|
-
minWidth: i,
|
|
168
|
-
minHeight: i
|
|
140
|
+
borderRadius: `${t.card_corner_radius}px`
|
|
169
141
|
}
|
|
170
142
|
}
|
|
171
143
|
},
|
|
172
|
-
|
|
144
|
+
MuiPaper: {
|
|
173
145
|
styleOverrides: {
|
|
174
|
-
root: {
|
|
146
|
+
root: {
|
|
147
|
+
borderRadius: `${t.card_corner_radius}px`
|
|
148
|
+
}
|
|
175
149
|
}
|
|
176
150
|
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
151
|
+
} : {}
|
|
152
|
+
};
|
|
153
|
+
return {
|
|
154
|
+
typography: {
|
|
155
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily,
|
|
156
|
+
H1: {
|
|
157
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
181
158
|
},
|
|
182
|
-
|
|
183
|
-
|
|
159
|
+
h1: {
|
|
160
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
161
|
+
},
|
|
162
|
+
H2: {
|
|
163
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
164
|
+
},
|
|
165
|
+
h2: {
|
|
166
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
167
|
+
},
|
|
168
|
+
H3: {
|
|
169
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
170
|
+
},
|
|
171
|
+
h3: {
|
|
172
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
173
|
+
},
|
|
174
|
+
Body: {
|
|
175
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
176
|
+
},
|
|
177
|
+
body1: {
|
|
178
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
179
|
+
},
|
|
180
|
+
Small: {
|
|
181
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
182
|
+
},
|
|
183
|
+
body2: {
|
|
184
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
185
|
+
},
|
|
186
|
+
Button: {
|
|
187
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
188
|
+
},
|
|
189
|
+
button: {
|
|
190
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
191
|
+
},
|
|
192
|
+
XSmall: {
|
|
193
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
194
|
+
},
|
|
195
|
+
caption: {
|
|
196
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
197
|
+
},
|
|
198
|
+
Paragraph: {
|
|
199
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
200
|
+
},
|
|
201
|
+
subtitle1: {
|
|
202
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
203
|
+
},
|
|
204
|
+
ParagraphSmall: {
|
|
205
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
206
|
+
},
|
|
207
|
+
subtitle2: {
|
|
208
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
209
|
+
},
|
|
210
|
+
Tiny: {
|
|
211
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
212
|
+
},
|
|
213
|
+
tiny: {
|
|
214
|
+
fontFamily: t?.system_font ?? s.typography.fontFamily
|
|
184
215
|
}
|
|
216
|
+
},
|
|
217
|
+
palette: r,
|
|
218
|
+
components: o,
|
|
219
|
+
shape: {
|
|
220
|
+
borderRadius: t?.button_corner_radius ?? s.shape.borderRadius
|
|
185
221
|
}
|
|
186
222
|
};
|
|
187
|
-
return { typography: d, palette: o, components: p };
|
|
188
223
|
};
|
|
189
|
-
class
|
|
224
|
+
class P {
|
|
190
225
|
fetchInstance;
|
|
191
226
|
constructor(t) {
|
|
192
227
|
this.fetchInstance = new y(t, "", {
|
|
@@ -197,68 +232,68 @@ class F {
|
|
|
197
232
|
getBanner = async (t) => {
|
|
198
233
|
try {
|
|
199
234
|
const e = `/banner/${t}/account_widget_banner`;
|
|
200
|
-
return this.fetchInstance?.get(e).then((
|
|
235
|
+
return this.fetchInstance?.get(e).then((a) => a.banner) ?? {};
|
|
201
236
|
} catch (e) {
|
|
202
237
|
return console.error("Error fetching banner:", e), null;
|
|
203
238
|
}
|
|
204
239
|
};
|
|
205
240
|
}
|
|
206
|
-
class
|
|
241
|
+
class Ye {
|
|
207
242
|
fetchInstance;
|
|
208
243
|
constructor(t, e) {
|
|
209
244
|
this.fetchInstance = new y(t, e);
|
|
210
245
|
}
|
|
211
|
-
getLocalizedCopy = async (t) => this.fetchInstance.post(
|
|
212
|
-
getLocalizedContent = async (t) => this.fetchInstance.post(`${
|
|
246
|
+
getLocalizedCopy = async (t) => this.fetchInstance.post(l.LOCALIZED_COPY, t).then((e) => e);
|
|
247
|
+
getLocalizedContent = async (t) => this.fetchInstance.post(`${l.LOCALIZED_CONTENT}/${t}`).then((e) => e);
|
|
213
248
|
}
|
|
214
|
-
class
|
|
249
|
+
class ze {
|
|
215
250
|
fetchInstance;
|
|
216
251
|
constructor(t, e) {
|
|
217
252
|
this.fetchInstance = new y(t, e);
|
|
218
253
|
}
|
|
219
|
-
addScheduledPayment = async (t) => this.fetchInstance.post(
|
|
254
|
+
addScheduledPayment = async (t) => this.fetchInstance.post(l.SCHEDULED_PAYMENTS, {
|
|
220
255
|
...t,
|
|
221
256
|
is_recurring: "true",
|
|
222
|
-
transaction_type:
|
|
257
|
+
transaction_type: at.DEBIT
|
|
223
258
|
}).then((e) => e.scheduled_payment);
|
|
224
|
-
getScheduledPayments = async () => this.fetchInstance.get(
|
|
225
|
-
updateScheduledPayment = async (t) => this.fetchInstance.put(`${
|
|
226
|
-
deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${
|
|
259
|
+
getScheduledPayments = async () => this.fetchInstance.get(l.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
|
|
260
|
+
updateScheduledPayment = async (t) => this.fetchInstance.put(`${l.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
|
|
261
|
+
deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${l.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
|
|
227
262
|
}
|
|
228
263
|
class $ {
|
|
229
264
|
fetchInstance;
|
|
230
265
|
constructor(t, e) {
|
|
231
266
|
this.fetchInstance = new y(t, e);
|
|
232
267
|
}
|
|
233
|
-
getUserFeatures = async () => this.fetchInstance.get(
|
|
234
|
-
updateUser = async (t) => this.fetchInstance.put(
|
|
235
|
-
updateUserProfile = async (t) => this.fetchInstance.put(`${
|
|
268
|
+
getUserFeatures = async () => this.fetchInstance.get(l.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
|
|
269
|
+
updateUser = async (t) => this.fetchInstance.put(l.USER, t).then((e) => e.user);
|
|
270
|
+
updateUserProfile = async (t) => this.fetchInstance.put(`${l.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
|
|
236
271
|
}
|
|
237
|
-
class
|
|
272
|
+
class q {
|
|
238
273
|
fetchInstance;
|
|
239
274
|
constructor(t, e) {
|
|
240
275
|
this.fetchInstance = new y(t, e);
|
|
241
276
|
}
|
|
242
|
-
requestWidgetUrl = async (t) => this.fetchInstance.post(
|
|
277
|
+
requestWidgetUrl = async (t) => this.fetchInstance.post(l.WIDGET_URLS, t).then((e) => e.widget_url);
|
|
243
278
|
}
|
|
244
|
-
const
|
|
245
|
-
const t =
|
|
279
|
+
const Xe = (s) => {
|
|
280
|
+
const t = lt();
|
|
246
281
|
return ut(() => {
|
|
247
282
|
t.current = s;
|
|
248
283
|
}, [s]), t.current;
|
|
249
284
|
}, Ut = ({ color: s, labelAverage: t, labelMain: e }) => {
|
|
250
|
-
const
|
|
251
|
-
return /* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
285
|
+
const a = x(), r = kt(a, s);
|
|
286
|
+
return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-chart-legend ${r}`, children: [
|
|
287
|
+
/* @__PURE__ */ c("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
|
|
288
|
+
/* @__PURE__ */ c(B, { variant: "XSmall", children: e }),
|
|
289
|
+
/* @__PURE__ */ _("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
|
|
290
|
+
/* @__PURE__ */ c("div", { className: "mx-cmn-dot" }),
|
|
291
|
+
/* @__PURE__ */ c("div", { className: "mx-cmn-dot" }),
|
|
292
|
+
/* @__PURE__ */ c("div", { className: "mx-cmn-dot" })
|
|
258
293
|
] }),
|
|
259
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ c(B, { variant: "XSmall", children: t })
|
|
260
295
|
] });
|
|
261
|
-
},
|
|
296
|
+
}, kt = (s, t) => w({
|
|
262
297
|
alignItems: "center",
|
|
263
298
|
display: "flex",
|
|
264
299
|
gap: s.Spacing.XSmall,
|
|
@@ -284,47 +319,47 @@ const Ke = (s) => {
|
|
|
284
319
|
"& > .kyper-text": {
|
|
285
320
|
marginRight: s.Spacing.XSmall
|
|
286
321
|
}
|
|
287
|
-
}),
|
|
322
|
+
}), W = ({
|
|
288
323
|
ariaLabel: s,
|
|
289
324
|
color: t,
|
|
290
325
|
height: e,
|
|
291
|
-
index:
|
|
292
|
-
label:
|
|
326
|
+
index: a,
|
|
327
|
+
label: r,
|
|
293
328
|
onClick: o,
|
|
294
329
|
selectedIndex: d,
|
|
295
|
-
value:
|
|
330
|
+
value: i
|
|
296
331
|
}) => {
|
|
297
|
-
const
|
|
298
|
-
o && (S.key === " " || S.key === "Enter") && o(
|
|
299
|
-
},
|
|
332
|
+
const n = x(), u = Lt(n, t, e), h = (S) => {
|
|
333
|
+
o && (S.key === " " || S.key === "Enter") && o(a);
|
|
334
|
+
}, f = d === void 0 || d === a ? "primary" : "secondary", g = () => /* @__PURE__ */ c(
|
|
300
335
|
B,
|
|
301
336
|
{
|
|
302
337
|
"aria-hidden": !0,
|
|
303
|
-
bold: d ===
|
|
338
|
+
bold: d === a,
|
|
304
339
|
className: "mx-cmn-bar-text",
|
|
305
|
-
color:
|
|
340
|
+
color: f,
|
|
306
341
|
component: "div",
|
|
307
342
|
variant: "Small",
|
|
308
|
-
children:
|
|
343
|
+
children: r
|
|
309
344
|
}
|
|
310
345
|
);
|
|
311
|
-
return /* @__PURE__ */
|
|
312
|
-
|
|
313
|
-
/* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-container ${u} ${i < 0 ? "mx-cmn-negative" : ""}`, children: [
|
|
347
|
+
i >= 0 && /* @__PURE__ */ c(g, {}),
|
|
348
|
+
/* @__PURE__ */ c(
|
|
314
349
|
"div",
|
|
315
350
|
{
|
|
316
351
|
"aria-label": s,
|
|
317
|
-
className: `mx-cmn-bar ${o ? "mx-cmn-clickable" : ""} ${
|
|
318
|
-
onClick: o ? () => o?.(
|
|
319
|
-
onKeyDown:
|
|
352
|
+
className: `mx-cmn-bar ${o ? "mx-cmn-clickable" : ""} ${i < 0 ? "mx-cmn-bar-negative" : ""}`,
|
|
353
|
+
onClick: o ? () => o?.(a) : void 0,
|
|
354
|
+
onKeyDown: h,
|
|
320
355
|
role: s ? "button" : void 0,
|
|
321
356
|
tabIndex: s ? 0 : void 0
|
|
322
357
|
}
|
|
323
358
|
),
|
|
324
|
-
|
|
359
|
+
i < 0 && /* @__PURE__ */ c(g, {})
|
|
325
360
|
] });
|
|
326
|
-
},
|
|
327
|
-
const
|
|
361
|
+
}, Lt = (s, t, e) => {
|
|
362
|
+
const a = `expandBar-${Math.round(e)}`, r = ht(a, { from: { height: 0 }, to: { height: e } });
|
|
328
363
|
return w({
|
|
329
364
|
display: "flex",
|
|
330
365
|
flexDirection: "column",
|
|
@@ -337,7 +372,7 @@ const Ke = (s) => {
|
|
|
337
372
|
animationDelay: ".5s",
|
|
338
373
|
animationDuration: "1s",
|
|
339
374
|
animationFillMode: "forwards",
|
|
340
|
-
animationName:
|
|
375
|
+
animationName: r,
|
|
341
376
|
animationTimingFunction: s.Easing.Default,
|
|
342
377
|
backgroundColor: t,
|
|
343
378
|
borderRadius: `${s.BorderRadius.Medium}px ${s.BorderRadius.Medium}px 0 0`,
|
|
@@ -356,60 +391,60 @@ const Ke = (s) => {
|
|
|
356
391
|
width: "100%"
|
|
357
392
|
}
|
|
358
393
|
});
|
|
359
|
-
},
|
|
394
|
+
}, Q = ({
|
|
360
395
|
ariaLabel: s,
|
|
361
396
|
averageLineHeight: t,
|
|
362
397
|
bottomHeight: e,
|
|
363
|
-
color:
|
|
364
|
-
index:
|
|
398
|
+
color: a,
|
|
399
|
+
index: r = -1,
|
|
365
400
|
onClick: o,
|
|
366
401
|
range: d,
|
|
367
|
-
selectedIndex:
|
|
368
|
-
topHeight:
|
|
369
|
-
value:
|
|
370
|
-
valueLabel:
|
|
371
|
-
width:
|
|
402
|
+
selectedIndex: i,
|
|
403
|
+
topHeight: n,
|
|
404
|
+
value: u,
|
|
405
|
+
valueLabel: h = "",
|
|
406
|
+
width: f,
|
|
372
407
|
xAxisLabel: g = ""
|
|
373
408
|
}) => {
|
|
374
|
-
const S = x(), C =
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
|
|
409
|
+
const S = x(), C = Ot(S, f), D = u / d * n, v = Math.abs(u) / d * e, A = i === void 0 || i === r ? "primary" : "secondary";
|
|
410
|
+
return /* @__PURE__ */ _("div", { className: `mx-cmn-barchart-bar-column ${C}`, children: [
|
|
411
|
+
/* @__PURE__ */ c("div", { style: { height: n }, children: u >= 0 && /* @__PURE__ */ c(
|
|
412
|
+
W,
|
|
378
413
|
{
|
|
379
414
|
ariaLabel: s,
|
|
380
|
-
color:
|
|
415
|
+
color: a,
|
|
381
416
|
height: D,
|
|
382
|
-
index:
|
|
383
|
-
label:
|
|
417
|
+
index: r,
|
|
418
|
+
label: h,
|
|
384
419
|
onClick: o,
|
|
385
|
-
selectedIndex:
|
|
386
|
-
value:
|
|
420
|
+
selectedIndex: i,
|
|
421
|
+
value: u
|
|
387
422
|
}
|
|
388
423
|
) }),
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
t !== 0 && /* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
-
|
|
424
|
+
/* @__PURE__ */ c("div", { className: "mx-cmn-zero-line" }),
|
|
425
|
+
t !== 0 && /* @__PURE__ */ c("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
|
|
426
|
+
/* @__PURE__ */ c("div", { style: { height: e }, children: u < 0 && /* @__PURE__ */ c(
|
|
427
|
+
W,
|
|
393
428
|
{
|
|
394
429
|
ariaLabel: s,
|
|
395
|
-
color:
|
|
396
|
-
height:
|
|
397
|
-
index:
|
|
398
|
-
label:
|
|
430
|
+
color: a,
|
|
431
|
+
height: v,
|
|
432
|
+
index: r,
|
|
433
|
+
label: h,
|
|
399
434
|
onClick: o,
|
|
400
|
-
value:
|
|
435
|
+
value: u
|
|
401
436
|
}
|
|
402
437
|
) }),
|
|
403
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ c(
|
|
404
439
|
"div",
|
|
405
440
|
{
|
|
406
441
|
className: `mx-cmn-bar-label ${o ? "mx-cmn-clickable" : ""}`,
|
|
407
|
-
onClick: o ? () => o(
|
|
408
|
-
children: /* @__PURE__ */
|
|
442
|
+
onClick: o ? () => o(r) : void 0,
|
|
443
|
+
children: /* @__PURE__ */ c(B, { bold: i === r, color: A, variant: "Small", children: g })
|
|
409
444
|
}
|
|
410
445
|
)
|
|
411
446
|
] });
|
|
412
|
-
},
|
|
447
|
+
}, Ot = (s, t) => w({
|
|
413
448
|
display: "flex",
|
|
414
449
|
flexDirection: "column",
|
|
415
450
|
flexGrow: t === void 0 ? 1 : 0,
|
|
@@ -434,61 +469,61 @@ const Ke = (s) => {
|
|
|
434
469
|
"& .mx-cmn-clickable": {
|
|
435
470
|
cursor: "pointer"
|
|
436
471
|
}
|
|
437
|
-
}),
|
|
438
|
-
const
|
|
439
|
-
return s ?
|
|
440
|
-
},
|
|
472
|
+
}), Gt = (s, t) => s + t, Ht = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, Pt = (s, t) => [...s, t.value], Y = (s, t, e) => {
|
|
473
|
+
const a = s && t ? e / 2 : e;
|
|
474
|
+
return s ? a : 0;
|
|
475
|
+
}, qt = (s, t, e, a) => s / (t < 0 ? -e : t) * a || 0, Wt = ({
|
|
441
476
|
average: s,
|
|
442
477
|
barWidth: t = "8%",
|
|
443
478
|
color: e,
|
|
444
|
-
data:
|
|
445
|
-
height:
|
|
479
|
+
data: a,
|
|
480
|
+
height: r,
|
|
446
481
|
legendLabelAverage: o,
|
|
447
482
|
legendLabelMain: d,
|
|
448
|
-
onBarClick:
|
|
449
|
-
selectedIndex:
|
|
450
|
-
valueFormatter:
|
|
483
|
+
onBarClick: i,
|
|
484
|
+
selectedIndex: n,
|
|
485
|
+
valueFormatter: u = (h) => `${h}`
|
|
451
486
|
}) => {
|
|
452
|
-
const
|
|
453
|
-
|
|
487
|
+
const h = x(), f = Qt(h), g = a.reduce(Pt, []), S = s !== void 0 ? s : g.reduce(Gt, 0) / g.length, C = Math.max(...g), D = Math.min(...g), v = g.reduce(Ht, 0), A = C >= 0, R = D < 0, I = Y(A, R, r), N = Y(R, A, r), U = qt(S, C, D, I || N), tt = (b) => n === void 0 || b === n ? e : `${e}80`, k = () => /* @__PURE__ */ c(
|
|
488
|
+
Q,
|
|
454
489
|
{
|
|
455
|
-
averageLineHeight:
|
|
490
|
+
averageLineHeight: U,
|
|
456
491
|
bottomHeight: N,
|
|
457
492
|
color: "",
|
|
458
|
-
range:
|
|
493
|
+
range: v,
|
|
459
494
|
topHeight: I,
|
|
460
495
|
value: 0,
|
|
461
496
|
width: void 0
|
|
462
497
|
}
|
|
463
498
|
);
|
|
464
|
-
return /* @__PURE__ */
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
|
|
499
|
+
return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-chart ${f}`, children: [
|
|
500
|
+
/* @__PURE__ */ _("div", { className: "mx-cmn-chart-container", children: [
|
|
501
|
+
/* @__PURE__ */ c(k, {}),
|
|
502
|
+
a.map((b, F) => /* @__PURE__ */ _(dt.Fragment, { children: [
|
|
503
|
+
/* @__PURE__ */ c(
|
|
504
|
+
Q,
|
|
470
505
|
{
|
|
471
506
|
ariaLabel: b.ariaLabel,
|
|
472
|
-
averageLineHeight:
|
|
507
|
+
averageLineHeight: U,
|
|
473
508
|
bottomHeight: N,
|
|
474
|
-
color: tt(
|
|
475
|
-
index:
|
|
476
|
-
onClick:
|
|
477
|
-
range:
|
|
478
|
-
selectedIndex:
|
|
509
|
+
color: tt(F),
|
|
510
|
+
index: F,
|
|
511
|
+
onClick: i,
|
|
512
|
+
range: v,
|
|
513
|
+
selectedIndex: n,
|
|
479
514
|
topHeight: I,
|
|
480
515
|
value: b.value,
|
|
481
|
-
valueLabel:
|
|
516
|
+
valueLabel: u(b.value),
|
|
482
517
|
width: t,
|
|
483
518
|
xAxisLabel: b.label
|
|
484
519
|
}
|
|
485
520
|
),
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
] }, `column-${
|
|
521
|
+
/* @__PURE__ */ c(k, {})
|
|
522
|
+
] }, `column-${F}`))
|
|
488
523
|
] }),
|
|
489
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ c(Ut, { color: e, labelAverage: o, labelMain: d })
|
|
490
525
|
] });
|
|
491
|
-
},
|
|
526
|
+
}, Qt = (s) => w({
|
|
492
527
|
"& .mx-cmn-chart-container": {
|
|
493
528
|
alignItems: "flex-end",
|
|
494
529
|
display: "flex",
|
|
@@ -496,47 +531,47 @@ const Ke = (s) => {
|
|
|
496
531
|
marginTop: s.Spacing.Large,
|
|
497
532
|
marginBottom: s.Spacing.Medium
|
|
498
533
|
}
|
|
499
|
-
}),
|
|
534
|
+
}), Ke = Wt, Yt = ({
|
|
500
535
|
hasGap: s = !1,
|
|
501
536
|
segments: t,
|
|
502
537
|
size: e = gt,
|
|
503
|
-
strokeWidth:
|
|
504
|
-
children:
|
|
538
|
+
strokeWidth: a = pt,
|
|
539
|
+
children: r
|
|
505
540
|
}) => {
|
|
506
|
-
const o = x(), d =
|
|
507
|
-
let
|
|
508
|
-
return /* @__PURE__ */
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
541
|
+
const o = x(), d = zt(o, e), i = (e - a) / 2, n = e / 2;
|
|
542
|
+
let u = -90 - (s ? 1 : 0), h = 0;
|
|
543
|
+
return /* @__PURE__ */ _("div", { className: `mx-cmn-multi-segment-donut ${d}`, children: [
|
|
544
|
+
/* @__PURE__ */ _("svg", { height: e, width: e, children: [
|
|
545
|
+
/* @__PURE__ */ c(
|
|
511
546
|
"circle",
|
|
512
547
|
{
|
|
513
|
-
cx:
|
|
514
|
-
cy:
|
|
548
|
+
cx: n,
|
|
549
|
+
cy: n,
|
|
515
550
|
fill: "none",
|
|
516
|
-
r:
|
|
551
|
+
r: i,
|
|
517
552
|
stroke: o.Color.Neutral300,
|
|
518
|
-
strokeWidth:
|
|
553
|
+
strokeWidth: a
|
|
519
554
|
}
|
|
520
555
|
),
|
|
521
|
-
t.map((
|
|
556
|
+
t.map((f, g) => (u += 360 * h + (s ? 1 : 0), h = (f.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ c(
|
|
522
557
|
"circle",
|
|
523
558
|
{
|
|
524
|
-
cx:
|
|
525
|
-
cy:
|
|
559
|
+
cx: n,
|
|
560
|
+
cy: n,
|
|
526
561
|
fill: "none",
|
|
527
|
-
r:
|
|
528
|
-
stroke:
|
|
529
|
-
strokeDasharray: 2 * Math.PI *
|
|
530
|
-
strokeDashoffset: 2 * Math.PI *
|
|
531
|
-
strokeWidth:
|
|
532
|
-
transform: `rotate(${
|
|
562
|
+
r: i,
|
|
563
|
+
stroke: f.color,
|
|
564
|
+
strokeDasharray: 2 * Math.PI * i,
|
|
565
|
+
strokeDashoffset: 2 * Math.PI * i * (1 - h),
|
|
566
|
+
strokeWidth: a,
|
|
567
|
+
transform: `rotate(${u}, ${n}, ${n})`
|
|
533
568
|
},
|
|
534
569
|
g
|
|
535
570
|
)))
|
|
536
571
|
] }),
|
|
537
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ c("div", { className: "mx-cmn-multi-segment-donut-children", children: r })
|
|
538
573
|
] });
|
|
539
|
-
},
|
|
574
|
+
}, zt = (s, t) => w({
|
|
540
575
|
height: t,
|
|
541
576
|
marginTop: `-${s.Spacing.XSmall}px`,
|
|
542
577
|
position: "relative",
|
|
@@ -548,38 +583,38 @@ const Ke = (s) => {
|
|
|
548
583
|
top: "50%",
|
|
549
584
|
transform: "translate(-50%, -50%)"
|
|
550
585
|
}
|
|
551
|
-
}),
|
|
552
|
-
class
|
|
586
|
+
}), je = Yt;
|
|
587
|
+
class Xt {
|
|
553
588
|
globalStore;
|
|
554
|
-
api = new
|
|
589
|
+
api = new M("/", "");
|
|
555
590
|
copy = {};
|
|
556
591
|
featureNamespace = "experiences";
|
|
557
592
|
isInitialized = !1;
|
|
558
593
|
constructor(t) {
|
|
559
|
-
this.globalStore = t, this.api = new
|
|
594
|
+
this.globalStore = t, this.api = new M(t.endpoint, t.sessionToken), m(this);
|
|
560
595
|
}
|
|
561
596
|
// DEPRECATED: Initialize api in constructor and use loadCopy instead
|
|
562
597
|
// TODO: Remove this function
|
|
563
598
|
initialize = async (t, e) => {
|
|
564
|
-
this.api = new
|
|
599
|
+
this.api = new M(t, e), await this.loadCopy();
|
|
565
600
|
};
|
|
566
601
|
loadCopy = async () => {
|
|
567
|
-
await this.getCopy(this.featureNamespace),
|
|
602
|
+
await this.getCopy(this.featureNamespace), p(() => {
|
|
568
603
|
this.isInitialized = !0;
|
|
569
604
|
});
|
|
570
605
|
};
|
|
571
606
|
getCopy = async (t, e = "") => {
|
|
572
607
|
try {
|
|
573
|
-
const
|
|
574
|
-
|
|
575
|
-
this.copy =
|
|
608
|
+
const a = await this.api.getGlobalCopy(t, e);
|
|
609
|
+
p(() => {
|
|
610
|
+
this.copy = a[t];
|
|
576
611
|
});
|
|
577
|
-
} catch (
|
|
578
|
-
console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${
|
|
612
|
+
} catch (a) {
|
|
613
|
+
console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${a}`);
|
|
579
614
|
}
|
|
580
615
|
};
|
|
581
616
|
}
|
|
582
|
-
class
|
|
617
|
+
class Kt {
|
|
583
618
|
globalStore;
|
|
584
619
|
survey = null;
|
|
585
620
|
currentQuestionIndex = 0;
|
|
@@ -587,7 +622,7 @@ class Vt {
|
|
|
587
622
|
response = null;
|
|
588
623
|
responses = {};
|
|
589
624
|
constructor(t) {
|
|
590
|
-
this.globalStore = t,
|
|
625
|
+
this.globalStore = t, m(this);
|
|
591
626
|
}
|
|
592
627
|
get isLastQuestion() {
|
|
593
628
|
return this.currentQuestionIndex === this.surveyQuestions.length - 1;
|
|
@@ -609,11 +644,11 @@ class Vt {
|
|
|
609
644
|
return this.survey ? this.survey.questions : [];
|
|
610
645
|
}
|
|
611
646
|
loadSurvey = (t = !1) => {
|
|
612
|
-
|
|
613
|
-
|
|
647
|
+
ft.getActiveMatchingSurveys((e) => {
|
|
648
|
+
p(() => {
|
|
614
649
|
if (e.length > 0) {
|
|
615
|
-
const
|
|
616
|
-
|
|
650
|
+
const a = e.find((r) => r.id === this.surveyId);
|
|
651
|
+
a && (this.survey = a, this.currentQuestionIndex = 0, this.question = a.questions[0], this.response = null, this.responses = {});
|
|
617
652
|
}
|
|
618
653
|
});
|
|
619
654
|
}, t);
|
|
@@ -633,34 +668,34 @@ class z {
|
|
|
633
668
|
constructor(t, e) {
|
|
634
669
|
this.fetchInstance = new y(t, e);
|
|
635
670
|
}
|
|
636
|
-
addBudget = async (t, e,
|
|
671
|
+
addBudget = async (t, e, a = null) => this.fetchInstance.post(l.BUDGETS, {
|
|
637
672
|
amount: e,
|
|
638
673
|
category_guid: t.guid,
|
|
639
674
|
category_name: t.name,
|
|
640
|
-
parent_guid:
|
|
641
|
-
}).then((
|
|
642
|
-
throw
|
|
675
|
+
parent_guid: a
|
|
676
|
+
}).then((r) => r.budget).catch((r) => {
|
|
677
|
+
throw r;
|
|
643
678
|
});
|
|
644
|
-
deleteBudget = async (t) => this.fetchInstance.delete(`${
|
|
679
|
+
deleteBudget = async (t) => this.fetchInstance.delete(`${l.BUDGETS}/${t}`).then((e) => e).catch((e) => {
|
|
645
680
|
throw e;
|
|
646
681
|
});
|
|
647
|
-
getBudgets = async () => this.fetchInstance.get(
|
|
648
|
-
updateBudget = async (t) => this.fetchInstance.put(`${
|
|
682
|
+
getBudgets = async () => this.fetchInstance.get(l.BUDGETS).then((t) => t.budgets).catch((t) => t);
|
|
683
|
+
updateBudget = async (t) => this.fetchInstance.put(`${l.BUDGETS}/${t.guid}`, t).then((e) => e.budget).catch((e) => {
|
|
649
684
|
throw e;
|
|
650
685
|
});
|
|
651
686
|
}
|
|
652
|
-
class
|
|
687
|
+
class jt {
|
|
653
688
|
api = new z("/", "");
|
|
654
689
|
globalStore;
|
|
655
690
|
alert = "";
|
|
656
|
-
dateRange = { start: J(
|
|
691
|
+
dateRange = { start: J(L()), end: Z(L()) };
|
|
657
692
|
budgets = [];
|
|
658
693
|
selectedBudget;
|
|
659
694
|
selectedSubBudget;
|
|
660
695
|
isDataLoaded = !1;
|
|
661
696
|
theme = {};
|
|
662
697
|
constructor(t) {
|
|
663
|
-
this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken),
|
|
698
|
+
this.globalStore = t, this.api = new z(t.endpoint, t.sessionToken), m(this);
|
|
664
699
|
}
|
|
665
700
|
loadBudgetData = async () => {
|
|
666
701
|
await this.loadBudgets(), _t(
|
|
@@ -669,20 +704,20 @@ class Zt {
|
|
|
669
704
|
if (t) {
|
|
670
705
|
const e = this.selectedBudget;
|
|
671
706
|
e && (this.selectedBudget = bt(t, e.guid));
|
|
672
|
-
const
|
|
673
|
-
|
|
707
|
+
const a = this.selectedSubBudget;
|
|
708
|
+
a && a.parent_guid && (this.selectedSubBudget = wt(
|
|
674
709
|
t,
|
|
675
|
-
|
|
676
|
-
|
|
710
|
+
a.guid,
|
|
711
|
+
a.parent_guid
|
|
677
712
|
));
|
|
678
713
|
}
|
|
679
714
|
}
|
|
680
715
|
);
|
|
681
716
|
};
|
|
682
717
|
get detailedBudgets() {
|
|
683
|
-
return
|
|
718
|
+
return O(
|
|
684
719
|
this.budgets.filter(
|
|
685
|
-
(t) => t.category_guid !==
|
|
720
|
+
(t) => t.category_guid !== E.INCOME && t.category_guid !== E.TRANSFER && t.category_guid !== E.INVESTMENTS
|
|
686
721
|
),
|
|
687
722
|
this.globalStore.categoryStore.detailedCategories,
|
|
688
723
|
this.globalStore.copyStore.copy.budgets,
|
|
@@ -690,13 +725,13 @@ class Zt {
|
|
|
690
725
|
).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
|
|
691
726
|
}
|
|
692
727
|
get incomeBudget() {
|
|
693
|
-
return
|
|
694
|
-
this.budgets.filter((
|
|
728
|
+
return O(
|
|
729
|
+
this.budgets.filter((a) => !a.parent_guid),
|
|
695
730
|
this.globalStore.categoryStore.detailedCategories,
|
|
696
731
|
this.globalStore.copyStore.copy.budgets,
|
|
697
732
|
this.theme
|
|
698
733
|
).reduce(
|
|
699
|
-
(
|
|
734
|
+
(a, r) => r.category_guid !== E.INCOME ? a : !a || r.percentage > a.percentage ? r : a,
|
|
700
735
|
void 0
|
|
701
736
|
)?.amount;
|
|
702
737
|
}
|
|
@@ -708,20 +743,20 @@ class Zt {
|
|
|
708
743
|
get totalBudgeted() {
|
|
709
744
|
return this.detailedBudgets.reduce((t, e) => t + e.amount, 0);
|
|
710
745
|
}
|
|
711
|
-
addBudget = async (t, e,
|
|
746
|
+
addBudget = async (t, e, a = null) => {
|
|
712
747
|
try {
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
this.budgets.push(
|
|
748
|
+
const r = await this.api.addBudget(t, e, a);
|
|
749
|
+
p(() => {
|
|
750
|
+
this.budgets.push(r);
|
|
716
751
|
});
|
|
717
|
-
} catch (
|
|
718
|
-
console.error(`Error adding budget: ${
|
|
752
|
+
} catch (r) {
|
|
753
|
+
console.error(`Error adding budget: ${r}`);
|
|
719
754
|
}
|
|
720
755
|
};
|
|
721
756
|
deleteBudget = async (t) => {
|
|
722
757
|
try {
|
|
723
|
-
await this.api.deleteBudget(t),
|
|
724
|
-
const e = this.budgets.findIndex((
|
|
758
|
+
await this.api.deleteBudget(t), p(() => {
|
|
759
|
+
const e = this.budgets.findIndex((a) => a.guid === t);
|
|
725
760
|
e >= 0 && this.budgets.splice(e, 1);
|
|
726
761
|
});
|
|
727
762
|
} catch (e) {
|
|
@@ -731,7 +766,7 @@ class Zt {
|
|
|
731
766
|
loadBudgets = async () => {
|
|
732
767
|
try {
|
|
733
768
|
const t = await this.api.getBudgets();
|
|
734
|
-
|
|
769
|
+
p(() => {
|
|
735
770
|
this.budgets = t, this.isDataLoaded = !0;
|
|
736
771
|
});
|
|
737
772
|
} catch (t) {
|
|
@@ -749,18 +784,18 @@ class Zt {
|
|
|
749
784
|
*/
|
|
750
785
|
recalculateBudgets = async (t) => {
|
|
751
786
|
try {
|
|
752
|
-
for (const
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
...
|
|
756
|
-
amount:
|
|
757
|
-
}) : await this.api.addBudget(
|
|
787
|
+
for (const a of t) {
|
|
788
|
+
const r = this.budgets.find((o) => o.category_guid === a.guid);
|
|
789
|
+
r ? await this.api.updateBudget({
|
|
790
|
+
...r,
|
|
791
|
+
amount: a.totalAverageAmount
|
|
792
|
+
}) : await this.api.addBudget(a, a.totalAverageAmount);
|
|
758
793
|
}
|
|
759
794
|
const e = this.budgets.filter(
|
|
760
|
-
(
|
|
795
|
+
(a) => !t.find((r) => r.guid === a.category_guid)
|
|
761
796
|
);
|
|
762
|
-
for (const
|
|
763
|
-
await this.api.deleteBudget(
|
|
797
|
+
for (const a of e)
|
|
798
|
+
await this.api.deleteBudget(a.guid);
|
|
764
799
|
return await this.loadBudgets(), { data: this.budgets, isSuccess: !0 };
|
|
765
800
|
} catch (e) {
|
|
766
801
|
return console.error("error recalculating budgets", e), { data: [], isSuccess: !1 };
|
|
@@ -769,48 +804,48 @@ class Zt {
|
|
|
769
804
|
updateBudget = async (t) => {
|
|
770
805
|
try {
|
|
771
806
|
const e = await this.api.updateBudget(t);
|
|
772
|
-
|
|
773
|
-
const
|
|
774
|
-
|
|
807
|
+
p(() => {
|
|
808
|
+
const a = this.budgets.findIndex((r) => r.guid === t.guid);
|
|
809
|
+
a >= 0 && (this.budgets[a] = e);
|
|
775
810
|
});
|
|
776
811
|
} catch (e) {
|
|
777
812
|
console.error(`Error updating budget: ${e}`);
|
|
778
813
|
}
|
|
779
814
|
};
|
|
780
815
|
}
|
|
781
|
-
var
|
|
816
|
+
var Vt = /* @__PURE__ */ ((s) => (s[s.UNKNOWN = 0] = "UNKNOWN", s[s.CORRECT = 1] = "CORRECT", s[s.INCORRECT = 2] = "INCORRECT", s))(Vt || {}), Zt = /* @__PURE__ */ ((s) => (s.Missed = "Missed", s.Paid = "Paid", s.Upcoming = "Upcoming expense", s.Income = "Income", s))(Zt || {}), Jt = /* @__PURE__ */ ((s) => (s[s.Unknown = 0] = "Unknown", s[s.Subscription = 1] = "Subscription", s[s.Bill = 2] = "Bill", s))(Jt || {}), te = /* @__PURE__ */ ((s) => (s.Desktop = "Desktop", s.Mobile = "Mobile", s))(te || {});
|
|
782
817
|
class X {
|
|
783
818
|
fetchInstance;
|
|
784
819
|
constructor(t, e) {
|
|
785
820
|
this.fetchInstance = new y(t, e);
|
|
786
821
|
}
|
|
787
|
-
createSupportTicket = async (t) => this.fetchInstance.post(
|
|
822
|
+
createSupportTicket = async (t) => this.fetchInstance.post(l.SUPPORT_TICKETS, t).then((e) => e);
|
|
788
823
|
}
|
|
789
|
-
const
|
|
824
|
+
const ee = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, se = (s, t) => {
|
|
790
825
|
const e = [];
|
|
791
|
-
for (const
|
|
792
|
-
const
|
|
793
|
-
if (!
|
|
826
|
+
for (const a of rt) {
|
|
827
|
+
const r = t[a.guid];
|
|
828
|
+
if (!r) continue;
|
|
794
829
|
const o = {
|
|
795
|
-
...
|
|
796
|
-
title:
|
|
797
|
-
topics:
|
|
830
|
+
...a,
|
|
831
|
+
title: r.label,
|
|
832
|
+
topics: a.topics.map(({ topicKey: d }, i) => ({
|
|
798
833
|
topicKey: d,
|
|
799
|
-
label:
|
|
834
|
+
label: r.topics[i]
|
|
800
835
|
}))
|
|
801
836
|
};
|
|
802
|
-
|
|
837
|
+
ee(o, s) && e.push(o);
|
|
803
838
|
}
|
|
804
839
|
return e;
|
|
805
840
|
};
|
|
806
|
-
class
|
|
841
|
+
class ae {
|
|
807
842
|
alert = { message: "", severity: void 0 };
|
|
808
843
|
api = new X("/", "");
|
|
809
844
|
appConfig;
|
|
810
845
|
globalStore;
|
|
811
846
|
isLoading = !1;
|
|
812
847
|
constructor(t) {
|
|
813
|
-
this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken),
|
|
848
|
+
this.globalStore = t, this.api = new X(t.endpoint, t.sessionToken), m(this);
|
|
814
849
|
}
|
|
815
850
|
createSupportTicket = async (t) => {
|
|
816
851
|
try {
|
|
@@ -827,41 +862,41 @@ class oe {
|
|
|
827
862
|
}
|
|
828
863
|
get helpCategories() {
|
|
829
864
|
const { client_communication_profile: t, client_profile: e } = this.globalStore.appDataStore.appData, {
|
|
830
|
-
help: { category_list:
|
|
865
|
+
help: { category_list: a }
|
|
831
866
|
} = this.globalStore.copyStore.copy;
|
|
832
|
-
return
|
|
867
|
+
return se(
|
|
833
868
|
{
|
|
834
869
|
...t,
|
|
835
870
|
...e,
|
|
836
871
|
...this.globalStore.appConfig.config
|
|
837
872
|
},
|
|
838
|
-
|
|
873
|
+
a
|
|
839
874
|
);
|
|
840
875
|
}
|
|
841
876
|
}
|
|
842
|
-
class
|
|
877
|
+
class K {
|
|
843
878
|
fetchInstance;
|
|
844
879
|
constructor(t, e) {
|
|
845
880
|
this.fetchInstance = new y(t, e);
|
|
846
881
|
}
|
|
847
|
-
getHoldings = async () => this.fetchInstance.get(
|
|
848
|
-
updateHoldings = async (t) => this.fetchInstance.put(`${
|
|
882
|
+
getHoldings = async () => this.fetchInstance.get(l.HOLDINGS).then((t) => t.holdings);
|
|
883
|
+
updateHoldings = async (t) => this.fetchInstance.put(`${l.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
|
|
849
884
|
}
|
|
850
|
-
class
|
|
885
|
+
class re {
|
|
851
886
|
analysisType = Dt.Stocks;
|
|
852
|
-
api = new
|
|
887
|
+
api = new K("/", "");
|
|
853
888
|
holdings = [];
|
|
854
889
|
holdingsLoaded = !1;
|
|
855
890
|
globalStore;
|
|
856
891
|
showConnectionsWidget = !1;
|
|
857
892
|
constructor(t) {
|
|
858
|
-
this.globalStore = t, this.api = new
|
|
893
|
+
this.globalStore = t, this.api = new K(t.endpoint, t.sessionToken), m(this);
|
|
859
894
|
}
|
|
860
895
|
get analysisChartData() {
|
|
861
|
-
return At(
|
|
896
|
+
return vt(At(this.visibleHoldings), this.analysisType);
|
|
862
897
|
}
|
|
863
898
|
get analysisDetails() {
|
|
864
|
-
return
|
|
899
|
+
return Et(this.visibleHoldings)[this.analysisType] || {};
|
|
865
900
|
}
|
|
866
901
|
get visibleHoldings() {
|
|
867
902
|
return this.holdings.filter(
|
|
@@ -874,7 +909,7 @@ class ne {
|
|
|
874
909
|
loadHoldings = async () => {
|
|
875
910
|
try {
|
|
876
911
|
const t = await this.api.getHoldings();
|
|
877
|
-
|
|
912
|
+
p(() => {
|
|
878
913
|
this.holdings = [...t], this.holdingsLoaded = !0;
|
|
879
914
|
});
|
|
880
915
|
} catch (t) {
|
|
@@ -887,11 +922,11 @@ class ne {
|
|
|
887
922
|
updateHoldings = async (t) => {
|
|
888
923
|
this.holdingsLoaded = !1;
|
|
889
924
|
try {
|
|
890
|
-
const e = await this.api.updateHoldings(t),
|
|
891
|
-
if (
|
|
892
|
-
const
|
|
893
|
-
a
|
|
894
|
-
this.holdings =
|
|
925
|
+
const e = await this.api.updateHoldings(t), a = this.holdings.findIndex(({ guid: r }) => r === t.guid);
|
|
926
|
+
if (a >= 0) {
|
|
927
|
+
const r = [...this.holdings];
|
|
928
|
+
r[a] = e, p(() => {
|
|
929
|
+
this.holdings = r, this.holdingsLoaded = !0;
|
|
895
930
|
});
|
|
896
931
|
}
|
|
897
932
|
} catch (e) {
|
|
@@ -899,7 +934,7 @@ class ne {
|
|
|
899
934
|
}
|
|
900
935
|
};
|
|
901
936
|
}
|
|
902
|
-
const
|
|
937
|
+
const j = {
|
|
903
938
|
clientConfig: {},
|
|
904
939
|
clientStyleProfile: {},
|
|
905
940
|
config: {
|
|
@@ -1006,16 +1041,16 @@ class V {
|
|
|
1006
1041
|
constructor(t, e) {
|
|
1007
1042
|
this.fetchInstance = new y(t, e);
|
|
1008
1043
|
}
|
|
1009
|
-
getAppData = async () => this.fetchInstance.get(
|
|
1044
|
+
getAppData = async () => this.fetchInstance.get(l.APP_DATA).then((t) => t);
|
|
1010
1045
|
}
|
|
1011
|
-
class
|
|
1046
|
+
class oe {
|
|
1012
1047
|
globalStore;
|
|
1013
1048
|
api = new V("/", "");
|
|
1014
|
-
bannerApi = new
|
|
1049
|
+
bannerApi = new P("/");
|
|
1015
1050
|
appData = {};
|
|
1016
1051
|
banner = {};
|
|
1017
1052
|
constructor(t) {
|
|
1018
|
-
this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken),
|
|
1053
|
+
this.globalStore = t, this.api = new V(t.endpoint, t.sessionToken), m(this);
|
|
1019
1054
|
}
|
|
1020
1055
|
get appConfig() {
|
|
1021
1056
|
return this.globalStore.appConfig;
|
|
@@ -1038,8 +1073,8 @@ class ie {
|
|
|
1038
1073
|
loadAppData = async (t) => {
|
|
1039
1074
|
try {
|
|
1040
1075
|
const e = t || await this.api.getAppData();
|
|
1041
|
-
|
|
1042
|
-
this.appData = e, this.bannerApi = new
|
|
1076
|
+
p(() => {
|
|
1077
|
+
this.appData = e, this.bannerApi = new P(e.address?.bullseye || "/");
|
|
1043
1078
|
});
|
|
1044
1079
|
} catch (e) {
|
|
1045
1080
|
console.error(`Error loading app data: ${e}`);
|
|
@@ -1048,7 +1083,7 @@ class ie {
|
|
|
1048
1083
|
loadBanner = async () => {
|
|
1049
1084
|
try {
|
|
1050
1085
|
const t = this.user?.guid ?? null, e = t ? await this.bannerApi.getBanner(t) : {};
|
|
1051
|
-
|
|
1086
|
+
p(() => {
|
|
1052
1087
|
this.banner = e;
|
|
1053
1088
|
});
|
|
1054
1089
|
} catch (t) {
|
|
@@ -1059,17 +1094,17 @@ class ie {
|
|
|
1059
1094
|
setUserCommunicationProfile = (t) => this.appData.user_communication_profile = t;
|
|
1060
1095
|
setUserProfile = (t) => this.appData.user_profile = t;
|
|
1061
1096
|
}
|
|
1062
|
-
class
|
|
1097
|
+
class ne {
|
|
1063
1098
|
globalStore;
|
|
1064
|
-
widgetApi = new
|
|
1099
|
+
widgetApi = new q("/", "");
|
|
1065
1100
|
constructor(t) {
|
|
1066
|
-
this.globalStore = t, this.widgetApi = new
|
|
1101
|
+
this.globalStore = t, this.widgetApi = new q(t.endpoint, t.sessionToken), m(this);
|
|
1067
1102
|
}
|
|
1068
|
-
loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...
|
|
1069
|
-
widget_url: { widget_type: t, color_scheme: e, ...
|
|
1103
|
+
loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...a }) => await this.widgetApi.requestWidgetUrl({
|
|
1104
|
+
widget_url: { widget_type: t, color_scheme: e, ...a }
|
|
1070
1105
|
});
|
|
1071
1106
|
}
|
|
1072
|
-
class
|
|
1107
|
+
class ie {
|
|
1073
1108
|
globalStore;
|
|
1074
1109
|
isInitialized = !1;
|
|
1075
1110
|
selectedAccounts = [];
|
|
@@ -1080,7 +1115,7 @@ class le {
|
|
|
1080
1115
|
end: Z(this.displayedDate)
|
|
1081
1116
|
};
|
|
1082
1117
|
constructor(t) {
|
|
1083
|
-
|
|
1118
|
+
m(this), this.globalStore = t;
|
|
1084
1119
|
}
|
|
1085
1120
|
get isCopyLoaded() {
|
|
1086
1121
|
return this.globalStore.copyStore.isInitialized;
|
|
@@ -1097,8 +1132,8 @@ class le {
|
|
|
1097
1132
|
};
|
|
1098
1133
|
// Sets an array of selected account guids for the AccountFilter component
|
|
1099
1134
|
setSelectedAccountGuids = async (t) => {
|
|
1100
|
-
const e = new Set(this.selectedAccountGuids),
|
|
1101
|
-
|
|
1135
|
+
const e = new Set(this.selectedAccountGuids), a = new Set(t), r = [...a].filter((d) => !e.has(d)), o = [...e].filter((d) => !a.has(d));
|
|
1136
|
+
r.length > 0 && this.globalStore.accountStore.updateAccountFiltering(r, !1), o.length > 0 && this.globalStore.accountStore.updateAccountFiltering(o, !0), this.selectedAccountGuids = t;
|
|
1102
1137
|
};
|
|
1103
1138
|
setDisplayedDate = (t, e) => {
|
|
1104
1139
|
this.displayedDate = e, this.displayedDateRange = {
|
|
@@ -1107,20 +1142,20 @@ class le {
|
|
|
1107
1142
|
};
|
|
1108
1143
|
};
|
|
1109
1144
|
get shouldDisableNextDate() {
|
|
1110
|
-
const t =
|
|
1145
|
+
const t = T(this.displayedDate), e = T(Nt(/* @__PURE__ */ new Date(), 1));
|
|
1111
1146
|
return t === e;
|
|
1112
1147
|
}
|
|
1113
1148
|
get shouldDisablePrevDate() {
|
|
1114
|
-
const t =
|
|
1149
|
+
const t = T(this.displayedDate), e = T(/* @__PURE__ */ new Date());
|
|
1115
1150
|
return t === e;
|
|
1116
1151
|
}
|
|
1117
1152
|
}
|
|
1118
|
-
class
|
|
1153
|
+
class ce {
|
|
1119
1154
|
globalStore;
|
|
1120
1155
|
api = new $("/", "");
|
|
1121
1156
|
userFeatures = [];
|
|
1122
1157
|
constructor(t) {
|
|
1123
|
-
this.globalStore = t, this.api = new $(t.endpoint, t.sessionToken),
|
|
1158
|
+
this.globalStore = t, this.api = new $(t.endpoint, t.sessionToken), m(this);
|
|
1124
1159
|
}
|
|
1125
1160
|
// DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
|
|
1126
1161
|
// TODO: Remove this function
|
|
@@ -1136,7 +1171,7 @@ class de {
|
|
|
1136
1171
|
loadUserFeatures = async (t) => {
|
|
1137
1172
|
try {
|
|
1138
1173
|
const e = t || await this.api.getUserFeatures();
|
|
1139
|
-
|
|
1174
|
+
p(() => {
|
|
1140
1175
|
this.userFeatures = e;
|
|
1141
1176
|
});
|
|
1142
1177
|
} catch (e) {
|
|
@@ -1160,9 +1195,9 @@ class de {
|
|
|
1160
1195
|
}
|
|
1161
1196
|
};
|
|
1162
1197
|
}
|
|
1163
|
-
class
|
|
1198
|
+
class Ve {
|
|
1164
1199
|
// Global properties
|
|
1165
|
-
appConfig =
|
|
1200
|
+
appConfig = j;
|
|
1166
1201
|
endpoint = "/";
|
|
1167
1202
|
sessionToken = "";
|
|
1168
1203
|
// Data Stores
|
|
@@ -1190,8 +1225,8 @@ class Je {
|
|
|
1190
1225
|
userStore;
|
|
1191
1226
|
// UI Stores
|
|
1192
1227
|
globalUiStore;
|
|
1193
|
-
constructor(t =
|
|
1194
|
-
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.accountStore = new
|
|
1228
|
+
constructor(t = j, e = "/") {
|
|
1229
|
+
this.appConfig = t, this.endpoint = e, this.sessionToken = t.options.session_token ?? "", this.accountStore = new yt(this), this.appDataStore = new oe(this), this.analyticsStore = new Kt(this), this.beatStore = new St(this), this.budgetsStore = new jt(this), this.cashflowStore = new nt(this), this.categoryStore = new et(this), this.connectStore = new ne(this), this.copyStore = new Xt(this), this.debtsStore = new xt(this), this.finstrongStore = new Ct(this), this.goalStore = new it(this), this.helpStore = new ae(this), this.holdingStore = new re(this), this.merchantStore = new Tt(this), this.netWorthStore = new Bt(this), this.notificationStore = new st(this), this.recurringTransactionsStore = new mt(this), this.settingsStore = new It(this), this.transactionStore = new ot(this), this.trendsStore = new ct(this), this.userStore = new ce(this), this.globalUiStore = new ie(this), m(this);
|
|
1195
1230
|
}
|
|
1196
1231
|
get isInitialized() {
|
|
1197
1232
|
return this.globalUiStore.isInitialized;
|
|
@@ -1199,182 +1234,182 @@ class Je {
|
|
|
1199
1234
|
loadData = async ({
|
|
1200
1235
|
accounts: t,
|
|
1201
1236
|
appData: e,
|
|
1202
|
-
associatedBeats:
|
|
1203
|
-
categories:
|
|
1237
|
+
associatedBeats: a,
|
|
1238
|
+
categories: r,
|
|
1204
1239
|
institutions: o,
|
|
1205
1240
|
transactionRules: d,
|
|
1206
|
-
transactions:
|
|
1207
|
-
userFeatures:
|
|
1241
|
+
transactions: i,
|
|
1242
|
+
userFeatures: n
|
|
1208
1243
|
} = {}) => {
|
|
1209
1244
|
await Promise.all([
|
|
1210
1245
|
// Load copy, config and quser data
|
|
1211
1246
|
this.copyStore.loadCopy(),
|
|
1212
1247
|
this.appDataStore.loadAppData(e),
|
|
1213
|
-
this.userStore.loadUserFeatures(
|
|
1248
|
+
this.userStore.loadUserFeatures(n)
|
|
1214
1249
|
]), await Promise.all([
|
|
1215
1250
|
this.accountStore.loadAccountData({ accounts: t, institutions: o }),
|
|
1216
|
-
this.categoryStore.loadCategories(
|
|
1251
|
+
this.categoryStore.loadCategories(r),
|
|
1217
1252
|
this.transactionStore.loadTransactionData({
|
|
1218
|
-
associatedBeats:
|
|
1253
|
+
associatedBeats: a,
|
|
1219
1254
|
transactionRules: d,
|
|
1220
|
-
transactions:
|
|
1255
|
+
transactions: i
|
|
1221
1256
|
})
|
|
1222
1257
|
]), this.globalUiStore.setInitialized(!0);
|
|
1223
1258
|
};
|
|
1224
1259
|
}
|
|
1225
1260
|
export {
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1261
|
+
xs as ANALYTICS_EVENTS,
|
|
1262
|
+
As as AccountFilter,
|
|
1263
|
+
Es as AccountIcon,
|
|
1264
|
+
Ts as AccountIconVariants,
|
|
1265
|
+
Aa as AccountNotificationTypes,
|
|
1266
|
+
Bs as AccountSubType,
|
|
1267
|
+
Is as AccountType,
|
|
1268
|
+
Ns as AccountTypeName,
|
|
1269
|
+
ts as AnalyticsApi,
|
|
1270
|
+
l as ApiEndpoints,
|
|
1271
|
+
P as BannerApi,
|
|
1272
|
+
Ke as BarChart,
|
|
1273
|
+
os as BeatApi,
|
|
1274
|
+
Ea as BudgetNotificationTypes,
|
|
1275
|
+
us as Calendar,
|
|
1276
|
+
hs as CalendarSelectionTypes,
|
|
1277
|
+
is as CategoryApi,
|
|
1278
|
+
Ja as CategoryColors,
|
|
1279
|
+
tr as CategoryGuidToName,
|
|
1280
|
+
E as CategoryGuids,
|
|
1281
|
+
er as CategoryIcon,
|
|
1282
|
+
ha as ConnectCard,
|
|
1283
|
+
Fs as ConnectDrawer,
|
|
1284
|
+
Ms as ConnectionStatus,
|
|
1285
|
+
$s as ConnectionStatusEnums,
|
|
1286
|
+
rr as CurrencyCodes,
|
|
1287
|
+
qs as CurrencyInput,
|
|
1288
|
+
ya as CurrencyText,
|
|
1289
|
+
Oa as DATE_FORMATS_INTL,
|
|
1255
1290
|
gt as DEFAULT_DONUT_SIZE,
|
|
1256
1291
|
pt as DEFAULT_STROKE_WIDTH,
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1292
|
+
aa as DataRow,
|
|
1293
|
+
Cs as DateRangeSelector,
|
|
1294
|
+
Ga as Dialog,
|
|
1295
|
+
Ma as Donut,
|
|
1296
|
+
za as Drawer,
|
|
1297
|
+
Sa as EmptyState,
|
|
1298
|
+
_s as ErrorBoundary,
|
|
1299
|
+
Rs as ErrorStatuses,
|
|
1300
|
+
Zt as ExpenseStatus,
|
|
1266
1301
|
y as Fetch,
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1302
|
+
ra as Frequency,
|
|
1303
|
+
M as GlobalCopyApi,
|
|
1304
|
+
Xt as GlobalCopyStore,
|
|
1305
|
+
pr as GlobalDataContext,
|
|
1306
|
+
mr as GlobalDataProvider,
|
|
1307
|
+
Ve as GlobalStore,
|
|
1308
|
+
ga as GoalType,
|
|
1309
|
+
Ka as INCOME_ACCOUNT_TYPES,
|
|
1310
|
+
ea as IconBacking,
|
|
1311
|
+
la as InformationTooltip,
|
|
1312
|
+
Ta as InsightNotificationTypes,
|
|
1278
1313
|
Rt as IterationItemTypes,
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1314
|
+
We as LOADING_STATUS,
|
|
1315
|
+
Ra as LineChart,
|
|
1316
|
+
wa as ListItemAction,
|
|
1317
|
+
Ca as ListItemRow,
|
|
1318
|
+
gs as ListItemWrapper,
|
|
1319
|
+
Qs as Loader,
|
|
1320
|
+
Ye as LocalizedCopyApi,
|
|
1321
|
+
pa as MetaType,
|
|
1287
1322
|
Us as MfaStatuses,
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1323
|
+
fs as MicroWidgetContainer,
|
|
1324
|
+
bs as MiniWidgetContainer,
|
|
1325
|
+
je as MultiSegmentDonut,
|
|
1326
|
+
ks as NonConnectedStatuses,
|
|
1327
|
+
ds as NotificationApi,
|
|
1328
|
+
Ba as NotificationTypes,
|
|
1329
|
+
Ha as ORDINAL_DATE_FORMAT,
|
|
1330
|
+
Pa as ORDINAL_MONTH_DAY_YEAR_FORMAT,
|
|
1331
|
+
ja as PAYMENT_ACCOUNT_TYPES,
|
|
1332
|
+
sr as PaymentCategories,
|
|
1298
1333
|
$t as PlanTypes,
|
|
1299
|
-
|
|
1300
|
-
|
|
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
|
-
|
|
1334
|
+
Ls as ProcessingStatuses,
|
|
1335
|
+
Os as PropertyType,
|
|
1336
|
+
Gs as PropertyTypeName,
|
|
1337
|
+
qe as RECURRENCE_COPY,
|
|
1338
|
+
oa as RecurrenceStatus,
|
|
1339
|
+
na as RecurrenceType,
|
|
1340
|
+
Mt as RecurrenceTypes,
|
|
1341
|
+
ia as RepeatingType,
|
|
1342
|
+
zs as ResponsiveButton,
|
|
1343
|
+
Va as SPENDING_ACCOUNT_TYPES,
|
|
1344
|
+
Jt as ScheduledPaymentTypes,
|
|
1345
|
+
ze as ScheduledPaymentsApi,
|
|
1346
|
+
te as ScreenSize,
|
|
1347
|
+
Ks as SearchBox,
|
|
1348
|
+
ca as Select,
|
|
1349
|
+
Vs as SelectionBox,
|
|
1350
|
+
Qa as SingleSegmentDonut,
|
|
1351
|
+
ur as Sizes,
|
|
1352
|
+
Da as StackedLineChart,
|
|
1353
|
+
ka as StatusBar,
|
|
1354
|
+
Hs as StatusName,
|
|
1355
|
+
hr as TOUCH_TARGET,
|
|
1356
|
+
Js as TabContentContainer,
|
|
1357
|
+
Ia as ToggleButtonListItem,
|
|
1358
|
+
Na as ToggleListItem,
|
|
1359
|
+
ma as TrackType,
|
|
1360
|
+
ps as TransactionStatus,
|
|
1361
|
+
at as TransactionType,
|
|
1327
1362
|
$ as UserApi,
|
|
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
|
-
|
|
1363
|
+
ce as UserStore,
|
|
1364
|
+
Vt as UserVerification,
|
|
1365
|
+
q as WidgetApi,
|
|
1366
|
+
Ds as WidgetContainer,
|
|
1367
|
+
_r as WidgetContainerContext,
|
|
1368
|
+
yr as WidgetContainerProvider,
|
|
1369
|
+
es as analyticsSession,
|
|
1370
|
+
eo as buildDynamicCopy,
|
|
1371
|
+
so as buildPluralCopy,
|
|
1372
|
+
or as formatCurrency,
|
|
1373
|
+
qa as formatDate,
|
|
1374
|
+
nr as formatOrdinal,
|
|
1375
|
+
ir as formatPercentage,
|
|
1376
|
+
Jr as fromTimestampToMonthYear,
|
|
1377
|
+
zr as getCategory,
|
|
1378
|
+
Xr as getCategoryTotalsByParent,
|
|
1379
|
+
Qe as getClientTheme,
|
|
1380
|
+
cr as getCurrencyCodes,
|
|
1381
|
+
Kr as getDetailedCategory,
|
|
1382
|
+
jr as getDetailedSubCategory,
|
|
1383
|
+
ao as getLocale,
|
|
1384
|
+
Vr as isIncome,
|
|
1385
|
+
dr as isValidNumber,
|
|
1386
|
+
fr as useAccountStore,
|
|
1387
|
+
Sr as useAppConfig,
|
|
1388
|
+
br as useBudgetsStore,
|
|
1389
|
+
wr as useCashflowStore,
|
|
1390
|
+
xr as useCategoryStore,
|
|
1391
|
+
ss as useCombineEvents,
|
|
1392
|
+
as as useCombinePageviews,
|
|
1393
|
+
Cr as useDebtStore,
|
|
1394
|
+
Dr as useEvent,
|
|
1395
|
+
vr as useFinstrongStore,
|
|
1396
|
+
Ar as useGlobalCopyStore,
|
|
1397
|
+
Er as useGlobalStore,
|
|
1398
|
+
Tr as useGlobalUiStore,
|
|
1399
|
+
Br as useGoalStore,
|
|
1400
|
+
Ir as useHelpStore,
|
|
1401
|
+
Nr as useHoldingStore,
|
|
1402
|
+
qr as useInsightsEnabled,
|
|
1403
|
+
Fr as useMerchantStore,
|
|
1404
|
+
Mr as useNetWorthStore,
|
|
1405
|
+
$r as useNotificationStore,
|
|
1406
|
+
Rr as usePageView,
|
|
1407
|
+
Xe as usePrevious,
|
|
1408
|
+
Ur as useRecurringTransactionsStore,
|
|
1409
|
+
Qr as useScreenSize,
|
|
1410
|
+
kr as useSettingsStore,
|
|
1411
|
+
Lr as useTransactionStore,
|
|
1412
|
+
Or as useTrendsStore,
|
|
1413
|
+
Gr as useUserStore,
|
|
1414
|
+
Hr as useWidgetContainerProvider
|
|
1380
1415
|
};
|