@mx-cartographer/experiences 7.0.32-alpha-recurring-transactions-navigation-issue-ram1 → 7.0.32-alpha-recurring-transactions-navigation-issue-ram2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,91 +1,91 @@
1
- import { jsx as e, jsxs as o, Fragment as Y } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as i, Fragment as j } from "react/jsx-runtime";
2
2
  import h from "react";
3
- import { observer as D } from "mobx-react-lite";
4
- import { endOfMonth as B } from "date-fns/endOfMonth";
5
- import { endOfToday as le } from "date-fns/endOfToday";
6
- import { startOfMonth as W } from "date-fns/startOfMonth";
7
- import { startOfToday as de } from "date-fns/startOfToday";
8
- import { subDays as ue } from "date-fns/subDays";
9
- import oe from "@mui/material/Skeleton";
10
- import c from "@mui/material/Stack";
11
- import { R as ze } from "../RecurringSettings-ClbdFNWX.mjs";
12
- import { M as An } from "../RecurringSettings-ClbdFNWX.mjs";
13
- import { addMonths as Be } from "date-fns/addMonths";
14
- import { subMonths as Ue } from "date-fns/subMonths";
15
- import { isBefore as Fe } from "date-fns/isBefore";
16
- import ae from "@mui/material/Unstable_Grid2";
17
- import Te from "@mui/material/IconButton";
18
- import De from "@mui/material/Tab";
19
- import je from "@mui/material/Tabs";
20
- import { Schedule as Ke, MonetizationOn as Ye, Cancel as Le, CheckCircle as Ae, ChevronLeft as Ve, ChevronRight as Xe, CurrencyExchange as Ze } from "@mxenabled/mx-icons";
21
- import { Text as g, MerchantLogo as me, InstitutionLogo as qe, H3 as Je, P as se } from "@mxenabled/mxui";
22
- import { getWeeksInMonth as Se } from "date-fns/getWeeksInMonth";
23
- import pe from "@mui/material/styles/useTheme";
3
+ import { observer as R } from "mobx-react-lite";
4
+ import { endOfMonth as z } from "date-fns/endOfMonth";
5
+ import { endOfToday as de } from "date-fns/endOfToday";
6
+ import { startOfMonth as k } from "date-fns/startOfMonth";
7
+ import { startOfToday as ue } from "date-fns/startOfToday";
8
+ import { subDays as le } from "date-fns/subDays";
9
+ import ie from "@mui/material/Skeleton";
10
+ import s from "@mui/material/Stack";
11
+ import { R as He } from "../RecurringSettings-ClbdFNWX.mjs";
12
+ import { M as Nn } from "../RecurringSettings-ClbdFNWX.mjs";
13
+ import { addMonths as ze } from "date-fns/addMonths";
14
+ import { subMonths as Be } from "date-fns/subMonths";
15
+ import { isBefore as Ue } from "date-fns/isBefore";
16
+ import oe from "@mui/material/Unstable_Grid2";
17
+ import xe from "@mui/material/IconButton";
18
+ import Re from "@mui/material/Tab";
19
+ import Fe from "@mui/material/Tabs";
20
+ import { Schedule as qe, MonetizationOn as je, Cancel as Me, CheckCircle as Ne, ChevronLeft as Ke, ChevronRight as Ye, CurrencyExchange as Ve } from "@mxenabled/mx-icons";
21
+ import { Text as p, MerchantLogo as me, InstitutionLogo as Xe, H3 as Je, P as ce } from "@mxenabled/mxui";
22
+ import { getWeeksInMonth as Ge } from "date-fns/getWeeksInMonth";
23
+ import fe from "@mui/material/styles/useTheme";
24
24
  import { AdapterDateFns as Qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
25
25
  import { DateCalendar as et } from "@mui/x-date-pickers/DateCalendar";
26
26
  import { LocalizationProvider as tt } from "@mui/x-date-pickers/LocalizationProvider";
27
27
  import { isSameDay as nt } from "date-fns/isSameDay";
28
- import it from "@mui/material/Badge";
28
+ import at from "@mui/material/Badge";
29
29
  import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
30
- import { I as V } from "../IconBacking-B9oC6uL2.mjs";
31
- import { u as S, a as X, i as v, f as Z, p as Ee, c as ge, g as he } from "../hooks-DlI63qSB.mjs";
32
- import { c as M, a as T, g as Ie, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
33
- import { T as H } from "../RecurringTransactionsStore-D62XJtdL.mjs";
34
- import { R as Gn } from "../RecurringTransactionsStore-D62XJtdL.mjs";
35
- import { A as w, W as at } from "../WidgetContainer-CBpf3h1Y.mjs";
36
- import st from "@mui/material/Button";
37
- import ce from "@mui/material/Divider";
38
- import _e from "@mui/material/List";
39
- import Ge from "@mui/material/ListItem";
40
- import ct from "@mui/material/ListSubheader";
41
- import lt from "@mui/material/ListItemAvatar";
42
- import dt from "@mui/material/ListItemButton";
43
- import ut from "@mui/material/ListItemText";
30
+ import { I as K } from "../IconBacking-B9oC6uL2.mjs";
31
+ import { u as G, a as Y, i as _, f as V, p as ve, c as pe, g as ge } from "../hooks-DlI63qSB.mjs";
32
+ import { c as A, a as x, g as Ie, f as it } from "../RepeatingTransaction-BW4J-jeJ.mjs";
33
+ import { T as $ } from "../RecurringTransactionsStore-D62XJtdL.mjs";
34
+ import { R as Ln } from "../RecurringTransactionsStore-D62XJtdL.mjs";
35
+ import { A as S, W as ot } from "../WidgetContainer-CBpf3h1Y.mjs";
36
+ import ct from "@mui/material/Button";
37
+ import se from "@mui/material/Divider";
38
+ import we from "@mui/material/List";
39
+ import Le from "@mui/material/ListItem";
40
+ import st from "@mui/material/ListSubheader";
41
+ import dt from "@mui/material/ListItemAvatar";
42
+ import ut from "@mui/material/ListItemButton";
43
+ import lt from "@mui/material/ListItemText";
44
44
  import { b as mt } from "../ManageIncome-Byw3lVtR.mjs";
45
- import { c as On, M as kn, S as Wn } from "../ManageIncome-Byw3lVtR.mjs";
46
- import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
47
- import { D as Ne } from "../Drawer-kEE73B87.mjs";
45
+ import { c as On, M as Pn, S as kn } from "../ManageIncome-Byw3lVtR.mjs";
46
+ import { f as M } from "../NumberFormatting-CtWHhyBX.mjs";
47
+ import { D as Ee } from "../Drawer-kEE73B87.mjs";
48
48
  import { b as O } from "../Localization-2MODESHW.mjs";
49
- import { f as A, D as E } from "../Dialog-CWW597AF.mjs";
50
- import k from "@mui/material/Box";
49
+ import { f as N, D as v } from "../Dialog-CWW597AF.mjs";
50
+ import P from "@mui/material/Box";
51
51
  import { S as Oe } from "../StatusBar-BK_uYHAB.mjs";
52
- import { u as fe } from "../useScreenSize-B6JyS_Lj.mjs";
53
- import { L as K } from "../Loader-DUaFpDGv.mjs";
54
- import { M as pt } from "../MiniWidgetContainer-BzW7V_04.mjs";
55
- import { u as gt } from "../useDimensions-27p2evRx.mjs";
56
- import { M as ht } from "../MicroWidgetContainer-DPDsZIiS.mjs";
57
- const q = {
52
+ import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
53
+ import { L as q } from "../Loader-DUaFpDGv.mjs";
54
+ import { M as ft } from "../MiniWidgetContainer-BzW7V_04.mjs";
55
+ import { u as pt } from "../useDimensions-27p2evRx.mjs";
56
+ import { M as gt } from "../MicroWidgetContainer-DPDsZIiS.mjs";
57
+ const X = {
58
58
  gridRow: 1,
59
59
  gridColumn: 1,
60
60
  zIndex: 2
61
- }, J = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, xe = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Ke, { color: "primary", filled: !0, sx: { fontSize: n, ...q } }) }), ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(
62
- Ye,
61
+ }, J = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(qe, { color: "primary", filled: !0, sx: { fontSize: n, ...X } }) }), ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(
62
+ je,
63
63
  {
64
64
  filled: !0,
65
- sx: { color: "categories.income", fontSize: n, ...q }
65
+ sx: { color: "categories.income", fontSize: n, ...X }
66
66
  }
67
- ) }), Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Le, { color: "error", filled: !0, sx: { fontSize: n, ...q } }) }), be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(V, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Ae, { color: "success", filled: !0, sx: { fontSize: n, ...q } }) }), ft = D(
68
- ({ day: t, outsideCurrentMonth: n, ...i }) => {
69
- const { recurring: a } = S(), { selectedAccountGuids: r } = X(), { recurrences: l, setSelectedDay: p } = v(), s = h.useMemo(
70
- () => l.filter((d) => r.includes(d.accountGuid)),
71
- [r, l]
67
+ ) }), Te = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Me, { color: "error", filled: !0, sx: { fontSize: n, ...X } }) }), Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(K, { size: n, sx: { ...J(t) }, children: /* @__PURE__ */ e(Ne, { color: "success", filled: !0, sx: { fontSize: n, ...X } }) }), ht = R(
68
+ ({ day: t, outsideCurrentMonth: n, ...a }) => {
69
+ const { recurring: o } = G(), { selectedAccountGuids: r } = Y(), { recurrences: d, setSelectedDay: f } = _(), c = h.useMemo(
70
+ () => d.filter((u) => r.includes(u.accountGuid)),
71
+ [r, d]
72
72
  ).filter(
73
- (d) => nt(d.occurredOnDate || d.expectedDate, t)
74
- ), m = s.some(
75
- (d) => d.type !== M.Income && d.status === T.Upcoming
76
- ), f = s.some(
77
- (d) => d.type !== M.Income && d.status === T.Missed
78
- ), x = s.some(
79
- (d) => d.type !== M.Income && d.status === T.Paid
80
- ), C = s.some((d) => d.type === M.Income), y = (m ? 1 : 0) + (f ? 1 : 0) + (x ? 1 : 0) + (C ? 1 : 0);
73
+ (u) => nt(u.occurredOnDate || u.expectedDate, t)
74
+ ), l = c.some(
75
+ (u) => u.type !== A.Income && u.status === x.Upcoming
76
+ ), g = c.some(
77
+ (u) => u.type !== A.Income && u.status === x.Missed
78
+ ), b = c.some(
79
+ (u) => u.type !== A.Income && u.status === x.Paid
80
+ ), T = c.some((u) => u.type === A.Income), y = (l ? 1 : 0) + (g ? 1 : 0) + (b ? 1 : 0) + (T ? 1 : 0);
81
81
  return /* @__PURE__ */ e(
82
- it,
82
+ at,
83
83
  {
84
- badgeContent: s.length > 0 && /* @__PURE__ */ o(Y, { children: [
85
- f && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
86
- x && /* @__PURE__ */ e(be, { isOffset: !0 }),
87
- m && /* @__PURE__ */ e(xe, { isOffset: !0 }),
88
- C && /* @__PURE__ */ e(ye, { isOffset: !0 })
84
+ badgeContent: c.length > 0 && /* @__PURE__ */ i(j, { children: [
85
+ g && /* @__PURE__ */ e(Te, { isOffset: !0 }),
86
+ b && /* @__PURE__ */ e(Ce, { isOffset: !0 }),
87
+ l && /* @__PURE__ */ e(be, { isOffset: !0 }),
88
+ T && /* @__PURE__ */ e(ye, { isOffset: !0 })
89
89
  ] }),
90
90
  overlap: "circular",
91
91
  sx: {
@@ -99,12 +99,12 @@ const q = {
99
99
  rt,
100
100
  {
101
101
  "aria-label": `
102
- ${x && a.paid},
103
- ${f && a.missed},
104
- ${m && a.upcoming},
105
- ${C && a.income}`,
102
+ ${b && o.paid},
103
+ ${g && o.missed},
104
+ ${l && o.upcoming},
105
+ ${T && o.income}`,
106
106
  day: t,
107
- onClick: () => p(t),
107
+ onClick: () => f(t),
108
108
  outsideCurrentMonth: n,
109
109
  sx: {
110
110
  "&.MuiPickersDay-root": {
@@ -113,19 +113,19 @@ const q = {
113
113
  }
114
114
  }
115
115
  },
116
- ...i
116
+ ...a
117
117
  }
118
118
  )
119
119
  }
120
120
  );
121
121
  }
122
- ), j = ({ icon: t, label: n }) => /* @__PURE__ */ o(c, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
122
+ ), F = ({ icon: t, label: n }) => /* @__PURE__ */ i(s, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
123
123
  /* @__PURE__ */ e(t, {}),
124
- /* @__PURE__ */ e(g, { variant: "XSmall", children: n })
125
- ] }), xt = D(() => {
126
- const { recurring: t } = S();
127
- return /* @__PURE__ */ o(
128
- c,
124
+ /* @__PURE__ */ e(p, { variant: "XSmall", children: n })
125
+ ] }), bt = R(() => {
126
+ const { recurring: t } = G();
127
+ return /* @__PURE__ */ i(
128
+ s,
129
129
  {
130
130
  alignItems: "center",
131
131
  "aria-hidden": !0,
@@ -134,29 +134,29 @@ const q = {
134
134
  justifyContent: "center",
135
135
  mt: 12,
136
136
  children: [
137
- /* @__PURE__ */ e(j, { icon: xe, label: t.expense }),
138
- /* @__PURE__ */ e(j, { icon: ye, label: t.income }),
139
- /* @__PURE__ */ e(j, { icon: Ce, label: t.missed }),
140
- /* @__PURE__ */ e(j, { icon: be, label: t.paid })
137
+ /* @__PURE__ */ e(F, { icon: be, label: t.expense }),
138
+ /* @__PURE__ */ e(F, { icon: ye, label: t.income }),
139
+ /* @__PURE__ */ e(F, { icon: Te, label: t.missed }),
140
+ /* @__PURE__ */ e(F, { icon: Ce, label: t.paid })
141
141
  ]
142
142
  }
143
143
  );
144
- }), we = 58, ke = D(() => {
145
- const t = pe(), { onEvent: n } = Z(), { selectedDay: i, setDateRange: a } = v(), [r, l] = h.useState(
146
- Se(/* @__PURE__ */ new Date()) * H + we
147
- ), p = (s) => {
148
- l(Se(s) * H + we), a({
149
- start: W(s),
150
- end: B(s)
151
- }), n(w.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
152
- }, u = /* @__PURE__ */ e(
144
+ }), Se = 58, Pe = R(() => {
145
+ const t = fe(), { onEvent: n } = V(), { selectedDay: a, setDateRange: o } = _(), [r, d] = h.useState(
146
+ Ge(/* @__PURE__ */ new Date()) * $ + Se
147
+ ), f = (c) => {
148
+ d(Ge(c) * $ + Se), o({
149
+ start: k(c),
150
+ end: z(c)
151
+ }), n(S.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
152
+ }, m = /* @__PURE__ */ e(
153
153
  et,
154
154
  {
155
- minDate: W(/* @__PURE__ */ new Date()),
156
- onMonthChange: p,
155
+ minDate: k(/* @__PURE__ */ new Date()),
156
+ onMonthChange: f,
157
157
  showDaysOutsideCurrentMonth: !0,
158
158
  slots: {
159
- day: ft
159
+ day: ht
160
160
  },
161
161
  sx: {
162
162
  "& .MuiPickersArrowSwitcher-button": {
@@ -184,11 +184,11 @@ const q = {
184
184
  minHeight: r
185
185
  },
186
186
  "&.MuiDateCalendar-root": {
187
- minHeight: r + H
187
+ minHeight: r + $
188
188
  },
189
189
  "& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
190
- height: H,
191
- width: H,
190
+ height: $,
191
+ width: $,
192
192
  margin: 0
193
193
  },
194
194
  "& .MuiDayCalendar-weekDayLabel": {
@@ -196,104 +196,104 @@ const q = {
196
196
  fontSize: t.typography.body2.fontSize
197
197
  }
198
198
  },
199
- value: i,
199
+ value: a,
200
200
  views: ["day"]
201
201
  }
202
202
  );
203
- return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(tt, { dateAdapter: Qe, children: [
204
- i && u,
205
- !i && u,
206
- /* @__PURE__ */ e(xt, {})
203
+ return /* @__PURE__ */ e(s, { justifyContent: "center", children: /* @__PURE__ */ i(tt, { dateAdapter: Qe, children: [
204
+ a && m,
205
+ !a && m,
206
+ /* @__PURE__ */ e(bt, {})
207
207
  ] }) });
208
208
  }), yt = (t) => {
209
- if (t.type === M.Income)
209
+ if (t.type === A.Income)
210
210
  return /* @__PURE__ */ e(ye, {});
211
211
  switch (t.status) {
212
- case T.Missed:
212
+ case x.Missed:
213
+ return /* @__PURE__ */ e(Te, {});
214
+ case x.Paid:
213
215
  return /* @__PURE__ */ e(Ce, {});
214
- case T.Paid:
215
- return /* @__PURE__ */ e(be, {});
216
216
  default:
217
- return /* @__PURE__ */ e(xe, {});
217
+ return /* @__PURE__ */ e(be, {});
218
218
  }
219
- }, Ct = (t, n) => {
219
+ }, Tt = (t, n) => {
220
220
  switch (t.status) {
221
- case T.Paid:
221
+ case x.Paid:
222
222
  return t.expectedDate ? O(
223
223
  n.paid_on,
224
- A(
224
+ N(
225
225
  t.occurredOnDate || t.expectedDate,
226
- E.MONTH_DAY
226
+ v.MONTH_DAY
227
227
  )
228
228
  ) : n.paid;
229
- case T.Missed:
229
+ case x.Missed:
230
230
  return O(
231
231
  n.missed_on,
232
- A(t.expectedDate, E.MONTH_DAY)
232
+ N(t.expectedDate, v.MONTH_DAY)
233
233
  );
234
- case T.Upcoming:
234
+ case x.Upcoming:
235
235
  return O(
236
236
  n.upcoming_on,
237
- A(t.expectedDate, E.MONTH_DAY)
237
+ N(t.expectedDate, v.MONTH_DAY)
238
238
  );
239
239
  default:
240
240
  return n.unknown;
241
241
  }
242
- }, ve = ({
242
+ }, _e = ({
243
243
  recurrence: t,
244
244
  isMini: n = !1,
245
- onRecurrenceClick: i = () => {
245
+ onRecurrenceClick: a = () => {
246
246
  },
247
- showOrdinal: a = !1
247
+ showOrdinal: o = !1
248
248
  }) => {
249
- const { recurring: r } = S(), { repeatingTransactions: l } = v(), [p, u] = h.useState(!1), s = h.useMemo(
250
- () => l.find((R) => R.guid === t.repeatingTransactionGuid),
251
- [t, l]
252
- ), m = t.type === M.Income, f = t.status === T.Paid, x = t.status === T.Missed, C = t.status === T.Upcoming;
249
+ const { recurring: r } = G(), { repeatingTransactions: d } = _(), [f, m] = h.useState(!1), c = h.useMemo(
250
+ () => d.find((D) => D.guid === t.repeatingTransactionGuid),
251
+ [t, d]
252
+ ), l = t.type === A.Income, g = t.status === x.Paid, b = t.status === x.Missed, T = t.status === x.Upcoming;
253
253
  let y = r.paid?.toLowerCase();
254
- return x ? y = r.missed?.toLowerCase() : C && (y = a ? Ie(r, s || {}, !0) : Ie(r, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
255
- /* @__PURE__ */ o(Ge, { disableGutters: !0, disablePadding: !0, children: [
256
- /* @__PURE__ */ o(dt, { onClick: () => {
257
- u(!0), i(t);
254
+ return b ? y = r.missed?.toLowerCase() : T && (y = o ? Ie(r, c || {}, !0) : Ie(r, c || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
255
+ /* @__PURE__ */ i(Le, { disableGutters: !0, disablePadding: !0, children: [
256
+ /* @__PURE__ */ i(ut, { onClick: () => {
257
+ m(!0), a(t);
258
258
  }, children: [
259
- /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(
259
+ /* @__PURE__ */ e(dt, { children: /* @__PURE__ */ e(
260
260
  me,
261
261
  {
262
262
  categoryGuid: t.categoryGuid,
263
263
  merchantGuid: t.merchantGuid
264
264
  }
265
265
  ) }),
266
- /* @__PURE__ */ e(ut, { children: /* @__PURE__ */ o(
267
- c,
266
+ /* @__PURE__ */ e(lt, { children: /* @__PURE__ */ i(
267
+ s,
268
268
  {
269
269
  direction: "row",
270
270
  gap: 4,
271
271
  sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
272
272
  children: [
273
- /* @__PURE__ */ o(c, { direction: "column", width: "50%", children: [
274
- /* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: t.name }),
275
- /* @__PURE__ */ e(c, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
273
+ /* @__PURE__ */ i(s, { direction: "column", width: "50%", children: [
274
+ /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: t.name }),
275
+ /* @__PURE__ */ e(s, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ i(s, { direction: "row", gap: 4, children: [
276
276
  yt(t),
277
- /* @__PURE__ */ e(g, { variant: "caption", children: Ct(t, r) })
278
- ] }) : /* @__PURE__ */ o(Y, { children: [
277
+ /* @__PURE__ */ e(p, { variant: "caption", children: Tt(t, r) })
278
+ ] }) : /* @__PURE__ */ i(j, { children: [
279
279
  t.institutionGuid && /* @__PURE__ */ e(
280
- qe,
280
+ Xe,
281
281
  {
282
282
  alt: t.institutionName,
283
283
  institutionGuid: t.institutionGuid,
284
284
  size: 12
285
285
  }
286
286
  ),
287
- /* @__PURE__ */ e(g, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
287
+ /* @__PURE__ */ e(p, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
288
288
  ] }) })
289
289
  ] }),
290
- /* @__PURE__ */ o(c, { alignItems: "flex-end", width: "100%", children: [
291
- /* @__PURE__ */ o(g, { bold: !0, color: m ? "success.main" : "text.primary", variant: "body1", children: [
292
- m ? "+" : "",
293
- L(t.amount, "0,0.00")
290
+ /* @__PURE__ */ i(s, { alignItems: "flex-end", width: "100%", children: [
291
+ /* @__PURE__ */ i(p, { bold: !0, color: l ? "success.main" : "text.primary", variant: "body1", children: [
292
+ l ? "+" : "",
293
+ M(t.amount, "0,0.00")
294
294
  ] }),
295
- !n && /* @__PURE__ */ o(
296
- c,
295
+ !n && /* @__PURE__ */ i(
296
+ s,
297
297
  {
298
298
  direction: "row",
299
299
  sx: {
@@ -304,9 +304,9 @@ const q = {
304
304
  width: "100%"
305
305
  },
306
306
  children: [
307
- f && /* @__PURE__ */ e(Ae, { color: "success", filled: !0, size: 12 }),
308
- x && /* @__PURE__ */ e(Le, { color: "error", filled: !0, size: 12 }),
309
- /* @__PURE__ */ e(g, { bold: !0, color: "text.secondary", variant: "caption", children: y })
307
+ g && /* @__PURE__ */ e(Ne, { color: "success", filled: !0, size: 12 }),
308
+ b && /* @__PURE__ */ e(Me, { color: "error", filled: !0, size: 12 }),
309
+ /* @__PURE__ */ e(p, { bold: !0, color: "text.secondary", variant: "caption", children: y })
310
310
  ]
311
311
  }
312
312
  )
@@ -316,239 +316,506 @@ const q = {
316
316
  ) })
317
317
  ] }),
318
318
  /* @__PURE__ */ e(
319
- Ne,
319
+ Ee,
320
320
  {
321
321
  ariaLabelClose: r.close_drawer_aria,
322
- isOpen: p,
323
- onClose: () => u(!1),
324
- title: t.type === M.Income ? r.income_details : r.expense_details,
325
- children: s && /* @__PURE__ */ e(
322
+ isOpen: f,
323
+ onClose: () => m(!1),
324
+ title: t.type === A.Income ? r.income_details : r.expense_details,
325
+ children: c && /* @__PURE__ */ e(
326
326
  mt,
327
327
  {
328
- onDeleted: () => u(!1),
329
- recurringTransaction: s
328
+ onDeleted: () => m(!1),
329
+ recurringTransaction: c
330
330
  }
331
331
  )
332
332
  }
333
333
  )
334
334
  ] });
335
- }, z = D(
335
+ }, H = R(
336
336
  ({
337
337
  recurrences: t,
338
338
  isMini: n = !1,
339
- onResetClick: i,
340
- onRecurrenceClick: a,
339
+ onResetClick: a,
340
+ onRecurrenceClick: o,
341
341
  sx: r = {},
342
- title: l
342
+ title: d
343
343
  }) => {
344
- const { recurring: p } = S(), u = h.useMemo(() => ot(t), [t]);
345
- return console.log(t, "recurrences"), console.log(u, "grouped recurrences"), /* @__PURE__ */ o(c, { sx: { gap: 8, mt: 4, ...r }, children: [
346
- l && /* @__PURE__ */ o(
347
- c,
344
+ const { recurring: f } = G(), m = h.useMemo(() => it(t), [t]);
345
+ console.log(t, "recurrences"), console.log(m, "grouped recurrences");
346
+ const c = [
347
+ {
348
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
349
+ id: "date-2025-10-01",
350
+ recurrences: [
351
+ {
352
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
353
+ amount: 73,
354
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
355
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
356
+ frequency: 3,
357
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
358
+ institutionName: "Gringotts Mortgage *1568",
359
+ merchantGuid: "",
360
+ name: "Interest Charge",
361
+ recurrenceDay: 1,
362
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
363
+ secondRecurrenceDay: 15,
364
+ status: 2,
365
+ type: 0
366
+ }
367
+ ]
368
+ },
369
+ {
370
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
371
+ id: "date-2025-10-02",
372
+ recurrences: [
373
+ {
374
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
375
+ amount: 73,
376
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
377
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
378
+ frequency: 3,
379
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
380
+ institutionName: "Gringotts Mortgage *1568",
381
+ merchantGuid: "",
382
+ name: "Interest Charge",
383
+ recurrenceDay: 1,
384
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
385
+ secondRecurrenceDay: 15,
386
+ status: 2,
387
+ type: 0
388
+ }
389
+ ]
390
+ },
391
+ {
392
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
393
+ id: "date-2025-10-03",
394
+ recurrences: [
395
+ {
396
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
397
+ amount: 73,
398
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
399
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
400
+ frequency: 3,
401
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
402
+ institutionName: "Gringotts Mortgage *1568",
403
+ merchantGuid: "",
404
+ name: "Interest Charge",
405
+ recurrenceDay: 1,
406
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
407
+ secondRecurrenceDay: 15,
408
+ status: 2,
409
+ type: 0
410
+ }
411
+ ]
412
+ },
413
+ {
414
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
415
+ id: "date-2025-10-04",
416
+ recurrences: [
417
+ {
418
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
419
+ amount: 73,
420
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
421
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
422
+ frequency: 3,
423
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
424
+ institutionName: "Gringotts Mortgage *1568",
425
+ merchantGuid: "",
426
+ name: "Interest Charge",
427
+ recurrenceDay: 1,
428
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
429
+ secondRecurrenceDay: 15,
430
+ status: 2,
431
+ type: 0
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
437
+ id: "date-2025-10-05",
438
+ recurrences: [
439
+ {
440
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
441
+ amount: 73,
442
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
443
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
444
+ frequency: 3,
445
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
446
+ institutionName: "Gringotts Mortgage *1568",
447
+ merchantGuid: "",
448
+ name: "Interest Charge",
449
+ recurrenceDay: 1,
450
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
451
+ secondRecurrenceDay: 15,
452
+ status: 2,
453
+ type: 0
454
+ }
455
+ ]
456
+ },
457
+ {
458
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
459
+ id: "date-2025-10-06",
460
+ recurrences: [
461
+ {
462
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
463
+ amount: 73,
464
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
465
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
466
+ frequency: 3,
467
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
468
+ institutionName: "Gringotts Mortgage *1568",
469
+ merchantGuid: "",
470
+ name: "Interest Charge",
471
+ recurrenceDay: 1,
472
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
473
+ secondRecurrenceDay: 15,
474
+ status: 2,
475
+ type: 0
476
+ }
477
+ ]
478
+ },
479
+ {
480
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
481
+ id: "date-2025-10-07",
482
+ recurrences: [
483
+ {
484
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
485
+ amount: 73,
486
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
487
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
488
+ frequency: 3,
489
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
490
+ institutionName: "Gringotts Mortgage *1568",
491
+ merchantGuid: "",
492
+ name: "Interest Charge",
493
+ recurrenceDay: 1,
494
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
495
+ secondRecurrenceDay: 15,
496
+ status: 2,
497
+ type: 0
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
503
+ id: "date-2025-10-08",
504
+ recurrences: [
505
+ {
506
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
507
+ amount: 73,
508
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
509
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
510
+ frequency: 3,
511
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
512
+ institutionName: "Gringotts Mortgage *1568",
513
+ merchantGuid: "",
514
+ name: "Interest Charge",
515
+ recurrenceDay: 1,
516
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
517
+ secondRecurrenceDay: 15,
518
+ status: 2,
519
+ type: 0
520
+ }
521
+ ]
522
+ },
523
+ {
524
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
525
+ id: "date-2025-10-09",
526
+ recurrences: [
527
+ {
528
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
529
+ amount: 73,
530
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
531
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
532
+ frequency: 3,
533
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
534
+ institutionName: "Gringotts Mortgage *1568",
535
+ merchantGuid: "",
536
+ name: "Interest Charge",
537
+ recurrenceDay: 1,
538
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
539
+ secondRecurrenceDay: 15,
540
+ status: 2,
541
+ type: 0
542
+ }
543
+ ]
544
+ },
545
+ {
546
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
547
+ id: "date-2025-10-10",
548
+ recurrences: [
549
+ {
550
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
551
+ amount: 73,
552
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
553
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
554
+ frequency: 3,
555
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
556
+ institutionName: "Gringotts Mortgage *1568",
557
+ merchantGuid: "",
558
+ name: "Interest Charge",
559
+ recurrenceDay: 1,
560
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
561
+ secondRecurrenceDay: 15,
562
+ status: 2,
563
+ type: 0
564
+ }
565
+ ]
566
+ },
567
+ {
568
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
569
+ id: "date-2025-10-11",
570
+ recurrences: [
571
+ {
572
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
573
+ amount: 73,
574
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
575
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
576
+ frequency: 3,
577
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
578
+ institutionName: "Gringotts Mortgage *1568",
579
+ merchantGuid: "",
580
+ name: "Interest Charge",
581
+ recurrenceDay: 1,
582
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
583
+ secondRecurrenceDay: 15,
584
+ status: 2,
585
+ type: 0
586
+ }
587
+ ]
588
+ },
589
+ {
590
+ date: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
591
+ id: "date-2025-10-12",
592
+ recurrences: [
593
+ {
594
+ accountGuid: "ACT-33b06fa7-74ad-4819-9d25-fd21ae2db370",
595
+ amount: 73,
596
+ categoryGuid: "CAT-5dab8347-e0b4-daf9-0a65-f2be80feb8ad",
597
+ expectedDate: /* @__PURE__ */ new Date("2025-09-29T18:30:00.000Z"),
598
+ frequency: 3,
599
+ institutionGuid: "INS-f1a3285d-e855-b68f-6aa7-8ae775c0e0e9",
600
+ institutionName: "Gringotts Mortgage *1568",
601
+ merchantGuid: "",
602
+ name: "Interest Charge",
603
+ recurrenceDay: 1,
604
+ repeatingTransactionGuid: "RPT-3a9931fd-cd93-4197-a515-697f180bf531",
605
+ secondRecurrenceDay: 15,
606
+ status: 2,
607
+ type: 0
608
+ }
609
+ ]
610
+ }
611
+ ];
612
+ return /* @__PURE__ */ i(s, { sx: { gap: 8, mt: 4, ...r }, children: [
613
+ d && /* @__PURE__ */ i(
614
+ s,
348
615
  {
349
616
  sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
350
617
  children: [
351
- /* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: l }),
352
- i && /* @__PURE__ */ e(st, { onClick: i, sx: { mt: -12 }, variant: "text", children: p.reset })
618
+ /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: d }),
619
+ a && /* @__PURE__ */ e(ct, { onClick: a, sx: { mt: -12 }, variant: "text", children: f.reset })
353
620
  ]
354
621
  }
355
622
  ),
356
- t.length === 0 ? /* @__PURE__ */ e(g, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: p.no_activities }) : /* @__PURE__ */ e(_e, { children: n ? t.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
623
+ c.length === 0 ? /* @__PURE__ */ e(p, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: f.no_activities }) : /* @__PURE__ */ e(we, { children: n ? t.map((l, g) => /* @__PURE__ */ i(h.Fragment, { children: [
357
624
  /* @__PURE__ */ e(
358
- ve,
625
+ _e,
359
626
  {
360
627
  isMini: n,
361
- onRecurrenceClick: a,
362
- recurrence: s
628
+ onRecurrenceClick: o,
629
+ recurrence: l
363
630
  }
364
631
  ),
365
- /* @__PURE__ */ e(ce, { sx: { mx: 24 } })
366
- ] }, `recurrence-${m}`)) : u.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
367
- /* @__PURE__ */ e(Ge, { children: /* @__PURE__ */ e(
368
- _e,
632
+ /* @__PURE__ */ e(se, { sx: { mx: 24 } })
633
+ ] }, `recurrence-${g}`)) : c.map((l, g) => /* @__PURE__ */ i(h.Fragment, { children: [
634
+ /* @__PURE__ */ e(Le, { children: /* @__PURE__ */ e(
635
+ we,
369
636
  {
370
- subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
637
+ subheader: /* @__PURE__ */ e(st, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: N(l.date, v.DAY_OF_WEEK_MONTH_DAY) }) }),
371
638
  sx: { width: "100%" },
372
- children: s.recurrences.map((f, x) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
373
- ve,
639
+ children: l.recurrences.map((b, T) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
640
+ _e,
374
641
  {
375
642
  isMini: n,
376
- onRecurrenceClick: a,
377
- recurrence: f
643
+ onRecurrenceClick: o,
644
+ recurrence: b
378
645
  }
379
- ) }, `day-recurrence-${x}`))
646
+ ) }, `day-recurrence-${T}`))
380
647
  }
381
- ) }, s.id),
382
- /* @__PURE__ */ e(ce, { sx: { mx: 24 } })
383
- ] }, `recurrence-${m}`)) })
648
+ ) }, l.id),
649
+ /* @__PURE__ */ e(se, { sx: { mx: 24 } })
650
+ ] }, `recurrence-${g}`)) })
384
651
  ] });
385
652
  }
386
- ), Me = D(
387
- ({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming: p }) => {
388
- const u = pe(), { isSmallMobile: s } = fe(), { recurring: m } = S(), f = h.useMemo(() => {
389
- const x = [{ color: u.palette.success.main, percentage: `${a / t}` }];
390
- return i && x.push({ color: u.palette.error.main, percentage: `${i / t}` }), x;
391
- }, [a, t, i]);
392
- return /* @__PURE__ */ o(c, { children: [
393
- /* @__PURE__ */ o(c, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
394
- /* @__PURE__ */ e(g, { bold: !0, variant: "body1", children: `${r} (${l})` }),
395
- /* @__PURE__ */ e(g, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
653
+ ), Ae = R(
654
+ ({ expected: t, isExpense: n = !0, missed: a, paid: o, title: r, total: d, upcoming: f }) => {
655
+ const m = fe(), { isSmallMobile: c } = he(), { recurring: l } = G(), g = h.useMemo(() => {
656
+ const b = [{ color: m.palette.success.main, percentage: `${o / t}` }];
657
+ return a && b.push({ color: m.palette.error.main, percentage: `${a / t}` }), b;
658
+ }, [o, t, a]);
659
+ return /* @__PURE__ */ i(s, { children: [
660
+ /* @__PURE__ */ i(s, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
661
+ /* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${r} (${d})` }),
662
+ /* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${M(t, "0,0.00")}` })
396
663
  ] }),
397
- /* @__PURE__ */ e(Oe, { data: f, height: 12 }),
398
- /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
399
- /* @__PURE__ */ e(k, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
400
- !s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(a, "0,0.00") }),
401
- /* @__PURE__ */ e(g, { variant: "caption", children: m.paid?.toLowerCase() }),
402
- i !== void 0 && /* @__PURE__ */ o(Y, { children: [
403
- /* @__PURE__ */ e(k, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
404
- !s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
405
- /* @__PURE__ */ e(g, { variant: "caption", children: m.missed?.toLowerCase() })
664
+ /* @__PURE__ */ e(Oe, { data: g, height: 12 }),
665
+ /* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
666
+ /* @__PURE__ */ e(P, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
667
+ !c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(o, "0,0.00") }),
668
+ /* @__PURE__ */ e(p, { variant: "caption", children: l.paid?.toLowerCase() }),
669
+ a !== void 0 && /* @__PURE__ */ i(j, { children: [
670
+ /* @__PURE__ */ e(P, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
671
+ !c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(a, "0,0.00") }),
672
+ /* @__PURE__ */ e(p, { variant: "caption", children: l.missed?.toLowerCase() })
406
673
  ] }),
407
- /* @__PURE__ */ e(k, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
408
- !s && /* @__PURE__ */ e(g, { bold: !0, variant: "body2", children: L(p, "0,0.00") }),
409
- /* @__PURE__ */ e(g, { variant: "caption", children: m.upcoming })
674
+ /* @__PURE__ */ e(P, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
675
+ !c && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: M(f, "0,0.00") }),
676
+ /* @__PURE__ */ e(p, { variant: "caption", children: l.upcoming })
410
677
  ] })
411
678
  ] });
412
679
  }
413
- ), bt = D(() => {
414
- const { recurring: t } = S(), { availableWidth: n } = Ee(), { isDesktop: i, isSmallMobile: a } = fe(n), { onEvent: r } = Z(), {
415
- currentMonthExpenses: l,
416
- currentMonthIncome: p,
417
- dateRange: u,
418
- expenseTotal: s,
419
- incomeTotal: m,
420
- missedExpenseTotal: f,
421
- pastRecurrences: x,
422
- paidExpenseTotal: C,
680
+ ), Ct = R(() => {
681
+ const { recurring: t } = G(), { availableWidth: n } = ve(), { isDesktop: a, isSmallMobile: o } = he(n), { onEvent: r } = V(), {
682
+ currentMonthExpenses: d,
683
+ currentMonthIncome: f,
684
+ dateRange: m,
685
+ expenseTotal: c,
686
+ incomeTotal: l,
687
+ missedExpenseTotal: g,
688
+ pastRecurrences: b,
689
+ paidExpenseTotal: T,
423
690
  paidIncomeTotal: y,
424
- selectedDay: d,
425
- selectedDayRecurrences: R,
426
- setDateRange: G,
691
+ selectedDay: u,
692
+ selectedDayRecurrences: D,
693
+ setDateRange: L,
427
694
  upcomingExpenseTotal: Q,
428
695
  upcomingIncomeTotal: ee,
429
- upcomingRecurrences: U
430
- } = v(), [$, te] = h.useState(0), I = Fe(u.start, /* @__PURE__ */ new Date()), ne = (b, re) => {
696
+ upcomingRecurrences: B
697
+ } = _(), [W, te] = h.useState(0), I = Ue(m.start, /* @__PURE__ */ new Date()), ne = (C, re) => {
431
698
  te(re);
432
- }, _ = (b) => {
433
- r(w.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
434
- transaction_guid: b.transaction?.guid
699
+ }, w = (C) => {
700
+ r(S.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
701
+ transaction_guid: C.transaction?.guid
435
702
  });
436
- }, F = (b) => {
437
- r(w.RECURRING_TRANSACTIONS_CLICK_PAID, {
438
- transaction_guid: b.transaction?.guid
703
+ }, U = (C) => {
704
+ r(S.RECURRING_TRANSACTIONS_CLICK_PAID, {
705
+ transaction_guid: C.transaction?.guid
439
706
  });
440
- }, ie = () => {
441
- const b = Be(u.start, 1);
442
- G({
443
- start: W(b),
444
- end: B(b)
707
+ }, ae = () => {
708
+ const C = ze(m.start, 1);
709
+ L({
710
+ start: k(C),
711
+ end: z(C)
445
712
  });
446
- }, P = () => {
447
- const b = Ue(u.start, 1);
448
- G({
449
- start: W(b),
450
- end: B(b)
713
+ }, Z = () => {
714
+ const C = Be(m.start, 1);
715
+ L({
716
+ start: k(C),
717
+ end: z(C)
451
718
  });
452
719
  };
453
- return /* @__PURE__ */ o(
454
- ae,
720
+ return /* @__PURE__ */ i(
721
+ oe,
455
722
  {
456
723
  container: !0,
457
724
  sx: {
458
725
  pt: 16,
459
- px: i ? 48 : 24
726
+ px: a ? 48 : 24
460
727
  },
461
728
  children: [
462
- /* @__PURE__ */ e(ae, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ o(c, { sx: { gap: 16 }, children: [
463
- /* @__PURE__ */ o(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
729
+ /* @__PURE__ */ e(oe, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ i(s, { sx: { gap: 16 }, children: [
730
+ /* @__PURE__ */ i(s, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
464
731
  /* @__PURE__ */ e(Je, { children: O(
465
732
  t.header_title,
466
- A(u.start, E.MONTH_LONG)
733
+ N(m.start, v.MONTH_LONG)
467
734
  ) }),
468
- !i && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
735
+ !a && /* @__PURE__ */ i(s, { direction: "row", gap: 4, children: [
469
736
  /* @__PURE__ */ e(
470
- Te,
737
+ xe,
471
738
  {
472
739
  color: "primary",
473
740
  disabled: I,
474
- onClick: P,
475
- children: /* @__PURE__ */ e(Ve, {})
741
+ onClick: Z,
742
+ children: /* @__PURE__ */ e(Ke, {})
476
743
  }
477
744
  ),
478
- /* @__PURE__ */ e(Te, { color: "primary", onClick: ie, children: /* @__PURE__ */ e(Xe, {}) })
745
+ /* @__PURE__ */ e(xe, { color: "primary", onClick: ae, children: /* @__PURE__ */ e(Ye, {}) })
479
746
  ] })
480
747
  ] }),
481
748
  /* @__PURE__ */ e(
482
- Me,
749
+ Ae,
483
750
  {
484
- expected: s,
485
- missed: f,
486
- paid: C,
751
+ expected: c,
752
+ missed: g,
753
+ paid: T,
487
754
  title: t.expenses,
488
- total: l.length,
755
+ total: d.length,
489
756
  upcoming: Q
490
757
  }
491
758
  ),
492
759
  /* @__PURE__ */ e(
493
- Me,
760
+ Ae,
494
761
  {
495
- expected: m,
762
+ expected: l,
496
763
  isExpense: !1,
497
764
  paid: y,
498
765
  title: t.deposits,
499
- total: p.length,
766
+ total: f.length,
500
767
  upcoming: ee
501
768
  }
502
769
  ),
503
- i && /* @__PURE__ */ e(
504
- z,
770
+ a && /* @__PURE__ */ e(
771
+ H,
505
772
  {
506
- onRecurrenceClick: _,
507
- recurrences: U,
773
+ onRecurrenceClick: w,
774
+ recurrences: B,
508
775
  title: t.upcoming_activity
509
776
  }
510
777
  ),
511
- !i && /* @__PURE__ */ o(c, { children: [
512
- /* @__PURE__ */ o(je, { onChange: ne, value: $, variant: "fullWidth", children: [
778
+ !a && /* @__PURE__ */ i(s, { children: [
779
+ /* @__PURE__ */ i(Fe, { onChange: ne, value: W, variant: "fullWidth", children: [
513
780
  /* @__PURE__ */ e(
514
- De,
781
+ Re,
515
782
  {
516
- label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.upcoming : t.upcoming_activity })
783
+ label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.upcoming : t.upcoming_activity })
517
784
  }
518
785
  ),
519
786
  /* @__PURE__ */ e(
520
- De,
787
+ Re,
521
788
  {
522
- label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.past : t.past_transactions })
789
+ label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: o ? t.past : t.past_transactions })
523
790
  }
524
791
  )
525
792
  ] }),
526
- $ === 0 && /* @__PURE__ */ e(
527
- z,
793
+ W === 0 && /* @__PURE__ */ e(
794
+ H,
528
795
  {
529
- onRecurrenceClick: _,
530
- recurrences: U
796
+ onRecurrenceClick: w,
797
+ recurrences: B
531
798
  }
532
799
  ),
533
- $ === 1 && /* @__PURE__ */ e(
534
- z,
800
+ W === 1 && /* @__PURE__ */ e(
801
+ H,
535
802
  {
536
- onRecurrenceClick: F,
537
- recurrences: x
803
+ onRecurrenceClick: U,
804
+ recurrences: b
538
805
  }
539
806
  )
540
807
  ] })
541
808
  ] }) }),
542
- i && /* @__PURE__ */ e(ae, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(c, { gap: 24, children: [
543
- /* @__PURE__ */ e(ke, {}),
809
+ a && /* @__PURE__ */ e(oe, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ i(s, { gap: 24, children: [
810
+ /* @__PURE__ */ e(Pe, {}),
544
811
  /* @__PURE__ */ e(
545
- z,
812
+ H,
546
813
  {
547
- onRecurrenceClick: F,
548
- recurrences: R || x,
549
- title: d ? O(
814
+ onRecurrenceClick: U,
815
+ recurrences: D || b,
816
+ title: u ? O(
550
817
  t.day_transactions,
551
- A(d, E.MONTH_DAY)
818
+ N(u, v.MONTH_DAY)
552
819
  ) : t.past_transactions
553
820
  }
554
821
  )
@@ -556,124 +823,124 @@ const q = {
556
823
  ]
557
824
  }
558
825
  );
559
- }), _n = D(({ onBackClick: t, sx: n = {} }) => {
560
- const { accounts: i } = ge(), { recurring: a } = S(), { isCopyLoaded: r, isInitialized: l, selectedAccountGuids: p, setSelectedAccounts: u } = X(), { isDataLoaded: s, loadRepeatingTransactions: m, setDateRange: f } = v(), { setFilter: x } = he(), { onEvent: C } = Z(), { isMobile: y } = fe(), [d, R] = h.useState(!1);
826
+ }), wn = R(({ onBackClick: t, sx: n = {} }) => {
827
+ const { accounts: a } = pe(), { recurring: o } = G(), { isCopyLoaded: r, isInitialized: d, selectedAccountGuids: f, setSelectedAccounts: m } = Y(), { isDataLoaded: c, loadRepeatingTransactions: l, setDateRange: g } = _(), { setFilter: b } = ge(), { onEvent: T } = V(), { isMobile: y } = he(), [u, D] = h.useState(!1);
561
828
  return h.useEffect(() => {
562
- u(i);
563
- }, [i]), h.useEffect(() => {
564
- l && (x({
565
- dateRange: { start: ue(de(), 90), end: le() },
566
- accounts: p
567
- }), f({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), m().finally());
568
- }, [l]), r ? /* @__PURE__ */ o(
569
- at,
829
+ m(a);
830
+ }, [a]), h.useEffect(() => {
831
+ d && (b({
832
+ dateRange: { start: le(ue(), 90), end: de() },
833
+ accounts: f
834
+ }), g({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), l().finally());
835
+ }, [d]), r ? /* @__PURE__ */ i(
836
+ ot,
570
837
  {
571
- accountOptions: i,
838
+ accountOptions: a,
572
839
  actions: [
573
840
  {
574
- label: a.action_title,
841
+ label: o.action_title,
575
842
  iconName: "credit_card_gear",
576
843
  onClick: () => {
577
- R(!0), C(w.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
844
+ D(!0), T(S.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
578
845
  }
579
846
  }
580
847
  ],
581
848
  hasDivider: y,
582
- onAccountsFilterClick: () => C(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
849
+ onAccountsFilterClick: () => T(S.RECURRING_TRANSACTIONS_CLICK_FILTER),
583
850
  onBackClick: t,
584
851
  sx: n,
585
- title: a.title,
852
+ title: o.title,
586
853
  children: [
587
- l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ o(c, { direction: "column", p: 48, spacing: 24, children: [
588
- /* @__PURE__ */ e(oe, { height: 100, variant: "rounded", width: "100%" }),
589
- /* @__PURE__ */ e(oe, { height: 100, variant: "rounded", width: "100%" }),
590
- /* @__PURE__ */ e(oe, { height: 600, variant: "rounded", width: "100%" })
854
+ d && c ? /* @__PURE__ */ e(Ct, {}) : /* @__PURE__ */ i(s, { direction: "column", p: 48, spacing: 24, children: [
855
+ /* @__PURE__ */ e(ie, { height: 100, variant: "rounded", width: "100%" }),
856
+ /* @__PURE__ */ e(ie, { height: 100, variant: "rounded", width: "100%" }),
857
+ /* @__PURE__ */ e(ie, { height: 600, variant: "rounded", width: "100%" })
591
858
  ] }),
592
859
  /* @__PURE__ */ e(
593
- Ne,
860
+ Ee,
594
861
  {
595
- ariaLabelClose: a.close_drawer_aria,
596
- isOpen: d,
597
- onClose: () => R(!1),
862
+ ariaLabelClose: o.close_drawer_aria,
863
+ isOpen: u,
864
+ onClose: () => D(!1),
598
865
  shouldShowHeaderBorders: !1,
599
- title: a.action_title,
600
- children: /* @__PURE__ */ e(ze, {})
866
+ title: o.action_title,
867
+ children: /* @__PURE__ */ e(He, {})
601
868
  }
602
869
  )
603
870
  ]
604
871
  }
605
- ) : /* @__PURE__ */ e(K, {});
606
- }), Rt = D(() => {
607
- const { recurring: t } = S(), { availableWidth: n } = Ee(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: r, upcomingRecurrences: l } = v(), p = n < 750;
608
- return /* @__PURE__ */ o(c, { flexDirection: p ? "column" : "row", width: "100%", children: [
609
- /* @__PURE__ */ e(ke, {}),
610
- !p && /* @__PURE__ */ e(ce, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
872
+ ) : /* @__PURE__ */ e(q, {});
873
+ }), Dt = R(() => {
874
+ const { recurring: t } = G(), { availableWidth: n } = ve(), { selectedDay: a, selectedDayRecurrences: o, setSelectedDay: r, upcomingRecurrences: d } = _(), f = n < 750;
875
+ return /* @__PURE__ */ i(s, { flexDirection: f ? "column" : "row", width: "100%", children: [
876
+ /* @__PURE__ */ e(Pe, {}),
877
+ !f && /* @__PURE__ */ e(se, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
611
878
  /* @__PURE__ */ e(
612
- z,
879
+ H,
613
880
  {
614
881
  isMini: !0,
615
- onResetClick: i ? () => r(i) : void 0,
616
- recurrences: a || l.slice(0, 5),
617
- sx: { width: p ? "100%" : "calc(100% - 336px)", mt: 12 },
618
- title: i ? O(
882
+ onResetClick: a ? () => r(a) : void 0,
883
+ recurrences: o || d.slice(0, 5),
884
+ sx: { width: f ? "100%" : "calc(100% - 336px)", mt: 12 },
885
+ title: a ? O(
619
886
  t.day_transactions,
620
- A(i, E.MONTH_DAY)
887
+ N(a, v.MONTH_DAY)
621
888
  ) : t.upcoming_activity
622
889
  }
623
890
  )
624
891
  ] });
625
- }), wn = D(
892
+ }), Sn = R(
626
893
  ({ onPrimaryCtaClick: t, sx: n }) => {
627
- const { accounts: i } = ge(), { recurring: a } = S(), { setFilter: r } = he(), { isDataLoaded: l, loadRepeatingTransactions: p } = v(), { isCopyLoaded: u, isInitialized: s, setSelectedAccounts: m, selectedAccountGuids: f } = X();
894
+ const { accounts: a } = pe(), { recurring: o } = G(), { setFilter: r } = ge(), { isDataLoaded: d, loadRepeatingTransactions: f } = _(), { isCopyLoaded: m, isInitialized: c, setSelectedAccounts: l, selectedAccountGuids: g } = Y();
628
895
  return h.useEffect(() => {
629
- s && m(i);
630
- }, [s]), h.useEffect(() => {
631
- f.length > 0 && (r({
632
- dateRange: { start: ue(de(), 90), end: le() },
633
- accounts: f
634
- }), p().finally());
635
- }, [f]), !u || !s ? /* @__PURE__ */ e(K, {}) : /* @__PURE__ */ e(
636
- pt,
896
+ c && l(a);
897
+ }, [c]), h.useEffect(() => {
898
+ g.length > 0 && (r({
899
+ dateRange: { start: le(ue(), 90), end: de() },
900
+ accounts: g
901
+ }), f().finally());
902
+ }, [g]), !m || !c ? /* @__PURE__ */ e(q, {}) : /* @__PURE__ */ e(
903
+ ft,
637
904
  {
638
905
  className: "mx-exp-recurring-transactions-miniwidget",
639
906
  onPrimaryCtaClick: t,
640
- primaryCtaLabel: a.primary_cta,
641
- subTitle: a.sub_title,
907
+ primaryCtaLabel: o.primary_cta,
908
+ subTitle: o.sub_title,
642
909
  sx: n,
643
- title: a.mini_title,
644
- children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(K, {})
910
+ title: o.mini_title,
911
+ children: d ? /* @__PURE__ */ e(Dt, {}) : /* @__PURE__ */ e(q, {})
645
912
  }
646
913
  );
647
914
  }
648
- ), Tt = ({
915
+ ), xt = ({
649
916
  upcomingRecurrences: t,
650
917
  maxLogos: n = 3
651
- }) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, a) => /* @__PURE__ */ e(
918
+ }) => /* @__PURE__ */ e(s, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((a, o) => /* @__PURE__ */ e(
652
919
  me,
653
920
  {
654
- categoryGuid: i.categoryGuid || "",
655
- merchantGuid: i.merchantGuid || ""
921
+ categoryGuid: a.categoryGuid || "",
922
+ merchantGuid: a.merchantGuid || ""
656
923
  },
657
- `${i.categoryGuid}-${i.merchantGuid}-${a}`
658
- )) }), Dt = ({
924
+ `${a.categoryGuid}-${a.merchantGuid}-${o}`
925
+ )) }), Rt = ({
659
926
  upcomingRecurrences: t,
660
927
  logoSize: n = 32,
661
- maxLogos: i = 3
928
+ maxLogos: a = 3
662
929
  }) => {
663
- const a = (r) => r * (n / 2);
930
+ const o = (r) => r * (n / 2);
664
931
  return /* @__PURE__ */ e(
665
- k,
932
+ P,
666
933
  {
667
934
  sx: {
668
935
  position: "relative",
669
936
  width: 64
670
937
  },
671
- children: t.map((r, l) => l < i ? /* @__PURE__ */ e(
672
- k,
938
+ children: t.map((r, d) => d < a ? /* @__PURE__ */ e(
939
+ P,
673
940
  {
674
941
  sx: {
675
942
  borderRadius: "4px",
676
- left: a(l),
943
+ left: o(d),
677
944
  outlineColor: "common.white",
678
945
  outlineStyle: "solid",
679
946
  outlineWidth: 2,
@@ -688,19 +955,19 @@ const q = {
688
955
  }
689
956
  )
690
957
  },
691
- `${r.categoryGuid}-${r.merchantGuid}-${l}`
958
+ `${r.categoryGuid}-${r.merchantGuid}-${d}`
692
959
  ) : null)
693
960
  }
694
961
  );
695
- }, St = ({
962
+ }, Gt = ({
696
963
  amount: t,
697
964
  bgcolor: n,
698
- isLargeScreen: i,
699
- isSmallScreen: a,
965
+ isLargeScreen: a,
966
+ isSmallScreen: o,
700
967
  label: r
701
- }) => /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
968
+ }) => /* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
702
969
  /* @__PURE__ */ e(
703
- k,
970
+ P,
704
971
  {
705
972
  sx: {
706
973
  borderRadius: "2px",
@@ -710,110 +977,110 @@ const q = {
710
977
  }
711
978
  }
712
979
  ),
713
- /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
714
- !a && /* @__PURE__ */ e(g, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
715
- /* @__PURE__ */ e(g, { variant: "caption", children: r })
980
+ /* @__PURE__ */ i(s, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
981
+ !o && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: M(t, t === 0 || !a ? "0,0" : "0,0.00") }),
982
+ /* @__PURE__ */ e(p, { variant: "caption", children: r })
716
983
  ] })
717
- ] }), It = D(() => {
718
- const { recurring: t } = S();
719
- return /* @__PURE__ */ o(c, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
720
- /* @__PURE__ */ e(Ze, { size: 32 }),
721
- /* @__PURE__ */ o(c, { children: [
722
- /* @__PURE__ */ e(se, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
723
- /* @__PURE__ */ e(se, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
984
+ ] }), It = R(() => {
985
+ const { recurring: t } = G();
986
+ return /* @__PURE__ */ i(s, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
987
+ /* @__PURE__ */ e(Ve, { size: 32 }),
988
+ /* @__PURE__ */ i(s, { children: [
989
+ /* @__PURE__ */ e(ce, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
990
+ /* @__PURE__ */ e(ce, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
724
991
  ] })
725
992
  ] });
726
- }), vn = D(
993
+ }), _n = R(
727
994
  ({ onCTAClick: t }) => {
728
- const [n, i] = h.useState(!1), { onEvent: a } = Z(), r = pe(), { accounts: l } = ge(), [p, { width: u }] = gt(), { isCopyLoaded: s, isInitialized: m, selectedAccountGuids: f, setSelectedAccounts: x } = X(), {
729
- loadRepeatingTransactions: C,
995
+ const [n, a] = h.useState(!1), { onEvent: o } = V(), r = fe(), { accounts: d } = pe(), [f, { width: m }] = pt(), { isCopyLoaded: c, isInitialized: l, selectedAccountGuids: g, setSelectedAccounts: b } = Y(), {
996
+ loadRepeatingTransactions: T,
730
997
  upcomingRecurrences: y,
731
- expenseTotal: d,
732
- missedExpenseTotal: R,
733
- paidExpenseTotal: G,
998
+ expenseTotal: u,
999
+ missedExpenseTotal: D,
1000
+ paidExpenseTotal: L,
734
1001
  repeatingTransactions: Q,
735
1002
  setDateRange: ee,
736
- upcomingExpenseTotal: U,
737
- isDataLoaded: $
738
- } = v(), { setFilter: te } = he(), { recurring: I, budgets: ne } = S();
1003
+ upcomingExpenseTotal: B,
1004
+ isDataLoaded: W
1005
+ } = _(), { setFilter: te } = ge(), { recurring: I, budgets: ne } = G();
739
1006
  h.useEffect(() => {
740
- x(l);
1007
+ b(d);
1008
+ }, [d]), h.useEffect(() => {
1009
+ l && (te({
1010
+ dateRange: { start: le(ue(), 90), end: de() },
1011
+ accounts: g
1012
+ }), ee({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), T().finally(), a(!0));
741
1013
  }, [l]), h.useEffect(() => {
742
- m && (te({
743
- dateRange: { start: ue(de(), 90), end: le() },
744
- accounts: f
745
- }), ee({ start: W(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
746
- }, [m]), h.useEffect(() => {
747
- n && a(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
1014
+ n && o(S.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
748
1015
  state: y.length > 0 ? "default" : "zeroState"
749
1016
  });
750
1017
  }, [n]);
751
- const _ = u <= 288, F = u >= 450, ie = h.useMemo(() => {
752
- const N = [
753
- { color: r.palette.success.main, percentage: `${G / d}` }
1018
+ const w = m <= 288, U = m >= 450, ae = h.useMemo(() => {
1019
+ const E = [
1020
+ { color: r.palette.success.main, percentage: `${L / u}` }
754
1021
  ];
755
- return R && N.push({
1022
+ return D && E.push({
756
1023
  color: r.palette.error.main,
757
- percentage: `${R / d}`
758
- }), N;
1024
+ percentage: `${D / u}`
1025
+ }), E;
759
1026
  }, [
760
- G,
761
- d,
762
- R,
1027
+ L,
1028
+ u,
1029
+ D,
763
1030
  r.palette.success.main,
764
1031
  r.palette.error.main
765
- ]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), b = () => {
766
- a(
767
- y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
1032
+ ]), Z = h.useMemo(() => M(u, u === 0 ? "0,0" : "0,0.00"), [u]), C = () => {
1033
+ o(
1034
+ y.length > 0 ? S.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : S.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
768
1035
  ), t();
769
1036
  };
770
- if (!s || !n || !$) return /* @__PURE__ */ e(K, { height: 100 });
771
- const re = 32, We = y.length > 0, $e = () => We ? _ ? /* @__PURE__ */ e(
772
- Dt,
1037
+ if (!c || !n || !W) return /* @__PURE__ */ e(q, { height: 100 });
1038
+ const re = 32, ke = y.length > 0, We = () => ke ? w ? /* @__PURE__ */ e(
1039
+ Rt,
773
1040
  {
774
1041
  logoSize: re,
775
1042
  maxLogos: 3,
776
1043
  upcomingRecurrences: y.slice(0, 3)
777
1044
  }
778
- ) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: _ ? 64 : 104 } }), Pe = [
1045
+ ) : /* @__PURE__ */ e(xt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(s, { sx: { width: w ? 64 : 104 } }), Ze = [
779
1046
  {
780
- amount: G,
1047
+ amount: L,
781
1048
  bgColor: "success.main",
782
1049
  label: I.paid
783
1050
  },
784
1051
  {
785
- amount: R,
1052
+ amount: D,
786
1053
  bgColor: "error.main",
787
1054
  label: I.missed
788
1055
  },
789
1056
  {
790
- amount: U,
1057
+ amount: B,
791
1058
  bgColor: "border.light",
792
1059
  label: I.upcoming
793
1060
  }
794
- ], Re = !Q?.length;
1061
+ ], De = !Q?.length;
795
1062
  return /* @__PURE__ */ e(
796
- ht,
1063
+ gt,
797
1064
  {
798
1065
  className: "mx-recurring-transaction-microwidget",
799
- ctaLabel: Re ? ne.get_started_cta : I.primary_cta,
800
- onCTAClick: b,
1066
+ ctaLabel: De ? ne.get_started_cta : I.primary_cta,
1067
+ onCTAClick: C,
801
1068
  title: I.recurring_expenses,
802
- children: Re ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ o(Y, { children: [
803
- /* @__PURE__ */ o(
804
- c,
1069
+ children: De ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ i(j, { children: [
1070
+ /* @__PURE__ */ i(
1071
+ s,
805
1072
  {
806
- ref: p,
1073
+ ref: f,
807
1074
  sx: {
808
1075
  flexDirection: "row",
809
1076
  justifyContent: "space-between"
810
1077
  },
811
1078
  children: [
812
- /* @__PURE__ */ o(
813
- c,
1079
+ /* @__PURE__ */ i(
1080
+ s,
814
1081
  {
815
1082
  sx: [
816
- P.length >= 10 && _ ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
1083
+ Z.length >= 10 && w ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
817
1084
  {
818
1085
  alignItems: "baseline",
819
1086
  overflow: "hidden",
@@ -823,15 +1090,15 @@ const q = {
823
1090
  ],
824
1091
  children: [
825
1092
  /* @__PURE__ */ e(
826
- g,
1093
+ p,
827
1094
  {
828
1095
  sx: { width: "100%" },
829
- variant: P.length >= 10 && _ ? "H3" : "H2",
830
- children: P
1096
+ variant: Z.length >= 10 && w ? "H3" : "H2",
1097
+ children: Z
831
1098
  }
832
1099
  ),
833
1100
  /* @__PURE__ */ e(
834
- se,
1101
+ ce,
835
1102
  {
836
1103
  sx: {
837
1104
  pr: 12
@@ -843,14 +1110,14 @@ const q = {
843
1110
  ]
844
1111
  }
845
1112
  ),
846
- $e()
1113
+ We()
847
1114
  ]
848
1115
  }
849
1116
  ),
850
- /* @__PURE__ */ o(c, { sx: { pt: 12 }, children: [
851
- /* @__PURE__ */ e(Oe, { data: ie }),
1117
+ /* @__PURE__ */ i(s, { sx: { pt: 12 }, children: [
1118
+ /* @__PURE__ */ e(Oe, { data: ae }),
852
1119
  /* @__PURE__ */ e(
853
- c,
1120
+ s,
854
1121
  {
855
1122
  sx: {
856
1123
  alignItems: "center",
@@ -858,16 +1125,16 @@ const q = {
858
1125
  gap: 16,
859
1126
  mt: 4
860
1127
  },
861
- children: Pe.map((N, He) => /* @__PURE__ */ e(
862
- St,
1128
+ children: Ze.map((E, $e) => /* @__PURE__ */ e(
1129
+ Gt,
863
1130
  {
864
- amount: N.amount,
865
- bgcolor: N.bgColor,
866
- isLargeScreen: F,
867
- isSmallScreen: _,
868
- label: N.label
1131
+ amount: E.amount,
1132
+ bgcolor: E.bgColor,
1133
+ isLargeScreen: U,
1134
+ isSmallScreen: w,
1135
+ label: E.label
869
1136
  },
870
- `recurrence-legend-${He}`
1137
+ `recurrence-legend-${$e}`
871
1138
  ))
872
1139
  }
873
1140
  )
@@ -879,12 +1146,12 @@ const q = {
879
1146
  );
880
1147
  export {
881
1148
  On as AddRecurringTransactionDetails,
882
- An as ManageExpenses,
883
- kn as ManageIncome,
884
- ze as RecurringSettings,
885
- vn as RecurringTransactionsMicroWidget,
886
- wn as RecurringTransactionsMiniWidget,
887
- Gn as RecurringTransactionsStore,
888
- _n as RecurringTransactionsWidget,
889
- Wn as SelectTransaction
1149
+ Nn as ManageExpenses,
1150
+ Pn as ManageIncome,
1151
+ He as RecurringSettings,
1152
+ _n as RecurringTransactionsMicroWidget,
1153
+ Sn as RecurringTransactionsMiniWidget,
1154
+ Ln as RecurringTransactionsStore,
1155
+ wn as RecurringTransactionsWidget,
1156
+ kn as SelectTransaction
890
1157
  };