@mx-cartographer/experiences 7.0.8-alpha.al1 → 7.0.8-alpha.ram1

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 (34) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AccountDetailsContent-OzI5Hs8T.mjs → AccountDetailsContent-CgBfJL2o.mjs} +3 -3
  3. package/dist/{AccountDetailsHeader-DnEyQMpX.mjs → AccountDetailsHeader-BCuCcRKN.mjs} +1 -1
  4. package/dist/{CategorySelectorDrawer-Dyzb3UDU.mjs → CategorySelectorDrawer-B2Ama3PC.mjs} +1 -1
  5. package/dist/{Help-BazrEpv7.mjs → Help-BC-NhEUH.mjs} +1 -1
  6. package/dist/Loader-DvzdIyKh.mjs +24 -0
  7. package/dist/{ManageIncome-CzTV55Bh.mjs → ManageIncome-JwQuuj2s.mjs} +2 -2
  8. package/dist/{NotificationSettings-BznqGVQ2.mjs → NotificationSettings-DeWu4OZX.mjs} +1 -1
  9. package/dist/{RecurringSettings-BQDQvmSY.mjs → RecurringSettings-BCc_FKvR.mjs} +2 -2
  10. package/dist/{TransactionDetails-BSfXqkpH.mjs → TransactionDetails-OvVzcuFq.mjs} +3 -3
  11. package/dist/{ViewMoreMicroCard-BZI5VMNW.mjs → ViewMoreMicroCard-z_S5b60J.mjs} +1 -1
  12. package/dist/{WidgetContainer-BG-fdDOf.mjs → WidgetContainer-DddBEZY1.mjs} +1 -1
  13. package/dist/accounts/index.es.js +5 -5
  14. package/dist/analytics/index.es.js +1 -1
  15. package/dist/budgets/index.es.js +5 -5
  16. package/dist/cashflow/index.es.js +226 -228
  17. package/dist/categories/index.es.js +1 -1
  18. package/dist/common/index.es.js +2 -2
  19. package/dist/debts/index.es.js +3 -3
  20. package/dist/finstrong/index.es.js +3 -3
  21. package/dist/goals/index.es.js +4 -4
  22. package/dist/help/index.es.js +3 -3
  23. package/dist/investments/index.es.js +2 -2
  24. package/dist/merchants/index.es.js +1 -1
  25. package/dist/microinsights/index.es.js +1 -1
  26. package/dist/networth/index.es.js +2 -2
  27. package/dist/notifications/index.es.js +2 -2
  28. package/dist/recurringtransactions/index.es.js +6 -6
  29. package/dist/settings/index.es.js +6 -6
  30. package/dist/spending/index.es.js +3 -3
  31. package/dist/transactions/index.es.js +5 -5
  32. package/dist/trends/index.es.js +4 -4
  33. package/package.json +1 -1
  34. package/dist/Loader-Dp1P2gNw.mjs +0 -14
@@ -1,23 +1,23 @@
1
1
  import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
2
2
  import m, { useState as J } from "react";
3
- import { observer as R } from "mobx-react-lite";
3
+ import { observer as T } from "mobx-react-lite";
4
4
  import { addMonths as qe } from "date-fns/addMonths";
5
5
  import { startOfToday as M } from "date-fns/startOfToday";
6
- import D from "@mui/material/Box";
6
+ import I from "@mui/material/Box";
7
7
  import H from "@mui/material/Button";
8
- import v from "@mui/material/Divider";
8
+ import D from "@mui/material/Divider";
9
9
  import r from "@mui/material/Stack";
10
10
  import ae from "@mui/material/styles/useTheme";
11
11
  import { Text as h, P as k, Icon as F, InstitutionLogo as xe, H1 as le, H2 as Xe } from "@mxenabled/mxui";
12
- import { G as Ye, t as de, u as L, p as re, c as Le, a as Y, o as me, h as q, e as Oe, f as ke } from "../hooks-02T565vf.mjs";
13
- import { C as N } from "../CurrencyText-YUhH2caW.mjs";
12
+ import { G as Ye, t as de, u as O, p as re, c as Oe, a as Y, o as me, h as q, e as Ne, f as ke } from "../hooks-02T565vf.mjs";
13
+ import { C as L } from "../CurrencyText-YUhH2caW.mjs";
14
14
  import { u as ue } from "../useScreenSize-B6JyS_Lj.mjs";
15
- import { L as se } from "../Loader-Dp1P2gNw.mjs";
15
+ import { L as se } from "../Loader-DvzdIyKh.mjs";
16
16
  import { I as he } from "../CashflowStore-D9Dpuz7X.mjs";
17
17
  import { C as Wn } from "../CashflowStore-D9Dpuz7X.mjs";
18
18
  import { b as X } from "../Localization-2MODESHW.mjs";
19
19
  import { M as Qe } from "../MiniWidgetContainer-DqKQNubH.mjs";
20
- import { R as Ve } from "../RecurringSettings-BQDQvmSY.mjs";
20
+ import { R as Ve } from "../RecurringSettings-BCc_FKvR.mjs";
21
21
  import Ke from "@mui/material/Tabs";
22
22
  import Ce from "@mui/material/Tab";
23
23
  import { getUnixTime as U } from "date-fns/getUnixTime";
@@ -34,27 +34,27 @@ import { addDays as _e } from "date-fns/addDays";
34
34
  import { alpha as et, keyframes as tt } from "@mui/material/styles";
35
35
  import { DataGridPro as nt } from "@mui/x-data-grid-pro";
36
36
  import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
37
- import { M as ot, S as it, i as at, d as Se, c as rt } from "../ManageIncome-CzTV55Bh.mjs";
37
+ import { M as ot, S as it, i as at, d as Se, c as rt } from "../ManageIncome-JwQuuj2s.mjs";
38
38
  import { D as $e } from "../Drawer-kEE73B87.mjs";
39
39
  import { formatISO as st } from "date-fns/formatISO";
40
40
  import { fromUnixTime as ye } from "date-fns/fromUnixTime";
41
41
  import { startOfMonth as ct } from "date-fns/startOfMonth";
42
42
  import { subDays as Me } from "date-fns/subDays";
43
- import { S as lt, b as dt } from "../TransactionDetails-BSfXqkpH.mjs";
43
+ import { S as lt, b as dt } from "../TransactionDetails-OvVzcuFq.mjs";
44
44
  import { F as mt, R as Ie, e as De } from "../RepeatingTransaction-BW4J-jeJ.mjs";
45
45
  import { h as ut } from "../DateUtil-BcuH7ErC.mjs";
