@mx-cartographer/experiences 7.11.21 → 7.11.23

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,7 +1,7 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import d from "react";
3
3
  import { observer as E } from "mobx-react-lite";
4
- import K from "@mui/material/Box";
4
+ import F from "@mui/material/Box";
5
5
  import de from "@mui/material/Divider";
6
6
  import ue from "@mui/material/List";
7
7
  import le from "@mui/material/Paper";
@@ -16,18 +16,18 @@ import Oe from "@mui/material/TextField";
16
16
  import { u as pe } from "./useAriaLive-MkYebyUR.mjs";
17
17
  import { O as y } from "./Transaction-B_2AG36b.mjs";
18
18
  import { u as I, h as O, m as We, d as Ye, l as Le, g as w, b as Xe, o as je } from "./hooks-BxkfR-Ff.mjs";
19
- import { A as F } from "./Analytics-i5h6BxR1.mjs";
19
+ import { A as H } from "./Analytics-i5h6BxR1.mjs";
20
20
  import qe from "@mui/material/ToggleButton";
21
21
  import we from "@mui/material/styles/useTheme";
22
22
  import { ChevronRight as Re, Icon as D, Delete as _e, Cancel as me, Search as Je, Edit as Qe, Flag as Ze } from "@mxenabled/mx-icons";
23
23
  import { fromUnixTime as Se } from "date-fns/fromUnixTime";
24
- import H from "@mui/material/Avatar";
25
- import G from "@mui/material/ListItem";
26
- import U from "@mui/material/ListItemAvatar";
27
- import B from "@mui/material/ListItemText";
24
+ import U from "@mui/material/Avatar";
25
+ import B from "@mui/material/ListItem";
26
+ import V from "@mui/material/ListItemAvatar";
27
+ import $ from "@mui/material/ListItemText";
28
28
  import { f as Me, D as ke } from "./DateFormats-BMpMrZpW.mjs";
29
- import V from "@mui/material/ListItemButton";
30
- import z from "@mui/material/ListItemIcon";
29
+ import z from "@mui/material/ListItemButton";
30
+ import W from "@mui/material/ListItemIcon";
31
31
  import { a as Pe } from "./CategorySelectorDrawer-5n6Pil_E.mjs";
32
32
  import { b as et, T as tt, u as J } from "./StatusIndicator-wyBzyHJc.mjs";
33
33
  import { D as q } from "./Dialog-DdCwLgrl.mjs";
