@mx-cartographer/experiences 7.2.13-alpha.mm1 → 7.2.13-alpha.mm2

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.
@@ -5,35 +5,36 @@ import P from "@mui/material/Box";
5
5
  import T from "@mui/material/Divider";
6
6
  import K from "@mui/material/List";
7
7
  import h from "@mui/material/Stack";
8
- import { MerchantLogo as H, Text as S, H1 as re, InstitutionLogo as ae, P as U } from "@mxenabled/mxui";
9
- import ie from "@mui/material/ListItem";
10
- import se from "@mui/material/ListItemAvatar";
11
- import ce from "@mui/material/ListItemButton";
12
- import le from "@mui/material/ListItemText";
13
- import { F as d, S as N, D as Y, g as Q, R as I, e as de } from "./RecurringTransactions-ej39mgA6.mjs";
14
- import { subDays as ue } from "date-fns/subDays";
8
+ import { MerchantLogo as H, Text as S, H1 as ae, InstitutionLogo as ie, P as U } from "@mxenabled/mxui";
9
+ import se from "@mui/material/ListItem";
10
+ import ce from "@mui/material/ListItemAvatar";
11
+ import le from "@mui/material/ListItemButton";
12
+ import de from "@mui/material/ListItemText";
13
+ import { F as d, S as N, D as Y, g as Q, R as E, e as ue } from "./RecurringTransactions-ej39mgA6.mjs";
14
+ import { subDays as _e } from "date-fns/subDays";
15
15
  import { startOfToday as z } from "date-fns/startOfToday";
16
- import { endOfMonth as _e } from "date-fns/endOfMonth";
17
- import $ from "@mui/material/Button";
18
- import { Delete as me, Add as ye, ReceiptLong as he } from "@mxenabled/mx-icons";
19
- import { T as X, a as pe, u as ge, S as fe, b as Ce } from "./TransactionDetails-DW7T0W0z.mjs";
20
- import { getDayOfYear as be } from "date-fns/getDayOfYear";
21
- import { setDayOfYear as xe } from "date-fns/setDayOfYear";
22
- import { AdapterDateFns as Se } from "@mui/x-date-pickers/AdapterDateFnsV3";
23
- import { DatePicker as ve } from "@mui/x-date-pickers";
24
- import { LocalizationProvider as we } from "@mui/x-date-pickers/LocalizationProvider";
25
- import { u as w, j as M, g as F, b as Ae, h as Z, p as De } from "./hooks-D6XlXHf4.mjs";
26
- import { b as Ee, f as J } from "./NumberFormatting-Buh7u8Oi.mjs";
16
+ import { startOfDay as me } from "date-fns/startOfDay";
17
+ import { endOfMonth as pe } from "date-fns/endOfMonth";
18
+ import { formatISO as $ } from "date-fns/formatISO";
19
+ import X from "@mui/material/Button";
20
+ import { Delete as he, Add as ye, ReceiptLong as ge } from "@mxenabled/mx-icons";
21
+ import { T as Z, a as fe, u as Ce, S as be, b as xe } from "./TransactionDetails-DW7T0W0z.mjs";
22
+ import { getDayOfYear as Se } from "date-fns/getDayOfYear";
23
+ import { setDayOfYear as ve } from "date-fns/setDayOfYear";
24
+ import { AdapterDateFns as we } from "@mui/x-date-pickers/AdapterDateFnsV3";
25
+ import { DatePicker as Ae } from "@mui/x-date-pickers";
26
+ import { LocalizationProvider as De } from "@mui/x-date-pickers/LocalizationProvider";
27
+ import { u as w, j as M, g as F, b as Ie, h as J, p as Ee } from "./hooks-D6XlXHf4.mjs";
28
+ import { b as Re, f as V } from "./NumberFormatting-Buh7u8Oi.mjs";
27
29
  import { D as O } from "./Drawer-kEE73B87.mjs";
28
30
  import { A as R } from "./WidgetContainer-C88Ecu2W.mjs";
29
- import { f as Ie, D as Re, a as Te } from "./Dialog-CWW597AF.mjs";
30
- import { format as Le } from "date-fns/format";
31
- import { fromUnixTime as Oe } from "date-fns/fromUnixTime";
32
- import { S as ke } from "./SearchBox-B2_zLv8-.mjs";
33
- import { h as Ne } from "./DateUtil-BcuH7ErC.mjs";
31
+ import { f as Te, D as Le, a as Oe } from "./Dialog-CWW597AF.mjs";
32
+ import { fromUnixTime as ke } from "date-fns/fromUnixTime";
33
+ import { S as Ne } from "./SearchBox-B2_zLv8-.mjs";
34
+ import { h as Me } from "./DateUtil-BcuH7ErC.mjs";
34
35
  import { b as B } from "./Category-CevNQ03n.mjs";
