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