@@ -68,7 +68,7 @@ const dt = [
68
68
  }) => {
69
69
  const { budgets: m } = I();
70
70
  return /* @__PURE__ */ e(d.Fragment, { children: /* @__PURE__ */ l(
71
- K,
71
+ F,
72
72
  {
73
73
  sx: {
74
74
  bgcolor: "background.paper",
@@ -189,11 +189,11 @@ const gt = E(({ transaction: t }) => {
189
189
  deleteMerchantBudget: h,
190
190
  getMerchantBudgetByMerchantGuid: f,
191
191
  alert: L,
192
- setAlert: M
193
- } = We(), { setFilter: S } = O(), { accounts: T } = Ye(), R = p.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: C, common: Q } = I(), { announce: ge, ariaLive: he } = pe(), [Z, ee] = d.useState(!1), W = t?.merchant_guid ? f(t.merchant_guid) : void 0, te = () => {
192
+ setAlert: k
193
+ } = We(), { setFilter: S } = O(), { accounts: T } = Ye(), R = p.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: C, common: Q } = I(), { announce: ge, ariaLive: he } = pe(), [Z, ee] = d.useState(!1), K = t?.merchant_guid ? f(t.merchant_guid) : void 0, te = () => {
194
194
  u(n), i(null), a("");
195
195
  }, ye = () => {
196
- W ? ee(!0) : i(
196
+ K ? ee(!0) : i(
197
197
  "create"
198
198
  /* CREATE */
199
199
  );
@@ -240,7 +240,7 @@ const gt = E(({ transaction: t }) => {
240
240
  t.description
241
241
  ),
242
242
  apiTrigger: async () => await g({
243
- ...W,
243
+ ...K,
244
244
  amount: Number(r)
245
245
  })
246
246
  },
@@ -263,23 +263,23 @@ const gt = E(({ transaction: t }) => {
263
263
  C.success_alert_delete_merchant_budget,
264
264
  t.description
265
265
  ),
266
- apiTrigger: async () => await h(W.guid)
266
+ apiTrigger: async () => await h(K.guid)
267
267
  }
268
- }, k = async () => {
268
+ }, P = async () => {
269
269
  if (c.current) return;
270
270
  c.current = !0;
271
- const { apiTrigger: $, successAlertMessage: P, errorAlertMessage: Te } = b[n], { isSuccess: Ce } = await $(), ve = Ce ? P : Te;
272
- te(), s(!Ce), M(ve), ge(ve), Ce && n === "delete" && ee(!1), c.current = !1;
271
+ const { apiTrigger: M, successAlertMessage: G, errorAlertMessage: Te } = b[n], { isSuccess: Ce } = await M(), ve = Ce ? G : Te;
272
+ te(), s(!Ce), k(ve), ge(ve), Ce && n === "delete" && ee(!1), c.current = !1;
273
273
  };
274
274
  d.useEffect(() => {
275
- const $ = {
275
+ const M = {
276
276
  start: nt(new Date(t.date * 1e3)),
277
277
  end: ot(new Date(t.date * 1e3))
278
278
  };
279
279
  S({
280
- accounts: T.map((P) => P.guid),
281
- custom: Z ? (P) => P.merchant_guid === t.merchant_guid : (P) => P.guid === t.guid,
282
- dateRange: $
280
+ accounts: T.map((G) => G.guid),
281
+ custom: Z ? (G) => G.merchant_guid === t.merchant_guid : (G) => G.guid === t.guid,
282
+ dateRange: M
283
283
  });
284
284
  }, [Z, t, T]);
285
285
  const A = () => /* @__PURE__ */ e(
@@ -287,7 +287,7 @@ const gt = E(({ transaction: t }) => {
287
287
  {
288
288
  actionText: C.autogenerate_budgets_error_primary_button,
289
289
  autoHideDuration: 3500,
290
- handleClose: () => M(""),
290
+ handleClose: () => k(""),
291
291
  message: L,
292
292
  multiLine: !0,
293
293
  onActionClick: b[m]?.errorRetryAction,
@@ -320,26 +320,28 @@ const gt = E(({ transaction: t }) => {
320
320
  );
321
321
  return /* @__PURE__ */ l(d.Fragment, { children: [
322
322
  he,
323
- /* @__PURE__ */ e(G, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(V, { onClick: ye, children: [
324
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: R }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "bubble_chart", sx: { color: "text.primary" } }) }) }),
323
+ /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(z, { onClick: ye, children: [
324
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: R }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "bubble_chart", sx: { color: "text.primary" } }) }) }),
325
325
  /* @__PURE__ */ e(
326
- B,
326
+ $,
327
327
  {
328
328
  primary: C.add_merchant_budget_primary_text,
329
329
  primaryTypographyProps: { variant: "caption" },
330
- secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: W ? `${X(W.amount, "0,0.00")} / ${Q.month_text}` : C.add_merchant_budget_secondary_text })
330
+ secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: K ? `${X(K.amount, "0,0.00")} / ${Q.month_text}` : C.add_merchant_budget_secondary_text })
331
331
  }
332
332
  ),
333
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
333
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
334
334
  ] }) }),