35
- import { T as V } from "./User-BQUxBeZV.mjs";
36
- const ee = ({
36
+ import { T as ee } from "./User-BQUxBeZV.mjs";
37
+ const te = ({
37
38
  frequency: n,
38
39
  firstDay: t,
39
40
  secondDay: r,
@@ -61,13 +62,13 @@ const ee = ({
61
62
  { id: 4, label: o.weekday_thursday },
62
63
  { id: 5, label: o.weekday_friday },
63
64
  { id: 6, label: o.weekday_saturday }
64
- ], p = [...Array(31).keys()].map((y) => ({
65
- id: y + 1,
66
- label: Ee(y + 1)
65
+ ], y = [...Array(31).keys()].map((p) => ({
66
+ id: p + 1,
67
+ label: Re(p + 1)
67
68
  }));
68
- p[30].label += ` (${o.last_day_of_month})`;
69
- const C = p.slice(0, 15), v = p.slice(14), b = n === d.EveryWeek || n === d.EveryOtherWeek, g = n === d.TwiceAMonth || n === d.EveryMonth || n === d.EveryOtherMonth || n === d.EveryQuarter || n === d.EveryOtherQuarter, D = xe(z(), t), f = (y) => {
70
- y && s(be(y));
69
+ y[30].label += ` (${o.last_day_of_month})`;
70
+ const C = y.slice(0, 15), v = y.slice(14), b = n === d.EveryWeek || n === d.EveryOtherWeek, g = n === d.TwiceAMonth || n === d.EveryMonth || n === d.EveryOtherMonth || n === d.EveryQuarter || n === d.EveryOtherQuarter, D = ve(z(), t), f = (p) => {
71
+ p && s(Se(p));
71
72
  };
72
73
  return /* @__PURE__ */ c(h, { gap: 24, sx: { m: 24 }, children: [
73
74
  /* @__PURE__ */ e(
@@ -93,7 +94,7 @@ const ee = ({
93
94
  {
94
95
  label: n === d.TwiceAMonth ? o.first_day_of_the_month : o.day_of_the_month,
95
96
  onChange: s,
96
- options: n === d.TwiceAMonth ? C : p,
97
+ options: n === d.TwiceAMonth ? C : y,
97
98
  value: t
98
99
  }
99
100
  ),
@@ -106,8 +107,8 @@ const ee = ({
106
107
  value: r || 0
107
108
  }
108
109
  ),
109
- n === d.EveryYear && /* @__PURE__ */ e(we, { dateAdapter: Se, children: /* @__PURE__ */ e(
110
- ve,
110
+ n === d.EveryYear && /* @__PURE__ */ e(De, { dateAdapter: we, children: /* @__PURE__ */ e(
111
+ Ae,
111
112
  {
112
113
  disablePast: !0,
113
114
  label: o.next_payment_date,
@@ -116,8 +117,8 @@ const ee = ({
116
117
  }
117
118
  ) })
118
119
  ] });
119
- }, Me = A(({ repeatingTransaction: n }) => {
120
- const { recurring: t } = w(), { updateRepeatingTransaction: r } = M(), { onEvent: i } = F(), [s, l] = u.useState(!1), [o, a] = u.useState(n.recurrence_type), [m, p] = u.useState(n.recurrence_day), [C, v] = u.useState(n.second_recurrence_day), b = async () => {
120
+ }, Fe = A(({ repeatingTransaction: n }) => {
121
+ const { recurring: t } = w(), { updateRepeatingTransaction: r } = M(), { onEvent: i } = F(), [s, l] = u.useState(!1), [o, a] = u.useState(n.recurrence_type), [m, y] = u.useState(n.recurrence_day), [C, v] = u.useState(n.second_recurrence_day), b = async () => {
121
122
  await r({
122
123
  ...n,
123
124
  recurrence_type: o,
@@ -146,11 +147,11 @@ const ee = ({
146
147
  onPrimaryAction: b,
147
148
  title: t.payment_schedule,
148
149
  children: /* @__PURE__ */ e(
149
- ee,
150
+ te,
150
151
  {
151
152
  firstDay: m,
152
153
  frequency: o,
153
- onFirstDayChange: p,
154
+ onFirstDayChange: y,
154
155
  onFrequencyChange: a,
155
156
  onSecondDayChange: v,
156
157
  secondDay: C
@@ -159,20 +160,20 @@ const ee = ({
159
160
  }
160
161
  )
161
162
  ] });
162
- }), Fe = A(
163
+ }), Ge = A(
163
164
  ({ onDeleted: n, recurringTransaction: t }) => {
164
- const { recurring: r } = w(), { selectedAccountGuids: i } = Ae(), { onEvent: s } = F(), { deleteRepeatingTransaction: l } = M(), { setFilter: o, transactions: a } = Z(), { amount: m, description: p, merchant_guid: C } = t, [v, b] = u.useState(!1), [g, D] = u.useState("");
165
+ const { recurring: r } = w(), { selectedAccountGuids: i } = Ie(), { onEvent: s } = F(), { deleteRepeatingTransaction: l } = M(), { setFilter: o, transactions: a } = J(), { amount: m, description: y, merchant_guid: C } = t, [v, b] = u.useState(!1), [g, D] = u.useState("");
165
166
  u.useEffect(() => {
166
167
  o({
167
168
  accounts: i,
168
- dateRange: { start: ue(z(), 90), end: _e(z()) },
169
+ dateRange: { start: _e(z(), 90), end: pe(z()) },
169
170
  custom: (_) => _.repeating_transaction_guid === t.guid
170
171
  });
171
172
  }, [t]);
172
173
  const f = u.useMemo(
173
174
  () => a.find((_) => _.guid === g),
174
175
  [g, a]
175
- ), y = t.repeating_transaction_type === I.Income, k = async () => {
176
+ ), p = t.repeating_transaction_type === E.Income, k = async () => {
176
177
  await l(t.guid), n();
177
178
  }, G = () => {
178
179
  b(!0), s(R.RECURRING_TRANSACTIONS_DETAILS_CLICK_DELETE);
@@ -188,18 +189,15 @@ const ee = ({
188
189
  sx: { mb: 12 }
189
190
  }
190
191
  ),
191
- /* @__PURE__ */ e(S, { bold: !0, variant: "body1", children: p }),
192
- /* @__PURE__ */ c(re, { color: y ? "success.main" : "text.primary", sx: { my: 4 }, children: [
193
- y ? "+" : "",
194
- J(m, "0,0.00")
192
+ /* @__PURE__ */ e(S, { bold: !0, variant: "body1", children: y }),
193
+ /* @__PURE__ */ c(ae, { color: p ? "success.main" : "text.primary", sx: { my: 4 }, children: [
194
+ p ? "+" : "",
195
+ V(m, "0,0.00")
195
196
  ] }),
196
- /* @__PURE__ */ c(S, { color: "text.secondary", variant: "body2", children: [
197
- '"Testing"',
198
- `${r.next_payment_date}: ${Ie(
199
- t.predicted_occurs_on,
200
- Re.MONTH_DAY_YEAR
201
- )}`
202
- ] })
197
+ /* @__PURE__ */ e(S, { color: "text.secondary", variant: "body2", children: `${r.next_payment_date}: ${Te(
198
+ me($(t.predicted_occurs_on)),
199
+ Le.MONTH_DAY_YEAR
200
+ )}` })
203
201
  ] }),
204
202
  /* @__PURE__ */ c(K, { sx: { bgcolor: "background.paper" }, children: [
205
203
  t.account && /* @__PURE__ */ c(L, { children: [
@@ -224,22 +222,22 @@ const ee = ({
224
222
  ),
225
223
  /* @__PURE__ */ e(T, { variant: "inset" })
226
224
  ] }),
227
- /* @__PURE__ */ e(Me, { repeatingTransaction: t }),
225
+ /* @__PURE__ */ e(Fe, { repeatingTransaction: t }),
228
226
  /* @__PURE__ */ e(T, {})
229
227
  ] }),
230
228
  /* @__PURE__ */ e(
231
- $,
229
+ X,
232
230
  {
233
231
  color: "error",
234
232
  onClick: G,
235
- startIcon: /* @__PURE__ */ e(me, {}),
233
+ startIcon: /* @__PURE__ */ e(he, {}),
236
234
  sx: { mx: 24, my: 16 },
237
235
  variant: "text",
238
- children: y ? r.delete_income_title : r.delete_expense_title
236
+ children: p ? r.delete_income_title : r.delete_expense_title
239
237
  }
240
238
  ),
241
239
  /* @__PURE__ */ e(S, { bold: !0, sx: { ml: 24, mt: 16 }, variant: "Body", children: r.paid_transactions }),
242
- /* @__PURE__ */ e(X, { height: "30dvh", onClick: D }),
240
+ /* @__PURE__ */ e(Z, { height: "30dvh", onClick: D }),
243
241
  /* @__PURE__ */ e(
244
242
  O,
245
243
  {
@@ -247,48 +245,48 @@ const ee = ({
247
245
  isOpen: !!g && !!f,
248
246
  onClose: () => D(""),
249
247
  title: r.transaction_details_drawer_title,
250
- children: f && /* @__PURE__ */ e(pe, { transaction: f })
248
+ children: f && /* @__PURE__ */ e(fe, { transaction: f })
251
249
  }
252
250
  ),
253
251
  /* @__PURE__ */ e(
254
- Te,
252
+ Oe,
255
253
  {
256
254
  copy: {
257
- title: y ? r.delete_income_title : r.delete_expense_title,
255
+ title: p ? r.delete_income_title : r.delete_expense_title,
258
256
  close_aria: r.close_drawer_aria
259
257
  },
260
258
  isOpen: v,
261
259
  onClose: () => b(!1),
262
260
  onPrimaryAction: k,
263
- children: /* @__PURE__ */ e(S, { children: y ? r.delete_income_description : r.delete_expense_description })
261
+ children: /* @__PURE__ */ e(S, { children: p ? r.delete_income_description : r.delete_expense_description })
264
262
  }
265
263
  )
266
264
  ] });
267
265
  }
268
- ), Ge = A(
266
+ ), Pe = A(
269
267
  ({ onClick: n = () => {
270
268
  }, repeatingTransaction: t }) => {
271
269
  const { recurring: r } = w(), [i, s] = u.useState(!1), l = u.useMemo(
272
270
  () => t.transactions.length === 0 ? "" : t.transactions[0].category_guid || "",
273
271
  [t]
274
- ), o = t.account?.institutionName || "", a = t.repeating_transaction_type === I.Income, m = Q(r, t, !0);
275
- return /* @__PURE__ */ c(ie, { disableGutters: !0, disablePadding: !0, children: [
276
- /* @__PURE__ */ c(ce, { onClick: () => {
272
+ ), o = t.account?.institutionName || "", a = t.repeating_transaction_type === E.Income, m = Q(r, t, !0);
273
+ return /* @__PURE__ */ c(se, { disableGutters: !0, disablePadding: !0, children: [
274
+ /* @__PURE__ */ c(le, { onClick: () => {
277
275
  n(t), s(!0);
278
276
  }, children: [
279
- /* @__PURE__ */ e(se, { children: /* @__PURE__ */ e(
277
+ /* @__PURE__ */ e(ce, { children: /* @__PURE__ */ e(
280
278
  H,
281
279
  {
282
280
  categoryGuid: l,
283
281
  merchantGuid: t.merchant_guid
284
282
  }
285
283
  ) }),
286
- /* @__PURE__ */ e(le, { children: /* @__PURE__ */ c(h, { direction: "row", gap: 4, sx: { justifyContent: "space-between" }, children: [
284
+ /* @__PURE__ */ e(de, { children: /* @__PURE__ */ c(h, { direction: "row", gap: 4, sx: { justifyContent: "space-between" }, children: [
287
285
  /* @__PURE__ */ c(h, { direction: "column", sx: { width: "50%" }, children: [
288
286
  /* @__PURE__ */ e(S, { bold: !0, variant: "body1", children: t.description }),
289
287
  /* @__PURE__ */ c(h, { alignItems: "center", direction: "row", gap: 6, children: [
290
288
  t.account?.institution_guid && /* @__PURE__ */ e(
291
- ae,
289
+ ie,
292
290
  {
293
291
  alt: o,
294
292
  institutionGuid: t.account?.institution_guid,
@@ -307,7 +305,7 @@ const ee = ({
307
305
  variant: "body1",
308
306
  children: [
309
307
  a ? "+" : "",
310
- J(t.amount, "0,0.00")
308
+ V(t.amount, "0,0.00")
311
309
  ]
312
310
  }
313
311
  ),
@@ -334,9 +332,9 @@ const ee = ({
334
332
  ariaLabelClose: r.close_drawer_aria,
335
333
  isOpen: i,
336
334
  onClose: () => s(!1),
337
- title: t.repeating_transaction_type === I.Income ? r.income_details : r.expense_details,
335
+ title: t.repeating_transaction_type === E.Income ? r.income_details : r.expense_details,
338
336
  children: /* @__PURE__ */ e(
339
- Fe,
337
+ Ge,
340
338
  {
341
339
  onDeleted: () => s(!1),
342
340
  recurringTransaction: t
@@ -346,18 +344,18 @@ const ee = ({
346
344
  )
347
345
  ] });
348
346
  }
349
- ), Pe = A(
347
+ ), Ue = A(
350
348
  ({
351
349
  bgcolor: n = "background.default",
352
350
  description: t,
353
351
  onSearch: r,
354
352
  onSelected: i
355
353
  }) => {
356
- const { recurring: s } = w(), { searchValue: l, setSearchValue: o } = ge();
354
+ const { recurring: s } = w(), { searchValue: l, setSearchValue: o } = Ce();
357
355
  return /* @__PURE__ */ c(h, { sx: { bgcolor: n, gap: 16, pt: 8 }, children: [
358
356
  t && /* @__PURE__ */ e(U, { sx: { mx: 24 }, children: t }),
359
357
  /* @__PURE__ */ e(
360
- ke,
358
+ Ne,
361
359
  {
362
360
  ariaLabel: s.select_transaction_search_aria,
363
361
  cancelAriaLabel: s.select_transaction_search_cancel_aria,
@@ -369,7 +367,7 @@ const ee = ({
369
367
  }
370
368
  ),
371
369
  /* @__PURE__ */ e(
372
- X,
370
+ Z,
373
371
  {
374
372
  bgcolor: n,
375
373
  filter: (a) => !!a.merchant_guid,
@@ -380,7 +378,7 @@ const ee = ({
380
378
  )
381
379
  ] });
382
380
  }
383
- ), Ue = A(
381
+ ), Ye = A(
384
382
  ({
385
383
  bgcolor: n = "background.default",
386
384
  firstDay: t,
@@ -394,12 +392,12 @@ const ee = ({
394
392
  const { recurring: m } = w();
395
393
  return /* @__PURE__ */ c(h, { bgcolor: n, gap: 24, height: "100%", children: [
396
394
  /* @__PURE__ */ c(h, { children: [
397
- /* @__PURE__ */ e(fe, { bgcolor: n, children: Ne(a.date) }),
398
- /* @__PURE__ */ e(Ce, { transaction: a })
395
+ /* @__PURE__ */ e(be, { bgcolor: n, children: Me(a.date) }),
396
+ /* @__PURE__ */ e(xe, { transaction: a })
399
397
  ] }),
400
398
  /* @__PURE__ */ e(S, { bold: !0, sx: { mx: 24 }, variant: "Body", children: m.payment_schedule }),
401
399
  /* @__PURE__ */ e(
402
- ee,
400
+ te,
403
401
  {
404
402
  firstDay: t,
405
403
  frequency: i,
@@ -411,59 +409,59 @@ const ee = ({
411
409
  )
412
410
  ] });
413
411
  }
414
- ), q = (n) => n.top_level_category_guid !== B.INCOME && n.transaction_type === V.DEBIT, Ye = (n, t) => q(n) ? n.payee?.toLowerCase().includes(t.toLowerCase()) || n.description.toLowerCase().includes(t.toLowerCase()) || n.feed_description.toLowerCase().includes(t.toLowerCase()) : !1, W = (n) => n.top_level_category_guid === B.INCOME || n.top_level_category_guid === B.TRANSFER && n.transaction_type === V.CREDIT, ze = (n, t) => W(n) ? n.payee?.toLowerCase().includes(t.toLowerCase()) || n.description?.toLowerCase().includes(t.toLowerCase()) || n.feed_description?.toLowerCase().includes(t.toLowerCase()) : !1, te = A(
412
+ ), q = (n) => n.top_level_category_guid !== B.INCOME && n.transaction_type === ee.DEBIT, ze = (n, t) => q(n) ? n.payee?.toLowerCase().includes(t.toLowerCase()) || n.description.toLowerCase().includes(t.toLowerCase()) || n.feed_description.toLowerCase().includes(t.toLowerCase()) : !1, W = (n) => n.top_level_category_guid === B.INCOME || n.top_level_category_guid === B.TRANSFER && n.transaction_type === ee.CREDIT, Be = (n, t) => W(n) ? n.payee?.toLowerCase().includes(t.toLowerCase()) || n.description?.toLowerCase().includes(t.toLowerCase()) || n.feed_description?.toLowerCase().includes(t.toLowerCase()) : !1, ne = A(
415
413
  ({
416
414
  isIncome: n = !1,
417
415
  label: t,
418
416
  onAddRecurringTransaction: r = () => null
419
417
  }) => {
420
- const { recurring: i } = w(), { filter: s, setFilter: l, transactions: o } = Z(), { addRepeatingTransaction: a } = M(), { user: m } = De(), [p, C] = u.useState(!1), [v, b] = u.useState(""), [g, D] = u.useState(d.EveryMonth), [f, y] = u.useState(1), [k, G] = u.useState(15), _ = u.useMemo(
418
+ const { recurring: i } = w(), { filter: s, setFilter: l, transactions: o } = J(), { addRepeatingTransaction: a } = M(), { user: m } = Ee(), [y, C] = u.useState(!1), [v, b] = u.useState(""), [g, D] = u.useState(d.EveryMonth), [f, p] = u.useState(1), [k, G] = u.useState(15), _ = u.useMemo(
421
419
  () => o.find((x) => x.guid === v),
422
420
  [v, o]
423
- ), ne = () => {
421
+ ), oe = () => {
424
422
  C(!0), l(n ? { ...s, custom: W } : { ...s, custom: q });
425
- }, oe = async () => {
423
+ }, re = async () => {
426
424
  if (!_) {
427
425
  j();
428
426
  return;
429
427
  }
430
428
  r();
431
- const x = de(g, Oe(_.date)), E = {
429
+ const x = ue(g, ke(_.date)), I = {
432
430
  account_guid: _.account_guid,
433
431
  amount: _.amount,
434
432
  created_by: 0,
435
433
  // User
436
434
  merchant_guid: _.merchant_guid,
437
435
  description: _.payee || _.description || _.feed_description,
438
- predicted_occurs_on: Le(x, "yyyy-MM-dd"),
436
+ predicted_occurs_on: $(x, { representation: "date" }),
439
437
  recurrence_day: f,
440
438
  recurrence_type: g,
441
- repeating_transaction_type: n ? I.Income : I.Bill,
439
+ repeating_transaction_type: n ? E.Income : E.Bill,
442
440
  second_recurrence_day: k,
443
441
  transaction_type: _.transaction_type,
444
442
  user_guid: m.guid
445
443
  };
446
- await a(E, _), j();
444
+ await a(I, _), j();
447
445
  }, j = () => {
448
446
  b(""), C(!1);
449
447
  };
450
448
  return /* @__PURE__ */ c(L, { children: [
451
- /* @__PURE__ */ e($, { onClick: ne, startIcon: /* @__PURE__ */ e(ye, { size: 24 }), variant: "contained", children: t }),
449
+ /* @__PURE__ */ e(X, { onClick: oe, startIcon: /* @__PURE__ */ e(ye, { size: 24 }), variant: "contained", children: t }),
452
450
  /* @__PURE__ */ e(
453
451
  O,
454
452
  {
455
453
  ariaLabelClose: i.close_drawer_aria,
456
- isOpen: p,
454
+ isOpen: y,
457
455
  onClose: () => C(!1),
458
456
  title: t,
459
457
  children: /* @__PURE__ */ e(
460
- Pe,
458
+ Ue,
461
459
  {
462
460
  description: n ? i.add_income_description : i.add_expense_description,
463
461
  onSearch: (x) => {
464
462
  l({
465
463
  ...s,
466
- custom: (E) => n ? x ? ze(E, x) : W(E) : x ? Ye(E, x) : q(E)
464
+ custom: (I) => n ? x ? Be(I, x) : W(I) : x ? ze(I, x) : q(I)
467
465
  });
468
466
  },
469
467
  onSelected: (x) => b(x)
@@ -477,14 +475,14 @@ const ee = ({
477
475
  ariaLabelClose: i.close_drawer_aria,
478
476
  isOpen: !!v,
479
477
  onClose: () => b(""),
480
- onPrimaryAction: oe,
478
+ onPrimaryAction: re,
481
479
  title: n ? i.income_details : i.expense_details,
482
480
  children: _ && /* @__PURE__ */ e(
483
- Ue,
481
+ Ye,
484
482
  {
485
483
  firstDay: f,
486
484
  frequency: g,
487
- onFirstDayChange: y,
485
+ onFirstDayChange: p,
488
486
  onFrequencyChange: D,
489
487
  onSecondDayChange: G,
490
488
  secondDay: k,
@@ -495,15 +493,15 @@ const ee = ({
495
493
  )
496
494
  ] });
497
495
  }
498
- ), Be = A(
496
+ ), qe = A(
499
497
  ({ zeroStateFor: n }) => {
500
498
  const { recurring: t } = w(), { onEvent: r } = F(), i = n === "income", s = i ? t.recurring_setting_zero_state_income_title : t.recurring_setting_zero_state_expenses_title, l = i ? t.recurring_setting_zero_state_income_description : t.recurring_setting_zero_state_expenses_description, o = i ? t.add_income : t.add_expense;
501
499
  return /* @__PURE__ */ c(h, { sx: { alignItems: "center", p: 24, pt: 48 }, children: [
502
- /* @__PURE__ */ e(he, { size: 48 }),
500
+ /* @__PURE__ */ e(ge, { size: 48 }),
503
501
  /* @__PURE__ */ e(U, { sx: { my: 8, fontWeight: 600 }, variant: "body1", children: s }),
504
502
  /* @__PURE__ */ e(U, { color: "text.secondary", sx: { mb: 32 }, variant: "subtitle2", children: l }),
505
503
  /* @__PURE__ */ e(
506
- te,
504
+ ne,
507
505
  {
508
506
  isIncome: i,
509
507
  label: o,
@@ -516,7 +514,7 @@ const ee = ({
516
514
  )
517
515
  ] });
518
516
  }
519
- ), wt = A(({ forOverview: n = !1 }) => {
517
+ ), Dt = A(({ forOverview: n = !1 }) => {
520
518
  const { recurring: t } = w(), { repeatingTransactions: r } = M(), { onEvent: i } = F(), s = (a) => {
521
519
  i(R.RECURRING_TRANSACTIONS_CLICK_INCOME, {
522
520
  repeating_transaction_guid: a.guid
@@ -524,7 +522,7 @@ const ee = ({
524
522
  }, l = () => {
525
523
  i(R.RECURRING_TRANSACTIONS_CLICK_ADD_INCOME);
526
524
  }, o = r.filter(
527
- (a) => a.repeating_transaction_type === I.Income && (a.transactions.length > 0 || a.recurrence_type === d.EveryYear)
525
+ (a) => a.repeating_transaction_type === E.Income && (a.transactions.length > 0 || a.recurrence_type === d.EveryYear)
528
526
  );
529
527
  return /* @__PURE__ */ e(L, { children: o.length !== 0 ? /* @__PURE__ */ c(
530
528
  h,
@@ -536,7 +534,7 @@ const ee = ({
536
534
  children: [
537
535
  n && /* @__PURE__ */ e(S, { bold: !0, sx: { mb: 4, mt: 12, mx: 24 }, variant: "Small", children: t.income }),
538
536
  /* @__PURE__ */ e(P, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(K, { sx: { bgcolor: "background.paper" }, children: o.map((a, m) => /* @__PURE__ */ c(u.Fragment, { children: [
539
- /* @__PURE__ */ e(Ge, { onClick: s, repeatingTransaction: a }),
537
+ /* @__PURE__ */ e(Pe, { onClick: s, repeatingTransaction: a }),
540
538
  /* @__PURE__ */ e(
541
539
  T,
542
540
  {
@@ -558,7 +556,7 @@ const ee = ({
558
556
  textAlign: "right"
559
557
  },
560
558
  children: /* @__PURE__ */ e(
561
- te,
559
+ ne,
562
560
  {
563
561
  isIncome: !0,
564
562
  label: t.add_income,
@@ -570,16 +568,16 @@ const ee = ({
570
568
  ] })
571
569
  ]
572
570
  }
573
- ) : /* @__PURE__ */ e(Be, { zeroStateFor: "income" }) });
571
+ ) : /* @__PURE__ */ e(qe, { zeroStateFor: "income" }) });
574
572
  });
575
573
  export {
576
- te as A,
577
- wt as M,
578
- Ge as R,
579
- Pe as S,
580
- Be as a,
581
- Fe as b,
582
- Ue as c,
574
+ ne as A,
575
+ Dt as M,
576
+ Pe as R,
577
+ Ue as S,
578
+ qe as a,
579
+ Ge as b,
580
+ Ye as c,
583
581
  W as d,
584
- ze as i
582
+ Be as i
585
583
  };
@@ -7,7 +7,7 @@ import b from "@mui/material/Tabs";
7
7
  import d from "@mui/material/Divider";
8
8
  import R from "@mui/material/List";
9
9
  import T from "@mui/material/Stack";
10
- import { R as C, A as S, a as E, M as v } from "./ManageIncome-BBRG0iBz.mjs";
10
+ import { R as C, A as S, a as E, M as v } from "./ManageIncome-DYH2F4Sj.mjs";
11
11
  import { u as _, j as A, g as f } from "./hooks-D6XlXHf4.mjs";
12
12
  import { R as y, F as N } from "./RecurringTransactions-ej39mgA6.mjs";
13
13
  import { A as m } from "./WidgetContainer-C88Ecu2W.mjs";
@@ -46,7 +46,7 @@ import { u as nt, b as ot } from "../CategorySelectorDrawer-DUe4lH5-.mjs";
46
46
  import De from "@mui/material/CardHeader";
47
47
  import { subDays as at } from "date-fns/subDays";
48
48
  import rt from "@mui/material/IconButton";
49
- import { M as st } from "../ManageIncome-BBRG0iBz.mjs";
49
+ import { M as st } from "../ManageIncome-DYH2F4Sj.mjs";
50
50
  const it = I(() => {
51
51
  const { budgets: t } = w(), { totalBudgeted: o } = D(), { incomeTotal: i } = ee(), s = i - o;
52
52
  return /* @__PURE__ */ m(S, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
@@ -2,22 +2,22 @@ import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
2
2
  import f, { useState as ee } from "react";
3
3
  import { observer as T } from "mobx-react-lite";
4
4
  import { addMonths as Xe } from "date-fns/addMonths";
5
- import { startOfToday as W } from "date-fns/startOfToday";
5
+ import { startOfToday as $ } from "date-fns/startOfToday";
6
6
  import I from "@mui/material/Box";
7
7
  import D from "@mui/material/Divider";
8
8
  import s from "@mui/material/Stack";
9
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 Ye } from "@mxenabled/mxui";
11
- import { G as Qe, v as he, u as N, q as de, d as Oe, b as X, j as q, g as ke, p as He, h as Fe, a as Ve } from "../hooks-D6XlXHf4.mjs";
10
+ import { Text as u, P as N, Icon as j, InstitutionLogo as ye, H1 as ue, H2 as Ye } from "@mxenabled/mxui";
11
+ import { G as Qe, v as he, u as O, q as de, d as Ne, b as X, j as q, g as ke, p as He, h as Fe, a as Ve } from "../hooks-D6XlXHf4.mjs";
12
12
  import { C as L } from "../CurrencyText-kyC1aseI.mjs";
13
13
  import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
14
14
  import { L as oe } from "../Loader-DUaFpDGv.mjs";
15
15
  import { I as fe } from "../CashflowStore-D9Dpuz7X.mjs";
16
16
  import { C as jn } from "../CashflowStore-D9Dpuz7X.mjs";
17
- import { b as $ } from "../Localization-2MODESHW.mjs";
17
+ import { b as M } from "../Localization-2MODESHW.mjs";
18
18
  import { M as Ke } from "../MiniWidgetContainer-D0gfmbaF.mjs";
19
19
  import { E as Je } from "../EmptyState-DA_lfRBv.mjs";
20
- import { R as Ze } from "../RecurringSettings-ne0-dOPO.mjs";
20
+ import { R as Ze } from "../RecurringSettings-BNdAIXRE.mjs";
21
21
  import et from "@mui/material/Tabs";
22
22
  import Ce from "@mui/material/Tab";
23
23
  import { getUnixTime as U } from "date-fns/getUnixTime";
@@ -27,17 +27,17 @@ import { A as tt } from "../AccountListItem-DChcf3SN.mjs";
27
27
  import { f as Y, D as Q } from "../Dialog-CWW597AF.mjs";
28
28
  import nt from "@mui/material/ListSubheader";
29
29
  import { f as te } from "../NumberFormatting-Buh7u8Oi.mjs";
30
- import { isAfter as Me } from "date-fns/isAfter";
31
- import { isBefore as We } from "date-fns/isBefore";
32
- import { isToday as $e } from "date-fns/isToday";
33
- import { addDays as we } from "date-fns/addDays";
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";
33
+ import { addDays as Se } from "date-fns/addDays";
34
34
  import { alpha as ot, keyframes as at } from "@mui/material/styles";
35
35
  import { DataGridPro as it } from "@mui/x-data-grid-pro";
36
- import { T as Se } from "../TabContentContainer-j01JYR_7.mjs";
36
+ import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
37
37
  import G from "@mui/material/Button";
38
- import { M as rt, S as st, i as ct, d as _e, c as lt } from "../ManageIncome-BBRG0iBz.mjs";
38
+ import { M as rt, S as st, i as ct, d as _e, c as lt } from "../ManageIncome-DYH2F4Sj.mjs";
39
39
  import { D as Ge } from "../Drawer-kEE73B87.mjs";
40
- import { format as dt } from "date-fns/format";
40
+ import { formatISO as dt } from "date-fns/formatISO";
41
41
  import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
42
42
  import { startOfMonth as mt } from "date-fns/startOfMonth";
43
43
  import { subDays as je } from "date-fns/subDays";
@@ -52,7 +52,7 @@ const V = () => {
52
52
  throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
53
53
  return he().uiStore;
54
54
  }, xt = ({ remaining: a }) => {
55
- const { cashflow: n } = N();
55
+ const { cashflow: n } = O();
56
56
  return /* @__PURE__ */ o(P, { children: [
57
57
  /* @__PURE__ */ e(
58
58
  I,
@@ -69,7 +69,7 @@ const V = () => {
69
69
  /* @__PURE__ */ e(L, { amount: a, bold: !0, sx: { fontSize: 12 } })
70
70
  ] });
71
71
  }, ge = T(xt), yt = () => {
72
- const a = le(), { availableWidth: n } = de(), { isMobile: t } = pe(), { visibleCashAccounts: i, visibleCashBalance: g } = Oe(), { selectedAccounts: x, selectedAccountGuids: m, setSelectedAccounts: p } = X(), { cashflow: c } = N(), {
72
+ const a = le(), { availableWidth: n } = de(), { isMobile: t } = pe(), { visibleCashAccounts: i, visibleCashBalance: g } = Ne(), { selectedAccounts: x, selectedAccountGuids: m, setSelectedAccounts: p } = X(), { cashflow: c } = O(), {
73
73
  daysUntilNextIncome: r,
74
74
  expensesTilNextIncome: d,
75
75
  selectedCashAccounts: l,
@@ -81,20 +81,20 @@ const V = () => {
81
81
  p(i);
82
82
  }, [i]), f.useEffect(() => {
83
83
  C(
84
- i.filter((S) => m.includes(S.guid))
84
+ i.filter((w) => m.includes(w.guid))
85
85
  );
86
86
  }, [i, x]), f.useEffect(() => {
87
87
  v && b(v), _(F);
88
88
  }, [v, F]);
89
89
  const h = f.useMemo(
90
- () => i.filter((S) => m.includes(S.guid)).reduce((S, z) => S + (z?.balance || 0), 0),
90
+ () => i.filter((w) => m.includes(w.guid)).reduce((w, z) => w + (z?.balance || 0), 0),
91
91
  [m, F]
92
- ), w = f.useMemo(
93
- () => d.filter((S) => m.includes(S.accountGuid || "")).reduce((S, z) => S + z.amount, 0),
92
+ ), S = f.useMemo(
93
+ () => d.filter((w) => m.includes(w.accountGuid || "")).reduce((w, z) => w + z.amount, 0),
94
94
  [m, d]
95
95
  ), A = f.useMemo(
96
- () => h - w,
97
- [h, w]
96
+ () => h - S,
97
+ [h, S]
98
98
  );
99
99
  return k ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
100
100
  s,
@@ -107,33 +107,33 @@ const V = () => {
107
107
  children: [
108
108
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
109
109
  /* @__PURE__ */ e(L, { amount: h, variant: "H2" }),
110
- /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: $(
110
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: M(
111
111
  c.total_cash_accounts,
112
112
  l.length
113
113
  ) })
114
114
  ] }),
115
115
  /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "remove" }) }),
116
116
  /* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
117
- /* @__PURE__ */ e(L, { amount: w, variant: "H2" }),
118
- /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: $(c.expenses_due, d.length) })
117
+ /* @__PURE__ */ e(L, { amount: S, variant: "H2" }),
118
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: M(c.expenses_due, d.length) })
119
119
  ] }),
120
120
  /* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "equal" }) }),
121
121
  /* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
122
122
  /* @__PURE__ */ e(L, { amount: A, variant: "H2" }),
123
123
  /* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
124
- /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
124
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
125
125
  /* @__PURE__ */ e(fe, { body: c.tooltip_body, title: c.tooltip_title })
126
126
  ] })
127
127
  ] }),
128
128
  /* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(P, { children: [
129
- /* @__PURE__ */ e(u, { variant: "H2", children: $(c.days, r) }),
130
- /* @__PURE__ */ e(O, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
129
+ /* @__PURE__ */ e(u, { variant: "H2", children: M(c.days, r) }),
130
+ /* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
131
131
  ] }) })
132
132
  ]
133
133
  }
134
134
  ) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
135
135
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
136
- /* @__PURE__ */ e(u, { variant: "Small", children: $(
136
+ /* @__PURE__ */ e(u, { variant: "Small", children: M(
137
137
  c.total_cash_accounts,
138
138
  l.length
139
139
  ) }),
@@ -141,8 +141,8 @@ const V = () => {
141
141
  ] }),
142
142
  /* @__PURE__ */ e(D, {}),
143
143
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
144
- /* @__PURE__ */ e(u, { variant: "Small", children: $(c.expenses_due, d.length) }),
145
- /* @__PURE__ */ e(L, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
144
+ /* @__PURE__ */ e(u, { variant: "Small", children: M(c.expenses_due, d.length) }),
145
+ /* @__PURE__ */ e(L, { amount: S, bold: !0, symbol: "-", variant: "XSmall" })
146
146
  ] }),
147
147
  /* @__PURE__ */ e(D, {}),
148
148
  /* @__PURE__ */ e(
@@ -162,17 +162,17 @@ const V = () => {
162
162
  /* @__PURE__ */ e(D, {}),
163
163
  /* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
164
164
  /* @__PURE__ */ e(u, { variant: "Small", children: c.next_paycheck }),
165
- /* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: $(c.days, r) })
165
+ /* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: M(c.days, r) })
166
166
  ] })
167
167
  ] }) }) : /* @__PURE__ */ e(oe, { height: t ? 210 : 120 });
168
- }, Ct = T(yt), wt = ({
168
+ }, Ct = T(yt), St = ({
169
169
  onPrimaryCtaClick: a,
170
170
  onSecondaryCtaClick: n,
171
171
  sx: t = {}
172
172
  }) => {
173
- const { cashflow: i } = N(), { isCopyLoaded: g, isInitialized: x } = X(), { loadRepeatingTransactions: m, income: p, isDataLoaded: c, setDateRange: r } = q();
173
+ const { cashflow: i } = O(), { isCopyLoaded: g, isInitialized: x } = X(), { loadRepeatingTransactions: m, income: p, isDataLoaded: c, setDateRange: r } = q();
174
174
  f.useEffect(() => {
175
- x && (r({ start: W(), end: Xe(W(), 1) }), m().finally());
175
+ x && (r({ start: $(), end: Xe($(), 1) }), m().finally());
176
176
  }, [x]);
177
177
  const d = c && !p.length;
178
178
  return g ? /* @__PURE__ */ o(
@@ -200,7 +200,7 @@ const V = () => {
200
200
  ]
201
201
  }
202
202
  ) : /* @__PURE__ */ e(oe, {});
203
- }, Fn = T(wt), St = ({ remaining: a }) => /* @__PURE__ */ e(
203
+ }, Fn = T(St), wt = ({ remaining: a }) => /* @__PURE__ */ e(
204
204
  ae,
205
205
  {
206
206
  sx: {
@@ -235,7 +235,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
235
235
  ] }),
236
236
  /* @__PURE__ */ e(D, {})
237
237
  ] }), Te = T(_t), It = ({ total: a, type: n }) => {
238
- const { cashflow: t } = N();
238
+ const { cashflow: t } = O();
239
239
  return /* @__PURE__ */ o(P, { children: [
240
240
  /* @__PURE__ */ o(
241
241
  nt,
@@ -260,8 +260,8 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
260
260
  ),
261
261
  /* @__PURE__ */ e(D, {})
262
262
  ] });
263
- }, Re = T(It), ce = (a, n) => (t) => t.accountGuid === a.guid && ($e(t.expectedDate) || Me(t.expectedDate, n.start)) && We(t.expectedDate, n.end), Dt = () => {
264
- const { availableWidth: a } = de(), { cashflow: n } = N(), { upcomingExpenses: t, upcomingIncome: i } = q(), { dateRange: g, selectedCashAccounts: x } = V();
263
+ }, Re = T(It), ce = (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 } = de(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: i } = q(), { dateRange: g, selectedCashAccounts: x } = V();
265
265
  return /* @__PURE__ */ o(s, { children: [
266
266
  /* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
267
267
  /* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
@@ -321,7 +321,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
321
321
  }
322
322
  ) }),
323
323
  /* @__PURE__ */ e(
324
- St,
324
+ wt,
325
325
  {
326
326
  remaining: (m.available_balance || m.balance || 0) + r - d
327
327
  }
@@ -333,7 +333,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
333
333
  }) })
334
334
  ] });
335
335
  }, vt = T(Dt), At = () => {
336
- const { availableWidth: a } = de(), n = le(), { cashflow: t } = N(), { upcomingExpenses: i, upcomingIncome: g } = q(), { dateRange: x, selectedCashAccounts: m } = V(), p = [
336
+ const { availableWidth: a } = de(), n = le(), { cashflow: t } = O(), { upcomingExpenses: i, upcomingIncome: g } = q(), { dateRange: x, selectedCashAccounts: m } = V(), p = [
337
337
  {
338
338
  field: "account",
339
339
  flex: 1.5,
@@ -393,9 +393,9 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
393
393
  }
394
394
  ], c = f.useMemo(() => m.map((r) => {
395
395
  const d = i.filter(
396
- ce(r, { start: W(), end: we(W(), 30) })
396
+ ce(r, { start: $(), end: Se($(), 30) })
397
397
  ).reduce((C, _) => C + _.amount, 0), l = g.filter(
398
- ce(r, { start: W(), end: we(W(), 30) })
398
+ ce(r, { start: $(), end: Se($(), 30) })
399
399
  ).reduce((C, _) => C + _.amount, 0), b = (r.balance || 0) + l - d;
400
400
  return {
401
401
  account: r,
@@ -569,7 +569,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
569
569
  }
570
570
  );
571
571
  }, Et = T(At), Tt = () => {
572
- const { cashflow: a } = N(), { isDesktop: n } = pe(), { onEvent: t } = ke(), [i, g] = f.useState(0), x = (m, p) => {
572
+ const { cashflow: a } = O(), { isDesktop: n } = pe(), { onEvent: t } = ke(), [i, g] = f.useState(0), x = (m, p) => {
573
573
  g(p);
574
574
  };
575
575
  return f.useEffect(() => {
@@ -611,8 +611,8 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
611
611
  }
612
612
  ),
613
613
  /* @__PURE__ */ e(I, { sx: { mb: 32 } }),
614
- /* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Et, {}) }) }),
615
- /* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(vt, {}) }) })
614
+ /* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Et, {}) }) }),
615
+ /* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(vt, {}) }) })
616
616
  ] });
617
617
  }, Rt = T(Tt), se = ({
618
618
  amount: a,
@@ -638,17 +638,17 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
638
638
  n && /* @__PURE__ */ e(L, { amount: a, component: "h2", symbol: g, variant: "Small" })
639
639
  ]
640
640
  }
641
- ), Le = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && ($e(t.expectedDate) || Me(t.expectedDate, n.start)) && We(t.expectedDate, n.end), Lt = () => {
642
- 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(
641
+ ), Le = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Me(t.expectedDate) || We(t.expectedDate, n.start)) && $e(t.expectedDate, n.end), Lt = () => {
642
+ const { availableWidth: a } = de(), { cashflow: n } = O(), { 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(
643
643
  () => g.filter(Le(m, p)),
644
644
  [p, m, g]
645
645
  ), b = f.useMemo(
646
646
  () => x.filter(Le(m, p)),
647
647
  [p, m, x]
648
648
  ), C = f.useMemo(
649
- () => c.reduce((w, A) => w + (A?.balance || 0), 0),
649
+ () => c.reduce((S, A) => S + (A?.balance || 0), 0),
650
650
  [c]
651
- ), _ = l.reduce((w, A) => w + A.amount, 0), k = b.reduce((w, A) => w + A.amount, 0), v = C - _ + k, F = i && t.length > 0, h = a < 725;
651
+ ), _ = l.reduce((S, A) => S + A.amount, 0), k = b.reduce((S, A) => S + A.amount, 0), v = C - _ + k, F = i && t.length > 0, h = a < 725;
652
652
  return /* @__PURE__ */ o(s, { sx: { mx: h ? 16 : 0, my: h ? 24 : 42 }, children: [
653
653
  /* @__PURE__ */ o(
654
654
  s,
@@ -665,7 +665,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
665
665
  {
666
666
  amount: C,
667
667
  isMobile: h,
668
- label: $(n.cash_and_bank, c.length)
668
+ label: M(n.cash_and_bank, c.length)
669
669
  }
670
670
  ),
671
671
  h && /* @__PURE__ */ e(D, {}),
@@ -695,7 +695,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
695
695
  {
696
696
  amount: _,
697
697
  isMobile: h,
698
- label: $(n.to_be_paid_out, l.length),
698
+ label: M(n.to_be_paid_out, l.length),
699
699
  symbol: h ? "-" : void 0
700
700
  }
701
701
  ),
@@ -731,8 +731,8 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
731
731
  }
732
732
  )
733
733
  ] });
734
- }, Nt = T(Lt), Ot = ({ handleNextStep: a }) => {
735
- const { completeOnboarding: n } = he(), { cashflow: t } = N(), i = le();
734
+ }, Ot = T(Lt), Nt = ({ handleNextStep: a }) => {
735
+ const { completeOnboarding: n } = he(), { cashflow: t } = O(), i = le();
736
736
  return /* @__PURE__ */ o(s, { children: [
737
737
  /* @__PURE__ */ e(ue, { pb: 12, children: t.welcome_title }),
738
738
  /* @__PURE__ */ e(
@@ -745,9 +745,9 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
745
745
  children: t.welcome_sub_title
746
746
  }
747
747
  ),
748
- /* @__PURE__ */ e(O, { pb: 32, children: t.welcome_description }),
748
+ /* @__PURE__ */ e(N, { pb: 32, children: t.welcome_description }),
749
749
  /* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
750
- /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
750
+ /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
751
751
  /* @__PURE__ */ e(
752
752
  I,
753
753
  {
@@ -763,7 +763,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
763
763
  ),
764
764
  t.bullet_one
765
765
  ] }),
766
- /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
766
+ /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
767
767
  /* @__PURE__ */ e(
768
768
  I,
769
769
  {
@@ -779,7 +779,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
779
779
  ),
780
780
  t.bullet_two
781
781
  ] }),
782
- /* @__PURE__ */ o(O, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
782
+ /* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
783
783
  /* @__PURE__ */ e(
784
784
  I,
785
785
  {
@@ -801,25 +801,25 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
801
801
  /* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
802
802
  ] })
803
803
  ] });
804
- }, kt = T(Ot), Ne = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", ze = {
805
- CASHFLOW_ONBOARDING: `${Ne}/cashflow-onboarding.png`,
806
- CASHFLOW_LOADING_ANIMATION: `${Ne}/loading-animation.gif`
804
+ }, kt = T(Nt), 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`
807
807
  }, Ht = () => {
808
- const { cashflow: a } = N();
808
+ const { cashflow: a } = O();
809
809
  return /* @__PURE__ */ o(f.Fragment, { children: [
810
810
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: ze.CASHFLOW_LOADING_ANIMATION }) }),
811
811
  /* @__PURE__ */ e(ue, { pb: 12, children: a.loading_title }),
812
- /* @__PURE__ */ e(O, { children: a.loading_description })
812
+ /* @__PURE__ */ e(N, { children: a.loading_description })
813
813
  ] });
814
- }, Ft = T(Ht), Mt = at`
814
+ }, Ft = T(Ht), Wt = at`
815
815
  from {
816
816
  transform: rotate(0deg);
817
817
  }
818
818
  to {
819
819
  transform: rotate(360deg);
820
820
  }
821
- `, Wt = () => {
822
- 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), [v, F] = f.useState(pt.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(""), M = f.useMemo(
821
+ `, $t = () => {
822
+ const { addRepeatingTransaction: a, repeatingTransactions: n } = q(), { cashflow: t, common: i } = O(), { 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), [v, F] = f.useState(pt.EveryMonth), [h, S] = f.useState(1), [A, w] = f.useState(15), [z, re] = ee(!1), [K, J] = ee(1), [R, me] = ee([]), [Z, H] = ee(""), W = f.useMemo(
823
823
  () => b.find((y) => y.guid === Z),
824
824
  [Z, b]
825
825
  ), Be = !!n.filter(
@@ -827,8 +827,8 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
827
827
  ).length, be = async () => {
828
828
  J(2), r(
829
829
  // Beginning of the month, 90 days before today
830
- mt(je(W(), 90)),
831
- W()
830
+ mt(je($(), 90)),
831
+ $()
832
832
  ), l({ ...d, custom: _e }), J(3);
833
833
  }, Ue = async () => {
834
834
  if (!(R.length < 1)) {
@@ -841,8 +841,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
841
841
  //user
842
842
  merchant_guid: E.merchant_guid,
843
843
  description: E.feed_description || E.description,
844
- // Do I need to use format here instead of formatISO?
845
- predicted_occurs_on: dt(xe, "yyyy-MM-dd"),
844
+ predicted_occurs_on: dt(xe, { representation: "date" }),
846
845
  recurrence_day: xe.getDay(),
847
846
  recurrence_type: v,
848
847
  repeating_transaction_type: De.Income,
@@ -854,7 +853,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
854
853
  }
855
854
  await x();
856
855
  }
857
- }, Pe = !M && _ || !M && R.length < 1;
856
+ }, Pe = !W && _ || !W && R.length < 1;
858
857
  return c ? /* @__PURE__ */ o(
859
858
  I,
860
859
  {
@@ -895,8 +894,8 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
895
894
  },
896
895
  children: [
897
896
  /* @__PURE__ */ e(ue, { pb: 12, children: t.add_income_title }),
898
- /* @__PURE__ */ e(O, { mb: 24, children: t.add_income_description }),
899
- R.length > 0 && !M && /* @__PURE__ */ o(P, { children: [
897
+ /* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
898
+ R.length > 0 && !W && /* @__PURE__ */ o(P, { children: [
900
899
  /* @__PURE__ */ e(ne, { children: R.map((y, E) => /* @__PURE__ */ o(f.Fragment, { children: [
901
900
  /* @__PURE__ */ e(ut, { bgcolor: "background.paper", children: ft(
902
901
  U(y.nextDate || y.date)
@@ -929,31 +928,31 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
929
928
  }
930
929
  }
931
930
  ),
932
- !Be && m && /* @__PURE__ */ e(O, { color: "error", mt: 16, children: t.confirm_error }),
933
- M && /* @__PURE__ */ o(P, { children: [
931
+ !Be && m && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
932
+ W && /* @__PURE__ */ o(P, { children: [
934
933
  /* @__PURE__ */ e(
935
934
  lt,
936
935
  {
937
936
  bgcolor: "background.paper",
938
937
  firstDay: h,
939
938
  frequency: v,
940
- onFirstDayChange: w,
939
+ onFirstDayChange: S,
941
940
  onFrequencyChange: F,
942
- onSecondDayChange: S,
941
+ onSecondDayChange: w,
943
942
  secondDay: A,
944
- transaction: M
943
+ transaction: W
945
944
  }
946
945
  ),
947
946
  /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
948
947
  /* @__PURE__ */ e(
949
948
  G,
950
949
  {
951
- "aria-disabled": !M,
950
+ "aria-disabled": !W,
952
951
  onClick: () => {
953
952
  const y = [...R];
954
953
  y.push({
955
- ...M,
956
- nextDate: ve(v, Ie(M.date)),
954
+ ...W,
955
+ nextDate: ve(v, Ie(W.date)),
957
956
  frequency: v
958
957
  }), me(y), H("");
959
958
  },
@@ -973,7 +972,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
973
972
  )
974
973
  ] })
975
974
  ] }),
976
- R.length > 0 && !M && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
975
+ R.length > 0 && !W && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
977
976
  /* @__PURE__ */ e(
978
977
  G,
979
978
  {
@@ -984,7 +983,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
984
983
  {
985
984
  name: "progress_activity",
986
985
  sx: {
987
- animation: `${Mt} 2s linear infinite`
986
+ animation: `${Wt} 2s linear infinite`
988
987
  }
989
988
  }
990
989
  ) : null,
@@ -1000,35 +999,35 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
1000
999
  ]
1001
1000
  }
1002
1001
  ) : /* @__PURE__ */ e(oe, {});
1003
- }, $t = T(Wt), Gt = ({ onBackClick: a, sx: n = {} }) => {
1002
+ }, Mt = T($t), Gt = ({ onBackClick: a, sx: n = {} }) => {
1004
1003
  const {
1005
1004
  selectedAccounts: t,
1006
1005
  selectedAccountGuids: i,
1007
1006
  setSelectedAccounts: g,
1008
1007
  shouldDisableNextDate: x,
1009
1008
  shouldDisablePrevDate: m
1010
- } = X(), { onEvent: p } = ke(), { clientConfig: c } = Ve(), { visibleCashAccounts: r } = Oe(), { setFilter: d } = Fe(), { userProfile: l } = He(), { dateRange: b, setSelectedCashAccounts: C } = V(), { loadRepeatingTransactions: _, income: k, isDataLoaded: v, 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);
1009
+ } = X(), { onEvent: p } = ke(), { clientConfig: c } = Ve(), { visibleCashAccounts: r } = Ne(), { setFilter: d } = Fe(), { userProfile: l } = He(), { dateRange: b, setSelectedCashAccounts: C } = V(), { loadRepeatingTransactions: _, income: k, isDataLoaded: v, setDateRange: F } = q(), { cashflow: h, recurring: S } = O(), { isCopyLoaded: A, isInitialized: w } = X(), re = c?.master?.deep_link_params?.view === "manage_income", [K, J] = f.useState(re);
1011
1010
  f.useEffect(() => {
1012
- S && (F(b), _().finally());
1013
- }, [S]), f.useEffect(() => {
1011
+ w && (F(b), _().finally());
1012
+ }, [w]), f.useEffect(() => {
1014
1013
  g(r);
1015
1014
  }, [r]), f.useEffect(() => {
1016
1015
  const me = r.map((H) => H.guid), Z = t.filter(
1017
1016
  (H) => i.includes(H.guid) && me.includes(H.guid)
1018
1017
  );
1019
1018
  C(Z), d({
1020
- dateRange: { start: je(W(), 90), end: gt() },
1019
+ dateRange: { start: je($(), 90), end: gt() },
1021
1020
  accounts: Z.map((H) => H.guid)
1022
1021
  });
1023
1022
  }, [r, t]);
1024
1023
  const R = v && !l?.has_completed_cash_flow_onboarding && !k.length;
1025
- return !A || !S ? /* @__PURE__ */ e(oe, {}) : R ? /* @__PURE__ */ e(
1024
+ return !A || !w ? /* @__PURE__ */ e(oe, {}) : R ? /* @__PURE__ */ e(
1026
1025
  Ae,
1027
1026
  {
1028
1027
  onBackClick: a,
1029
1028
  sx: { height: "100%", overflow: "auto" },
1030
1029
  title: h.title,
1031
- children: /* @__PURE__ */ e($t, {})
1030
+ children: /* @__PURE__ */ e(Mt, {})
1032
1031
  }
1033
1032
  ) : /* @__PURE__ */ o(
1034
1033
  Ae,
@@ -1036,7 +1035,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
1036
1035
  accountOptions: r,
1037
1036
  actions: [
1038
1037
  {
1039
- label: w.action_title,
1038
+ label: S.action_title,
1040
1039
  iconName: "credit_card_gear",
1041
1040
  onClick: () => {
1042
1041
  J(!0), p(Ee.CASH_FLOW_CLICK_SETTINGS);
@@ -1057,7 +1056,7 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
1057
1056
  sx: n,
1058
1057
  title: h.title,
1059
1058
  children: [
1060
- /* @__PURE__ */ e(Nt, {}),
1059
+ /* @__PURE__ */ e(Ot, {}),
1061
1060
  /* @__PURE__ */ e(Rt, {}),
1062
1061
  /* @__PURE__ */ e(
1063
1062
  Ge,
@@ -1066,15 +1065,15 @@ const _t = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
1066
1065
  isOpen: K,
1067
1066
  onClose: () => J(!1),
1068
1067
  shouldShowHeaderBorders: !1,
1069
- title: w.action_title,
1068
+ title: S.action_title,
1070
1069
  children: /* @__PURE__ */ e(Ze, { defaultSelectedTab: re ? 1 : 0 })
1071
1070
  }
1072
1071
  )
1073
1072
  ]
1074
1073
  }
1075
1074
  );
1076
- }, Mn = T(Gt);
1077
- class Wn {
1075
+ }, Wn = T(Gt);
1076
+ class $n {
1078
1077
  fetchInstance;
1079
1078
  constructor(n, t, i) {
1080
1079
  this.fetchInstance = new bt(n, t, void 0, i);
@@ -1094,9 +1093,9 @@ class Wn {
1094
1093
  updateCashflowSequence = async (n) => this.fetchInstance.put(`${B.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
1095
1094
  }
1096
1095
  export {
1097
- Wn as CashflowApi,
1096
+ $n as CashflowApi,
1098
1097
  Fn as CashflowMiniWidget,
1099
- $t as CashflowOnboarding,
1098
+ Mt as CashflowOnboarding,
1100
1099
  jn as CashflowStore,
1101
- Mn as CashflowWidget
1100
+ Wn as CashflowWidget
1102
1101
  };
@@ -30,7 +30,7 @@ import Ue from "@mui/material/AccordionSummary";
30
30
  import Ve from "@mui/material/CardHeader";
31
31
  import { u as Ye } from "../useDimensions-27p2evRx.mjs";
32
32
  import { C as qe } from "../ConnectionsDrawer-DHJ7qdWL.mjs";
33
- import { R as Je } from "../RecurringSettings-ne0-dOPO.mjs";
33
+ import { R as Je } from "../RecurringSettings-BNdAIXRE.mjs";
34
34
  import Qe from "@mui/material/TextField";
35
35
  import { u as Ce } from "../useScreenSize-B6JyS_Lj.mjs";
36
36
  import { a as Ze } from "../Dialog-CWW597AF.mjs";
@@ -8,8 +8,8 @@ import { startOfToday as ue } from "date-fns/startOfToday";
8
8
  import { subDays as me } from "date-fns/subDays";
9
9
  import ae from "@mui/material/Skeleton";
10
10
  import c from "@mui/material/Stack";
11
- import { R as Ee } from "../RecurringSettings-ne0-dOPO.mjs";
12
- import { M as En } from "../RecurringSettings-ne0-dOPO.mjs";
11
+ import { R as Ee } from "../RecurringSettings-BNdAIXRE.mjs";
12
+ import { M as En } from "../RecurringSettings-BNdAIXRE.mjs";
13
13
  import { addMonths as ze } from "date-fns/addMonths";
14
14
  import { subMonths as Fe } from "date-fns/subMonths";
15
15
  import { isBefore as Ue } from "date-fns/isBefore";
@@ -41,8 +41,8 @@ import ct from "@mui/material/ListSubheader";
41
41
  import lt from "@mui/material/ListItemAvatar";
42
42
  import dt from "@mui/material/ListItemButton";
43
43
  import ut from "@mui/material/ListItemText";
44
- import { b as mt } from "../ManageIncome-BBRG0iBz.mjs";
45
- import { c as kn, M as Wn, S as $n } from "../ManageIncome-BBRG0iBz.mjs";
44
+ import { b as mt } from "../ManageIncome-DYH2F4Sj.mjs";
45
+ import { c as kn, M as Wn, S as $n } from "../ManageIncome-DYH2F4Sj.mjs";
46
46
  import { f as L } from "../NumberFormatting-Buh7u8Oi.mjs";
47
47
  import { D as xe } from "../Drawer-kEE73B87.mjs";
48
48
  import { b as N } from "../Localization-2MODESHW.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "7.2.13-alpha.mm1",
3
+ "version": "7.2.13-alpha.mm2",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",