@mx-cartographer/experiences 7.0.20-alpha.sms1 → 7.0.20

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.
@@ -1,19 +1,19 @@
1
1
  import { G as M } from "../useCombineEvents-DaDBSR_1.mjs";
2
- import { A as ts, a as es, u as ss, b as rs } from "../useCombineEvents-DaDBSR_1.mjs";
3
- import { F as y, A as u } from "../Fetch-CkFKy79O.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
4
  import { B as os } from "../BeatApi-DLu87ijw.mjs";
5
5
  import { C as et } from "../CategoryStore-BOyzQjQp.mjs";
6
6
  import { a as is } from "../CategoryStore-BOyzQjQp.mjs";
7
7
  import { N as st } from "../NotificationStore-DHtSGySy.mjs";
8
- import { a as ls } from "../NotificationStore-DHtSGySy.mjs";
9
- import { T as rt } from "../User-Dq9Qj764.mjs";
8
+ import { a as ds } from "../NotificationStore-DHtSGySy.mjs";
9
+ import { T as at } from "../User-Dq9Qj764.mjs";
10
10
  import { C as us, b as hs, L as gs, a as ps } from "../User-Dq9Qj764.mjs";
11
- import { H as at } from "../Help-DhcC-C05.mjs";
11
+ import { H as rt } from "../Help-DhcC-C05.mjs";
12
12
  import { E as _s } from "../Help-DhcC-C05.mjs";
13
13
  import { M as fs } from "../MicroWidgetContainer-Dxz8uBN9.mjs";
14
14
  import { M as bs } from "../MiniWidgetContainer-CTyjmE1h.mjs";
15
15
  import { A as xs, D as Cs, W as Ds } from "../WidgetContainer-CdBs9WOZ.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 Ps, E as $s, h as Rs, N as Us, g as ks, P as Ls, m as Os, S as Gs } from "../ConnectDrawer-phFH6OHt.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-phFH6OHt.mjs";
17
17
  import { C as qs } from "../CurrencyInput-bEx2Mbd0.mjs";
18
18
  import { L as Qs } from "../Loader-DUaFpDGv.mjs";
19
19
  import { R as zs } from "../ResponsiveButton-DZFp78fJ.mjs";
@@ -21,46 +21,46 @@ import { S as Ks } from "../SearchBox-B2_zLv8-.mjs";
21
21
  import { T as ot } from "../TransactionStore-0tLtBEIC.mjs";
22
22
  import { S as Vs } from "../TransactionStore-0tLtBEIC.mjs";
23
23
  import { T as Js } from "../TabContentContainer-j01JYR_7.mjs";
24
- import { I as er } from "../IconBacking-B9oC6uL2.mjs";
25
- import { D as rr, F as ar, a as or, c as nr, R as ir, S as cr } from "../RepeatingTransaction-BW4J-jeJ.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 dr } from "../CashflowStore-D9Dpuz7X.mjs";
27
+ import { I as la } from "../CashflowStore-D9Dpuz7X.mjs";
28
28
  import { d as it } from "../GoalStore-eSOkI6uE.mjs";
29
- import { C as hr, G as gr, M as pr, T as mr } from "../GoalStore-eSOkI6uE.mjs";
30
- import { C as yr } from "../CurrencyText-YUhH2caW.mjs";
31
- import { E as Sr } from "../EmptyState-C0lr9E5T.mjs";
32
- import { L as wr } from "../ListItemAction-DNZZ5fSa.mjs";
29
+ import { C as ha, G as ga, M as pa, T as ma } from "../GoalStore-eSOkI6uE.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-DNZZ5fSa.mjs";
33
33
  import { T as ct } from "../TrendsStore-WrHxzdbQ.mjs";
34
- import { L as Cr, S as Dr, u as vr } from "../TrendsStore-WrHxzdbQ.mjs";
35
- import { A as Er, B as Tr, I as Br, N as Ir, T as Nr, a as Fr } from "../Notification-ByMBpJ5u.mjs";
36
- import { jsxs as _, jsx as n } from "react/jsx-runtime";
37
- import lt, { useRef as dt, useEffect as ut } from "react";
34
+ import { L as Ca, S as Da, u as va } from "../TrendsStore-WrHxzdbQ.mjs";
35
+ import { A as Ea, B as Ta, I as Ba, N as Ia, T as Na, a as Fa } from "../Notification-ByMBpJ5u.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 Pr } from "../Donut-1UMNcG67.mjs";
41
- import { L as Rr } from "../LineChart-BWWmmJxV.mjs";
42
- import { S as kr } from "../StatusBar-BK_uYHAB.mjs";
43
- import { D as Or, a as Gr, O as Hr, b as qr, f as Wr } from "../Dialog-CWW597AF.mjs";
40
+ import { D as $a } from "../Donut-1UMNcG67.mjs";
41
+ import { L as Ua } from "../LineChart-BWWmmJxV.mjs";
42
+ import { S as La } from "../StatusBar-BK_uYHAB.mjs";
43
+ import { D as Ga, a as Ha, O as Pa, b as qa, f as Wa } from "../Dialog-CWW597AF.mjs";
44
44
  import { D as gt, a as pt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
45
- import { S as Yr } from "../SingleSegmentDonut-BgbLgwHi.mjs";
46
- import { D as Xr } from "../Drawer-kEE73B87.mjs";
47
- import { I as jr, P as Vr, S as Zr } from "../Account-BW3-oYEs.mjs";
45
+ import { S as Ya } from "../SingleSegmentDonut-BgbLgwHi.mjs";
46
+ import { D as Xa } from "../Drawer-kEE73B87.mjs";
47
+ import { I as ja, P as Va, S as Za } from "../Account-BW3-oYEs.mjs";
48
48
  import { b as E } from "../Category-CevNQ03n.mjs";
49
- import { C as ta, c as ea, a as sa, P as ra } from "../Category-CevNQ03n.mjs";
50
- import { C as oa, f as na, b as ia, a as ca, g as la, i as da } from "../NumberFormatting-CtWHhyBX.mjs";
49
+ import { C as tr, c as er, a as sr, P as ar } from "../Category-CevNQ03n.mjs";
50
+ import { C as or, f as nr, b as ir, a as cr, g as dr, i as lr } from "../NumberFormatting-CtWHhyBX.mjs";
51
51
  import { R as mt } from "../RecurringTransactionsStore-D62XJtdL.mjs";
52
- import { S as ha, T as ga } from "../RecurringTransactionsStore-D62XJtdL.mjs";
53
- import { G as ma, A as _a, B as ya, W as fa, c as Sa, m as ba, g as wa, t as xa, k as Ca, x as Da, e as va, w as Aa, u as Ea, l as Ta, a as Ba, j as Ia, y as Na, s as Fa, b as Ma, q as Pa, n as $a, z as Ra, h as Ua, r as ka, f as La, v as Oa, o as Ga, p as Ha } from "../hooks-DkUqN6JE.mjs";
54
- import { u as Wa } from "../useScreenSize-B6JyS_Lj.mjs";
52
+ import { S as hr, T as gr } from "../RecurringTransactionsStore-D62XJtdL.mjs";
53
+ import { G as mr, A as _r, B as yr, W as fr, c as Sr, m as br, g as wr, t as xr, k as Cr, x as Dr, e as vr, w as Ar, u as Er, l as Tr, a as Br, j as Ir, y as Nr, s as Fr, b as Mr, q as $r, n as Rr, z as Ur, h as kr, r as Lr, f as Or, v as Gr, o as Hr, p as Pr } from "../hooks-DkUqN6JE.mjs";
54
+ import { u as Wr } from "../useScreenSize-B6JyS_Lj.mjs";
55
55
  import { makeAutoObservable as m, runInAction as p, reaction as _t } from "mobx";
56
56
  import { a as yt } from "../AccountStore-BaMynkQT.mjs";
57
57
  import ft from "posthog-js";
58
58
  import { B as St } from "../BeatStore-By4aGoRM.mjs";
59
59
  import { endOfMonth as Z } from "date-fns/endOfMonth";
60
60
  import { startOfMonth as J } from "date-fns/startOfMonth";
61
- import { startOfToday as k } from "date-fns/startOfToday";
62
- import { f as bt, a as wt, b as L } from "../BudgetUtil-CeSLAcsl.mjs";
63
- import { g as Ya, e as za, c as Xa, d as Ka, i as ja } from "../BudgetUtil-CeSLAcsl.mjs";
61
+ import { startOfToday as L } from "date-fns/startOfToday";
62
+ import { f as bt, a as wt, b as O } from "../BudgetUtil-CeSLAcsl.mjs";
63
+ import { g as Yr, e as zr, c as Xr, d as Kr, i as jr } from "../BudgetUtil-CeSLAcsl.mjs";
64
64
  import { a as xt } from "../DebtsStore-VkyMADzd.mjs";
65
65
  import { a as Ct } from "../FinstrongStore-mkALvztw.mjs";
66
66
  import { A as Dt, m as vt, a as At, b as Et } from "../InvestmentUtil-jOyOgzIB.mjs";
@@ -69,9 +69,9 @@ import { N as Bt } from "../NetWorthStore-B6xF9eGH.mjs";
69
69
  import { a as It } from "../SettingsStore-B4gi6oOw.mjs";
70
70
  import { addMonths as Nt } from "date-fns/addMonths";
71
71
  import { getMonth as T } from "date-fns/getMonth";
72
- import { i as Za } from "../DateUtil-BcuH7ErC.mjs";
72
+ import { i as Zr } from "../DateUtil-BcuH7ErC.mjs";
73
73
  import { b as to, a as eo, g as so } from "../Localization-2MODESHW.mjs";
74
- import { alpha as Ft, lighten as O, darken as G } from "@mui/material";
74
+ import { alpha as Ft, lighten as G, darken as H } from "@mui/material";
75
75
  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 || {});