335
- !!W && /* @__PURE__ */ e(
335
+ !!K && /* @__PURE__ */ e(
336
336
  pt,
337
337
  {
338
338
  isOpen: Z,
339
- merchantBudget: W,
339
+ merchantBudget: K,
340
340
  onClose: () => ee(!1),
341
341
  renderingToast: () => L && A(),
342
- setCurrencyDialogAction: i,
342
+ setCurrencyDialogAction: (M) => {
343
+ M === "edit" && a(K?.amount.toString() || ""), i(M);
344
+ },
343
345
  transaction: t
344
346
  }
345
347
  ),
@@ -350,7 +352,7 @@ const gt = E(({ transaction: t }) => {
350
352
  content: b[n].content,
351
353
  handleInputChange: a,
352
354
  handleModalClose: te,
353
- handlePrimaryAction: k,
355
+ handlePrimaryAction: P,
354
356
  handleSecondaryAction: te,
355
357
  inputLabel: n !== "delete" ? Q.amount_text : "",
356
358
  inputValue: r,
@@ -364,7 +366,7 @@ const gt = E(({ transaction: t }) => {
364
366
  ] });
365
367
  }), ht = ({ transaction: t }) => {
366
368
  const { addOrUpdateTransactionRule: n, updateTransaction: i } = O(), { categories: r } = Le(), { onEvent: a } = w(), { setShouldDisableDrawerScroll: o, updateManualTransaction: s } = J(), { transactions: c } = I(), m = j(), [u, p] = d.useState(!1), [_, g] = d.useState(""), h = async (T) => {
367
- await i({ ...t, category_guid: _ }), T && await n(_, t), g(""), a(F.TRANSACTION_DETAILS_CLICK_CATEGORY, {
369
+ await i({ ...t, category_guid: _ }), T && await n(_, t), g(""), a(H.TRANSACTION_DETAILS_CLICK_CATEGORY, {
368
370
  transaction_guid: t.guid
369
371
  });
370
372
  }, f = (T) => {
@@ -381,19 +383,19 @@ const gt = E(({ transaction: t }) => {
381
383
  L();
382
384
  }, L = () => {
383
385
  p(!1), o(!1);
384
- }, M = d.useMemo(
386
+ }, k = d.useMemo(
385
387
  () => r.find((T) => T.guid === _),
386
388
  [_]
387
389
  ), S = m.palette.mode === "dark" ? "grey.800" : "grey.100";
388
- return /* @__PURE__ */ l(G, { disableGutters: !0, disablePadding: !0, children: [
390
+ return /* @__PURE__ */ l(B, { disableGutters: !0, disablePadding: !0, children: [
389
391
  /* @__PURE__ */ l(
390
- V,
392
+ z,
391
393
  {
392
394
  onClick: () => {
393
395
  a(y.ON_TRANSACTION_CATEGORY_CLICK), p(!0);
394
396
  },
395
397
  children: [
396
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: S }, variant: "rounded", children: /* @__PURE__ */ e(
398
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: S }, variant: "rounded", children: /* @__PURE__ */ e(
397
399
  Ne,
398
400
  {
399
401
  categoryGuid: t.top_level_category_guid,
@@ -403,14 +405,14 @@ const gt = E(({ transaction: t }) => {
403
405
  }
404
406
  ) }) }),
405
407
  /* @__PURE__ */ e(
406
- B,
408
+ $,
407
409
  {
408
410
  primary: c.category_title,
409
411
  primaryTypographyProps: { variant: "XSmall" },
410
412
  secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "Body", children: t.category ?? c.actions_select_a_category })
411
413
  }
412
414
  ),
413
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
415
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
414
416
  ]
415
417
  }
416
418
  ),
@@ -442,7 +444,7 @@ const gt = E(({ transaction: t }) => {
442
444
  children: /* @__PURE__ */ e(Y, { variant: "Paragraph", children: N(
443
445
  c.actions_all_past_and_future,
444
446
  t.description,
445
- M?.name
447
+ k?.name
446
448
  ) })
447
449
  }
448
450
  )
@@ -455,26 +457,26 @@ const gt = E(({ transaction: t }) => {
455
457
  r({ ...t, date: u }), m(!1);
456
458
  return;
457
459
  }
458
- await i({ ...t, date: u }), n(F.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), m(!1);
460
+ await i({ ...t, date: u }), n(H.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), m(!1);
459
461
  }, h = s.palette.mode === "dark" ? "grey.800" : "grey.100";
460
- return /* @__PURE__ */ l(G, { className: "mx-txn-date-action", disableGutters: !0, disablePadding: !0, children: [
462
+ return /* @__PURE__ */ l(B, { className: "mx-txn-date-action", disableGutters: !0, disablePadding: !0, children: [
461
463
  /* @__PURE__ */ l(
462
- V,
464
+ z,
463
465
  {
464
466
  onClick: () => {
465
467
  n(y.ON_TRANSACTION_DATE_CLICK), m(!0);
466
468
  },
467
469
  children: [
468
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: h }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "calendar_month", sx: { color: "text.primary" } }) }) }),
470
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: h }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "calendar_month", sx: { color: "text.primary" } }) }) }),
469
471
  /* @__PURE__ */ e(
470
- B,
472
+ $,
471
473
  {
472
474
  primary: o.date_title,
473
475
  primaryTypographyProps: { variant: "XSmall" },
474
476
  secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "Body", children: Me(Se(t.date), ke.YEAR_MONTH_DAY) })
475
477
  }
476
478
  ),
477
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
479
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
478
480
  ]
479
481
  }
480
482
  ),
@@ -508,23 +510,23 @@ const gt = E(({ transaction: t }) => {
508
510
  const { onEvent: n } = w(), { removeTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: a, transactions: o } = I(), [s, c] = d.useState(!1), m = async () => {
509
511
  await i(t.guid), n(y.ON_TRANSACTION_DELETE_DELETED);
510
512
  };
511
- return /* @__PURE__ */ l(K, { className: "mx-txn-delete", children: [
512
- t && /* @__PURE__ */ e(G, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
513
- V,
513
+ return /* @__PURE__ */ l(F, { className: "mx-txn-delete", children: [
514
+ t && /* @__PURE__ */ e(B, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
515
+ z,
514
516
  {
515
517
  onClick: () => {
516
518
  n(y.ON_TRANSACTION_DELETE_CLICK), r(!0), c(!0);
517
519
  },
518
520
  children: [
519
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { variant: "rounded", children: /* @__PURE__ */ e(_e, { color: "secondary", fontSize: "small" }) }) }),
521
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { variant: "rounded", children: /* @__PURE__ */ e(_e, { color: "secondary", fontSize: "small" }) }) }),
520
522
  /* @__PURE__ */ e(
521
- B,
523
+ $,
522
524
  {
523
525
  primary: o.manual_transaction_delete_title,
524
526
  secondary: o.manual_transaction_delete_subtitle
525
527
  }
526
528
  ),
527
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(_e, {}) })
529
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(_e, {}) })
528
530
  ]
529
531
  }
