@mx-cartographer/experiences 7.4.8-alpha.mm1 → 7.4.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 (62) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{Account-BrOTlmeK.mjs → Account-01wOyrH1.mjs} +1 -1
  3. package/dist/{AccountDetailsContent-B7FqH05C.mjs → AccountDetailsContent-COMjOzwr.mjs} +8 -8
  4. package/dist/{AccountDetailsHeader-C8MxsxhN.mjs → AccountDetailsHeader-Cbi5G6fJ.mjs} +4 -4
  5. package/dist/{AccountFields-BQZ-o6Kj.mjs → AccountFields-Cd_nOWmf.mjs} +2 -2
  6. package/dist/{AccountListItem-aIE9WWTO.mjs → AccountListItem-DxY4cCF1.mjs} +4 -4
  7. package/dist/{AccountStore-DqO84Aer.mjs → AccountStore-C1zMBzHq.mjs} +2 -2
  8. package/dist/{Accounts-DC_A4UCa.mjs → Accounts-D7QljYas.mjs} +1 -1
  9. package/dist/{BudgetUtil-BmZXkL0C.mjs → BudgetUtil-Df2nII9u.mjs} +1 -1
  10. package/dist/{CategorySelectorDrawer-SUgfE5GN.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +1 -1
  11. package/dist/{ConnectDrawer-KL8t1qSC.mjs → ConnectDrawer-CuUj16NH.mjs} +1 -1
  12. package/dist/{ConnectionsDrawer-DaK5uIL5.mjs → ConnectionsDrawer-Bz4uwdFE.mjs} +2 -2
  13. package/dist/{CurrencyInput-itK0R3wV.mjs → CurrencyInput-BFKcs-_K.mjs} +1 -1
  14. package/dist/{DebtsStore-DVPZbv2C.mjs → DebtsStore-Bu8rRRSL.mjs} +1 -1
  15. package/dist/{ExportCsvAction-Cglo8Mca.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
  16. package/dist/{GoalStore-o4rrjGSJ.mjs → GoalStore-CrNhjvNc.mjs} +2 -2
  17. package/dist/{Help-BjLMsuMS.mjs → Help-BnPXM_N2.mjs} +1 -1
  18. package/dist/{LineChart-BQRxZF3p.mjs → LineChart-bc1D9xBE.mjs} +1 -1
  19. package/dist/{ListItemAction-BxTkF6Tz.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
  20. package/dist/{ManageIncome-rcnDYsBJ.mjs → ManageIncome-A69EUO5u.mjs} +75 -75
  21. package/dist/{MicroWidgetContainer-B2hO9rOG.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
  22. package/dist/{MiniWidgetContainer-98-hKFqm.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
  23. package/dist/{NetWorthStore-DG2X69jG.mjs → NetWorthStore-CpL_kqvx.mjs} +2 -2
  24. package/dist/{NotificationSettings-C7FYNM7I.mjs → NotificationSettings-CNmJWVeI.mjs} +248 -250
  25. package/dist/{OriginalBalanceAction-C6jdS4ws.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +3 -3
  26. package/dist/{RecurringSettings-C81H1l38.mjs → RecurringSettings-B0uObPlD.mjs} +3 -3
  27. package/dist/{SpendingLegend-DqZxN_BZ.mjs → SpendingLegend-Bf-wbJvb.mjs} +2 -2
  28. package/dist/{TransactionDetails-BA_E5nQ-.mjs → TransactionDetails-COH0OKNG.mjs} +5 -5
  29. package/dist/{TransactionStore-PRlwE-TF.mjs → TransactionStore-Dz-G8Wd0.mjs} +2 -2
  30. package/dist/{User-Cnlegl1N.mjs → User-wXzDI4M8.mjs} +1 -1
  31. package/dist/{ViewMoreMicroCard-DfPXJzbv.mjs → ViewMoreMicroCard-C0832BMe.mjs} +101 -105
  32. package/dist/{WidgetContainer-CaPjoWeE.mjs → WidgetContainer-6dsjtOVg.mjs} +2 -2
  33. package/dist/accounts/index.es.js +140 -148
  34. package/dist/analytics/index.es.js +2 -2
  35. package/dist/budgets/components/AddBudgets.d.ts +2 -1
  36. package/dist/budgets/index.es.js +627 -599
  37. package/dist/cashflow/index.es.js +362 -367
  38. package/dist/categories/index.es.js +1 -1
  39. package/dist/common/hooks/index.d.ts +0 -1
  40. package/dist/common/index.es.js +33 -35
  41. package/dist/dashboard/index.es.js +88 -90
  42. package/dist/debts/index.es.js +342 -346
  43. package/dist/{exportTransactionsToCSV-DuAaI5XA.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +1 -1
  44. package/dist/finstrong/index.es.js +350 -352
  45. package/dist/goals/index.es.js +511 -518
  46. package/dist/help/index.es.js +9 -13
  47. package/dist/{hooks-ZMp65DFz.mjs → hooks-C41HAxM5.mjs} +11 -11
  48. package/dist/investments/index.es.js +393 -395
  49. package/dist/merchants/index.es.js +1 -1
  50. package/dist/microinsights/index.es.js +1 -1
  51. package/dist/networth/index.es.js +240 -245
  52. package/dist/notifications/index.es.js +2 -2
  53. package/dist/recurringtransactions/index.es.js +285 -293
  54. package/dist/settings/index.es.js +249 -252
  55. package/dist/spending/index.es.js +126 -138
  56. package/dist/transactions/index.es.js +73 -77
  57. package/dist/trends/index.es.js +588 -601
  58. package/dist/{useAccountDisplayName-Cjx8YmKK.mjs → useAccountDisplayName-CMMlIOXF.mjs} +2 -2
  59. package/dist/{useInsightsEnabled-B7dxpDrX.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
  60. package/package.json +1 -1
  61. package/dist/common/hooks/useWidgetLoadTimer.d.ts +0 -6
  62. package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +0 -23
@@ -1,62 +1,61 @@
1
- import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
2
- import f, { useState as ee } from "react";
3
- import { observer as T } from "mobx-react-lite";
4
- import { addMonths as Ye } from "date-fns/addMonths";
1
+ import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
2
+ import p, { useState as J } from "react";
3
+ import { observer as L } from "mobx-react-lite";
4
+ import { addMonths as Xe } from "date-fns/addMonths";
5
5
  import { startOfToday as $ } from "date-fns/startOfToday";
6
- import D from "@mui/material/Box";
7
- import v from "@mui/material/Divider";
6
+ import v from "@mui/material/Box";
7
+ import D from "@mui/material/Divider";
8
8
  import s from "@mui/material/Stack";
9
- import le from "@mui/material/styles/useTheme";
10
- import { Text as u, P as O, Icon as j, InstitutionLogo as ye, H1 as ue, H2 as Qe } from "@mxenabled/mxui";
11
- import { G as Ve, t as he, u as N, p as de, d as Oe, b as X, j as q, g as ke, o as He, h as Fe, a as Ke } from "../hooks-ZMp65DFz.mjs";
12
- import { C as L } from "../CurrencyText-Dr0EZ7bp.mjs";
13
- import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
14
- import { L as oe } from "../Loader-DUaFpDGv.mjs";
15
- import { I as fe } from "../CashflowStore-D9Dpuz7X.mjs";
16
- import { C as Bn } from "../CashflowStore-D9Dpuz7X.mjs";
9
+ import ce from "@mui/material/styles/useTheme";
10
+ import { Text as u, P as k, Icon as j, InstitutionLogo as ye, H1 as me, H2 as Ye } from "@mxenabled/mxui";
11
+ import { G as Qe, v as ue, u as N, q as le, d as Ne, b as Y, j as P, g as ke, p as He, h as Fe, n as Ve, a as Ke } from "../hooks-C41HAxM5.mjs";
12
+ import { C as O } from "../CurrencyText-Dr0EZ7bp.mjs";
13
+ import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
14
+ import { L as te } from "../Loader-DUaFpDGv.mjs";
15
+ import { I as pe } from "../CashflowStore-D9Dpuz7X.mjs";
16
+ import { C as zn } from "../CashflowStore-D9Dpuz7X.mjs";
17
17
  import { b as M } from "../Localization-2MODESHW.mjs";
18
- import { u as We } from "../useWidgetLoadTimer-C1NBkyLd.mjs";
19
- import { M as Je } from "../MiniWidgetContainer-98-hKFqm.mjs";
18
+ import { M as Je } from "../MiniWidgetContainer-CmXpTylX.mjs";
20
19
  import { E as Ze } from "../EmptyState-DoxNUae-.mjs";
21
- import { R as et } from "../RecurringSettings-C81H1l38.mjs";
20
+ import { R as et } from "../RecurringSettings-B0uObPlD.mjs";
22
21
  import tt from "@mui/material/Tabs";
23
22
  import Ce from "@mui/material/Tab";
24
- import { getUnixTime as U } from "date-fns/getUnixTime";
25
- import ne from "@mui/material/List";
26
- import ae from "@mui/material/ListItem";
27
- import { A as nt } from "../AccountListItem-aIE9WWTO.mjs";
28
- import { f as Y, a as Q } from "../Dialog-BPTr3qHE.mjs";
23
+ import { getUnixTime as B } from "date-fns/getUnixTime";
24
+ import ee from "@mui/material/List";
25
+ import ne from "@mui/material/ListItem";
26
+ import { A as nt } from "../AccountListItem-DxY4cCF1.mjs";
27
+ import { f as Q, a as V } from "../Dialog-BPTr3qHE.mjs";
29
28
  import ot from "@mui/material/ListSubheader";
30
- import { f as te } from "../NumberFormatting-DjTD0t3W.mjs";
31
- import { isAfter as $e } from "date-fns/isAfter";
32
- import { isBefore as Me } from "date-fns/isBefore";
33
- import { isToday as Ge } from "date-fns/isToday";
29
+ import { f as Z } from "../NumberFormatting-DjTD0t3W.mjs";
30
+ import { isAfter as We } from "date-fns/isAfter";
31
+ import { isBefore as $e } from "date-fns/isBefore";
32
+ import { isToday as Me } from "date-fns/isToday";
34
33
  import { addDays as we } from "date-fns/addDays";
35
34
  import { alpha as at, keyframes as it } from "@mui/material/styles";
36
35
  import { DataGridPro as rt } from "@mui/x-data-grid-pro";
37
36
  import { T as Se } from "../TabContentContainer-j01JYR_7.mjs";
38
37
  import G from "@mui/material/Button";
39
- import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-rcnDYsBJ.mjs";
40
- import { D as je } from "../Drawer-BEtCk82g.mjs";
38
+ import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-A69EUO5u.mjs";
39
+ import { D as Ge } from "../Drawer-BEtCk82g.mjs";
41
40
  import { formatISO as mt } from "date-fns/formatISO";
42
41
  import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
43
42
  import { startOfMonth as ut } from "date-fns/startOfMonth";
44
- import { subDays as ze } from "date-fns/subDays";
45
- import { S as ht, c as pt } from "../TransactionDetails-BA_E5nQ-.mjs";
46
- import { F as ft, R as De, e as ve } from "../RecurringTransactions-BqijW_8S.mjs";
43
+ import { subDays as je } from "date-fns/subDays";
44
+ import { S as ht, c as pt } from "../TransactionDetails-COH0OKNG.mjs";
45
+ import { F as ft, R as ve, e as De } from "../RecurringTransactions-BqijW_8S.mjs";
47
46
  import { h as gt } from "../DateUtil-CBdcsyuk.mjs";
48
47
  import { endOfToday as bt } from "date-fns/endOfToday";
49
- import { W as Ae, A as Ee } from "../WidgetContainer-CaPjoWeE.mjs";
50
- import { F as xt, A as B } from "../Fetch-DecPFeGU.mjs";
51
- const V = () => {
52
- if (!f.useContext(Ve))
48
+ import { W as Ae, A as Ee } from "../WidgetContainer-6dsjtOVg.mjs";
49
+ import { F as xt, A as z } from "../Fetch-DecPFeGU.mjs";
50
+ const K = () => {
51
+ if (!p.useContext(Qe))
53
52
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
54
- return he().uiStore;
53
+ return ue().uiStore;
55
54
  }, yt = ({ remaining: a }) => {
56
55
  const { cashflow: n } = N();
57
- return /* @__PURE__ */ o(P, { children: [
56
+ return /* @__PURE__ */ o(U, { children: [
58
57
  /* @__PURE__ */ e(
59
- D,
58
+ v,
60
59
  {
61
60
  sx: {
62
61
  borderRadius: "1px",
@@ -67,37 +66,37 @@ const V = () => {
67
66
  }
68
67
  ),
69
68
  /* @__PURE__ */ e(u, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
70
- /* @__PURE__ */ e(L, { amount: a, bold: !0, sx: { fontSize: 12 } })
69
+ /* @__PURE__ */ e(O, { amount: a, bold: !0, sx: { fontSize: 12 } })
71
70
  ] });
72
- }, ge = T(yt), Ct = () => {
73
- const a = le(), { availableWidth: n } = de(), { isMobile: t } = pe(), { visibleCashAccounts: i, visibleCashBalance: g } = Oe(), { selectedAccounts: x, selectedAccountGuids: m, setSelectedAccounts: p } = X(), { cashflow: c } = N(), {
71
+ }, fe = L(yt), Ct = () => {
72
+ const a = ce(), { availableWidth: n } = le(), { isMobile: t } = he(), { visibleCashAccounts: i, visibleCashBalance: g } = Ne(), { selectedAccounts: b, selectedAccountGuids: m, setSelectedAccounts: h } = Y(), { cashflow: l } = N(), {
74
73
  daysUntilNextIncome: r,
75
- expensesTilNextIncome: d,
76
- selectedCashAccounts: l,
77
- setNextIncome: b,
74
+ expensesTilNextIncome: c,
75
+ selectedCashAccounts: d,
76
+ setNextIncome: x,
78
77
  setSelectedCashAccounts: C,
79
78
  setUpcomingExpenses: _
80
- } = V(), { isDataLoaded: k, nextIncomeRecurrence: I, upcomingExpenses: F } = q();
81
- f.useEffect(() => {
82
- p(i);
83
- }, [i]), f.useEffect(() => {
79
+ } = K(), { isDataLoaded: H, nextIncomeRecurrence: A, upcomingExpenses: W } = P();
80
+ p.useEffect(() => {
81
+ h(i);
82
+ }, [i]), p.useEffect(() => {
84
83
  C(
85
- i.filter((S) => m.includes(S.guid))
84
+ i.filter((E) => m.includes(E.guid))
86
85
  );
87
- }, [i, x]), f.useEffect(() => {
88
- I && b(I), _(F);
89
- }, [I, F]);
90
- const h = f.useMemo(
91
- () => i.filter((S) => m.includes(S.guid)).reduce((S, z) => S + (z?.balance || 0), 0),
92
- [m, F]
93
- ), w = f.useMemo(
94
- () => d.filter((S) => m.includes(S.accountGuid || "")).reduce((S, z) => S + z.amount, 0),
95
- [m, d]
96
- ), A = f.useMemo(
97
- () => h - w,
98
- [h, w]
86
+ }, [i, b]), p.useEffect(() => {
87
+ A && x(A), _(W);
88
+ }, [A, W]);
89
+ const f = p.useMemo(
90
+ () => i.filter((E) => m.includes(E.guid)).reduce((E, F) => E + (F?.balance || 0), 0),
91
+ [m, W]
92
+ ), w = p.useMemo(
93
+ () => c.filter((E) => m.includes(E.accountGuid || "")).reduce((E, F) => E + F.amount, 0),
94
+ [m, c]
95
+ ), I = p.useMemo(
96
+ () => f - w,
97
+ [f, w]
99
98
  );
100
- return k ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
99
+ return H ? /* @__PURE__ */ e(v, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
101
100
  s,
102
101
  {
103
102
  border: `1px solid ${a.palette.border.light}`,
@@ -107,45 +106,45 @@ const V = () => {
107
106
  px: 24,
108
107
  children: [
109
108
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
110
- /* @__PURE__ */ e(L, { amount: h, variant: "H2" }),
111
- /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: M(
112
- c.total_cash_accounts,
113
- l.length
109
+ /* @__PURE__ */ e(O, { amount: f, variant: "H2" }),
110
+ /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: M(
111
+ l.total_cash_accounts,
112
+ d.length
114
113
  ) })
115
114
  ] }),
116
115
  /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "remove" }) }),
117
116
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
118
- /* @__PURE__ */ e(L, { amount: w, variant: "H2" }),
119
- /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: M(c.expenses_due, d.length) })
117
+ /* @__PURE__ */ e(O, { amount: w, variant: "H2" }),
118
+ /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: M(l.expenses_due, c.length) })
120
119
  ] }),
121
120
  /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "equal" }) }),
122
121
  /* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
123
- /* @__PURE__ */ e(L, { amount: A, variant: "H2" }),
122
+ /* @__PURE__ */ e(O, { amount: I, variant: "H2" }),
124
123
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
125
- /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
126
- /* @__PURE__ */ e(fe, { body: c.tooltip_body, title: c.tooltip_title })
124
+ /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: l.available_to_spend }),
125
+ /* @__PURE__ */ e(pe, { body: l.tooltip_body, title: l.tooltip_title })
127
126
  ] })