46
46
  import { endOfToday as ht } from "date-fns/endOfToday";
47
- import { W as ve, A as Ae } from "../WidgetContainer-BG-fdDOf.mjs";
47
+ import { W as ve, A as Ae } from "../WidgetContainer-DddBEZY1.mjs";
48
48
  import { F as pt, A as B } from "../Fetch-CkFKy79O.mjs";
49
49
  const K = () => {
50
50
  if (!m.useContext(Ye))
51
51
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
52
52
  return de().uiStore;
53
53
  }, ft = ({ remaining: i }) => {
54
- const { cashflow: n } = L();
54
+ const { cashflow: n } = O();
55
55
  return /* @__PURE__ */ o(P, { children: [
56
56
  /* @__PURE__ */ e(
57
- D,
57
+ I,
58
58
  {
59
59
  sx: {
60
60
  borderRadius: "1px",
@@ -65,39 +65,37 @@ const K = () => {
65
65
  }
66
66
  ),
67
67
  /* @__PURE__ */ e(h, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
68
- /* @__PURE__ */ e(N, { amount: i, bold: !0, sx: { fontSize: 12 } })
68
+ /* @__PURE__ */ e(L, { amount: i, bold: !0, sx: { fontSize: 12 } })
69
69
  ] });
70
- }, pe = R(ft), gt = ({ onAddIncomeClick: i }) => {
71
- const n = ae(), { availableWidth: t } = re(), { isMobile: s } = ue(), { visibleCashAccounts: c, visibleCashBalance: g } = Le(), { selectedAccounts: u, selectedAccountGuids: f, setSelectedAccounts: _ } = Y(), { cashflow: a } = L(), { userProfile: b } = me(), {
70
+ }, pe = T(ft), gt = ({ onAddIncomeClick: i }) => {
71
+ const n = ae(), { availableWidth: t } = re(), { isMobile: s } = ue(), { visibleCashAccounts: c, visibleCashBalance: f } = Oe(), { selectedAccounts: d, selectedAccountGuids: b, setSelectedAccounts: C } = Y(), { cashflow: a } = O(), { userProfile: g } = me(), {
72
72
  daysUntilNextIncome: l,
73
- expensesTilNextIncome: d,
74
- selectedCashAccounts: x,
73
+ expensesTilNextIncome: u,
74
+ selectedCashAccounts: _,
75
75
  setNextIncome: w,
76
- setSelectedCashAccounts: A,
76
+ setSelectedCashAccounts: v,
77
77
  setUpcomingExpenses: p
78
- } = K(), { isDataLoaded: O, nextIncomeRecurrence: S, upcomingExpenses: G } = q();
78
+ } = K(), { isDataLoaded: N, nextIncomeRecurrence: S, upcomingExpenses: j } = q();
79
79
  m.useEffect(() => {
80
- _(c);
80
+ C(c);
81
81
  }, [c]), m.useEffect(() => {
82
- c && c.forEach((y) => console.log("cash account: ", y.guid)), f && f.forEach((y) => console.log("selectedAccount: ", y)), A(
83
- c.filter((y) => f.includes(y.guid))
82
+ v(
83
+ c.filter((R) => b.includes(R.guid))
84
84
  );
85
- }, [c, u]), m.useEffect(() => {
86
- console.log("upcoming exp: ", G), console.log("next income recurr: ", S), S && w(S), p(G);
87
- }, [S, G]), m.useEffect(() => {
88
- console.log("expensesTilNextIncome:", d), console.log("selectedCashAccounts:", x), console.log("daysUntilNextIncome:", l);
89
- }, [d, x, l]);
90
- const j = m.useMemo(
91
- () => c.filter((y) => f.includes(y.guid)).reduce((y, I) => y + (I?.balance || 0), 0),
92
- [f, G]
85
+ }, [c, d]), m.useEffect(() => {
86
+ S && w(S), p(j);
87
+ }, [S, j]);
88
+ const G = m.useMemo(
89
+ () => c.filter((R) => b.includes(R.guid)).reduce((R, y) => R + (y?.balance || 0), 0),
90
+ [b, j]
93
91
  ), W = m.useMemo(
94
- () => d.filter((y) => f.includes(y.accountGuid || "")).reduce((y, I) => y + I.amount, 0),
95
- [f, d]
92
+ () => u.filter((R) => b.includes(R.accountGuid || "")).reduce((R, y) => R + y.amount, 0),
93
+ [b, u]
96
94
  ), z = m.useMemo(
97
- () => j - W,
98
- [j, W]
99
- ), E = b?.has_completed_cash_flow_onboarding && !!i;
100
- return O ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 610 ? /* @__PURE__ */ o(
95
+ () => G - W,
96
+ [G, W]
97
+ ), A = g?.has_completed_cash_flow_onboarding && !!i;
98
+ return N ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 610 ? /* @__PURE__ */ o(
101
99
  r,
102
100
  {
103
101
  border: `1px solid ${n.palette.border.light}`,
@@ -107,26 +105,26 @@ const K = () => {
107
105
  px: 24,
108
106
  children: [
109
107
  /* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
110
- /* @__PURE__ */ e(N, { amount: j, variant: "H2" }),
108
+ /* @__PURE__ */ e(L, { amount: G, variant: "H2" }),
111
109
  /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(
112
110
  a.total_cash_accounts,
113
- x.length
111
+ _.length
114
112
  ) })
115
113
  ] }),
116
114
  /* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "remove" }) }),
117
115
  /* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
118
- /* @__PURE__ */ e(N, { amount: W, variant: "H2" }),
119
- /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(a.expenses_due, d.length) })
116
+ /* @__PURE__ */ e(L, { amount: W, variant: "H2" }),
117
+ /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(a.expenses_due, u.length) })
120
118
  ] }),
121
119
  /* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "equal" }) }),
122
120
  /* @__PURE__ */ o(r, { pb: 14, pr: 24, pt: 12, children: [
123
- /* @__PURE__ */ e(N, { amount: z, variant: "H2" }),
121
+ /* @__PURE__ */ e(L, { amount: z, variant: "H2" }),
124
122
  /* @__PURE__ */ o(r, { alignItems: "center", direction: "row", gap: 8, children: [
125
123
  /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: a.available_to_spend }),
126
124
  /* @__PURE__ */ e(he, { body: a.tooltip_body, title: a.tooltip_title })
127
125
  ] })
128
126
  ] }),
