@mx-cartographer/experiences 9.0.3 → 9.1.0-alpha.bb1

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 (121) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/dist/Analytics-BKzTPees.mjs +61 -0
  3. package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
  4. package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
  5. package/dist/Loader-BlVzRtUd.mjs +73 -0
  6. package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
  7. package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
  8. package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
  9. package/dist/accounts/index.es.js +12 -1598
  10. package/dist/accounts-DkyAiLpg.mjs +15632 -0
  11. package/dist/analytics/index.es.js +155 -139
  12. package/dist/budgets/index.es.js +1317 -1266
  13. package/dist/cashflow/index.es.js +1047 -942
  14. package/dist/categories/index.es.js +4 -4
  15. package/dist/common/index.es.js +101 -310
  16. package/dist/core/index.es.js +80 -104
  17. package/dist/core-BexP5oiV.mjs +4047 -0
  18. package/dist/dashboard/index.es.js +185 -141
  19. package/dist/debts/index.es.js +1384 -1272
  20. package/dist/finstrong/index.es.js +3366 -3471
  21. package/dist/goals/index.es.js +1103 -984
  22. package/dist/help/index.es.js +3 -25
  23. package/dist/help-CctDYrAH.mjs +2308 -0
  24. package/dist/insights/index.es.js +93 -4843
  25. package/dist/investments/index.es.js +1533 -1522
  26. package/dist/merchants/index.es.js +75 -64
  27. package/dist/microinsights/index.es.js +15 -824
  28. package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
  29. package/dist/networth/index.es.js +550 -503
  30. package/dist/notifications/index.es.js +169 -161
  31. package/dist/recurringtransactions/index.es.js +10 -962
  32. package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
  33. package/dist/settings/index.es.js +13 -880
  34. package/dist/settings-ZMHe439l.mjs +1526 -0
  35. package/dist/spending/index.es.js +400 -456
  36. package/dist/transactions/index.es.js +10 -603
  37. package/dist/trends/index.es.js +1268 -1407
  38. package/package.json +28 -28
  39. package/dist/Account-BaJmiJAG.mjs +0 -118
  40. package/dist/Account-BxHMlV9R.mjs +0 -30
  41. package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
  42. package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
  43. package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
  44. package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
  45. package/dist/AccountUtils-T5_Odvos.mjs +0 -27
  46. package/dist/Accounts-CseLC3lL.mjs +0 -5
  47. package/dist/Analytics-CkYXKvco.mjs +0 -53
  48. package/dist/Analytics-CzGzz_sE.mjs +0 -136
  49. package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
  50. package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
  51. package/dist/Category-DEKZGLYe.mjs +0 -301
  52. package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
  53. package/dist/Connect-Dk6GZEsA.mjs +0 -39
  54. package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
  55. package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
  56. package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
  57. package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
  58. package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
  59. package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
  60. package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
  61. package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
  62. package/dist/DebtUtils-DD3186U-.mjs +0 -153
  63. package/dist/Dialog-Bvd2n8hz.mjs +0 -66
  64. package/dist/Donut-SzzfZDHF.mjs +0 -88
  65. package/dist/Drawer-BXqqBMxg.mjs +0 -174
  66. package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
  67. package/dist/EmptyState-CJUDc3kD.mjs +0 -84
  68. package/dist/Error-Dogaw2jO.mjs +0 -84
  69. package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
  70. package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
  71. package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
  72. package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
  73. package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
  74. package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
  75. package/dist/Help-CkQTjORd.mjs +0 -299
  76. package/dist/Help-DJ8PrVHX.mjs +0 -3209
  77. package/dist/IconBacking-DgT8DCeh.mjs +0 -39
  78. package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
  79. package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
  80. package/dist/LineChart-CejWS_rh.mjs +0 -612
  81. package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
  82. package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
  83. package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
  84. package/dist/Loader-CxeBwuPG.mjs +0 -21
  85. package/dist/Localization-DnoVyBNK.mjs +0 -38
  86. package/dist/ManageIncome-D1yBODQi.mjs +0 -595
  87. package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
  88. package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
  89. package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
  90. package/dist/Notification-DTNYSd8P.mjs +0 -7
  91. package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
  92. package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
  93. package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
  94. package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
  95. package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
  96. package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
  97. package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
  98. package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
  99. package/dist/Select-BFt-HD-L.mjs +0 -55
  100. package/dist/SelectionBox-B4xELRgp.mjs +0 -48
  101. package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
  102. package/dist/Sizes-DISGrlUg.mjs +0 -6
  103. package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
  104. package/dist/SpendingData-Fii_xATx.mjs +0 -53
  105. package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
  106. package/dist/StatusBar-CPfSXe80.mjs +0 -30
  107. package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
  108. package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
  109. package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
  110. package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
  111. package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
  112. package/dist/UserStore-CRpKQjpP.mjs +0 -3002
  113. package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
  114. package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
  115. package/dist/hooks-BaO_gOI6.mjs +0 -77
  116. package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
  117. package/dist/useAriaLive-MkYebyUR.mjs +0 -35
  118. package/dist/useDimensions-CeDR9V8N.mjs +0 -36
  119. package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
  120. package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
  121. package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