128
127
  ] }),
129
- /* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(P, { children: [
130
- /* @__PURE__ */ e(u, { variant: "H2", children: M(c.days, r) }),
131
- /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
128
+ /* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(U, { children: [
129
+ /* @__PURE__ */ e(u, { variant: "H2", children: M(l.days, r) }),
130
+ /* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: l.next_paycheck })
132
131
  ] }) })
133
132
  ]
134
133
  }
135
134
  ) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
136
135
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
137
136
  /* @__PURE__ */ e(u, { variant: "Small", children: M(
138
- c.total_cash_accounts,
139
- l.length
137
+ l.total_cash_accounts,
138
+ d.length
140
139
  ) }),
141
- /* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "XSmall" })
140
+ /* @__PURE__ */ e(O, { amount: g, bold: !0, variant: "XSmall" })
142
141
  ] }),
143
- /* @__PURE__ */ e(v, {}),
142
+ /* @__PURE__ */ e(D, {}),
144
143
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
145
- /* @__PURE__ */ e(u, { variant: "Small", children: M(c.expenses_due, d.length) }),
146
- /* @__PURE__ */ e(L, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
144
+ /* @__PURE__ */ e(u, { variant: "Small", children: M(l.expenses_due, c.length) }),
145
+ /* @__PURE__ */ e(O, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
147
146
  ] }),
