@mx-cartographer/experiences 7.0.9-alpha.mega1 → 7.0.9

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/{Account-Bdz1k5WZ.mjs → Account-BW3-oYEs.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-CEjEyv_M.mjs → AccountDetailsContent-Dkpo7pw6.mjs} +16 -16
  4. package/dist/{AccountDetailsHeader-uX5amBaR.mjs → AccountDetailsHeader-2HU_fMWZ.mjs} +11 -11
  5. package/dist/{AccountFields-Ckw28o6E.mjs → AccountFields-CIz-r3gP.mjs} +2 -2
  6. package/dist/{AccountListItem-DKwz0HGB.mjs → AccountListItem-B-ZjJ4Gp.mjs} +3 -3
  7. package/dist/{AccountStore-DhfQsEK5.mjs → AccountStore-BQKxAYSg.mjs} +62 -67
  8. package/dist/{Accounts-CAr848d0.mjs → Accounts-CA-nqAjT.mjs} +1 -1
  9. package/dist/{BudgetUtil-spowPvBM.mjs → BudgetUtil-CeSLAcsl.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-Dyzb3UDU.mjs → CategorySelectorDrawer-BPvjZ-Xo.mjs} +1 -1
  11. package/dist/{ConnectDrawer-yFS82Il7.mjs → ConnectDrawer-phFH6OHt.mjs} +5 -5
  12. package/dist/{ConnectionsDrawer-Cl1jJGRv.mjs → ConnectionsDrawer-ihxkAi1P.mjs} +2 -2
  13. package/dist/{CurrencyInput-CSZjO22Z.mjs → CurrencyInput-bEx2Mbd0.mjs} +1 -1
  14. package/dist/{DebtsStore-Bep2cYsx.mjs → DebtsStore-Dp-CraCD.mjs} +1 -1
  15. package/dist/{ExportCsvAction-dpvaZxbS.mjs → ExportCsvAction-CvyiKLTh.mjs} +3 -3
  16. package/dist/GoalStore-BWHkOQ8o.mjs +364 -0
  17. package/dist/{Help-BazrEpv7.mjs → Help-B3oENhkG.mjs} +1 -1
  18. package/dist/{LineChart-CYiUS-px.mjs → LineChart-jpdaQX7x.mjs} +1 -1
  19. package/dist/{ListItemAction-BzmbPuNp.mjs → ListItemAction-DNZZ5fSa.mjs} +1 -1
  20. package/dist/{ManageIncome-Dk2ZDGqw.mjs → ManageIncome-Bd14SWPF.mjs} +4 -4
  21. package/dist/{MicroWidgetContainer-DmYiksbT.mjs → MicroWidgetContainer-Dxz8uBN9.mjs} +1 -1
  22. package/dist/{MiniWidgetContainer-DqKQNubH.mjs → MiniWidgetContainer-CTyjmE1h.mjs} +1 -1
  23. package/dist/{NetWorthStore-DrBL4JEO.mjs → NetWorthStore-B6xF9eGH.mjs} +2 -2
  24. package/dist/{NotificationSettings-BznqGVQ2.mjs → NotificationSettings-uXVwpIa1.mjs} +17 -17
  25. package/dist/{OriginalBalanceAction-CSu5brQE.mjs → OriginalBalanceAction-DepsKiJz.mjs} +3 -3
  26. package/dist/{RecurringSettings-DNJs5JIe.mjs → RecurringSettings-4Y2RJy_M.mjs} +3 -3
  27. package/dist/{Transaction-CyqrHmAA.mjs → Transaction-Dns0Kuuy.mjs} +1 -1
  28. package/dist/{TransactionDetails-B6h5Qo1c.mjs → TransactionDetails-BSl6CpL8.mjs} +5 -5
  29. package/dist/{TransactionStore-DSyXtPek.mjs → TransactionStore-BVKUoEHj.mjs} +2 -2
  30. package/dist/{TrendsStore-DR8etTL2.mjs → TrendsStore-D6Un6Y4A.mjs} +1 -1
  31. package/dist/{WidgetContainer-D7sX3S6R.mjs → WidgetContainer-C2NBfpDg.mjs} +2 -2
  32. package/dist/accounts/index.es.js +17 -17
  33. package/dist/analytics/index.es.js +2 -2
  34. package/dist/budgets/index.es.js +10 -10
  35. package/dist/cashflow/index.es.js +7 -7
  36. package/dist/categories/index.es.js +1 -1
  37. package/dist/common/index.es.js +22 -22
  38. package/dist/dashboard/index.es.js +14 -14
  39. package/dist/debts/index.es.js +9 -9
  40. package/dist/{exportTransactionsToCSV-BlVifaOG.mjs → exportTransactionsToCSV-B4JW8rfR.mjs} +1 -1
  41. package/dist/finstrong/index.es.js +6 -6
  42. package/dist/goals/index.es.js +560 -647
  43. package/dist/goals/util/GoalsUtil.d.ts +1 -0
  44. package/dist/help/index.es.js +3 -3
  45. package/dist/{hooks-02T565vf.mjs → hooks-DkUqN6JE.mjs} +3 -3
  46. package/dist/investments/index.es.js +3 -3
  47. package/dist/merchants/index.es.js +1 -1
  48. package/dist/networth/index.es.js +7 -7
  49. package/dist/notifications/index.es.js +7 -7
  50. package/dist/recurringtransactions/index.es.js +8 -8
  51. package/dist/settings/index.es.js +6 -6
  52. package/dist/spending/index.es.js +4 -4
  53. package/dist/transactions/index.es.js +13 -13
  54. package/dist/trends/index.es.js +9 -9
  55. package/package.json +1 -1
  56. package/dist/GoalStore-ChqCWX_U.mjs +0 -263
  57. package/dist/common/utils/User.d.ts +0 -2