129
- /* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: E ? /* @__PURE__ */ o(P, { children: [
127
+ /* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: A ? /* @__PURE__ */ o(P, { children: [
130
128
  /* @__PURE__ */ e(h, { variant: "H2", children: X(a.days, l) }),
131
129
  /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: a.next_paycheck })
132
130
  ] }) : /* @__PURE__ */ e(
@@ -144,16 +142,16 @@ const K = () => {
144
142
  /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
145
143
  /* @__PURE__ */ e(h, { variant: "Small", children: X(
146
144
  a.total_cash_accounts,
147
- x.length
145
+ _.length
148
146
  ) }),
149
- /* @__PURE__ */ e(N, { amount: g, bold: !0, variant: "XSmall" })
147
+ /* @__PURE__ */ e(L, { amount: f, bold: !0, variant: "XSmall" })
150
148
  ] }),
151
- /* @__PURE__ */ e(v, {}),
149
+ /* @__PURE__ */ e(D, {}),
152
150
  /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
153
- /* @__PURE__ */ e(h, { variant: "Small", children: X(a.expenses_due, d.length) }),
154
- /* @__PURE__ */ e(N, { amount: W, bold: !0, symbol: "-", variant: "XSmall" })
151
+ /* @__PURE__ */ e(h, { variant: "Small", children: X(a.expenses_due, u.length) }),
152
+ /* @__PURE__ */ e(L, { amount: W, bold: !0, symbol: "-", variant: "XSmall" })
155
153
  ] }),
156
- /* @__PURE__ */ e(v, {}),
154
+ /* @__PURE__ */ e(D, {}),
157
155
  /* @__PURE__ */ e(
158
156
  r,
159
157
  {
@@ -168,8 +166,8 @@ const K = () => {
168
166
  children: /* @__PURE__ */ e(pe, { remaining: z })
169
167
  }
170
168
  ),
171
- /* @__PURE__ */ e(v, {}),
172
- E ? /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
169
+ /* @__PURE__ */ e(D, {}),
170
+ A ? /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
173
171
  /* @__PURE__ */ e(h, { variant: "Small", children: a.next_paycheck }),
174
172
  /* @__PURE__ */ e(h, { bold: !0, variant: "XSmall", children: X(a.days, l) })
175
173
  ] }) : /* @__PURE__ */ o(
@@ -196,10 +194,10 @@ const K = () => {
196
194
  }
197
195
  )
198
196
  ] }) }) : /* @__PURE__ */ e(se, { height: s ? 210 : 120 });
199
- }, bt = R(gt), xt = ({ onPrimaryCtaClick: i, sx: n = {} }) => {
200
- const { cashflow: t } = L(), { isCopyLoaded: s, isInitialized: c } = Y(), { loadRepeatingTransactions: g, setDateRange: u } = q();
197
+ }, bt = T(gt), xt = ({ onPrimaryCtaClick: i, sx: n = {} }) => {
198
+ const { cashflow: t } = O(), { isCopyLoaded: s, isInitialized: c } = Y(), { loadRepeatingTransactions: f, setDateRange: d } = q();
201
199
  return m.useEffect(() => {
202
- c && (u({ start: M(), end: qe(M(), 1) }), g().finally());
200
+ c && (d({ start: M(), end: qe(M(), 1) }), f().finally());
203
201
  }, [c]), s ? /* @__PURE__ */ e(
204
202
  Qe,
205
203
  {
@@ -212,7 +210,7 @@ const K = () => {
212
210
  children: /* @__PURE__ */ e(bt, { onAddIncomeClick: i })
213
211
  }
214
212
  ) : /* @__PURE__ */ e(se, {});
215
- }, Ln = R(xt), Ct = ({ remaining: i }) => /* @__PURE__ */ e(
213
+ }, On = T(xt), Ct = ({ remaining: i }) => /* @__PURE__ */ e(
216
214
  te,
217
215
  {
218
216
  sx: {
@@ -237,7 +235,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
237
235
  ] }),
238
236
  /* @__PURE__ */ e(h, { sx: { flexGrow: 1, fontSize: 13 }, children: i.name }),
239
237
  /* @__PURE__ */ e(
240
- N,
238
+ L,
241
239
  {
242
240
  amount: i.amount,
243
241
  bold: !0,
@@ -245,9 +243,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
245
243
  }
246
244
  )
247
245
  ] }),
248
- /* @__PURE__ */ e(v, {})
249
- ] }), Ee = R(_t), wt = ({ total: i, type: n }) => {
250
- const { cashflow: t } = L();
246
+ /* @__PURE__ */ e(D, {})
247
+ ] }), Ee = T(_t), wt = ({ total: i, type: n }) => {
248
+ const { cashflow: t } = O();
251
249
  return /* @__PURE__ */ o(P, { children: [
252
250
  /* @__PURE__ */ o(
253
251
  Ze,
@@ -270,10 +268,10 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
270
268
  ]
271
269
  }
272
270
  ),
273
- /* @__PURE__ */ e(v, {})
271
+ /* @__PURE__ */ e(D, {})
274
272
  ] });