530
532
  ) }),
@@ -546,21 +548,21 @@ const gt = E(({ transaction: t }) => {
546
548
  ] });
547
549
  }, Ct = E(Tt), bt = ({ transaction: t }) => {
548
550
  const { onEvent: n } = w(), { updateTransaction: i } = O(), { setShouldDisableDrawerScroll: r } = J(), { common: a, transactions: o } = I(), s = j(), [c, m] = d.useState(!1), u = async () => {
549
- await i({ ...t, merchant_guid: "" }), n(F.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
551
+ await i({ ...t, merchant_guid: "" }), n(H.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
550
552
  transaction_guid: t.guid
551
553
  });
552
554
  }, p = s.palette.mode === "dark" ? "grey.800" : "grey.100";
553
- return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ l(G, { className: "mx-txn-delete-logo", disableGutters: !0, disablePadding: !0, children: [
555
+ return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ l(B, { className: "mx-txn-delete-logo", disableGutters: !0, disablePadding: !0, children: [
554
556
  /* @__PURE__ */ l(
555
- V,
557
+ z,
556
558
  {
557
559
  onClick: () => {
558
560
  n(y.ON_TRANSACTION_DELETE_LOGO_CLICK), m(!0);
559
561
  },
560
562
  children: [
561
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: p }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "delete", sx: { color: "text.primary" } }) }) }),
562
- /* @__PURE__ */ e(B, { primary: o.merchant_logo_title, secondary: o.merchant_logo_desc }),
563
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
563
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: p }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "delete", sx: { color: "text.primary" } }) }) }),
564
+ /* @__PURE__ */ e($, { primary: o.merchant_logo_title, secondary: o.merchant_logo_desc }),
565
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
564
566
  ]
565
567
  }
566
568
  ),
@@ -590,9 +592,9 @@ const gt = E(({ transaction: t }) => {
590
592
  u ? y.ON_TRANSACTION_UNHIDDEN : y.ON_TRANSACTION_HIDDEN
591
593
  );
592
594
  }, _ = s.palette.mode === "dark" ? "grey.800" : "grey.100";
593
- return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ l(G, { className: "mx-txn-hide-transaction", disableGutters: !0, disablePadding: !0, children: [
595
+ return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ l(B, { className: "mx-txn-hide-transaction", disableGutters: !0, disablePadding: !0, children: [
594
596
  /* @__PURE__ */ l(
595
- V,
597
+ z,
596
598
  {
597
599
  "aria-checked": u,
598
600
  "aria-labelledby": "hide-transaction-text",
@@ -608,16 +610,16 @@ const gt = E(({ transaction: t }) => {
608
610
  },
609
611
  role: "switch",
610
612
  children: [
611
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: _ }, variant: "rounded", children: u ? /* @__PURE__ */ e(D, { name: "visibility_off", sx: { color: "text.primary" } }) : /* @__PURE__ */ e(D, { name: "visibility", sx: { color: "text.primary" } }) }) }),
613
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: _ }, variant: "rounded", children: u ? /* @__PURE__ */ e(D, { name: "visibility_off", sx: { color: "text.primary" } }) : /* @__PURE__ */ e(D, { name: "visibility", sx: { color: "text.primary" } }) }) }),
612
614
  /* @__PURE__ */ e(
613
- B,
615
+ $,
614
616
  {
615
617
  id: "hide-transaction-text",
616
618
  primary: u ? o.hide_trnx_subtitle_unhide_trnx : o.hide_trnx_subtitle_hide_trnx,
617
619
  secondary: u ? o.hide_trnx_desc_unhiding : o.hide_trnx_desc_hiding
618
620
  }
619
621
  ),
620
- /* @__PURE__ */ e(z, { "aria-hidden": "true", children: /* @__PURE__ */ e(
622
+ /* @__PURE__ */ e(W, { "aria-hidden": "true", children: /* @__PURE__ */ e(
621
623
  lt,
622
624
  {
623
625
  checked: u,
@@ -678,19 +680,19 @@ const gt = E(({ transaction: t }) => {
678
680
  r({ ...t, memo: u }), m(!1);
679
681
  return;
680
682
  }
681
- await i({ ...t, memo: u }), n(F.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), m(!1);
683
+ await i({ ...t, memo: u }), n(H.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), m(!1);
682
684
  }, g = s.palette.mode === "dark" ? "grey.800" : "grey.100";
683
- return /* @__PURE__ */ l(G, { className: "mx-txn-memo-action", disableGutters: !0, disablePadding: !0, children: [
685
+ return /* @__PURE__ */ l(B, { className: "mx-txn-memo-action", disableGutters: !0, disablePadding: !0, children: [
684
686
  /* @__PURE__ */ l(
685
- V,
687
+ z,
686
688
  {
687
689
  onClick: () => {
688
690
  n(y.ON_TRANSACTION_MEMO_CLICK), m(!0);
689
691
  },
690
692
  children: [
691
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: g }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "article", sx: { color: "text.primary" } }) }) }),
693
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: g }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "article", sx: { color: "text.primary" } }) }) }),
692
694
  /* @__PURE__ */ e(
693
- B,
695
+ $,
694
696
  {
695
697
  primary: o.memo_title,
696
698
  primaryTypographyProps: { variant: "XSmall" },
@@ -705,7 +707,7 @@ const gt = E(({ transaction: t }) => {
705
707
  )
706
708
  }
707
709
  ),
708
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
710
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
709
711
  ]
710
712
  }
711
713
  ),