@@ -0,0 +1,364 @@
1
+ import { jsxs as g, jsx as _ } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import p from "@mui/material/Button";
4
+ import T from "@mui/material/Card";
5
+ import I from "@mui/material/CardContent";
6
+ import N from "@mui/material/CardHeader";
7
+ import O from "@mui/material/Stack";
8
+ import { AccountBalance as w, ChevronRight as S } from "@mxenabled/mx-icons";
9
+ import { Text as A } from "@mxenabled/mxui";
10
+ import { j as L } from "./ConnectDrawer-phFH6OHt.mjs";
11
+ import { m as b } from "./hooks-DkUqN6JE.mjs";
12
+ import { makeAutoObservable as y, runInAction as c } from "mobx";
13
+ import { F as D, A as i } from "./Fetch-CkFKy79O.mjs";
14
+ import { fromUnixTime as C } from "date-fns/fromUnixTime";
15
+ import { addYears as v } from "date-fns/addYears";
16
+ import { getUnixTime as x } from "date-fns/getUnixTime";
17
+ import { b as m } from "./Localization-2MODESHW.mjs";
18
+ import { a as K } from "./NumberFormatting-CtWHhyBX.mjs";
19
+ import { f as F, D as B } from "./Dialog-CWW597AF.mjs";
20
+ const at = ({ description: e, label: t, title: o }) => {
21
+ const { config: r } = b(), [n, s] = u.useState(!1);
22
+ if (r.show_connections_widget_in_master)
23
+ return /* @__PURE__ */ g(u.Fragment, { children: [
24
+ /* @__PURE__ */ g(T, { sx: { m: 24 }, children: [
25
+ /* @__PURE__ */ _(
26
+ N,
27
+ {
28
+ avatar: /* @__PURE__ */ _(w, {}),
29
+ sx: { ".MuiCardHeader-avatar": { mr: 8 } },
30
+ title: /* @__PURE__ */ _(A, { bold: !0, variant: "Body", children: o })
31
+ }
32
+ ),
33
+ /* @__PURE__ */ _(I, { sx: { ":last-child": { pb: 4 }, ml: 28, py: 0 }, children: /* @__PURE__ */ g(O, { alignItems: "flex-start", spacing: 2, children: [
34
+ /* @__PURE__ */ _(A, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: e }),
35
+ /* @__PURE__ */ _(
36
+ p,
37
+ {
38
+ endIcon: /* @__PURE__ */ _(S, {}),
39
+ onClick: () => s(!0),
40
+ sx: {
41
+ pl: 0,
42
+ ":hover": {
43
+ bgcolor: "unset"
44
+ }
45
+ },
46
+ variant: "text",
47
+ children: t
48
+ }
49
+ )
50
+ ] }) })
51
+ ] }),
52
+ /* @__PURE__ */ _(
53
+ L,
54
+ {
55
+ onClose: () => s(!1),
56
+ showConnectWidget: n,
57
+ title: t
58
+ }
59
+ )
60
+ ] });
61
+ };
62
+ var a = /* @__PURE__ */ ((e) => (e[e.DEBT_TRACK = 1] = "DEBT_TRACK", e[e.SAVINGS_TRACK = 2] = "SAVINGS_TRACK", e[e.RETIREMENT_TRACK = 3] = "RETIREMENT_TRACK", e[e.EMERGENCY_FUND_TRACK = 4] = "EMERGENCY_FUND_TRACK", e))(a || {}), U = /* @__PURE__ */ ((e) => (e[e.SAVE_AMOUNT = 1] = "SAVE_AMOUNT", e[e.KEEP_BALANCE_BELOW = 2] = "KEEP_BALANCE_BELOW", e[e.KEEP_BALANCE_ABOVE = 3] = "KEEP_BALANCE_ABOVE", e[e.ACTION = 4] = "ACTION", e))(U || {}), l = /* @__PURE__ */ ((e) => (e[e.AUTOMOBILE = 1] = "AUTOMOBILE", e[e.COLLEGE = 2] = "COLLEGE", e[e.HOUSE = 3] = "HOUSE", e[e.RECREATIONAL_VEHICLE = 4] = "RECREATIONAL_VEHICLE", e[e.VACATION = 5] = "VACATION", e[e.ELECTRONIC = 6] = "ELECTRONIC", e[e.OTHER = 7] = "OTHER", e[e.RETIREMENT = 8] = "RETIREMENT", e[e.EMERGENCY_FUND = 9] = "EMERGENCY_FUND", e[e.SETUP_BUDGETS = 10] = "SETUP_BUDGETS", e[e.START_MONEY_MANAGEMENT = 11] = "START_MONEY_MANAGEMENT", e[e.CREDIT_CARD = 12] = "CREDIT_CARD", e[e.LINE_OF_CREDIT = 13] = "LINE_OF_CREDIT", e[e.LOANS = 14] = "LOANS", e))(l || {});
63
+ class R {
64
+ fetchInstance;
65
+ constructor(t, o) {
66
+ this.fetchInstance = new D(t, o);
67
+ }
68
+ addGoal = async (t) => this.fetchInstance.post(i.GOALS, t).then((o) => o.goal);
69
+ addRetirementGoal = async (t) => this.fetchInstance.post(i.RETIREMENT_GOALS, t).then((o) => o.retirement_goal);
70
+ addRetirementGoalAccount = async (t) => this.fetchInstance.post(i.RETIREMENT_GOAL_ACCOUNTS, t).then((o) => o.retirement_goal_account);
71
+ getGoalByGuid = async (t) => this.fetchInstance.get(`${i.GOALS}/${t}`).then((o) => o.goal);
72
+ getGoals = async () => this.fetchInstance.get(i.GOALS).then((t) => t.goals);
73
+ getMonthlyCashFlowProfile = async () => this.fetchInstance.get(i.MONTHLY_CASH_FLOW_PROFILE).then((t) => t.monthly_cash_flow_profile);
74
+ getRetirementGoals = async () => this.fetchInstance.get(i.RETIREMENT_GOALS).then((t) => t.retirement_goals);
75
+ getRetirementGoalAccounts = async () => this.fetchInstance.get(i.RETIREMENT_GOAL_ACCOUNTS).then((t) => t.retirement_goal_accounts);
76
+ removeGoal = async (t) => this.fetchInstance.delete(`${i.GOALS}/${t}`).then((o) => o);
77
+ removeRetirementGoal = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOALS}/${t}`).then((o) => o);
78
+ removeRetirementGoalAccount = async (t) => this.fetchInstance.delete(`${i.RETIREMENT_GOAL_ACCOUNTS}/${t}`).then((o) => o);
79
+ reorderGoals = async (t) => this.fetchInstance.post(`${i.GOALS}/reposition`, { goals: t }).then((o) => o.goals);
80
+ updateGoal = async (t) => this.fetchInstance.put(`${i.GOALS}/${t.guid}`, t).then((o) => o.goal);
81
+ updateMonthlyCashFlowProfile = async (t) => this.fetchInstance.put(`${i.MONTHLY_CASH_FLOW_PROFILE}`, t).then((o) => o.monthly_cash_flow_profile);
82
+ updateRetirementGoal = async (t) => this.fetchInstance.put(`${i.RETIREMENT_GOALS}/${t.guid}`, t).then((o) => o.retirement_goal);
83
+ }
84
+ function it(e, t) {
85
+ const o = t.track_type === a.DEBT_TRACK ? t.initial_amount : t.amount;
86
+ let r = t.current_amount / o;
87
+ r > 1 && (r = 1), r = t.track_type === a.DEBT_TRACK ? 1 - r : r, isNaN(r) && (r = 1);
88
+ let n = "chart.chart1", s = "common.black";
89
+ t.track_type === a.DEBT_TRACK ? (s = "common.white", n = "chart.chart5") : t.track_type === a.RETIREMENT_TRACK && (n = "chart.chart6");
90
+ const h = {
91
+ style: "percent",
92
+ minimumFractionDigits: 0,
93
+ maximumFractionDigits: 0
94
+ }, E = t.is_complete ? t.completed_at : t.projected_to_complete_at, d = E ? C(E) : /* @__PURE__ */ new Date(), G = m(
95
+ e.goal_percentage,
96
+ K(r, h)
97
+ ), f = m(
98
+ t.is_complete ? e.completed_label : e.goal_projection,
99
+ F(d, B.MONTH_SHORT_YEAR)
100
+ );
101
+ return {
102
+ backgroundColor: n,
103
+ color: s,
104
+ percentage: r,
105
+ percentageText: G,
106
+ projectedText: f
107
+ };
108
+ }
109
+ function st(e) {
110
+ return [
111
+ {
112
+ bgcolor: "chart.chart1",
113
+ icon: "attach_money",
114
+ label: e.saving_goal_label,
115
+ description: e.saving_goal_description,
116
+ subTypes: [
117
+ {
118
+ icon: "ecg_heart",
119
+ label: e.saving_goal_emergency_fund,
120
+ metaType: l.EMERGENCY_FUND
121
+ },
122
+ {
123
+ icon: "directions_car",
124
+ label: e.saving_gaol_automobile,
125
+ metaType: l.AUTOMOBILE
126
+ },
127
+ { icon: "school", label: e.saving_goal_college, metaType: l.COLLEGE },
128
+ { icon: "home", label: e.saving_goal_home, metaType: l.HOUSE },
129
+ {
130
+ icon: "mountain_flag",
131
+ label: e.saving_goal_recreational,
132
+ metaType: l.RECREATIONAL_VEHICLE
133
+ },
134
+ { icon: "airplane_ticket", label: e.saving_goal_vacation, metaType: l.VACATION },
135
+ {
136
+ icon: "desktop_windows",
137
+ label: e.saving_goal_electronic,
138
+ metaType: l.ELECTRONIC
139
+ },
140
+ { icon: "payments", label: e.saving_goal_other, metaType: l.OTHER }
141
+ ],
142
+ type: a.SAVINGS_TRACK
143
+ },
144
+ {
145
+ bgcolor: "chart.chart5",
146
+ icon: "note_stack",
147
+ label: e.debt_goal_label,
148
+ description: e.debt_goal_description,
149
+ subTypes: [],
150
+ type: a.DEBT_TRACK
151
+ },
152
+ {
153
+ bgcolor: "chart.chart6",
154
+ icon: "person",
155
+ label: e.retirement_goal_label,
156
+ description: e.retirement_goal_description,
157
+ subTypes: [],
158
+ type: a.RETIREMENT_TRACK
159
+ }
160
+ ];
161
+ }
162
+ const ct = (e, t) => {
163
+ switch (e) {
164
+ case a.DEBT_TRACK:
165
+ return m(t.zero_state_ongoing, "debt");
166
+ case a.SAVINGS_TRACK:
167
+ return m(t.zero_state_ongoing, "saving");
168
+ default:
169
+ return m(t.zero_state_ongoing, "retirement");
170
+ }
171
+ }, $ = (e, t) => {
172
+ const o = C(t), r = v(o, e);
173
+ return x(r);
174
+ };
175
+ class lt {
176
+ globalStore;
177
+ api = new R("/", "");
178
+ alert = "";
179
+ goals = [];
180
+ retirementGoalAccounts = [];
181
+ newRetirementGoalAccounts = [];
182
+ selectedGoal = void 0;
183
+ monthlyCashFlowProfile = void 0;
184
+ goalsLoaded = !1;
185
+ constructor(t) {
186
+ this.globalStore = t, this.api = new R(t.endpoint, t.sessionToken), y(this);
187
+ }
188
+ get orderedGoals() {
189
+ return this.goals.slice().sort((t, o) => t.position - o.position);
190
+ }
191
+ get debtGoals() {
192
+ return this.orderedGoals.filter((t) => t.track_type === a.DEBT_TRACK);
193
+ }
194
+ get retirmentGoals() {
195
+ return this.orderedGoals.filter((t) => t.track_type === a.RETIREMENT_TRACK);
196
+ }
197
+ get savingGoals() {
198
+ return this.orderedGoals.filter((t) => t.track_type === a.SAVINGS_TRACK);
199
+ }
200
+ get ongoingGoalsForMicroWidget() {
201
+ const t = this.goals.filter(
202
+ (r) => !r.is_complete && r.track_type !== a.EMERGENCY_FUND_TRACK && r.track_type !== null
203
+ ), o = [
204
+ a.SAVINGS_TRACK,
205
+ a.DEBT_TRACK,
206
+ a.RETIREMENT_TRACK
207
+ ];
208
+ return t.sort((r, n) => {
209
+ const s = r.track_type ? o.indexOf(r.track_type) : -1, h = n.track_type ? o.indexOf(n.track_type) : -1;
210
+ return s - h;
211
+ }).slice(0, 3);
212
+ }
213
+ addGoal = async (t) => {
214
+ try {
215
+ const o = await this.api.addGoal(t);
216
+ c(() => {
217
+ this.goals = [...this.goals, o];
218
+ });
219
+ } catch (o) {
220
+ console.error(`Error occurred while adding goal: ${o}`);
221
+ }
222
+ };
223
+ addRetirementGoal = async (t) => {
224
+ const o = this.globalStore.copyStore.copy.goals;
225
+ try {
226
+ const r = await this.api.addRetirementGoal(t), n = [];
227
+ for (const s of this.newRetirementGoalAccounts) {
228
+ const h = await this.api.addRetirementGoalAccount({
229
+ ...s,
230
+ retirement_goal_guid: r.guid
231
+ });
232
+ n.push(h);
233
+ }
234
+ this.setNewRetirementGoalAccounts([]), c(() => {
235
+ this.goals = [
236
+ ...this.goals,
237
+ {
238
+ ...r,
239
+ amount: r.target_amount,
240
+ name: o.retirement,
241
+ track_type: a.RETIREMENT_TRACK
242
+ }
243
+ ], this.retirementGoalAccounts = [...this.retirementGoalAccounts, ...n];
244
+ });
245
+ } catch (r) {
246
+ console.error(`Error occurred while adding retirement goal: ${r}`);
247
+ }
248
+ };
249
+ addRetirementGoalAccount = async (t) => {
250
+ try {
251
+ const o = await this.api.addRetirementGoalAccount(t);
252
+ c(() => {
253
+ this.retirementGoalAccounts = [...this.retirementGoalAccounts, o];
254
+ });
255
+ } catch (o) {
256
+ console.error(`Error occurred while adding retirement goal account: ${o}`);
257
+ }
258
+ };
259
+ loadGoals = async () => {
260
+ const t = this.globalStore.copyStore.copy.goals;
261
+ try {
262
+ const o = await this.api.getGoals(), r = await this.api.getRetirementGoals(), n = await this.api.getRetirementGoalAccounts(), s = await this.api.getMonthlyCashFlowProfile(), h = this.globalStore.userStore.user.birthday, E = [
263
+ ...o,
264
+ ...r.map((d) => ({
265
+ ...d,
266
+ amount: d.target_amount,
267
+ name: t.retirement,
268
+ track_type: a.RETIREMENT_TRACK,
269
+ projected_to_complete_at: d.retirement_age && h ? $(d.retirement_age, h) : void 0
270
+ }))
271
+ ];
272
+ c(() => {
273
+ this.goals = E, this.retirementGoalAccounts = n, this.monthlyCashFlowProfile = s, this.goalsLoaded = !0;
274
+ });
275
+ } catch (o) {
276
+ console.error(`Error occured while getting goals: ${o}`);
277
+ }
278
+ };
279
+ deleteGoal = async (t) => {
280
+ try {
281
+ await this.api.removeGoal(t), c(() => {
282
+ const o = this.goals.findIndex((r) => r.guid === t);
283
+ o >= 0 && this.goals.splice(o, 1);
284
+ });
285
+ } catch (o) {
286
+ console.error(`Error occured while deleting goal: ${o}`);
287
+ }
288
+ };
289
+ deleteRetirementGoal = async (t) => {
290
+ try {
291
+ const o = this.retirementGoalAccounts.filter(
292
+ (r) => r.retirement_goal_guid === t.guid
293
+ );
294
+ for (const r of o)
295
+ await this.deleteRetirementGoalAccount(r.guid);
296
+ await this.api.removeRetirementGoal(t.guid), c(() => {
297
+ const r = this.goals.findIndex((n) => n.guid === t.guid);
298
+ r >= 0 && this.goals.splice(r, 1);
299
+ });
300
+ } catch (o) {
301
+ console.error(`Error deleting retirement goal: ${o}`);
302
+ }
303
+ };
304
+ deleteRetirementGoalAccount = async (t) => {
305
+ try {
306
+ await this.api.removeRetirementGoalAccount(t), c(() => {
307
+ const o = this.retirementGoalAccounts.findIndex((r) => r.guid === t);
308
+ o >= 0 && this.retirementGoalAccounts.splice(o, 1);
309
+ });
310
+ } catch (o) {
311
+ console.error(`Error deleting retirement goal account: ${o}`);
312
+ }
313
+ };
314
+ reorderGoals = async (t) => {
315
+ try {
316
+ const o = await this.api.reorderGoals(t);
317
+ c(() => {
318
+ for (const r of o) {
319
+ const n = this.goals.findIndex((s) => s.guid === r.guid);
320
+ n >= 0 && (this.goals[n].position = r.position);
321
+ }
322
+ });
323
+ } catch (o) {
324
+ console.error(`Error reordering goals: ${o}`);
325
+ }
326
+ };
327
+ setAlert = (t) => this.alert = t;
328
+ setNewRetirementGoalAccounts = (t) => {
329
+ this.newRetirementGoalAccounts = t;
330
+ };
331
+ setSelectedGoal = (t) => this.selectedGoal = t;
332
+ updateGoal = async (t) => {
333
+ try {
334
+ const o = await this.api.updateGoal(t);
335
+ c(() => {
336
+ const r = this.goals.findIndex((n) => n.guid === t.guid);
337
+ r >= 0 && (this.goals[r] = o), this.selectedGoal?.guid === t.guid && this.setSelectedGoal(o);
338
+ });
339
+ } catch (o) {
340
+ console.error(`Error occurred while updating goal: ${o}`);
341
+ }
342
+ };
343
+ updateMonthlyCashFlowProfile = async (t) => {
344
+ try {
345
+ const o = await this.api.updateMonthlyCashFlowProfile(t);
346
+ c(() => {
347
+ this.monthlyCashFlowProfile = o;
348
+ });
349
+ } catch (o) {
350
+ console.error(`Error occurred while updating monthly Cash Flow profile: ${o}`);
351
+ }
352
+ };
353
+ }
354
+ export {
355
+ at as C,
356
+ U as G,
357
+ l as M,
358
+ a as T,
359
+ ct as a,
360
+ st as b,
361
+ R as c,
362
+ lt as d,
363
+ it as g
364
+ };
@@ -13,7 +13,7 @@ import E from "@mui/material/Stack";
13
13
  import { H3 as y, P as H, Icon as X, Text as T, H2 as _t, InstitutionLogo as bt } from "@mxenabled/mxui";
14
14
  import { ExpandMore as ot, ChevronRight as wt } from "@mxenabled/mx-icons";
15
15
  import xt from "@mui/material/Breadcrumbs";
16
- import { u as V, y as tt, c as ft, o as St, a as It, k as Tt } from "./hooks-02T565vf.mjs";
16
+ import { u as V, y as tt, c as ft, o as St, a as It, m as Tt } from "./hooks-DkUqN6JE.mjs";
17
17
  import { useTheme as Z } from "@mui/material/styles";
18
18
  import { b as s } from "./Localization-2MODESHW.mjs";
19
19
  import { E as Et, a as Ct, P as At } from "./Help-DhcC-C05.mjs";
@@ -6,7 +6,7 @@ import { f as y } from "./NumberFormatting-CtWHhyBX.mjs";
6
6
  import { observer as le } from "mobx-react-lite";
7
7
  import { Stack as x, Box as A, useTheme as se } from "@mui/material";
8
8
  import { Text as l } from "@mxenabled/mxui";
9
- import { u as ce } from "./hooks-02T565vf.mjs";
9
+ import { u as ce } from "./hooks-DkUqN6JE.mjs";
10
10
  import { ChartsTooltip as de } from "@mui/x-charts/ChartsTooltip";
11
11
  const he = (e) => {
12
12
  const a = N(), o = e.showLabel, s = e.style, g = Number(e.x), u = Number(e.y), m = e.handlers?.onMarkClick, f = e.handlers?.onMouseEnter, c = e.handlers?.onMouseLeave, d = oe(a.breakpoints.up("sm")), n = e.valueFormatterString ? y(e.yData[e.dataIndex], e.valueFormatterString) : String(e.yData[e.dataIndex]), h = d ? a.typography.Small?.fontSize : a.typography.XSmall?.fontSize, k = h ? parseFloat(h.toString()) * 0.6 : 8, C = n.length * k + 8 + 8, M = 24, S = g - C / 2, T = u - 30;
@@ -8,7 +8,7 @@ import L from "@mui/material/Stack";
8
8
  import { ChevronRight as g } from "@mxenabled/mx-icons";
9
9
  import { Text as m } from "@mxenabled/mxui";
10
10
  import { a as j } from "./Dialog-CWW597AF.mjs";
11
- import { u as P } from "./hooks-02T565vf.mjs";
11
+ import { u as P } from "./hooks-DkUqN6JE.mjs";
12
12
  const D = v(
13
13
  ({
14
14
  children: n,
@@ -16,23 +16,23 @@ import { startOfToday as z } from "date-fns/startOfToday";
16
16
  import { endOfMonth as _e } from "date-fns/endOfMonth";
17
17
  import H from "@mui/material/Button";
18
18
  import { Delete as me, Add as ye, ReceiptLong as pe } from "@mxenabled/mx-icons";
19
- import { T as X, a as he, u as ge, S as fe, b as Ce } from "./TransactionDetails-B6h5Qo1c.mjs";
19
+ import { T as X, a as he, u as ge, S as fe, b as Ce } from "./TransactionDetails-BSl6CpL8.mjs";
20
20
  import { getDayOfYear as be } from "date-fns/getDayOfYear";
21
21
  import { setDayOfYear as Se } from "date-fns/setDayOfYear";
22
22
  import { AdapterDateFns as ve } from "@mui/x-date-pickers/AdapterDateFnsV3";
23
23
  import { DatePicker as xe } from "@mui/x-date-pickers";
24
24
  import { LocalizationProvider as we } from "@mui/x-date-pickers/LocalizationProvider";
25
- import { u as w, h as M, e as F, a as Ae, f as Z, o as De } from "./hooks-02T565vf.mjs";
25
+ import { u as w, h as M, e as F, a as Ae, f as Z, o as De } from "./hooks-DkUqN6JE.mjs";
26
26
  import { b as Ie, f as J } from "./NumberFormatting-CtWHhyBX.mjs";
27
27
  import { D as O } from "./Drawer-kEE73B87.mjs";
28
- import { A as R } from "./WidgetContainer-D7sX3S6R.mjs";
28
+ import { A as R } from "./WidgetContainer-C2NBfpDg.mjs";
29
29
  import { f as Ee, D as Re, a as Te } from "./Dialog-CWW597AF.mjs";
30
30
  import { formatISO as Le } from "date-fns/formatISO";
31
31
  import { fromUnixTime as Oe } from "date-fns/fromUnixTime";
32
32
  import { S as ke } from "./SearchBox-B2_zLv8-.mjs";
33
33
  import { h as Ne } from "./DateUtil-BcuH7ErC.mjs";
34
34
  import { b as B } from "./Category-CevNQ03n.mjs";
35
- import { T as V } from "./Transaction-CyqrHmAA.mjs";
35
+ import { T as V } from "./Transaction-Dns0Kuuy.mjs";
36
36
  const ee = ({
37
37
  frequency: n,
38
38
  firstDay: t,
@@ -6,7 +6,7 @@ import b from "@mui/material/CardHeader";
6
6
  import { P as u, H3 as v } from "@mxenabled/mxui";
7
7
  import { ChevronRight as W } from "@mxenabled/mx-icons";
8
8
  import { u as M } from "./useDimensions-27p2evRx.mjs";
9
- import { W as w } from "./hooks-02T565vf.mjs";
9
+ import { W as w } from "./hooks-DkUqN6JE.mjs";
10
10
  const H = ({
11
11
  children: e,
12
12
  className: o,
@@ -7,7 +7,7 @@ import b from "@mui/material/IconButton";
7
7
  import { Icon as C, ChevronRight as v } from "@mxenabled/mx-icons";
8
8
  import { Text as W, H3 as H } from "@mxenabled/mxui";
9
9
  import { u as I } from "./useDimensions-27p2evRx.mjs";
10
- import { W as M } from "./hooks-02T565vf.mjs";
10
+ import { W as M } from "./hooks-DkUqN6JE.mjs";
11
11
  const j = ({
12
12
  className: t = "mx-cmn-mini-widget",
13
13
  closeLabel: a,
@@ -3,8 +3,8 @@ import { format as A } from "date-fns/format";
3
3
  import { fromUnixTime as W } from "date-fns/fromUnixTime";
4
4
  import { startOfMonth as _ } from "date-fns/startOfMonth";
5
5
  import { subMonths as B } from "date-fns/subMonths";
6
- import { a as b } from "./Accounts-CAr848d0.mjs";
7
- import { e as N, a as M, f as v } from "./ConnectDrawer-yFS82Il7.mjs";
6
+ import { a as b } from "./Accounts-CA-nqAjT.mjs";
7
+ import { e as N, a as M, f as v } from "./ConnectDrawer-phFH6OHt.mjs";
8
8
  const f = 13, L = (n, t) => n.filter((e) => {
9
9
  const { is_closed: r, is_deleted: s, is_hidden: a, is_manual: i } = e;
10
10
  return r || s || a ? !1 : i || !e.guid ? !0 : t.some((l) => n.some((g) => l.guid === g.member_guid));
@@ -7,7 +7,7 @@ import O from "@mui/material/ListItem";
7
7
  import N from "@mui/material/ListItemText";
8
8
  import V from "@mui/material/ListItemButton";
9
9
  import _ from "@mui/material/Stack";
10
- import { ChevronRight as S, ExpandMore as K, Star as Q } from "@mxenabled/mx-icons";
10
+ import { ChevronRight as k, ExpandMore as K, Star as Q } from "@mxenabled/mx-icons";
11
11
  import { Text as x, InstitutionLogo as Y, H3 as U } from "@mxenabled/mxui";
12
12
  import { endOfMonth as Z } from "date-fns/endOfMonth";
13
13
  import { startOfMonth as ee } from "date-fns/startOfMonth";
@@ -15,11 +15,11 @@ import { DateCalendar as te } from "@mui/x-date-pickers/DateCalendar";
15
15
  import { LocalizationProvider as ne } from "@mui/x-date-pickers/LocalizationProvider";
16
16
  import { AdapterDateFns as ie } from "@mui/x-date-pickers/AdapterDateFnsV3";
17
17
  import { A as oe, T as F, a as P, N as b } from "./Notification-ByMBpJ5u.mjs";
18
- import { u as D, r as T, o as w, c as se, e as ae, k as W, a as ce } from "./hooks-02T565vf.mjs";
18
+ import { u as D, r as T, o as w, c as se, e as ae, m as W, a as ce } from "./hooks-DkUqN6JE.mjs";
19
19
  import { b as le } from "./Localization-2MODESHW.mjs";
20
20
  import { b as re, f as de } from "./NumberFormatting-CtWHhyBX.mjs";
21
21
  import { a as M } from "./Dialog-CWW597AF.mjs";
22
- import { C as me } from "./CurrencyInput-CSZjO22Z.mjs";
22
+ import { C as me } from "./CurrencyInput-bEx2Mbd0.mjs";
23
23
  import { u as _e } from "./useScreenSize-B6JyS_Lj.mjs";
24
24
  import { D as J } from "./Drawer-kEE73B87.mjs";
25
25
  import he from "@mui/material/Collapse";
@@ -40,7 +40,7 @@ const ye = C(() => {
40
40
  return /* @__PURE__ */ c(f.Fragment, { children: [
41
41
  /* @__PURE__ */ c(R, { onClick: m, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
42
42
  /* @__PURE__ */ e(x, { variant: "Small", children: t.verify_email }),
43
- /* @__PURE__ */ e(S, {})
43
+ /* @__PURE__ */ e(k, {})
44
44
  ] }),
45
45
  /* @__PURE__ */ e(
46
46
  M,
@@ -122,7 +122,7 @@ const ye = C(() => {
122
122
  return /* @__PURE__ */ c(f.Fragment, { children: [
123
123
  /* @__PURE__ */ c(R, { onClick: u, sx: { height: "auto", p: 4, width: "fit-content" }, children: [
124
124
  /* @__PURE__ */ e(x, { variant: "Small", children: t.verify_phone }),
125
- /* @__PURE__ */ e(S, {})
125
+ /* @__PURE__ */ e(k, {})
126
126
  ] }),
127
127
  /* @__PURE__ */ e(
128
128
  M,
@@ -177,7 +177,7 @@ const ye = C(() => {
177
177
  ), p = t.account?.name || t.account?.feed_name || "", y = t.account?.day_payment_is_due ? le(
178
178
  i.notification_debt_payment_date,
179
179
  re(t.account?.day_payment_is_due)
180
- ) : i.notification_debt_payment_zero_state, k = a ? y : de(t.threshold ?? 0, "0,0"), A = async () => {
180
+ ) : i.notification_debt_payment_zero_state, S = a ? y : de(t.threshold ?? 0, "0,0"), A = async () => {
181
181
  a && t.account ? await r({ ...t.account, day_payment_is_due: u }) : n({ ...t, threshold: d });
182
182
  };
183
183
  return /* @__PURE__ */ c(_, { children: [
@@ -191,7 +191,7 @@ const ye = C(() => {
191
191
  institutionGuid: t.account?.institution_guid
192
192
  }
193
193
  ) : void 0,
194
- endIcon: /* @__PURE__ */ e(S, {}),
194
+ endIcon: /* @__PURE__ */ e(k, {}),
195
195
  isChecked: t.is_enabled,
196
196
  isPrimaryTextBold: !0,
197
197
  onClick: () => m(!0),
@@ -200,7 +200,7 @@ const ye = C(() => {
200
200
  is_enabled: !t.is_enabled
201
201
  }),
202
202
  primaryText: p,
203
- secondaryText: k
203
+ secondaryText: S
204
204
  }
205
205
  ),
206
206
  /* @__PURE__ */ e(
@@ -333,7 +333,7 @@ const ye = C(() => {
333
333
  n.filter((o) => o.children && o.children.length > 0).map((o) => /* @__PURE__ */ e(
334
334
  F,
335
335
  {
336
- endIcon: /* @__PURE__ */ e(S, {}),
336
+ endIcon: /* @__PURE__ */ e(k, {}),
337
337
  isChecked: o.is_enabled,
338
338
  isDisabled: !o.is_enabled,
339
339
  onClick: () => l(o.guid),
@@ -374,8 +374,8 @@ const ye = C(() => {
374
374
  }
375
375
  } = T(), { user: d } = w(), [h, u] = f.useState(!1), g = async () => {
376
376
  await p({ ...n, is_enabled: !n.is_enabled }), n.is_enabled && u(!1);
377
- }, p = async (k) => {
378
- await r(k);
377
+ }, p = async (S) => {
378
+ await r(S);
379
379
  }, y = s || i || l;
380
380
  return /* @__PURE__ */ c(B, { sx: { bgcolor: "background.paper" }, children: [
381
381
  /* @__PURE__ */ e(
@@ -514,8 +514,8 @@ const ye = C(() => {
514
514
  const { config: n } = W(), [t, { width: s }] = fe(), { common: l, settings: i } = D(), { updateUser: r } = T(), { user: a } = w(), [o, m] = f.useState(!1), [d, h] = f.useState({
515
515
  email: a.email,
516
516
  phone: a.phone
517
- }), u = d.email && !a.email_is_verified && !o, g = d.phone && !a.phone_is_verified && !o, p = (k) => {
518
- const { name: A, value: I } = k.target, j = { ...d, [A]: I };
517
+ }), u = d.email && !a.email_is_verified && !o, g = d.phone && !a.phone_is_verified && !o, p = (S) => {
518
+ const { name: A, value: I } = S.target, j = { ...d, [A]: I };
519
519
  h(j), m(JSON.stringify({ ...a, ...j }) !== JSON.stringify(a));
520
520
  }, y = async () => {
521
521
  await r({ ...a, ...d }), m(!1);
@@ -618,7 +618,7 @@ const ye = C(() => {
618
618
  return /* @__PURE__ */ e(z, {});
619
619
  if (s === "insights")
620
620
  return /* @__PURE__ */ e($, {});
621
- const k = l.display_email_edit_field_in_settings || l.display_sms_edit_field_in_settings, A = t && a.can_edit_contact_info && k;
621
+ const S = l.display_email_edit_field_in_settings || l.display_sms_edit_field_in_settings, A = t && a.can_edit_contact_info && S;
622
622
  return /* @__PURE__ */ c(_, { sx: { pt: y ? 0 : 24 }, children: [
623
623
  /* @__PURE__ */ c(_, { sx: { px: 24 }, children: [
624
624
  y && /* @__PURE__ */ c(E, { children: [
@@ -630,15 +630,15 @@ const ye = C(() => {
630
630
  /* @__PURE__ */ c(B, { children: [
631
631
  n.includes(b.Accounts) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => d(b.Accounts), children: [
632
632
  /* @__PURE__ */ e(N, { primary: i.accounts_title, secondary: i.accounts_subtitle }),
633
- /* @__PURE__ */ e(S, {})
633
+ /* @__PURE__ */ e(k, {})
634
634
  ] }) }),
635
635
  n.includes(b.Budgets) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => d(b.Budgets), children: [
636
636
  /* @__PURE__ */ e(N, { primary: i.budgets_title, secondary: i.budgets_subtitle }),
637
- /* @__PURE__ */ e(S, {})
637
+ /* @__PURE__ */ e(k, {})
638
638
  ] }) }),
639
639
  n.includes(b.Insights) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ c(V, { onClick: () => d(b.Insights), children: [
640
640
  /* @__PURE__ */ e(N, { primary: i.insights_title, secondary: i.insights_subtitle }),
641
- /* @__PURE__ */ e(S, {})
641
+ /* @__PURE__ */ e(k, {})
642
642
  ] }) })
643
643
  ] }),
644
644
  A && /* @__PURE__ */ e(_, { sx: { px: 24 }, children: /* @__PURE__ */ e(De, {}) }),
@@ -2,10 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import _ from "react";
3
3
  import { observer as p } from "mobx-react-lite";
4
4
  import v from "@mui/material/TextField";
5
- import { L as y } from "./ListItemAction-BzmbPuNp.mjs";
6
- import { u as h, j as b } from "./hooks-02T565vf.mjs";
5
+ import { L as y } from "./ListItemAction-DNZZ5fSa.mjs";
6
+ import { u as h, j as b } from "./hooks-DkUqN6JE.mjs";
7
7
  import { a as T, f as S } from "./NumberFormatting-CtWHhyBX.mjs";
8
- import { C as f } from "./CurrencyInput-CSZjO22Z.mjs";
8
+ import { C as f } from "./CurrencyInput-bEx2Mbd0.mjs";
9
9
  const F = p(({ goal: e }) => {
10
10
  const { goals: a } = h(), { setAlert: r, setSelectedGoal: l, updateGoal: m } = b(), [t, s] = _.useState(e.interest_rate ?? 0), c = !e.guid, i = t < 0, d = async () => {
11
11
  const n = { ...e, interest_rate: t };
@@ -7,10 +7,10 @@ import R from "@mui/material/Tabs";
7
7
  import l from "@mui/material/Divider";
8
8
  import T from "@mui/material/List";
9
9
  import C from "@mui/material/Stack";
10
- import { R as x, A as S, a as E, M as A } from "./ManageIncome-Dk2ZDGqw.mjs";
11
- import { u as h, h as y, e as _ } from "./hooks-02T565vf.mjs";
10
+ import { R as x, A as S, a as E, M as A } from "./ManageIncome-Bd14SWPF.mjs";
11
+ import { u as h, h as y, e as _ } from "./hooks-DkUqN6JE.mjs";
12
12
  import { R as v, F as N } from "./RepeatingTransaction-BW4J-jeJ.mjs";
13
- import { A as d } from "./WidgetContainer-D7sX3S6R.mjs";
13
+ import { A as d } from "./WidgetContainer-C2NBfpDg.mjs";
14
14
  const I = u(() => {
15
15
  const { recurring: r } = h(), { repeatingTransactions: s } = y(), { onEvent: o } = _(), a = (n) => {
16
16
  o(d.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
@@ -22,7 +22,7 @@ import { isWithinInterval as Q } from "date-fns/isWithinInterval";
22
22
  import nn from "@mui/material/styles/useTheme";
23
23
  import k from "@mui/material/ListItem";
24
24
  import an from "@mui/material/ListItemButton";
25
- import { e as tn } from "./hooks-02T565vf.mjs";
25
+ import { e as tn } from "./hooks-DkUqN6JE.mjs";
26
26
  const on = ({ copy: n, date: t, onNextClick: e, onPreviousClick: r }) => {
27
27
  const c = v(), l = en(c);
28
28
  return /* @__PURE__ */ h("div", { className: `mx-cmn-calendar-header ${l}`, children: [
@@ -9,15 +9,15 @@ import { MerchantLogo as pe, Icon as f, Text as S, useTokens as J, CategoryIcon
9
9
  import z from "@mui/material/ListItemAvatar";
10
10
  import $ from "@mui/material/ListItemText";
11
11
  import C from "@mui/material/Stack";
12
- import { T as Le, L as Re, O as g, C as ke, b as Pe } from "./Transaction-CyqrHmAA.mjs";
13
- import { G as Ge, f as v, u as I, e as w, l as be, a as Me } from "./hooks-02T565vf.mjs";
12
+ import { T as Le, L as Re, O as g, C as ke, b as Pe } from "./Transaction-Dns0Kuuy.mjs";
13
+ import { G as Ge, f as v, u as I, e as w, k as be, a as Me } from "./hooks-DkUqN6JE.mjs";
14
14
  import { f as Q } from "./NumberFormatting-CtWHhyBX.mjs";
15
15
  import { Receipt as Ke, Delete as re, ChevronRight as $e, Cancel as oe, Search as Fe, Edit as ze, Flag as Be } from "@mxenabled/mx-icons";
16
16
  import { fromUnixTime as Y } from "date-fns/fromUnixTime";
17
17
  import { isSameDay as Ae } from "date-fns/isSameDay";
18
18
  import { h as He } from "./DateUtil-BcuH7ErC.mjs";
19
19
  import { L as Ne } from "./Loader-Dp1P2gNw.mjs";
20
- import { A as P } from "./WidgetContainer-D7sX3S6R.mjs";
20
+ import { A as P } from "./WidgetContainer-C2NBfpDg.mjs";
21
21
  import ee from "@mui/material/Paper";
22
22
  import le from "@mui/material/Button";
23
23
  import Ue from "@mui/material/FormGroup";
@@ -29,7 +29,7 @@ import V from "@mui/material/Avatar";
29
29
  import B from "@mui/material/ListItem";
30
30
  import H from "@mui/material/ListItemButton";
31
31
  import U from "@mui/material/ListItemIcon";
32
- import { a as De } from "./CategorySelectorDrawer-Dyzb3UDU.mjs";
32
+ import { a as De } from "./CategorySelectorDrawer-BPvjZ-Xo.mjs";
33
33
  import { a as X, f as Ve, D as We } from "./Dialog-CWW597AF.mjs";
34
34
  import { b as ie } from "./Localization-2MODESHW.mjs";
35
35
  import { getUnixTime as Ye } from "date-fns/getUnixTime";
@@ -37,7 +37,7 @@ import { D as ce } from "./Drawer-kEE73B87.mjs";
37
37
  import he from "@mui/material/InputAdornment";
38
38
  import je from "@mui/material/Checkbox";
39
39
  import me from "@mui/material/Grid";
40
- import { C as qe } from "./CurrencyInput-CSZjO22Z.mjs";
40
+ import { C as qe } from "./CurrencyInput-bEx2Mbd0.mjs";
41
41
  import Ze from "@mui/material/Switch";
42
42
  var q = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(q || {}), te = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(te || {});
43
43
  const Je = [