275
- }, Te = R(wt), ie = (i, n) => (t) => t.accountGuid === i.guid && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), St = () => {
276
- const { availableWidth: i } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: s } = q(), { dateRange: c, selectedCashAccounts: g } = K();
273
+ }, Te = T(wt), ie = (i, n) => (t) => t.accountGuid === i.guid && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), St = () => {
274
+ const { availableWidth: i } = re(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = q(), { dateRange: c, selectedCashAccounts: f } = K();
277
275
  return /* @__PURE__ */ o(r, { children: [
278
276
  /* @__PURE__ */ o(r, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
279
277
  /* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
@@ -284,14 +282,14 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
284
282
  Q(c.end, V.FULL_MONTH_DAY)
285
283
  ] })
286
284
  ] }),
287
- /* @__PURE__ */ e(r, { children: g.map((u) => {
288
- const f = s.filter(ie(u, c)).sort((l, d) => U(l.expectedDate) - U(d.expectedDate)), _ = t.filter(
289
- ie(u, c)
290
- ), a = f.reduce(
291
- (l, d) => l + d.amount,
285
+ /* @__PURE__ */ e(r, { children: f.map((d) => {
286
+ const b = s.filter(ie(d, c)).sort((l, u) => U(l.expectedDate) - U(u.expectedDate)), C = t.filter(
287
+ ie(d, c)
288
+ ), a = b.reduce(
289
+ (l, u) => l + u.amount,
292
290
  0
293
- ), b = _.reduce(
294
- (l, d) => l + d.amount,
291
+ ), g = C.reduce(
292
+ (l, u) => l + u.amount,
295
293
  0
296
294
  );
297
295
  return /* @__PURE__ */ o(
@@ -307,7 +305,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
307
305
  /* @__PURE__ */ e(
308
306
  Je,
309
307
  {
310
- account: u,
308
+ account: d,
311
309
  listItemProps: {
312
310
  disableGutters: !1,
313
311
  disablePadding: !1,
@@ -315,43 +313,43 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
315
313
  }
316
314
  }
317
315
  ),
318
- /* @__PURE__ */ e(v, {}),
319
- f.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
316
+ /* @__PURE__ */ e(D, {}),
317
+ b.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
320
318
  ee,
321
319
  {
322
320
  subheader: /* @__PURE__ */ e(Te, { total: a, type: ne.INCOME }),
323
321
  sx: { width: "100%" },
324
- children: f.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
322
+ children: b.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
325
323
  }
326
324
  ) }),
327
- _.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
325
+ C.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
328
326
  ee,
329
327
  {
330
- subheader: /* @__PURE__ */ e(Te, { total: b, type: ne.EXPENSE }),
328
+ subheader: /* @__PURE__ */ e(Te, { total: g, type: ne.EXPENSE }),
331
329
  sx: { width: "100%" },
332
- children: _.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
330
+ children: C.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
333
331
  }
334
332
  ) }),
335
333
  /* @__PURE__ */ e(
336
334
  Ct,
337
335
  {
338
- remaining: (u.available_balance || u.balance || 0) + a - b
336
+ remaining: (d.available_balance || d.balance || 0) + a - g
339
337
  }
340
338
  )
341
339
  ]
342
340
  },
343
- u.guid
341
+ d.guid
344
342
  );
345
343
  }) })
346
344
  ] });
347
- }, yt = R(St), It = () => {
348
- const { availableWidth: i } = re(), n = ae(), { cashflow: t } = L(), { upcomingExpenses: s, upcomingIncome: c } = q(), { dateRange: g, selectedCashAccounts: u } = K(), f = [
345
+ }, yt = T(St), It = () => {
346
+ const { availableWidth: i } = re(), n = ae(), { cashflow: t } = O(), { upcomingExpenses: s, upcomingIncome: c } = q(), { dateRange: f, selectedCashAccounts: d } = K(), b = [
349
347
  {
350
348
  field: "account",
351
349
  flex: 1.5,
352
350
  headerName: t.accounts,
353
- renderCell: ({ value: { name: a, nickname: b, institution_guid: l, account_number: d } }) => {
354
- const x = b || a;
351
+ renderCell: ({ value: { name: a, nickname: g, institution_guid: l, account_number: u } }) => {
352
+ const _ = g || a;
355
353
  return /* @__PURE__ */ o(r, { alignItems: "center", flexDirection: "row", gap: 12, children: [
356
354
  /* @__PURE__ */ e(
357
355
  xe,
@@ -361,7 +359,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
361
359
  size: 16
362
360
  }
363
361
  ),
364
- `${x} ${d ? `*${d}` : ""}`
362
+ `${_} ${u ? `*${u}` : ""}`
365
363
  ] });
366
364
  }
367
365
  },
@@ -392,34 +390,34 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
392
390
  headerName: t.remaining,
393
391
  type: "number",
394
392
  renderCell: (a) => {
395
- const b = a.row.balance + a.row.income - a.row.expenses;
393
+ const g = a.row.balance + a.row.income - a.row.expenses;
396
394
  return /* @__PURE__ */ e(
397
395
  h,
398
396
  {
399
- color: Math.sign(b) === -1 ? n.palette.error.main : n.palette.text.primary,
397
+ color: Math.sign(g) === -1 ? n.palette.error.main : n.palette.text.primary,
400
398
  variant: "Small",
401
- children: Z(b, "0,0.00")
399
+ children: Z(g, "0,0.00")
402
400
  }
403
401
  );
404
402
  }
405
403
  }
406
- ], _ = m.useMemo(() => u.map((a) => {
407
- const b = s.filter(
404
+ ], C = m.useMemo(() => d.map((a) => {
405
+ const g = s.filter(
408
406
  ie(a, { start: M(), end: _e(M(), 30) })
409
- ).reduce((x, w) => x + w.amount, 0), l = c.filter(
407
+ ).reduce((_, w) => _ + w.amount, 0), l = c.filter(
410
408
  ie(a, { start: M(), end: _e(M(), 30) })
411
- ).reduce((x, w) => x + w.amount, 0), d = (a.balance || 0) + l - b;
409
+ ).reduce((_, w) => _ + w.amount, 0), u = (a.balance || 0) + l - g;
412
410
  return {
413
411
  account: a,
414
412
  balance: a.balance || 0,
415
413
  id: a.guid,
416
414
  income: l,
417
- expenses: b,
418
- remaining: d
415
+ expenses: g,
416
+ remaining: u
419
417
  };
420
- }), [u, s, c]);
418
+ }), [d, s, c]);
421
419
  return /* @__PURE__ */ o(
422
- D,
420
+ I,
423
421
  {
424
422
  sx: {
425
423
  width: "100%"
@@ -453,10 +451,10 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
453
451
  )
454
452
  ] }),
455
453
  /* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
456
- Q(g.start, V.FULL_MONTH_DAY),
454
+ Q(f.start, V.FULL_MONTH_DAY),
457
455
  " -",
458
456
  " ",
459
- Q(g.end, V.FULL_MONTH_DAY)
457
+ Q(f.end, V.FULL_MONTH_DAY)
460
458
  ] })
461
459
  ]
462
460
  }
@@ -465,13 +463,13 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
465
463
  nt,
466
464
  {
467
465
  columnHeaderHeight: 48,
468
- columns: f,
466
+ columns: b,
469
467
  density: "standard",
470
468
  disableColumnMenu: !0,
471
469
  disableRowSelectionOnClick: !0,
472
470
  hideFooter: !0,
473
471
  rowHeight: 48,
474
- rows: _,
472
+ rows: C,
475
473
  sx: {
476
474
  border: "1px solid",
477
475
  borderColor: "border.light",
@@ -487,8 +485,8 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
487
485
  }
488
486
  }
489
487
  }
490
- ) : _.map((a) => {
491
- const { name: b, nickname: l, institution_guid: d, account_number: x } = a.account, w = l || b;
488
+ ) : C.map((a) => {
489
+ const { name: g, nickname: l, institution_guid: u, account_number: _ } = a.account, w = l || g;
492
490
  return /* @__PURE__ */ e(
493
491
  ee,
494
492
  {
@@ -513,17 +511,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
513
511
  xe,
514
512
  {
515
513
  alt: t.institution_logo,
516
- institutionGuid: d || "",
514
+ institutionGuid: u || "",
517
515
  size: 16
518
516
  }
519
517
  ),
520
- /* @__PURE__ */ e(h, { variant: "Small", children: `${w} ${x ? `*${x}` : ""}` })
518
+ /* @__PURE__ */ e(h, { variant: "Small", children: `${w} ${_ ? `*${_}` : ""}` })
521
519
  ] }),