148
- /* @__PURE__ */ e(v, {}),
147
+ /* @__PURE__ */ e(D, {}),
149
148
  /* @__PURE__ */ e(
150
149
  s,
151
150
  {
@@ -157,40 +156,37 @@ const V = () => {
157
156
  justifyContent: "space-between",
158
157
  px: 16,
159
158
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
160
- children: /* @__PURE__ */ e(ge, { remaining: A })
159
+ children: /* @__PURE__ */ e(fe, { remaining: I })
161
160
  }
162
161
  ),
163
- /* @__PURE__ */ e(v, {}),
162
+ /* @__PURE__ */ e(D, {}),
164
163
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
165
- /* @__PURE__ */ e(u, { variant: "Small", children: c.next_paycheck }),
166
- /* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: M(c.days, r) })
164
+ /* @__PURE__ */ e(u, { variant: "Small", children: l.next_paycheck }),
165
+ /* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: M(l.days, r) })
167
166
  ] })
168
- ] }) }) : /* @__PURE__ */ e(oe, { height: t ? 210 : 120 });
169
- }, wt = T(Ct), St = ({
167
+ ] }) }) : /* @__PURE__ */ e(te, { height: t ? 210 : 120 });
168
+ }, wt = L(Ct), St = ({
170
169
  onPrimaryCtaClick: a,
171
170
  onSecondaryCtaClick: n,
172
171
  sx: t = {}
173
172
  }) => {
174
- const { cashflow: i } = N(), { isCopyLoaded: g, isInitialized: x } = X(), { loadRepeatingTransactions: m, income: p, isDataLoaded: c, setDateRange: r } = q();
175
- f.useEffect(() => {
176
- x && (r({ start: $(), end: Ye($(), 1) }), m().finally());
177
- }, [x]), We({
178
- widgetName: "CashflowMiniWidget",
179
- isLoaded: c
180
- });
181
- const d = c && !p.length;
173
+ const { cashflow: i } = N(), { isCopyLoaded: g, isInitialized: b } = Y(), { loadRepeatingTransactions: m, income: h, isDataLoaded: l, setDateRange: r } = P();
174
+ p.useEffect(() => {
175
+ b && (r({ start: $(), end: Xe($(), 1) }), m().finally());
176
+ }, [b]);
177
+ const c = l && !h.length;
182
178
  return g ? /* @__PURE__ */ o(
183
179
  Je,
184
180
  {
185
181
  className: "mx-exp-cashflow-miniwidget",
186
182
  onPrimaryCtaClick: a,
187
183
  primaryCtaLabel: i.primary_cta,
188
- subTitle: d || !c ? void 0 : i.sub_title,
184
+ subTitle: c || !l ? void 0 : i.sub_title,
189
185
  sx: { height: "100%", ...t },
190
186
  title: i.title,
191
187
  children: [
192
- !c && /* @__PURE__ */ e(oe, {}),
193
- c && (d ? /* @__PURE__ */ e(
188
+ !l && /* @__PURE__ */ e(te, {}),
189
+ l && (c ? /* @__PURE__ */ e(
194
190
  Ze,
195
191
  {
196
192
  header: i.create,
@@ -203,9 +199,9 @@ const V = () => {
203
199
  ) : /* @__PURE__ */ e(wt, {}))
204
200
  ]
205
201
  }
206
- ) : /* @__PURE__ */ e(oe, {});
207
- }, $n = T(St), _t = ({ remaining: a }) => /* @__PURE__ */ e(
208
- ae,
202
+ ) : /* @__PURE__ */ e(te, {});
203
+ }, Wn = L(St), _t = ({ remaining: a }) => /* @__PURE__ */ e(
204
+ ne,
209
205
  {
210
206
  sx: {
211
207
  alignItems: "center",
@@ -217,19 +213,19 @@ const V = () => {
217
213
  borderBottomRightRadius: "3px",
218
214
  minHeight: "auto"
219
215
  },
220
- children: /* @__PURE__ */ e(ge, { remaining: a })
216
+ children: /* @__PURE__ */ e(fe, { remaining: a })
221
217
  }
222
218
  );
223
- var ie = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(ie || {});
224
- const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
225
- /* @__PURE__ */ o(ae, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
219
+ var oe = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(oe || {});
220
+ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
221
+ /* @__PURE__ */ o(ne, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
226
222
  /* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
227
- /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.MONTH) }),
228
- /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Y(a.expectedDate, Q.DAY) })
223
+ /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Q(a.expectedDate, V.MONTH) }),
224
+ /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Q(a.expectedDate, V.DAY) })
229
225
  ] }),
230
226
  /* @__PURE__ */ e(u, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
231
227
  /* @__PURE__ */ e(
232
- L,
228
+ O,
233
229
  {
234
230
  amount: a.amount,
235
231
  bold: !0,
@@ -237,10 +233,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
237
233
  }
238
234
  )
239
235
  ] }),
240
- /* @__PURE__ */ e(v, {})
241
- ] }), Te = T(It), Dt = ({ total: a, type: n }) => {
236
+ /* @__PURE__ */ e(D, {})
237
+ ] }), Te = L(It), vt = ({ total: a, type: n }) => {
242
238
  const { cashflow: t } = N();
243
- return /* @__PURE__ */ o(P, { children: [
239
+ return /* @__PURE__ */ o(U, { children: [
244
240
  /* @__PURE__ */ o(
245
241
  ot,
246
242
  {
@@ -254,40 +250,40 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
254
250
  px: 24
255
251
  },
256
252
  children: [
257
- /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 12 }, children: n === ie.EXPENSE ? t.expenses : t.income }),
253
+ /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 12 }, children: n === oe.EXPENSE ? t.expenses : t.income }),
258
254
  /* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 13 }, children: [
259
- n === ie.EXPENSE ? "-" : "+",
260
- te(a, "0,0.00")
255
+ n === oe.EXPENSE ? "-" : "+",
256
+ Z(a, "0,0.00")
261
257
  ] })
262
258
  ]
263
259
  }
264
260
  ),
265
- /* @__PURE__ */ e(v, {})
261
+ /* @__PURE__ */ e(D, {})
266
262
  ] });