@@ -0,0 +1,1526 @@
1
+ import { s as H } from "./GlobalCopyApi-BeXzaDH9.mjs";
2
+ import { J as Ee, Y as Me, wt as A, xt as Ne } from "./core-BexP5oiV.mjs";
3
+ import { Bn as Oe, Gn as re, Tn as le, f as Re, hr as Le, l as Be, lr as ce, mr as j, ur as R, wn as N } from "./accounts-DkyAiLpg.mjs";
4
+ import { n as de } from "./Analytics-BKzTPees.mjs";
5
+ import { O as U, T as P, d as Ue, h as me, i as J, n as ge, p as T, s as oe, t as ue } from "./Loader-BlVzRtUd.mjs";
6
+ import { n as Ve } from "./MiniWidgetContainer-COwnjfy7.mjs";
7
+ import { t as X } from "./HeaderCell-EhCUSjvj.mjs";
8
+ import { n as Fe } from "./help-CctDYrAH.mjs";
9
+ import u from "react";
10
+ import { observer as x } from "mobx-react-lite";
11
+ import m from "@mui/material/Stack";
12
+ import { H3 as Y, Icon as q, InstitutionLogo as He, P as W, Text as y } from "@mxenabled/mxui";
13
+ import { endOfMonth as We } from "date-fns/endOfMonth";
14
+ import { startOfMonth as ze } from "date-fns/startOfMonth";
15
+ import Q from "@mui/material/Button";
16
+ import { ChevronRight as O, ExpandMore as Ge, Star as $e } from "@mxenabled/mx-icons";
17
+ import { Fragment as z, jsx as e, jsxs as c } from "react/jsx-runtime";
18
+ import { alpha as Z, useTheme as L } from "@mui/material/styles";
19
+ import G from "@mui/material/Box";
20
+ import je from "@mui/material/Tab";
21
+ import Je from "@mui/material/Tabs";
22
+ import ie from "@mui/material/IconButton";
23
+ import { getUnixTime as Ye } from "date-fns/getUnixTime";
24
+ import { fromUnixTime as be } from "date-fns/fromUnixTime";
25
+ import Ke from "@mui/material/Card";
26
+ import qe from "@mui/material/CardContent";
27
+ import E from "@mui/material/Divider";
28
+ import $ from "@mui/material/List";
29
+ import ee from "@mui/material/ListItem";
30
+ import te from "@mui/material/ListItemButton";
31
+ import Qe from "@mui/material/ListItemIcon";
32
+ import ne from "@mui/material/ListItemText";
33
+ import M from "@mui/material/TextField";
34
+ import Xe from "@mui/material/ListSubheader";
35
+ import { AdapterDateFns as ye } from "@mui/x-date-pickers/AdapterDateFnsV3";
36
+ import { DateCalendar as Ze } from "@mui/x-date-pickers/DateCalendar";
37
+ import et from "@mui/material/Alert";
38
+ import { DataGridPro as tt } from "@mui/x-data-grid-pro";
39
+ import nt from "@mui/material/Snackbar";
40
+ import it from "@mui/material/Collapse";
41
+ import { DatePicker as ot } from "@mui/x-date-pickers";
42
+ import { LocalizationProvider as xe } from "@mui/x-date-pickers/LocalizationProvider";
43
+ import at from "@mui/material/Accordion";
44
+ import st from "@mui/material/AccordionDetails";
45
+ import rt from "@mui/material/AccordionSummary";
46
+ import { formatDistanceToNow as ve } from "date-fns/formatDistanceToNow";
47
+ var Ce = x(() => {
48
+ const { common: t, settings: n } = T(), { sendEmailVerification: o } = P(), { user: a } = U(), i = L(), [l, r] = u.useState(!1), s = () => {
49
+ r(!1);
50
+ }, d = () => {
51
+ r(!0);
52
+ };
53
+ return /* @__PURE__ */ c(u.Fragment, { children: [/* @__PURE__ */ c(Q, {
54
+ onClick: d,
55
+ sx: {
56
+ height: "auto",
57
+ p: 4,
58
+ width: "fit-content"
59
+ },
60
+ children: [/* @__PURE__ */ e(y, {
61
+ variant: "body2",
62
+ children: n.verify_email
63
+ }), /* @__PURE__ */ e(O, {})]
64
+ }), /* @__PURE__ */ e(R, {
65
+ copy: { title: "" },
66
+ isOpen: l,
67
+ onClose: s,
68
+ onPrimaryAction: o,
69
+ onSecondaryAction: s,
70
+ primaryText: n.send_verification,
71
+ secondaryText: t.back,
72
+ sx: {
73
+ "& .MuiDialogContent-root": {
74
+ pt: 0,
75
+ width: 400
76
+ },
77
+ "& .MuiToolbar-root:last-child": {
78
+ gap: 16,
79
+ padding: "32px 60px 48px",
80
+ justifyContent: "center"
81
+ }
82
+ },
83
+ children: /* @__PURE__ */ c(m, {
84
+ spacing: 16,
85
+ sx: {
86
+ px: 40,
87
+ textAlign: "center",
88
+ width: "100%"
89
+ },
90
+ children: [
91
+ /* @__PURE__ */ e(y, {
92
+ bold: !0,
93
+ truncate: !1,
94
+ variant: "body1",
95
+ children: n.confirm_your_email
96
+ }),
97
+ /* @__PURE__ */ e(y, {
98
+ truncate: !1,
99
+ variant: "body2",
100
+ children: n.confirm_email
101
+ }),
102
+ /* @__PURE__ */ e(y, {
103
+ sx: {
104
+ border: `1px solid ${i.palette.neutral.light}`,
105
+ borderRadius: "4px",
106
+ p: "16px 32px"
107
+ },
108
+ variant: "h3",
109
+ children: a.email
110
+ }),
111
+ /* @__PURE__ */ e(y, {
112
+ truncate: !1,
113
+ variant: "body2",
114
+ children: n.verification_notice_email
115
+ })
116
+ ]
117
+ })
118
+ })] });
119
+ }), lt = x(({ handleClose: t, handleVerify: n, isOpen: o }) => {
120
+ const { common: a, settings: i } = T(), [l, r] = u.useState("");
121
+ return /* @__PURE__ */ e(R, {
122
+ copy: { title: i.enter_verification_code },
123
+ isOpen: o,
124
+ onClose: t,
125
+ onPrimaryAction: () => n(l),
126
+ onSecondaryAction: t,
127
+ primaryText: i.verify,
128
+ secondaryText: a.cancel_button,
129
+ sx: {
130
+ "& .MuiDialogContent-root": {
131
+ pt: 0,
132
+ width: 400
133
+ },
134
+ "& .MuiToolbar-root:last-child": {
135
+ gap: 8,
136
+ padding: 24,
137
+ justifyContent: "flex-end"
138
+ }
139
+ },
140
+ children: /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(M, {
141
+ onChange: (s) => r(s.target.value),
142
+ sx: { width: 352 },
143
+ value: l
144
+ }) })
145
+ });
146
+ }), De = x(() => {
147
+ const { common: t, settings: n } = T(), { sendPhoneVerification: o, verifyPhoneToken: a } = P(), { user: i } = U(), l = L(), [r, s] = u.useState(!1), [d, h] = u.useState(!1), p = () => {
148
+ s(!1);
149
+ }, _ = () => {
150
+ s(!0);
151
+ }, f = () => {
152
+ o().finally(() => {
153
+ h(!0);
154
+ });
155
+ }, g = (b) => {
156
+ a(b).finally(() => {
157
+ h(!1);
158
+ });
159
+ };
160
+ return /* @__PURE__ */ c(u.Fragment, { children: [
161
+ /* @__PURE__ */ c(Q, {
162
+ onClick: _,
163
+ sx: {
164
+ height: "auto",
165
+ p: 4,
166
+ width: "fit-content"
167
+ },
168
+ children: [/* @__PURE__ */ e(y, {
169
+ variant: "body2",
170
+ children: n.verify_phone
171
+ }), /* @__PURE__ */ e(O, {})]
172
+ }),
173
+ /* @__PURE__ */ e(R, {
174
+ copy: { title: "" },
175
+ isOpen: r,
176
+ onClose: p,
177
+ onPrimaryAction: f,
178
+ onSecondaryAction: p,
179
+ primaryText: n.send_verification,
180
+ secondaryText: t.back,
181
+ sx: {
182
+ "& .MuiDialogContent-root": {
183
+ pt: 0,
184
+ width: 400
185
+ },
186
+ "& .MuiToolbar-root:last-child": {
187
+ gap: 16,
188
+ padding: "32px 60px 48px",
189
+ justifyContent: "center"
190
+ }
191
+ },
192
+ children: /* @__PURE__ */ c(m, {
193
+ spacing: 16,
194
+ sx: {
195
+ px: 40,
196
+ textAlign: "center",
197
+ width: "100%"
198
+ },
199
+ children: [
200
+ /* @__PURE__ */ e(y, {
201
+ bold: !0,
202
+ truncate: !1,
203
+ variant: "body1",
204
+ children: n.confirm_your_phone
205
+ }),
206
+ /* @__PURE__ */ e(y, {
207
+ truncate: !1,
208
+ variant: "body2",
209
+ children: n.confirm_phone
210
+ }),
211
+ /* @__PURE__ */ e(y, {
212
+ sx: {
213
+ border: `1px solid ${l.palette.neutral.light}`,
214
+ borderRadius: "4px",
215
+ p: "16px 32px"
216
+ },
217
+ variant: "h3",
218
+ children: i.phone
219
+ }),
220
+ /* @__PURE__ */ e(y, {
221
+ truncate: !1,
222
+ variant: "body2",
223
+ children: n.verification_notice_phone
224
+ })
225
+ ]
226
+ })
227
+ }),
228
+ /* @__PURE__ */ e(lt, {
229
+ handleClose: () => h(!1),
230
+ handleVerify: g,
231
+ isOpen: d
232
+ })
233
+ ] });
234
+ }), ct = ({ availableWidth: t, handleOnLeavClick: n }) => {
235
+ const o = L(), { common: a, settings: i } = T(), { isDesktop: l, isMobile: r, isSmallMobile: s, isTablet: d } = j(t), { config: h } = J(), { updateUser: p } = P(), { user: _ } = U(), [f, g] = u.useState({
236
+ first_name: _.first_name,
237
+ last_name: _.last_name,
238
+ email: _.email,
239
+ phone: _.phone,
240
+ birthday: _.birthday,
241
+ postal_code: _.postal_code,
242
+ credit_score: _.credit_score
243
+ }), [b, D] = u.useState(!1), [S, w] = u.useState(!1), v = u.useRef(null), I = f.email && !_.email_is_verified && !b, V = f.phone && !_.phone_is_verified && !b;
244
+ u.useEffect(() => {
245
+ if (n) {
246
+ const C = (F) => {
247
+ v.current && !v.current.contains(F.target) && b && w(!0);
248
+ };
249
+ return document.addEventListener("mousedown", C), () => {
250
+ document.removeEventListener("mousedown", C);
251
+ };
252
+ }
253
+ }, [b]);
254
+ const ae = () => {
255
+ if (f.birthday) {
256
+ const C = /* @__PURE__ */ new Date(f.birthday * 1e3), F = C.getUTCFullYear(), Ae = C.getUTCMonth(), Ie = C.getUTCDate();
257
+ return new Date(F, Ae, Ie);
258
+ }
259
+ }, ke = async () => {
260
+ await p({
261
+ ..._,
262
+ ...f
263
+ }), D(!1);
264
+ }, Pe = () => {
265
+ w(!1), n && n();
266
+ }, Se = () => {
267
+ w(!1);
268
+ }, B = (C) => {
269
+ const F = {
270
+ ...f,
271
+ ...C
272
+ };
273
+ g(F), D(JSON.stringify({
274
+ ..._,
275
+ ...F
276
+ }) !== JSON.stringify(_));
277
+ };
278
+ return /* @__PURE__ */ c(z, { children: [/* @__PURE__ */ c(G, {
279
+ component: "form",
280
+ ref: v,
281
+ sx: {
282
+ backgroundColor: "background.paper",
283
+ p: 24,
284
+ width: s ? 320 : d ? 680 : l ? 990 : 400,
285
+ "& .MuiTextField-root": { width: s ? 272 : d ? 328 : l ? 483 : 352 }
286
+ },
287
+ children: [
288
+ /* @__PURE__ */ e(Y, { children: i.personal_details }),
289
+ /* @__PURE__ */ e(W, {
290
+ variant: "body1",
291
+ children: i.update_information
292
+ }),
293
+ /* @__PURE__ */ c(m, {
294
+ direction: r ? "column" : "row",
295
+ spacing: r ? 44 : 24,
296
+ sx: {
297
+ mb: 44,
298
+ pt: 32
299
+ },
300
+ children: [/* @__PURE__ */ e(M, {
301
+ defaultValue: f.first_name,
302
+ label: i.first_name,
303
+ onChange: (C) => B({ first_name: C.target.value })
304
+ }), /* @__PURE__ */ e(M, {
305
+ defaultValue: f.last_name,
306
+ label: i.last_name,
307
+ onChange: (C) => B({ last_name: C.target.value })
308
+ })]
309
+ }),
310
+ /* @__PURE__ */ c(m, {
311
+ direction: r ? "column" : "row",
312
+ children: [h.display_email_edit_field_in_settings && /* @__PURE__ */ c(m, {
313
+ sx: {
314
+ mb: I ? 20 : 44,
315
+ mr: r ? 0 : 24
316
+ },
317
+ children: [/* @__PURE__ */ e(M, {
318
+ defaultValue: f.email,
319
+ label: i.email_address,
320
+ onChange: (C) => B({ email: C.target.value })
321
+ }), I && /* @__PURE__ */ e(Ce, {})]
322
+ }), h.display_sms_edit_field_in_settings && /* @__PURE__ */ c(m, {
323
+ sx: { mb: V ? 20 : 44 },
324
+ children: [/* @__PURE__ */ e(M, {
325
+ defaultValue: f.phone,
326
+ label: i.mobile_number,
327
+ onChange: (C) => B({ phone: C.target.value }),
328
+ type: "tel"
329
+ }), V && /* @__PURE__ */ e(De, {})]
330
+ })]
331
+ }),
332
+ /* @__PURE__ */ c(m, {
333
+ direction: r ? "column" : "row",
334
+ spacing: r ? 44 : 24,
335
+ sx: { mb: 44 },
336
+ children: [/* @__PURE__ */ e(xe, {
337
+ dateAdapter: ye,
338
+ children: /* @__PURE__ */ e(ot, {
339
+ label: i.birthdate,
340
+ onChange: (C) => B({ birthday: Ye(C) }),
341
+ slotProps: {
342
+ nextIconButton: { sx: {
343
+ color: "primary.main",
344
+ "&:hover": { backgroundColor: Z(o.palette.primary.light, 0.1) }
345
+ } },
346
+ previousIconButton: { sx: {
347
+ color: "primary.main",
348
+ "&:hover": { backgroundColor: Z(o.palette.primary.light, 0.1) }
349
+ } }
350
+ },
351
+ sx: {
352
+ width: "100%",
353
+ "& .MuiIconButton-edgeEnd": {
354
+ color: "primary.main",
355
+ "&:hover": { backgroundColor: Z(o.palette.primary.light, 0.1) }
356
+ }
357
+ },
358
+ value: ae()
359
+ })
360
+ }), /* @__PURE__ */ e(M, {
361
+ defaultValue: f.postal_code,
362
+ label: i.zip_code,
363
+ onChange: (C) => B({ postal_code: C.target.value })
364
+ })]
365
+ }),
366
+ /* @__PURE__ */ c(m, { children: [/* @__PURE__ */ e(M, {
367
+ defaultValue: f.credit_score,
368
+ label: i.credit_score,
369
+ onChange: (C) => B({ credit_score: Number(C.target.value) }),
370
+ sx: { mb: 44 }
371
+ }), /* @__PURE__ */ e(Q, {
372
+ disabled: !b,
373
+ onClick: ke,
374
+ sx: { width: s ? 272 : 124 },
375
+ variant: "contained",
376
+ children: a.save_button
377
+ })] })
378
+ ]
379
+ }), /* @__PURE__ */ e(R, {
380
+ copy: { title: i.discard_changes },
381
+ isOpen: S,
382
+ onClose: Se,
383
+ onSecondaryAction: Pe,
384
+ primaryText: i.keep_editing,
385
+ secondaryText: i.leave,
386
+ children: i.discard_changes_message
387
+ })] });
388
+ }, dt = x(ct), k = /* @__PURE__ */ (function(t) {
389
+ return t.Delete = "delete", t.Edit = "edit", t.Token = "token", t;
390
+ })({}), mt = ({ devices: t, onClickDeviceEdit: n, onClickDeviceDelete: o }) => {
391
+ const a = L(), { settings: i } = T();
392
+ return /* @__PURE__ */ e(G, {
393
+ sx: { width: "100%" },
394
+ children: /* @__PURE__ */ e(tt, {
395
+ columns: [
396
+ {
397
+ field: "name",
398
+ headerName: i.mobile_devices_column_name,
399
+ renderHeader: X,
400
+ renderCell: (l) => /* @__PURE__ */ c(m, {
401
+ alignItems: "center",
402
+ direction: "row",
403
+ gap: 4,
404
+ children: [/* @__PURE__ */ e(y, {
405
+ variant: "body2",
406
+ children: l.value
407
+ }), /* @__PURE__ */ e(ie, {
408
+ "aria-label": i.mobile_devices_edit_label,
409
+ color: "secondary",
410
+ onClick: () => n(l.row),
411
+ children: /* @__PURE__ */ e(q, { name: "edit" })
412
+ })]
413
+ }),
414
+ sortable: !0,
415
+ flex: 1,
416
+ minWidth: 200
417
+ },
418
+ {
419
+ field: "device_type",
420
+ headerName: i.mobile_devices_column_type,
421
+ renderHeader: X,
422
+ sortable: !0,
423
+ hideSortIcons: !1,
424
+ flex: 1,
425
+ minWidth: 150
426
+ },
427
+ {
428
+ field: "created_at",
429
+ headerName: i.mobile_devices_column_added,
430
+ renderHeader: X,
431
+ valueFormatter: (l) => ve(be(l), { addSuffix: !0 }),
432
+ sortable: !0,
433
+ hideSortIcons: !1,
434
+ flex: 1,
435
+ minWidth: 150
436
+ },
437
+ {
438
+ field: "delete",
439
+ headerName: "",
440
+ renderHeader: X,
441
+ renderCell: (l) => /* @__PURE__ */ e(m, {
442
+ mr: 4,
443
+ children: /* @__PURE__ */ e(ie, {
444
+ "aria-label": i.mobile_devices_delete_label,
445
+ color: "secondary",
446
+ onClick: () => o(l.row),
447
+ children: /* @__PURE__ */ e(q, { name: "delete" })
448
+ })
449
+ }),
450
+ sortable: !1,
451
+ hideSortIcons: !1,
452
+ width: 58
453
+ }
454
+ ],
455
+ disableColumnFilter: !0,
456
+ disableColumnMenu: !0,
457
+ disableRowSelectionOnClick: !0,
458
+ rows: u.useMemo(() => t.map((l) => ({
459
+ id: l.guid,
460
+ ...l,
461
+ device_type: `${l.make} ${l.model}`
462
+ })), [t]),
463
+ slotProps: { footer: { sx: { justifyContent: "flex-end" } } },
464
+ slots: { footer: () => /* @__PURE__ */ e(G, {
465
+ sx: {
466
+ backgroundColor: a.palette.background.default,
467
+ display: "flex",
468
+ justifyContent: "flex-end",
469
+ alignItems: "center",
470
+ p: "12px 16px"
471
+ },
472
+ children: /* @__PURE__ */ e(y, {
473
+ color: a.palette.text.secondary,
474
+ variant: "body2",
475
+ children: H(i.mobile_devices_count, /* @__PURE__ */ e("b", { children: t.length }), /* @__PURE__ */ e("b", { children: t.length }))
476
+ })
477
+ }) },
478
+ sx: {
479
+ border: "1px solid",
480
+ borderColor: a.palette.neutral.light,
481
+ borderRadius: "8px",
482
+ "& .MuiDataGrid-columnHeader .MuiIconButton-root": {
483
+ color: a.palette.primary.main,
484
+ "&:hover": { backgroundColor: Z(a.palette.primary.main, 0.1) }
485
+ },
486
+ "& .MuiDataGrid-sortIcon": { color: a.palette.primary.main }
487
+ }
488
+ })
489
+ });
490
+ }, ut = ({ devices: t, onClickDeviceEdit: n, onClickDeviceDelete: o }) => {
491
+ const a = L(), { settings: i } = T(), [l, r] = u.useState(!1), s = (d) => (h, p) => {
492
+ r(p ? d : !1);
493
+ };
494
+ return /* @__PURE__ */ c(m, {
495
+ mx: -28,
496
+ sx: { "& .MuiAccordion-root": {
497
+ mb: 0,
498
+ mt: 0
499
+ } },
500
+ children: [t.map((d) => /* @__PURE__ */ c(at, {
501
+ expanded: l === d.guid,
502
+ onChange: s(d.guid),
503
+ sx: { boxShadow: "none" },
504
+ children: [/* @__PURE__ */ e(rt, {
505
+ expandIcon: /* @__PURE__ */ e(q, {
506
+ color: "secondary",
507
+ name: "keyboard_arrow_down",
508
+ size: 24
509
+ }),
510
+ sx: {
511
+ padding: "14px 24px",
512
+ borderBottom: "1px solid",
513
+ borderColor: a.palette.divider
514
+ },
515
+ children: /* @__PURE__ */ c(m, {
516
+ gap: 4,
517
+ children: [
518
+ /* @__PURE__ */ e(y, {
519
+ bold: !0,
520
+ variant: "body1",
521
+ children: d.name
522
+ }),
523
+ /* @__PURE__ */ e(y, {
524
+ color: a.palette.text.secondary,
525
+ variant: "body2",
526
+ children: `${d.make} ${d.model}`
527
+ }),
528
+ /* @__PURE__ */ e(y, {
529
+ color: a.palette.text.secondary,
530
+ variant: "body2",
531
+ children: ve(be(d.created_at), { addSuffix: !0 })
532
+ })
533
+ ]
534
+ })
535
+ }), /* @__PURE__ */ c(st, {
536
+ sx: {
537
+ backgroundColor: a.palette.background.default,
538
+ p: "0 0 0 24px"
539
+ },
540
+ children: [/* @__PURE__ */ c(m, {
541
+ onClick: () => n(d),
542
+ sx: {
543
+ alignItems: "center",
544
+ flexDirection: "row",
545
+ width: "100%",
546
+ gap: 12,
547
+ py: 16,
548
+ cursor: "pointer",
549
+ borderBottom: "1px solid",
550
+ borderColor: a.palette.divider
551
+ },
552
+ children: [/* @__PURE__ */ e(ie, {
553
+ "aria-label": i.mobile_devices_edit_label,
554
+ color: "secondary",
555
+ children: /* @__PURE__ */ e(q, { name: "edit" })
556
+ }), /* @__PURE__ */ e(y, {
557
+ variant: "body1",
558
+ children: i.mobile_devices_edit_label
559
+ })]
560
+ }), /* @__PURE__ */ c(m, {
561
+ onClick: () => o(d),
562
+ sx: {
563
+ alignItems: "center",
564
+ flexDirection: "row",
565
+ width: "100%",
566
+ gap: 12,
567
+ py: 16,
568
+ cursor: "pointer"
569
+ },
570
+ children: [/* @__PURE__ */ e(ie, {
571
+ "aria-label": i.mobile_devices_delete_label,
572
+ color: "secondary",
573
+ children: /* @__PURE__ */ e(q, { name: "delete" })
574
+ }), /* @__PURE__ */ e(y, {
575
+ variant: "body1",
576
+ children: i.mobile_devices_delete_label
577
+ })]
578
+ })]
579
+ })]
580
+ }, d.guid)), /* @__PURE__ */ e(G, {
581
+ sx: {
582
+ backgroundColor: a.palette.background.default,
583
+ borderTop: "1px solid",
584
+ borderColor: a.palette.divider,
585
+ p: "12px 16px"
586
+ },
587
+ children: /* @__PURE__ */ e(y, {
588
+ color: a.palette.text.secondary,
589
+ variant: "body2",
590
+ children: H(i.mobile_devices_count, /* @__PURE__ */ e("b", { children: t.length }), /* @__PURE__ */ e("b", { children: t.length }))
591
+ })
592
+ })]
593
+ });
594
+ }, ht = ({ dialogType: t, isOpen: n, onClose: o, device: a, deviceToken: i = "" }) => {
595
+ const l = L(), { common: r, settings: s } = T(), { updateDevice: d, deleteDevice: h, setAlert: p, loadDevices: _ } = P(), [f, g] = u.useState("");
596
+ u.useEffect(() => {
597
+ a && g(a.name);
598
+ }, [a, t]);
599
+ const b = () => {
600
+ switch (t) {
601
+ case k.Edit:
602
+ return s.mobile_devices_edit_label;
603
+ case k.Delete:
604
+ return s.mobile_devices_delete_label;
605
+ default:
606
+ return "";
607
+ }
608
+ }, D = () => {
609
+ switch (t) {
610
+ case k.Token:
611
+ return r.done_button;
612
+ case k.Edit:
613
+ return r.save_button;
614
+ case k.Delete:
615
+ return r.delete_button;
616
+ default:
617
+ return "";
618
+ }
619
+ }, S = () => {
620
+ const v = { "& .MuiDialogContent-root": {
621
+ width: 400,
622
+ pt: 0
623
+ } };
624
+ return t === k.Token ? {
625
+ ...v,
626
+ "& .MuiToolbar-root:last-child": {
627
+ padding: "32px 60px 48px",
628
+ justifyContent: "center"
629
+ },
630
+ "& .MuiButton-root:first-child": { display: "none" },
631
+ "& .MuiButton-root:last-child": { flex: 1 }
632
+ } : {
633
+ ...v,
634
+ "& .MuiToolbar-root:last-child": {
635
+ gap: 8,
636
+ padding: 24,
637
+ justifyContent: "flex-end"
638
+ },
639
+ ...t === k.Delete && { "& .MuiTypography-body1": { padding: 0 } }
640
+ };
641
+ }, w = async () => {
642
+ t === k.Token && o(), t === k.Edit && a && ((await d({
643
+ ...a,
644
+ name: f
645
+ })).success ? (p(s.mobile_devices_edit_success, "success"), _()) : p(H(s.mobile_devices_edit_error, a.name), "error"), o()), t === k.Delete && a && ((await h(a.guid)).success ? (p(H(s.mobile_devices_delete_success, a.name), "success"), _()) : p(H(s.mobile_devices_delete_error, a.name), "error"), o());
646
+ };
647
+ return /* @__PURE__ */ c(R, {
648
+ copy: { title: b() },
649
+ isOpen: n,
650
+ onClose: o,
651
+ onPrimaryAction: w,
652
+ onSecondaryAction: o,
653
+ primaryColor: t === k.Delete ? "error" : void 0,
654
+ primaryText: D(),
655
+ secondaryText: t === k.Token ? r.back : r.cancel_button,
656
+ sx: S(),
657
+ children: [
658
+ t === k.Token && /* @__PURE__ */ c(m, {
659
+ spacing: 16,
660
+ sx: {
661
+ px: 40,
662
+ textAlign: "center",
663
+ width: "100%"
664
+ },
665
+ children: [
666
+ /* @__PURE__ */ e(y, {
667
+ bold: !0,
668
+ truncate: !1,
669
+ variant: "body1",
670
+ children: s.mobile_devices_access_label
671
+ }),
672
+ /* @__PURE__ */ e(y, {
673
+ truncate: !1,
674
+ variant: "body2",
675
+ children: s.mobile_devices_access_info_1
676
+ }),
677
+ /* @__PURE__ */ e(W, {
678
+ sx: {
679
+ border: `1px solid ${l.palette.neutral.light}`,
680
+ borderRadius: "4px",
681
+ p: "16px 32px"
682
+ },
683
+ variant: "h1",
684
+ children: i
685
+ }),
686
+ /* @__PURE__ */ e(y, {
687
+ truncate: !1,
688
+ variant: "body2",
689
+ children: s.mobile_devices_access_info_2
690
+ })
691
+ ]
692
+ }),
693
+ t === k.Edit && /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(M, {
694
+ onChange: (v) => g(v.target.value),
695
+ value: f
696
+ }) }),
697
+ t === k.Delete && /* @__PURE__ */ e(W, { children: s.mobile_devices_delete_info })
698
+ ]
699
+ });
700
+ }, _t = x(ht), pt = x(() => {
701
+ const { isMobile: t } = j(), { settings: n } = T(), { isCopyLoaded: o, isInitialized: a } = me(), { setAlert: i, devices: l, loadDevices: r, generateDeviceToken: s } = P(), [d, h] = u.useState({
702
+ open: !1,
703
+ type: ""
704
+ }), [p, _] = u.useState(), [f, g] = u.useState("");
705
+ u.useEffect(() => {
706
+ a && r();
707
+ }, [a]);
708
+ const b = async () => {
709
+ const v = await s();
710
+ v ? (g(v), h({
711
+ open: !0,
712
+ type: k.Token
713
+ })) : i(n.mobile_devices_access_error, "error");
714
+ }, D = (v) => {
715
+ _(v), h({
716
+ open: !0,
717
+ type: k.Edit
718
+ });
719
+ }, S = (v) => {
720
+ _(v), h({
721
+ open: !0,
722
+ type: k.Delete
723
+ });
724
+ }, w = () => {
725
+ h({
726
+ open: !1,
727
+ type: ""
728
+ }), _(void 0);
729
+ };
730
+ return !o || !a ? /* @__PURE__ */ e(ue, {}) : /* @__PURE__ */ c(m, {
731
+ sx: {
732
+ backgroundColor: "background.paper",
733
+ p: 24,
734
+ gap: 24
735
+ },
736
+ children: [
737
+ /* @__PURE__ */ c(m, {
738
+ gap: 4,
739
+ children: [/* @__PURE__ */ e(Y, { children: n.mobile_devices_title }), /* @__PURE__ */ e(W, {
740
+ variant: "body1",
741
+ children: n.mobile_devices_info
742
+ })]
743
+ }),
744
+ t ? /* @__PURE__ */ e(ut, {
745
+ devices: l,
746
+ onClickDeviceDelete: S,
747
+ onClickDeviceEdit: D
748
+ }) : /* @__PURE__ */ e(mt, {
749
+ devices: l,
750
+ onClickDeviceDelete: S,
751
+ onClickDeviceEdit: D
752
+ }),
753
+ /* @__PURE__ */ c(m, {
754
+ sx: {
755
+ alignItems: "center",
756
+ px: 24,
757
+ py: 12,
758
+ gap: 4
759
+ },
760
+ children: [
761
+ /* @__PURE__ */ e(y, {
762
+ bold: !0,
763
+ variant: "body1",
764
+ children: n.mobile_devices_access_title
765
+ }),
766
+ /* @__PURE__ */ e(W, {
767
+ align: "center",
768
+ variant: "body2",
769
+ children: n.mobile_devices_access_description
770
+ }),
771
+ /* @__PURE__ */ e(Q, {
772
+ onClick: b,
773
+ variant: "text",
774
+ children: n.mobile_devices_access_cta
775
+ })
776
+ ]
777
+ }),
778
+ /* @__PURE__ */ e(_t, {
779
+ device: p,
780
+ deviceToken: f,
781
+ dialogType: d.type,
782
+ isOpen: d.open,
783
+ onClose: w
784
+ })
785
+ ]
786
+ });
787
+ }), he = x(({ onClick: t, primaryText: n, secondaryText: o, sx: a }) => /* @__PURE__ */ e(ee, {
788
+ sx: { bgcolor: L().palette.background.paper },
789
+ children: /* @__PURE__ */ c(te, {
790
+ alignItems: "flex-start",
791
+ onClick: t,
792
+ sx: a,
793
+ children: [/* @__PURE__ */ e(ne, {
794
+ primary: n,
795
+ secondary: o
796
+ }), /* @__PURE__ */ e(Qe, { children: /* @__PURE__ */ e(O, {}) })]
797
+ })
798
+ })), ft = x(() => {
799
+ const { settings: t } = T(), { categories: n } = oe(), { selectedRule: o, updateRuleCategory: a } = P(), [i, l] = u.useState(!1), r = () => {
800
+ l(!1);
801
+ }, s = () => {
802
+ l(!0);
803
+ }, d = (p) => n.find((_) => _.guid === p)?.name, h = async (p) => {
804
+ o && o.category_guid !== p && (o.category_guid = p, await a(o)), r();
805
+ };
806
+ return /* @__PURE__ */ c(u.Fragment, { children: [/* @__PURE__ */ e(he, {
807
+ onClick: s,
808
+ primaryText: o?.category_guid ? d(o.category_guid) : "",
809
+ secondaryText: t.category
810
+ }), /* @__PURE__ */ e(Be, {
811
+ initialSelected: o?.category_guid ? o.category_guid : void 0,
812
+ onClose: r,
813
+ onSelect: h,
814
+ showDrawer: i,
815
+ title: t.select_category
816
+ })] });
817
+ }), gt = x(() => {
818
+ const { common: t, settings: n } = T(), { selectedRule: o, updateRulePayee: a } = P(), i = L(), [l, r] = u.useState(!1), s = o?.description ? o.description : o?.match_description, [d, h] = u.useState(s || ""), p = () => {
819
+ r(!0);
820
+ }, _ = async () => {
821
+ d !== s && o && (o.description = d, await a(o), r(!1));
822
+ };
823
+ return /* @__PURE__ */ c(u.Fragment, { children: [/* @__PURE__ */ e(he, {
824
+ onClick: p,
825
+ primaryText: s,
826
+ secondaryText: n.payee
827
+ }), /* @__PURE__ */ e(R, {
828
+ copy: { title: n.edit_payee },
829
+ isOpen: l,
830
+ onClose: () => r(!1),
831
+ onPrimaryAction: _,
832
+ onSecondaryAction: () => r(!1),
833
+ primaryText: t.save_button,
834
+ secondaryText: t.cancel_button,
835
+ sx: {
836
+ "& .MuiDialogContent-root": {
837
+ pt: 0,
838
+ width: 400
839
+ },
840
+ path: { fill: i.palette.secondary.darker }
841
+ },
842
+ children: /* @__PURE__ */ e(M, {
843
+ onChange: (f) => h(f.target.value),
844
+ sx: { width: 352 },
845
+ value: d
846
+ })
847
+ })] });
848
+ }), bt = x(({ onClose: t, onDelete: n, isOpen: o }) => {
849
+ const { common: a, settings: i } = T();
850
+ return /* @__PURE__ */ e(R, {
851
+ copy: { title: i.delete_rule },
852
+ isOpen: o,
853
+ onClose: t,
854
+ onPrimaryAction: n,
855
+ onSecondaryAction: t,
856
+ primaryColor: "error",
857
+ primaryText: a.delete_button,
858
+ secondaryColor: "secondary",
859
+ secondaryText: a.cancel_button,
860
+ sx: { "& .MuiDialogContent-root": {
861
+ pt: 0,
862
+ width: 400
863
+ } },
864
+ children: /* @__PURE__ */ e(y, {
865
+ truncate: !1,
866
+ variant: "body2",
867
+ children: i.delete_rule_confirm
868
+ })
869
+ });
870
+ }), yt = x(({ isOpen: t, onClose: n, onDelete: o }) => {
871
+ const { common: a, settings: i } = T(), [l, r] = u.useState(!1);
872
+ return /* @__PURE__ */ c(ce, {
873
+ hasSecondaryAction: !1,
874
+ isOpen: t,
875
+ onClose: n,
876
+ onPrimaryAction: () => {
877
+ r(!0);
878
+ },
879
+ primaryColor: "error",
880
+ primaryText: a.delete_button,
881
+ title: i.edit_rule,
882
+ children: [
883
+ /* @__PURE__ */ e(Xe, { children: /* @__PURE__ */ e(y, {
884
+ bold: !0,
885
+ variant: "caption",
886
+ children: i.details
887
+ }) }),
888
+ /* @__PURE__ */ e(gt, {}),
889
+ /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
890
+ /* @__PURE__ */ e(ft, {}),
891
+ /* @__PURE__ */ e(E, { sx: { ml: 24 } }),
892
+ /* @__PURE__ */ e(bt, {
893
+ isOpen: l,
894
+ onClose: () => r(!1),
895
+ onDelete: o
896
+ })
897
+ ]
898
+ });
899
+ }), xt = x(({ rule: t }) => {
900
+ const { categories: n } = oe(), { setSelectedGuid: o } = Re(), { deleteTransactionRule: a, setSelectedRule: i } = P(), { isDesktop: l, isTablet: r } = j(), [s, d] = u.useState(!1), h = () => {
901
+ d(!1), o(null), i(void 0);
902
+ }, p = async () => {
903
+ await a(), h();
904
+ }, _ = () => {
905
+ d(!0), i(t);
906
+ }, f = (g) => n.find((b) => b.guid === g)?.name;
907
+ return /* @__PURE__ */ c(u.Fragment, { children: [
908
+ /* @__PURE__ */ e(he, {
909
+ onClick: _,
910
+ primaryText: t.description ? t.description : t.match_description,
911
+ secondaryText: t.category_guid ? f(t.category_guid) : ""
912
+ }),
913
+ /* @__PURE__ */ e(E, { sx: { ml: r || l ? 0 : 24 } }),
914
+ /* @__PURE__ */ e(yt, {
915
+ isOpen: s,
916
+ onClose: h,
917
+ onDelete: p
918
+ })
919
+ ] });
920
+ }), Te = x(() => {
921
+ const { settings: t } = T(), { loadTransactionRules: n, transactionRules: o } = P(), [a, i] = u.useState(!1);
922
+ return de({
923
+ widgetName: "TransactionRulesTab",
924
+ isLoaded: a
925
+ }), u.useEffect(() => {
926
+ n().finally(() => i(!0));
927
+ }, []), /* @__PURE__ */ c(m, {
928
+ sx: {
929
+ gap: 24,
930
+ py: 24
931
+ },
932
+ children: [/* @__PURE__ */ c(m, {
933
+ sx: { px: 24 },
934
+ children: [/* @__PURE__ */ e(Y, { children: t.transaction_rules_label }), /* @__PURE__ */ e(W, {
935
+ variant: "body1",
936
+ children: t.transaction_rules_description
937
+ })]
938
+ }), /* @__PURE__ */ e($, { children: o.map((l, r) => /* @__PURE__ */ e(xt, { rule: l }, r)) })]
939
+ });
940
+ }), vt = x(({ onProfileUpdated: t, profile: n }) => {
941
+ const { common: o, recurring: a, settings: i } = T(), { updateAccount: l } = ge(), r = n.notification_type === Ne.DebtPaymentReminder, [s, d] = u.useState(!1), [h, p] = u.useState(n.threshold || 0), [_, f] = u.useState(n.account?.day_payment_is_due || 0), g = n.account?.name || n.account?.feed_name || "", b = n.account?.day_payment_is_due ? H(i.notification_debt_payment_date, Me(n.account?.day_payment_is_due)) : i.notification_debt_payment_zero_state, D = r ? b : Ee(n.threshold ?? 0, "0,0"), S = async () => {
942
+ r && n.account ? await l({
943
+ ...n.account,
944
+ day_payment_is_due: _
945
+ }) : t({
946
+ ...n,
947
+ threshold: h
948
+ });
949
+ };
950
+ return /* @__PURE__ */ c(m, { children: [/* @__PURE__ */ e(le, {
951
+ avatar: n.account?.institution_guid ? /* @__PURE__ */ e(He, {
952
+ alt: n.label,
953
+ institutionGuid: n.account?.institution_guid
954
+ }) : void 0,
955
+ endIcon: /* @__PURE__ */ e(O, {}),
956
+ isChecked: n.is_enabled,
957
+ isDisabled: !n.is_enabled,
958
+ isPrimaryTextBold: !0,
959
+ onClick: () => d(!0),
960
+ onToggle: () => t({
961
+ ...n,
962
+ is_enabled: !n.is_enabled
963
+ }),
964
+ primaryText: g,
965
+ secondaryText: n.is_enabled ? D : i.notification_disabled
966
+ }), /* @__PURE__ */ e(R, {
967
+ copy: {
968
+ title: r ? a.day_of_the_month : i.notification_threshold_label,
969
+ close_aria: o.close_aria
970
+ },
971
+ disablePrimaryButton: r && _ === 0,
972
+ isOpen: s,
973
+ onClose: () => d(!1),
974
+ onPrimaryAction: S,
975
+ primaryText: o.save_button,
976
+ children: r ? /* @__PURE__ */ e(xe, {
977
+ dateAdapter: ye,
978
+ children: /* @__PURE__ */ e(Ze, {
979
+ maxDate: We(/* @__PURE__ */ new Date()),
980
+ minDate: ze(/* @__PURE__ */ new Date()),
981
+ onChange: (w) => {
982
+ f(w.getDate());
983
+ },
984
+ slots: {
985
+ leftArrowIcon: () => null,
986
+ rightArrowIcon: () => null
987
+ },
988
+ sx: { "& .MuiPickersDay-today": { color: "primary.main" } },
989
+ views: ["day"]
990
+ })
991
+ }) : /* @__PURE__ */ e(Oe, {
992
+ amount: h,
993
+ autoFocus: !0,
994
+ fullWidth: !0,
995
+ minAmount: 0,
996
+ setAmount: (w) => p(Number(w) || 0),
997
+ sx: { ".MuiTypography-body1": { p: 0 } }
998
+ })
999
+ })] });
1000
+ }), Ct = x(({ onUpdateProfile: t, profile: n }) => {
1001
+ const { settings: o } = T(), { user: a } = U(), { clientCommunicationProfile: i, userCommunicationsProfile: l } = P(), { isMobile: r } = j(), s = n.notification_type > 2, { opted_out_of_email_notifications: d, opted_out_of_push_notifications: h, opted_out_of_sms_notifications: p } = l, { email_notifications_enabled: _, push_notifications_enabled: f, sms_notifications_enabled: g } = i;
1002
+ return /* @__PURE__ */ c(m, { children: [(_ || g || f) && /* @__PURE__ */ c(z, { children: [/* @__PURE__ */ e(y, {
1003
+ bold: !0,
1004
+ sx: {
1005
+ mb: 4,
1006
+ ml: 24,
1007
+ mt: 12
1008
+ },
1009
+ variant: "caption",
1010
+ children: o.delivery_method_title
1011
+ }), /* @__PURE__ */ c($, {
1012
+ sx: { bgcolor: "background.paper" },
1013
+ children: [
1014
+ _ && /* @__PURE__ */ e(m, {
1015
+ sx: { pl: 24 },
1016
+ children: /* @__PURE__ */ e(N, {
1017
+ isChecked: !d && n.email_channel && !!a.email,
1018
+ isDisabled: d || !a.email,
1019
+ onToggle: () => t({
1020
+ ...n,
1021
+ email_channel: !n.email_channel
1022
+ }),
1023
+ primaryText: o.delivery_method_email_label,
1024
+ secondaryText: d || !n.email_channel || !a.email ? o.notification_disabled : o.notification_enabled,
1025
+ useExtraPadding: !1
1026
+ })
1027
+ }),
1028
+ _ && (g || f) && /* @__PURE__ */ e(E, { sx: { ml: r ? 0 : 24 } }),
1029
+ g && /* @__PURE__ */ e(m, {
1030
+ sx: { pl: 24 },
1031
+ children: /* @__PURE__ */ e(N, {
1032
+ isChecked: !p && n.sms_channel && !!a.phone,
1033
+ isDisabled: p || !a.phone,
1034
+ onToggle: () => t({
1035
+ ...n,
1036
+ sms_channel: !n.sms_channel
1037
+ }),
1038
+ primaryText: `${o.delivery_method_sms_label}`,
1039
+ secondaryText: p || !n.sms_channel || !a.phone ? o.notification_disabled : o.notification_enabled,
1040
+ useExtraPadding: !1
1041
+ })
1042
+ }),
1043
+ g && f && /* @__PURE__ */ e(E, { sx: { ml: r ? 0 : 24 } }),
1044
+ f && /* @__PURE__ */ e(m, {
1045
+ sx: { pl: 24 },
1046
+ children: /* @__PURE__ */ e(N, {
1047
+ isChecked: !h && n.push_channel,
1048
+ isDisabled: h,
1049
+ onToggle: () => t({
1050
+ ...n,
1051
+ push_channel: !n.push_channel
1052
+ }),
1053
+ primaryText: o.delivery_method_push_label,
1054
+ secondaryText: o.delivery_method_push_subtitle,
1055
+ useExtraPadding: !1
1056
+ })
1057
+ }),
1058
+ /* @__PURE__ */ e(E, {})
1059
+ ]
1060
+ })] }), s && !!n.children?.length && /* @__PURE__ */ c(m, { children: [/* @__PURE__ */ e(y, {
1061
+ bold: !0,
1062
+ sx: {
1063
+ mb: 4,
1064
+ ml: 24,
1065
+ mt: 12
1066
+ },
1067
+ variant: "caption",
1068
+ children: o.accounts_threshold_title
1069
+ }), /* @__PURE__ */ e($, {
1070
+ sx: { bgcolor: "background.paper" },
1071
+ children: n.children?.map((b) => /* @__PURE__ */ e(vt, {
1072
+ onProfileUpdated: t,
1073
+ profile: b
1074
+ }, b.guid))
1075
+ })] })] });
1076
+ }), _e = x(() => {
1077
+ const { accountProfiles: t, updateNotificationProfile: n } = P(), [o, a] = u.useState(""), i = u.useMemo(() => t.find((s) => s.guid === o), [t, o]), l = async (s) => {
1078
+ await n({
1079
+ ...s,
1080
+ is_enabled: !s.is_enabled
1081
+ });
1082
+ }, r = async (s) => {
1083
+ await n(s);
1084
+ };
1085
+ return /* @__PURE__ */ c(m, {
1086
+ sx: { backgroundColor: "background.paper" },
1087
+ children: [t.filter((s) => s.children && s.children.length > 0).map((s) => /* @__PURE__ */ e(le, {
1088
+ endIcon: /* @__PURE__ */ e(O, {}),
1089
+ isChecked: s.is_enabled,
1090
+ isDisabled: !s.is_enabled,
1091
+ onClick: () => a(s.guid),
1092
+ onToggle: () => l(s),
1093
+ primaryText: s.label,
1094
+ secondaryText: s.is_enabled ? s.deliveryMethodsLabel : void 0
1095
+ }, s.guid)), /* @__PURE__ */ e(ce, {
1096
+ isOpen: !!i,
1097
+ onClose: () => a(""),
1098
+ title: i ? i.label : "",
1099
+ children: i && /* @__PURE__ */ e(Ct, {
1100
+ onUpdateProfile: r,
1101
+ profile: i
1102
+ })
1103
+ })]
1104
+ });
1105
+ }), we = x(({ profile: t }) => {
1106
+ const { settings: n } = T(), { clientCommunicationProfile: { email_notifications_enabled: o, push_notifications_enabled: a, sms_notifications_enabled: i }, updateNotificationProfile: l, userCommunicationsProfile: { opted_out_of_email_notifications: r, opted_out_of_push_notifications: s, opted_out_of_sms_notifications: d } } = P(), { user: h } = U(), [p, _] = u.useState(!1), f = async () => {
1107
+ await g({
1108
+ ...t,
1109
+ is_enabled: !t.is_enabled
1110
+ }), t.is_enabled && _(!1);
1111
+ }, g = async (D) => {
1112
+ await l(D);
1113
+ }, b = o || i || a;
1114
+ return /* @__PURE__ */ c($, {
1115
+ sx: { bgcolor: "background.paper" },
1116
+ children: [
1117
+ /* @__PURE__ */ e(le, {
1118
+ endIcon: b ? /* @__PURE__ */ e(Ge, { sx: {
1119
+ transition: "transform 0.3s ease-in-out",
1120
+ transform: p ? "rotate(180deg)" : "rotate(0deg)"
1121
+ } }) : void 0,
1122
+ isChecked: t.is_enabled,
1123
+ isDisabled: !t.is_enabled,
1124
+ onClick: () => _(!p),
1125
+ onToggle: () => f(),
1126
+ primaryText: t.label,
1127
+ secondaryText: t.is_enabled ? t.deliveryMethodsLabel : void 0
1128
+ }, t.guid),
1129
+ b && /* @__PURE__ */ e(it, {
1130
+ in: p,
1131
+ children: /* @__PURE__ */ c($, {
1132
+ sx: { bgcolor: "background.paper" },
1133
+ children: [
1134
+ o && /* @__PURE__ */ e(N, {
1135
+ isChecked: !r && t.email_channel && !!h.email,
1136
+ isDisabled: r || !h.email,
1137
+ onToggle: () => g({
1138
+ ...t,
1139
+ email_channel: !t.email_channel
1140
+ }),
1141
+ primaryText: n.delivery_method_email_label
1142
+ }),
1143
+ o && (i || a) && /* @__PURE__ */ e(E, { sx: { ml: 48 } }),
1144
+ i && /* @__PURE__ */ e(N, {
1145
+ isChecked: !d && t.sms_channel && !!h.phone,
1146
+ isDisabled: d || !h.phone,
1147
+ onToggle: () => g({
1148
+ ...t,
1149
+ sms_channel: !t.sms_channel
1150
+ }),
1151
+ primaryText: n.delivery_method_sms_label
1152
+ }),
1153
+ i && a && /* @__PURE__ */ e(E, { sx: { ml: 48 } }),
1154
+ a && /* @__PURE__ */ e(N, {
1155
+ isChecked: !s && t.push_channel,
1156
+ isDisabled: s,
1157
+ onToggle: () => g({
1158
+ ...t,
1159
+ push_channel: !t.push_channel
1160
+ }),
1161
+ primaryText: n.delivery_method_push_label
1162
+ })
1163
+ ]
1164
+ })
1165
+ }),
1166
+ /* @__PURE__ */ e(E, {})
1167
+ ]
1168
+ }, t.guid);
1169
+ }), pe = x(() => {
1170
+ const { budgetProfiles: t } = P();
1171
+ return /* @__PURE__ */ e(m, { children: t.map((n) => /* @__PURE__ */ e(we, { profile: n }, n.guid)) });
1172
+ }), Dt = x(() => {
1173
+ const { onEvent: t } = Ue(), { settings: n } = T(), { clientCommunicationProfile: o, updateUserCommunicationProfile: a, userCommunicationsProfile: i } = P(), { user: l } = U(), r = async (s, d) => {
1174
+ const h = {
1175
+ ...i,
1176
+ [s]: d
1177
+ };
1178
+ if (t) {
1179
+ const p = s.split("_")[3];
1180
+ d === !1 ? t("opt_in_notification_method", { notificationType: p }) : t("opt_out_notification_method", { notificationType: p });
1181
+ }
1182
+ await a(h);
1183
+ };
1184
+ return /* @__PURE__ */ c(m, { children: [
1185
+ /* @__PURE__ */ e(Y, {
1186
+ sx: { mt: 24 },
1187
+ children: n.delivery_method_title
1188
+ }),
1189
+ o.email_notifications_enabled && /* @__PURE__ */ c(z, { children: [/* @__PURE__ */ e(N, {
1190
+ isChecked: !!l.email && !i.opted_out_of_email_notifications,
1191
+ isDisabled: !l.email,
1192
+ onToggle: () => r("opted_out_of_email_notifications", !i.opted_out_of_email_notifications),
1193
+ primaryText: n.delivery_method_email_title,
1194
+ secondaryText: l.email && !i.opted_out_of_email_notifications ? n.notification_enabled : n.notification_disabled,
1195
+ useExtraPadding: !1
1196
+ }), (o.sms_notifications_enabled || o.push_notifications_enabled) && /* @__PURE__ */ e(E, {})] }),
1197
+ o.sms_notifications_enabled && /* @__PURE__ */ c(z, { children: [/* @__PURE__ */ e(N, {
1198
+ isChecked: !!l.phone && !i.opted_out_of_sms_notifications,
1199
+ isDisabled: !l.phone,
1200
+ onToggle: () => r("opted_out_of_sms_notifications", !i.opted_out_of_sms_notifications),
1201
+ primaryText: n.delivery_method_sms_title,
1202
+ secondaryText: l.phone && !i.opted_out_of_sms_notifications ? n.notification_enabled : n.notification_disabled,
1203
+ useExtraPadding: !1
1204
+ }), o.push_notifications_enabled && /* @__PURE__ */ e(E, {})] }),
1205
+ o.push_notifications_enabled && /* @__PURE__ */ e(N, {
1206
+ isChecked: !i.opted_out_of_push_notifications,
1207
+ isDisabled: !0,
1208
+ onToggle: () => {
1209
+ },
1210
+ primaryText: n.delivery_method_push_title,
1211
+ secondaryText: n.delivery_method_push_subtitle,
1212
+ useExtraPadding: !1
1213
+ }),
1214
+ o.sms_notifications_enabled && /* @__PURE__ */ e(Ke, {
1215
+ sx: {
1216
+ backgroundColor: "background.default",
1217
+ mt: 12
1218
+ },
1219
+ variant: "outlined",
1220
+ children: /* @__PURE__ */ e(qe, { children: /* @__PURE__ */ c(m, {
1221
+ alignItems: "flex-start",
1222
+ direction: "row",
1223
+ gap: 6,
1224
+ children: [/* @__PURE__ */ e($e, {
1225
+ color: "primary",
1226
+ filled: !0
1227
+ }), /* @__PURE__ */ e(y, {
1228
+ variant: "caption",
1229
+ children: n.delivery_method_sms_note_1
1230
+ })]
1231
+ }) })
1232
+ })
1233
+ ] });
1234
+ }), fe = x(() => {
1235
+ const { insightsProfiles: t } = P();
1236
+ return /* @__PURE__ */ e(m, { children: t.map((n) => /* @__PURE__ */ e(we, { profile: n }, n.guid)) });
1237
+ }), Tt = () => {
1238
+ const { config: t } = J(), [n, { width: o }] = Ve(), { common: a, settings: i } = T(), { updateUser: l } = P(), { user: r } = U(), [s, d] = u.useState(!1), [h, p] = u.useState({
1239
+ email: r.email,
1240
+ phone: r.phone
1241
+ }), _ = h.email && !r.email_is_verified && !s, f = h.phone && !r.phone_is_verified && !s, g = (D) => {
1242
+ const { name: S, value: w } = D.target, v = {
1243
+ ...h,
1244
+ [S]: w
1245
+ };
1246
+ p(v), d(JSON.stringify({
1247
+ ...r,
1248
+ ...v
1249
+ }) !== JSON.stringify(r));
1250
+ }, b = async () => {
1251
+ await l({
1252
+ ...r,
1253
+ ...h
1254
+ }), d(!1);
1255
+ };
1256
+ return /* @__PURE__ */ c(m, {
1257
+ ref: n,
1258
+ children: [/* @__PURE__ */ e(E, {}), /* @__PURE__ */ c(m, {
1259
+ sx: { pt: 12 },
1260
+ children: [
1261
+ /* @__PURE__ */ e(Y, {
1262
+ sx: {
1263
+ lineHeight: "20px",
1264
+ pb: 4,
1265
+ pt: 16
1266
+ },
1267
+ children: i.personal_details
1268
+ }),
1269
+ /* @__PURE__ */ c(m, {
1270
+ sx: {
1271
+ flexDirection: o <= 768 ? "column" : "row",
1272
+ gap: 24,
1273
+ py: 16
1274
+ },
1275
+ children: [t.display_email_edit_field_in_settings && /* @__PURE__ */ c(m, {
1276
+ sx: {
1277
+ flex: 1,
1278
+ pb: 14
1279
+ },
1280
+ children: [/* @__PURE__ */ e(M, {
1281
+ defaultValue: r.email,
1282
+ fullWidth: !0,
1283
+ label: i.email_address,
1284
+ name: "email",
1285
+ onChange: g
1286
+ }), _ && /* @__PURE__ */ e(G, {
1287
+ sx: {
1288
+ height: 20,
1289
+ ".MuiButton-root": {
1290
+ px: 0,
1291
+ ":hover": { bgcolor: "transparent" }
1292
+ }
1293
+ },
1294
+ children: /* @__PURE__ */ e(Ce, {})
1295
+ })]
1296
+ }), t.display_sms_edit_field_in_settings && /* @__PURE__ */ c(m, {
1297
+ sx: {
1298
+ flex: 1,
1299
+ pb: 14
1300
+ },
1301
+ children: [/* @__PURE__ */ e(M, {
1302
+ defaultValue: r.phone,
1303
+ fullWidth: !0,
1304
+ label: i.mobile_number,
1305
+ name: "phone",
1306
+ onChange: g
1307
+ }), f && /* @__PURE__ */ e(G, {
1308
+ sx: {
1309
+ height: 20,
1310
+ ".MuiButton-root": {
1311
+ px: 0,
1312
+ ":hover": { bgcolor: "transparent" }
1313
+ }
1314
+ },
1315
+ children: /* @__PURE__ */ e(De, {})
1316
+ })]
1317
+ })]
1318
+ }),
1319
+ /* @__PURE__ */ e(Q, {
1320
+ disabled: !s,
1321
+ onClick: b,
1322
+ sx: { width: 84 },
1323
+ variant: "contained",
1324
+ children: a.save_button
1325
+ })
1326
+ ]
1327
+ })]
1328
+ });
1329
+ }, wt = x(Tt), se = x(({ notificationTypes: t = [A.Accounts, A.Budgets], showPersonalDetails: n = !1, view: o }) => {
1330
+ const { config: a } = J(), { settings: i } = T(), { isInitialized: l } = me(), { isAccountDataLoaded: r, loadAccountData: s } = ge(), { clientCommunicationProfile: d, loadNotificationProfiles: h } = P(), p = Le(), [_, f] = u.useState(!1), [g, b] = u.useState(void 0);
1331
+ if (t.length > 0 && p && t.push(A.Insights), de({
1332
+ widgetName: "NotificationSettingsWidget",
1333
+ isLoaded: _
1334
+ }), u.useEffect(() => {
1335
+ r || s().finally();
1336
+ }, []), u.useEffect(() => {
1337
+ l && h().finally(() => f(!0));
1338
+ }, [l]), !l) return /* @__PURE__ */ e(ue, {});
1339
+ let D = i.manage_account_notifications;
1340
+ g === A.Budgets ? D = i.manage_budget_notifications : g === A.Insights && (D = i.manage_insights_notifications);
1341
+ const { email_notifications_enabled: S, sms_notifications_enabled: w, push_notifications_enabled: v } = d, I = S || w || v;
1342
+ if (o === "accounts") return /* @__PURE__ */ e(_e, {});
1343
+ if (o === "budgets") return /* @__PURE__ */ e(pe, {});
1344
+ if (o === "insights") return /* @__PURE__ */ e(fe, {});
1345
+ const V = a.display_email_edit_field_in_settings || a.display_sms_edit_field_in_settings, ae = n && d.can_edit_contact_info && V;
1346
+ return /* @__PURE__ */ c(m, {
1347
+ sx: { pt: I ? 0 : 24 },
1348
+ children: [
1349
+ /* @__PURE__ */ c(m, {
1350
+ sx: { px: 24 },
1351
+ children: [I && /* @__PURE__ */ c(z, { children: [/* @__PURE__ */ e(Dt, {}), /* @__PURE__ */ e(E, { sx: { my: 24 } })] }), /* @__PURE__ */ e(Y, {
1352
+ sx: { mb: 4 },
1353
+ children: i.notification_types_title
1354
+ })]
1355
+ }),
1356
+ /* @__PURE__ */ c($, { children: [
1357
+ t.includes(A.Accounts) && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ c(te, {
1358
+ onClick: () => b(A.Accounts),
1359
+ children: [/* @__PURE__ */ e(ne, {
1360
+ primary: i.accounts_title,
1361
+ secondary: i.accounts_subtitle
1362
+ }), /* @__PURE__ */ e(O, {})]
1363
+ }) }),
1364
+ t.includes(A.Budgets) && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ c(te, {
1365
+ onClick: () => b(A.Budgets),
1366
+ children: [/* @__PURE__ */ e(ne, {
1367
+ primary: i.budgets_title,
1368
+ secondary: i.budgets_subtitle
1369
+ }), /* @__PURE__ */ e(O, {})]
1370
+ }) }),
1371
+ t.includes(A.Insights) && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ c(te, {
1372
+ onClick: () => b(A.Insights),
1373
+ children: [/* @__PURE__ */ e(ne, {
1374
+ primary: i.insights_title,
1375
+ secondary: i.insights_subtitle
1376
+ }), /* @__PURE__ */ e(O, {})]
1377
+ }) })
1378
+ ] }),
1379
+ ae && /* @__PURE__ */ e(m, {
1380
+ sx: { px: 24 },
1381
+ children: /* @__PURE__ */ e(wt, {})
1382
+ }),
1383
+ /* @__PURE__ */ e(ce, {
1384
+ isOpen: !!g,
1385
+ onClose: () => b(void 0),
1386
+ title: D,
1387
+ children: /* @__PURE__ */ c(m, { children: [
1388
+ g === A.Accounts && /* @__PURE__ */ e(_e, {}),
1389
+ g === A.Budgets && /* @__PURE__ */ e(pe, {}),
1390
+ g === A.Insights && /* @__PURE__ */ e(fe, {})
1391
+ ] })
1392
+ })
1393
+ ]
1394
+ });
1395
+ }), kt = x(({ selectedTab: t }) => {
1396
+ const { alert: n, setAlert: o } = P(), { config: { display_user_profile_in_settings: a } } = J();
1397
+ return /* @__PURE__ */ c(z, { children: [
1398
+ t === K.Profile && /* @__PURE__ */ e(dt, {}),
1399
+ t === K.Devices && /* @__PURE__ */ e(pt, {}),
1400
+ t === K.Notifications && /* @__PURE__ */ e(se, { showPersonalDetails: !a }),
1401
+ t === K.TransactionRules && /* @__PURE__ */ e(Te, {}),
1402
+ t === K.Help && /* @__PURE__ */ e(m, {
1403
+ sx: { px: 24 },
1404
+ children: /* @__PURE__ */ e(Fe, {})
1405
+ }),
1406
+ /* @__PURE__ */ e(nt, {
1407
+ anchorOrigin: {
1408
+ vertical: "bottom",
1409
+ horizontal: "right"
1410
+ },
1411
+ autoHideDuration: 3500,
1412
+ onClose: () => o(""),
1413
+ open: !!n.message,
1414
+ children: /* @__PURE__ */ e(et, {
1415
+ onClose: () => {
1416
+ o("");
1417
+ },
1418
+ severity: n.severity,
1419
+ variant: "filled",
1420
+ children: n.message
1421
+ })
1422
+ })
1423
+ ] });
1424
+ }), K = /* @__PURE__ */ (function(t) {
1425
+ return 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;
1426
+ })({}), xn = x(({ onBackClick: t, onMenuClick: n, sx: o }) => {
1427
+ const { settings: a } = T(), { isCopyLoaded: i, isInitialized: l } = me(), { config: r } = J(), { isMobile: s } = j(), { categoriesLoaded: d, loadCategories: h } = oe();
1428
+ de({
1429
+ widgetName: "SettingsWidget",
1430
+ isLoaded: l && i
1431
+ }), u.useEffect(() => {
1432
+ d || h().finally();
1433
+ }, []);
1434
+ const { display_user_profile_in_settings: p, display_mobile_devices_in_settings: _, display_notification_settings_in_settings: f, display_user_transaction_rules_in_settings: g, show_help_widget_in_master: b } = r, D = [
1435
+ {
1436
+ enabled: p,
1437
+ index: 0,
1438
+ label: a?.profile_label
1439
+ },
1440
+ {
1441
+ enabled: _,
1442
+ index: 1,
1443
+ label: a?.mobile_devices_label
1444
+ },
1445
+ {
1446
+ enabled: f,
1447
+ index: 2,
1448
+ label: a?.notifications_label
1449
+ },
1450
+ {
1451
+ enabled: g,
1452
+ index: 3,
1453
+ label: a?.transaction_rules_label
1454
+ },
1455
+ {
1456
+ enabled: b,
1457
+ index: 4,
1458
+ label: a?.help_label
1459
+ }
1460
+ ], S = D.find((I) => I.enabled), [w, v] = u.useState(S ? S.index : -1);
1461
+ return !i || !l ? /* @__PURE__ */ e(ue, {}) : /* @__PURE__ */ e(re, {
1462
+ onBackClick: t,
1463
+ onMenuClick: n,
1464
+ showAccountFilter: !1,
1465
+ sx: {
1466
+ height: "calc(100dvh - 24px)",
1467
+ overflow: "auto",
1468
+ ...o
1469
+ },
1470
+ title: a.title,
1471
+ children: /* @__PURE__ */ c(m, {
1472
+ mx: s ? 0 : 48,
1473
+ my: 24,
1474
+ children: [/* @__PURE__ */ e(Je, {
1475
+ onChange: (I, V) => v(V),
1476
+ sx: { bgcolor: "background.paper" },
1477
+ textColor: "primary",
1478
+ value: w,
1479
+ variant: "scrollable",
1480
+ children: D.map((I) => I.enabled && /* @__PURE__ */ e(je, {
1481
+ label: I.label,
1482
+ value: I.index
1483
+ }, I.index))
1484
+ }), /* @__PURE__ */ e(kt, { selectedTab: w })]
1485
+ })
1486
+ });
1487
+ }), vn = x((t) => {
1488
+ const { clientConfig: n } = J(), o = n?.master?.deep_link_params?.view;
1489
+ return o ? /* @__PURE__ */ e(se, { view: o }) : /* @__PURE__ */ e(re, {
1490
+ ...t,
1491
+ showAccountFilter: !1,
1492
+ children: /* @__PURE__ */ e(m, {
1493
+ my: 24,
1494
+ children: /* @__PURE__ */ e(se, {})
1495
+ })
1496
+ });
1497
+ }), Cn = (t) => {
1498
+ const { isMobile: n } = j(), { categoriesLoaded: o, loadCategories: a } = oe();
1499
+ return u.useEffect(() => {
1500
+ o || a().finally();
1501
+ }), /* @__PURE__ */ e(re, {
1502
+ ...t,
1503
+ showAccountFilter: !1,
1504
+ children: /* @__PURE__ */ e(m, {
1505
+ sx: {
1506
+ mx: n ? 0 : 48,
1507
+ my: 24
1508
+ },
1509
+ children: /* @__PURE__ */ e(Te, {})
1510
+ })
1511
+ });
1512
+ };
1513
+ export {
1514
+ kt as a,
1515
+ pe as c,
1516
+ pt as d,
1517
+ dt as f,
1518
+ xn as i,
1519
+ _e as l,
1520
+ vn as n,
1521
+ se as o,
1522
+ K as r,
1523
+ fe as s,
1524
+ Cn as t,
1525
+ Te as u
1526
+ };