522
- /* @__PURE__ */ e(N, { amount: a.balance, bold: !0, variant: "Small" })
520
+ /* @__PURE__ */ e(L, { amount: a.balance, bold: !0, variant: "Small" })
523
521
  ]
524
522
  }
525
523
  ),
526
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
524
+ /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
527
525
  /* @__PURE__ */ o(
528
526
  r,
529
527
  {
@@ -534,11 +532,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
534
532
  py: 12,
535
533
  children: [
536
534
  /* @__PURE__ */ e(h, { variant: "Small", children: t.projected_income }),
537
- /* @__PURE__ */ e(N, { amount: a.income, bold: !0, symbol: "+", variant: "Small" })
535
+ /* @__PURE__ */ e(L, { amount: a.income, bold: !0, symbol: "+", variant: "Small" })
538
536
  ]
539
537
  }
540
538
  ),
541
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
539
+ /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
542
540
  /* @__PURE__ */ o(
543
541
  r,
544
542
  {
@@ -549,11 +547,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
549
547
  py: 12,
550
548
  children: [
551
549
  /* @__PURE__ */ e(h, { variant: "Small", children: t.projected_expenses }),
552
- /* @__PURE__ */ e(N, { amount: a.expenses, bold: !0, symbol: "-", variant: "Small" })
550
+ /* @__PURE__ */ e(L, { amount: a.expenses, bold: !0, symbol: "-", variant: "Small" })
553
551
  ]
554
552
  }
555
553
  ),
556
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
554
+ /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
557
555
  /* @__PURE__ */ e(
558
556
  r,
559
557
  {
@@ -576,19 +574,19 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
576
574
  ]
577
575
  }
578
576
  );
