@mx-cartographer/experiences 7.2.22-alpha.sms2 → 7.2.22

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,16 +1,16 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
2
  import _ from "react";
3
- import { observer as b } from "mobx-react-lite";
4
- import { useVirtualizer as ke } from "@tanstack/react-virtual";
5
- import w from "@mui/material/Box";
3
+ import { observer as A } from "mobx-react-lite";
4
+ import { useVirtualizer as Re } from "@tanstack/react-virtual";
5
+ import v from "@mui/material/Box";
6
6
  import Z from "@mui/material/Divider";
7
7
  import J from "@mui/material/List";
8
- import { MerchantLogo as pe, Icon as S, Text as T, useTokens as ee, CategoryIcon as he, CategoryIconVariants as be, IconWeight as D, P as le, H1 as Ae, TextField as Te } from "@mxenabled/mxui";
8
+ import { MerchantLogo as ge, Icon as C, Text as T, useTokens as ee, CategoryIcon as he, CategoryIconVariants as be, IconWeight as D, P as le, H1 as Ae, TextField as Te } from "@mxenabled/mxui";
9
9
  import B from "@mui/material/ListItemAvatar";
10
10
  import M from "@mui/material/ListItemText";
11
- import f from "@mui/material/Stack";
11
+ import b from "@mui/material/Stack";
12
12
  import { T as Pe, L as Ge, O as h, C as Me, b as Ke, i as $e } from "./User-BQUxBeZV.mjs";
13
- import { G as Be, h as v, u as A, g as L, m as xe, b as Fe, p as He } from "./hooks-D6XlXHf4.mjs";
13
+ import { G as Be, h as w, u as x, g as L, m as xe, b as Fe, p as He } from "./hooks-D6XlXHf4.mjs";
14
14
  import { f as te } from "./NumberFormatting-Buh7u8Oi.mjs";
15
15
  import { Receipt as ze, Delete as oe, ChevronRight as Ue, Cancel as ie, Search as Xe, Edit as Ve, Flag as We } from "@mxenabled/mx-icons";
16
16
  import { fromUnixTime as W } from "date-fns/fromUnixTime";
@@ -22,21 +22,21 @@ import ne from "@mui/material/Paper";
22
22
  import ce from "@mui/material/Button";
23
23
  import je from "@mui/material/FormGroup";
24
24
  import Q from "@mui/material/IconButton";
25
- import De from "@mui/material/TextField";
25
+ import ve from "@mui/material/TextField";
26
26
  import qe from "@mui/material/ToggleButton";
27
- import ve from "@mui/material/styles/useTheme";
27
+ import De from "@mui/material/styles/useTheme";
28
28
  import z from "@mui/material/Avatar";
29
29
  import F from "@mui/material/ListItem";
30
- import { a as V, f as Ee, D as Oe } from "./Dialog-CWW597AF.mjs";
30
+ import { a as V, f as we, D as Ee } from "./Dialog-CWW597AF.mjs";
31
31
  import U from "@mui/material/ListItemButton";
32
32
  import X from "@mui/material/ListItemIcon";
33
- import { a as we } from "./CategorySelectorDrawer-DUe4lH5-.mjs";
33
+ import { a as Oe } from "./CategorySelectorDrawer-BXnLseqP.mjs";
34
34
  import { b as se } from "./Localization-2MODESHW.mjs";
35
35
  import { getUnixTime as Ze } from "date-fns/getUnixTime";
36
36
  import { D as de } from "./Drawer-kEE73B87.mjs";
37
37
  import ye from "@mui/material/InputAdornment";
38
38
  import Je from "@mui/material/Checkbox";
39
- import ge from "@mui/material/Grid";
39
+ import pe from "@mui/material/Grid";
40
40
  import { C as Qe } from "./CurrencyInput-DUsQbkXb.mjs";
41
41
  import et from "@mui/material/Switch";
42
42
  var q = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(q || {}), re = /* @__PURE__ */ ((t) => (t[t.SplitTransaction = 0] = "SplitTransaction", t[t.HideTransaction = 1] = "HideTransaction", t[t.MerchantLogo = 2] = "MerchantLogo", t))(re || {});
@@ -54,14 +54,14 @@ const tt = [
54
54
  ], G = () => {
55
55
  if (!_.useContext(Be))
56
56
  throw new Error("useTransactionsUiStore() must be used within the GlobalDataContext");
57
- return v().uiStore;
57
+ return w().uiStore;
58
58
  };
59
59
  function nt() {
60
60
  return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
61
61
  }
62
62
  function rt(t) {
63
- const r = nt().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), i = window.parent || window.opener || !1;
64
- return i && i.postMessage && r ? (i.postMessage(t, r), !0) : !1;
63
+ const r = nt().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), a = window.parent || window.opener || !1;
64
+ return a && a.postMessage && r ? (a.postMessage(t, r), !0) : !1;
65
65
  }