@@ -747,7 +749,7 @@ const gt = E(({ transaction: t }) => {
747
749
  const { onEvent: o } = w(), { transactions: s } = I(), [c, m] = d.useState(`${a.amount}`), [u, p] = d.useState(!1), _ = t === 0, g = (h) => {
748
750
  isNaN(Number(h)) || (m(h), r(t, Number(h)));
749
751
  };
750
- return /* @__PURE__ */ l(K, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
752
+ return /* @__PURE__ */ l(F, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
751
753
  /* @__PURE__ */ l(xe, { alignItems: _ ? "center" : "start", container: !0, children: [
752
754
  /* @__PURE__ */ e(xe, { item: !0, xs: 7, children: /* @__PURE__ */ l(v, { alignItems: "start", children: [
753
755
  /* @__PURE__ */ e(
@@ -760,7 +762,7 @@ const gt = E(({ transaction: t }) => {
760
762
  children: a.category
761
763
  }
762
764
  ),
763
- /* @__PURE__ */ e(K, { children: !a.category_guid && /* @__PURE__ */ l(v, { color: "error.main", direction: "row", gap: 8, p: 12, children: [
765
+ /* @__PURE__ */ e(F, { children: !a.category_guid && /* @__PURE__ */ l(v, { color: "error.main", direction: "row", gap: 8, p: 12, children: [
764
766
  /* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
765
767
  /* @__PURE__ */ e(x, { variant: "Small", children: s.split_transaction_errors_select_category })
766
768
  ] }) })
@@ -834,7 +836,7 @@ const gt = E(({ transaction: t }) => {
834
836
  u(g), p(g);
835
837
  } else
836
838
  u(""), p("");
837
- }, [a]), /* @__PURE__ */ l(K, { className: "mx-txn-split-manager", children: [
839
+ }, [a]), /* @__PURE__ */ l(F, { className: "mx-txn-split-manager", children: [
838
840
  _,
839
841
  a.map((g, h) => /* @__PURE__ */ e(
840
842
  vt,
@@ -851,7 +853,7 @@ const gt = E(({ transaction: t }) => {
851
853
  /* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(me, { sx: { fontSize: 15 } }) }),
852
854
  /* @__PURE__ */ e(x, { variant: "Small", children: m })
853
855
  ] }),
854
- /* @__PURE__ */ e(K, { p: 16, children: /* @__PURE__ */ e(
856
+ /* @__PURE__ */ e(F, { p: 16, children: /* @__PURE__ */ e(
855
857
  oe,
856
858
  {
857
859
  "aria-label": s.split_transaction_add_split_btn,
@@ -878,7 +880,7 @@ const gt = E(({ transaction: t }) => {
878
880
  has_been_split: !1,
879
881
  parent_guid: t.guid,
880
882
  top_level_category_guid: void 0
881
- }, [h, f] = d.useState(!1), [L, M] = d.useState(!1), [S, T] = d.useState([]), R = () => {
883
+ }, [h, f] = d.useState(!1), [L, k] = d.useState(!1), [S, T] = d.useState([]), R = () => {
882
884
  const b = [...S];
883
885
  b.push({ ...g }), b[0].amount -= 1, T(b), i(
884
886
  N(
@@ -888,64 +890,64 @@ const gt = E(({ transaction: t }) => {
888
890
  );
889
891
  }, C = (b) => {
890
892
  if (b > 0) {
891
- const k = S[b], A = [...S];
892
- A.splice(b, 1), A[0].amount += k.amount, T(A), i(
893
+ const P = S[b], A = [...S];
894
+ A.splice(b, 1), A[0].amount += P.amount, T(A), i(
893
895
  N(c.split_transaction_delete_split_announcement, b + 1)
894
896
  );
895
897
  }
896
- }, Q = (b, k) => {
898
+ }, Q = (b, P) => {
897
899
  const A = [...S];
898
- A[b].amount = k, A[0].amount = t.amount - A.reduce(
899
- ($, P, Te) => $ + (Te !== 0 ? P.amount : 0),
900
+ A[b].amount = P, A[0].amount = t.amount - A.reduce(
901
+ (M, G, Te) => M + (Te !== 0 ? G.amount : 0),
900
902
  0
901
903
  ), T(A);
902
- }, ge = (b, k) => {
903
- const A = [...S], $ = u.find((P) => P.guid === k);
904
- $ && (A[b] = {
904
+ }, ge = (b, P) => {
905
+ const A = [...S], M = u.find((G) => G.guid === P);
906
+ M && (A[b] = {
905
907
  ...A[b],
906
- category_guid: k,
907
- category: $.name,
908
- top_level_category_guid: $.parent_guid || k
908
+ category_guid: P,
909
+ category: M.name,
910
+ top_level_category_guid: M.parent_guid || P
909
911
  }, T(A), i(
910
912
  N(
911
913
  c.split_transaction_select_category_announcement,
912
- $.name,
914
+ M.name,
913
915
  b + 1
914
916
  )
915
917
  ));
916
918
  }, he = () => {
917
919
  if (t.parent_guid || t.has_been_split) {
918
- M(!0);
920
+ k(!0);
919
921
  return;
920
922
  }
921
- T([{ ..._ }, { ...g }]), n(F.TRANSACTION_DETAILS_CLICK_SPLIT, {
923
+ T([{ ..._ }, { ...g }]), n(H.TRANSACTION_DETAILS_CLICK_SPLIT, {
922
924
  transaction_guid: t.guid
923
925
  }), f(!0);
924
926
  }, Z = async () => {
925
927
  n(y.ON_TRANSACTION_SPLIT_SAVE_CLICK), await a({ ...t, has_been_split: !0 }, S), f(!1);
926
928
  }, ee = async () => {
927
929
  n(y.ON_TRANSACTION_SPLIT_CANCEL_CLICK), T([{ ..._ }, { ...g }]), f(!1);
928
- }, W = async () => {
929
- n(F.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
930
+ }, K = async () => {
931
+ n(H.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
930
932
  transaction_guid: t.guid
931
933
  });
932
934
  const b = t.parent_guid ?? t.guid;
933
935
  await o(b);
934
936
  }, te = d.useMemo(() => {
935
- const b = S.some((A) => !A.category_guid), k = S.some((A) => A.amount <= 0);
936
- return b || k;
937
+ const b = S.some((A) => !A.category_guid), P = S.some((A) => A.amount <= 0);
938
+ return b || P;
937
939
  }, [S]), ye = p.palette.mode === "dark" ? "grey.800" : "grey.100";
938
- return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ l(G, { disableGutters: !0, disablePadding: !0, children: [
939
- /* @__PURE__ */ l(V, { onClick: he, children: [
940
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: ye }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "call_split", sx: { color: "text.primary" } }) }) }),
940
+ return /* @__PURE__ */ e(d.Fragment, { children: t && /* @__PURE__ */ l(B, { disableGutters: !0, disablePadding: !0, children: [
941
+ /* @__PURE__ */ l(z, { onClick: he, children: [
942
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: ye }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "call_split", sx: { color: "text.primary" } }) }) }),
941
943
  /* @__PURE__ */ e(
942
- B,
944
+ $,
943
945
  {
944
946
  primary: t.has_been_split || t.parent_guid ? c.split_transaction_unsplit_title : c.split_transaction_title,
945
947
  secondary: t.has_been_split || t.parent_guid ? c.split_transaction_unsplit_subtitle : c.split_transaction_desc
946
948
  }
947
949
  ),
948
- /* @__PURE__ */ e(z, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(D, { name: "delete" }) : /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
950
+ /* @__PURE__ */ e(W, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(D, { name: "delete" }) : /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
949
951
  ] }),
950
952
  /* @__PURE__ */ l(
951
953
  ie,
@@ -981,9 +983,9 @@ const gt = E(({ transaction: t }) => {
981
983
  copy: { title: c.split_transaction_unsplit_title },
982
984
  isOpen: L,
983
985
  onClose: () => {
984
- m(!1), M(!1);
986
+ m(!1), k(!1);
985
987
  },
986
- onPrimaryAction: W,
988
+ onPrimaryAction: K,
987
989
  onSecondaryAction: () => {
988
990
  n(y.ON_TRANSACTION_UNSPLIT_CANCEL);
989
991
  },
@@ -1010,7 +1012,7 @@ const gt = E(({ transaction: t }) => {
1010
1012
  };
1011
1013
  return d.useEffect(() => {
1012
1014
  u(s.length > 40 ? r.tags_error_name_must_be_40_chars : "");
1013
- }, [s]), /* @__PURE__ */ l(K, { className: "mx-txn-tag-manager-header", children: [
1015
+ }, [s]), /* @__PURE__ */ l(F, { className: "mx-txn-tag-manager-header", children: [
1014
1016
  /* @__PURE__ */ l(
1015
1017
  v,
1016
1018
  {
@@ -1068,7 +1070,7 @@ const gt = E(({ transaction: t }) => {
1068
1070
  children: /* @__PURE__ */ e(me, {})
1069
1071
  }
1070
1072
  );
1071
- return /* @__PURE__ */ e(K, { className: "mx-txn-tag-manager-search", px: 24, py: 16, children: /* @__PURE__ */ e(
1073
+ return /* @__PURE__ */ e(F, { className: "mx-txn-tag-manager-search", px: 24, py: 16, children: /* @__PURE__ */ e(
1072
1074
  Ie,
1073
1075
  {
1074
1076
  InputProps: {
@@ -1084,7 +1086,7 @@ const gt = E(({ transaction: t }) => {
1084
1086
  }
1085
1087
  ) });
1086
1088
  }, kt = E(Mt), Pt = ({ onTagChecked: t, selectedTags: n, tag: i }) => {
1087
- const { onEvent: r } = w(), { removeTag: a, updateTag: o } = O(), { common: s, transactions: c } = I(), [m, u] = d.useState(!1), [p, _] = d.useState(!1), [g, h] = d.useState(""), [f, L] = d.useState(""), M = async () => {
1089
+ const { onEvent: r } = w(), { removeTag: a, updateTag: o } = O(), { common: s, transactions: c } = I(), [m, u] = d.useState(!1), [p, _] = d.useState(!1), [g, h] = d.useState(""), [f, L] = d.useState(""), k = async () => {
1088
1090
  r(y.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await o({ ...i, name: g }), u(!1);
1089
1091
  }, S = async () => {
1090
1092
  r(y.ON_TRANSACTION_TAGS_TAG_DELETED), await a(i.guid), _(!1);
@@ -1098,7 +1100,7 @@ const gt = E(({ transaction: t }) => {
1098
1100
  r(y.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), _(!0);
1099
1101
  };
1100
1102
  return /* @__PURE__ */ l(
1101
- G,
1103
+ B,
1102
1104
  {
1103
1105
  className: "mx-txn-transaction-manager-row",
1104
1106
  disableGutters: !0,
@@ -1125,13 +1127,13 @@ const gt = E(({ transaction: t }) => {
1125
1127
  ] }),
1126
1128
  children: [
1127
1129
  /* @__PURE__ */ l(
1128
- V,
1130
+ z,
1129
1131
  {
1130
1132
  "aria-checked": n.includes(i.guid),
1131
1133
  onClick: () => t(i.guid),
1132
1134
  role: "checkbox",
1133
1135
  children: [
1134
- /* @__PURE__ */ e(z, { sx: { ml: 0 }, children: /* @__PURE__ */ e(
1136
+ /* @__PURE__ */ e(W, { sx: { ml: 0 }, children: /* @__PURE__ */ e(
1135
1137
  at,
1136
1138
  {
1137
1139
  "aria-hidden": !0,
@@ -1140,7 +1142,7 @@ const gt = E(({ transaction: t }) => {
1140
1142
  tabIndex: -1
1141
1143
  }
1142
1144
  ) }),
1143
- /* @__PURE__ */ e(B, { children: i.name })
1145
+ /* @__PURE__ */ e($, { children: i.name })
1144
1146
  ]
1145
1147
  }
1146
1148
  ),
@@ -1150,7 +1152,7 @@ const gt = E(({ transaction: t }) => {
1150
1152
  copy: { title: "Update tag name" },
1151
1153
  isOpen: m,
1152
1154
  onClose: () => u(!1),
1153
- onPrimaryAction: M,
1155
+ onPrimaryAction: k,
1154
1156
  onSecondaryAction: () => u(!1),
1155
1157
  children: [
1156
1158
  /* @__PURE__ */ e(
@@ -1216,31 +1218,31 @@ const gt = E(({ transaction: t }) => {
1216
1218
  c({ ...t, tags: _ }), p(!1);
1217
1219
  return;
1218
1220
  }
1219
- await r(_, t.guid), await a({ ...t, tags: _ }), n(F.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), p(!1);
1221
+ await r(_, t.guid), await a({ ...t, tags: _ }), n(H.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), p(!1);
1220
1222
  }, L = d.useMemo(
1221
1223
  () => t.tags.map(
1222
1224
  (S, T, R) => `${i.find((C) => C.guid === S)?.name}${T < R.length - 1 ? " / " : ""}`
1223
1225
  ),
1224
1226
  [i, t]
1225
- ), M = m.palette.mode === "dark" ? "grey.800" : "grey.100";
1226
- return /* @__PURE__ */ l(G, { disableGutters: !0, disablePadding: !0, children: [
1227
+ ), k = m.palette.mode === "dark" ? "grey.800" : "grey.100";
1228
+ return /* @__PURE__ */ l(B, { disableGutters: !0, disablePadding: !0, children: [
1227
1229
  /* @__PURE__ */ l(
1228
- V,
1230
+ z,
1229
1231
  {
1230
1232
  onClick: () => {
1231
1233
  n(y.ON_TRANSACTION_TAGS_CLICK), p(!0);
1232
1234
  },
1233
1235
  children: [
1234
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: M }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "local_offer", sx: { color: "text.primary" } }) }) }),
1236
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: k }, variant: "rounded", children: /* @__PURE__ */ e(D, { name: "local_offer", sx: { color: "text.primary" } }) }) }),
1235
1237
  /* @__PURE__ */ e(
1236
- B,
1238
+ $,
1237
1239
  {
1238
1240
  primary: s.tags_title,
1239
1241
  primaryTypographyProps: { variant: "XSmall" },
1240
1242
  secondary: /* @__PURE__ */ e(x, { bold: !0, sx: { color: "text.primary" }, variant: "Body", children: t.tags?.length > 0 ? L : s.tags_desc })
1241
1243
  }
1242
1244
  ),
1243
- /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
1245
+ /* @__PURE__ */ e(W, { children: /* @__PURE__ */ e(D, { name: "chevron_right", sx: { color: "text.primary" } }) })
1244
1246
  ]
1245
1247
  }
1246
1248
  ),
@@ -1266,11 +1268,11 @@ const gt = E(({ transaction: t }) => {
1266
1268
  const h = () => {
1267
1269
  u(!0), o(y.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK), setTimeout(() => document.getElementById("transaction-description-input")?.focus(), 0);
1268
1270
  }, f = async () => {
1269
- o(F.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
1271
+ o(H.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
1270
1272
  transaction_guid: t.guid
1271
1273
  }), await i({ ...t, description: p }), u(!1), s(`${a.payee_title}: ${p}`), setTimeout(() => document.getElementById("transaction-description-edit-button")?.focus(), 0);
1272
1274
  };
1273
- return /* @__PURE__ */ l(K, { className: "mx-txn-transaction-description", children: [
1275
+ return /* @__PURE__ */ l(F, { className: "mx-txn-transaction-description", children: [
1274
1276
  c,
1275
1277
  m ? /* @__PURE__ */ l(ze, { row: !0, children: [
1276
1278
  /* @__PURE__ */ e(
@@ -1321,7 +1323,7 @@ const gt = E(({ transaction: t }) => {
1321
1323
  ] });
1322
1324
  }, Ut = E(Ht), Vt = ({ transaction: t }) => {
1323
1325
  const { updateTransaction: n } = O(), { transactions: i } = I(), { onEvent: r } = w(), a = we(), o = async () => {
1324
- r(F.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await n({ ...t, is_flagged: !t.is_flagged });
1326
+ r(H.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await n({ ...t, is_flagged: !t.is_flagged });
1325
1327
  };
1326
1328
  return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
1327
1329
  qe,
@@ -1352,10 +1354,10 @@ const gt = E(({ transaction: t }) => {
1352
1354
  }
1353
1355
  ) });
1354
1356
  }, zt = E(Vt), se = (t, n, i, r = !0, a = "inset") => r ? /* @__PURE__ */ l(d.Fragment, { children: [
1355
- /* @__PURE__ */ l(G, { disableGutters: !0, disablePadding: !0, children: [
1356
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
1357
+ /* @__PURE__ */ l(B, { disableGutters: !0, disablePadding: !0, children: [
1358
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(U, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
1357
1359
  /* @__PURE__ */ e(
1358
- B,
1360
+ $,
1359
1361
  {
1360
1362
  primary: n,
1361
1363
  primaryTypographyProps: { variant: "XSmall" },
@@ -1411,12 +1413,12 @@ const gt = E(({ transaction: t }) => {
1411
1413
  }) => {
1412
1414
  const { onEvent: a } = w(), { isCopyLoaded: o } = Xe(), { userFeatures: s } = je(), c = j(), m = r?.number && r.number.length > 4;
1413
1415
  if (d.useEffect(
1414
- () => a(F.TRANSACTION_DETAILS_VIEW, { transaction_guid: r.guid }),
1416
+ () => a(H.TRANSACTION_DETAILS_VIEW, { transaction_guid: r.guid }),
1415
1417
  []
1416
1418
  ), !o)
1417
1419
  return /* @__PURE__ */ e(ct, {});
1418
1420
  const u = Ve(s, "MX_TXN_DETAILS_VIEW_ONLY"), p = c.palette.mode === "dark" ? "grey.800" : "grey.100";
1419
- return /* @__PURE__ */ e(K, { className: "mx-txn-transaction-details", width: "100%", children: r && /* @__PURE__ */ l(v, { children: [
1421
+ return /* @__PURE__ */ e(F, { className: "mx-txn-transaction-details", width: "100%", children: r && /* @__PURE__ */ l(v, { children: [
1420
1422
  /* @__PURE__ */ l(v, { gap: 12, p: 24, children: [
1421
1423
  /* @__PURE__ */ e(le, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
1422
1424
  Ae,