267
- }, Re = T(Dt), ce = (a, n) => (t) => t.accountGuid === a.guid && (Ge(t.expectedDate) || $e(t.expectedDate, n.start)) && Me(t.expectedDate, n.end), vt = () => {
268
- const { availableWidth: a } = de(), { cashflow: n } = N(), { upcomingExpenses: t, upcomingIncome: i } = q(), { dateRange: g, selectedCashAccounts: x } = V();
263
+ }, Re = L(vt), se = (a, n) => (t) => t.accountGuid === a.guid && (Me(t.expectedDate) || We(t.expectedDate, n.start)) && $e(t.expectedDate, n.end), Dt = () => {
264
+ const { availableWidth: a } = le(), { cashflow: n } = N(), { upcomingExpenses: t, upcomingIncome: i } = P(), { dateRange: g, selectedCashAccounts: b } = K();
269
265
  return /* @__PURE__ */ o(s, { children: [
270
266
  /* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
271
267
  /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
272
268
  /* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
273
- Y(g.start, Q.FULL_MONTH_DAY),
269
+ Q(g.start, V.FULL_MONTH_DAY),
274
270
  " -",
275
271
  " ",
276
- Y(g.end, Q.FULL_MONTH_DAY)
272
+ Q(g.end, V.FULL_MONTH_DAY)
277
273
  ] })
278
274
  ] }),
279
- /* @__PURE__ */ e(s, { children: x.map((m) => {
280
- const p = i.filter(ce(m, g)).sort((l, b) => U(l.expectedDate) - U(b.expectedDate)), c = t.filter(
281
- ce(m, g)
282
- ), r = p.reduce(
283
- (l, b) => l + b.amount,
275
+ /* @__PURE__ */ e(s, { children: b.map((m) => {
276
+ const h = i.filter(se(m, g)).sort((d, x) => B(d.expectedDate) - B(x.expectedDate)), l = t.filter(
277
+ se(m, g)
278
+ ), r = h.reduce(
279
+ (d, x) => d + x.amount,
284
280
  0
285
- ), d = c.reduce(
286
- (l, b) => l + b.amount,
281
+ ), c = l.reduce(
282
+ (d, x) => d + x.amount,
287
283
  0
288
284
  );
289
285
  return /* @__PURE__ */ o(
290
- ne,
286
+ ee,
291
287
  {
292
288
  sx: {
293
289
  border: "1px solid",
@@ -307,27 +303,27 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
307
303
  }
308
304
  }
309
305
  ),
310
- /* @__PURE__ */ e(v, {}),
311
- p.length > 0 && /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
312
- ne,
306
+ /* @__PURE__ */ e(D, {}),
307
+ h.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
308
+ ee,
313
309
  {
314
- subheader: /* @__PURE__ */ e(Re, { total: r, type: ie.INCOME }),
310
+ subheader: /* @__PURE__ */ e(Re, { total: r, type: oe.INCOME }),
315
311
  sx: { width: "100%" },
316
- children: p.map((l) => /* @__PURE__ */ e(Te, { recurrence: l }, l.repeatingTransactionGuid))
312
+ children: h.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
317
313
  }
318
314
  ) }),
319
- c.length > 0 && /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
320
- ne,
315
+ l.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
316
+ ee,
321
317
  {
322
- subheader: /* @__PURE__ */ e(Re, { total: d, type: ie.EXPENSE }),
318
+ subheader: /* @__PURE__ */ e(Re, { total: c, type: oe.EXPENSE }),
323
319
  sx: { width: "100%" },
324
- children: c.map((l) => /* @__PURE__ */ e(Te, { recurrence: l }, l.repeatingTransactionGuid))
320
+ children: l.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
325
321
  }
326
322
  ) }),
327
323
  /* @__PURE__ */ e(
328
324
  _t,
329
325
  {
330
- remaining: (m.available_balance || m.balance || 0) + r - d
326
+ remaining: (m.available_balance || m.balance || 0) + r - c
331
327
  }
332
328
  )
333
329
  ]
@@ -336,24 +332,24 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
336
332
  );
337
333
  }) })
338
334
  ] });
339
- }, At = T(vt), Et = () => {
340
- const { availableWidth: a } = de(), n = le(), { cashflow: t } = N(), { upcomingExpenses: i, upcomingIncome: g } = q(), { dateRange: x, selectedCashAccounts: m } = V(), p = [
335
+ }, At = L(Dt), Et = () => {
336
+ const { availableWidth: a } = le(), n = ce(), { cashflow: t } = N(), { upcomingExpenses: i, upcomingIncome: g } = P(), { dateRange: b, selectedCashAccounts: m } = K(), h = [
341
337
  {
342
338
  field: "account",
343
339
  flex: 1.5,
344
340
  headerName: t.accounts,
345
- renderCell: ({ value: { name: r, nickname: d, institution_guid: l, account_number: b } }) => {
346
- const C = d || r;
341
+ renderCell: ({ value: { name: r, nickname: c, institution_guid: d, account_number: x } }) => {
342
+ const C = c || r;
347
343
  return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
348
344
  /* @__PURE__ */ e(
349
345
  ye,
350
346
  {
351
347
  alt: t.institution_logo,
352
- institutionGuid: l || "",
348
+ institutionGuid: d || "",
353
349
  size: 16
354
350
  }
355
351
  ),
356
- /* @__PURE__ */ e(u, { variant: "body2", children: `${C} ${b ? `*${b}` : ""}` })
352
+ /* @__PURE__ */ e(u, { variant: "body2", children: `${C} ${x ? `*${x}` : ""}` })
357
353
  ] });
358
354
  }
359
355
  },
@@ -362,21 +358,21 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
362
358
  flex: 1,
363
359
  headerName: t.balance,
364
360
  type: "number",
365
- renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: te(r.value, "0,0.00") })
361
+ renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: Z(r.value, "0,0.00") })
366
362
  },
367
363
  {
368
364
  field: "income",
369
365
  flex: 1,
370
366
  headerName: t.projected_income,
371
367
  type: "number",
372
- renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `+${te(r.value, "0,0.00")}` })
368
+ renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `+${Z(r.value, "0,0.00")}` })
373
369
  },
374
370
  {
375
371
  field: "expenses",
376
372
  flex: 1.1,
377
373
  headerName: t.projected_expenses,
378
374
  type: "number",
379
- renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `-${te(r.value, "0,0.00")}` })
375
+ renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `-${Z(r.value, "0,0.00")}` })
380
376
  },
381
377
  {
382
378
  field: "remaining",
@@ -384,34 +380,34 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
384
380
  headerName: t.remaining,
385
381
  type: "number",
386
382
  renderCell: (r) => {
387
- const d = r.row.balance + r.row.income - r.row.expenses;
383
+ const c = r.row.balance + r.row.income - r.row.expenses;
388
384
  return /* @__PURE__ */ e(
389
385
  u,
390
386
  {
391
- color: Math.sign(d) === -1 ? n.palette.error.main : n.palette.text.primary,
387
+ color: Math.sign(c) === -1 ? n.palette.error.main : n.palette.text.primary,
392
388
  variant: "Small",
393
- children: te(d, "0,0.00")
389
+ children: Z(c, "0,0.00")
394
390
  }
395
391
  );
396
392
  }
397
393
  }
398
- ], c = f.useMemo(() => m.map((r) => {
399
- const d = i.filter(
400
- ce(r, { start: $(), end: we($(), 30) })
401
- ).reduce((C, _) => C + _.amount, 0), l = g.filter(
402
- ce(r, { start: $(), end: we($(), 30) })
403
- ).reduce((C, _) => C + _.amount, 0), b = (r.balance || 0) + l - d;
394
+ ], l = p.useMemo(() => m.map((r) => {
395
+ const c = i.filter(
396
+ se(r, { start: $(), end: we($(), 30) })
397
+ ).reduce((C, _) => C + _.amount, 0), d = g.filter(
398
+ se(r, { start: $(), end: we($(), 30) })
399
+ ).reduce((C, _) => C + _.amount, 0), x = (r.balance || 0) + d - c;
404
400
  return {
405
401
  account: r,
406
402
  balance: r.balance || 0,
407
403
  id: r.guid,
408
- income: l,
409
- expenses: d,
410
- remaining: b
404
+ income: d,
405
+ expenses: c,
406
+ remaining: x
411
407
  };
412
408
  }), [m, i, g]);
413
409
  return /* @__PURE__ */ o(
414
- D,
410
+ v,
415
411
  {
416
412
  sx: {
417
413
  width: "100%"
@@ -437,7 +433,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
437
433
  }
438
434
  ),
439
435
  /* @__PURE__ */ e(
440
- fe,
436
+ pe,
441
437
  {
442
438
  body: t.table_tooltip_body,
443
439
  title: t.table_tooltip_title
@@ -445,10 +441,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
445
441
  )
446
442
  ] }),
447
443
  /* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
448
- Y(x.start, Q.FULL_MONTH_DAY),
444
+ Q(b.start, V.FULL_MONTH_DAY),
449
445
  " -",
450
446
  " ",
451
- Y(x.end, Q.FULL_MONTH_DAY)
447
+ Q(b.end, V.FULL_MONTH_DAY)
452
448
  ] })
453
449
  ]
454
450
  }
@@ -457,13 +453,13 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
457
453
  rt,
458
454
  {
459
455
  columnHeaderHeight: 48,
460
- columns: p,
456
+ columns: h,
461
457
  density: "standard",
462
458
  disableColumnMenu: !0,
463
459
  disableRowSelectionOnClick: !0,
464
460
  hideFooter: !0,
465
461
  rowHeight: 48,
466
- rows: c,
462
+ rows: l,
467
463
  sx: {
468
464
  border: "1px solid",
469
465
  borderColor: "border.light",
@@ -483,10 +479,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
483
479
  }
484
480
  }
485
481
  }
486
- ) : c.map((r) => {
487
- const { name: d, nickname: l, institution_guid: b, account_number: C } = r.account, _ = l || d;
482
+ ) : l.map((r) => {
483
+ const { name: c, nickname: d, institution_guid: x, account_number: C } = r.account, _ = d || c;
488
484
  return /* @__PURE__ */ e(
489
- ne,
485
+ ee,
490
486
  {
491
487
  sx: {
492
488
  border: "1px solid",
@@ -494,7 +490,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
494
490
  borderRadius: 1,
495
491
  marginBottom: 24
496
492
  },
497
- children: /* @__PURE__ */ e(ae, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
493
+ children: /* @__PURE__ */ e(ne, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
498
494
  /* @__PURE__ */ o(
499
495
  s,
500
496
  {
@@ -509,17 +505,17 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
509
505
  ye,
510
506
  {
511
507
  alt: t.institution_logo,
512
- institutionGuid: b || "",
508
+ institutionGuid: x || "",
513
509
  size: 16
514
510
  }
515
511
  ),
516
512
  /* @__PURE__ */ e(u, { variant: "Small", children: `${_} ${C ? `*${C}` : ""}` })
517
513
  ] }),
518
- /* @__PURE__ */ e(L, { amount: r.balance, bold: !0, variant: "Small" })
514
+ /* @__PURE__ */ e(O, { amount: r.balance, bold: !0, variant: "Small" })
519
515
  ]
520
516
  }
521
517
  ),