76
76
  const qe = [
77
77
  { id: 0, copy: "frequency_unknown" },
@@ -87,66 +87,63 @@ const qe = [
87
87
  LOADING: "LOADING",
88
88
  SUCCESS: "SUCCESS"
89
89
  };
90
- var Pt = /* @__PURE__ */ ((s) => (s[s.SpendingPlan = 0] = "SpendingPlan", s[s.Budgets = 1] = "Budgets", s))(Pt || {}), $t = /* @__PURE__ */ ((s) => (s[s.RecurringExpense = 0] = "RecurringExpense", s[s.PlannedExpense = 1] = "PlannedExpense", s[s.Other = 2] = "Other", s[s.Income = 3] = "Income", s))($t || {});
90
+ 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 || {});
91
91
  const Qe = (s, t) => {
92
- const e = {
93
- ...t,
94
- system_font: "Times New Roman"
95
- }, r = s.palette.mode === "dark", a = (l, i) => {
96
- const c = e?.[l];
92
+ const e = s.palette.mode === "dark", a = (d, i) => {
93
+ const n = t?.[d];
97
94
  return {
98
- lighter: c ? O(c, 0.5) : i.lighter,
99
- light: c ? O(c, 0.25) : i.light,
100
- main: c || i.main,
101
- dark: c ? G(c, 0.25) : i.dark,
102
- darker: c ? G(c, 0.5) : i.darker
95
+ lighter: n ? G(n, 0.5) : i.lighter,
96
+ light: n ? G(n, 0.25) : i.light,
97
+ main: n || i.main,
98
+ dark: n ? H(n, 0.25) : i.dark,
99
+ darker: n ? H(n, 0.5) : i.darker
103
100
  };
101
+ }, r = {
102
+ primary: a(e ? "primary_color_dark" : "primary_color", s.palette.primary),
103
+ secondary: a(e ? "neutral_color_dark" : "neutral_color", s.palette.secondary),
104
+ error: a(e ? "error_color_dark" : "error_color", s.palette.error),
105
+ warning: a(e ? "warning_color_dark" : "warning_color", s.palette.warning),
106
+ info: a(e ? "info_color_dark" : "info_color", s.palette.info),
107
+ success: a(e ? "success_color_dark" : "success_color", s.palette.success)
104
108
  }, o = {
105
- primary: a(r ? "primary_color_dark" : "primary_color", s.palette.primary),
106
- secondary: a(r ? "neutral_color_dark" : "neutral_color", s.palette.secondary),
107
- error: a(r ? "error_color_dark" : "error_color", s.palette.error),
108
- warning: a(r ? "warning_color_dark" : "warning_color", s.palette.warning),
109
- info: a(r ? "info_color_dark" : "info_color", s.palette.info),
110
- success: a(r ? "success_color_dark" : "success_color", s.palette.success)
111
- }, d = {
112
109
  MuiTabs: {
113
110
  styleOverrides: {
114
111
  indicator: {
115
- backgroundColor: o.primary.light
112
+ backgroundColor: r.primary.light
116
113
  }
117
114
  }
118
115
  },
119
116
  MuiPickersCalendarHeader: {
120
117
  styleOverrides: {
121
118
  switchViewButton: {
122
- color: o.primary.lighter,
119
+ color: r.primary.lighter,
123
120
  "&:hover": {
124
- backgroundColor: Ft(o.primary.light, 0.1)
121
+ backgroundColor: Ft(r.primary.light, 0.1)
125
122
  }
126
123
  }
127
124
  }
128
125
  },
129
- ...e?.button_corner_radius ? {
126
+ ...t?.button_corner_radius ? {
130
127
  MuiButton: {
131
128
  styleOverrides: {
132
129
  root: {
133
- borderRadius: `${e.button_corner_radius}px`
130
+ borderRadius: `${t.button_corner_radius}px`
134
131
  }
135
132
  }
136
133
  }
137
134
  } : {},
138
- ...e?.card_corner_radius ? {
135
+ ...t?.card_corner_radius ? {
139
136
  MuiCard: {
140
137
  styleOverrides: {
141
138
  root: {
142
- borderRadius: `${e.card_corner_radius}px`
139
+ borderRadius: `${t.card_corner_radius}px`
143
140
  }
144
141
  }
145
142
  },
146
143
  MuiPaper: {
147
144
  styleOverrides: {
148
145
  root: {
149
- borderRadius: `${e.card_corner_radius}px`
146
+ borderRadius: `${t.card_corner_radius}px`
150
147
  }
151
148
  }
152
149
  }
@@ -154,76 +151,76 @@ const Qe = (s, t) => {
154
151
  };
155
152
  return {
156
153
  typography: {
157
- fontFamily: e?.system_font ?? s.typography.fontFamily,
154
+ fontFamily: t?.system_font ?? s.typography.fontFamily,
158
155
  H1: {
159
- fontFamily: e?.system_font ?? s.typography.fontFamily
156
+ fontFamily: t?.system_font ?? s.typography.fontFamily
160
157
  },
161
158
  h1: {
162
- fontFamily: e?.system_font ?? s.typography.fontFamily
159
+ fontFamily: t?.system_font ?? s.typography.fontFamily
163
160
  },
164
161
  H2: {
165
- fontFamily: e?.system_font ?? s.typography.fontFamily
162
+ fontFamily: t?.system_font ?? s.typography.fontFamily
166
163
  },
167
164
  h2: {
168
- fontFamily: e?.system_font ?? s.typography.fontFamily
165
+ fontFamily: t?.system_font ?? s.typography.fontFamily
169
166
  },
170
167
  H3: {
171
- fontFamily: e?.system_font ?? s.typography.fontFamily
168
+ fontFamily: t?.system_font ?? s.typography.fontFamily
172
169
  },
173
170
  h3: {
174
- fontFamily: e?.system_font ?? s.typography.fontFamily
171
+ fontFamily: t?.system_font ?? s.typography.fontFamily
175
172
  },
176
173
  Body: {
177
- fontFamily: e?.system_font ?? s.typography.fontFamily
174
+ fontFamily: t?.system_font ?? s.typography.fontFamily
178
175
  },
179
176
  body1: {
180
- fontFamily: e?.system_font ?? s.typography.fontFamily
177
+ fontFamily: t?.system_font ?? s.typography.fontFamily
181
178
  },
182
179
  Small: {
183
- fontFamily: e?.system_font ?? s.typography.fontFamily
180
+ fontFamily: t?.system_font ?? s.typography.fontFamily
184
181
  },
185
182
  body2: {
186
- fontFamily: e?.system_font ?? s.typography.fontFamily
183
+ fontFamily: t?.system_font ?? s.typography.fontFamily
187
184
  },
188
185
  Button: {
189
- fontFamily: e?.system_font ?? s.typography.fontFamily
186
+ fontFamily: t?.system_font ?? s.typography.fontFamily
190
187
  },
191
188
  button: {
192
- fontFamily: e?.system_font ?? s.typography.fontFamily
189
+ fontFamily: t?.system_font ?? s.typography.fontFamily
193
190
  },
194
191
  XSmall: {
195
- fontFamily: e?.system_font ?? s.typography.fontFamily
192
+ fontFamily: t?.system_font ?? s.typography.fontFamily
196
193
  },
197
194
  caption: {
198
- fontFamily: e?.system_font ?? s.typography.fontFamily
195
+ fontFamily: t?.system_font ?? s.typography.fontFamily
199
196
  },
200
197
  Paragraph: {
201
- fontFamily: e?.system_font ?? s.typography.fontFamily
198
+ fontFamily: t?.system_font ?? s.typography.fontFamily
202
199
  },
203
200
  subtitle1: {
204
- fontFamily: e?.system_font ?? s.typography.fontFamily
201
+ fontFamily: t?.system_font ?? s.typography.fontFamily
205
202
  },
206
203
  ParagraphSmall: {
207
- fontFamily: e?.system_font ?? s.typography.fontFamily
204
+ fontFamily: t?.system_font ?? s.typography.fontFamily
208
205
  },
209
206
  subtitle2: {
210
- fontFamily: e?.system_font ?? s.typography.fontFamily
207
+ fontFamily: t?.system_font ?? s.typography.fontFamily
211
208
  },
212
209
  Tiny: {
213
- fontFamily: e?.system_font ?? s.typography.fontFamily
210
+ fontFamily: t?.system_font ?? s.typography.fontFamily
214
211
  },
215
212
  tiny: {
216
- fontFamily: e?.system_font ?? s.typography.fontFamily
213
+ fontFamily: t?.system_font ?? s.typography.fontFamily
217
214
  }
218
215
  },
219
- palette: o,
220
- components: d,
216
+ palette: r,
217
+ components: o,
221
218
  shape: {
222
- borderRadius: e?.button_corner_radius ?? s.shape.borderRadius
219
+ borderRadius: t?.button_corner_radius ?? s.shape.borderRadius
223
220
  }
224
221
  };
225
222
  };
226
- class H {
223
+ class P {
227
224
  fetchInstance;
228
225
  constructor(t) {
229
226
  this.fetchInstance = new y(t, "", {
@@ -234,7 +231,7 @@ class H {
234
231
  getBanner = async (t) => {
235
232
  try {
236
233
  const e = `/banner/${t}/account_widget_banner`;
237
- return this.fetchInstance?.get(e).then((r) => r.banner) ?? {};
234
+ return this.fetchInstance?.get(e).then((a) => a.banner) ?? {};
238
235
  } catch (e) {
239
236
  return console.error("Error fetching banner:", e), null;
240
237
  }
@@ -245,57 +242,57 @@ class Ye {
245
242
  constructor(t, e) {
246
243
  this.fetchInstance = new y(t, e);
247
244
  }
248
- getLocalizedCopy = async (t) => this.fetchInstance.post(u.LOCALIZED_COPY, t).then((e) => e);
249
- getLocalizedContent = async (t) => this.fetchInstance.post(`${u.LOCALIZED_CONTENT}/${t}`).then((e) => e);
245
+ getLocalizedCopy = async (t) => this.fetchInstance.post(l.LOCALIZED_COPY, t).then((e) => e);
246
+ getLocalizedContent = async (t) => this.fetchInstance.post(`${l.LOCALIZED_CONTENT}/${t}`).then((e) => e);
250
247
  }
251
248
  class ze {
252
249
  fetchInstance;
253
250
  constructor(t, e) {
254
251
  this.fetchInstance = new y(t, e);
255
252
  }
256
- addScheduledPayment = async (t) => this.fetchInstance.post(u.SCHEDULED_PAYMENTS, {
253
+ addScheduledPayment = async (t) => this.fetchInstance.post(l.SCHEDULED_PAYMENTS, {
257
254
  ...t,
258
255
  is_recurring: "true",
259
- transaction_type: rt.DEBIT
256
+ transaction_type: at.DEBIT
260
257
  }).then((e) => e.scheduled_payment);
261
- getScheduledPayments = async () => this.fetchInstance.get(u.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
262
- updateScheduledPayment = async (t) => this.fetchInstance.put(`${u.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
263
- deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${u.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
258
+ getScheduledPayments = async () => this.fetchInstance.get(l.SCHEDULED_PAYMENTS).then((t) => t.scheduled_payments);
259
+ updateScheduledPayment = async (t) => this.fetchInstance.put(`${l.SCHEDULED_PAYMENTS}/${t.guid}`, t).then((e) => e.scheduled_payment);
260
+ deleteScheduledPayment = async (t) => this.fetchInstance.delete(`${l.SCHEDULED_PAYMENTS}/${t}`).then((e) => e);
264
261
  }
265
- class P {
262
+ class $ {
266
263
  fetchInstance;
267
264
  constructor(t, e) {
268
265
  this.fetchInstance = new y(t, e);
269
266
  }
270
- getUserFeatures = async () => this.fetchInstance.get(u.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
271
- updateUser = async (t) => this.fetchInstance.put(u.USER, t).then((e) => e.user);
272
- updateUserProfile = async (t) => this.fetchInstance.put(`${u.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
267
+ getUserFeatures = async () => this.fetchInstance.get(l.USER_FEATURES).then((t) => t.user_features).catch((t) => t);
268
+ updateUser = async (t) => this.fetchInstance.put(l.USER, t).then((e) => e.user);
269
+ updateUserProfile = async (t) => this.fetchInstance.put(`${l.USER_PROFILES}/${t.guid}`, t).then((e) => e.user_profile);
273
270
  }
274
271
  class q {
275
272
  fetchInstance;
276
273
  constructor(t, e) {
277
274
  this.fetchInstance = new y(t, e);
278
275
  }
279
- requestWidgetUrl = async (t) => this.fetchInstance.post(u.WIDGET_URLS, t).then((e) => e.widget_url);
276
+ requestWidgetUrl = async (t) => this.fetchInstance.post(l.WIDGET_URLS, t).then((e) => e.widget_url);
280
277
  }
281
278
  const Xe = (s) => {
282
- const t = dt();
279
+ const t = lt();
283
280
  return ut(() => {
284
281
  t.current = s;
285
282
  }, [s]), t.current;
286
- }, Rt = ({ color: s, labelAverage: t, labelMain: e }) => {
287
- const r = x(), a = Ut(r, s);
288
- return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-chart-legend ${a}`, children: [
289
- /* @__PURE__ */ n("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
290
- /* @__PURE__ */ n(B, { variant: "XSmall", children: e }),
283
+ }, Ut = ({ color: s, labelAverage: t, labelMain: e }) => {
284
+ const a = x(), r = kt(a, s);
285
+ return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-chart-legend ${r}`, children: [
286
+ /* @__PURE__ */ c("div", { "aria-label": e, className: "mx-cmn-color-square", role: "img" }),
287
+ /* @__PURE__ */ c(B, { variant: "XSmall", children: e }),
291
288
  /* @__PURE__ */ _("div", { "aria-label": t, className: "mx-cmn-triple-dot", role: "img", children: [
292
- /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
293
- /* @__PURE__ */ n("div", { className: "mx-cmn-dot" }),
294
- /* @__PURE__ */ n("div", { className: "mx-cmn-dot" })
289
+ /* @__PURE__ */ c("div", { className: "mx-cmn-dot" }),
290
+ /* @__PURE__ */ c("div", { className: "mx-cmn-dot" }),
291
+ /* @__PURE__ */ c("div", { className: "mx-cmn-dot" })
295
292
  ] }),
296
- /* @__PURE__ */ n(B, { variant: "XSmall", children: t })
293
+ /* @__PURE__ */ c(B, { variant: "XSmall", children: t })
297
294
  ] });
298
- }, Ut = (s, t) => w({
295
+ }, kt = (s, t) => w({
299
296
  alignItems: "center",
300
297
  display: "flex",
301
298
  gap: s.Spacing.XSmall,
@@ -325,43 +322,43 @@ const Xe = (s) => {
325
322
  ariaLabel: s,
326
323
  color: t,
327
324
  height: e,
328
- index: r,
329
- label: a,
325
+ index: a,
326
+ label: r,
330
327
  onClick: o,
331
328
  selectedIndex: d,
332
- value: l
329
+ value: i
333
330
  }) => {
334
- const i = x(), c = kt(i, t, e), h = (S) => {
335
- o && (S.key === " " || S.key === "Enter") && o(r);
336
- }, f = d === void 0 || d === r ? "primary" : "secondary", g = () => /* @__PURE__ */ n(
331
+ const n = x(), u = Lt(n, t, e), h = (S) => {
332
+ o && (S.key === " " || S.key === "Enter") && o(a);
333
+ }, f = d === void 0 || d === a ? "primary" : "secondary", g = () => /* @__PURE__ */ c(
337
334
  B,
338
335
  {
339
336
  "aria-hidden": !0,
340
- bold: d === r,
337
+ bold: d === a,
341
338
  className: "mx-cmn-bar-text",
342
339
  color: f,
343
340
  component: "div",
344
341
  variant: "Small",
345
- children: a
342
+ children: r
346
343
  }
347
344
  );
348
- return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-container ${c} ${l < 0 ? "mx-cmn-negative" : ""}`, children: [
349
- l >= 0 && /* @__PURE__ */ n(g, {}),
350
- /* @__PURE__ */ n(
345
+ return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-container ${u} ${i < 0 ? "mx-cmn-negative" : ""}`, children: [
346
+ i >= 0 && /* @__PURE__ */ c(g, {}),
347
+ /* @__PURE__ */ c(
351
348
  "div",
352
349
  {
353
350
  "aria-label": s,
354
- className: `mx-cmn-bar ${o ? "mx-cmn-clickable" : ""} ${l < 0 ? "mx-cmn-bar-negative" : ""}`,
355
- onClick: o ? () => o?.(r) : void 0,
351
+ className: `mx-cmn-bar ${o ? "mx-cmn-clickable" : ""} ${i < 0 ? "mx-cmn-bar-negative" : ""}`,
352
+ onClick: o ? () => o?.(a) : void 0,
356
353
  onKeyDown: h,
357
354
  role: s ? "button" : void 0,
358
355
  tabIndex: s ? 0 : void 0
359
356
  }
360
357
  ),
361
- l < 0 && /* @__PURE__ */ n(g, {})
358
+ i < 0 && /* @__PURE__ */ c(g, {})
362
359
  ] });
363
- }, kt = (s, t, e) => {
364
- const r = `expandBar-${Math.round(e)}`, a = ht(r, { from: { height: 0 }, to: { height: e } });
360
+ }, Lt = (s, t, e) => {
361
+ const a = `expandBar-${Math.round(e)}`, r = ht(a, { from: { height: 0 }, to: { height: e } });
365
362
  return w({
366
363
  display: "flex",
367
364
  flexDirection: "column",
@@ -374,7 +371,7 @@ const Xe = (s) => {
374
371
  animationDelay: ".5s",
375
372
  animationDuration: "1s",
376
373
  animationFillMode: "forwards",
377
- animationName: a,
374
+ animationName: r,
378
375
  animationTimingFunction: s.Easing.Default,
379
376
  backgroundColor: t,
380
377
  borderRadius: `${s.BorderRadius.Medium}px ${s.BorderRadius.Medium}px 0 0`,
@@ -397,56 +394,56 @@ const Xe = (s) => {
397
394
  ariaLabel: s,
398
395
  averageLineHeight: t,
399
396
  bottomHeight: e,
400
- color: r,
401
- index: a = -1,
397
+ color: a,
398
+ index: r = -1,
402
399
  onClick: o,
403
400
  range: d,
404
- selectedIndex: l,
405
- topHeight: i,
406
- value: c,
401
+ selectedIndex: i,
402
+ topHeight: n,
403
+ value: u,
407
404
  valueLabel: h = "",
408
405
  width: f,
409
406
  xAxisLabel: g = ""
410
407
  }) => {
411
- const S = x(), C = Lt(S, f), D = c / d * i, v = Math.abs(c) / d * e, A = l === void 0 || l === a ? "primary" : "secondary";
408
+ 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";
412
409
  return /* @__PURE__ */ _("div", { className: `mx-cmn-barchart-bar-column ${C}`, children: [
413
- /* @__PURE__ */ n("div", { style: { height: i }, children: c >= 0 && /* @__PURE__ */ n(
410
+ /* @__PURE__ */ c("div", { style: { height: n }, children: u >= 0 && /* @__PURE__ */ c(
414
411
  W,
415
412
  {
416
413
  ariaLabel: s,
417
- color: r,
414
+ color: a,
418
415
  height: D,
419
- index: a,
416
+ index: r,
420
417
  label: h,
421
418
  onClick: o,
422
- selectedIndex: l,
423
- value: c
419
+ selectedIndex: i,
420
+ value: u
424
421
  }
425
422
  ) }),
426
- /* @__PURE__ */ n("div", { className: "mx-cmn-zero-line" }),
427
- t !== 0 && /* @__PURE__ */ n("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
428
- /* @__PURE__ */ n("div", { style: { height: e }, children: c < 0 && /* @__PURE__ */ n(
423
+ /* @__PURE__ */ c("div", { className: "mx-cmn-zero-line" }),
424
+ t !== 0 && /* @__PURE__ */ c("div", { className: "mx-cmn-chart-average", style: { bottom: t } }),
425
+ /* @__PURE__ */ c("div", { style: { height: e }, children: u < 0 && /* @__PURE__ */ c(
429
426
  W,
430
427
  {
431
428
  ariaLabel: s,
432
- color: r,
429
+ color: a,
433
430
  height: v,
434
- index: a,
431
+ index: r,
435
432
  label: h,
436
433
  onClick: o,
437
- value: c
434
+ value: u
438
435
  }
439
436
  ) }),
440
- /* @__PURE__ */ n(
437
+ /* @__PURE__ */ c(
441
438
  "div",
442
439
  {
443
440
  className: `mx-cmn-bar-label ${o ? "mx-cmn-clickable" : ""}`,
444
- onClick: o ? () => o(a) : void 0,
445
- children: /* @__PURE__ */ n(B, { bold: l === a, color: A, variant: "Small", children: g })
441
+ onClick: o ? () => o(r) : void 0,
442
+ children: /* @__PURE__ */ c(B, { bold: i === r, color: A, variant: "Small", children: g })
446
443
  }
447
444
  )
448
445
  ] });
449
- }, Lt = (s, t) => w({
446
+ }, Ot = (s, t) => w({
450
447
  display: "flex",
451
448
  flexDirection: "column",
452
449
  flexGrow: t === void 0 ? 1 : 0,
@@ -471,25 +468,25 @@ const Xe = (s) => {
471
468
  "& .mx-cmn-clickable": {
472
469
  cursor: "pointer"
473
470
  }
474
- }), Ot = (s, t) => s + t, Gt = (s, t) => Math.abs(t) > s ? Math.abs(t) : s, Ht = (s, t) => [...s, t.value], Y = (s, t, e) => {
475
- const r = s && t ? e / 2 : e;
476
- return s ? r : 0;
477
- }, qt = (s, t, e, r) => s / (t < 0 ? -e : t) * r || 0, Wt = ({
471
+ }), 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) => {
472
+ const a = s && t ? e / 2 : e;
473
+ return s ? a : 0;
474
+ }, qt = (s, t, e, a) => s / (t < 0 ? -e : t) * a || 0, Wt = ({
478
475
  average: s,
479
476
  barWidth: t = "8%",
480
477
  color: e,
481
- data: r,
482
- height: a,
478
+ data: a,
479
+ height: r,
483
480
  legendLabelAverage: o,
484
481
  legendLabelMain: d,
485
- onBarClick: l,
486
- selectedIndex: i,
487
- valueFormatter: c = (h) => `${h}`
482
+ onBarClick: i,
483
+ selectedIndex: n,
484
+ valueFormatter: u = (h) => `${h}`
488
485
  }) => {
489
- const h = x(), f = Qt(h), g = r.reduce(Ht, []), S = s !== void 0 ? s : g.reduce(Ot, 0) / g.length, C = Math.max(...g), D = Math.min(...g), v = g.reduce(Gt, 0), A = C >= 0, $ = D < 0, I = Y(A, $, a), N = Y($, A, a), R = qt(S, C, D, I || N), tt = (b) => i === void 0 || b === i ? e : `${e}80`, U = () => /* @__PURE__ */ n(
486
+ 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(
490
487
  Q,
491
488
  {
492
- averageLineHeight: R,
489
+ averageLineHeight: U,
493
490
  bottomHeight: N,
494
491
  color: "",
495
492
  range: v,
@@ -500,30 +497,30 @@ const Xe = (s) => {
500
497
  );
501
498
  return /* @__PURE__ */ _("div", { className: `mx-cmn-bar-chart ${f}`, children: [
502
499
  /* @__PURE__ */ _("div", { className: "mx-cmn-chart-container", children: [
503
- /* @__PURE__ */ n(U, {}),
504
- r.map((b, F) => /* @__PURE__ */ _(lt.Fragment, { children: [
505
- /* @__PURE__ */ n(
500
+ /* @__PURE__ */ c(k, {}),
501
+ a.map((b, F) => /* @__PURE__ */ _(dt.Fragment, { children: [
502
+ /* @__PURE__ */ c(
506
503
  Q,
507
504
  {
508
505
  ariaLabel: b.ariaLabel,
509
- averageLineHeight: R,
506
+ averageLineHeight: U,
510
507
  bottomHeight: N,
511
508
  color: tt(F),
512
509
  index: F,
513
- onClick: l,
510
+ onClick: i,
514
511
  range: v,
515
- selectedIndex: i,
512
+ selectedIndex: n,
516
513
  topHeight: I,
517
514
  value: b.value,
518
- valueLabel: c(b.value),
515
+ valueLabel: u(b.value),
519
516
  width: t,
520
517
  xAxisLabel: b.label
521
518
  }
522
519
  ),
523
- /* @__PURE__ */ n(U, {})
520
+ /* @__PURE__ */ c(k, {})
524
521
  ] }, `column-${F}`))
525
522
  ] }),
526
- /* @__PURE__ */ n(Rt, { color: e, labelAverage: o, labelMain: d })
523
+ /* @__PURE__ */ c(Ut, { color: e, labelAverage: o, labelMain: d })
527
524
  ] });
528
525
  }, Qt = (s) => w({
529
526
  "& .mx-cmn-chart-container": {
@@ -537,41 +534,41 @@ const Xe = (s) => {
537
534
  hasGap: s = !1,
538
535
  segments: t,
539
536
  size: e = gt,
540
- strokeWidth: r = pt,
541
- children: a
537
+ strokeWidth: a = pt,
538
+ children: r
542
539
  }) => {
543
- const o = x(), d = zt(o, e), l = (e - r) / 2, i = e / 2;
544
- let c = -90 - (s ? 1 : 0), h = 0;
540
+ const o = x(), d = zt(o, e), i = (e - a) / 2, n = e / 2;
541
+ let u = -90 - (s ? 1 : 0), h = 0;
545
542
  return /* @__PURE__ */ _("div", { className: `mx-cmn-multi-segment-donut ${d}`, children: [
546
543
  /* @__PURE__ */ _("svg", { height: e, width: e, children: [
547
- /* @__PURE__ */ n(
544
+ /* @__PURE__ */ c(
548
545
  "circle",
549
546
  {
550
- cx: i,
551
- cy: i,
547
+ cx: n,
548
+ cy: n,
552
549
  fill: "none",
553
- r: l,
550
+ r: i,
554
551
  stroke: o.Color.Neutral300,
555
- strokeWidth: r
552
+ strokeWidth: a
556
553
  }
557
554
  ),
558
- t.map((f, g) => (c += 360 * h + (s ? 1 : 0), h = (f.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ n(
555
+ t.map((f, g) => (u += 360 * h + (s ? 1 : 0), h = (f.percent - (s ? 0.3 : 0)) / 100, /* @__PURE__ */ c(
559
556
  "circle",
560
557
  {
561
- cx: i,
562
- cy: i,
558
+ cx: n,
559
+ cy: n,
563
560
  fill: "none",
564
- r: l,
561
+ r: i,
565
562
  stroke: f.color,
566
- strokeDasharray: 2 * Math.PI * l,
567
- strokeDashoffset: 2 * Math.PI * l * (1 - h),
568
- strokeWidth: r,
569
- transform: `rotate(${c}, ${i}, ${i})`
563
+ strokeDasharray: 2 * Math.PI * i,
564
+ strokeDashoffset: 2 * Math.PI * i * (1 - h),
565
+ strokeWidth: a,
566
+ transform: `rotate(${u}, ${n}, ${n})`
570
567
  },
571
568
  g
572
569
  )))
573
570
  ] }),
574
- /* @__PURE__ */ n("div", { className: "mx-cmn-multi-segment-donut-children", children: a })
571
+ /* @__PURE__ */ c("div", { className: "mx-cmn-multi-segment-donut-children", children: r })
575
572
  ] });
576
573
  }, zt = (s, t) => w({
577
574
  height: t,
@@ -607,12 +604,12 @@ class Xt {
607
604
  };
608
605
  getCopy = async (t, e = "") => {
609
606
  try {
610
- const r = await this.api.getGlobalCopy(t, e);
607
+ const a = await this.api.getGlobalCopy(t, e);
611
608
  p(() => {
612
- this.copy = r[t];
609
+ this.copy = a[t];
613
610
  });
614
- } catch (r) {
615
- console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${r}`);
611
+ } catch (a) {
612
+ console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${a}`);
616
613
  }
617
614
  };
618
615
  }
@@ -649,8 +646,8 @@ class Kt {
649
646
  ft.getActiveMatchingSurveys((e) => {
650
647
  p(() => {
651
648
  if (e.length > 0) {
652
- const r = e.find((a) => a.id === this.surveyId);
653
- r && (this.survey = r, this.currentQuestionIndex = 0, this.question = r.questions[0], this.response = null, this.responses = {});
649
+ const a = e.find((r) => r.id === this.surveyId);
650
+ a && (this.survey = a, this.currentQuestionIndex = 0, this.question = a.questions[0], this.response = null, this.responses = {});
654
651
  }
655
652
  });
656
653
  }, t);
@@ -670,19 +667,19 @@ class z {
670
667
  constructor(t, e) {
671
668
  this.fetchInstance = new y(t, e);
672
669
  }
673
- addBudget = async (t, e, r = null) => this.fetchInstance.post(u.BUDGETS, {
670
+ addBudget = async (t, e, a = null) => this.fetchInstance.post(l.BUDGETS, {
674
671
  amount: e,
675
672
  category_guid: t.guid,
676
673
  category_name: t.name,
677
- parent_guid: r
678
- }).then((a) => a.budget).catch((a) => {
679
- throw a;
674
+ parent_guid: a
675
+ }).then((r) => r.budget).catch((r) => {
676
+ throw r;
680
677
  });
681
- deleteBudget = async (t) => this.fetchInstance.delete(`${u.BUDGETS}/${t}`).then((e) => e).catch((e) => {
678
+ deleteBudget = async (t) => this.fetchInstance.delete(`${l.BUDGETS}/${t}`).then((e) => e).catch((e) => {
682
679
  throw e;
683
680
  });
684
- getBudgets = async () => this.fetchInstance.get(u.BUDGETS).then((t) => t.budgets).catch((t) => t);
685
- updateBudget = async (t) => this.fetchInstance.put(`${u.BUDGETS}/${t.guid}`, t).then((e) => e.budget).catch((e) => {
681
+ getBudgets = async () => this.fetchInstance.get(l.BUDGETS).then((t) => t.budgets).catch((t) => t);
682
+ updateBudget = async (t) => this.fetchInstance.put(`${l.BUDGETS}/${t.guid}`, t).then((e) => e.budget).catch((e) => {
686
683
  throw e;
687
684
  });
688
685
  }
@@ -690,7 +687,7 @@ class jt {
690
687
  api = new z("/", "");
691
688
  globalStore;
692
689
  alert = "";
693
- dateRange = { start: J(k()), end: Z(k()) };
690
+ dateRange = { start: J(L()), end: Z(L()) };
694
691
  budgets = [];
695
692
  selectedBudget;
696
693
  selectedSubBudget;
@@ -706,18 +703,18 @@ class jt {
706
703
  if (t) {
707
704
  const e = this.selectedBudget;
708
705
  e && (this.selectedBudget = bt(t, e.guid));
709
- const r = this.selectedSubBudget;
710
- r && r.parent_guid && (this.selectedSubBudget = wt(
706
+ const a = this.selectedSubBudget;
707
+ a && a.parent_guid && (this.selectedSubBudget = wt(
711
708
  t,
712
- r.guid,
713
- r.parent_guid
709
+ a.guid,
710
+ a.parent_guid
714
711
  ));
715
712
  }
716
713
  }
717
714
  );
718
715
  };
719
716
  get detailedBudgets() {
720
- return L(
717
+ return O(
721
718
  this.budgets.filter(
722
719
  (t) => t.category_guid !== E.INCOME && t.category_guid !== E.TRANSFER && t.category_guid !== E.INVESTMENTS
723
720
  ),
@@ -727,13 +724,13 @@ class jt {
727
724
  ).sort((t, e) => t.percentage > e.percentage ? -1 : t.percentage < e.percentage ? 1 : 0);
728
725
  }
729
726
  get incomeBudget() {
730
- return L(
731
- this.budgets.filter((r) => !r.parent_guid),
727
+ return O(
728
+ this.budgets.filter((a) => !a.parent_guid),
732
729
  this.globalStore.categoryStore.detailedCategories,
733
730
  this.globalStore.copyStore.copy.budgets,
734
731
  this.theme
735
732
  ).reduce(
736
- (r, a) => a.category_guid !== E.INCOME ? r : !r || a.percentage > r.percentage ? a : r,
733
+ (a, r) => r.category_guid !== E.INCOME ? a : !a || r.percentage > a.percentage ? r : a,
737
734
  void 0
738
735
  )?.amount;
739
736
  }
@@ -745,20 +742,20 @@ class jt {
745
742
  get totalBudgeted() {
746
743
  return this.detailedBudgets.reduce((t, e) => t + e.amount, 0);
747
744
  }
748
- addBudget = async (t, e, r = null) => {
745
+ addBudget = async (t, e, a = null) => {
749
746
  try {
750
- const a = await this.api.addBudget(t, e, r);
747
+ const r = await this.api.addBudget(t, e, a);
751
748
  p(() => {
752
- this.budgets.push(a);
749
+ this.budgets.push(r);
753
750
  });
754
- } catch (a) {
755
- console.error(`Error adding budget: ${a}`);
751
+ } catch (r) {
752
+ console.error(`Error adding budget: ${r}`);
756
753
  }
757
754
  };
758
755
  deleteBudget = async (t) => {
759
756
  try {
760
757
  await this.api.deleteBudget(t), p(() => {
761
- const e = this.budgets.findIndex((r) => r.guid === t);
758
+ const e = this.budgets.findIndex((a) => a.guid === t);
762
759
  e >= 0 && this.budgets.splice(e, 1);
763
760
  });
764
761
  } catch (e) {
@@ -786,18 +783,18 @@ class jt {
786
783
  */
787
784
  recalculateBudgets = async (t) => {
788
785
  try {
789
- for (const r of t) {
790
- const a = this.budgets.find((o) => o.category_guid === r.guid);
791
- a ? await this.api.updateBudget({
792
- ...a,
793
- amount: r.totalAverageAmount
794
- }) : await this.api.addBudget(r, r.totalAverageAmount);
786
+ for (const a of t) {
787
+ const r = this.budgets.find((o) => o.category_guid === a.guid);
788
+ r ? await this.api.updateBudget({
789
+ ...r,
790
+ amount: a.totalAverageAmount
791
+ }) : await this.api.addBudget(a, a.totalAverageAmount);
795
792
  }
796
793
  const e = this.budgets.filter(
797
- (r) => !t.find((a) => a.guid === r.category_guid)
794
+ (a) => !t.find((r) => r.guid === a.category_guid)
798
795
  );
799
- for (const r of e)
800
- await this.api.deleteBudget(r.guid);
796
+ for (const a of e)
797
+ await this.api.deleteBudget(a.guid);
801
798
  return await this.loadBudgets(), { data: this.budgets, isSuccess: !0 };
802
799
  } catch (e) {
803
800
  return console.error("error recalculating budgets", e), { data: [], isSuccess: !1 };
@@ -807,8 +804,8 @@ class jt {
807
804
  try {
808
805
  const e = await this.api.updateBudget(t);
809
806
  p(() => {
810
- const r = this.budgets.findIndex((a) => a.guid === t.guid);
811
- r >= 0 && (this.budgets[r] = e);
807
+ const a = this.budgets.findIndex((r) => r.guid === t.guid);
808
+ a >= 0 && (this.budgets[a] = e);
812
809
  });
813
810
  } catch (e) {
814
811
  console.error(`Error updating budget: ${e}`);
@@ -821,26 +818,26 @@ class X {
821
818
  constructor(t, e) {
822
819
  this.fetchInstance = new y(t, e);
823
820
  }
824
- createSupportTicket = async (t) => this.fetchInstance.post(u.SUPPORT_TICKETS, t).then((e) => e);
821
+ createSupportTicket = async (t) => this.fetchInstance.post(l.SUPPORT_TICKETS, t).then((e) => e);
825
822
  }
826
823
  const ee = (s, t) => s.guid === "general" || s.guid === "insights" ? !0 : s.flags ? s.flags.every((e) => t[e]) : !1, se = (s, t) => {
827
824
  const e = [];
828
- for (const r of at) {
829
- const a = t[r.guid];
830
- if (!a) continue;
825
+ for (const a of rt) {
826
+ const r = t[a.guid];
827
+ if (!r) continue;
831
828
  const o = {
832
- ...r,
833
- title: a.label,
834
- topics: r.topics.map(({ topicKey: d }, l) => ({
829
+ ...a,
830
+ title: r.label,
831
+ topics: a.topics.map(({ topicKey: d }, i) => ({
835
832
  topicKey: d,
836
- label: a.topics[l]
833
+ label: r.topics[i]
837
834
  }))
838
835
  };
839
836
  ee(o, s) && e.push(o);
840
837
  }
841
838
  return e;
842
839
  };
843
- class re {
840
+ class ae {
844
841
  alert = { message: "", severity: void 0 };
845
842
  api = new X("/", "");
846
843
  appConfig;
@@ -864,7 +861,7 @@ class re {
864
861
  }
865
862
  get helpCategories() {
866
863
  const { client_communication_profile: t, client_profile: e } = this.globalStore.appDataStore.appData, {
867
- help: { category_list: r }
864
+ help: { category_list: a }
868
865
  } = this.globalStore.copyStore.copy;
869
866
  return se(
870
867
  {
@@ -872,7 +869,7 @@ class re {
872
869
  ...e,
873
870
  ...this.globalStore.appConfig.config
874
871
  },
875
- r
872
+ a
876
873
  );
877
874
  }
878
875
  }
@@ -881,10 +878,10 @@ class K {
881
878
  constructor(t, e) {
882
879
  this.fetchInstance = new y(t, e);
883
880
  }
884
- getHoldings = async () => this.fetchInstance.get(u.HOLDINGS).then((t) => t.holdings);
885
- updateHoldings = async (t) => this.fetchInstance.put(`${u.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
881
+ getHoldings = async () => this.fetchInstance.get(l.HOLDINGS).then((t) => t.holdings);
882
+ updateHoldings = async (t) => this.fetchInstance.put(`${l.HOLDINGS}/${t.guid}`, t).then((e) => e.holding);
886
883
  }
887
- class ae {
884
+ class re {
888
885
  analysisType = Dt.Stocks;
889
886
  api = new K("/", "");
890
887
  holdings = [];
@@ -924,11 +921,11 @@ class ae {
924
921
  updateHoldings = async (t) => {
925
922
  this.holdingsLoaded = !1;
926
923
  try {
927
- const e = await this.api.updateHoldings(t), r = this.holdings.findIndex(({ guid: a }) => a === t.guid);
928
- if (r >= 0) {
929
- const a = [...this.holdings];
930
- a[r] = e, p(() => {
931
- this.holdings = a, this.holdingsLoaded = !0;
924
+ const e = await this.api.updateHoldings(t), a = this.holdings.findIndex(({ guid: r }) => r === t.guid);
925
+ if (a >= 0) {
926
+ const r = [...this.holdings];
927
+ r[a] = e, p(() => {
928
+ this.holdings = r, this.holdingsLoaded = !0;
932
929
  });
933
930
  }
934
931
  } catch (e) {
@@ -1043,12 +1040,12 @@ class V {
1043
1040
  constructor(t, e) {
1044
1041
  this.fetchInstance = new y(t, e);
1045
1042
  }
1046
- getAppData = async () => this.fetchInstance.get(u.APP_DATA).then((t) => t);
1043
+ getAppData = async () => this.fetchInstance.get(l.APP_DATA).then((t) => t);
1047
1044
  }
1048
1045
  class oe {
1049
1046
  globalStore;
1050
1047
  api = new V("/", "");
1051
- bannerApi = new H("/");
1048
+ bannerApi = new P("/");
1052
1049
  appData = {};
1053
1050
  banner = {};
1054
1051
  constructor(t) {
@@ -1076,7 +1073,7 @@ class oe {
1076
1073
  try {
1077
1074
  const e = t || await this.api.getAppData();
1078
1075
  p(() => {
1079
- this.appData = e, this.bannerApi = new H(e.address?.bullseye || "/");
1076
+ this.appData = e, this.bannerApi = new P(e.address?.bullseye || "/");
1080
1077
  });
1081
1078
  } catch (e) {
1082
1079
  console.error(`Error loading app data: ${e}`);
@@ -1102,8 +1099,8 @@ class ne {
1102
1099
  constructor(t) {
1103
1100
  this.globalStore = t, this.widgetApi = new q(t.endpoint, t.sessionToken), m(this);
1104
1101
  }
1105
- loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...r }) => await this.widgetApi.requestWidgetUrl({
1106
- widget_url: { widget_type: t, color_scheme: e, ...r }
1102
+ loadWidget = async ({ widget: t = "connect_widget", mode: e = "light", ...a }) => await this.widgetApi.requestWidgetUrl({
1103
+ widget_url: { widget_type: t, color_scheme: e, ...a }
1107
1104
  });
1108
1105
  }
1109
1106
  class ie {
@@ -1134,8 +1131,8 @@ class ie {
1134
1131
  };
1135
1132
  // Sets an array of selected account guids for the AccountFilter component
1136
1133
  setSelectedAccountGuids = async (t) => {
1137
- const e = new Set(this.selectedAccountGuids), r = new Set(t), a = [...r].filter((d) => !e.has(d)), o = [...e].filter((d) => !r.has(d));
1138
- a.length > 0 && this.globalStore.accountStore.updateAccountFiltering(a, !1), o.length > 0 && this.globalStore.accountStore.updateAccountFiltering(o, !0), this.selectedAccountGuids = t;
1134
+ const e = new Set(this.selectedAccountGuids), a = new Set(t), r = [...a].filter((d) => !e.has(d)), o = [...e].filter((d) => !a.has(d));
1135
+ r.length > 0 && this.globalStore.accountStore.updateAccountFiltering(r, !1), o.length > 0 && this.globalStore.accountStore.updateAccountFiltering(o, !0), this.selectedAccountGuids = t;
1139
1136
  };
1140
1137
  setDisplayedDate = (t, e) => {
1141
1138
  this.displayedDate = e, this.displayedDateRange = {
@@ -1154,15 +1151,15 @@ class ie {
1154
1151
  }
1155
1152
  class ce {
1156
1153
  globalStore;
1157
- api = new P("/", "");
1154
+ api = new $("/", "");
1158
1155
  userFeatures = [];
1159
1156
  constructor(t) {
1160
- this.globalStore = t, this.api = new P(t.endpoint, t.sessionToken), m(this);
1157
+ this.globalStore = t, this.api = new $(t.endpoint, t.sessionToken), m(this);
1161
1158
  }
1162
1159
  // DEPRECATED: Initialize api in constructor and use loadUserFeatures instead
1163
1160
  // TODO: Remove this function
1164
1161
  initialize = async (t, e) => {
1165
- this.api = new P(t, e), await this.loadUserFeatures();
1162
+ this.api = new $(t, e), await this.loadUserFeatures();
1166
1163
  };
1167
1164
  get userProfile() {
1168
1165
  return this.globalStore.appDataStore.userProfile;
@@ -1228,7 +1225,7 @@ class Ve {
1228
1225
  // UI Stores
1229
1226
  globalUiStore;
1230
1227
  constructor(t = j, e = "/") {
1231
- 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 re(this), this.holdingStore = new ae(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);
1228
+ 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);
1232
1229
  }
1233
1230
  get isInitialized() {
1234
1231
  return this.globalUiStore.isInitialized;
@@ -1236,25 +1233,25 @@ class Ve {
1236
1233
  loadData = async ({
1237
1234
  accounts: t,
1238
1235
  appData: e,
1239
- associatedBeats: r,
1240
- categories: a,
1236
+ associatedBeats: a,
1237
+ categories: r,
1241
1238
  institutions: o,
1242
1239
  transactionRules: d,
1243
- transactions: l,
1244
- userFeatures: i
1240
+ transactions: i,
1241
+ userFeatures: n
1245
1242
  } = {}) => {
1246
1243
  await Promise.all([
1247
1244
  // Load copy, config and quser data
1248
1245
  this.copyStore.loadCopy(),
1249
1246
  this.appDataStore.loadAppData(e),
1250
- this.userStore.loadUserFeatures(i)
1247
+ this.userStore.loadUserFeatures(n)
1251
1248
  ]), await Promise.all([
1252
1249
  this.accountStore.loadAccountData({ accounts: t, institutions: o }),
1253
- this.categoryStore.loadCategories(a),
1250
+ this.categoryStore.loadCategories(r),
1254
1251
  this.transactionStore.loadTransactionData({
1255
- associatedBeats: r,
1252
+ associatedBeats: a,
1256
1253
  transactionRules: d,
1257
- transactions: l
1254
+ transactions: i
1258
1255
  })
1259
1256
  ]), this.globalUiStore.setInitialized(!0);
1260
1257
  };
@@ -1264,154 +1261,154 @@ export {
1264
1261
  As as AccountFilter,
1265
1262
  Es as AccountIcon,
1266
1263
  Ts as AccountIconVariants,
1267
- Er as AccountNotificationTypes,
1264
+ Ea as AccountNotificationTypes,
1268
1265
  Bs as AccountSubType,
1269
1266
  Is as AccountType,
1270
1267
  Ns as AccountTypeName,
1271
1268
  ts as AnalyticsApi,
1272
- u as ApiEndpoints,
1273
- H as BannerApi,
1269
+ l as ApiEndpoints,
1270
+ P as BannerApi,
1274
1271
  Ke as BarChart,
1275
1272
  os as BeatApi,
1276
- Tr as BudgetNotificationTypes,
1273
+ Ta as BudgetNotificationTypes,
1277
1274
  us as Calendar,
1278
1275
  hs as CalendarSelectionTypes,
1279
1276
  is as CategoryApi,
1280
- ta as CategoryColors,
1281
- ea as CategoryGuidToName,
1277
+ tr as CategoryColors,
1278
+ er as CategoryGuidToName,
1282
1279
  E as CategoryGuids,
1283
- sa as CategoryIcon,
1284
- hr as ConnectCard,
1280
+ sr as CategoryIcon,
1281
+ ha as ConnectCard,
1285
1282
  Fs as ConnectDrawer,
1286
1283
  Ms as ConnectionStatus,
1287
- Ps as ConnectionStatusEnums,
1288
- oa as CurrencyCodes,
1284
+ $s as ConnectionStatusEnums,
1285
+ or as CurrencyCodes,
1289
1286
  qs as CurrencyInput,
1290
- yr as CurrencyText,
1291
- Or as DATE_FORMATS_INTL,
1287
+ ya as CurrencyText,
1288
+ Ga as DATE_FORMATS_INTL,
1292
1289
  gt as DEFAULT_DONUT_SIZE,
1293
1290
  pt as DEFAULT_STROKE_WIDTH,
1294
- rr as DataRow,
1291
+ aa as DataRow,
1295
1292
  Cs as DateRangeSelector,
1296
- Gr as Dialog,
1297
- Pr as Donut,
1298
- Xr as Drawer,
1299
- Sr as EmptyState,
1293
+ Ha as Dialog,
1294
+ $a as Donut,
1295
+ Xa as Drawer,
1296
+ Sa as EmptyState,
1300
1297
  _s as ErrorBoundary,
1301
- $s as ErrorStatuses,
1298
+ Rs as ErrorStatuses,
1302
1299
  Zt as ExpenseStatus,
1303
1300
  y as Fetch,
1304
- ar as Frequency,
1301
+ ra as Frequency,
1305
1302
  M as GlobalCopyApi,
1306
1303
  Xt as GlobalCopyStore,
1307
- ma as GlobalDataContext,
1308
- _a as GlobalDataProvider,
1304
+ mr as GlobalDataContext,
1305
+ _r as GlobalDataProvider,
1309
1306
  Ve as GlobalStore,
1310
- gr as GoalType,
1311
- jr as INCOME_ACCOUNT_TYPES,
1312
- er as IconBacking,
1313
- dr as InformationTooltip,
1314
- Br as InsightNotificationTypes,
1315
- $t as IterationItemTypes,
1307
+ ga as GoalType,
1308
+ ja as INCOME_ACCOUNT_TYPES,
1309
+ ea as IconBacking,
1310
+ la as InformationTooltip,
1311
+ Ba as InsightNotificationTypes,
1312
+ Rt as IterationItemTypes,
1316
1313
  We as LOADING_STATUS,
1317
- Rr as LineChart,
1318
- wr as ListItemAction,
1319
- Cr as ListItemRow,
1314
+ Ua as LineChart,
1315
+ wa as ListItemAction,
1316
+ Ca as ListItemRow,
1320
1317
  gs as ListItemWrapper,
1321
1318
  Qs as Loader,
1322
1319
  Ye as LocalizedCopyApi,
1323
- pr as MetaType,
1324
- Rs as MfaStatuses,
1320
+ pa as MetaType,
1321
+ Us as MfaStatuses,
1325
1322
  fs as MicroWidgetContainer,
1326
1323
  bs as MiniWidgetContainer,
1327
1324
  je as MultiSegmentDonut,
1328
- Us as NonConnectedStatuses,
1329
- ls as NotificationApi,
1330
- Ir as NotificationTypes,
1331
- Hr as ORDINAL_DATE_FORMAT,
1332
- qr as ORDINAL_MONTH_DAY_YEAR_FORMAT,
1333
- Vr as PAYMENT_ACCOUNT_TYPES,
1334
- ra as PaymentCategories,
1335
- Pt as PlanTypes,
1336
- ks as ProcessingStatuses,
1337
- Ls as PropertyType,
1338
- Os as PropertyTypeName,
1325
+ ks as NonConnectedStatuses,
1326
+ ds as NotificationApi,
1327
+ Ia as NotificationTypes,
1328
+ Pa as ORDINAL_DATE_FORMAT,
1329
+ qa as ORDINAL_MONTH_DAY_YEAR_FORMAT,
1330
+ Va as PAYMENT_ACCOUNT_TYPES,
1331
+ ar as PaymentCategories,
1332
+ $t as PlanTypes,
1333
+ Ls as ProcessingStatuses,
1334
+ Os as PropertyType,
1335
+ Gs as PropertyTypeName,
1339
1336
  qe as RECURRENCE_COPY,
1340
- or as RecurrenceStatus,
1341
- nr as RecurrenceType,
1337
+ oa as RecurrenceStatus,
1338
+ na as RecurrenceType,
1342
1339
  Mt as RecurrenceTypes,
1343
- ir as RepeatingType,
1340
+ ia as RepeatingType,
1344
1341
  zs as ResponsiveButton,
1345
- Zr as SPENDING_ACCOUNT_TYPES,
1342
+ Za as SPENDING_ACCOUNT_TYPES,
1346
1343
  Jt as ScheduledPaymentTypes,
1347
1344
  ze as ScheduledPaymentsApi,
1348
1345
  te as ScreenSize,
1349
1346
  Ks as SearchBox,
1350
- cr as Select,
1347
+ ca as Select,
1351
1348
  Vs as SelectionBox,
1352
- Yr as SingleSegmentDonut,
1353
- ha as Sizes,
1354
- Dr as StackedLineChart,
1355
- kr as StatusBar,
1356
- Gs as StatusName,
1357
- ga as TOUCH_TARGET,
1349
+ Ya as SingleSegmentDonut,
1350
+ hr as Sizes,
1351
+ Da as StackedLineChart,
1352
+ La as StatusBar,
1353
+ Hs as StatusName,
1354
+ gr as TOUCH_TARGET,
1358
1355
  Js as TabContentContainer,
1359
- Nr as ToggleButtonListItem,
1360
- Fr as ToggleListItem,
1361
- mr as TrackType,
1356
+ Na as ToggleButtonListItem,
1357
+ Fa as ToggleListItem,
1358
+ ma as TrackType,
1362
1359
  ps as TransactionStatus,
1363
- rt as TransactionType,
1364
- P as UserApi,
1360
+ at as TransactionType,
1361
+ $ as UserApi,
1365
1362
  ce as UserStore,
1366
1363
  Vt as UserVerification,
1367
1364
  q as WidgetApi,
1368
1365
  Ds as WidgetContainer,
1369
- ya as WidgetContainerContext,
1370
- fa as WidgetContainerProvider,
1366
+ yr as WidgetContainerContext,
1367
+ fr as WidgetContainerProvider,
1371
1368
  es as analyticsSession,
1372
1369
  to as buildDynamicCopy,
1373
1370
  eo as buildPluralCopy,
1374
- na as formatCurrency,
1375
- Wr as formatDate,
1376
- ia as formatOrdinal,
1377
- ca as formatPercentage,
1378
- Za as fromTimestampToMonthYear,
1379
- Ya as getCategory,
1380
- za as getCategoryTotalsByParent,
1371
+ nr as formatCurrency,
1372
+ Wa as formatDate,
1373
+ ir as formatOrdinal,
1374
+ cr as formatPercentage,
1375
+ Zr as fromTimestampToMonthYear,
1376
+ Yr as getCategory,
1377
+ zr as getCategoryTotalsByParent,
1381
1378
  Qe as getClientTheme,
1382
- la as getCurrencyCodes,
1383
- Xa as getDetailedCategory,
1384
- Ka as getDetailedSubCategory,
1379
+ dr as getCurrencyCodes,
1380
+ Xr as getDetailedCategory,
1381
+ Kr as getDetailedSubCategory,
1385
1382
  so as getLocale,
1386
- ja as isIncome,
1387
- da as isValidNumber,
1388
- Sa as useAccountStore,
1389
- ba as useAppConfig,
1390
- wa as useBudgetsStore,
1391
- xa as useCashflowStore,
1392
- Ca as useCategoryStore,
1383
+ jr as isIncome,
1384
+ lr as isValidNumber,
1385
+ Sr as useAccountStore,
1386
+ br as useAppConfig,
1387
+ wr as useBudgetsStore,
1388
+ xr as useCashflowStore,
1389
+ Cr as useCategoryStore,
1393
1390
  ss as useCombineEvents,
1394
- rs as useCombinePageviews,
1395
- Da as useDebtStore,
1396
- va as useEvent,
1397
- Aa as useFinstrongStore,
1398
- Ea as useGlobalCopyStore,
1399
- Ta as useGlobalStore,
1400
- Ba as useGlobalUiStore,
1401
- Ia as useGoalStore,
1402
- Na as useHelpStore,
1403
- Fa as useHoldingStore,
1404
- vr as useInsightsEnabled,
1405
- Ma as useMerchantStore,
1406
- Pa as useNetWorthStore,
1407
- $a as useNotificationStore,
1408
- Ra as usePageView,
1391
+ as as useCombinePageviews,
1392
+ Dr as useDebtStore,
1393
+ vr as useEvent,
1394
+ Ar as useFinstrongStore,
1395
+ Er as useGlobalCopyStore,
1396
+ Tr as useGlobalStore,
1397
+ Br as useGlobalUiStore,
1398
+ Ir as useGoalStore,
1399
+ Nr as useHelpStore,
1400
+ Fr as useHoldingStore,
1401
+ va as useInsightsEnabled,
1402
+ Mr as useMerchantStore,
1403
+ $r as useNetWorthStore,
1404
+ Rr as useNotificationStore,
1405
+ Ur as usePageView,
1409
1406
  Xe as usePrevious,
1410
- Ua as useRecurringTransactionsStore,
1411
- Wa as useScreenSize,
1412
- ka as useSettingsStore,
1413
- La as useTransactionStore,
1414
- Oa as useTrendsStore,
1415
- Ga as useUserStore,
1416
- Ha as useWidgetContainerProvider
1407
+ kr as useRecurringTransactionsStore,
1408
+ Wr as useScreenSize,
1409
+ Lr as useSettingsStore,
1410
+ Or as useTransactionStore,
1411
+ Gr as useTrendsStore,
1412
+ Hr as useUserStore,
1413
+ Pr as useWidgetContainerProvider
1417
1414
  };