@mx-cartographer/experiences 9.2.7 → 9.2.9-alpha.al0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Analytics-B8AaC22u.mjs → Analytics-DST_WxYZ.mjs} +2 -2
  3. package/dist/{Analytics-B8AaC22u.mjs.map → Analytics-DST_WxYZ.mjs.map} +1 -1
  4. package/dist/{ApiEndpoints-DXwIYNUV.mjs → ApiEndpoints-YY8ajnnd.mjs} +2 -1
  5. package/dist/ApiEndpoints-YY8ajnnd.mjs.map +1 -0
  6. package/dist/{GlobalCopyApi-CLhyon-B.mjs → GlobalCopyApi-DNC5K2QG.mjs} +2 -2
  7. package/dist/{GlobalCopyApi-CLhyon-B.mjs.map → GlobalCopyApi-DNC5K2QG.mjs.map} +1 -1
  8. package/dist/{UserStore-CgsAunf1.mjs → UserStore-CzwmOm62.mjs} +182 -174
  9. package/dist/UserStore-CzwmOm62.mjs.map +1 -0
  10. package/dist/{ViewMoreMicroCard-B4oeGrbE.mjs → ViewMoreMicroCard-Bx9xa2z5.mjs} +3 -3
  11. package/dist/{ViewMoreMicroCard-B4oeGrbE.mjs.map → ViewMoreMicroCard-Bx9xa2z5.mjs.map} +1 -1
  12. package/dist/WidgetContainer-eosXfD5G.mjs +493 -0
  13. package/dist/WidgetContainer-eosXfD5G.mjs.map +1 -0
  14. package/dist/accounts/index.es.js +1 -1
  15. package/dist/budgets/index.es.js +1 -1
  16. package/dist/cashflow/index.es.js +1 -1
  17. package/dist/common/components/daterangeselector/DateRangeSelector.d.ts +14 -0
  18. package/dist/common/index.es.js +3 -3
  19. package/dist/core/api/SettingsApi.d.ts +4 -0
  20. package/dist/core/constants/ApiEndpoints.d.ts +1 -0
  21. package/dist/core/index.es.js +4 -4
  22. package/dist/core/stores/SettingsStore.d.ts +4 -0
  23. package/dist/core/types/localization/SettingsCopy.d.ts +6 -0
  24. package/dist/debts/index.es.js +1 -1
  25. package/dist/finstrong/index.es.js +1 -1
  26. package/dist/goals/index.es.js +1 -1
  27. package/dist/help/index.es.js +1 -1
  28. package/dist/investments/index.es.js +1 -1
  29. package/dist/microinsights/index.es.js +1 -1
  30. package/dist/networth/index.es.js +1 -1
  31. package/dist/notifications/index.es.js +1 -1
  32. package/dist/recurringtransactions/index.es.js +1 -1
  33. package/dist/settings/components/profile/ProfileTab.d.ts +1 -1
  34. package/dist/settings/components/profile/actions/ResetPasswordAction.d.ts +4 -0
  35. package/dist/settings/index.es.js +460 -416
  36. package/dist/settings/index.es.js.map +1 -1
  37. package/dist/spending/index.es.js +1 -1
  38. package/dist/transactions/index.es.js +1 -1
  39. package/dist/trends/index.es.js +2 -2
  40. package/package.json +1 -1
  41. package/dist/ApiEndpoints-DXwIYNUV.mjs.map +0 -1
  42. package/dist/UserStore-CgsAunf1.mjs.map +0 -1
  43. package/dist/WidgetContainer-DvKtBdhn.mjs +0 -487
  44. package/dist/WidgetContainer-DvKtBdhn.mjs.map +0 -1
@@ -1,171 +1,215 @@
1
- import { jsxs as c, Fragment as X, jsx as e } from "react/jsx-runtime";
2
- import m from "react";
1
+ import { jsxs as d, jsx as e, Fragment as Z } from "react/jsx-runtime";
2
+ import u from "react";
3
3
  import { observer as C } from "mobx-react-lite";
4
4
  import p from "@mui/material/Stack";
5
- import ue from "@mui/material/Tab";
6
- import pe from "@mui/material/Tabs";
7
- import he from "@mui/material/Alert";
8
- import fe from "@mui/material/Snackbar";
9
- import { getUnixTime as _e } from "date-fns/getUnixTime";
10
- import { AdapterDateFns as ge } from "@mui/x-date-pickers/AdapterDateFnsV3";
11
- import { DatePicker as be } from "@mui/x-date-pickers";
12
- import { LocalizationProvider as ye } from "@mui/x-date-pickers/LocalizationProvider";
5
+ import de from "@mui/material/Tab";
6
+ import me from "@mui/material/Tabs";
7
+ import ue from "@mui/material/Alert";
8
+ import pe from "@mui/material/Snackbar";
9
+ import { getUnixTime as he } from "date-fns/getUnixTime";
10
+ import { AdapterDateFns as fe } from "@mui/x-date-pickers/AdapterDateFnsV3";
11
+ import { DatePicker as _e } from "@mui/x-date-pickers";
12
+ import { LocalizationProvider as ge } from "@mui/x-date-pickers/LocalizationProvider";
13
13
  import { useTheme as L, alpha as W } from "@mui/material/styles";
14
14
  import z from "@mui/material/Box";
15
- import Z from "@mui/material/Button";
16
- import I from "@mui/material/TextField";
17
- import { H3 as Y, P as M, Text as x, Icon as B } from "@mxenabled/mxui";
15
+ import Y from "@mui/material/Button";
16
+ import A from "@mui/material/TextField";
17
+ import { Text as x, H3 as q, P as M, Icon as B } from "@mxenabled/mxui";
18
+ import { ChevronRight as ee, ChevronLeft as be } from "@mxenabled/mx-icons";
19
+ import { u as w, A as I, i as G, C as ye, a as te, l as j } from "../hooks-97sNJ_lf.mjs";
20
+ import { D as F } from "../Dialog-Bvd2n8hz.mjs";
18
21
  import { V as xe, a as ve, N as J } from "../NotificationSettings-CW7okUrk.mjs";
19
- import { A as Jt, B as Kt, I as Yt } from "../NotificationSettings-CW7okUrk.mjs";
20
- import { u as k, i as G, A as E, C as Ce, a as ee, l as j } from "../hooks-97sNJ_lf.mjs";
21
- import { u as F } from "../useScreenSize-mWpmnh5w.mjs";
22
- import { D as $ } from "../Dialog-Bvd2n8hz.mjs";
23
- import { formatDistanceToNow as te } from "date-fns/formatDistanceToNow";
24
- import { fromUnixTime as oe } from "date-fns/fromUnixTime";
25
- import O from "@mui/material/IconButton";
26
- import { DataGridPro as De } from "@mui/x-data-grid-pro";
27
- import { b as H } from "../Localization-DnoVyBNK.mjs";
22
+ import { A as $t, B as Jt, I as Kt } from "../NotificationSettings-CW7okUrk.mjs";
23
+ import { u as U } from "../useScreenSize-mWpmnh5w.mjs";
24
+ import { formatDistanceToNow as oe } from "date-fns/formatDistanceToNow";
25
+ import { fromUnixTime as ne } from "date-fns/fromUnixTime";
26
+ import H from "@mui/material/IconButton";
27
+ import { DataGridPro as Ce } from "@mui/x-data-grid-pro";
28
+ import { b as O } from "../Localization-DnoVyBNK.mjs";
28
29
  import { H as V } from "../HeaderCell-P8w6CmfO.mjs";
29
- import ke from "@mui/material/Accordion";
30
- import we from "@mui/material/AccordionDetails";
31
- import Se from "@mui/material/AccordionSummary";
30
+ import we from "@mui/material/Accordion";
31
+ import De from "@mui/material/AccordionDetails";
32
+ import ke from "@mui/material/AccordionSummary";
32
33
  import { L as ie } from "../Loader-CxeBwuPG.mjs";
33
- import Te from "@mui/material/List";
34
+ import Se from "@mui/material/List";
34
35
  import K from "@mui/material/Divider";