522
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
518
+ /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
523
519
  /* @__PURE__ */ o(
524
520
  s,
525
521
  {
@@ -530,11 +526,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
530
526
  py: 12,
531
527
  children: [
532
528
  /* @__PURE__ */ e(u, { variant: "Small", children: t.projected_income }),
533
- /* @__PURE__ */ e(L, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
529
+ /* @__PURE__ */ e(O, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
534
530
  ]
535
531
  }
536
532
  ),
537
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
533
+ /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
538
534
  /* @__PURE__ */ o(
539
535
  s,
540
536
  {
@@ -545,11 +541,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
545
541
  py: 12,
546
542
  children: [
547
543
  /* @__PURE__ */ e(u, { variant: "Small", children: t.projected_expenses }),
548
- /* @__PURE__ */ e(L, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
544
+ /* @__PURE__ */ e(O, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
549
545
  ]
550
546
  }
551
547
  ),
552
- /* @__PURE__ */ e(v, { sx: { width: "100%" } }),
548
+ /* @__PURE__ */ e(D, { sx: { width: "100%" } }),
553
549
  /* @__PURE__ */ e(
554
550
  s,
555
551
  {
@@ -561,7 +557,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
561
557
  px: 16,
562
558
  py: 12,
563
559
  sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
564
- children: /* @__PURE__ */ e(ge, { remaining: r.remaining })
560
+ children: /* @__PURE__ */ e(fe, { remaining: r.remaining })
565
561
  }
566
562
  )
567
563
  ] }) })
@@ -572,19 +568,19 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
572
568
  ]
573
569
  }
574
570
  );