66
66
  function ot(t) {
67
67
  return rt({
@@ -71,17 +71,17 @@ function ot(t) {
71
71
  });
72
72
  }
73
73
  const it = ({ transaction: t, onClick: r }) => {
74
- const { associatedBeats: i } = v(), { expandedSplits: n } = G(), { transactions: o } = A(), { showInsights: a } = G(), l = t.transaction_type === Pe.CREDIT, d = _.useMemo(() => i.find((c) => c.associated_transaction_guid === t.guid), [i, t]);
74
+ const { associatedBeats: a } = w(), { expandedSplits: i } = G(), { transactions: o } = x(), { showInsights: n } = G(), c = t.transaction_type === Pe.CREDIT, l = _.useMemo(() => a.find((s) => s.associated_transaction_guid === t.guid), [a, t]);
75
75
  return (
76
76
  //TODO: implement common/components/ListItemRow.tsx
77
- /* @__PURE__ */ s(
77
+ /* @__PURE__ */ d(
78
78
  Ge,
79
79
  {
80
80
  clickEventName: h.ON_TRANSACTION_LIST_ITEM_CLICK,
81
81
  onClick: r ? () => r(t.guid) : void 0,
82
82
  children: [
83
- /* @__PURE__ */ e(B, { children: t.parent_guid && n.includes(t.parent_guid) ? /* @__PURE__ */ e(_.Fragment, {}) : /* @__PURE__ */ e(
84
- pe,
83
+ /* @__PURE__ */ e(B, { children: t.parent_guid && i.includes(t.parent_guid) ? /* @__PURE__ */ e(_.Fragment, {}) : /* @__PURE__ */ e(
84
+ ge,
85
85
  {
86
86
  categoryGuid: t.top_level_category_guid || "",
87
87
  merchantGuid: t.merchant_guid || ""
@@ -91,40 +91,40 @@ const it = ({ transaction: t, onClick: r }) => {
91
91
  M,
92
92
  {
93
93
  disableTypography: !0,
94
- secondary: /* @__PURE__ */ s(f, { direction: "row", justifyContent: "space-between", children: [
95
- /* @__PURE__ */ s(f, { alignItems: "center", direction: "row", gap: 4, children: [
96
- t.is_flagged && /* @__PURE__ */ e(S, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
97
- t.is_hidden && /* @__PURE__ */ e(S, { name: "visibility_off", size: 16 }),
98
- t.has_been_split && /* @__PURE__ */ e(S, { name: "call_split", size: 16 }),
94
+ secondary: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", children: [
95
+ /* @__PURE__ */ d(b, { alignItems: "center", direction: "row", gap: 4, children: [
96
+ t.is_flagged && /* @__PURE__ */ e(C, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
97
+ t.is_hidden && /* @__PURE__ */ e(C, { name: "visibility_off", size: 16 }),
98
+ t.has_been_split && /* @__PURE__ */ e(C, { name: "call_split", size: 16 }),
99
99
  /* @__PURE__ */ e(T, { variant: "XSmall", children: t.has_been_split ? o.split_transaction_category_label : t.category })
100
100
  ] }),
101
- d && a && /* @__PURE__ */ e(
101
+ l && n && /* @__PURE__ */ e(
102
102
  T,
103
103
  {
104
104
  bold: !0,
105
105
  color: "action.active",
106
- onClick: (c) => {
107
- c.stopPropagation(), c.preventDefault(), ot(d.guid);
106
+ onClick: (s) => {
107
+ s.stopPropagation(), s.preventDefault(), ot(l.guid);
108
108
  },
109
109
  variant: "XSmall",
110
- children: d.short_title
110
+ children: l.short_title
111
111
  }
112
112
  )
113
113
  ] }),
114
- children: /* @__PURE__ */ s(f, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
115
- /* @__PURE__ */ s(T, { bold: !0, variant: "Body", children: [
114
+ children: /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
115
+ /* @__PURE__ */ d(T, { bold: !0, variant: "Body", children: [
116
116
  t.is_hidden && o.hide_trnx_cancel_hidden_note,
117
117
  t.payee || t.description || t.feed_description
118
118
  ] }),
119
- /* @__PURE__ */ s(
119
+ /* @__PURE__ */ d(
120
120
  T,
121
121
  {
122
122
  bold: !0,
123
- color: l ? "success.main" : "text.primary",
123
+ color: c ? "success.main" : "text.primary",
124
124
  sx: { flexShrink: 0 },
125
125
  variant: "Body",
126
126
  children: [
127
- l ? "+" : "",
127
+ c ? "+" : "",
128
128
  te(t.amount, "0,0.00")
129
129
  ]
130
130
  }
@@ -136,55 +136,55 @@ const it = ({ transaction: t, onClick: r }) => {
136
136
  }
137
137
  )
138
138
  );
139
- }, st = b(it), lt = ({
139
+ }, st = A(it), lt = ({
140
140
  bgcolor: t = "background.default",
141
141
  children: r
142
- }) => /* @__PURE__ */ e(w, { display: "inline-block", sx: { bgcolor: t, py: 4, width: "100%" }, children: /* @__PURE__ */ e(T, { bold: !0, sx: { pl: 24 }, variant: "XSmall", children: r }) }), ct = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
143
- const i = ee(), { transactions: n } = A();
144
- return /* @__PURE__ */ s(f, { alignItems: "center", gap: i.Spacing.Small, height: "auto", mt: i.Spacing.Large, children: [
142
+ }) => /* @__PURE__ */ e(v, { display: "inline-block", sx: { bgcolor: t, py: 4, width: "100%" }, children: /* @__PURE__ */ e(T, { bold: !0, sx: { pl: 24 }, variant: "XSmall", children: r }) }), ct = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
143
+ const a = ee(), { transactions: i } = x();
144
+ return /* @__PURE__ */ d(b, { alignItems: "center", gap: a.Spacing.Small, height: "auto", mt: a.Spacing.Large, children: [
145
145
  t && /* @__PURE__ */ e(ze, { color: "secondary", sx: { fontSize: 32 } }),
146
- /* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Small", children: n.zero_state_no_transactions }),
147
- r && /* @__PURE__ */ e(T, { color: "secondary", variant: "XSmall", children: n.zero_state_there_are_no_transactions })
146
+ /* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Small", children: i.zero_state_no_transactions }),
147
+ r && /* @__PURE__ */ e(T, { color: "secondary", variant: "XSmall", children: i.zero_state_there_are_no_transactions })
148
148
  ] });
149
- }, dt = b(ct), Se = (t, r) => {
150
- const i = W(r[t].date), n = W(r[t - 1]?.date);
151
- return !Ne(i, n);
149
+ }, dt = A(ct), Se = (t, r) => {
150
+ const a = W(r[t].date), i = W(r[t - 1]?.date);
151
+ return !Ne(a, i);
152
152
  }, _t = (t, r) => {
153
- const i = W(r[t].date), n = W(r[t + 1]?.date);
154
- return Ne(i, n);
153
+ const a = W(r[t].date), i = W(r[t + 1]?.date);
154
+ return Ne(a, i);
155
155
  }, Ce = 65, fe = 34, ut = ({
156
156
  bgcolor: t,
157
157
  filter: r,
158
- height: i = "calc(100dvh - 36px)",
159
- loader: n = /* @__PURE__ */ e(Ie, { label: "Loading", size: 40 }),
158
+ height: a = "calc(100dvh - 36px)",
159
+ loader: i = /* @__PURE__ */ e(Ie, { label: "Loading", size: 40 }),
160
160
  onClick: o,
161
- showInsights: a = !1,
162
- showLoader: l = !1,
163
- showHiddenTransactions: d = !1,
164
- width: c = "100%",
161
+ showInsights: n = !1,
162
+ showLoader: c = !1,
163
+ showHiddenTransactions: l = !1,
164
+ width: s = "100%",
165
165
  zeroState: u = /* @__PURE__ */ e(dt, {})
166
166
  }) => {
167
- const { isLoading: m, sortedTransactions: g } = v(), p = _.useMemo(() => {
168
- const I = r ? g.filter(r) : g;
169
- return d ? I : I.filter((k) => !k.is_hidden);
170
- }, [g, d]), { clearExpandedSplits: x, setShowInsights: y, toggleSplit: N } = G(), { onEvent: C } = L(), R = (I) => {
171
- const k = p.find((Y) => Y.guid === I);
172
- if (k?.has_been_split) {
173
- N(k.guid);
167
+ const { isLoading: m, sortedTransactions: p } = w(), g = _.useMemo(() => {
168
+ const I = r ? p.filter(r) : p;
169
+ return l ? I : I.filter((R) => !R.is_hidden);
170
+ }, [p, l]), { clearExpandedSplits: S, setShowInsights: y, toggleSplit: N } = G(), { onEvent: f } = L(), k = (I) => {
171
+ const R = g.find((Y) => Y.guid === I);
172
+ if (R?.has_been_split) {
173
+ N(R.guid);
174
174
  return;
175
175
  }
176
- C(P.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
177
- account_guid: k?.account_guid,
176
+ f(P.ACCOUNT_DETAILS_CLICK_TRANSACTION, {
177
+ account_guid: R?.account_guid,
178
178
  transaction_guid: I
179
179
  }), o?.(I);
180
- }, K = _.useRef(null), $ = ke({
181
- count: p.length,
180
+ }, K = _.useRef(null), $ = Re({
181
+ count: g.length,
182
182
  getScrollElement: () => K.current,
183
- estimateSize: (I) => Ce + (Se(I, p) ? fe : 0),
183
+ estimateSize: (I) => Ce + (Se(I, g) ? fe : 0),
184
184
  overscan: 5
185
185
  });
186
- return _.useEffect(() => $.measure(), [p]), _.useEffect(() => y(a), [a]), _.useEffect(() => () => x(), []), /* @__PURE__ */ e(J, { sx: { width: c }, children: /* @__PURE__ */ e(w, { height: i, overflow: "auto", ref: K, width: c, children: /* @__PURE__ */ s(
187
- w,
186
+ return _.useEffect(() => $.measure(), [g]), _.useEffect(() => y(n), [n]), _.useEffect(() => () => S(), []), /* @__PURE__ */ e(J, { sx: { width: s }, children: /* @__PURE__ */ e(v, { height: a, overflow: "auto", ref: K, width: s, children: /* @__PURE__ */ d(
187
+ v,
188
188
  {
189
189
  height: (
190
190
  // set the height to auto when there are no transactions so the zero state isn't set to 0
@@ -193,12 +193,12 @@ const it = ({ transaction: t, onClick: r }) => {
193
193
  position: "relative",
194
194
  width: "100%",
195
195
  children: [
196
- (m || l) && n,
197
- !m && !l && $.getVirtualItems().length === 0 && u,
198
- !m && !l && $.getVirtualItems().length > 0 && $.getVirtualItems().map((I) => {
199
- const k = p[I.index], Y = Se(I.index, p), _e = _t(I.index, p), ue = Ce + (Y ? fe : 0);
200
- return /* @__PURE__ */ s(
201
- w,
196
+ (m || c) && i,
197
+ !m && !c && $.getVirtualItems().length === 0 && u,
198
+ !m && !c && $.getVirtualItems().length > 0 && $.getVirtualItems().map((I) => {
199
+ const R = g[I.index], Y = Se(I.index, g), _e = _t(I.index, g), ue = Ce + (Y ? fe : 0);
200
+ return /* @__PURE__ */ d(
201
+ v,
202
202
  {
203
203
  sx: {
204
204
  height: ue,
@@ -207,42 +207,42 @@ const it = ({ transaction: t, onClick: r }) => {
207
207
  width: "100%"
208
208
  },
209
209
  children: [
210
- Y && /* @__PURE__ */ e(lt, { bgcolor: t, children: Ye(k.date) }),
211
- /* @__PURE__ */ e(st, { onClick: R, transaction: k }),
210
+ Y && /* @__PURE__ */ e(lt, { bgcolor: t, children: Ye(R.date) }),
211
+ /* @__PURE__ */ e(st, { onClick: k, transaction: R }),
212
212
  /* @__PURE__ */ e(Z, { sx: { ml: _e ? 24 : 0 } })
213
213
  ]
214
214
  },
215
- k.guid
215
+ R.guid
216
216
  );
217
217
  })
218
218
  ]
219
219
  }
220
220
  ) }) });
221
- }, Ra = b(ut), mt = ({ transaction: t }) => {
222
- const { addOrUpdateTransactionRule: r, updateTransaction: i } = v(), { categories: n } = xe(), { onEvent: o } = L(), { setShouldDisableDrawerScroll: a, updateManualTransaction: l } = G(), { transactions: d } = A(), [c, u] = _.useState(!1), [m, g] = _.useState(""), p = async (C) => {
223
- await i({ ...t, category_guid: m }), C && await r(m, t), g(""), o(P.TRANSACTION_DETAILS_CLICK_CATEGORY, {
221
+ }, Ra = A(ut), mt = ({ transaction: t }) => {
222
+ const { addOrUpdateTransactionRule: r, updateTransaction: a } = w(), { categories: i } = xe(), { onEvent: o } = L(), { setShouldDisableDrawerScroll: n, updateManualTransaction: c } = G(), { transactions: l } = x(), [s, u] = _.useState(!1), [m, p] = _.useState(""), g = async (f) => {
223
+ await a({ ...t, category_guid: m }), f && await r(m, t), p(""), o(P.TRANSACTION_DETAILS_CLICK_CATEGORY, {
224
224
  transaction_guid: t.guid
225
225
  });
226
- }, x = (C) => {
226
+ }, S = (f) => {
227
227
  if (t.is_manual && !t.guid) {
228
- const R = n.find((K) => K.guid === C);
229
- l({
228
+ const k = i.find((K) => K.guid === f);
229
+ c({
230
230
  ...t,
231
- category: R?.name,
232
- category_guid: C,
233
- top_level_category_guid: R?.parent_guid || C
231
+ category: k?.name,
232
+ category_guid: f,
233
+ top_level_category_guid: k?.parent_guid || f
234
234
  });
235
235
  } else
236
- g(C);
236
+ p(f);
237
237
  y();
238
238
  }, y = () => {
239
- u(!1), a(!1);
239
+ u(!1), n(!1);
240
240
  }, N = _.useMemo(
241
- () => n.find((C) => C.guid === m),
241
+ () => i.find((f) => f.guid === m),
242
242
  [m]
243
243
  );
244
- return /* @__PURE__ */ s(_.Fragment, { children: [
245
- /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
244
+ return /* @__PURE__ */ d(_.Fragment, { children: [
245
+ /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(
246
246
  U,
247
247
  {
248
248
  onClick: () => {
@@ -261,23 +261,23 @@ const it = ({ transaction: t, onClick: r }) => {
261
261
  /* @__PURE__ */ e(
262
262
  M,
263
263
  {
264
- primary: d.category_title,
264
+ primary: l.category_title,
265
265
  primaryTypographyProps: { variant: "XSmall" },
266
- secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.category ?? d.actions_select_a_category })
266
+ secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.category ?? l.actions_select_a_category })
267
267
  }
268
268
  ),
269
- /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
269
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
270
270
  ]
271
271
  }
272
272
  ) }),
273
273
  /* @__PURE__ */ e(
274
- we,
274
+ Oe,
275
275
  {
276
276
  initialSelected: t.category_guid,
277
277
  onClose: y,
278
- onSelect: x,
279
- showDrawer: c,
280
- title: d.actions_select_a_category
278
+ onSelect: S,
279
+ showDrawer: s,
280
+ title: l.actions_select_a_category
281
281
  }
282
282
  ),
283
283
  /* @__PURE__ */ e(
@@ -285,99 +285,99 @@ const it = ({ transaction: t, onClick: r }) => {
285
285
  {
286
286
  copy: {
287
287
  title: se(
288
- d.actions_apply_to_all_transaction_types,
288
+ l.actions_apply_to_all_transaction_types,
289
289
  t.description
290
290
  )
291
291
  },
292
292
  isOpen: !!m,
293
- onClose: () => g(""),
294
- onPrimaryAction: () => p(!0),
295
- onSecondaryAction: () => p(!1),
296
- primaryText: d.actions_apply_to_all,
297
- secondaryText: d.actions_this_time_only,
293
+ onClose: () => p(""),
294
+ onPrimaryAction: () => g(!0),
295
+ onSecondaryAction: () => g(!1),
296
+ primaryText: l.actions_apply_to_all,
297
+ secondaryText: l.actions_this_time_only,
298
298
  children: /* @__PURE__ */ e(le, { variant: "Paragraph", children: se(
299
- d.actions_all_past_and_future,
299
+ l.actions_all_past_and_future,
300
300
  t.description,
301
301
  N?.name
302
302
  ) })
303
303
  }
304
304
  )
305
305
  ] });
306
- }, gt = ({ transaction: t }) => {
307
- const r = ee(), { onEvent: i } = L(), { updateTransaction: n } = v(), { updateManualTransaction: o } = G(), { common: a, transactions: l } = A(), [d, c] = _.useState(!1), [u, m] = _.useState(t.date), g = (x) => {
308
- m(Ze(x));
309
- }, p = async () => {
306
+ }, pt = ({ transaction: t }) => {
307
+ const r = ee(), { onEvent: a } = L(), { updateTransaction: i } = w(), { updateManualTransaction: o } = G(), { common: n, transactions: c } = x(), [l, s] = _.useState(!1), [u, m] = _.useState(t.date), p = (S) => {
308
+ m(Ze(S));
309
+ }, g = async () => {
310
310
  if (t.is_manual && !t.guid) {
311
- o({ ...t, date: u }), c(!1);
311
+ o({ ...t, date: u }), s(!1);
312
312
  return;
313
313
  }
314
- await n({ ...t, date: u }), i(P.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), c(!1);
314
+ await i({ ...t, date: u }), a(P.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), s(!1);
315
315
  };
316
- return /* @__PURE__ */ s(w, { className: "mx-txn-date-action", children: [
317
- /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
316
+ return /* @__PURE__ */ d(v, { className: "mx-txn-date-action", children: [
317
+ /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(
318
318
  U,
319
319
  {
320
320
  onClick: () => {
321
- i(h.ON_TRANSACTION_DATE_CLICK), c(!0);
321
+ a(h.ON_TRANSACTION_DATE_CLICK), s(!0);
322
322
  },
323
323
  children: [
324
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(S, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
324
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
325
325
  /* @__PURE__ */ e(
326
326
  M,
327
327
  {
328
- primary: l.date_title,
328
+ primary: c.date_title,
329
329
  primaryTypographyProps: { variant: "XSmall" },
330
- secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: Ee(W(t.date), Oe.YEAR_MONTH_DAY) })
330
+ secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: we(W(t.date), Ee.YEAR_MONTH_DAY) })
331
331
  }
332
332
  ),
333
- /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
333
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
334
334
  ]
335
335
  }
336
336
  ) }),
337
337
  /* @__PURE__ */ e(
338
338
  de,
339
339
  {
340
- ariaLabelClose: a.close_aria,
341
- isOpen: d,
342
- onClose: () => c(!1),
343
- onPrimaryAction: p,
344
- primaryText: a.save_button,
345
- secondaryText: a.cancel_button,
346
- title: l.date_edit_title,
347
- children: /* @__PURE__ */ e(f, { alignItems: "center", mt: r.Spacing.XXLarge, children: /* @__PURE__ */ e(
340
+ ariaLabelClose: n.close_aria,
341
+ isOpen: l,
342
+ onClose: () => s(!1),
343
+ onPrimaryAction: g,
344
+ primaryText: n.save_button,
345
+ secondaryText: n.cancel_button,
346
+ title: c.date_edit_title,
347
+ children: /* @__PURE__ */ e(b, { alignItems: "center", mt: r.Spacing.XXLarge, children: /* @__PURE__ */ e(
348
348
  Me,
349
349
  {
350
350
  beginDate: W(u),
351
351
  copy: {
352
- nextAria: l.date_next_aria,
353
- prevAria: l.date_prev_aria,
354
- today: a.date_range_picker.today
352
+ nextAria: c.date_next_aria,
353
+ prevAria: c.date_prev_aria,
354
+ today: n.date_range_picker.today
355
355
  },
356
- onDateSelected: g,
356
+ onDateSelected: p,
357
357
  selectionType: Ke.Single
358
358
  }
359
359
  ) })
360
360
  }
361
361
  )
362
362
  ] });
363
- }, pt = ({ transaction: t }) => {
364
- const { onEvent: r } = L(), { removeTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = A(), [l, d] = _.useState(!1), c = async () => {
365
- await i(t.guid), r(h.ON_TRANSACTION_DELETE_DELETED);
363
+ }, gt = ({ transaction: t }) => {
364
+ const { onEvent: r } = L(), { removeTransaction: a } = w(), { setShouldDisableDrawerScroll: i } = G(), { common: o, transactions: n } = x(), [c, l] = _.useState(!1), s = async () => {
365
+ await a(t.guid), r(h.ON_TRANSACTION_DELETE_DELETED);
366
366
  };
367
- return /* @__PURE__ */ s(w, { className: "mx-txn-delete", children: [
368
- t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
367
+ return /* @__PURE__ */ d(v, { className: "mx-txn-delete", children: [
368
+ t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(
369
369
  U,
370
370
  {
371
371
  onClick: () => {
372
- r(h.ON_TRANSACTION_DELETE_CLICK), n(!0), d(!0);
372
+ r(h.ON_TRANSACTION_DELETE_CLICK), i(!0), l(!0);
373
373
  },
374
374
  children: [
375
375
  /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { variant: "rounded", children: /* @__PURE__ */ e(oe, { color: "secondary", fontSize: "small" }) }) }),
376
376
  /* @__PURE__ */ e(
377
377
  M,
378
378
  {
379
- primary: a.manual_transaction_delete_title,
380
- secondary: a.manual_transaction_delete_subtitle
379
+ primary: n.manual_transaction_delete_title,
380
+ secondary: n.manual_transaction_delete_subtitle
381
381
  }
382
382
  ),
383
383
  /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(oe, {}) })
@@ -387,101 +387,101 @@ const it = ({ transaction: t, onClick: r }) => {
387
387
  /* @__PURE__ */ e(
388
388
  V,
389
389
  {
390
- copy: { title: a.manual_transaction_delete_title },
391
- isOpen: l,
390
+ copy: { title: n.manual_transaction_delete_title },
391
+ isOpen: c,
392
392
  onClose: () => {
393
- n(!1), d(!1);
393
+ i(!1), l(!1);
394
394
  },
395
- onPrimaryAction: c,
395
+ onPrimaryAction: s,
396
396
  onSecondaryAction: () => r(h.ON_TRANSACTION_DELETE_CANCEL),
397
397
  primaryText: o.delete_button,
398
398
  secondaryText: o.cancel_button,
399
- children: /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: a.manual_transaction_delete_description })
399
+ children: /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: n.manual_transaction_delete_description })
400
400
  }
401
401
  )
402
402
  ] });
403
- }, ht = b(pt), Tt = ({ transaction: t }) => {
404
- const { onEvent: r } = L(), { updateTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = A(), [l, d] = _.useState(!1), c = async () => {
405
- await i({ ...t, merchant_guid: "" }), r(P.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
403
+ }, ht = A(gt), Tt = ({ transaction: t }) => {
404
+ const { onEvent: r } = L(), { updateTransaction: a } = w(), { setShouldDisableDrawerScroll: i } = G(), { common: o, transactions: n } = x(), [c, l] = _.useState(!1), s = async () => {
405
+ await a({ ...t, merchant_guid: "" }), r(P.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
406
406
  transaction_guid: t.guid
407
407
  });
408
408
  };
409
- return /* @__PURE__ */ s(w, { className: "mx-txn-delete-logo", children: [
410
- t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
409
+ return /* @__PURE__ */ d(v, { className: "mx-txn-delete-logo", children: [
410
+ t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(
411
411
  U,
412
412
  {
413
413
  onClick: () => {
414
- r(h.ON_TRANSACTION_DELETE_LOGO_CLICK), d(!0);
414
+ r(h.ON_TRANSACTION_DELETE_LOGO_CLICK), l(!0);
415
415
  },
416
416
  children: [
417
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(S, { name: "delete", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
418
- /* @__PURE__ */ e(M, { primary: a.merchant_logo_title, secondary: a.merchant_logo_desc }),
419
- /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
417
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "delete", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
418
+ /* @__PURE__ */ e(M, { primary: n.merchant_logo_title, secondary: n.merchant_logo_desc }),
419
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
420
420
  ]
421
421
  }
422
422
  ) }),
423
- /* @__PURE__ */ s(
423
+ /* @__PURE__ */ d(
424
424
  V,
425
425
  {
426
- copy: { title: a.merchant_logo_modal_title },
427
- isOpen: l,
426
+ copy: { title: n.merchant_logo_modal_title },
427
+ isOpen: c,
428
428
  onClose: () => {
429
- n(!1), d(!1);
429
+ i(!1), l(!1);
430
430
  },
431
- onPrimaryAction: c,
431
+ onPrimaryAction: s,
432
432
  onSecondaryAction: () => r(h.ON_TRANSACTION_DELETE_LOGO_CANCEL),
433
433
  primaryText: o.delete_button,
434
434
  secondaryText: o.cancel_button,
435
- title: a.merchant_logo_modal_title,
435
+ title: n.merchant_logo_modal_title,
436
436
  children: [
437
- /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: a.merchant_logo_modal_desc }),
438
- /* @__PURE__ */ e(T, { bold: !0, sx: { whiteSpace: "normal" }, variant: "Paragraph", children: ` ${a.merchant_logo_modal_desc_bold}` })
437
+ /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: n.merchant_logo_modal_desc }),
438
+ /* @__PURE__ */ e(T, { bold: !0, sx: { whiteSpace: "normal" }, variant: "Paragraph", children: ` ${n.merchant_logo_modal_desc_bold}` })
439
439
  ]
440
440
  }
441
441
  )
442
442
  ] });
443
- }, yt = b(Tt), St = ({ transaction: t }) => {
444
- const { onEvent: r } = L(), { updateTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = A(), [l, d] = _.useState(!1), c = t.is_hidden, u = async () => {
445
- await i({ ...t, is_hidden: !t.is_hidden }), r(
446
- c ? h.ON_TRANSACTION_UNHIDDEN : h.ON_TRANSACTION_HIDDEN
443
+ }, yt = A(Tt), St = ({ transaction: t }) => {
444
+ const { onEvent: r } = L(), { updateTransaction: a } = w(), { setShouldDisableDrawerScroll: i } = G(), { common: o, transactions: n } = x(), [c, l] = _.useState(!1), s = t.is_hidden, u = async () => {
445
+ await a({ ...t, is_hidden: !t.is_hidden }), r(
446
+ s ? h.ON_TRANSACTION_UNHIDDEN : h.ON_TRANSACTION_HIDDEN
447
447
  );
448
448
  };
449
- return /* @__PURE__ */ s(w, { className: "mx-txn-hide-transaction", children: [
450
- t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
449
+ return /* @__PURE__ */ d(v, { className: "mx-txn-hide-transaction", children: [
450
+ t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(
451
451
  U,
452
452
  {
453
- "aria-checked": c,
453
+ "aria-checked": s,
454
454
  onClick: () => {
455
455
  r(
456
- c ? h.ON_TRANSACTION_UNHIDE_CLICK : h.ON_TRANSACTION_HIDE_CLICK
456
+ s ? h.ON_TRANSACTION_UNHIDE_CLICK : h.ON_TRANSACTION_HIDE_CLICK
457
457
  ), r(
458
- c ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
458
+ s ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
459
459
  {
460
460
  transaction_guid: t.guid
461
461
  }
462
- ), d(!0);
462
+ ), l(!0);
463
463
  },
464
464
  role: "switch",
465
465
  children: [
466
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: c ? /* @__PURE__ */ e(
467
- S,
466
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: s ? /* @__PURE__ */ e(
467
+ C,
468
468
  {
469
469
  name: "visibilityOff",
470
470
  sx: { color: "text.primary" },
471
471
  weight: D.Dark
472
472
  }
473
- ) : /* @__PURE__ */ e(S, { name: "visibility", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
473
+ ) : /* @__PURE__ */ e(C, { name: "visibility", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
474
474
  /* @__PURE__ */ e(
475
475
  M,
476
476
  {
477
- primary: c ? a.hide_trnx_subtitle_unhide_trnx : a.hide_trnx_subtitle_hide_trnx,
478
- secondary: c ? a.hide_trnx_desc_unhiding : a.hide_trnx_desc_hiding
477
+ primary: s ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx,
478
+ secondary: s ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding
479
479
  }
480
480
  ),
481
481
  /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
482
482
  et,
483
483
  {
484
- checked: c,
484
+ checked: s,
485
485
  id: "hide-transaction",
486
486
  name: "hide-transaction",
487
487
  tabIndex: -1
@@ -494,66 +494,66 @@ const it = ({ transaction: t, onClick: r }) => {
494
494
  V,
495
495
  {
496
496
  copy: {
497
- title: c ? a.hide_trnx_subtitle_unhide_trnx : a.hide_trnx_subtitle_hide_trnx
497
+ title: s ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx
498
498
  },
499
- isOpen: l,
499
+ isOpen: c,
500
500
  onClose: () => {
501
- n(!1), d(!1);
501
+ i(!1), l(!1);
502
502
  },
503
503
  onPrimaryAction: u,
504
504
  onSecondaryAction: () => r(
505
- c ? h.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : h.ON_TRANSACTION_HIDE_CANCEL_CLICK
505
+ s ? h.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : h.ON_TRANSACTION_HIDE_CANCEL_CLICK
506
506
  ),
507
- primaryText: c ? o.unhide_button : o.hide_button,
507
+ primaryText: s ? o.unhide_button : o.hide_button,
508
508
  secondaryText: o.cancel_button,
509
- children: /* @__PURE__ */ e(T, { truncate: !1, variant: "Paragraph", children: c ? a.hide_trnx_desc_unhiding : a.hide_trnx_desc_hiding })
509
+ children: /* @__PURE__ */ e(T, { truncate: !1, variant: "Paragraph", children: s ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding })
510
510
  }
511
511
  )
512
512
  ] });
513
- }, Ct = b(St), Le = ({ transaction: t }) => {
514
- const { amount: r, description: i, isIncome: n, merchant_guid: o, payee: a, top_level_category_guid: l } = t;
515
- return /* @__PURE__ */ s(f, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
513
+ }, Ct = A(St), Le = ({ transaction: t }) => {
514
+ const { amount: r, description: a, isIncome: i, merchant_guid: o, payee: n, top_level_category_guid: c } = t;
515
+ return /* @__PURE__ */ d(b, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
516
516
  /* @__PURE__ */ e(
517
- pe,
517
+ ge,
518
518
  {
519
- categoryGuid: l || "",
519
+ categoryGuid: c || "",
520
520
  merchantGuid: o || "",
521
521
  size: 64
522
522
  }
523
523
  ),
524
- /* @__PURE__ */ s(f, { overflow: "hidden'", children: [
525
- /* @__PURE__ */ e(T, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: i || a }),
526
- /* @__PURE__ */ s(Ae, { color: n ? "success.main" : "text.primary", truncate: !0, children: [
527
- n ? "+" : "",
524
+ /* @__PURE__ */ d(b, { overflow: "hidden'", children: [
525
+ /* @__PURE__ */ e(T, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: a || n }),
526
+ /* @__PURE__ */ d(Ae, { color: i ? "success.main" : "text.primary", truncate: !0, children: [
527
+ i ? "+" : "",
528
528
  te(r, "0,0.00")
529
529
  ] })
530
530
  ] })
531
531
  ] });
532
532
  }, ft = ({ transaction: t }) => {
533
- const { onEvent: r } = L(), { updateTransaction: i } = v(), { updateManualTransaction: n } = G(), { common: o, transactions: a } = A(), [l, d] = _.useState(!1), [c, u] = _.useState("");
533
+ const { onEvent: r } = L(), { updateTransaction: a } = w(), { updateManualTransaction: i } = G(), { common: o, transactions: n } = x(), [c, l] = _.useState(!1), [s, u] = _.useState("");
534
534
  _.useEffect(() => {
535
- l && u(t.memo ? t.memo : "");
536
- }, [l]);
535
+ c && u(t.memo ? t.memo : "");
536
+ }, [c]);
537
537
  const m = async () => {
538
538
  if (t.is_manual && !t.guid) {
539
- n({ ...t, memo: c }), d(!1);
539
+ i({ ...t, memo: s }), l(!1);
540
540
  return;
541
541
  }
542
- await i({ ...t, memo: c }), r(P.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), d(!1);
542
+ await a({ ...t, memo: s }), r(P.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), l(!1);
543
543
  };
544
- return /* @__PURE__ */ s("div", { className: "mx-txn-memo-action", children: [
545
- /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
544
+ return /* @__PURE__ */ d("div", { className: "mx-txn-memo-action", children: [
545
+ /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(
546
546
  U,
547
547
  {
548
548
  onClick: () => {
549
- r(h.ON_TRANSACTION_MEMO_CLICK), d(!0);
549
+ r(h.ON_TRANSACTION_MEMO_CLICK), l(!0);
550
550
  },
551
551
  children: [
552
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(S, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
552
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
553
553
  /* @__PURE__ */ e(
554
554
  M,
555
555
  {
556
- primary: a.memo_title,
556
+ primary: n.memo_title,
557
557
  primaryTypographyProps: { variant: "XSmall" },
558
558
  secondary: /* @__PURE__ */ e(
559
559
  T,
@@ -561,99 +561,127 @@ const it = ({ transaction: t, onClick: r }) => {
561
561
  bold: !0,
562
562
  sx: { overflowWrap: "break-word", whiteSpace: "wrap" },
563
563
  variant: "Body",
564
- children: t.memo ? t.memo : a.memo_desc
564
+ children: t.memo ? t.memo : n.memo_desc
565
565
  }
566
566
  )
567
567
  }
568
568
  ),
569
- /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
569
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
570
570
  ]
571
571
  }
572
572
  ) }),
573
- /* @__PURE__ */ s(
573
+ /* @__PURE__ */ d(
574
574
  de,
575
575
  {
576
576
  ariaLabelClose: o.close_aria,
577
- isOpen: l,
578
- onClose: () => d(!1),
577
+ isOpen: c,
578
+ onClose: () => l(!1),
579
579
  onPrimaryAction: m,
580
- title: a.memo_title,
580
+ title: n.memo_title,
581
581
  children: [
582
582
  /* @__PURE__ */ e(Le, { transaction: t }),
583
583
  /* @__PURE__ */ e(
584
- De,
584
+ ve,
585
585
  {
586
- "aria-label": a.memo_desc_aria,
586
+ "aria-label": n.memo_desc_aria,
587
587
  focused: !0,
588
588
  fullWidth: !0,
589
589
  multiline: !0,
590
590
  name: "memo",
591
- onChange: (g) => u(g.target.value),
592
- placeholder: a.memo_desc,
591
+ onChange: (p) => u(p.target.value),
592
+ placeholder: n.memo_desc,
593
593
  rows: 4,
594
594
  sx: { px: 16 },
595
- value: c
595
+ value: s
596
596
  }
597
597
  )
598
598
  ]
599
599
  }
600
600
  )
601
601
  ] });
602
- }, bt = b(ft), At = ({
602
+ }, bt = A(ft), At = (t = "polite") => {
603
+ const [r, a] = _.useState(""), [i, o] = _.useState(t), n = _.useCallback((l, s) => {
604
+ s && o(s), a(l);
605
+ }, []), c = _.useMemo(
606
+ () => /* @__PURE__ */ e(
607
+ v,
608
+ {
609
+ "aria-atomic": "true",
610
+ "aria-live": i,
611
+ role: i === "assertive" ? "alert" : "status",
612
+ sx: {
613
+ position: "absolute",
614
+ width: "1px",
615
+ height: "1px",
616
+ padding: 0,
617
+ margin: "-1px",
618
+ overflow: "hidden",
619
+ clip: "rect(0 0 0 0)",
620
+ clipPath: "inset(50%)",
621
+ whiteSpace: "nowrap",
622
+ border: 0
623
+ },
624
+ children: r
625
+ }
626
+ ),
627
+ [r, i]
628
+ );
629
+ return { announce: n, ariaLive: c };
630
+ }, xt = ({
603
631
  index: t,
604
632
  onDeleteRow: r,
605
- onCategoryChanged: i,
606
- onUpdateAmount: n,
633
+ onCategoryChanged: a,
634
+ onUpdateAmount: i,
607
635
  split: o
608
636
  }) => {
609
- const a = ee(), { onEvent: l } = L(), { transactions: d } = A(), [c, u] = _.useState(`${o.amount}`), [m, g] = _.useState(!1), p = t === 0, x = (y) => {
610
- isNaN(Number(y)) || (u(y), n(t, Number(y)));
637
+ const n = ee(), { onEvent: c } = L(), { transactions: l } = x(), [s, u] = _.useState(`${o.amount}`), [m, p] = _.useState(!1), g = t === 0, S = (y) => {
638
+ isNaN(Number(y)) || (u(y), i(t, Number(y)));
611
639
  };
612
- return /* @__PURE__ */ s(
613
- w,
640
+ return /* @__PURE__ */ d(
641
+ v,
614
642
  {
615
643
  bgcolor: "background.paper",
616
644
  className: "mx-txn-split-manager-row",
617
- pb: a.Spacing.Tiny,
618
- px: a.Spacing.XSmall,
645
+ pb: n.Spacing.Tiny,
646
+ px: n.Spacing.XSmall,
619
647
  children: [
620
- /* @__PURE__ */ s(ge, { alignItems: p ? "center" : "start", container: !0, children: [
621
- /* @__PURE__ */ e(ge, { item: !0, xs: 7, children: /* @__PURE__ */ s(f, { alignItems: "start", children: [
648
+ /* @__PURE__ */ d(pe, { alignItems: g ? "center" : "start", container: !0, children: [
649
+ /* @__PURE__ */ e(pe, { item: !0, xs: 7, children: /* @__PURE__ */ d(b, { alignItems: "start", children: [
622
650
  /* @__PURE__ */ e(
623
651
  ce,
624
652
  {
625
653
  endIcon: /* @__PURE__ */ e(Ue, {}),
626
- onClick: () => g(!0),
654
+ onClick: () => p(!0),
627
655
  startIcon: /* @__PURE__ */ e(he, { categoryGuid: o.top_level_category_guid }),
628
- sx: { px: a.Spacing.Small, py: a.Spacing.XSmall },
656
+ sx: { px: n.Spacing.Small, py: n.Spacing.XSmall },
629
657
  children: o.category
630
658
  }
631
659
  ),
632
- /* @__PURE__ */ e(w, { children: !o.category_guid && /* @__PURE__ */ s(
633
- f,
660
+ /* @__PURE__ */ e(v, { children: !o.category_guid && /* @__PURE__ */ d(
661
+ b,
634
662
  {
635
663
  color: "error.main",
636
664
  direction: "row",
637
- gap: a.Spacing.XSmall,
638
- p: a.Spacing.Small,
665
+ gap: n.Spacing.XSmall,
666
+ p: n.Spacing.Small,
639
667
  children: [
640
- /* @__PURE__ */ e(ie, { sx: { fontSize: a.FontSize.Body } }),
641
- /* @__PURE__ */ e(T, { variant: "Small", children: d.split_transaction_errors_select_category })
668
+ /* @__PURE__ */ e(ie, { sx: { fontSize: n.FontSize.Body } }),
669
+ /* @__PURE__ */ e(T, { variant: "Small", children: l.split_transaction_errors_select_category })
642
670
  ]
643
671
  }
644
672
  ) })
645
673
  ] }) }),
646
- /* @__PURE__ */ e(ge, { item: !0, xs: 5, children: p ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(T, { children: te(o.amount, "0,0.00") }) }) : /* @__PURE__ */ s(f, { alignItems: "start", children: [
647
- /* @__PURE__ */ s(f, { alignItems: "start", direction: "row", gap: a.Spacing.XSmall, children: [
674
+ /* @__PURE__ */ e(pe, { item: !0, xs: 5, children: g ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(T, { children: te(o.amount, "0,0.00") }) }) : /* @__PURE__ */ d(b, { alignItems: "start", children: [
675
+ /* @__PURE__ */ d(b, { alignItems: "start", direction: "row", gap: n.Spacing.XSmall, children: [
648
676
  /* @__PURE__ */ e(
649
677
  Qe,
650
678
  {
651
- amount: c,
652
- ariaLabel: d.split_transaction_edit_split_amount,
679
+ amount: s,
680
+ ariaLabel: l.split_transaction_edit_split_amount,
653
681
  name: "split-amount-input",
654
- setAmount: x,
682
+ setAmount: S,
655
683
  sx: {
656
- ".MuiOutlinedInput-input": { p: a.Spacing.Small }
684
+ ".MuiOutlinedInput-input": { p: n.Spacing.Small }
657
685
  },
658
686
  type: "number"
659
687
  }
@@ -661,100 +689,105 @@ const it = ({ transaction: t, onClick: r }) => {
661
689
  /* @__PURE__ */ e(
662
690
  Q,
663
691
  {
664
- "aria-label": d.split_transaction_delete_split_btn,
692
+ "aria-label": l.split_transaction_delete_split_btn,
665
693
  color: "secondary",
666
694
  onClick: () => {
667
- l(h.ON_TRANSACTION_SPLIT_DELETE_CLICK), r(t);
695
+ c(h.ON_TRANSACTION_SPLIT_DELETE_CLICK), r(t);
668
696
  },
669
697
  sx: { w: 44, h: 44 },
670
698
  children: /* @__PURE__ */ e(oe, {})
671
699
  }
672
700
  )
673
701
  ] }),
674
- !c && /* @__PURE__ */ s(
675
- f,
702
+ !s && /* @__PURE__ */ d(
703
+ b,
676
704
  {
677
705
  color: "error.main",
678
706
  direction: "row",
679
- gap: a.Spacing.XSmall,
680
- py: a.Spacing.Small,
707
+ gap: n.Spacing.XSmall,
708
+ py: n.Spacing.Small,
681
709
  children: [
682
- /* @__PURE__ */ e(ie, { sx: { fontSize: a.FontSize.Body } }),
683
- /* @__PURE__ */ e(T, { variant: "Small", children: d.split_transaction_errors_enter_an_amount })
710
+ /* @__PURE__ */ e(ie, { sx: { fontSize: n.FontSize.Body } }),
711
+ /* @__PURE__ */ e(T, { variant: "Small", children: l.split_transaction_errors_enter_an_amount })
684
712
  ]
685
713
  }
686
714
  )
687
715
  ] }) })
688
716
  ] }),
689
717
  /* @__PURE__ */ e(
690
- we,
718
+ Oe,
691
719
  {
692
720
  initialSelected: o.category_guid,
693
- onClose: () => g(!1),
721
+ onClose: () => p(!1),
694
722
  onSelect: (y) => {
695
- i(t, y), g(!1);
723
+ a(t, y), p(!1);
696
724
  },
697
725
  showDrawer: m,
698
- title: d.actions_select_a_category
726
+ title: l.actions_select_a_category
699
727
  }
700
728
  )
701
729
  ]
702
730
  }
703
731
  );
704
- }, xt = b(At), Nt = ({
732
+ }, Nt = A(xt), It = ({
705
733
  onAddSplit: t,
706
734
  onCategoryChanged: r,
707
- onDeleteSplit: i,
708
- onUpdateAmount: n,
735
+ onDeleteSplit: a,
736
+ onUpdateAmount: i,
709
737
  splits: o,
710
- transaction: a
738
+ transaction: n
711
739
  }) => {
712
- const l = ee(), { transactions: d } = A(), { onEvent: c } = L(), [u, m] = _.useState("");
740
+ const c = ee(), { transactions: l } = x(), { onEvent: s } = L(), [u, m] = _.useState(""), { announce: p, ariaLive: g } = At();
713
741
  return _.useEffect(() => {
714
- m(o.length <= 1 ? d.split_transaction_errors_min_splits : ""), m(
715
- o[0].amount < 0 ? se(
716
- d.split_transaction_errors_totals_must_equal_amount,
717
- te(a.amount, "0,0.00")
718
- ) : ""
719
- );
720
- }, [o]), /* @__PURE__ */ s(w, { className: "mx-txn-split-manager", children: [
721
- o.map((g, p) => /* @__PURE__ */ e(
722
- xt,
742
+ if (o.length <= 1)
743
+ m(l.split_transaction_errors_min_splits), p(l.split_transaction_errors_min_splits);
744
+ else if (o[0].amount < 0) {
745
+ const S = se(
746
+ l.split_transaction_errors_totals_must_equal_amount,
747
+ te(n.amount, "0,0.00")
748
+ );
749
+ m(S), p(S);
750
+ } else
751
+ m(""), p("");
752
+ }, [o]), /* @__PURE__ */ d(v, { className: "mx-txn-split-manager", children: [
753
+ o.map((S, y) => /* @__PURE__ */ e(
754
+ Nt,
723
755
  {
724
- index: p,
756
+ index: y,
725
757
  onCategoryChanged: r,
726
- onDeleteRow: i,
727
- onUpdateAmount: n,
728
- split: g
758
+ onDeleteRow: a,
759
+ onUpdateAmount: i,
760
+ split: S
729
761
  },
730
- p
762
+ y
731
763
  )),
732
- u && /* @__PURE__ */ s(
733
- f,
764
+ u && /* @__PURE__ */ d(
765
+ b,
734
766
  {
735
767
  color: "error.main",
736
768
  direction: "row",
737
- gap: l.Spacing.XSmall,
738
- p: l.Spacing.Medium,
769
+ gap: c.Spacing.XSmall,
770
+ p: c.Spacing.Medium,
739
771
  children: [
740
- /* @__PURE__ */ e(ie, { sx: { fontSize: l.FontSize.Body } }),
741
- /* @__PURE__ */ e(T, { variant: "Small", children: u })
772
+ /* @__PURE__ */ e(ie, { sx: { fontSize: c.FontSize.Body } }),
773
+ /* @__PURE__ */ e(T, { variant: "Small", children: u }),
774
+ g
742
775
  ]
743
776
  }
744
777
  ),
745
- /* @__PURE__ */ e(w, { p: l.Spacing.Medium, children: /* @__PURE__ */ e(
778
+ /* @__PURE__ */ e(v, { p: c.Spacing.Medium, children: /* @__PURE__ */ e(
746
779
  ce,
747
780
  {
748
- "aria-label": d.split_transaction_add_split_btn,
781
+ "aria-label": l.split_transaction_add_split_btn,
749
782
  onClick: () => {
750
- c(h.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
783
+ s(h.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
751
784
  },
752
- children: d.split_transaction_add_split_btn
785
+ children: l.split_transaction_add_split_btn
753
786
  }
754
787
  ) })
755
788
  ] });
756
- }, It = b(Nt), Dt = ({ transaction: t }) => {
757
- const { onEvent: r } = L(), { splitTransaction: i, unSplitTransaction: n } = v(), { common: o, transactions: a } = A(), { setShouldDisableDrawerScroll: l } = G(), { categories: d } = xe(), c = {
789
+ }, vt = A(It), Dt = ({ transaction: t }) => {
790
+ const { onEvent: r } = L(), { splitTransaction: a, unSplitTransaction: i } = w(), { common: o, transactions: n } = x(), { setShouldDisableDrawerScroll: c } = G(), { categories: l } = xe(), s = {
758
791
  ...t,
759
792
  amount: t.amount - 1,
760
793
  guid: "",
@@ -764,15 +797,15 @@ const it = ({ transaction: t, onClick: r }) => {
764
797
  ...t,
765
798
  amount: 1,
766
799
  category_guid: void 0,
767
- category: a.split_transaction_select_category_btn,
800
+ category: n.split_transaction_select_category_btn,
768
801
  guid: "",
769
802
  has_been_split: !1,
770
803
  parent_guid: t.guid,
771
804
  top_level_category_guid: void 0
772
- }, [m, g] = _.useState(!1), [p, x] = _.useState(!1), [y, N] = _.useState([]), C = () => {
805
+ }, [m, p] = _.useState(!1), [g, S] = _.useState(!1), [y, N] = _.useState([]), f = () => {
773
806
  const E = [...y];
774
807
  E.push({ ...u }), E[0].amount -= 1, N(E);
775
- }, R = (E) => {
808
+ }, k = (E) => {
776
809
  if (E > 0) {
777
810
  const H = y[E], O = [...y];
778
811
  O.splice(E, 1), O[0].amount += H.amount, N(O);
@@ -780,11 +813,11 @@ const it = ({ transaction: t, onClick: r }) => {
780
813
  }, K = (E, H) => {
781
814
  const O = [...y];
782
815
  O[E].amount = H, O[0].amount = t.amount - O.reduce(
783
- (j, me, Re) => j + (Re !== 0 ? me.amount : 0),
816
+ (j, me, ke) => j + (ke !== 0 ? me.amount : 0),
784
817
  0
785
818
  ), N(O);
786
819
  }, $ = (E, H) => {
787
- const O = [...y], j = d.find((me) => me.guid === H);
820
+ const O = [...y], j = l.find((me) => me.guid === H);
788
821
  j && (O[E] = {
789
822
  ...O[E],
790
823
  category_guid: H,
@@ -793,57 +826,57 @@ const it = ({ transaction: t, onClick: r }) => {
793
826
  }, N(O));
794
827
  }, I = () => {
795
828
  if (t.parent_guid || t.has_been_split) {
796
- x(!0);
829
+ S(!0);
797
830
  return;
798
831
  }
799
- N([{ ...c }, { ...u }]), r(P.TRANSACTION_DETAILS_CLICK_SPLIT, {
832
+ N([{ ...s }, { ...u }]), r(P.TRANSACTION_DETAILS_CLICK_SPLIT, {
800
833
  transaction_guid: t.guid
801
- }), g(!0);
802
- }, k = async () => {
803
- r(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...t, has_been_split: !0 }, y), g(!1);
834
+ }), p(!0);
835
+ }, R = async () => {
836
+ r(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await a({ ...t, has_been_split: !0 }, y), p(!1);
804
837
  }, Y = async () => {
805
- r(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...c }, { ...u }]), g(!1);
838
+ r(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...s }, { ...u }]), p(!1);
806
839
  }, _e = async () => {
807
840
  r(P.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
808
841
  transaction_guid: t.guid
809
842
  });
810
843
  const E = t.parent_guid ?? t.guid;
811
- await n(E);
844
+ await i(E);
812
845
  }, ue = _.useMemo(() => {
813
846
  const E = y.some((O) => !O.category_guid), H = y.some((O) => O.amount <= 0);
814
847
  return E || H;
815
848
  }, [y]);
816
- return /* @__PURE__ */ s(_.Fragment, { children: [
817
- t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(U, { onClick: I, children: [
818
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(S, { name: "call_split", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
849
+ return /* @__PURE__ */ d(_.Fragment, { children: [
850
+ t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(U, { onClick: I, children: [
851
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "call_split", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
819
852
  /* @__PURE__ */ e(
820
853
  M,
821
854
  {
822
- primary: t.has_been_split || t.parent_guid ? a.split_transaction_unsplit_title : a.split_transaction_title,
823
- secondary: t.has_been_split || t.parent_guid ? a.split_transaction_unsplit_subtitle : a.split_transaction_desc
855
+ primary: t.has_been_split || t.parent_guid ? n.split_transaction_unsplit_title : n.split_transaction_title,
856
+ secondary: t.has_been_split || t.parent_guid ? n.split_transaction_unsplit_subtitle : n.split_transaction_desc
824
857
  }
825
858
  ),
826
- /* @__PURE__ */ e(X, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(S, { name: "delete", weight: D.Dark }) : /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
859
+ /* @__PURE__ */ e(X, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(C, { name: "delete", weight: D.Dark }) : /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
827
860
  ] }) }),
828
- /* @__PURE__ */ s(
861
+ /* @__PURE__ */ d(
829
862
  de,
830
863
  {
831
864
  ariaLabelClose: o.close_aria,
832
865
  isOpen: m,
833
866
  isPrimaryDisabled: ue,
834
867
  onClose: Y,
835
- onPrimaryAction: k,
868
+ onPrimaryAction: R,
836
869
  primaryText: o.save_button,
837
870
  secondaryText: o.cancel_button,
838
- title: a.split_transaction_title,
871
+ title: n.split_transaction_title,
839
872
  children: [
840
873
  /* @__PURE__ */ e(Le, { transaction: t }),
841
874
  /* @__PURE__ */ e(
842
- It,
875
+ vt,
843
876
  {
844
- onAddSplit: C,
877
+ onAddSplit: f,
845
878
  onCategoryChanged: $,
846
- onDeleteSplit: R,
879
+ onDeleteSplit: k,
847
880
  onUpdateAmount: K,
848
881
  splits: y,
849
882
  transaction: t
@@ -855,10 +888,10 @@ const it = ({ transaction: t, onClick: r }) => {
855
888
  /* @__PURE__ */ e(
856
889
  V,
857
890
  {
858
- copy: { title: a.split_transaction_unsplit_title },
859
- isOpen: p,
891
+ copy: { title: n.split_transaction_unsplit_title },
892
+ isOpen: g,
860
893
  onClose: () => {
861
- l(!1), x(!1);
894
+ c(!1), S(!1);
862
895
  },
863
896
  onPrimaryAction: _e,
864
897
  onSecondaryAction: () => {
@@ -867,29 +900,29 @@ const it = ({ transaction: t, onClick: r }) => {
867
900
  primaryText: o.delete_button,
868
901
  secondaryText: o.cancel_button,
869
902
  children: /* @__PURE__ */ e(le, { variant: "Paragraph", children: se(
870
- a.split_transaction_unsplit_description,
903
+ n.split_transaction_unsplit_description,
871
904
  t.description
872
905
  ) })
873
906
  }
874
907
  )
875
908
  ] });
876
- }, vt = b(Dt), Et = () => {
877
- const t = ve(), { onEvent: r } = L(), { addTag: i } = v(), { transactions: n } = A(), [o, a] = _.useState(!1), [l, d] = _.useState(""), [c, u] = _.useState(""), m = _.useRef(null);
909
+ }, wt = A(Dt), Et = () => {
910
+ const t = De(), { onEvent: r } = L(), { addTag: a } = w(), { transactions: i } = x(), [o, n] = _.useState(!1), [c, l] = _.useState(""), [s, u] = _.useState(""), m = _.useRef(null);
878
911
  _.useEffect(() => {
879
912
  o && m?.current?.focus();
880
913
  }, [o]);
881
- const g = () => {
914
+ const p = () => {
882
915
  r(
883
916
  o ? h.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : h.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
884
- ), o || d(""), a(!o);
885
- }, p = async () => {
886
- r(h.ON_TRANSACTION_TAGS_TAG_ADDED), await i(l), a(!1);
917
+ ), o || l(""), n(!o);
918
+ }, g = async () => {
919
+ r(h.ON_TRANSACTION_TAGS_TAG_ADDED), await a(c), n(!1);
887
920
  };
888
921
  return _.useEffect(() => {
889
- u(l.length > 40 ? n.tags_error_name_must_be_40_chars : "");
890
- }, [l]), /* @__PURE__ */ s(w, { className: "mx-txn-tag-manager-header", children: [
891
- /* @__PURE__ */ s(
892
- f,
922
+ u(c.length > 40 ? i.tags_error_name_must_be_40_chars : "");
923
+ }, [c]), /* @__PURE__ */ d(v, { className: "mx-txn-tag-manager-header", children: [
924
+ /* @__PURE__ */ d(
925
+ b,
893
926
  {
894
927
  alignItems: "center",
895
928
  bgcolor: t.palette.background.default,
@@ -898,93 +931,93 @@ const it = ({ transaction: t, onClick: r }) => {
898
931
  px: 24,
899
932
  py: 16,
900
933
  children: [
901
- /* @__PURE__ */ e(T, { bold: !0, children: n.tags_your_tags }),
934
+ /* @__PURE__ */ e(T, { bold: !0, children: i.tags_your_tags }),
902
935
  /* @__PURE__ */ e(
903
936
  ce,
904
937
  {
905
938
  "aria-expanded": o,
906
- "aria-label": n.tags_add_tag_btn_aria,
907
- onClick: g,
908
- children: n.tags_add_tag_btn
939
+ "aria-label": i.tags_add_tag_btn_aria,
940
+ onClick: p,
941
+ children: i.tags_add_tag_btn
909
942
  }
910
943
  )
911
944
  ]
912
945
  }
913
946
  ),
914
- /* @__PURE__ */ s(
947
+ /* @__PURE__ */ d(
915
948
  V,
916
949
  {
917
- copy: { title: n.tags_add_tag_btn },
950
+ copy: { title: i.tags_add_tag_btn },
918
951
  isOpen: o,
919
- onClose: () => a(!1),
920
- onPrimaryAction: p,
921
- onSecondaryAction: () => a(!1),
952
+ onClose: () => n(!1),
953
+ onPrimaryAction: g,
954
+ onSecondaryAction: () => n(!1),
922
955
  children: [
923
956
  /* @__PURE__ */ e(
924
957
  Te,
925
958
  {
926
- "aria-label": n.tags_placeholder,
959
+ "aria-label": i.tags_placeholder,
927
960
  name: "add-tag",
928
- onChange: (x) => d(x.target.value),
929
- placeholder: n.tags_placeholder,
961
+ onChange: (S) => l(S.target.value),
962
+ placeholder: i.tags_placeholder,
930
963
  sx: { width: "100%" },
931
- value: l
964
+ value: c
932
965
  }
933
966
  ),
934
- /* @__PURE__ */ e(le, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: c })
967
+ /* @__PURE__ */ e(le, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: s })
935
968
  ]
936
969
  }
937
970
  )
938
971
  ] });
939
- }, Ot = b(Et), wt = ({ onSearchValueChanged: t, searchValue: r }) => {
940
- const { common: i, transactions: n } = A(), o = ee(), a = /* @__PURE__ */ e(
972
+ }, Ot = A(Et), Lt = ({ onSearchValueChanged: t, searchValue: r }) => {
973
+ const { common: a, transactions: i } = x(), o = ee(), n = /* @__PURE__ */ e(
941
974
  Q,
942
975
  {
943
- "aria-label": n.tags_cancel_search || "Search",
976
+ "aria-label": i.tags_cancel_search || "Search",
944
977
  onClick: () => t(""),
945
978
  children: /* @__PURE__ */ e(ie, {})
946
979
  }
947
980
  );
948
- return /* @__PURE__ */ e(w, { className: "mx-txn-tag-manager-search", px: o.Spacing.Large, py: o.Spacing.Medium, children: /* @__PURE__ */ e(
981
+ return /* @__PURE__ */ e(v, { className: "mx-txn-tag-manager-search", px: o.Spacing.Large, py: o.Spacing.Medium, children: /* @__PURE__ */ e(
949
982
  Te,
950
983
  {
951
984
  InputProps: {
952
985
  startAdornment: /* @__PURE__ */ e(ye, { position: "start", children: /* @__PURE__ */ e(Xe, { color: "disabled" }) }),
953
- endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ? a : null })
986
+ endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ? n : null })
954
987
  },
955
- "aria-label": i.search_aria,
988
+ "aria-label": a.search_aria,
956
989
  name: "search",
957
- onChange: (l) => t(l.target.value),
958
- placeholder: i.search_placeholder,
990
+ onChange: (c) => t(c.target.value),
991
+ placeholder: a.search_placeholder,
959
992
  sx: { bgcolor: "background.paper", width: "100%" },
960
993
  value: r
961
994
  }
962
995
  ) });
963
- }, Lt = b(wt), Rt = ({ onTagChecked: t, selectedTags: r, tag: i }) => {
964
- const { onEvent: n } = L(), { removeTag: o, updateTag: a } = v(), { common: l, transactions: d } = A(), [c, u] = _.useState(!1), [m, g] = _.useState(!1), [p, x] = _.useState(""), [y, N] = _.useState(""), C = async () => {
965
- n(h.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await a({ ...i, name: p }), u(!1);
966
- }, R = async () => {
967
- n(h.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), g(!1);
996
+ }, kt = A(Lt), Rt = ({ onTagChecked: t, selectedTags: r, tag: a }) => {
997
+ const { onEvent: i } = L(), { removeTag: o, updateTag: n } = w(), { common: c, transactions: l } = x(), [s, u] = _.useState(!1), [m, p] = _.useState(!1), [g, S] = _.useState(""), [y, N] = _.useState(""), f = async () => {
998
+ i(h.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), a && await n({ ...a, name: g }), u(!1);
999
+ }, k = async () => {
1000
+ i(h.ON_TRANSACTION_TAGS_TAG_DELETED), await o(a.guid), p(!1);
968
1001
  };
969
1002
  _.useEffect(() => {
970
- N(p.length > 40 ? d.tags_error_name_must_be_40_chars : "");
971
- }, [p]);
1003
+ N(g.length > 40 ? l.tags_error_name_must_be_40_chars : "");
1004
+ }, [g]);
972
1005
  const K = () => {
973
- n(h.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), x(i.name), u(!0);
1006
+ i(h.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), S(a.name), u(!0);
974
1007
  }, $ = () => {
975
- n(h.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), g(!0);
1008
+ i(h.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), p(!0);
976
1009
  };
977
- return /* @__PURE__ */ s(
1010
+ return /* @__PURE__ */ d(
978
1011
  F,
979
1012
  {
980
1013
  className: "mx-txn-transaction-manager-row",
981
1014
  disableGutters: !0,
982
1015
  disablePadding: !0,
983
- secondaryAction: !i.is_default_tag && /* @__PURE__ */ s(f, { direction: "row", children: [
1016
+ secondaryAction: !a.is_default_tag && /* @__PURE__ */ d(b, { direction: "row", children: [
984
1017
  /* @__PURE__ */ e(
985
1018
  Q,
986
1019
  {
987
- "aria-label": `Edit ${i.name} tag`,
1020
+ "aria-label": `Edit ${a.name} tag`,
988
1021
  color: "secondary",
989
1022
  onClick: K,
990
1023
  children: /* @__PURE__ */ e(Ve, { color: "secondary" })
@@ -993,7 +1026,7 @@ const it = ({ transaction: t, onClick: r }) => {
993
1026
  /* @__PURE__ */ e(
994
1027
  Q,
995
1028
  {
996
- "aria-label": `Delete ${i.name} tag`,
1029
+ "aria-label": `Delete ${a.name} tag`,
997
1030
  color: "secondary",
998
1031
  onClick: $,
999
1032
  children: /* @__PURE__ */ e(oe, { color: "secondary" })
@@ -1001,37 +1034,37 @@ const it = ({ transaction: t, onClick: r }) => {
1001
1034
  )
1002
1035
  ] }),
1003
1036
  children: [
1004
- /* @__PURE__ */ s(
1037
+ /* @__PURE__ */ d(
1005
1038
  U,
1006
1039
  {
1007
- "aria-checked": r.includes(i.guid),
1008
- onClick: () => t(i.guid),
1040
+ "aria-checked": r.includes(a.guid),
1041
+ onClick: () => t(a.guid),
1009
1042
  role: "checkbox",
1010
1043
  children: [
1011
- /* @__PURE__ */ e(X, { sx: { ml: 0 }, children: /* @__PURE__ */ e(Je, { checked: r.includes(i.guid), edge: "start", tabIndex: -1 }) }),
1012
- /* @__PURE__ */ e(M, { children: i.name })
1044
+ /* @__PURE__ */ e(X, { sx: { ml: 0 }, children: /* @__PURE__ */ e(Je, { checked: r.includes(a.guid), edge: "start", tabIndex: -1 }) }),
1045
+ /* @__PURE__ */ e(M, { children: a.name })
1013
1046
  ]
1014
1047
  }
1015
1048
  ),
1016
- /* @__PURE__ */ s(
1049
+ /* @__PURE__ */ d(
1017
1050
  V,
1018
1051
  {
1019
1052
  copy: { title: "Update tag name" },
1020
- isOpen: c,
1053
+ isOpen: s,
1021
1054
  onClose: () => u(!1),
1022
- onPrimaryAction: C,
1055
+ onPrimaryAction: f,
1023
1056
  onSecondaryAction: () => u(!1),
1024
1057
  children: [
1025
1058
  /* @__PURE__ */ e(
1026
1059
  Te,
1027
1060
  {
1028
1061
  "aria-describedby": y ? "update-tag-error" : void 0,
1029
- "aria-label": d.tags_update_the_tag_name,
1062
+ "aria-label": l.tags_update_the_tag_name,
1030
1063
  name: "update-tag",
1031
- onChange: (I) => x(I.target.value),
1064
+ onChange: (I) => S(I.target.value),
1032
1065
  placeholder: "Tag name",
1033
1066
  sx: { width: "100%" },
1034
- value: p
1067
+ value: g
1035
1068
  }
1036
1069
  ),
1037
1070
  /* @__PURE__ */ e(le, { id: "update-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: y })
@@ -1041,109 +1074,109 @@ const it = ({ transaction: t, onClick: r }) => {
1041
1074
  /* @__PURE__ */ e(
1042
1075
  V,
1043
1076
  {
1044
- copy: { title: d.tags_delete_title },
1077
+ copy: { title: l.tags_delete_title },
1045
1078
  isOpen: m,
1046
- onClose: () => g(!1),
1047
- onPrimaryAction: R,
1048
- onSecondaryAction: () => n(h.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
1049
- primaryText: l.delete_button,
1050
- secondaryText: l.cancel_button,
1051
- children: /* @__PURE__ */ e(T, { truncate: !1, children: d.tags_deleting_this_tag_will_remove_it })
1079
+ onClose: () => p(!1),
1080
+ onPrimaryAction: k,
1081
+ onSecondaryAction: () => i(h.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
1082
+ primaryText: c.delete_button,
1083
+ secondaryText: c.cancel_button,
1084
+ children: /* @__PURE__ */ e(T, { truncate: !1, children: l.tags_deleting_this_tag_will_remove_it })
1052
1085
  }
1053
1086
  )
1054
1087
  ]
1055
1088
  }
1056
1089
  );
1057
- }, kt = b(Rt), Pt = ({ selectedTags: t, onTagChecked: r }) => {
1058
- const { tags: i } = v(), [n, o] = _.useState(""), a = i.filter(
1059
- (l) => l.name.toLowerCase().includes(n.toLowerCase())
1090
+ }, Pt = A(Rt), Gt = ({ selectedTags: t, onTagChecked: r }) => {
1091
+ const { tags: a } = w(), [i, o] = _.useState(""), n = a.filter(
1092
+ (c) => c.name.toLowerCase().includes(i.toLowerCase())
1060
1093
  );
1061
- return /* @__PURE__ */ s("div", { className: "mx-txn-tag-manager", children: [
1094
+ return /* @__PURE__ */ d("div", { className: "mx-txn-tag-manager", children: [
1062
1095
  /* @__PURE__ */ e(
1063
- Lt,
1096
+ kt,
1064
1097
  {
1065
- onSearchValueChanged: (l) => o(l),
1066
- searchValue: n
1098
+ onSearchValueChanged: (c) => o(c),
1099
+ searchValue: i
1067
1100
  }
1068
1101
  ),
1069
1102
  /* @__PURE__ */ e(Ot, {}),
1070
- /* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children: a.map((l) => /* @__PURE__ */ s(_.Fragment, { children: [
1071
- /* @__PURE__ */ e(kt, { onTagChecked: r, selectedTags: t, tag: l }),
1103
+ /* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children: n.map((c) => /* @__PURE__ */ d(_.Fragment, { children: [
1104
+ /* @__PURE__ */ e(Pt, { onTagChecked: r, selectedTags: t, tag: c }),
1072
1105
  /* @__PURE__ */ e(Z, { sx: { ml: 24 } })
1073
- ] }, l.guid)) }) })
1106
+ ] }, c.guid)) }) })
1074
1107
  ] });
1075
- }, Gt = b(Pt), Mt = ({ transaction: t }) => {
1076
- const { onEvent: r } = L(), { tags: i, updateTaggings: n, updateTransaction: o } = v(), { common: a, transactions: l } = A(), { updateManualTransaction: d } = G(), [c, u] = _.useState(!1), [m, g] = _.useState(t.tags);
1108
+ }, Mt = A(Gt), Kt = ({ transaction: t }) => {
1109
+ const { onEvent: r } = L(), { tags: a, updateTaggings: i, updateTransaction: o } = w(), { common: n, transactions: c } = x(), { updateManualTransaction: l } = G(), [s, u] = _.useState(!1), [m, p] = _.useState(t.tags);
1077
1110
  _.useEffect(() => {
1078
- g(t.tags);
1079
- }, [c, t]);
1080
- const p = (N) => {
1081
- const C = [...m], R = m.indexOf(N);
1082
- R >= 0 ? C.splice(R, 1) : C.push(N), g(C);
1083
- }, x = async () => {
1111
+ p(t.tags);
1112
+ }, [s, t]);
1113
+ const g = (N) => {
1114
+ const f = [...m], k = m.indexOf(N);
1115
+ k >= 0 ? f.splice(k, 1) : f.push(N), p(f);
1116
+ }, S = async () => {
1084
1117
  if (t.is_manual && !t.guid) {
1085
- d({ ...t, tags: m }), u(!1);
1118
+ l({ ...t, tags: m }), u(!1);
1086
1119
  return;
1087
1120
  }
1088
- await n(m, t.guid), await o({ ...t, tags: m }), r(P.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), u(!1);
1121
+ await i(m, t.guid), await o({ ...t, tags: m }), r(P.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), u(!1);
1089
1122
  }, y = _.useMemo(
1090
1123
  () => t.tags.map(
1091
- (N, C, R) => `${i.find((K) => K.guid === N)?.name}${C < R.length - 1 ? " / " : ""}`
1124
+ (N, f, k) => `${a.find((K) => K.guid === N)?.name}${f < k.length - 1 ? " / " : ""}`
1092
1125
  ),
1093
- [i, t]
1126
+ [a, t]
1094
1127
  );
1095
- return /* @__PURE__ */ s(_.Fragment, { children: [
1096
- /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
1128
+ return /* @__PURE__ */ d(_.Fragment, { children: [
1129
+ /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ d(
1097
1130
  U,
1098
1131
  {
1099
1132
  onClick: () => {
1100
1133
  r(h.ON_TRANSACTION_TAGS_CLICK), u(!0);
1101
1134
  },
1102
1135
  children: [
1103
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(S, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
1136
+ /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
1104
1137
  /* @__PURE__ */ e(
1105
1138
  M,
1106
1139
  {
1107
- primary: l.tags_title,
1140
+ primary: c.tags_title,
1108
1141
  primaryTypographyProps: { variant: "XSmall" },
1109
- secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? y : l.tags_desc })
1142
+ secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? y : c.tags_desc })
1110
1143
  }
1111
1144
  ),
1112
- /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
1145
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
1113
1146
  ]
1114
1147
  }
1115
1148
  ) }),
1116
1149
  /* @__PURE__ */ e(
1117
1150
  de,
1118
1151
  {
1119
- ariaLabelClose: a.close_aria,
1120
- isOpen: c,
1152
+ ariaLabelClose: n.close_aria,
1153
+ isOpen: s,
1121
1154
  onClose: () => u(!1),
1122
- onPrimaryAction: x,
1123
- primaryText: a.save_button,
1124
- secondaryText: a.cancel_button,
1125
- title: l.tags_title,
1126
- children: /* @__PURE__ */ e(Gt, { onTagChecked: p, selectedTags: m })
1155
+ onPrimaryAction: S,
1156
+ primaryText: n.save_button,
1157
+ secondaryText: n.cancel_button,
1158
+ title: c.tags_title,
1159
+ children: /* @__PURE__ */ e(Mt, { onTagChecked: g, selectedTags: m })
1127
1160
  }
1128
1161
  )
1129
1162
  ] });
1130
- }, Kt = b(Mt), $t = ({ transaction: t, viewOnly: r = !1 }) => {
1131
- const { updateTransaction: i } = v(), { common: n, transactions: o } = A(), { onEvent: a } = L(), [l, d] = _.useState(!1), [c, u] = _.useState(""), m = _.useRef(null);
1163
+ }, $t = A(Kt), Bt = ({ transaction: t, viewOnly: r = !1 }) => {
1164
+ const { updateTransaction: a } = w(), { common: i, transactions: o } = x(), { onEvent: n } = L(), [c, l] = _.useState(!1), [s, u] = _.useState(""), m = _.useRef(null);
1132
1165
  _.useEffect(() => {
1133
- l && (u(t.description), m?.current?.focus());
1134
- }, [l]);
1135
- const g = async () => {
1136
- a(P.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
1166
+ c && (u(t.description), m?.current?.focus());
1167
+ }, [c]);
1168
+ const p = async () => {
1169
+ n(P.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
1137
1170
  transaction_guid: t.guid
1138
- }), await i({ ...t, description: c }), d(!1);
1171
+ }), await a({ ...t, description: s }), l(!1);
1139
1172
  };
1140
- return /* @__PURE__ */ e(w, { className: "mx-txn-transaction-description", children: l ? /* @__PURE__ */ s(je, { row: !0, children: [
1173
+ return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-description", children: c ? /* @__PURE__ */ d(je, { row: !0, children: [
1141
1174
  /* @__PURE__ */ e(
1142
- De,
1175
+ ve,
1143
1176
  {
1144
1177
  "aria-label": o.description_add_a_subcategory,
1145
1178
  name: "add-subcategory",
1146
- onChange: (p) => u(p.target.value),
1179
+ onChange: (g) => u(g.target.value),
1147
1180
  ref: m,
1148
1181
  sx: {
1149
1182
  backgroundColor: "background.paper",
@@ -1151,44 +1184,44 @@ const it = ({ transaction: t, onClick: r }) => {
1151
1184
  ".MuiOutlinedInput-input": { p: 11 },
1152
1185
  width: 250
1153
1186
  },
1154
- value: c
1187
+ value: s
1155
1188
  }
1156
1189
  ),
1157
1190
  /* @__PURE__ */ e(
1158
1191
  ce,
1159
1192
  {
1160
- disabled: !c,
1161
- onClick: g,
1193
+ disabled: !s,
1194
+ onClick: p,
1162
1195
  sx: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
1163
1196
  variant: "outlined",
1164
- children: n.save_button
1197
+ children: i.save_button
1165
1198
  }
1166
1199
  )
1167
- ] }) : /* @__PURE__ */ s(f, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
1200
+ ] }) : /* @__PURE__ */ d(b, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
1168
1201
  /* @__PURE__ */ e(T, { bold: !0, children: t.description }),
1169
1202
  !r && /* @__PURE__ */ e(
1170
1203
  Q,
1171
1204
  {
1172
1205
  "aria-label": o.description_edit_transaction_name,
1173
1206
  onClick: () => {
1174
- d(!0), a(h.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK);
1207
+ l(!0), n(h.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK);
1175
1208
  },
1176
1209
  sx: { color: "action.active" },
1177
- children: /* @__PURE__ */ e(S, { name: "create", size: 22 })
1210
+ children: /* @__PURE__ */ e(C, { name: "create", size: 22 })
1178
1211
  }
1179
1212
  )
1180
1213
  ] }) });
1181
- }, Bt = b($t), Ft = ({ transaction: t }) => {
1182
- const { updateTransaction: r } = v(), { transactions: i } = A(), { onEvent: n } = L(), o = ve(), a = async () => {
1183
- n(P.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
1214
+ }, Ft = A(Bt), Ht = ({ transaction: t }) => {
1215
+ const { updateTransaction: r } = w(), { transactions: a } = x(), { onEvent: i } = L(), o = De(), n = async () => {
1216
+ i(P.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
1184
1217
  };
1185
1218
  return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
1186
1219
  qe,
1187
1220
  {
1188
- "aria-label": i.flag_btn_aria,
1221
+ "aria-label": a.flag_btn_aria,
1189
1222
  "aria-pressed": t.is_flagged,
1190
1223
  color: "warning",
1191
- onClick: a,
1224
+ onClick: n,
1192
1225
  selected: t.is_flagged,
1193
1226
  sx: {
1194
1227
  borderRadius: 6,
@@ -1210,25 +1243,25 @@ const it = ({ transaction: t, onClick: r }) => {
1210
1243
  children: /* @__PURE__ */ e(We, { color: "inherit" })
1211
1244
  }
1212
1245
  ) });
1213
- }, Ht = b(Ft), ae = (t, r, i, n = !0, o = "inset") => n ? /* @__PURE__ */ s(_.Fragment, { children: [
1214
- /* @__PURE__ */ s(F, { disableGutters: !0, disablePadding: !0, children: [
1246
+ }, zt = A(Ht), ae = (t, r, a, i = !0, o = "inset") => i ? /* @__PURE__ */ d(_.Fragment, { children: [
1247
+ /* @__PURE__ */ d(F, { disableGutters: !0, disablePadding: !0, children: [
1215
1248
  /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
1216
1249
  /* @__PURE__ */ e(
1217
1250
  M,
1218
1251
  {
1219
1252
  primary: r,
1220
1253
  primaryTypographyProps: { variant: "XSmall" },
1221
- secondary: i
1254
+ secondary: a
1222
1255
  }
1223
1256
  )
1224
1257
  ] }),
1225
1258
  /* @__PURE__ */ e(Z, { variant: o })
1226
- ] }) : null, zt = ({ transaction: t }) => {
1227
- const { transactions: r } = A(), { tags: i } = v(), n = _.useMemo(() => {
1228
- const o = new Map(i.map((a) => [a.guid, a.name]));
1229
- return t.tags.map((a) => o.get(a)).filter(Boolean).join(" / ");
1230
- }, [i, t.tags]);
1231
- return /* @__PURE__ */ s(J, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
1259
+ ] }) : null, Ut = ({ transaction: t }) => {
1260
+ const { transactions: r } = x(), { tags: a } = w(), i = _.useMemo(() => {
1261
+ const o = new Map(a.map((n) => [n.guid, n.name]));
1262
+ return t.tags.map((n) => o.get(n)).filter(Boolean).join(" / ");
1263
+ }, [a, t.tags]);
1264
+ return /* @__PURE__ */ d(J, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
1232
1265
  ae(
1233
1266
  /* @__PURE__ */ e(
1234
1267
  he,
@@ -1243,93 +1276,93 @@ const it = ({ transaction: t, onClick: r }) => {
1243
1276
  /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.category ?? r.actions_select_a_category })
1244
1277
  ),
1245
1278
  ae(
1246
- /* @__PURE__ */ e(S, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }),
1279
+ /* @__PURE__ */ e(C, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }),
1247
1280
  r.date_title,
1248
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: Ee(W(t.date), Oe.YEAR_MONTH_DAY) })
1281
+ /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: we(W(t.date), Ee.YEAR_MONTH_DAY) })
1249
1282
  ),
1250
1283
  ae(
1251
- /* @__PURE__ */ e(S, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }),
1284
+ /* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }),
1252
1285
  r.memo_title,
1253
1286
  /* @__PURE__ */ e(T, { bold: !0, sx: { overflowWrap: "break-word", whiteSpace: "wrap" }, variant: "Body", children: t.memo ?? r.memo_desc }),
1254
1287
  !!t.memo,
1255
1288
  t.tags?.length > 0 ? "inset" : "fullWidth"
1256
1289
  ),
1257
1290
  ae(
1258
- /* @__PURE__ */ e(S, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }),
1291
+ /* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }),
1259
1292
  r.tags_title,
1260
- /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ? n : r.tags_desc }),
1293
+ /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ? i : r.tags_desc }),
1261
1294
  !!t.tags?.length,
1262
1295
  "fullWidth"
1263
1296
  )
1264
1297
  ] });
1265
- }, Ut = b(zt), Xt = ({
1298
+ }, Xt = A(Ut), Vt = ({
1266
1299
  bottomActions: t = at,
1267
- canFlagTransaction: r = !0,
1268
- topActions: i = tt,
1269
- transaction: n
1300
+ topActions: r = tt,
1301
+ transaction: a
1270
1302
  }) => {
1271
- const { onEvent: o } = L(), { isCopyLoaded: a } = Fe(), { userFeatures: l } = He(), d = n?.number && n.number.length > 4;
1303
+ const { onEvent: i } = L(), { isCopyLoaded: o } = Fe(), { userFeatures: n } = He(), c = a?.number && a.number.length > 4;
1272
1304
  if (_.useEffect(
1273
- () => o(P.TRANSACTION_DETAILS_VIEW, { transaction_guid: n.guid }),
1305
+ () => i(P.TRANSACTION_DETAILS_VIEW, { transaction_guid: a.guid }),
1274
1306
  []
1275
- ), !a)
1307
+ ), !o)
1276
1308
  return /* @__PURE__ */ e(Ie, {});
1277
- const c = $e(l, "MX_TXN_DETAILS_VIEW_ONLY");
1278
- return /* @__PURE__ */ e(w, { className: "mx-txn-transaction-details", width: "100%", children: n && /* @__PURE__ */ s(f, { children: [
1279
- /* @__PURE__ */ s(f, { gap: 12, p: 24, children: [
1309
+ const l = $e(n, "MX_TXN_DETAILS_VIEW_ONLY");
1310
+ return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-details", width: "100%", children: a && /* @__PURE__ */ d(b, { children: [
1311
+ /* @__PURE__ */ d(b, { gap: 12, p: 24, children: [
1280
1312
  /* @__PURE__ */ e(ne, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
1281
- pe,
1313
+ ge,
1282
1314
  {
1283
- categoryGuid: n.top_level_category_guid || "",
1284
- merchantGuid: n.merchant_guid || "",
1315
+ categoryGuid: a.top_level_category_guid || "",
1316
+ merchantGuid: a.merchant_guid || "",
1285
1317
  size: 64
1286
1318
  }
1287
1319
  ) }),
1288
- /* @__PURE__ */ e(Bt, { transaction: n, viewOnly: c }),
1289
- /* @__PURE__ */ s(f, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
1290
- /* @__PURE__ */ s(Ae, { color: n.isIncome ? "success.main" : "text.primary", children: [
1291
- n.isIncome ? "+" : "",
1292
- te(n.amount, "0,0.00")
1320
+ /* @__PURE__ */ e(Ft, { transaction: a, viewOnly: l }),
1321
+ /* @__PURE__ */ d(b, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
1322
+ /* @__PURE__ */ d(Ae, { color: a.isIncome ? "success.main" : "text.primary", children: [
1323
+ a.isIncome ? "+" : "",
1324
+ te(a.amount, "0,0.00")
1293
1325
  ] }),
1294
- !c && r && /* @__PURE__ */ e(Ht, { transaction: n })
1326
+ !l && /* @__PURE__ */ e(zt, { transaction: a })
1295
1327
  ] }),
1296
- /* @__PURE__ */ s(f, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
1297
- /* @__PURE__ */ e(T, { bold: !0, children: `${n.account}
1298
- ${d ? n.number : "•".repeat(4).concat(n.number ?? "")}` }),
1299
- /* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children: n.feed_description })
1328
+ /* @__PURE__ */ d(b, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
1329
+ /* @__PURE__ */ e(T, { bold: !0, children: `${a.account}
1330
+ ${c ? a.number : "•".repeat(4).concat(a.number ?? "")}` }),
1331
+ /* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children: a.feed_description })
1300
1332
  ] })
1301
1333
  ] }),
1302
- /* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: c ? /* @__PURE__ */ e(Ut, { transaction: n }) : /* @__PURE__ */ e(J, { children: i.map((u, m) => /* @__PURE__ */ s(_.Fragment, { children: [
1303
- u === q.Category && /* @__PURE__ */ e(mt, { transaction: n }),
1304
- u === q.Date && /* @__PURE__ */ e(gt, { transaction: n }),
1305
- u === q.Memo && /* @__PURE__ */ e(bt, { transaction: n }),
1306
- u === q.Tags && /* @__PURE__ */ e(Kt, { transaction: n }),
1307
- /* @__PURE__ */ e(Z, { variant: m < i.length - 1 ? "inset" : "fullWidth" })
1308
- ] }, u)) }) }),
1309
- !c && t.length > 0 && /* @__PURE__ */ s(_.Fragment, { children: [
1334
+ /* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: l ? /* @__PURE__ */ e(Xt, { transaction: a }) : /* @__PURE__ */ e(J, { children: r.map((s, u) => /* @__PURE__ */ d(_.Fragment, { children: [
1335
+ s === q.Category && /* @__PURE__ */ e(mt, { transaction: a }),
1336
+ s === q.Date && /* @__PURE__ */ e(pt, { transaction: a }),
1337
+ s === q.Memo && /* @__PURE__ */ e(bt, { transaction: a }),
1338
+ s === q.Tags && /* @__PURE__ */ e($t, { transaction: a }),
1339
+ /* @__PURE__ */ e(Z, { variant: u < r.length - 1 ? "inset" : "fullWidth" })
1340
+ ] }, s)) }) }),
1341
+ !l && /* @__PURE__ */ d(_.Fragment, { children: [
1310
1342
  /* @__PURE__ */ e(T, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
1311
- /* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ s(J, { children: [
1312
- t.map((u, m) => /* @__PURE__ */ s(_.Fragment, { children: [
1313
- u === re.SplitTransaction && /* @__PURE__ */ e(vt, { transaction: n }),
1314
- u === re.HideTransaction && /* @__PURE__ */ e(Ct, { transaction: n }),
1315
- u === re.MerchantLogo && /* @__PURE__ */ e(yt, { transaction: n }),
1316
- /* @__PURE__ */ e(Z, { variant: m < t.length - 1 ? "inset" : "fullWidth" })
1317
- ] }, u)),
1318
- n.is_manual && !n.parent_guid && !n.has_been_split && /* @__PURE__ */ e(ht, { transaction: n })
1343
+ /* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ d(J, { children: [
1344
+ t.map((s, u) => /* @__PURE__ */ d(_.Fragment, { children: [
1345
+ s === re.SplitTransaction && /* @__PURE__ */ e(wt, { transaction: a }),
1346
+ s === re.HideTransaction && /* @__PURE__ */ e(Ct, { transaction: a }),
1347
+ s === re.MerchantLogo && /* @__PURE__ */ e(yt, { transaction: a }),
1348
+ /* @__PURE__ */ e(Z, { variant: u < t.length - 1 ? "inset" : "fullWidth" })
1349
+ ] }, s)),
1350
+ a.is_manual && !a.parent_guid && !a.has_been_split && /* @__PURE__ */ e(ht, { transaction: a })
1319
1351
  ] }) })
1320
1352
  ] })
1321
1353
  ] }) });
1322
- }, ka = b(Xt);
1354
+ }, Pa = A(Vt);
1323
1355
  export {
1324
1356
  re as B,
1325
1357
  mt as C,
1326
- gt as D,
1358
+ pt as D,
1327
1359
  bt as M,
1328
1360
  lt as S,
1329
1361
  Ra as T,
1330
- ka as a,
1362
+ Pa as a,
1331
1363
  st as b,
1332
- Kt as c,
1333
- q as d,
1364
+ At as c,
1365
+ $t as d,
1366
+ q as e,
1334
1367
  G as u
1335
1368
  };