35
- import Ae from "@mui/material/ListSubheader";
36
- import { b as Ie, u as Ee } from "../CategorySelectorDrawer-NJsFsKP1.mjs";
37
- import Pe from "@mui/material/ListItem";
38
- import Re from "@mui/material/ListItemButton";
36
+ import Te from "@mui/material/ListSubheader";
37
+ import { b as Ae, u as Pe } from "../CategorySelectorDrawer-NJsFsKP1.mjs";
38
+ import Ie from "@mui/material/ListItem";
39
+ import Ee from "@mui/material/ListItemButton";
39
40
  import Ne from "@mui/material/ListItemIcon";
40
- import Me from "@mui/material/ListItemText";
41
- import { ChevronRight as Le, ChevronLeft as Be } from "@mxenabled/mx-icons";
42
- import { D as He } from "../Drawer-DsnW2o0v.mjs";
43
- import { u as ne } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
44
- import { H as Oe } from "../Help-D4sOpItq.mjs";
45
- import { W as q } from "../WidgetContainer-DvKtBdhn.mjs";
46
- const Fe = ({ availableWidth: t, handleOnLeavClick: r }) => {
47
- const i = L(), { common: o, settings: n } = k(), { isDesktop: u, isMobile: s, isSmallMobile: a, isTablet: l } = F(t), { config: b } = G(), { updateUser: _ } = E(), { user: d } = Ce(), [h, w] = m.useState({
48
- first_name: d.first_name,
49
- last_name: d.last_name,
50
- email: d.email,
51
- phone: d.phone,
52
- birthday: d.birthday,
53
- postal_code: d.postal_code,
54
- credit_score: d.credit_score
55
- }), [v, S] = m.useState(!1), [A, T] = m.useState(!1), g = m.useRef(null), D = h.email && !d.email_is_verified && !v, U = h.phone && !d.phone_is_verified && !v;
56
- m.useEffect(() => {
41
+ import Re from "@mui/material/ListItemText";
42
+ import { D as Me } from "../Drawer-DsnW2o0v.mjs";
43
+ import { u as re } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
44
+ import { H as Le } from "../Help-D4sOpItq.mjs";
45
+ import { W as Q } from "../WidgetContainer-eosXfD5G.mjs";
46
+ const Be = 8, Oe = C(() => {
47
+ const { common: t, settings: r } = w(), { updatePassword: n } = I(), [o, i] = u.useState(!1), [c, l] = u.useState(""), [a, s] = u.useState(""), m = c.length >= Be && a.length > 0 && c === a, h = () => {
48
+ i(!1), l(""), s("");
49
+ }, f = () => {
50
+ i(!0);
51
+ }, y = () => {
52
+ n({ new_password: c, new_password_again: a });
53
+ };
54
+ return /* @__PURE__ */ d(p, { children: [
55
+ /* @__PURE__ */ d(Y, { onClick: f, children: [
56
+ /* @__PURE__ */ e(x, { variant: "body2", children: r.reset_password }),
57
+ /* @__PURE__ */ e(ee, {})
58
+ ] }),
59
+ /* @__PURE__ */ e(
60
+ F,
61
+ {
62
+ copy: { title: r.reset_password },
63
+ disablePrimaryButton: !m,
64
+ isOpen: o,
65
+ onClose: h,
66
+ onPrimaryAction: y,
67
+ onSecondaryAction: h,
68
+ primaryText: r.save_password,
69
+ secondaryText: t.cancel_button,
70
+ sx: {
71
+ "& .MuiToolbar-root:last-child": {
72
+ padding: 24,
73
+ justifyContent: "flex-end"
74
+ }
75
+ },
76
+ children: /* @__PURE__ */ d(p, { spacing: 24, children: [
77
+ /* @__PURE__ */ e(
78
+ A,
79
+ {
80
+ label: r.new_password,
81
+ onChange: (v) => l(v.target.value),
82
+ type: "password",
83
+ value: c
84
+ }
85
+ ),
86
+ /* @__PURE__ */ e(
87
+ A,
88
+ {
89
+ label: r.confirm_new_password,
90
+ onChange: (v) => s(v.target.value),
91
+ type: "password",
92
+ value: a
93
+ }
94
+ )
95
+ ] })
96
+ }
97
+ )
98
+ ] });
99
+ }), He = ({ availableWidth: t, handleOnLeaveClick: r }) => {
100
+ const n = L(), { common: o, settings: i } = w(), { isMobile: c } = U(t), { config: l } = G(), { updateUser: a } = I(), { user: s } = ye(), [m, h] = u.useState({
101
+ first_name: s.first_name,
102
+ last_name: s.last_name,
103
+ email: s.email,
104
+ phone: s.phone,
105
+ birthday: s.birthday,
106
+ postal_code: s.postal_code,
107
+ credit_score: s.credit_score
108
+ }), [f, y] = u.useState(!1), [v, D] = u.useState(!1), k = u.useRef(null), S = m.email && !s.email_is_verified && !f, P = m.phone && !s.phone_is_verified && !f;
109
+ u.useEffect(() => {
57
110
  if (r) {
58
- const f = (R) => {
59
- g.current && !g.current.contains(R.target) && v && T(!0);
111
+ const _ = (N) => {
112
+ k.current && !k.current.contains(N.target) && f && D(!0);
60
113
  };
61
- return document.addEventListener("mousedown", f), () => {
62
- document.removeEventListener("mousedown", f);
114
+ return document.addEventListener("mousedown", _), () => {
115
+ document.removeEventListener("mousedown", _);
63
116
  };
64
117
  }
65
- }, [v]);
66
- const ae = () => {
67
- if (h.birthday) {
68
- const f = new Date(h.birthday * 1e3), R = f.getUTCFullYear(), de = f.getUTCMonth(), me = f.getUTCDate();
69
- return new Date(R, de, me);
118
+ }, [f]);
119
+ const b = () => {
120
+ if (m.birthday) {
121
+ const _ = new Date(m.birthday * 1e3), N = _.getUTCFullYear(), le = _.getUTCMonth(), ce = _.getUTCDate();
122
+ return new Date(N, le, ce);
70
123
  }
71
- }, se = async () => {
72
- await _({ ...d, ...h }), S(!1);
73
- }, le = () => {
74
- T(!1), r && r();
75
- }, ce = () => {
76
- T(!1);
77
- }, P = (f) => {
78
- const R = {
79
- ...h,
80
- ...f
124
+ }, T = async () => {
125
+ await a({ ...s, ...m }), y(!1);
126
+ }, $ = () => {
127
+ D(!1), r && r();
128
+ }, se = () => {
129
+ D(!1);
130
+ }, E = (_) => {
131
+ const N = {
132
+ ...m,
133
+ ..._
81
134
  };
82
- w(R), S(JSON.stringify({ ...d, ...R }) !== JSON.stringify(d));
135
+ h(N), y(JSON.stringify({ ...s, ...N }) !== JSON.stringify(s));
83
136
  };
84
- return /* @__PURE__ */ c(X, { children: [
85
- /* @__PURE__ */ c(
137
+ return /* @__PURE__ */ d(Z, { children: [
138
+ /* @__PURE__ */ d(
86
139
  z,
87
140
  {
88
141
  component: "form",
89
- ref: g,
142
+ ref: k,
90
143
  sx: {
91
144
  backgroundColor: "background.paper",
92
145
  p: 24,
93
- width: a ? 320 : l ? 680 : u ? 990 : 400,
94
146
  "& .MuiTextField-root": {
95
- width: a ? 272 : l ? 328 : u ? 483 : 352
147
+ flex: 1
96
148
  }
97
149
  },
98
150
  children: [
99
- /* @__PURE__ */ e(Y, { children: n.personal_details }),
100
- /* @__PURE__ */ e(M, { variant: "body1", children: n.update_information }),
101
- /* @__PURE__ */ c(
102
- p,
103
- {
104
- direction: s ? "column" : "row",
105
- spacing: s ? 44 : 24,
106
- sx: { mb: 44, pt: 32 },
107
- children: [
108
- /* @__PURE__ */ e(
109
- I,
110
- {
111
- defaultValue: h.first_name,
112
- label: n.first_name,
113
- onChange: (f) => P({ first_name: f.target.value })
114
- }
115
- ),
116
- /* @__PURE__ */ e(
117
- I,
118
- {
119
- defaultValue: h.last_name,
120
- label: n.last_name,
121
- onChange: (f) => P({ last_name: f.target.value })
122
- }
123
- )
124
- ]
125
- }
126
- ),
127
- /* @__PURE__ */ c(p, { direction: s ? "column" : "row", children: [
128
- b.display_email_edit_field_in_settings && /* @__PURE__ */ c(p, { sx: { mb: D ? 20 : 44, mr: s ? 0 : 24 }, children: [
151
+ /* @__PURE__ */ e(q, { children: i.personal_details }),
152
+ /* @__PURE__ */ e(M, { variant: "body1", children: i.update_information }),
153
+ /* @__PURE__ */ d(p, { direction: c ? "column" : "row", spacing: 24, sx: { mb: 24, pt: 24 }, children: [
154
+ /* @__PURE__ */ e(
155
+ A,
156
+ {
157
+ defaultValue: m.first_name,
158
+ label: i.first_name,
159
+ onChange: (_) => E({ first_name: _.target.value })
160
+ }
161
+ ),
162
+ /* @__PURE__ */ e(
163
+ A,
164
+ {
165
+ defaultValue: m.last_name,
166
+ label: i.last_name,
167
+ onChange: (_) => E({ last_name: _.target.value })
168
+ }
169
+ )
170
+ ] }),
171
+ /* @__PURE__ */ d(p, { direction: c ? "column" : "row", children: [
172
+ l.display_email_edit_field_in_settings && /* @__PURE__ */ d(p, { sx: { flex: 1, mb: S ? 20 : 24, mr: c ? 0 : 24 }, children: [
129
173
  /* @__PURE__ */ e(
130
- I,
174
+ A,
131
175
  {
132
- defaultValue: h.email,
133
- label: n.email_address,
134
- onChange: (f) => P({ email: f.target.value })
176
+ defaultValue: m.email,
177
+ label: i.email_address,
178
+ onChange: (_) => E({ email: _.target.value })
135
179
  }
136
180
  ),
137
- D && /* @__PURE__ */ e(xe, {})
181
+ S && /* @__PURE__ */ e(xe, {})
138
182
  ] }),
139
- b.display_sms_edit_field_in_settings && /* @__PURE__ */ c(p, { sx: { mb: U ? 20 : 44 }, children: [
183
+ l.display_sms_edit_field_in_settings && /* @__PURE__ */ d(p, { sx: { flex: 1, mb: P ? 20 : 24 }, children: [
140
184
  /* @__PURE__ */ e(
141
- I,
185
+ A,
142
186
  {
143
- defaultValue: h.phone,
144
- label: n.mobile_number,
145
- onChange: (f) => P({ phone: f.target.value }),
187
+ defaultValue: m.phone,
188
+ label: i.mobile_number,
189
+ onChange: (_) => E({ phone: _.target.value }),
146
190
  type: "tel"
147
191
  }
148
192
  ),
149
- U && /* @__PURE__ */ e(ve, {})
193
+ P && /* @__PURE__ */ e(ve, {})
150
194
  ] })
151
195
  ] }),
152
- /* @__PURE__ */ c(p, { direction: s ? "column" : "row", spacing: s ? 44 : 24, sx: { mb: 44 }, children: [
153
- /* @__PURE__ */ e(ye, { dateAdapter: ge, children: /* @__PURE__ */ e(
154
- be,
196
+ /* @__PURE__ */ d(p, { direction: c ? "column" : "row", spacing: 24, sx: { mb: 24 }, children: [
197
+ /* @__PURE__ */ e(ge, { dateAdapter: fe, children: /* @__PURE__ */ e(
198
+ _e,
155
199
  {
156
- label: n.birthdate,
157
- onChange: (f) => P({ birthday: _e(f) }),
200
+ label: i.birthdate,
201
+ onChange: (_) => E({ birthday: he(_) }),
158
202
  slotProps: {
159
203
  nextIconButton: {
160
204
  sx: {
161
205
  color: "primary.main",
162
- "&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
206
+ "&:hover": { backgroundColor: W(n.palette.primary.light, 0.1) }
163
207
  }
164
208
  },
165
209
  previousIconButton: {
166
210
  sx: {
167
211
  color: "primary.main",
168
- "&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
212
+ "&:hover": { backgroundColor: W(n.palette.primary.light, 0.1) }
169
213
  }
170
214
  }
171
215
  },
@@ -173,37 +217,37 @@ const Fe = ({ availableWidth: t, handleOnLeavClick: r }) => {
173
217
  width: "100%",
174
218
  "& .MuiIconButton-edgeEnd": {
175
219
  color: "primary.main",
176
- "&:hover": { backgroundColor: W(i.palette.primary.light, 0.1) }
220
+ "&:hover": { backgroundColor: W(n.palette.primary.light, 0.1) }
177
221
  }
178
222
  },
179
- value: ae()
223
+ value: b()
180
224
  }
181
225
  ) }),
182
226
  /* @__PURE__ */ e(
183
- I,
227
+ A,
184
228
  {
185
- defaultValue: h.postal_code,
186
- label: n.zip_code,
187
- onChange: (f) => P({ postal_code: f.target.value })
229
+ defaultValue: m.postal_code,
230
+ label: i.zip_code,
231
+ onChange: (_) => E({ postal_code: _.target.value })
188
232
  }
189
233
  )
190
234
  ] }),
191
- /* @__PURE__ */ c(p, { children: [
235
+ /* @__PURE__ */ d(p, { children: [
192
236
  /* @__PURE__ */ e(
193
- I,
237
+ A,
194
238
  {
195
- defaultValue: h.credit_score,
196
- label: n.credit_score,
197
- onChange: (f) => P({ credit_score: Number(f.target.value) }),
198
- sx: { mb: 44 }
239
+ defaultValue: m.credit_score,
240
+ label: i.credit_score,
241
+ onChange: (_) => E({ credit_score: Number(_.target.value) })
199
242
  }
200
243
  ),
244
+ l.display_password_options_in_settings && /* @__PURE__ */ e(Oe, {}),
201
245
  /* @__PURE__ */ e(
202
- Z,
246
+ Y,
203
247
  {
204
- disabled: !v,
205
- onClick: se,
206
- sx: { width: a ? 272 : 124 },
248
+ disabled: !f,
249
+ onClick: T,
250
+ sx: { width: c ? "100%" : 124 },
207
251
  variant: "contained",
208
252
  children: o.save_button
209
253
  }
@@ -213,36 +257,36 @@ const Fe = ({ availableWidth: t, handleOnLeavClick: r }) => {
213
257
  }
214
258
  ),
215
259
  /* @__PURE__ */ e(
216
- $,
260
+ F,
217
261
  {
218
- copy: { title: n.discard_changes },
219
- isOpen: A,
220
- onClose: ce,
221
- onSecondaryAction: le,
222
- primaryText: n.keep_editing,
223
- secondaryText: n.leave,
224
- children: n.discard_changes_message
262
+ copy: { title: i.discard_changes },
263
+ isOpen: v,
264
+ onClose: se,
265
+ onSecondaryAction: $,
266
+ primaryText: i.keep_editing,
267
+ secondaryText: i.leave,
268
+ children: i.discard_changes_message
225
269
  }
226
270
  )
227
271
  ] });
228
- }, Ue = C(Fe);
229
- var y = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(y || {});
230
- const Ve = ({
272
+ }, Fe = C(He);
273
+ var g = /* @__PURE__ */ ((t) => (t.Delete = "delete", t.Edit = "edit", t.Token = "token", t))(g || {});
274
+ const Ue = ({
231
275
  devices: t,
232
276
  onClickDeviceEdit: r,
233
- onClickDeviceDelete: i
277
+ onClickDeviceDelete: n
234
278
  }) => {
235
- const o = L(), { settings: n } = k(), u = [
279
+ const o = L(), { settings: i } = w(), c = [
236
280
  {
237
281
  field: "name",
238
- headerName: n.mobile_devices_column_name,
282
+ headerName: i.mobile_devices_column_name,
239
283
  renderHeader: V,
240
- renderCell: (a) => /* @__PURE__ */ c(p, { alignItems: "center", direction: "row", gap: 4, children: [
284
+ renderCell: (a) => /* @__PURE__ */ d(p, { alignItems: "center", direction: "row", gap: 4, children: [
241
285
  /* @__PURE__ */ e(x, { variant: "body2", children: a.value }),
242
286
  /* @__PURE__ */ e(
243
- O,
287
+ H,
244
288
  {
245
- "aria-label": n.mobile_devices_edit_label,
289
+ "aria-label": i.mobile_devices_edit_label,
246
290
  color: "secondary",
247
291
  onClick: () => r(a.row),
248
292
  children: /* @__PURE__ */ e(B, { name: "edit" })
@@ -255,7 +299,7 @@ const Ve = ({
255
299
  },
256
300
  {
257
301
  field: "device_type",
258
- headerName: n.mobile_devices_column_type,
302
+ headerName: i.mobile_devices_column_type,
259
303
  renderHeader: V,
260
304
  sortable: !0,
261
305
  hideSortIcons: !1,
@@ -264,9 +308,9 @@ const Ve = ({
264
308
  },
265
309
  {
266
310
  field: "created_at",
267
- headerName: n.mobile_devices_column_added,
311
+ headerName: i.mobile_devices_column_added,
268
312
  renderHeader: V,
269
- valueFormatter: (a) => te(oe(a), { addSuffix: !0 }),
313
+ valueFormatter: (a) => oe(ne(a), { addSuffix: !0 }),
270
314
  sortable: !0,
271
315
  hideSortIcons: !1,
272
316
  flex: 1,
@@ -277,11 +321,11 @@ const Ve = ({
277
321
  headerName: "",
278
322
  renderHeader: V,
279
323
  renderCell: (a) => /* @__PURE__ */ e(p, { mr: 4, children: /* @__PURE__ */ e(
280
- O,
324
+ H,
281
325
  {
282
- "aria-label": n.mobile_devices_delete_label,
326
+ "aria-label": i.mobile_devices_delete_label,
283
327
  color: "secondary",
284
- onClick: () => i(a.row),
328
+ onClick: () => n(a.row),
285
329
  children: /* @__PURE__ */ e(B, { name: "delete" })
286
330
  }
287
331
  ) }),
@@ -289,19 +333,19 @@ const Ve = ({
289
333
  hideSortIcons: !1,
290
334
  width: 58
291
335
  }
292
- ], s = m.useMemo(() => t.map((a) => ({
336
+ ], l = u.useMemo(() => t.map((a) => ({
293
337
  id: a.guid,
294
338
  ...a,
295
339
  device_type: `${a.make} ${a.model}`
296
340
  })), [t]);
297
341
  return /* @__PURE__ */ e(z, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
298
- De,
342
+ Ce,
299
343
  {
300
- columns: u,
344
+ columns: c,
301
345
  disableColumnFilter: !0,
302
346
  disableColumnMenu: !0,
303
347
  disableRowSelectionOnClick: !0,
304
- rows: s,
348
+ rows: l,
305
349
  slotProps: {
306
350
  footer: {
307
351
  sx: { justifyContent: "flex-end" }
@@ -318,8 +362,8 @@ const Ve = ({
318
362
  alignItems: "center",
319
363
  p: "12px 16px"
320
364
  },
321
- children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: H(
322
- n.mobile_devices_count,
365
+ children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: O(
366
+ i.mobile_devices_count,
323
367
  /* @__PURE__ */ e("b", { children: t.length }),
324
368
  /* @__PURE__ */ e("b", { children: t.length })
325
369
  ) })
@@ -342,24 +386,24 @@ const Ve = ({
342
386
  }
343
387
  }
344
388
  ) });
345
- }, We = ({
389
+ }, Ve = ({
346
390
  devices: t,
347
391
  onClickDeviceEdit: r,
348
- onClickDeviceDelete: i
392
+ onClickDeviceDelete: n
349
393
  }) => {
350
- const o = L(), { settings: n } = k(), [u, s] = m.useState(!1), a = (l) => (b, _) => {
351
- s(_ ? l : !1);
394
+ const o = L(), { settings: i } = w(), [c, l] = u.useState(!1), a = (s) => (m, h) => {
395
+ l(h ? s : !1);
352
396
  };
353
- return /* @__PURE__ */ c(p, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
354
- t.map((l) => /* @__PURE__ */ c(
355
- ke,
397
+ return /* @__PURE__ */ d(p, { mx: -28, sx: { "& .MuiAccordion-root": { mb: 0, mt: 0 } }, children: [
398
+ t.map((s) => /* @__PURE__ */ d(
399
+ we,
356
400
  {
357
- expanded: u === l.guid,
358
- onChange: a(l.guid),
401
+ expanded: c === s.guid,
402
+ onChange: a(s.guid),
359
403
  sx: { boxShadow: "none" },
360
404
  children: [
361
405
  /* @__PURE__ */ e(
362
- Se,
406
+ ke,
363
407
  {
364
408
  expandIcon: /* @__PURE__ */ e(B, { color: "secondary", name: "keyboard_arrow_down", size: 24 }),
365
409
  sx: {
@@ -367,22 +411,22 @@ const Ve = ({
367
411
  borderBottom: "1px solid",
368
412
  borderColor: o.palette.divider
369
413
  },
370
- children: /* @__PURE__ */ c(p, { gap: 4, children: [
371
- /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: l.name }),
372
- /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: `${l.make} ${l.model}` }),
373
- /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: te(oe(l.created_at), { addSuffix: !0 }) })
414
+ children: /* @__PURE__ */ d(p, { gap: 4, children: [
415
+ /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: s.name }),
416
+ /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: `${s.make} ${s.model}` }),
417
+ /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: oe(ne(s.created_at), { addSuffix: !0 }) })
374
418
  ] })
375
419
  }
376
420
  ),
377
- /* @__PURE__ */ c(
378
- we,
421
+ /* @__PURE__ */ d(
422
+ De,
379
423
  {
380
424
  sx: { backgroundColor: o.palette.background.default, p: "0 0 0 24px" },
381
425
  children: [
382
- /* @__PURE__ */ c(
426
+ /* @__PURE__ */ d(
383
427
  p,
384
428
  {
385
- onClick: () => r(l),
429
+ onClick: () => r(s),
386
430
  sx: {
387
431
  alignItems: "center",
388
432
  flexDirection: "row",
@@ -394,15 +438,15 @@ const Ve = ({
394
438
  borderColor: o.palette.divider
395
439
  },
396
440
  children: [
397
- /* @__PURE__ */ e(O, { "aria-label": n.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(B, { name: "edit" }) }),
398
- /* @__PURE__ */ e(x, { variant: "body1", children: n.mobile_devices_edit_label })
441
+ /* @__PURE__ */ e(H, { "aria-label": i.mobile_devices_edit_label, color: "secondary", children: /* @__PURE__ */ e(B, { name: "edit" }) }),
442
+ /* @__PURE__ */ e(x, { variant: "body1", children: i.mobile_devices_edit_label })
399
443
  ]
400
444
  }
401
445
  ),
402
- /* @__PURE__ */ c(
446
+ /* @__PURE__ */ d(
403
447
  p,
404
448
  {
405
- onClick: () => i(l),
449
+ onClick: () => n(s),
406
450
  sx: {
407
451
  alignItems: "center",
408
452
  flexDirection: "row",
@@ -412,8 +456,8 @@ const Ve = ({
412
456
  cursor: "pointer"
413
457
  },
414
458
  children: [
415
- /* @__PURE__ */ e(O, { "aria-label": n.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(B, { name: "delete" }) }),
416
- /* @__PURE__ */ e(x, { variant: "body1", children: n.mobile_devices_delete_label })
459
+ /* @__PURE__ */ e(H, { "aria-label": i.mobile_devices_delete_label, color: "secondary", children: /* @__PURE__ */ e(B, { name: "delete" }) }),
460
+ /* @__PURE__ */ e(x, { variant: "body1", children: i.mobile_devices_delete_label })
417
461
  ]
418
462
  }
419
463
  )
@@ -422,7 +466,7 @@ const Ve = ({
422
466
  )
423
467
  ]
424
468
  },
425
- l.guid
469
+ s.guid
426
470
  )),
427
471
  /* @__PURE__ */ e(
428
472
  z,
@@ -433,54 +477,54 @@ const Ve = ({
433
477
  borderColor: o.palette.divider,
434
478
  p: "12px 16px"
435
479
  },
436
- children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: H(
437
- n.mobile_devices_count,
480
+ children: /* @__PURE__ */ e(x, { color: o.palette.text.secondary, variant: "body2", children: O(
481
+ i.mobile_devices_count,
438
482
  /* @__PURE__ */ e("b", { children: t.length }),
439
483
  /* @__PURE__ */ e("b", { children: t.length })
440
484
  ) })
441
485
  }
442
486
  )
443
487
  ] });
444
- }, ze = ({
488
+ }, We = ({
445
489
  dialogType: t,
446
490
  isOpen: r,
447
- onClose: i,
491
+ onClose: n,
448
492
  device: o,
449
- deviceToken: n = ""
493
+ deviceToken: i = ""
450
494
  }) => {
451
- const u = L(), { common: s, settings: a } = k(), { updateDevice: l, deleteDevice: b, setAlert: _, loadDevices: d } = E(), [h, w] = m.useState("");
452
- m.useEffect(() => {
453
- o && w(o.name);
495
+ const c = L(), { common: l, settings: a } = w(), { updateDevice: s, deleteDevice: m, setAlert: h, loadDevices: f } = I(), [y, v] = u.useState("");
496
+ u.useEffect(() => {
497
+ o && v(o.name);
454
498
  }, [o, t]);
455
- const v = () => {
499
+ const D = () => {
456
500
  switch (t) {
457
- case y.Edit:
501
+ case g.Edit:
458
502
  return a.mobile_devices_edit_label;
459
- case y.Delete:
503
+ case g.Delete:
460
504
  return a.mobile_devices_delete_label;
461
505
  default:
462
506
  return "";
463
507
  }
464
- }, S = () => {
508
+ }, k = () => {
465
509
  switch (t) {
466
- case y.Token:
467
- return s.done_button;
468
- case y.Edit:
469
- return s.save_button;
470
- case y.Delete:
471
- return s.delete_button;
510
+ case g.Token:
511
+ return l.done_button;
512
+ case g.Edit:
513
+ return l.save_button;
514
+ case g.Delete:
515
+ return l.delete_button;
472
516
  default:
473
517
  return "";
474
518
  }
475
- }, A = () => {
476
- const g = {
519
+ }, S = () => {
520
+ const b = {
477
521
  "& .MuiDialogContent-root": {
478
522
  width: 400,
479
523
  pt: 0
480
524
  }
481
525
  };
482
- return t === y.Token ? {
483
- ...g,
526
+ return t === g.Token ? {
527
+ ...b,
484
528
  "& .MuiToolbar-root:last-child": {
485
529
  padding: "32px 60px 48px",
486
530
  justifyContent: "center"
@@ -492,85 +536,85 @@ const Ve = ({
492
536
  flex: 1
493
537
  }
494
538
  } : {
495
- ...g,
539
+ ...b,
496
540
  "& .MuiToolbar-root:last-child": {
497
541
  gap: 8,
498
542
  padding: 24,
499
543
  justifyContent: "flex-end"
500
544
  },
501
- ...t === y.Delete && {
545
+ ...t === g.Delete && {
502
546
  "& .MuiTypography-body1": {
503
547
  padding: 0
504
548
  }
505
549
  }
506
550
  };
507
- }, T = async () => {
508
- if (t === y.Token && i(), t === y.Edit && o) {
509
- const g = { ...o, name: h };
510
- (await l(g)).success ? (_(a.mobile_devices_edit_success, "success"), d()) : _(
511
- H(a.mobile_devices_edit_error, o.name),
551
+ }, P = async () => {
552
+ if (t === g.Token && n(), t === g.Edit && o) {
553
+ const b = { ...o, name: y };
554
+ (await s(b)).success ? (h(a.mobile_devices_edit_success, "success"), f()) : h(
555
+ O(a.mobile_devices_edit_error, o.name),
512
556
  "error"
513
- ), i();
557
+ ), n();
514
558
  }
515
- t === y.Delete && o && ((await b(o.guid)).success ? (_(
516
- H(a.mobile_devices_delete_success, o.name),
559
+ t === g.Delete && o && ((await m(o.guid)).success ? (h(
560
+ O(a.mobile_devices_delete_success, o.name),
517
561
  "success"
518
- ), d()) : _(
519
- H(a.mobile_devices_delete_error, o.name),
562
+ ), f()) : h(
563
+ O(a.mobile_devices_delete_error, o.name),
520
564
  "error"
521
- ), i());
565
+ ), n());
522
566
  };
523
- return /* @__PURE__ */ c(
524
- $,
567
+ return /* @__PURE__ */ d(
568
+ F,
525
569
  {
526
- copy: { title: v() },
570
+ copy: { title: D() },
527
571
  isOpen: r,
528
- onClose: i,
529
- onPrimaryAction: T,
530
- onSecondaryAction: i,
531
- primaryColor: t === y.Delete ? "error" : void 0,
532
- primaryText: S(),
533
- secondaryText: t === y.Token ? s.back : s.cancel_button,
534
- sx: A(),
572
+ onClose: n,
573
+ onPrimaryAction: P,
574
+ onSecondaryAction: n,
575
+ primaryColor: t === g.Delete ? "error" : void 0,
576
+ primaryText: k(),
577
+ secondaryText: t === g.Token ? l.back : l.cancel_button,
578
+ sx: S(),
535
579
  children: [
536
- t === y.Token && /* @__PURE__ */ c(p, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
580
+ t === g.Token && /* @__PURE__ */ d(p, { spacing: 16, sx: { px: 40, textAlign: "center", width: "100%" }, children: [
537
581
  /* @__PURE__ */ e(x, { bold: !0, truncate: !1, variant: "body1", children: a.mobile_devices_access_label }),
538
582
  /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: a.mobile_devices_access_info_1 }),
539
583
  /* @__PURE__ */ e(
540
584
  M,
541
585
  {
542
586
  sx: {
543
- border: `1px solid ${u.palette.neutral.light}`,
587
+ border: `1px solid ${c.palette.neutral.light}`,
544
588
  borderRadius: "4px",
545
589
  p: "16px 32px"
546
590
  },
547
591
  variant: "h1",
548
- children: n
592
+ children: i
549
593
  }
550
594
  ),
551
595
  /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: a.mobile_devices_access_info_2 })
552
596
  ] }),
553
- t === y.Edit && /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(I, { onChange: (g) => w(g.target.value), value: h }) }),
554
- t === y.Delete && /* @__PURE__ */ e(M, { children: a.mobile_devices_delete_info })
597
+ t === g.Edit && /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(A, { onChange: (b) => v(b.target.value), value: y }) }),
598
+ t === g.Delete && /* @__PURE__ */ e(M, { children: a.mobile_devices_delete_info })
555
599
  ]
556
600
  }
557
601
  );
558
- }, Ge = C(ze), je = C(() => {
559
- const { isMobile: t } = F(), { settings: r } = k(), { isCopyLoaded: i, isInitialized: o } = ee(), { setAlert: n, devices: u, loadDevices: s, generateDeviceToken: a } = E(), [l, b] = m.useState({ open: !1, type: "" }), [_, d] = m.useState(), [h, w] = m.useState("");
560
- m.useEffect(() => {
561
- o && s();
602
+ }, ze = C(We), Ge = C(() => {
603
+ const { isMobile: t } = U(), { settings: r } = w(), { isCopyLoaded: n, isInitialized: o } = te(), { setAlert: i, devices: c, loadDevices: l, generateDeviceToken: a } = I(), [s, m] = u.useState({ open: !1, type: "" }), [h, f] = u.useState(), [y, v] = u.useState("");
604
+ u.useEffect(() => {
605
+ o && l();
562
606
  }, [o]);
563
- const v = async () => {
564
- const g = await a();
565
- g ? (w(g), b({ open: !0, type: y.Token })) : n(r.mobile_devices_access_error, "error");
566
- }, S = (g) => {
567
- d(g), b({ open: !0, type: y.Edit });
568
- }, A = (g) => {
569
- d(g), b({ open: !0, type: y.Delete });
570
- }, T = () => {
571
- b({ open: !1, type: "" }), d(void 0);
607
+ const D = async () => {
608
+ const b = await a();
609
+ b ? (v(b), m({ open: !0, type: g.Token })) : i(r.mobile_devices_access_error, "error");
610
+ }, k = (b) => {
611
+ f(b), m({ open: !0, type: g.Edit });
612
+ }, S = (b) => {
613
+ f(b), m({ open: !0, type: g.Delete });
614
+ }, P = () => {
615
+ m({ open: !1, type: "" }), f(void 0);
572
616
  };
573
- return !i || !o ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ c(
617
+ return !n || !o ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ d(
574
618
  p,
575
619
  {
576
620
  sx: {
@@ -579,126 +623,126 @@ const Ve = ({
579
623
  gap: 24
580
624
  },
581
625
  children: [
582
- /* @__PURE__ */ c(p, { gap: 4, children: [
583
- /* @__PURE__ */ e(Y, { children: r.mobile_devices_title }),
626
+ /* @__PURE__ */ d(p, { gap: 4, children: [
627
+ /* @__PURE__ */ e(q, { children: r.mobile_devices_title }),
584
628
  /* @__PURE__ */ e(M, { variant: "body1", children: r.mobile_devices_info })
585
629
  ] }),
586
630
  t ? /* @__PURE__ */ e(
587
- We,
631
+ Ve,
588
632
  {
589
- devices: u,
590
- onClickDeviceDelete: A,
591
- onClickDeviceEdit: S
633
+ devices: c,
634
+ onClickDeviceDelete: S,
635
+ onClickDeviceEdit: k
592
636
  }
593
637
  ) : /* @__PURE__ */ e(
594
- Ve,
638
+ Ue,
595
639
  {
596
- devices: u,
597
- onClickDeviceDelete: A,
598
- onClickDeviceEdit: S
640
+ devices: c,
641
+ onClickDeviceDelete: S,
642
+ onClickDeviceEdit: k
599
643
  }
600
644
  ),
601
- /* @__PURE__ */ c(p, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
645
+ /* @__PURE__ */ d(p, { sx: { alignItems: "center", px: 24, py: 12, gap: 4 }, children: [
602
646
  /* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: r.mobile_devices_access_title }),
603
647
  /* @__PURE__ */ e(M, { align: "center", variant: "body2", children: r.mobile_devices_access_description }),
604
- /* @__PURE__ */ e(Z, { onClick: v, variant: "text", children: r.mobile_devices_access_cta })
648
+ /* @__PURE__ */ e(Y, { onClick: D, variant: "text", children: r.mobile_devices_access_cta })
605
649
  ] }),
606
650
  /* @__PURE__ */ e(
607
- Ge,
651
+ ze,
608
652
  {
609
- device: _,
610
- deviceToken: h,
611
- dialogType: l.type,
612
- isOpen: l.open,
613
- onClose: T
653
+ device: h,
654
+ deviceToken: y,
655
+ dialogType: s.type,
656
+ isOpen: s.open,
657
+ onClose: P
614
658
  }
615
659
  )
616
660
  ]
617
661
  }
618
662
  );
619
- }), Q = C(
620
- ({ onClick: t, primaryText: r, secondaryText: i, sx: o }) => {
621
- const n = L();
622
- return /* @__PURE__ */ e(Pe, { sx: { bgcolor: n.palette.background.paper }, children: /* @__PURE__ */ c(Re, { alignItems: "flex-start", onClick: t, sx: o, children: [
623
- /* @__PURE__ */ e(Me, { primary: r, secondary: i }),
624
- /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(Le, {}) })
663
+ }), X = C(
664
+ ({ onClick: t, primaryText: r, secondaryText: n, sx: o }) => {
665
+ const i = L();
666
+ return /* @__PURE__ */ e(Ie, { sx: { bgcolor: i.palette.background.paper }, children: /* @__PURE__ */ d(Ee, { alignItems: "flex-start", onClick: t, sx: o, children: [
667
+ /* @__PURE__ */ e(Re, { primary: r, secondary: n }),
668
+ /* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(ee, {}) })
625
669
  ] }) });
626
670
  }
627
- ), $e = C(() => {
628
- const { settings: t } = k(), { categories: r } = j(), { selectedRule: i, updateRuleCategory: o } = E(), [n, u] = m.useState(!1), s = () => {
629
- u(!1);
671
+ ), je = C(() => {
672
+ const { settings: t } = w(), { categories: r } = j(), { selectedRule: n, updateRuleCategory: o } = I(), [i, c] = u.useState(!1), l = () => {
673
+ c(!1);
630
674
  }, a = () => {
631
- u(!0);
632
- }, l = (_) => r.find((d) => d.guid === _)?.name, b = async (_) => {
633
- i && i.category_guid !== _ && (i.category_guid = _, await o(i)), s();
675
+ c(!0);
676
+ }, s = (h) => r.find((f) => f.guid === h)?.name, m = async (h) => {
677
+ n && n.category_guid !== h && (n.category_guid = h, await o(n)), l();
634
678
  };
635
- return /* @__PURE__ */ c(m.Fragment, { children: [
679
+ return /* @__PURE__ */ d(u.Fragment, { children: [
636
680
  /* @__PURE__ */ e(
637
- Q,
681
+ X,
638
682
  {
639
683
  onClick: a,
640
- primaryText: i?.category_guid ? l(i.category_guid) : "",
684
+ primaryText: n?.category_guid ? s(n.category_guid) : "",
641
685
  secondaryText: t.category
642
686
  }
643
687
  ),
644
688
  /* @__PURE__ */ e(
645
- Ie,
689
+ Ae,
646
690
  {
647
- initialSelected: i?.category_guid ? i.category_guid : void 0,
648
- onClose: s,
649
- onSelect: b,
650
- showDrawer: n,
691
+ initialSelected: n?.category_guid ? n.category_guid : void 0,
692
+ onClose: l,
693
+ onSelect: m,
694
+ showDrawer: i,
651
695
  title: t.select_category
652
696
  }
653
697
  )
654
698
  ] });
655
- }), Je = C(() => {
656
- const { common: t, settings: r } = k(), { selectedRule: i, updateRulePayee: o } = E(), n = L(), [u, s] = m.useState(!1), a = i?.description ? i.description : i?.match_description, [l, b] = m.useState(a || ""), _ = () => {
657
- s(!0);
658
- }, d = async () => {
659
- l !== a && i && (i.description = l, await o(i), s(!1));
699
+ }), $e = C(() => {
700
+ const { common: t, settings: r } = w(), { selectedRule: n, updateRulePayee: o } = I(), i = L(), [c, l] = u.useState(!1), a = n?.description ? n.description : n?.match_description, [s, m] = u.useState(a || ""), h = () => {
701
+ l(!0);
702
+ }, f = async () => {
703
+ s !== a && n && (n.description = s, await o(n), l(!1));
660
704
  };
661
- return /* @__PURE__ */ c(m.Fragment, { children: [
705
+ return /* @__PURE__ */ d(u.Fragment, { children: [
662
706
  /* @__PURE__ */ e(
663
- Q,
707
+ X,
664
708
  {
665
- onClick: _,
709
+ onClick: h,
666
710
  primaryText: a,
667
711
  secondaryText: r.payee
668
712
  }
669
713
  ),
670
714
  /* @__PURE__ */ e(
671
- $,
715
+ F,
672
716
  {
673
717
  copy: { title: r.edit_payee },
674
- isOpen: u,
675
- onClose: () => s(!1),
676
- onPrimaryAction: d,
677
- onSecondaryAction: () => s(!1),
718
+ isOpen: c,
719
+ onClose: () => l(!1),
720
+ onPrimaryAction: f,
721
+ onSecondaryAction: () => l(!1),
678
722
  primaryText: t.save_button,
679
723
  secondaryText: t.cancel_button,
680
724
  sx: {
681
725
  "& .MuiDialogContent-root": { pt: 0, width: 400 },
682
- path: { fill: n.palette.secondary.darker }
726
+ path: { fill: i.palette.secondary.darker }
683
727
  },
684
728
  children: /* @__PURE__ */ e(
685
- I,
729
+ A,
686
730
  {
687
- onChange: (h) => b(h.target.value),
731
+ onChange: (y) => m(y.target.value),
688
732
  sx: { width: 352 },
689
- value: l
733
+ value: s
690
734
  }
691
735
  )
692
736
  }
693
737
  )
694
738
  ] });
695
- }), Ke = C(({ onClose: t, onDelete: r, isOpen: i }) => {
696
- const { common: o, settings: n } = k();
739
+ }), Je = C(({ onClose: t, onDelete: r, isOpen: n }) => {
740
+ const { common: o, settings: i } = w();
697
741
  return /* @__PURE__ */ e(
698
- $,
742
+ F,
699
743
  {
700
- copy: { title: n.delete_rule },
701
- isOpen: i,
744
+ copy: { title: i.delete_rule },
745
+ isOpen: n,
702
746
  onClose: t,
703
747
  onPrimaryAction: r,
704
748
  onSecondaryAction: t,
@@ -707,98 +751,98 @@ const Ve = ({
707
751
  secondaryColor: "secondary",
708
752
  secondaryText: o.cancel_button,
709
753
  sx: { "& .MuiDialogContent-root": { pt: 0, width: 400 } },
710
- children: /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: n.delete_rule_confirm })
754
+ children: /* @__PURE__ */ e(x, { truncate: !1, variant: "body2", children: i.delete_rule_confirm })
711
755
  }
712
756
  );
713
- }), Ye = C(
714
- ({ isOpen: t, onClose: r, onDelete: i }) => {
715
- const { common: o, settings: n } = k(), [u, s] = m.useState(!1);
716
- return /* @__PURE__ */ c(
717
- He,
757
+ }), Ke = C(
758
+ ({ isOpen: t, onClose: r, onDelete: n }) => {
759
+ const { common: o, settings: i } = w(), [c, l] = u.useState(!1);
760
+ return /* @__PURE__ */ d(
761
+ Me,
718
762
  {
719
763
  hasSecondaryAction: !1,
720
764
  isOpen: t,
721
765
  onClose: r,
722
766
  onPrimaryAction: () => {
723
- s(!0);
767
+ l(!0);
724
768
  },
725
769
  primaryColor: "error",
726
770
  primaryText: o.delete_button,
727
- title: n.edit_rule,
771
+ title: i.edit_rule,
728
772
  children: [
729
- /* @__PURE__ */ e(Ae, { children: /* @__PURE__ */ e(x, { bold: !0, variant: "caption", children: n.details }) }),
730
- /* @__PURE__ */ e(Je, {}),
731
- /* @__PURE__ */ e(K, { sx: { ml: 24 } }),
773
+ /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(x, { bold: !0, variant: "caption", children: i.details }) }),
732
774
  /* @__PURE__ */ e($e, {}),
733
775
  /* @__PURE__ */ e(K, { sx: { ml: 24 } }),
776
+ /* @__PURE__ */ e(je, {}),
777
+ /* @__PURE__ */ e(K, { sx: { ml: 24 } }),
734
778
  /* @__PURE__ */ e(
735
- Ke,
779
+ Je,
736
780
  {
737
- isOpen: u,
738
- onClose: () => s(!1),
739
- onDelete: i
781
+ isOpen: c,
782
+ onClose: () => l(!1),
783
+ onDelete: n
740
784
  }
741
785
  )
742
786
  ]
743
787
  }
744
788
  );
745
789
  }
746
- ), qe = C(({ rule: t }) => {
747
- const { categories: r } = j(), { setSelectedGuid: i } = Ee(), { deleteTransactionRule: o, setSelectedRule: n } = E(), { isDesktop: u, isTablet: s } = F(), [a, l] = m.useState(!1), b = () => {
748
- l(!1), i(null), n(void 0);
749
- }, _ = async () => {
750
- await o(), b();
751
- }, d = () => {
752
- l(!0), n(t);
753
- }, h = (w) => r.find((v) => v.guid === w)?.name;
754
- return /* @__PURE__ */ c(m.Fragment, { children: [
790
+ ), Ye = C(({ rule: t }) => {
791
+ const { categories: r } = j(), { setSelectedGuid: n } = Pe(), { deleteTransactionRule: o, setSelectedRule: i } = I(), { isDesktop: c, isTablet: l } = U(), [a, s] = u.useState(!1), m = () => {
792
+ s(!1), n(null), i(void 0);
793
+ }, h = async () => {
794
+ await o(), m();
795
+ }, f = () => {
796
+ s(!0), i(t);
797
+ }, y = (v) => r.find((D) => D.guid === v)?.name;
798
+ return /* @__PURE__ */ d(u.Fragment, { children: [
755
799
  /* @__PURE__ */ e(
756
- Q,
800
+ X,
757
801
  {
758
- onClick: d,
802
+ onClick: f,
759
803
  primaryText: t.description ? t.description : t.match_description,
760
- secondaryText: t.category_guid ? h(t.category_guid) : ""
804
+ secondaryText: t.category_guid ? y(t.category_guid) : ""
761
805
  }
762
806
  ),
763
- /* @__PURE__ */ e(K, { sx: { ml: s || u ? 0 : 24 } }),
764
- /* @__PURE__ */ e(Ye, { isOpen: a, onClose: b, onDelete: _ })
807
+ /* @__PURE__ */ e(K, { sx: { ml: l || c ? 0 : 24 } }),
808
+ /* @__PURE__ */ e(Ke, { isOpen: a, onClose: m, onDelete: h })
765
809
  ] });
766
- }), re = C(() => {
767
- const { settings: t } = k(), { loadTransactionRules: r, transactionRules: i } = E(), [o, n] = m.useState(!1);
768
- return ne({
810
+ }), ae = C(() => {
811
+ const { settings: t } = w(), { loadTransactionRules: r, transactionRules: n } = I(), [o, i] = u.useState(!1);
812
+ return re({
769
813
  widgetName: "TransactionRulesTab",
770
814
  isLoaded: o
771
- }), m.useEffect(() => {
772
- r().finally(() => n(!0));
773
- }, []), /* @__PURE__ */ c(p, { sx: { gap: 24, py: 24 }, children: [
774
- /* @__PURE__ */ c(p, { sx: { px: 24 }, children: [
775
- /* @__PURE__ */ e(Y, { children: t.transaction_rules_label }),
815
+ }), u.useEffect(() => {
816
+ r().finally(() => i(!0));
817
+ }, []), /* @__PURE__ */ d(p, { sx: { gap: 24, py: 24 }, children: [
818
+ /* @__PURE__ */ d(p, { sx: { px: 24 }, children: [
819
+ /* @__PURE__ */ e(q, { children: t.transaction_rules_label }),
776
820
  /* @__PURE__ */ e(M, { variant: "body1", children: t.transaction_rules_description })
777
821
  ] }),
778
- /* @__PURE__ */ e(Te, { children: i.map((u, s) => /* @__PURE__ */ e(qe, { rule: u }, s)) })
822
+ /* @__PURE__ */ e(Se, { children: n.map((c, l) => /* @__PURE__ */ e(Ye, { rule: c }, l)) })
779
823
  ] });
780
- }), Qe = C(({ selectedTab: t }) => {
781
- const { alert: r, setAlert: i } = E(), {
824
+ }), qe = C(({ selectedTab: t }) => {
825
+ const { alert: r, setAlert: n } = I(), {
782
826
  config: { display_user_profile_in_settings: o }
783
827
  } = G();
784
- return /* @__PURE__ */ c(X, { children: [
785
- t === N.Profile && /* @__PURE__ */ e(Ue, {}),
786
- t === N.Devices && /* @__PURE__ */ e(je, {}),
787
- t === N.Notifications && /* @__PURE__ */ e(J, { showPersonalDetails: !o }),
788
- t === N.TransactionRules && /* @__PURE__ */ e(re, {}),
789
- t === N.Help && /* @__PURE__ */ e(p, { sx: { px: 24 }, children: /* @__PURE__ */ e(Oe, {}) }),
828
+ return /* @__PURE__ */ d(Z, { children: [
829
+ t === R.Profile && /* @__PURE__ */ e(Fe, {}),
830
+ t === R.Devices && /* @__PURE__ */ e(Ge, {}),
831
+ t === R.Notifications && /* @__PURE__ */ e(J, { showPersonalDetails: !o }),
832
+ t === R.TransactionRules && /* @__PURE__ */ e(ae, {}),
833
+ t === R.Help && /* @__PURE__ */ e(p, { sx: { px: 24 }, children: /* @__PURE__ */ e(Le, {}) }),
790
834
  /* @__PURE__ */ e(
791
- fe,
835
+ pe,
792
836
  {
793
837
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
794
838
  autoHideDuration: 3500,
795
- onClose: () => i(""),
839
+ onClose: () => n(""),
796
840
  open: !!r.message,
797
841
  children: /* @__PURE__ */ e(
798
- he,
842
+ ue,
799
843
  {
800
844
  onClose: () => {
801
- i("");
845
+ n("");
802
846
  },
803
847
  severity: r.severity,
804
848
  variant: "filled",
@@ -809,86 +853,86 @@ const Ve = ({
809
853
  )
810
854
  ] });
811
855
  });
812
- var N = /* @__PURE__ */ ((t) => (t[t.Profile = 0] = "Profile", t[t.Devices = 1] = "Devices", t[t.Notifications = 2] = "Notifications", t[t.TransactionRules = 3] = "TransactionRules", t[t.Help = 4] = "Help", t))(N || {});
813
- const Wt = C(({ onBackClick: t, onMenuClick: r, sx: i }) => {
814
- const { settings: o } = k(), { isCopyLoaded: n, isInitialized: u } = ee(), { config: s } = G(), { isMobile: a } = F(), { categoriesLoaded: l, loadCategories: b } = j();
815
- ne({
856
+ var R = /* @__PURE__ */ ((t) => (t[t.Profile = 0] = "Profile", t[t.Devices = 1] = "Devices", t[t.Notifications = 2] = "Notifications", t[t.TransactionRules = 3] = "TransactionRules", t[t.Help = 4] = "Help", t))(R || {});
857
+ const Vt = C(({ onBackClick: t, onMenuClick: r, sx: n }) => {
858
+ const { settings: o } = w(), { isCopyLoaded: i, isInitialized: c } = te(), { config: l } = G(), { isMobile: a } = U(), { categoriesLoaded: s, loadCategories: m } = j();
859
+ re({
816
860
  widgetName: "SettingsWidget",
817
- isLoaded: u && n
818
- }), m.useEffect(() => {
819
- l || b().finally();
861
+ isLoaded: c && i
862
+ }), u.useEffect(() => {
863
+ s || m().finally();
820
864
  }, []);
821
865
  const {
822
- display_user_profile_in_settings: _,
823
- display_mobile_devices_in_settings: d,
824
- display_notification_settings_in_settings: h,
825
- display_user_transaction_rules_in_settings: w,
826
- show_help_widget_in_master: v
827
- } = s, S = [
828
- { enabled: _, index: 0, label: o?.profile_label },
829
- { enabled: d, index: 1, label: o?.mobile_devices_label },
830
- { enabled: h, index: 2, label: o?.notifications_label },
831
- { enabled: w, index: 3, label: o?.transaction_rules_label },
832
- { enabled: v, index: 4, label: o?.help_label }
833
- ], A = S.find((D) => D.enabled), [T, g] = m.useState(A ? A.index : -1);
834
- return !n || !u ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ e(
835
- q,
866
+ display_user_profile_in_settings: h,
867
+ display_mobile_devices_in_settings: f,
868
+ display_notification_settings_in_settings: y,
869
+ display_user_transaction_rules_in_settings: v,
870
+ show_help_widget_in_master: D
871
+ } = l, k = [
872
+ { enabled: h, index: 0, label: o?.profile_label },
873
+ { enabled: f, index: 1, label: o?.mobile_devices_label },
874
+ { enabled: y, index: 2, label: o?.notifications_label },
875
+ { enabled: v, index: 3, label: o?.transaction_rules_label },
876
+ { enabled: D, index: 4, label: o?.help_label }
877
+ ], S = k.find((T) => T.enabled), [P, b] = u.useState(S ? S.index : -1);
878
+ return !i || !c ? /* @__PURE__ */ e(ie, {}) : /* @__PURE__ */ e(
879
+ Q,
836
880
  {
837
881
  onBackClick: t,
838
882
  onMenuClick: r,
839
883
  showAccountFilter: !1,
840
- sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...i },
884
+ sx: { height: "calc(100dvh - 24px)", overflow: "auto", ...n },
841
885
  title: o.title,
842
- children: /* @__PURE__ */ c(p, { mx: a ? 0 : 48, my: 24, children: [
886
+ children: /* @__PURE__ */ d(p, { mx: a ? 0 : 48, my: 24, children: [
843
887
  /* @__PURE__ */ e(
844
- pe,
888
+ me,
845
889
  {
846
- onChange: (D, U) => g(U),
890
+ onChange: (T, $) => b($),
847
891
  sx: { bgcolor: "background.paper" },
848
892
  textColor: "primary",
849
- value: T,
893
+ value: P,
850
894
  variant: "scrollable",
851
- children: S.map(
852
- (D) => D.enabled && /* @__PURE__ */ e(ue, { label: D.label, value: D.index }, D.index)
895
+ children: k.map(
896
+ (T) => T.enabled && /* @__PURE__ */ e(de, { label: T.label, value: T.index }, T.index)
853
897
  )
854
898
  }
855
899
  ),
856
- /* @__PURE__ */ e(Qe, { selectedTab: T })
900
+ /* @__PURE__ */ e(qe, { selectedTab: P })
857
901
  ] })
858
902
  }
859
903
  );
860
- }), zt = C((t) => {
861
- const { clientConfig: r } = G(), i = r?.master?.deep_link_params?.view, o = r?.master?.show_back_button;
862
- return i ? /* @__PURE__ */ c(p, { children: [
904
+ }), Wt = C((t) => {
905
+ const { clientConfig: r } = G(), n = r?.master?.deep_link_params?.view, o = r?.master?.show_back_button;
906
+ return n ? /* @__PURE__ */ d(p, { children: [
863
907
  o && t.onBackClick && /* @__PURE__ */ e(
864
- O,
908
+ H,
865
909
  {
866
910
  color: "primary",
867
911
  onClick: t.onBackClick,
868
912
  sx: { p: 10, alignSelf: "flex-start" },
869
- children: /* @__PURE__ */ e(Be, { size: 24 })
913
+ children: /* @__PURE__ */ e(be, { size: 24 })
870
914
  }
871
915
  ),
872
- /* @__PURE__ */ e(J, { view: i })
873
- ] }) : /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { my: 24, children: /* @__PURE__ */ e(J, {}) }) });
874
- }), Gt = (t) => {
875
- const { isMobile: r } = F(), { categoriesLoaded: i, loadCategories: o } = j();
876
- return m.useEffect(() => {
877
- i || o().finally();
878
- }), /* @__PURE__ */ e(q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { sx: { mx: r ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(re, {}) }) });
916
+ /* @__PURE__ */ e(J, { view: n })
917
+ ] }) : /* @__PURE__ */ e(Q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { my: 24, children: /* @__PURE__ */ e(J, {}) }) });
918
+ }), zt = (t) => {
919
+ const { isMobile: r } = U(), { categoriesLoaded: n, loadCategories: o } = j();
920
+ return u.useEffect(() => {
921
+ n || o().finally();
922
+ }), /* @__PURE__ */ e(Q, { ...t, showAccountFilter: !1, children: /* @__PURE__ */ e(p, { sx: { mx: r ? 0 : 48, my: 24 }, children: /* @__PURE__ */ e(ae, {}) }) });
879
923
  };
880
924
  export {
881
- Jt as AccountNotificationProfiles,
882
- Kt as BudgetNotificationProfiles,
883
- je as DeviceTab,
884
- Yt as InsightsNotificationProfiles,
925
+ $t as AccountNotificationProfiles,
926
+ Jt as BudgetNotificationProfiles,
927
+ Ge as DeviceTab,
928
+ Kt as InsightsNotificationProfiles,
885
929
  J as NotificationSettings,
886
- zt as NotificationSettingsWidget,
887
- Ue as ProfileTab,
888
- N as SettingsTabs,
889
- Wt as SettingsWidget,
890
- Qe as SettingsWidgetContents,
891
- re as TransactionRulesTab,
892
- Gt as TransactionRulesWidget
930
+ Wt as NotificationSettingsWidget,
931
+ Fe as ProfileTab,
932
+ R as SettingsTabs,
933
+ Vt as SettingsWidget,
934
+ qe as SettingsWidgetContents,
935
+ ae as TransactionRulesTab,
936
+ zt as TransactionRulesWidget
893
937
  };
894
938
  //# sourceMappingURL=index.es.js.map