579
- }, Dt = R(It), vt = () => {
580
- const { cashflow: i } = L(), { isDesktop: n } = ue(), { onEvent: t } = Oe(), [s, c] = m.useState(0), g = (u, f) => {
581
- c(f);
577
+ }, Dt = T(It), vt = () => {
578
+ const { cashflow: i } = O(), { isDesktop: n } = ue(), { onEvent: t } = Ne(), [s, c] = m.useState(0), f = (d, b) => {
579
+ c(b);
582
580
  };
583
581
  return m.useEffect(() => {
584
582
  t(s === 0 ? "cash_flow_summary" : "cash_flow_details");
585
- }, [s]), /* @__PURE__ */ o(D, { children: [
583
+ }, [s]), /* @__PURE__ */ o(I, { children: [
586
584
  /* @__PURE__ */ o(
587
585
  Ke,
588
586
  {
589
587
  "aria-label": i.cashflow_summary_and_details,
590
588
  centered: !0,
591
- onChange: g,
589
+ onChange: f,
592
590
  textColor: "primary",
593
591
  value: s,
594
592
  variant: "fullWidth",
@@ -618,17 +616,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
618
616
  ]
619
617
  }
620
618
  ),
621
- /* @__PURE__ */ e(D, { sx: { mb: 32 } }),
622
- /* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Dt, {}) }) }),
623
- /* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: s, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(yt, {}) }) })
619
+ /* @__PURE__ */ e(I, { sx: { mb: 32 } }),
620
+ /* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Dt, {}) }) }),
621
+ /* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: s, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(yt, {}) }) })
624
622
  ] });
625
- }, At = R(vt), oe = ({
623
+ }, At = T(vt), oe = ({
626
624
  amount: i,
627
625
  isMobile: n = !1,
628
626
  isTotal: t = !1,
629
627
  label: s,
630
628
  symbol: c,
631
- tooltip: g
629
+ tooltip: f
632
630
  }) => /* @__PURE__ */ o(
633
631
  r,
634
632
  {
@@ -638,25 +636,25 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
638
636
  padding: n ? "14px 16px" : 0,
639
637
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
640
638
  children: [
641
- !n && /* @__PURE__ */ e(N, { amount: i, component: "h2", variant: "H2" }),
639
+ !n && /* @__PURE__ */ e(L, { amount: i, component: "h2", variant: "H2" }),
642
640
  /* @__PURE__ */ o(r, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
643
641
  /* @__PURE__ */ e(h, { bold: t, variant: "Small", children: s }),
644
- g
642
+ f
645
643
  ] }),
646
- n && /* @__PURE__ */ e(N, { amount: i, component: "h2", symbol: c, variant: "Small" })
644
+ n && /* @__PURE__ */ e(L, { amount: i, component: "h2", symbol: c, variant: "Small" })
647
645
  ]
648
646
  }
649
647
  ), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), Et = () => {
650
- const { availableWidth: i } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: s } = q(), { selectedAccountGuids: c } = Y(), { dateRange: g, selectedCashAccounts: u } = K(), { userProfile: f } = me(), [_, a] = m.useState(!1), b = m.useMemo(
651
- () => t.filter(Re(c, g)),
652
- [g, c, t]
648
+ const { availableWidth: i } = re(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = q(), { selectedAccountGuids: c } = Y(), { dateRange: f, selectedCashAccounts: d } = K(), { userProfile: b } = me(), [C, a] = m.useState(!1), g = m.useMemo(
649
+ () => t.filter(Re(c, f)),
650
+ [f, c, t]
653
651
  ), l = m.useMemo(
654
- () => s.filter(Re(c, g)),
655
- [g, c, s]
656
- ), d = m.useMemo(
657
- () => u.reduce((O, S) => O + (S?.balance || 0), 0),
658
- [u]
659
- ), x = b.reduce((O, S) => O + S.amount, 0), w = l.reduce((O, S) => O + S.amount, 0), A = d - x + w, p = i < 725;
652
+ () => s.filter(Re(c, f)),
653
+ [f, c, s]
654
+ ), u = m.useMemo(
655
+ () => d.reduce((N, S) => N + (S?.balance || 0), 0),
656
+ [d]
657
+ ), _ = g.reduce((N, S) => N + S.amount, 0), w = l.reduce((N, S) => N + S.amount, 0), v = u - _ + w, p = i < 725;
660
658
  return /* @__PURE__ */ o(r, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
661
659
  /* @__PURE__ */ o(
662
660
  r,
@@ -671,13 +669,13 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
671
669
  /* @__PURE__ */ e(
672
670
  oe,
673
671
  {
674
- amount: d,
672
+ amount: u,
675
673
  isMobile: p,
676
674
  label: n.cash_and_bank
677
675
  }
678
676
  ),
679
- p && /* @__PURE__ */ e(v, {}),
680
- f?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(P, { children: [
677
+ p && /* @__PURE__ */ e(D, {}),
678
+ b?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(P, { children: [
681
679
  !p && /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
682
680
  /* @__PURE__ */ e(
683
681
  oe,
@@ -697,21 +695,21 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
697
695
  children: n.add_income
698
696
  }
699
697
  ),
700
- p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
698
+ p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
701
699
  /* @__PURE__ */ e(
702
700
  oe,
703
701
  {
704
- amount: x,
702
+ amount: _,
705
703
  isMobile: p,
706
704
  label: n.to_be_paid_out,
707
705
  symbol: p ? "-" : void 0
708
706
  }
709
707
  ),
710
- p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
708
+ p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
711
709
  /* @__PURE__ */ e(
712
710
  oe,
713
711
  {
714
- amount: A,
712
+ amount: v,
715
713
  isMobile: p,
716
714
  isTotal: p,
717
715
  label: n.remaining_cash,
@@ -731,7 +729,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
731
729
  $e,
732
730
  {
733
731
  ariaLabelClose: n.close_manage_income_aria,
734
- isOpen: _,
732
+ isOpen: C,
735
733
  onClose: () => a(!1),
736
734
  shouldShowHeaderBorders: !1,
737
735
  title: n.manage_income,
@@ -739,8 +737,8 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
739
737
  }
740
738
  )
741
739
  ] });
742
- }, Tt = R(Et), Rt = ({ handleNextStep: i }) => {
743
- const { completeOnboarding: n } = de(), { cashflow: t } = L(), s = ae();
740
+ }, Tt = T(Et), Rt = ({ handleNextStep: i }) => {
741
+ const { completeOnboarding: n } = de(), { cashflow: t } = O(), s = ae();
744
742
  return /* @__PURE__ */ o(r, { children: [
745
743
  /* @__PURE__ */ e(le, { pb: 12, children: t.welcome_title }),
746
744
  /* @__PURE__ */ e(
@@ -757,7 +755,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
757
755
  /* @__PURE__ */ o(r, { direction: "column", mb: 32, spacing: 32, children: [
758
756
  /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
759
757
  /* @__PURE__ */ e(
760
- D,
758
+ I,
761
759
  {
762
760
  bgcolor: s.palette.primary.lighter,
763
761
  borderRadius: 1,
@@ -773,7 +771,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
773
771
  ] }),
774
772
  /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
775
773
  /* @__PURE__ */ e(
776
- D,
774
+ I,
777
775
  {
778
776
  bgcolor: s.palette.primary.lighter,
779
777
  borderRadius: 1,
@@ -789,7 +787,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
789
787
  ] }),
790
788
  /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
791
789
  /* @__PURE__ */ e(
792
- D,
790
+ I,
793
791
  {
794
792
  bgcolor: s.palette.primary.lighter,
795
793
  borderRadius: 1,
@@ -809,17 +807,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
809
807
  /* @__PURE__ */ e(H, { onClick: n, variant: "outlined", children: t.skip_button })
810
808
  ] })
811
809
  ] });
812
- }, Nt = R(Rt), Ne = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
813
- CASHFLOW_ONBOARDING: `${Ne}/cashflow-onboarding.png`,
814
- CASHFLOW_LOADING_ANIMATION: `${Ne}/loading-animation.gif`
815
- }, Lt = () => {
816
- const { cashflow: i } = L();
810
+ }, Lt = T(Rt), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
811
+ CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
812
+ CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
813
+ }, Ot = () => {
814
+ const { cashflow: i } = O();
817
815
  return /* @__PURE__ */ o(m.Fragment, { children: [
818
816
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Ge.CASHFLOW_LOADING_ANIMATION }) }),
819
817
  /* @__PURE__ */ e(le, { pb: 12, children: i.loading_title }),
820
818
  /* @__PURE__ */ e(k, { children: i.loading_description })
821
819
  ] });
822
- }, Ot = R(Lt), kt = tt`
820
+ }, Nt = T(Ot), kt = tt`
823
821
  from {
824
822
  transform: rotate(0deg);
825
823
  }
@@ -827,88 +825,88 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
827
825
  transform: rotate(360deg);
828
826
  }
829
827
  `, Ht = () => {
830
- const { addRepeatingTransaction: i, repeatingTransactions: n } = q(), { cashflow: t, common: s } = L(), { completeOnboarding: c } = de(), { isDirty: g } = K(), { isMobile: u } = ue(), { isCopyLoaded: f, setDisplayedDate: _ } = Y(), { filter: a, setFilter: b, transactions: l } = ke(), d = ae(), [x, w] = J(!0), [A, p] = m.useState(mt.EveryMonth), [O, S] = m.useState(1), [G, j] = m.useState(15), [W, z] = J(!1), [E, y] = J(1), [I, je] = J([]), [fe, ce] = J(""), $ = m.useMemo(
831
- () => l.find((C) => C.guid === fe),
828
+ const { addRepeatingTransaction: i, repeatingTransactions: n } = q(), { cashflow: t, common: s } = O(), { completeOnboarding: c } = de(), { isDirty: f } = K(), { isMobile: d } = ue(), { isCopyLoaded: b, setDisplayedDate: C } = Y(), { filter: a, setFilter: g, transactions: l } = ke(), u = ae(), [_, w] = J(!0), [v, p] = m.useState(mt.EveryMonth), [N, S] = m.useState(1), [j, G] = m.useState(15), [W, z] = J(!1), [A, R] = J(1), [y, je] = J([]), [fe, ce] = J(""), $ = m.useMemo(
829
+ () => l.find((x) => x.guid === fe),
832
830
  [fe, l]
833
831
  ), ze = !!n.filter(
834
- (C) => C.repeating_transaction_type === Ie.Income
832
+ (x) => x.repeating_transaction_type === Ie.Income
835
833
  ).length, ge = async () => {
836
- y(2), _(
834
+ R(2), C(
837
835
  // Beginning of the month, 90 days before today
838
836
  ct(Me(M(), 90)),
839
837
  M()
840
- ), b({ ...a, custom: Se }), y(3);
838
+ ), g({ ...a, custom: Se }), R(3);
841
839
  }, Be = async () => {
842
- if (!(I.length < 1)) {
840
+ if (!(y.length < 1)) {
843
841
  z(!0);
844
- for (let C = 0; C < I.length; C++) {
845
- const T = I[C], be = De(A, ye(T.date)), Pe = {
846
- account_guid: T.account_guid,
847
- amount: T.amount,
848
- merchant_guid: T.merchant_guid,
849
- description: T.feed_description || T.description,
842
+ for (let x = 0; x < y.length; x++) {
843
+ const E = y[x], be = De(v, ye(E.date)), Pe = {
844
+ account_guid: E.account_guid,
845
+ amount: E.amount,
846
+ merchant_guid: E.merchant_guid,
847
+ description: E.feed_description || E.description,
850
848
  predicted_occurs_on: st(be, { representation: "date" }),
851
849
  recurrence_day: be.getDay(),
852
- recurrence_type: A,
850
+ recurrence_type: v,
853
851
  repeating_transaction_type: Ie.Income,
854
- transaction_type: T.transaction_type
852
+ transaction_type: E.transaction_type
855
853
  };
856
- await i(Pe, T);
854
+ await i(Pe, E);
857
855
  }
858
856
  await c();
859
857
  }
860
- }, Ue = !$ && x || !$ && I.length < 1;
861
- return f ? /* @__PURE__ */ o(
862
- D,
858
+ }, Ue = !$ && _ || !$ && y.length < 1;
859
+ return b ? /* @__PURE__ */ o(
860
+ I,
863
861
  {
864
862
  sx: {
865
863
  display: "flex",
866
- alignItems: u ? "flex-start" : "center",
867
- backgroundColor: d.palette.background.paper,
868
- backgroundImage: u ? null : `url(${Ge.CASHFLOW_ONBOARDING})`,
864
+ alignItems: d ? "flex-start" : "center",
865
+ backgroundColor: u.palette.background.paper,
866
+ backgroundImage: d ? null : `url(${Ge.CASHFLOW_ONBOARDING})`,
869
867
  backgroundRepeat: "no-repeat",
870
868
  backgroundPosition: "left 100px",
871
869
  backgroundSize: "35%",
872
870
  py: 24
873
871
  },
874
872
  children: [
875
- E === 1 && /* @__PURE__ */ e(
876
- D,
873
+ A === 1 && /* @__PURE__ */ e(
874
+ I,
877
875
  {
878
876
  sx: {
879
- ...u ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
877
+ ...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
880
878
  },
881
- children: /* @__PURE__ */ e(Nt, { handleNextStep: ge })
879
+ children: /* @__PURE__ */ e(Lt, { handleNextStep: ge })
882
880
  }
883
881
  ),
884
- E === 2 && /* @__PURE__ */ e(
885
- D,
882
+ A === 2 && /* @__PURE__ */ e(
883
+ I,
886
884
  {
887
885
  sx: {
888
- ...u ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
886
+ ...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
889
887
  },
890
- children: /* @__PURE__ */ e(Ot, {})
888
+ children: /* @__PURE__ */ e(Nt, {})
891
889
  }
892
890
  ),
893
- E === 3 && /* @__PURE__ */ o(
894
- D,
891
+ A === 3 && /* @__PURE__ */ o(
892
+ I,
895
893
  {
896
894
  sx: {
897
- ...u ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
895
+ ...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
898
896
  },
899
897
  children: [
900
898
  /* @__PURE__ */ e(le, { pb: 12, children: t.add_income_title }),
901
899
  /* @__PURE__ */ e(k, { mb: 24, children: t.add_income_description }),
902
- I.length > 0 && !$ && /* @__PURE__ */ o(P, { children: [
903
- /* @__PURE__ */ e(ee, { children: I.map((C, T) => /* @__PURE__ */ o(m.Fragment, { children: [
900
+ y.length > 0 && !$ && /* @__PURE__ */ o(P, { children: [
901
+ /* @__PURE__ */ e(ee, { children: y.map((x, E) => /* @__PURE__ */ o(m.Fragment, { children: [
904
902
  /* @__PURE__ */ e(lt, { bgcolor: "background.paper", children: ut(
905
- U(C.nextDate || C.date)
903
+ U(x.nextDate || x.date)
906
904
  ) }),
907
- /* @__PURE__ */ e(dt, { transaction: C }),
908
- T !== I.length - 1 && /* @__PURE__ */ e(v, {})
909
- ] }, C.guid)) }),
905
+ /* @__PURE__ */ e(dt, { transaction: x }),
906
+ E !== y.length - 1 && /* @__PURE__ */ e(D, {})
907
+ ] }, x.guid)) }),
910
908
  /* @__PURE__ */ o(r, { alignItems: "center", direction: "row", children: [
911
- /* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
909
+ /* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
912
910
  /* @__PURE__ */ e(
913
911
  H,
914
912
  {
@@ -923,27 +921,27 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
923
921
  it,
924
922
  {
925
923
  bgcolor: "background.paper",
926
- onSearch: (C) => b({
924
+ onSearch: (x) => g({
927
925
  ...a,
928
- custom: (T) => C ? at(T, C) : Se(T)
926
+ custom: (E) => x ? at(E, x) : Se(E)
929
927
  }),
930
- onSelected: (C) => {
931
- ce(C), w(!1);
928
+ onSelected: (x) => {
929
+ ce(x), w(!1);
932
930
  }
933
931
  }
934
932
  ),
935
- !ze && g && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
933
+ !ze && f && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
936
934
  $ && /* @__PURE__ */ o(P, { children: [
937
935
  /* @__PURE__ */ e(
938
936
  rt,
939
937
  {
940
938
  bgcolor: "background.paper",
941
- firstDay: O,
942
- frequency: A,
939
+ firstDay: N,
940
+ frequency: v,
943
941
  onFirstDayChange: S,
944
942
  onFrequencyChange: p,
945
- onSecondDayChange: j,
946
- secondDay: G,
943
+ onSecondDayChange: G,
944
+ secondDay: j,
947
945
  transaction: $
948
946
  }
949
947
  ),
@@ -953,12 +951,12 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
953
951
  {
954
952
  "aria-disabled": !$,
955
953
  onClick: () => {
956
- const C = [...I];
957
- C.push({
954
+ const x = [...y];
955
+ x.push({
958
956
  ...$,
959
- nextDate: De(A, ye($.date)),
960
- frequency: A
961
- }), je(C), ce("");
957
+ nextDate: De(v, ye($.date)),
958
+ frequency: v
959
+ }), je(x), ce("");
962
960
  },
963
961
  variant: "contained",
964
962
  children: s.confirm_button
@@ -976,11 +974,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
976
974
  )
977
975
  ] })
978
976
  ] }),
979
- I.length > 0 && !$ && /* @__PURE__ */ o(r, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
977
+ y.length > 0 && !$ && /* @__PURE__ */ o(r, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
980
978
  /* @__PURE__ */ e(
981
979
  H,
982
980
  {
983
- "aria-disabled": I.length < 1 || W,
981
+ "aria-disabled": y.length < 1 || W,
984
982
  onClick: Be,
985
983
  startIcon: W ? /* @__PURE__ */ e(
986
984
  F,
@@ -1003,61 +1001,61 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
1003
1001
  ]
1004
1002
  }
1005
1003
  ) : /* @__PURE__ */ e(se, {});
1006
- }, Ft = R(Ht), Wt = ({ onBackClick: i, sx: n = {} }) => {
1004
+ }, Ft = T(Ht), Wt = ({ onBackClick: i, sx: n = {} }) => {
1007
1005
  const {
1008
1006
  selectedAccounts: t,
1009
1007
  selectedAccountGuids: s,
1010
1008
  setSelectedAccounts: c,
1011
- shouldDisableNextDate: g,
1012
- shouldDisablePrevDate: u
1013
- } = Y(), { onEvent: f } = Oe(), { visibleCashAccounts: _ } = Le(), { setFilter: a } = ke(), { userProfile: b } = me(), { dateRange: l, setSelectedCashAccounts: d } = K(), { loadRepeatingTransactions: x, setDateRange: w } = q(), { cashflow: A, recurring: p } = L(), { isCopyLoaded: O, isInitialized: S } = Y(), [G, j] = m.useState(!1);
1009
+ shouldDisableNextDate: f,
1010
+ shouldDisablePrevDate: d
1011
+ } = Y(), { onEvent: b } = Ne(), { visibleCashAccounts: C } = Oe(), { setFilter: a } = ke(), { userProfile: g } = me(), { dateRange: l, setSelectedCashAccounts: u } = K(), { loadRepeatingTransactions: _, setDateRange: w } = q(), { cashflow: v, recurring: p } = O(), { isCopyLoaded: N, isInitialized: S } = Y(), [j, G] = m.useState(!1);
1014
1012
  return m.useEffect(() => {
1015
- S && (w(l), x().finally());
1013
+ S && (w(l), _().finally());
1016
1014
  }, [S]), m.useEffect(() => {
1017
- c(_);
1018
- }, [_]), m.useEffect(() => {
1019
- const W = _.map((E) => E.guid), z = t.filter(
1020
- (E) => s.includes(E.guid) && W.includes(E.guid)
1015
+ c(C);
1016
+ }, [C]), m.useEffect(() => {
1017
+ const W = C.map((A) => A.guid), z = t.filter(
1018
+ (A) => s.includes(A.guid) && W.includes(A.guid)
1021
1019
  );
1022
- d(z), a({
1020
+ u(z), a({
1023
1021
  dateRange: { start: Me(M(), 90), end: ht() },
1024
- accounts: z.map((E) => E.guid)
1022
+ accounts: z.map((A) => A.guid)
1025
1023
  });
1026
- }, [_, t]), !O || !S ? /* @__PURE__ */ e(se, {}) : b?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
1024
+ }, [C, t]), !N || !S ? /* @__PURE__ */ e(se, {}) : g?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
1027
1025
  ve,
1028
1026
  {
1029
- accountOptions: _,
1027
+ accountOptions: C,
1030
1028
  actions: [
1031
1029
  {
1032
1030
  label: p.action_title,
1033
1031
  iconName: "credit_card",
1034
1032
  onClick: () => {
1035
- j(!0), f(Ae.CASH_FLOW_CLICK_SETTINGS);
1033
+ G(!0), b(Ae.CASH_FLOW_CLICK_SETTINGS);
1036
1034
  }
1037
1035
  }
1038
1036
  ],
1039
1037
  calendarActions: {
1040
- shouldDisableNext: g,
1041
- shouldDisablePrevious: u,
1038
+ shouldDisableNext: f,
1039
+ shouldDisablePrevious: d,
1042
1040
  shouldDisablePicker: !0,
1043
1041
  onRangeChanged: () => {
1044
1042
  }
1045
1043
  },
1046
1044
  dateRange: l,
1047
1045
  dateRangeVariant: "readonly",
1048
- onAccountsFilterClick: () => f(Ae.CASH_FLOW_CLICK_FILTER),
1046
+ onAccountsFilterClick: () => b(Ae.CASH_FLOW_CLICK_FILTER),
1049
1047
  onBackClick: i,
1050
1048
  sx: n,
1051
- title: A.title,
1049
+ title: v.title,
1052
1050
  children: [
1053
1051
  /* @__PURE__ */ e(Tt, {}),
1054
1052
  /* @__PURE__ */ e(At, {}),
1055
1053
  /* @__PURE__ */ e(
1056
1054
  $e,
1057
1055
  {
1058
- ariaLabelClose: A.close_settings_aria,
1059
- isOpen: G,
1060
- onClose: () => j(!1),
1056
+ ariaLabelClose: v.close_settings_aria,
1057
+ isOpen: j,
1058
+ onClose: () => G(!1),
1061
1059
  shouldShowHeaderBorders: !1,
1062
1060
  title: p.action_title,
1063
1061
  children: /* @__PURE__ */ e(Ve, {})
@@ -1070,11 +1068,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
1070
1068
  {
1071
1069
  onBackClick: i,
1072
1070
  sx: { height: "100%", overflow: "auto" },
1073
- title: A.title,
1071
+ title: v.title,
1074
1072
  children: /* @__PURE__ */ e(Ft, {})
1075
1073
  }
1076
1074
  );
1077
- }, On = R(Wt);
1075
+ }, Nn = T(Wt);
1078
1076
  class kn {
1079
1077
  fetchInstance;
1080
1078
  constructor(n, t) {
@@ -1096,8 +1094,8 @@ class kn {
1096
1094
  }
1097
1095
  export {
1098
1096
  kn as CashflowApi,
1099
- Ln as CashflowMiniWidget,
1097
+ On as CashflowMiniWidget,
1100
1098
  Ft as CashflowOnboarding,
1101
1099
  Wn as CashflowStore,
1102
- On as CashflowWidget
1100
+ Nn as CashflowWidget
1103
1101
  };