575
- }, Tt = T(Et), Rt = () => {
576
- const { cashflow: a } = N(), { isDesktop: n } = pe(), { onEvent: t } = ke(), [i, g] = f.useState(0), x = (m, p) => {
577
- g(p);
571
+ }, Tt = L(Et), Rt = () => {
572
+ const { cashflow: a } = N(), { isDesktop: n } = he(), { onEvent: t } = ke(), [i, g] = p.useState(0), b = (m, h) => {
573
+ g(h);
578
574
  };
579
- return f.useEffect(() => {
575
+ return p.useEffect(() => {
580
576
  t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
581
- }, [i]), /* @__PURE__ */ o(D, { children: [
577
+ }, [i]), /* @__PURE__ */ o(v, { children: [
582
578
  /* @__PURE__ */ o(
583
579
  tt,
584
580
  {
585
581
  "aria-label": a.cashflow_summary_and_details,
586
582
  centered: !0,
587
- onChange: x,
583
+ onChange: b,
588
584
  textColor: "primary",
589
585
  value: i,
590
586
  variant: "fullWidth",
@@ -614,17 +610,17 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
614
610
  ]
615
611
  }
616
612
  ),
617
- /* @__PURE__ */ e(D, { sx: { mb: 32 } }),
618
- /* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Tt, {}) }) }),
619
- /* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) })
613
+ /* @__PURE__ */ e(v, { sx: { mb: 32 } }),
614
+ /* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(v, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Tt, {}) }) }),
615
+ /* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(v, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) })
620
616
  ] });
621
- }, Lt = T(Rt), se = ({
617
+ }, Lt = L(Rt), re = ({
622
618
  amount: a,
623
619
  isMobile: n = !1,
624
620
  isTotal: t = !1,
625
621
  label: i,
626
622
  symbol: g,
627
- tooltip: x
623
+ tooltip: b
628
624
  }) => /* @__PURE__ */ o(
629
625
  s,
630
626
  {
@@ -634,85 +630,85 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
634
630
  padding: n ? "14px 16px" : 0,
635
631
  sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
636
632
  children: [
637
- !n && /* @__PURE__ */ e(L, { amount: a, component: "h2", variant: "H2" }),
633
+ !n && /* @__PURE__ */ e(O, { amount: a, component: "h2", variant: "H2" }),
638
634
  /* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
639
635
  /* @__PURE__ */ e(u, { bold: t, variant: "Small", children: i }),
640
- x
636
+ b
641
637
  ] }),
642
- n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: g, variant: "Small" })
638
+ n && /* @__PURE__ */ e(O, { amount: a, component: "h2", symbol: g, variant: "Small" })
643
639
  ]
644
640
  }
645
- ), Le = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Ge(t.expectedDate) || $e(t.expectedDate, n.start)) && Me(t.expectedDate, n.end), Nt = () => {
646
- const { availableWidth: a } = de(), { cashflow: n } = N(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: x } = q(), { selectedAccountGuids: m } = X(), { dateRange: p, selectedCashAccounts: c } = V(), [r, d] = f.useState(!1), l = f.useMemo(
647
- () => g.filter(Le(m, p)),
648
- [p, m, g]
649
- ), b = f.useMemo(
650
- () => x.filter(Le(m, p)),
651
- [p, m, x]
652
- ), C = f.useMemo(
653
- () => c.reduce((w, A) => w + (A?.balance || 0), 0),
654
- [c]
655
- ), _ = l.reduce((w, A) => w + A.amount, 0), k = b.reduce((w, A) => w + A.amount, 0), I = C - _ + k, F = i && t.length > 0, h = a < 725;
656
- return /* @__PURE__ */ o(s, { sx: { mx: h ? 16 : 0, my: h ? 24 : 42 }, children: [
641
+ ), Le = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Me(t.expectedDate) || We(t.expectedDate, n.start)) && $e(t.expectedDate, n.end), Ot = () => {
642
+ const { availableWidth: a } = le(), { cashflow: n } = N(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: b } = P(), { selectedAccountGuids: m } = Y(), { dateRange: h, selectedCashAccounts: l } = K(), [r, c] = p.useState(!1), d = p.useMemo(
643
+ () => g.filter(Le(m, h)),
644
+ [h, m, g]
645
+ ), x = p.useMemo(
646
+ () => b.filter(Le(m, h)),
647
+ [h, m, b]
648
+ ), C = p.useMemo(
649
+ () => l.reduce((w, I) => w + (I?.balance || 0), 0),
650
+ [l]
651
+ ), _ = d.reduce((w, I) => w + I.amount, 0), H = x.reduce((w, I) => w + I.amount, 0), A = C - _ + H, W = i && t.length > 0, f = a < 725;
652
+ return /* @__PURE__ */ o(s, { sx: { mx: f ? 16 : 0, my: f ? 24 : 42 }, children: [
657
653
  /* @__PURE__ */ o(
658
654
  s,
659
655
  {
660
- border: h ? "1px solid" : "none",
656
+ border: f ? "1px solid" : "none",
661
657
  borderColor: "border.light",
662
658
  borderRadius: 2,
663
- flexDirection: h ? "column" : "row",
664
- gap: h ? 0 : 24,
659
+ flexDirection: f ? "column" : "row",
660
+ gap: f ? 0 : 24,
665
661
  justifyContent: "center",
666
662
  children: [
667
663
  /* @__PURE__ */ e(
668
- se,
664
+ re,
669
665
  {
670
666
  amount: C,
671
- isMobile: h,
672
- label: M(n.cash_and_bank, c.length)
667
+ isMobile: f,
668
+ label: M(n.cash_and_bank, l.length)
673
669
  }
674
670
  ),
675
- h && /* @__PURE__ */ e(v, {}),
676
- F ? /* @__PURE__ */ o(P, { children: [
677
- !h && /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
671
+ f && /* @__PURE__ */ e(D, {}),
672
+ W ? /* @__PURE__ */ o(U, { children: [
673
+ !f && /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
678
674
  /* @__PURE__ */ e(
679
- se,
675
+ re,
680
676
  {
681
- amount: k,
682
- isMobile: h,
677
+ amount: H,
678
+ isMobile: f,
683
679
  label: n.to_be_received,
684
- symbol: h ? "+" : void 0
680
+ symbol: f ? "+" : void 0
685
681
  }
686
682
  )
687
683
  ] }) : /* @__PURE__ */ e(
688
684
  G,
689
685
  {
690
- onClick: () => d(!0),
686
+ onClick: () => c(!0),
691
687
  startIcon: /* @__PURE__ */ e(j, { name: "add" }),
692
688
  sx: { fontSize: 13 },
693
689
  children: n.add_income
694
690
  }
695
691
  ),
696
- h ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
692
+ f ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
697
693
  /* @__PURE__ */ e(
698
- se,
694
+ re,
699
695
  {
700
696
  amount: _,
701
- isMobile: h,
702
- label: M(n.to_be_paid_out, l.length),
703
- symbol: h ? "-" : void 0
697
+ isMobile: f,
698
+ label: M(n.to_be_paid_out, d.length),
699
+ symbol: f ? "-" : void 0
704
700
  }
705
701
  ),
706
- h ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
702
+ f ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
707
703
  /* @__PURE__ */ e(
708
- se,
704
+ re,
709
705
  {
710
- amount: I,
711
- isMobile: h,
712
- isTotal: h,
706
+ amount: A,
707
+ isMobile: f,
708
+ isTotal: f,
713
709
  label: n.remaining_cash,
714
710
  tooltip: /* @__PURE__ */ e(
715
- fe,
711
+ pe,
716
712
  {
717
713
  body: n.remaining_income_tooltip_body,
718
714
  title: n.remaining_income_tooltip_title
@@ -724,23 +720,23 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
724
720
  }
725
721
  ),
726
722
  /* @__PURE__ */ e(
727
- je,
723
+ Ge,
728
724
  {
729
725
  ariaLabelClose: n.close_manage_income_aria,
730
726
  isOpen: r,
731
- onClose: () => d(!1),
727
+ onClose: () => c(!1),
732
728
  shouldShowHeaderBorders: !1,
733
729
  title: n.manage_income,
734
730
  children: /* @__PURE__ */ e(st, {})
735
731
  }
736
732
  )
737
733
  ] });
738
- }, Ot = T(Nt), kt = ({ handleNextStep: a }) => {
739
- const { completeOnboarding: n } = he(), { cashflow: t } = N(), i = le();
734
+ }, Nt = L(Ot), kt = ({ handleNextStep: a }) => {
735
+ const { completeOnboarding: n } = ue(), { cashflow: t } = N(), i = ce();
740
736
  return /* @__PURE__ */ o(s, { children: [
741
- /* @__PURE__ */ e(ue, { pb: 12, children: t.welcome_title }),
737
+ /* @__PURE__ */ e(me, { pb: 12, children: t.welcome_title }),
742
738
  /* @__PURE__ */ e(
743
- Qe,
739
+ Ye,
744
740
  {
745
741
  color: i.palette.primary.light,
746
742
  pb: 8,
@@ -749,11 +745,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
749
745
  children: t.welcome_sub_title
750
746
  }
751
747
  ),
752
- /* @__PURE__ */ e(O, { pb: 32, children: t.welcome_description }),
748
+ /* @__PURE__ */ e(k, { pb: 32, children: t.welcome_description }),
753
749
  /* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
754
- /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
750
+ /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
755
751
  /* @__PURE__ */ e(
756
- D,
752
+ v,
757
753
  {
758
754
  bgcolor: i.palette.primary.lighter,
759
755
  borderRadius: 1,
@@ -767,9 +763,9 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
767
763
  ),
768
764
  t.bullet_one
769
765
  ] }),
770
- /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
766
+ /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
771
767
  /* @__PURE__ */ e(
772
- D,
768
+ v,
773
769
  {
774
770
  bgcolor: i.palette.primary.lighter,
775
771
  borderRadius: 1,
@@ -783,9 +779,9 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
783
779
  ),
784
780
  t.bullet_two
785
781
  ] }),
786
- /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
782
+ /* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
787
783
  /* @__PURE__ */ e(
788
- D,
784
+ v,
789
785
  {
790
786
  bgcolor: i.palette.primary.lighter,
791
787
  borderRadius: 1,
@@ -805,17 +801,17 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
805
801
  /* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
806
802
  ] })
807
803
  ] });
808
- }, Ht = T(kt), Ne = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Be = {
809
- CASHFLOW_ONBOARDING: `${Ne}/cashflow-onboarding.png`,
810
- CASHFLOW_LOADING_ANIMATION: `${Ne}/loading-animation.gif`
804
+ }, Ht = L(kt), Oe = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", ze = {
805
+ CASHFLOW_ONBOARDING: `${Oe}/cashflow-onboarding.png`,
806
+ CASHFLOW_LOADING_ANIMATION: `${Oe}/loading-animation.gif`
811
807
  }, Ft = () => {
812
808
  const { cashflow: a } = N();
813
- return /* @__PURE__ */ o(f.Fragment, { children: [
814
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Be.CASHFLOW_LOADING_ANIMATION }) }),
815
- /* @__PURE__ */ e(ue, { pb: 12, children: a.loading_title }),
816
- /* @__PURE__ */ e(O, { children: a.loading_description })
809
+ return /* @__PURE__ */ o(p.Fragment, { children: [
810
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: ze.CASHFLOW_LOADING_ANIMATION }) }),
811
+ /* @__PURE__ */ e(me, { pb: 12, children: a.loading_title }),
812
+ /* @__PURE__ */ e(k, { children: a.loading_description })
817
813
  ] });
818
- }, Wt = T(Ft), $t = it`
814
+ }, Wt = L(Ft), $t = it`
819
815
  from {
820
816
  transform: rotate(0deg);
821
817
  }
@@ -823,142 +819,142 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
823
819
  transform: rotate(360deg);
824
820
  }
825
821
  `, Mt = () => {
826
- const { addRepeatingTransaction: a, repeatingTransactions: n } = q(), { cashflow: t, common: i } = N(), { user: g } = He(), { completeOnboarding: x } = he(), { isDirty: m } = V(), { isMobile: p } = pe(), { isCopyLoaded: c, setDisplayedDate: r } = X(), { filter: d, setFilter: l, transactions: b } = Fe(), C = le(), [_, k] = ee(!0), [I, F] = f.useState(ft.EveryMonth), [h, w] = f.useState(1), [A, S] = f.useState(15), [z, re] = ee(!1), [K, J] = ee(1), [R, me] = ee([]), [Z, H] = ee(""), W = f.useMemo(
827
- () => b.find((y) => y.guid === Z),
828
- [Z, b]
829
- ), Ue = !!n.filter(
830
- (y) => y.repeating_transaction_type === De.Income
822
+ const { addRepeatingTransaction: a, repeatingTransactions: n } = P(), { cashflow: t, common: i } = N(), { user: g } = He(), { completeOnboarding: b } = ue(), { isDirty: m } = K(), { isMobile: h } = he(), { isCopyLoaded: l, setDisplayedDate: r } = Y(), { filter: c, setFilter: d, transactions: x } = Fe(), C = ce(), [_, H] = J(!0), [A, W] = p.useState(ft.EveryMonth), [f, w] = p.useState(1), [I, E] = p.useState(15), [F, ge] = J(!1), [q, ae] = J(1), [T, de] = J([]), [ie, X] = J(""), S = p.useMemo(
823
+ () => x.find((y) => y.guid === ie),
824
+ [ie, x]
825
+ ), Be = !!n.filter(
826
+ (y) => y.repeating_transaction_type === ve.Income
831
827
  ).length, be = async () => {
832
- J(2), r(
828
+ ae(2), r(
833
829
  // Beginning of the month, 90 days before today
834
- ut(ze($(), 90)),
830
+ ut(je($(), 90)),
835
831
  $()
836
- ), l({ ...d, custom: _e }), J(3);
837
- }, Pe = async () => {
838
- if (!(R.length < 1)) {
839
- re(!0);
840
- for (let y = 0; y < R.length; y++) {
841
- const E = R[y], xe = ve(I, Ie(E.date)), Xe = {
842
- account_guid: E.account_guid,
843
- amount: E.amount,
832
+ ), d({ ...c, custom: _e }), ae(3);
833
+ }, Ue = async () => {
834
+ if (!(T.length < 1)) {
835
+ ge(!0);
836
+ for (let y = 0; y < T.length; y++) {
837
+ const R = T[y], xe = De(A, Ie(R.date)), qe = {
838
+ account_guid: R.account_guid,
839
+ amount: R.amount,
844
840
  created_by: 0,
845
841
  //user
846
- merchant_guid: E.merchant_guid,
847
- description: E.feed_description || E.description,
842
+ merchant_guid: R.merchant_guid,
843
+ description: R.feed_description || R.description,
848
844
  predicted_occurs_on: mt(xe, { representation: "date" }),
849
845
  recurrence_day: xe.getDay(),
850
- recurrence_type: I,
851
- repeating_transaction_type: De.Income,
852
- second_recurrence_day: A,
853
- transaction_type: E.transaction_type,
846
+ recurrence_type: A,
847
+ repeating_transaction_type: ve.Income,
848
+ second_recurrence_day: I,
849
+ transaction_type: R.transaction_type,
854
850
  user_guid: g.guid
855
851
  };
856
- await a(Xe, E);
852
+ await a(qe, R);
857
853
  }
858
- await x();
854
+ await b();
859
855
  }
860
- }, qe = !W && _ || !W && R.length < 1;
861
- return c ? /* @__PURE__ */ o(
862
- D,
856
+ }, Pe = !S && _ || !S && T.length < 1;
857
+ return l ? /* @__PURE__ */ o(
858
+ v,
863
859
  {
864
860
  sx: {
865
861
  display: "flex",
866
- alignItems: p ? "flex-start" : "center",
862
+ alignItems: h ? "flex-start" : "center",
867
863
  backgroundColor: C.palette.background.paper,
868
- backgroundImage: p ? null : `url(${Be.CASHFLOW_ONBOARDING})`,
864
+ backgroundImage: h ? null : `url(${ze.CASHFLOW_ONBOARDING})`,
869
865
  backgroundRepeat: "no-repeat",
870
866
  backgroundPosition: "left 100px",
871
867
  backgroundSize: "35%",
872
868
  py: 24
873
869
  },
874
870
  children: [
875
- K === 1 && /* @__PURE__ */ e(
876
- D,
871
+ q === 1 && /* @__PURE__ */ e(
872
+ v,
877
873
  {
878
874
  sx: {
879
- ...p ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
875
+ ...h ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
880
876
  },
881
877
  children: /* @__PURE__ */ e(Ht, { handleNextStep: be })
882
878
  }
883
879
  ),
884
- K === 2 && /* @__PURE__ */ e(
885
- D,
880
+ q === 2 && /* @__PURE__ */ e(
881
+ v,
886
882
  {
887
883
  sx: {
888
- ...p ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
884
+ ...h ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
889
885
  },
890
886
  children: /* @__PURE__ */ e(Wt, {})
891
887
  }
892
888
  ),
893
- K === 3 && /* @__PURE__ */ o(
894
- D,
889
+ q === 3 && /* @__PURE__ */ o(
890
+ v,
895
891
  {
896
892
  sx: {
897
- ...p ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
893
+ ...h ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
898
894
  },
899
895
  children: [
900
- /* @__PURE__ */ e(ue, { pb: 12, children: t.add_income_title }),
901
- /* @__PURE__ */ e(O, { mb: 24, children: t.add_income_description }),
902
- R.length > 0 && !W && /* @__PURE__ */ o(P, { children: [
903
- /* @__PURE__ */ e(ne, { children: R.map((y, E) => /* @__PURE__ */ o(f.Fragment, { children: [
896
+ /* @__PURE__ */ e(me, { pb: 12, children: t.add_income_title }),
897
+ /* @__PURE__ */ e(k, { mb: 24, children: t.add_income_description }),
898
+ T.length > 0 && !S && /* @__PURE__ */ o(U, { children: [
899
+ /* @__PURE__ */ e(ee, { children: T.map((y, R) => /* @__PURE__ */ o(p.Fragment, { children: [
904
900
  /* @__PURE__ */ e(ht, { bgcolor: "background.paper", children: gt(
905
- U(y.nextDate || y.date)
901
+ B(y.nextDate || y.date)
906
902
  ) }),
907
903
  /* @__PURE__ */ e(pt, { transaction: y }),
908
- E !== R.length - 1 && /* @__PURE__ */ e(v, {})
904
+ R !== T.length - 1 && /* @__PURE__ */ e(D, {})
909
905
  ] }, y.guid)) }),
910
906
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
911
- /* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
907
+ /* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
912
908
  /* @__PURE__ */ e(
913
909
  G,
914
910
  {
915
- onClick: () => k(!0),
911
+ onClick: () => H(!0),
916
912
  startIcon: /* @__PURE__ */ e(j, { name: "add", size: 20 }),
917
913
  children: t.add_income
918
914
  }
919
915
  )
920
916
  ] })
921
917
  ] }),
922
- qe && /* @__PURE__ */ e(
918
+ Pe && /* @__PURE__ */ e(
923
919
  ct,
924
920
  {
925
921
  bgcolor: "background.paper",
926
- onSearch: (y) => l({
927
- ...d,
928
- custom: (E) => y ? lt(E, y) : _e(E)
922
+ onSearch: (y) => d({
923
+ ...c,
924
+ custom: (R) => y ? lt(R, y) : _e(R)
929
925
  }),
930
926
  onSelected: (y) => {
931
- H(y), k(!1);
927
+ X(y), H(!1);
932
928
  }
933
929
  }
934
930
  ),
935
- !Ue && m && /* @__PURE__ */ e(O, { color: "error", mt: 16, children: t.confirm_error }),
936
- W && /* @__PURE__ */ o(P, { children: [
931
+ !Be && m && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
932
+ S && /* @__PURE__ */ o(U, { children: [
937
933
  /* @__PURE__ */ e(
938
934
  dt,
939
935
  {
940
936
  bgcolor: "background.paper",
941
- firstDay: h,
942
- frequency: I,
937
+ firstDay: f,
938
+ frequency: A,
943
939
  onFirstDayChange: w,
944
- onFrequencyChange: F,
945
- onSecondDayChange: S,
946
- secondDay: A,
947
- transaction: W
940
+ onFrequencyChange: W,
941
+ onSecondDayChange: E,
942
+ secondDay: I,
943
+ transaction: S
948
944
  }
949
945
  ),
950
946
  /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
951
947
  /* @__PURE__ */ e(
952
948
  G,
953
949
  {
954
- "aria-disabled": !W,
950
+ "aria-disabled": !S,
955
951
  onClick: () => {
956
- const y = [...R];
952
+ const y = [...T];
957
953
  y.push({
958
- ...W,
959
- nextDate: ve(I, Ie(W.date)),
960
- frequency: I
961
- }), me(y), H("");
954
+ ...S,
955
+ nextDate: De(A, Ie(S.date)),
956
+ frequency: A
957
+ }), de(y), X("");
962
958
  },
963
959
  variant: "contained",
964
960
  children: i.confirm_button
@@ -968,7 +964,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
968
964
  G,
969
965
  {
970
966
  onClick: () => {
971
- H(""), k(!0), be().finally();
967
+ X(""), H(!0), be().finally();
972
968
  },
973
969
  variant: "outlined",
974
970
  children: i.cancel_button
@@ -976,13 +972,13 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
976
972
  )
977
973
  ] })
978
974
  ] }),
979
- R.length > 0 && !W && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
975
+ T.length > 0 && !S && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
980
976
  /* @__PURE__ */ e(
981
977
  G,
982
978
  {
983
- "aria-disabled": R.length < 1 || z,
984
- onClick: Pe,
985
- startIcon: z ? /* @__PURE__ */ e(
979
+ "aria-disabled": T.length < 1 || F,
980
+ onClick: Ue,
981
+ startIcon: F ? /* @__PURE__ */ e(
986
982
  j,
987
983
  {
988
984
  name: "progress_activity",
@@ -995,114 +991,113 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
995
991
  children: t.confirm_income_button
996
992
  }
997
993
  ),
998
- /* @__PURE__ */ e(G, { onClick: x, variant: "outlined", children: t.skip_button })
994
+ /* @__PURE__ */ e(G, { onClick: b, variant: "outlined", children: t.skip_button })
999
995
  ] })
1000
996
  ]
1001
997
  }
1002
998
  )
1003
999
  ]
1004
1000
  }
1005
- ) : /* @__PURE__ */ e(oe, {});
1006
- }, Gt = T(Mt), jt = ({ onBackClick: a, sx: n = {} }) => {
1001
+ ) : /* @__PURE__ */ e(te, {});
1002
+ }, Gt = L(Mt), jt = ({ onBackClick: a, sx: n = {} }) => {
1007
1003
  const {
1008
1004
  selectedAccounts: t,
1009
1005
  selectedAccountGuids: i,
1010
1006
  setSelectedAccounts: g,
1011
- shouldDisableNextDate: x,
1007
+ shouldDisableNextDate: b,
1012
1008
  shouldDisablePrevDate: m
1013
- } = X(), { onEvent: p } = ke(), { clientConfig: c } = Ke(), { visibleCashAccounts: r } = Oe(), { setFilter: d } = Fe(), { userProfile: l } = He(), { dateRange: b, setSelectedCashAccounts: C } = V(), { loadRepeatingTransactions: _, income: k, isDataLoaded: I, setDateRange: F } = q(), { cashflow: h, recurring: w } = N(), { isCopyLoaded: A, isInitialized: S } = X(), re = c?.master?.deep_link_params?.view === "manage_income", [K, J] = f.useState(re);
1014
- f.useEffect(() => {
1015
- S && (F(b), _().finally());
1016
- }, [S]), f.useEffect(() => {
1017
- g(r);
1018
- }, [r]), f.useEffect(() => {
1019
- const me = r.map((H) => H.guid), Z = t.filter(
1020
- (H) => i.includes(H.guid) && me.includes(H.guid)
1009
+ } = Y(), { onEvent: h } = ke(), { onLoad: l } = Ve(), { clientConfig: r } = Ke(), { visibleCashAccounts: c } = Ne(), { setFilter: d } = Fe(), { userProfile: x } = He(), { dateRange: C, setSelectedCashAccounts: _ } = K(), { loadRepeatingTransactions: H, income: A, isDataLoaded: W, setDateRange: f } = P(), { cashflow: w, recurring: I } = N(), { isCopyLoaded: E, isInitialized: F } = Y(), q = r?.master?.deep_link_params?.view === "manage_income", [ae, T] = p.useState(q);
1010
+ p.useEffect(() => {
1011
+ F && (f(C), H().finally(() => {
1012
+ l?.("CashflowWidget");
1013
+ }));
1014
+ }, [F]), p.useEffect(() => {
1015
+ g(c);
1016
+ }, [c]), p.useEffect(() => {
1017
+ const ie = c.map((S) => S.guid), X = t.filter(
1018
+ (S) => i.includes(S.guid) && ie.includes(S.guid)
1021
1019
  );
1022
- C(Z), d({
1023
- dateRange: { start: ze($(), 90), end: bt() },
1024
- accounts: Z.map((H) => H.guid)
1020
+ _(X), d({
1021
+ dateRange: { start: je($(), 90), end: bt() },
1022
+ accounts: X.map((S) => S.guid)
1025
1023
  });
1026
- }, [r, t]), We({
1027
- widgetName: "CashflowWidget",
1028
- isLoaded: I
1029
- });
1030
- const R = I && !l?.has_completed_cash_flow_onboarding && !k.length;
1031
- return !A || !S ? /* @__PURE__ */ e(oe, {}) : R ? /* @__PURE__ */ e(
1024
+ }, [c, t]);
1025
+ const de = W && !x?.has_completed_cash_flow_onboarding && !A.length;
1026
+ return !E || !F ? /* @__PURE__ */ e(te, {}) : de ? /* @__PURE__ */ e(
1032
1027
  Ae,
1033
1028
  {
1034
1029
  onBackClick: a,
1035
1030
  sx: { height: "100%", overflow: "auto" },
1036
- title: h.title,
1031
+ title: w.title,
1037
1032
  children: /* @__PURE__ */ e(Gt, {})
1038
1033
  }
1039
1034
  ) : /* @__PURE__ */ o(
1040
1035
  Ae,
1041
1036
  {
1042
- accountOptions: r,
1037
+ accountOptions: c,
1043
1038
  actions: [
1044
1039
  {
1045
- label: w.action_title,
1040
+ label: I.action_title,
1046
1041
  iconName: "credit_card_gear",
1047
1042
  onClick: () => {
1048
- J(!0), p(Ee.CASH_FLOW_CLICK_SETTINGS);
1043
+ T(!0), h(Ee.CASH_FLOW_CLICK_SETTINGS);
1049
1044
  }
1050
1045
  }
1051
1046
  ],
1052
1047
  calendarActions: {
1053
- shouldDisableNext: x,
1048
+ shouldDisableNext: b,
1054
1049
  shouldDisablePrevious: m,
1055
1050
  shouldDisablePicker: !0,
1056
1051
  onRangeChanged: () => {
1057
1052
  }
1058
1053
  },
1059
- dateRange: b,
1054
+ dateRange: C,
1060
1055
  dateRangeVariant: "readonly",
1061
- onAccountsFilterClick: () => p(Ee.CASH_FLOW_CLICK_FILTER),
1056
+ onAccountsFilterClick: () => h(Ee.CASH_FLOW_CLICK_FILTER),
1062
1057
  onBackClick: a,
1063
1058
  sx: n,
1064
- title: h.title,
1059
+ title: w.title,
1065
1060
  children: [
1066
- /* @__PURE__ */ e(Ot, {}),
1061
+ /* @__PURE__ */ e(Nt, {}),
1067
1062
  /* @__PURE__ */ e(Lt, {}),
1068
1063
  /* @__PURE__ */ e(
1069
- je,
1064
+ Ge,
1070
1065
  {
1071
- ariaLabelClose: h.close_settings_aria,
1072
- isOpen: K,
1073
- onClose: () => J(!1),
1066
+ ariaLabelClose: w.close_settings_aria,
1067
+ isOpen: ae,
1068
+ onClose: () => T(!1),
1074
1069
  shouldShowHeaderBorders: !1,
1075
- title: w.action_title,
1076
- children: /* @__PURE__ */ e(et, { defaultSelectedTab: re ? 1 : 0 })
1070
+ title: I.action_title,
1071
+ children: /* @__PURE__ */ e(et, { defaultSelectedTab: q ? 1 : 0 })
1077
1072
  }
1078
1073
  )
1079
1074
  ]
1080
1075
  }
1081
1076
  );
1082
- }, Mn = T(jt);
1083
- class Gn {
1077
+ }, $n = L(jt);
1078
+ class Mn {
1084
1079
  fetchInstance;
1085
1080
  constructor(n, t, i) {
1086
1081
  this.fetchInstance = new xt(n, t, void 0, i);
1087
1082
  }
1088
- addCashflowEvent = async (n) => this.fetchInstance.post(B.CASHFLOW_EVENTS, { ...n }).then((t) => t);
1089
- addCashflowSequence = async (n) => this.fetchInstance.post(B.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
1090
- getCashflowSequences = async () => this.fetchInstance.get(B.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
1083
+ addCashflowEvent = async (n) => this.fetchInstance.post(z.CASHFLOW_EVENTS, { ...n }).then((t) => t);
1084
+ addCashflowSequence = async (n) => this.fetchInstance.post(z.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
1085
+ getCashflowSequences = async () => this.fetchInstance.get(z.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
1091
1086
  getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
1092
- `${B.CASHFLOW_EVENTS}/from/${U(n)}/to/${U(t)}`
1087
+ `${z.CASHFLOW_EVENTS}/from/${B(n)}/to/${B(t)}`
1093
1088
  ).then((i) => i.cashflow_events);
1094
- deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${B.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
1089
+ deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${z.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
1095
1090
  getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
1096
- `${B.CASHFLOW_SEQUENCES}/projected_events/from/${U(
1091
+ `${z.CASHFLOW_SEQUENCES}/projected_events/from/${B(
1097
1092
  n
1098
- )}/to/${U(t)}`
1093
+ )}/to/${B(t)}`
1099
1094
  ).then((i) => i.cashflow_events);
1100
- updateCashflowSequence = async (n) => this.fetchInstance.put(`${B.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1095
+ updateCashflowSequence = async (n) => this.fetchInstance.put(`${z.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1101
1096
  }
1102
1097
  export {
1103
- Gn as CashflowApi,
1104
- $n as CashflowMiniWidget,
1098
+ Mn as CashflowApi,
1099
+ Wn as CashflowMiniWidget,
1105
1100
  Gt as CashflowOnboarding,
1106
- Bn as CashflowStore,
1107
- Mn as CashflowWidget
1101
+ zn as CashflowStore,
1102
+ $n as CashflowWidget
1108
1103
  };