@luminix/mui-cms 0.2.4 → 0.2.5

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.
package/dist/mui-cms.js CHANGED
@@ -1,15 +1,15 @@
1
1
  var gr = Object.defineProperty;
2
2
  var br = (e, t, n) => t in e ? gr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var $e = (e, t, n) => br(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { Str as T, Obj as J, DateTime as Oe, Query as mn, Func as yr, MakeFacade as St, Reducible as gn, ServiceProvider as bn } from "@luminix/support";
5
- import { config as oe, collect as W, app as k, model as we, App as xt, Model as Re, Route as wr, Config as re } from "@luminix/core";
4
+ import { Str as k, Obj as J, DateTime as Oe, Query as mn, Func as yr, MakeFacade as St, Reducible as gn, ServiceProvider as bn } from "@luminix/support";
5
+ import { config as oe, collect as W, app as T, model as we, App as xt, Model as Re, Route as wr, Config as re } from "@luminix/core";
6
6
  import { jsx as i, jsxs as w, Fragment as B } from "react/jsx-runtime";
7
7
  import { Outlet as Sr, useParams as xr, useNavigate as At, useSearchParams as G, Link as Pe, Form as Ar } from "react-router-dom";
8
- import { useCollection as yn, PaginationProvider as Cr, usePagination as xe, ModelForm as Er, useApplyReducers as Ct, Forms as Tr, LuminixProvider as kr } from "@luminix/react";
9
- import { useMediaQuery as Me, Dialog as Et, DialogTitle as Tt, DialogContent as kt, DialogContentText as Dr, TextField as fe, DialogActions as Dt, Button as M, Snackbar as Or, Alert as Rr, IconButton as q, AlertTitle as Pr, Box as H, Unstable_Grid2 as Q, Fab as vr, SpeedDial as Fr, SpeedDialIcon as Lr, SpeedDialAction as Br, ButtonGroup as Ir, Popper as Mr, Grow as Nr, Paper as Ot, ClickAwayListener as jr, MenuList as Ur, MenuItem as se, AppBar as wn, Toolbar as qr, Typography as $, Drawer as Sn, Divider as ve, Autocomplete as _r, CircularProgress as Hr, Switch as zr, Stack as N, FormControl as at, InputLabel as it, Select as Fe, Badge as Rt, Popover as Vr, Link as lt, Collapse as xn, TableCell as ee, RadioGroup as $t, FormControlLabel as Ke, Radio as Ye, TableContainer as Wr, Table as $r, TableHead as Kr, TableRow as he, Checkbox as Pt, TableSortLabel as Yr, Skeleton as Kt, TableBody as Jr, TableFooter as Gr, Tabs as Zr, Tab as Yt, Breadcrumbs as Xr, List as Qr, ListItem as eo, ListItemButton as to, ListItemIcon as An, ListItemText as Cn, Menu as En, Avatar as no, CssBaseline as ro } from "@mui/material";
10
- import p, { useContext as Tn, useMemo as oo } from "react";
8
+ import { useCollection as yn, PaginationProvider as Cr, usePagination as xe, ModelForm as Er, useApplyReducers as Ct, Forms as kr, LuminixProvider as Tr } from "@luminix/react";
9
+ import { useMediaQuery as Me, Dialog as Et, DialogTitle as kt, DialogContent as Tt, DialogContentText as Dr, TextField as fe, DialogActions as Dt, Button as M, Snackbar as Or, Alert as Rr, IconButton as q, AlertTitle as Pr, Box as H, Unstable_Grid2 as Q, Fab as vr, SpeedDial as Fr, SpeedDialIcon as Lr, SpeedDialAction as Br, ButtonGroup as Ir, Popper as Mr, Grow as Nr, Paper as Ot, ClickAwayListener as jr, MenuList as Ur, MenuItem as se, AppBar as wn, Toolbar as qr, Typography as $, Drawer as Sn, Divider as ve, Autocomplete as _r, CircularProgress as Hr, Switch as zr, Stack as N, FormControl as at, InputLabel as it, Select as Fe, Badge as Rt, Popover as Vr, Link as lt, Collapse as xn, TableCell as ee, RadioGroup as $t, FormControlLabel as Ke, Radio as Ye, TableContainer as Wr, Table as $r, TableHead as Kr, TableRow as he, Checkbox as Pt, TableSortLabel as Yr, Skeleton as Kt, TableBody as Jr, TableFooter as Gr, Tabs as Zr, Tab as Yt, Breadcrumbs as Xr, List as Qr, ListItem as eo, ListItemButton as to, ListItemIcon as An, ListItemText as Cn, Menu as En, Avatar as no, CssBaseline as ro } from "@mui/material";
10
+ import m, { useContext as kn, useMemo as oo } from "react";
11
11
  import { useTranslation as L, initReactI18next as so } from "react-i18next";
12
- import { Close as Ne, ArrowDropDown as kn, ChevronLeft as je, ChevronRight as Ue, HighlightOffOutlined as ct, AddCircleOutline as Dn, FilterList as On, Menu as Rn, LastPage as Pn, FirstPage as vn, Search as ut, SwapVert as Fn, ArrowUpward as Ln, ArrowDownward as Bn, MoreVert as vt, ExpandLess as In, ExpandMore as Mn, Add as ao, CategoryOutlined as io, DashboardOutlined as lo, PeopleOutlined as co } from "@mui/icons-material";
12
+ import { Close as Ne, ArrowDropDown as Tn, ChevronLeft as je, ChevronRight as Ue, HighlightOffOutlined as ct, AddCircleOutline as Dn, FilterList as On, Menu as Rn, LastPage as Pn, FirstPage as vn, Search as ut, SwapVert as Fn, ArrowUpward as Ln, ArrowDownward as Bn, MoreVert as vt, ExpandLess as In, ExpandMore as Mn, Add as ao, CategoryOutlined as io, DashboardOutlined as lo, PeopleOutlined as co } from "@mui/icons-material";
13
13
  import { useTheme as Ft, styled as Z, createTheme as uo, ThemeProvider as fo } from "@mui/material/styles";
14
14
  import Jt from "react-dom";
15
15
  import Y from "i18next";
@@ -28,8 +28,8 @@ const ho = {
28
28
  showBackButton: !1,
29
29
  setShowBackButton: () => {
30
30
  }
31
- }, X = p.createContext(ho), Je = document.title, po = ({ children: e }) => {
32
- const [t, n] = p.useState(!1), [r, o] = p.useState(""), [s, a] = p.useState(!1), [l, d] = p.useState(!1), c = oe("luminix.cms.layout", {}), u = Me((y) => y.breakpoints.up((c == null ? void 0 : c.breakpoint) || "md")), f = {
31
+ }, X = m.createContext(ho), Je = document.title, po = ({ children: e }) => {
32
+ const [t, n] = m.useState(!1), [r, o] = m.useState(""), [s, a] = m.useState(!1), [l, d] = m.useState(!1), c = oe("luminix.cms.layout", {}), u = Me((y) => y.breakpoints.up((c == null ? void 0 : c.breakpoint) || "md")), h = {
33
33
  open: t,
34
34
  setOpen: n,
35
35
  layout: c,
@@ -41,12 +41,12 @@ const ho = {
41
41
  showBackButton: l,
42
42
  setShowBackButton: d
43
43
  };
44
- return p.useEffect(() => (document.title = r ? `${r} | ${oe("app.name", Je)}` : oe("app.name", Je), () => {
44
+ return m.useEffect(() => (document.title = r ? `${r} | ${oe("app.name", Je)}` : oe("app.name", Je), () => {
45
45
  document.title = Je;
46
- }), [r]), /* @__PURE__ */ i(X.Provider, { value: f, children: e });
47
- }, Nn = p.createContext({
46
+ }), [r]), /* @__PURE__ */ i(X.Provider, { value: h, children: e });
47
+ }, Nn = m.createContext({
48
48
  Model: null
49
- }), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(Nn.Provider, { value: { Model: e }, children: t }), jn = p.createContext({
49
+ }), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(Nn.Provider, { value: { Model: e }, children: t }), jn = m.createContext({
50
50
  isOpen: !1,
51
51
  dialog: () => Promise.reject(new Error("Trying to access DialogContext outside of DialogProvider")),
52
52
  dismissDialog: () => {
@@ -54,20 +54,24 @@ const ho = {
54
54
  current: void 0
55
55
  });
56
56
  function mo(e) {
57
- const [t, n] = p.useState(e);
58
- return p.useEffect(() => {
57
+ const [t, n] = m.useState(e);
58
+ return m.useEffect(() => {
59
59
  e && n(e);
60
60
  }, [e]), e || t;
61
61
  }
62
62
  function go({ children: e, ...t }) {
63
- const [{ current: n, resolve: r }, o] = p.useState({}), [s, a] = p.useState(""), l = mo(n), { type: d = "alert" } = l ?? {}, c = p.useCallback((S) => new Promise((b) => {
64
- typeof S != "string" && S.type === "prompt" && a(S.defaultValue ?? ""), o({
65
- current: typeof S == "string" ? { message: S } : S,
66
- resolve: b
63
+ const [{ current: n, resolve: r }, o] = m.useState({}), [s, a] = m.useState(""), l = mo(n), {
64
+ type: d = "alert",
65
+ dialogProps: c = {},
66
+ textFieldProps: u = {}
67
+ } = l ?? {}, h = m.useCallback((p) => new Promise((g) => {
68
+ typeof p != "string" && p.type === "prompt" && a(p.defaultValue ?? ""), o({
69
+ current: typeof p == "string" ? { message: p } : p,
70
+ resolve: g
67
71
  });
68
- }), []), { t: u } = L(), f = () => {
72
+ }), []), { t: y } = L(), S = () => {
69
73
  r && r(!1), o({});
70
- }, y = () => {
74
+ }, b = () => {
71
75
  r && r(
72
76
  d === "prompt" ? s : !0
73
77
  ), o({});
@@ -75,8 +79,8 @@ function go({ children: e, ...t }) {
75
79
  return /* @__PURE__ */ w(jn.Provider, { value: {
76
80
  isOpen: !!n,
77
81
  current: n,
78
- dialog: c,
79
- dismissDialog: f
82
+ dialog: h,
83
+ dismissDialog: S
80
84
  }, children: [
81
85
  e,
82
86
  /* @__PURE__ */ w(
@@ -85,11 +89,12 @@ function go({ children: e, ...t }) {
85
89
  open: !!n,
86
90
  "aria-labelledby": "alert-dialog-title",
87
91
  "aria-describedby": "alert-dialog-description",
88
- ...(n == null ? void 0 : n.dismissable) ?? !0 ? { onClose: f } : {},
92
+ ...(n == null ? void 0 : n.dismissable) ?? !0 ? { onClose: S } : {},
89
93
  ...t,
94
+ ...c,
90
95
  children: [
91
- (l == null ? void 0 : l.title) && /* @__PURE__ */ i(Tt, { id: "alert-dialog-title", children: l.title }),
92
- /* @__PURE__ */ w(kt, { children: [
96
+ (l == null ? void 0 : l.title) && /* @__PURE__ */ i(kt, { id: "alert-dialog-title", children: l.title }),
97
+ /* @__PURE__ */ w(Tt, { children: [
93
98
  /* @__PURE__ */ i(Dr, { id: "alert-dialog-description", children: l == null ? void 0 : l.message }),
94
99
  d === "prompt" && /* @__PURE__ */ i(
95
100
  fe,
@@ -97,20 +102,20 @@ function go({ children: e, ...t }) {
97
102
  autoFocus: !0,
98
103
  margin: "dense",
99
104
  id: "name",
100
- label: l == null ? void 0 : l.message,
101
105
  type: "text",
102
106
  fullWidth: !0,
107
+ ...u,
103
108
  value: s,
104
- onChange: (S) => a(S.target.value)
109
+ onChange: (p) => a(p.target.value)
105
110
  }
106
111
  )
107
112
  ] }),
108
113
  /* @__PURE__ */ w(Dt, { children: [
109
- d === "confirm" && /* @__PURE__ */ w(B, { children: [
110
- /* @__PURE__ */ i(M, { onClick: f, children: (l == null ? void 0 : l.cancelText) ?? u("No") }),
111
- /* @__PURE__ */ i(M, { onClick: y, autoFocus: !0, children: (l == null ? void 0 : l.confirmText) ?? u("Yes") })
114
+ d !== "alert" && /* @__PURE__ */ w(B, { children: [
115
+ /* @__PURE__ */ i(M, { onClick: S, children: (l == null ? void 0 : l.cancelText) ?? y(d === "confirm" ? "No" : "Cancel") }),
116
+ /* @__PURE__ */ i(M, { onClick: b, autoFocus: d !== "prompt", children: (l == null ? void 0 : l.confirmText) ?? y(d === "confirm" ? "Yes" : "Ok") })
112
117
  ] }),
113
- ["alert", "prompt"].includes(d) && /* @__PURE__ */ i(M, { onClick: f, autoFocus: !0, children: (l == null ? void 0 : l.confirmText) ?? u("Ok") })
118
+ d === "alert" && /* @__PURE__ */ i(M, { onClick: S, autoFocus: !0, children: (l == null ? void 0 : l.confirmText) ?? y("Ok") })
114
119
  ] })
115
120
  ]
116
121
  }
@@ -118,10 +123,10 @@ function go({ children: e, ...t }) {
118
123
  ] });
119
124
  }
120
125
  function v() {
121
- const { isBreakpointUp: e } = Tn(X);
126
+ const { isBreakpointUp: e } = kn(X);
122
127
  return e;
123
128
  }
124
- const Lt = p.createContext({
129
+ const Lt = m.createContext({
125
130
  isOpen: !1,
126
131
  notify: () => {
127
132
  },
@@ -144,20 +149,20 @@ const Lt = p.createContext({
144
149
  sx: o,
145
150
  ...s
146
151
  }) => {
147
- const a = yn(dt), l = v(), c = Ft().spacing(l ? 3 : 1), [u, f] = p.useState(), [y, S] = p.useState(c), { vertical: b = "bottom" } = r || {}, m = (g, A) => {
148
- A !== "clickaway" && f(void 0);
152
+ const a = yn(dt), l = v(), c = Ft().spacing(l ? 3 : 1), [u, h] = m.useState(), [y, S] = m.useState(c), { vertical: b = "bottom" } = r || {}, p = (g, A) => {
153
+ A !== "clickaway" && h(void 0);
149
154
  };
150
- return p.useEffect(() => {
155
+ return m.useEffect(() => {
151
156
  if (!u && a.isNotEmpty()) {
152
157
  const g = setTimeout(() => {
153
- f(dt.pull(0) ?? void 0);
158
+ h(dt.pull(0) ?? void 0);
154
159
  }, 100);
155
160
  return () => clearTimeout(g);
156
161
  }
157
162
  }, [u, a]), /* @__PURE__ */ w(Lt.Provider, { value: {
158
163
  isOpen: !!u,
159
164
  notify: bo,
160
- dismissNotification: m,
165
+ dismissNotification: p,
161
166
  notifications: a.all(),
162
167
  current: u,
163
168
  displacement: y,
@@ -170,7 +175,7 @@ const Lt = p.createContext({
170
175
  open: !!u,
171
176
  autoHideDuration: t,
172
177
  anchorOrigin: r,
173
- onClose: m,
178
+ onClose: p,
174
179
  sx: {
175
180
  ...o,
176
181
  [b]: `${y} !important`
@@ -179,7 +184,7 @@ const Lt = p.createContext({
179
184
  children: u && /* @__PURE__ */ w(
180
185
  Rr,
181
186
  {
182
- onClose: m,
187
+ onClose: p,
183
188
  severity: u.severity,
184
189
  variant: n,
185
190
  sx: { width: "100%" },
@@ -194,7 +199,7 @@ const Lt = p.createContext({
194
199
  },
195
200
  x
196
201
  )),
197
- /* @__PURE__ */ i(q, { "aria-label": "close", color: "inherit", size: "small", onClick: m, children: /* @__PURE__ */ i(Ne, {}) }, "close")
202
+ /* @__PURE__ */ i(q, { "aria-label": "close", color: "inherit", size: "small", onClick: p, children: /* @__PURE__ */ i(Ne, {}) }, "close")
198
203
  ],
199
204
  children: [
200
205
  u.title && /* @__PURE__ */ i(Pr, { children: u.title }),
@@ -235,17 +240,17 @@ const Lt = p.createContext({
235
240
  },
236
241
  ...Object.entries(s).flatMap(([a, l]) => [
237
242
  {
238
- path: "/" + T.kebab(l.plural()),
243
+ path: "/" + k.kebab(l.plural()),
239
244
  name: `luminix.cms.${a}.index`,
240
245
  element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(Cr, { factory: l.query, children: /* @__PURE__ */ i(r, {}) }) })
241
246
  },
242
247
  {
243
- path: "/" + T.kebab(l.plural()) + "/create",
248
+ path: "/" + k.kebab(l.plural()) + "/create",
244
249
  name: `luminix.cms.${a}.create`,
245
250
  element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(o, { create: !0 }) })
246
251
  },
247
252
  {
248
- path: "/" + T.kebab(l.plural()) + "/:id",
253
+ path: "/" + k.kebab(l.plural()) + "/:id",
249
254
  name: `luminix.cms.${a}.show`,
250
255
  element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(o, {}) })
251
256
  }
@@ -254,8 +259,8 @@ const Lt = p.createContext({
254
259
  }
255
260
  ];
256
261
  function Bt(e) {
257
- const { setCurrentPage: t } = p.useContext(X);
258
- p.useEffect(() => (t(e), () => {
262
+ const { setCurrentPage: t } = m.useContext(X);
263
+ m.useEffect(() => (t(e), () => {
259
264
  t("");
260
265
  }), [e, t]);
261
266
  }
@@ -265,14 +270,14 @@ const xo = () => {
265
270
  }, Ao = ({ error: e }) => /* @__PURE__ */ w("div", { children: [
266
271
  /* @__PURE__ */ i("h1", { children: "Ops..." }),
267
272
  /* @__PURE__ */ i("p", { children: "Something went wrong" }),
268
- k().hasDebugModeEnabled() && e && /* @__PURE__ */ i(B, { children: /* @__PURE__ */ w("pre", { style: { whiteSpace: "pre-wrap" }, children: [
273
+ T().hasDebugModeEnabled() && e && /* @__PURE__ */ i(B, { children: /* @__PURE__ */ w("pre", { style: { whiteSpace: "pre-wrap" }, children: [
269
274
  e.message,
270
275
  /* @__PURE__ */ i("br", {}),
271
276
  e.stack
272
277
  ] }) })
273
278
  ] });
274
279
  function z(e, t) {
275
- const { layout: n } = Tn(X);
280
+ const { layout: n } = kn(X);
276
281
  return oo(() => J.get(n, e, t), [n, e, t]);
277
282
  }
278
283
  const Co = Z("div")(({ theme: e }) => ({
@@ -284,7 +289,7 @@ const Co = Z("div")(({ theme: e }) => ({
284
289
  DesktopPageTitle: r,
285
290
  ["Layout.AppBar"]: o,
286
291
  ["Layout.Drawer"]: s
287
- } = k("cms").getComponents(), a = z("appBar.height"), {
292
+ } = T("cms").getComponents(), a = z("appBar.height"), {
288
293
  AppBar: l,
289
294
  Drawer: d,
290
295
  main: c
@@ -316,23 +321,23 @@ const Co = Z("div")(({ theme: e }) => ({
316
321
  )
317
322
  ] });
318
323
  };
319
- function To() {
320
- const { setShowSearch: e } = p.useContext(X);
321
- p.useEffect(() => (e(!0), () => {
324
+ function ko() {
325
+ const { setShowSearch: e } = m.useContext(X);
326
+ m.useEffect(() => (e(!0), () => {
322
327
  e(!1);
323
328
  }), [e]);
324
329
  }
325
330
  function te() {
326
- const { Model: e } = p.useContext(Nn);
331
+ const { Model: e } = m.useContext(Nn);
327
332
  return e;
328
333
  }
329
- const ko = () => {
334
+ const To = () => {
330
335
  const e = te(), {
331
336
  data: t,
332
337
  error: n,
333
338
  loading: r
334
339
  } = xe();
335
- Bt(e.plural()), To();
340
+ Bt(e.plural()), ko();
336
341
  const o = v(), {
337
342
  Breadcrumbs: s,
338
343
  ["ModelIndex.Pagination"]: a,
@@ -340,11 +345,11 @@ const ko = () => {
340
345
  ["ModelIndex.Table"]: d,
341
346
  ["ModelIndex.Table.TableBody"]: c,
342
347
  ["ModelIndex.Table.TableHead"]: u,
343
- ["ModelIndex.Table.TableFooter"]: f,
348
+ ["ModelIndex.Table.TableFooter"]: h,
344
349
  ["ModelIndex.Table.TableToolbar"]: y,
345
350
  ["ModelIndex.Table.TableBody.TableRow"]: S,
346
351
  ["ModelIndex.Tabs"]: b
347
- } = k("cms").getComponents();
352
+ } = T("cms").getComponents();
348
353
  return /* @__PURE__ */ i(H, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: /* @__PURE__ */ w(Q, { container: !0, spacing: 2, children: [
349
354
  /* @__PURE__ */ w(
350
355
  Q,
@@ -376,16 +381,16 @@ const ko = () => {
376
381
  error: n,
377
382
  children: [
378
383
  /* @__PURE__ */ i(u, { children: /* @__PURE__ */ i(y, {}) }),
379
- /* @__PURE__ */ i(c, { children: (m) => /* @__PURE__ */ i(S, { item: m }, m.getKey()) }),
380
- /* @__PURE__ */ i(f, {})
384
+ /* @__PURE__ */ i(c, { children: (p) => /* @__PURE__ */ i(S, { item: p }, p.getKey()) }),
385
+ /* @__PURE__ */ i(h, {})
381
386
  ]
382
387
  }
383
388
  ) })
384
389
  ] }) });
385
390
  };
386
391
  function Do() {
387
- const { setShowBackButton: e } = p.useContext(X);
388
- p.useEffect(() => (e(!0), () => {
392
+ const { setShowBackButton: e } = m.useContext(X);
393
+ m.useEffect(() => (e(!0), () => {
389
394
  e(!1);
390
395
  }), [e]);
391
396
  }
@@ -406,7 +411,7 @@ function Po(e) {
406
411
  let t;
407
412
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qn(e.buffer), t;
408
413
  }
409
- const vo = _e("string"), _ = _e("function"), _n = _e("number"), He = (e) => e !== null && typeof e == "object", Fo = (e) => e === !0 || e === !1, ke = (e) => {
414
+ const vo = _e("string"), _ = _e("function"), _n = _e("number"), He = (e) => e !== null && typeof e == "object", Fo = (e) => e === !0 || e === !1, Te = (e) => {
410
415
  if (qe(e) !== "object")
411
416
  return !1;
412
417
  const t = It(e);
@@ -443,7 +448,7 @@ const ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
443
448
  function ft() {
444
449
  const { caseless: e } = zn(this) && this || {}, t = {}, n = (r, o) => {
445
450
  const s = e && Hn(t, o) || o;
446
- ke(t[s]) && ke(r) ? t[s] = ft(t[s], r) : ke(r) ? t[s] = ft({}, r) : pe(r) ? t[s] = r.slice() : t[s] = r;
451
+ Te(t[s]) && Te(r) ? t[s] = ft(t[s], r) : Te(r) ? t[s] = ft({}, r) : pe(r) ? t[s] = r.slice() : t[s] = r;
447
452
  };
448
453
  for (let r = 0, o = arguments.length; r < o; r++)
449
454
  arguments[r] && Ae(arguments[r], n);
@@ -563,7 +568,7 @@ const cs = (e) => {
563
568
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
564
569
  typeof setImmediate == "function",
565
570
  _(ie.postMessage)
566
- ), fs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ie) : typeof process < "u" && process.nextTick || $n, h = {
571
+ ), fs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ie) : typeof process < "u" && process.nextTick || $n, f = {
567
572
  isArray: pe,
568
573
  isArrayBuffer: qn,
569
574
  isBuffer: Ro,
@@ -573,7 +578,7 @@ const cs = (e) => {
573
578
  isNumber: _n,
574
579
  isBoolean: Fo,
575
580
  isObject: He,
576
- isPlainObject: ke,
581
+ isPlainObject: Te,
577
582
  isReadableStream: qo,
578
583
  isRequest: _o,
579
584
  isResponse: Ho,
@@ -626,7 +631,7 @@ const cs = (e) => {
626
631
  function C(e, t, n, r, o) {
627
632
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
628
633
  }
629
- h.inherits(C, Error, {
634
+ f.inherits(C, Error, {
630
635
  toJSON: function() {
631
636
  return {
632
637
  // Standard
@@ -641,7 +646,7 @@ h.inherits(C, Error, {
641
646
  columnNumber: this.columnNumber,
642
647
  stack: this.stack,
643
648
  // Axios
644
- config: h.toJSONObject(this.config),
649
+ config: f.toJSONObject(this.config),
645
650
  code: this.code,
646
651
  status: this.status
647
652
  };
@@ -669,16 +674,16 @@ Object.defineProperties(C, Yn);
669
674
  Object.defineProperty(Kn, "isAxiosError", { value: !0 });
670
675
  C.from = (e, t, n, r, o, s) => {
671
676
  const a = Object.create(Kn);
672
- return h.toFlatObject(e, a, function(d) {
677
+ return f.toFlatObject(e, a, function(d) {
673
678
  return d !== Error.prototype;
674
679
  }, (l) => l !== "isAxiosError"), C.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, s && Object.assign(a, s), a;
675
680
  };
676
681
  const hs = null;
677
682
  function ht(e) {
678
- return h.isPlainObject(e) || h.isArray(e);
683
+ return f.isPlainObject(e) || f.isArray(e);
679
684
  }
680
685
  function Jn(e) {
681
- return h.endsWith(e, "[]") ? e.slice(0, -2) : e;
686
+ return f.endsWith(e, "[]") ? e.slice(0, -2) : e;
682
687
  }
683
688
  function Xt(e, t, n) {
684
689
  return e ? e.concat(t).map(function(o, s) {
@@ -686,69 +691,69 @@ function Xt(e, t, n) {
686
691
  }).join(n ? "." : "") : t;
687
692
  }
688
693
  function ps(e) {
689
- return h.isArray(e) && !e.some(ht);
694
+ return f.isArray(e) && !e.some(ht);
690
695
  }
691
- const ms = h.toFlatObject(h, {}, null, function(t) {
696
+ const ms = f.toFlatObject(f, {}, null, function(t) {
692
697
  return /^is[A-Z]/.test(t);
693
698
  });
694
699
  function ze(e, t, n) {
695
- if (!h.isObject(e))
700
+ if (!f.isObject(e))
696
701
  throw new TypeError("target must be an object");
697
- t = t || new FormData(), n = h.toFlatObject(n, {
702
+ t = t || new FormData(), n = f.toFlatObject(n, {
698
703
  metaTokens: !0,
699
704
  dots: !1,
700
705
  indexes: !1
701
- }, !1, function(m, g) {
702
- return !h.isUndefined(g[m]);
706
+ }, !1, function(p, g) {
707
+ return !f.isUndefined(g[p]);
703
708
  });
704
- const r = n.metaTokens, o = n.visitor || u, s = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && h.isSpecCompliantForm(t);
705
- if (!h.isFunction(o))
709
+ const r = n.metaTokens, o = n.visitor || u, s = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(t);
710
+ if (!f.isFunction(o))
706
711
  throw new TypeError("visitor must be a function");
707
712
  function c(b) {
708
713
  if (b === null) return "";
709
- if (h.isDate(b))
714
+ if (f.isDate(b))
710
715
  return b.toISOString();
711
- if (!d && h.isBlob(b))
716
+ if (!d && f.isBlob(b))
712
717
  throw new C("Blob is not supported. Use a Buffer instead.");
713
- return h.isArrayBuffer(b) || h.isTypedArray(b) ? d && typeof Blob == "function" ? new Blob([b]) : Buffer.from(b) : b;
718
+ return f.isArrayBuffer(b) || f.isTypedArray(b) ? d && typeof Blob == "function" ? new Blob([b]) : Buffer.from(b) : b;
714
719
  }
715
- function u(b, m, g) {
720
+ function u(b, p, g) {
716
721
  let A = b;
717
722
  if (b && !g && typeof b == "object") {
718
- if (h.endsWith(m, "{}"))
719
- m = r ? m : m.slice(0, -2), b = JSON.stringify(b);
720
- else if (h.isArray(b) && ps(b) || (h.isFileList(b) || h.endsWith(m, "[]")) && (A = h.toArray(b)))
721
- return m = Jn(m), A.forEach(function(E, P) {
722
- !(h.isUndefined(E) || E === null) && t.append(
723
+ if (f.endsWith(p, "{}"))
724
+ p = r ? p : p.slice(0, -2), b = JSON.stringify(b);
725
+ else if (f.isArray(b) && ps(b) || (f.isFileList(b) || f.endsWith(p, "[]")) && (A = f.toArray(b)))
726
+ return p = Jn(p), A.forEach(function(E, P) {
727
+ !(f.isUndefined(E) || E === null) && t.append(
723
728
  // eslint-disable-next-line no-nested-ternary
724
- a === !0 ? Xt([m], P, s) : a === null ? m : m + "[]",
729
+ a === !0 ? Xt([p], P, s) : a === null ? p : p + "[]",
725
730
  c(E)
726
731
  );
727
732
  }), !1;
728
733
  }
729
- return ht(b) ? !0 : (t.append(Xt(g, m, s), c(b)), !1);
734
+ return ht(b) ? !0 : (t.append(Xt(g, p, s), c(b)), !1);
730
735
  }
731
- const f = [], y = Object.assign(ms, {
736
+ const h = [], y = Object.assign(ms, {
732
737
  defaultVisitor: u,
733
738
  convertValue: c,
734
739
  isVisitable: ht
735
740
  });
736
- function S(b, m) {
737
- if (!h.isUndefined(b)) {
738
- if (f.indexOf(b) !== -1)
739
- throw Error("Circular reference detected in " + m.join("."));
740
- f.push(b), h.forEach(b, function(A, x) {
741
- (!(h.isUndefined(A) || A === null) && o.call(
741
+ function S(b, p) {
742
+ if (!f.isUndefined(b)) {
743
+ if (h.indexOf(b) !== -1)
744
+ throw Error("Circular reference detected in " + p.join("."));
745
+ h.push(b), f.forEach(b, function(A, x) {
746
+ (!(f.isUndefined(A) || A === null) && o.call(
742
747
  t,
743
748
  A,
744
- h.isString(x) ? x.trim() : x,
745
- m,
749
+ f.isString(x) ? x.trim() : x,
750
+ p,
746
751
  y
747
- )) === !0 && S(A, m ? m.concat(x) : [x]);
748
- }), f.pop();
752
+ )) === !0 && S(A, p ? p.concat(x) : [x]);
753
+ }), h.pop();
749
754
  }
750
755
  }
751
- if (!h.isObject(e))
756
+ if (!f.isObject(e))
752
757
  throw new TypeError("data must be an object");
753
758
  return S(e), t;
754
759
  }
@@ -789,7 +794,7 @@ function Zn(e, t, n) {
789
794
  return e;
790
795
  const r = n && n.encode || gs, o = n && n.serialize;
791
796
  let s;
792
- if (o ? s = o(t, n) : s = h.isURLSearchParams(t) ? t.toString() : new Mt(t, n).toString(r), s) {
797
+ if (o ? s = o(t, n) : s = f.isURLSearchParams(t) ? t.toString() : new Mt(t, n).toString(r), s) {
793
798
  const a = e.indexOf("#");
794
799
  a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
795
800
  }
@@ -844,7 +849,7 @@ class en {
844
849
  * @returns {void}
845
850
  */
846
851
  forEach(t) {
847
- h.forEach(this.handlers, function(r) {
852
+ f.forEach(this.handlers, function(r) {
848
853
  r !== null && t(r);
849
854
  });
850
855
  }
@@ -873,15 +878,15 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cs
873
878
  ...Es,
874
879
  ...Ss
875
880
  };
876
- function Ts(e, t) {
881
+ function ks(e, t) {
877
882
  return ze(e, new j.classes.URLSearchParams(), Object.assign({
878
883
  visitor: function(n, r, o, s) {
879
- return j.isNode && h.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
884
+ return j.isNode && f.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
880
885
  }
881
886
  }, t));
882
887
  }
883
- function ks(e) {
884
- return h.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
888
+ function Ts(e) {
889
+ return f.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
885
890
  }
886
891
  function Ds(e) {
887
892
  const t = {}, n = Object.keys(e);
@@ -897,20 +902,20 @@ function Qn(e) {
897
902
  let a = n[s++];
898
903
  if (a === "__proto__") return !0;
899
904
  const l = Number.isFinite(+a), d = s >= n.length;
900
- return a = !a && h.isArray(o) ? o.length : a, d ? (h.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !l) : ((!o[a] || !h.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && h.isArray(o[a]) && (o[a] = Ds(o[a])), !l);
905
+ return a = !a && f.isArray(o) ? o.length : a, d ? (f.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !l) : ((!o[a] || !f.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && f.isArray(o[a]) && (o[a] = Ds(o[a])), !l);
901
906
  }
902
- if (h.isFormData(e) && h.isFunction(e.entries)) {
907
+ if (f.isFormData(e) && f.isFunction(e.entries)) {
903
908
  const n = {};
904
- return h.forEachEntry(e, (r, o) => {
905
- t(ks(r), o, n, 0);
909
+ return f.forEachEntry(e, (r, o) => {
910
+ t(Ts(r), o, n, 0);
906
911
  }), n;
907
912
  }
908
913
  return null;
909
914
  }
910
915
  function Os(e, t, n) {
911
- if (h.isString(e))
916
+ if (f.isString(e))
912
917
  try {
913
- return (t || JSON.parse)(e), h.trim(e);
918
+ return (t || JSON.parse)(e), f.trim(e);
914
919
  } catch (r) {
915
920
  if (r.name !== "SyntaxError")
916
921
  throw r;
@@ -921,20 +926,20 @@ const Ce = {
921
926
  transitional: Xn,
922
927
  adapter: ["xhr", "http", "fetch"],
923
928
  transformRequest: [function(t, n) {
924
- const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = h.isObject(t);
925
- if (s && h.isHTMLForm(t) && (t = new FormData(t)), h.isFormData(t))
929
+ const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = f.isObject(t);
930
+ if (s && f.isHTMLForm(t) && (t = new FormData(t)), f.isFormData(t))
926
931
  return o ? JSON.stringify(Qn(t)) : t;
927
- if (h.isArrayBuffer(t) || h.isBuffer(t) || h.isStream(t) || h.isFile(t) || h.isBlob(t) || h.isReadableStream(t))
932
+ if (f.isArrayBuffer(t) || f.isBuffer(t) || f.isStream(t) || f.isFile(t) || f.isBlob(t) || f.isReadableStream(t))
928
933
  return t;
929
- if (h.isArrayBufferView(t))
934
+ if (f.isArrayBufferView(t))
930
935
  return t.buffer;
931
- if (h.isURLSearchParams(t))
936
+ if (f.isURLSearchParams(t))
932
937
  return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
933
938
  let l;
934
939
  if (s) {
935
940
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
936
- return Ts(t, this.formSerializer).toString();
937
- if ((l = h.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
941
+ return ks(t, this.formSerializer).toString();
942
+ if ((l = f.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
938
943
  const d = this.env && this.env.FormData;
939
944
  return ze(
940
945
  l ? { "files[]": t } : t,
@@ -947,9 +952,9 @@ const Ce = {
947
952
  }],
948
953
  transformResponse: [function(t) {
949
954
  const n = this.transitional || Ce.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
950
- if (h.isResponse(t) || h.isReadableStream(t))
955
+ if (f.isResponse(t) || f.isReadableStream(t))
951
956
  return t;
952
- if (t && h.isString(t) && (r && !this.responseType || o)) {
957
+ if (t && f.isString(t) && (r && !this.responseType || o)) {
953
958
  const a = !(n && n.silentJSONParsing) && o;
954
959
  try {
955
960
  return JSON.parse(t);
@@ -983,10 +988,10 @@ const Ce = {
983
988
  }
984
989
  }
985
990
  };
986
- h.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
991
+ f.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
987
992
  Ce.headers[e] = {};
988
993
  });
989
- const Rs = h.toObjectSet([
994
+ const Rs = f.toObjectSet([
990
995
  "age",
991
996
  "authorization",
992
997
  "content-length",
@@ -1016,7 +1021,7 @@ function be(e) {
1016
1021
  return e && String(e).trim().toLowerCase();
1017
1022
  }
1018
1023
  function De(e) {
1019
- return e === !1 || e == null ? e : h.isArray(e) ? e.map(De) : String(e);
1024
+ return e === !1 || e == null ? e : f.isArray(e) ? e.map(De) : String(e);
1020
1025
  }
1021
1026
  function vs(e) {
1022
1027
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
@@ -1027,12 +1032,12 @@ function vs(e) {
1027
1032
  }
1028
1033
  const Fs = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1029
1034
  function Xe(e, t, n, r, o) {
1030
- if (h.isFunction(r))
1035
+ if (f.isFunction(r))
1031
1036
  return r.call(this, t, n);
1032
- if (o && (t = n), !!h.isString(t)) {
1033
- if (h.isString(r))
1037
+ if (o && (t = n), !!f.isString(t)) {
1038
+ if (f.isString(r))
1034
1039
  return t.indexOf(r) !== -1;
1035
- if (h.isRegExp(r))
1040
+ if (f.isRegExp(r))
1036
1041
  return r.test(t);
1037
1042
  }
1038
1043
  }
@@ -1040,7 +1045,7 @@ function Ls(e) {
1040
1045
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
1041
1046
  }
1042
1047
  function Bs(e, t) {
1043
- const n = h.toCamelCase(" " + t);
1048
+ const n = f.toCamelCase(" " + t);
1044
1049
  ["get", "set", "has"].forEach((r) => {
1045
1050
  Object.defineProperty(e, r + n, {
1046
1051
  value: function(o, s, a) {
@@ -1060,15 +1065,15 @@ let U = class {
1060
1065
  const u = be(d);
1061
1066
  if (!u)
1062
1067
  throw new Error("header name must be a non-empty string");
1063
- const f = h.findKey(o, u);
1064
- (!f || o[f] === void 0 || c === !0 || c === void 0 && o[f] !== !1) && (o[f || d] = De(l));
1068
+ const h = f.findKey(o, u);
1069
+ (!h || o[h] === void 0 || c === !0 || c === void 0 && o[h] !== !1) && (o[h || d] = De(l));
1065
1070
  }
1066
- const a = (l, d) => h.forEach(l, (c, u) => s(c, u, d));
1067
- if (h.isPlainObject(t) || t instanceof this.constructor)
1071
+ const a = (l, d) => f.forEach(l, (c, u) => s(c, u, d));
1072
+ if (f.isPlainObject(t) || t instanceof this.constructor)
1068
1073
  a(t, n);
1069
- else if (h.isString(t) && (t = t.trim()) && !Fs(t))
1074
+ else if (f.isString(t) && (t = t.trim()) && !Fs(t))
1070
1075
  a(Ps(t), n);
1071
- else if (h.isHeaders(t))
1076
+ else if (f.isHeaders(t))
1072
1077
  for (const [l, d] of t.entries())
1073
1078
  s(d, l, r);
1074
1079
  else
@@ -1077,16 +1082,16 @@ let U = class {
1077
1082
  }
1078
1083
  get(t, n) {
1079
1084
  if (t = be(t), t) {
1080
- const r = h.findKey(this, t);
1085
+ const r = f.findKey(this, t);
1081
1086
  if (r) {
1082
1087
  const o = this[r];
1083
1088
  if (!n)
1084
1089
  return o;
1085
1090
  if (n === !0)
1086
1091
  return vs(o);
1087
- if (h.isFunction(n))
1092
+ if (f.isFunction(n))
1088
1093
  return n.call(this, o, r);
1089
- if (h.isRegExp(n))
1094
+ if (f.isRegExp(n))
1090
1095
  return n.exec(o);
1091
1096
  throw new TypeError("parser must be boolean|regexp|function");
1092
1097
  }
@@ -1094,7 +1099,7 @@ let U = class {
1094
1099
  }
1095
1100
  has(t, n) {
1096
1101
  if (t = be(t), t) {
1097
- const r = h.findKey(this, t);
1102
+ const r = f.findKey(this, t);
1098
1103
  return !!(r && this[r] !== void 0 && (!n || Xe(this, this[r], r, n)));
1099
1104
  }
1100
1105
  return !1;
@@ -1104,11 +1109,11 @@ let U = class {
1104
1109
  let o = !1;
1105
1110
  function s(a) {
1106
1111
  if (a = be(a), a) {
1107
- const l = h.findKey(r, a);
1112
+ const l = f.findKey(r, a);
1108
1113
  l && (!n || Xe(r, r[l], l, n)) && (delete r[l], o = !0);
1109
1114
  }
1110
1115
  }
1111
- return h.isArray(t) ? t.forEach(s) : s(t), o;
1116
+ return f.isArray(t) ? t.forEach(s) : s(t), o;
1112
1117
  }
1113
1118
  clear(t) {
1114
1119
  const n = Object.keys(this);
@@ -1121,8 +1126,8 @@ let U = class {
1121
1126
  }
1122
1127
  normalize(t) {
1123
1128
  const n = this, r = {};
1124
- return h.forEach(this, (o, s) => {
1125
- const a = h.findKey(r, s);
1129
+ return f.forEach(this, (o, s) => {
1130
+ const a = f.findKey(r, s);
1126
1131
  if (a) {
1127
1132
  n[a] = De(o), delete n[s];
1128
1133
  return;
@@ -1136,8 +1141,8 @@ let U = class {
1136
1141
  }
1137
1142
  toJSON(t) {
1138
1143
  const n = /* @__PURE__ */ Object.create(null);
1139
- return h.forEach(this, (r, o) => {
1140
- r != null && r !== !1 && (n[o] = t && h.isArray(r) ? r.join(", ") : r);
1144
+ return f.forEach(this, (r, o) => {
1145
+ r != null && r !== !1 && (n[o] = t && f.isArray(r) ? r.join(", ") : r);
1141
1146
  }), n;
1142
1147
  }
1143
1148
  [Symbol.iterator]() {
@@ -1165,11 +1170,11 @@ let U = class {
1165
1170
  const l = be(a);
1166
1171
  r[l] || (Bs(o, a), r[l] = !0);
1167
1172
  }
1168
- return h.isArray(t) ? t.forEach(s) : s(t), this;
1173
+ return f.isArray(t) ? t.forEach(s) : s(t), this;
1169
1174
  }
1170
1175
  };
1171
1176
  U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1172
- h.reduceDescriptors(U.prototype, ({ value: e }, t) => {
1177
+ f.reduceDescriptors(U.prototype, ({ value: e }, t) => {
1173
1178
  let n = t[0].toUpperCase() + t.slice(1);
1174
1179
  return {
1175
1180
  get: () => e,
@@ -1178,11 +1183,11 @@ h.reduceDescriptors(U.prototype, ({ value: e }, t) => {
1178
1183
  }
1179
1184
  };
1180
1185
  });
1181
- h.freezeMethods(U);
1186
+ f.freezeMethods(U);
1182
1187
  function Qe(e, t) {
1183
1188
  const n = this || Ce, r = t || n, o = U.from(r.headers);
1184
1189
  let s = r.data;
1185
- return h.forEach(e, function(l) {
1190
+ return f.forEach(e, function(l) {
1186
1191
  s = l.call(n, s, o.normalize(), t ? t.status : void 0);
1187
1192
  }), o.normalize(), s;
1188
1193
  }
@@ -1192,7 +1197,7 @@ function er(e) {
1192
1197
  function me(e, t, n) {
1193
1198
  C.call(this, e ?? "canceled", C.ERR_CANCELED, t, n), this.name = "CanceledError";
1194
1199
  }
1195
- h.inherits(me, C, {
1200
+ f.inherits(me, C, {
1196
1201
  __CANCEL__: !0
1197
1202
  });
1198
1203
  function tr(e, t, n) {
@@ -1216,9 +1221,9 @@ function Ms(e, t) {
1216
1221
  return t = t !== void 0 ? t : 1e3, function(d) {
1217
1222
  const c = Date.now(), u = r[s];
1218
1223
  a || (a = c), n[o] = d, r[o] = c;
1219
- let f = s, y = 0;
1220
- for (; f !== o; )
1221
- y += n[f++], f = f % e;
1224
+ let h = s, y = 0;
1225
+ for (; h !== o; )
1226
+ y += n[h++], h = h % e;
1222
1227
  if (o = (o + 1) % e, o === s && (s = (s + 1) % e), c - a < t)
1223
1228
  return;
1224
1229
  const S = u && c - u;
@@ -1231,10 +1236,10 @@ function Ns(e, t) {
1231
1236
  n = u, o = null, s && (clearTimeout(s), s = null), e.apply(null, c);
1232
1237
  };
1233
1238
  return [(...c) => {
1234
- const u = Date.now(), f = u - n;
1235
- f >= r ? a(c, u) : (o = c, s || (s = setTimeout(() => {
1239
+ const u = Date.now(), h = u - n;
1240
+ h >= r ? a(c, u) : (o = c, s || (s = setTimeout(() => {
1236
1241
  s = null, a(o);
1237
- }, r - f)));
1242
+ }, r - h)));
1238
1243
  }, () => o && a(o)];
1239
1244
  }
1240
1245
  const Le = (e, t, n = 3) => {
@@ -1243,7 +1248,7 @@ const Le = (e, t, n = 3) => {
1243
1248
  return Ns((s) => {
1244
1249
  const a = s.loaded, l = s.lengthComputable ? s.total : void 0, d = a - r, c = o(d), u = a <= l;
1245
1250
  r = a;
1246
- const f = {
1251
+ const h = {
1247
1252
  loaded: a,
1248
1253
  total: l,
1249
1254
  progress: l ? a / l : void 0,
@@ -1254,7 +1259,7 @@ const Le = (e, t, n = 3) => {
1254
1259
  lengthComputable: l != null,
1255
1260
  [t ? "download" : "upload"]: !0
1256
1261
  };
1257
- e(f);
1262
+ e(h);
1258
1263
  }, n);
1259
1264
  }, nn = (e, t) => {
1260
1265
  const n = e != null;
@@ -1263,7 +1268,7 @@ const Le = (e, t, n = 3) => {
1263
1268
  total: e,
1264
1269
  loaded: r
1265
1270
  }), t[1]];
1266
- }, rn = (e) => (...t) => h.asap(() => e(...t)), js = j.hasStandardBrowserEnv ? (
1271
+ }, rn = (e) => (...t) => f.asap(() => e(...t)), js = j.hasStandardBrowserEnv ? (
1267
1272
  // Standard browser envs have full support of the APIs needed to test
1268
1273
  // whether the request URL is of the same origin as current location.
1269
1274
  function() {
@@ -1283,7 +1288,7 @@ const Le = (e, t, n = 3) => {
1283
1288
  };
1284
1289
  }
1285
1290
  return r = o(window.location.href), function(a) {
1286
- const l = h.isString(a) ? o(a) : a;
1291
+ const l = f.isString(a) ? o(a) : a;
1287
1292
  return l.protocol === r.protocol && l.host === r.host;
1288
1293
  };
1289
1294
  }()
@@ -1299,7 +1304,7 @@ const Le = (e, t, n = 3) => {
1299
1304
  {
1300
1305
  write(e, t, n, r, o, s) {
1301
1306
  const a = [e + "=" + encodeURIComponent(t)];
1302
- h.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), h.isString(r) && a.push("path=" + r), h.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
1307
+ f.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), f.isString(r) && a.push("path=" + r), f.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
1303
1308
  },
1304
1309
  read(e) {
1305
1310
  const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
@@ -1334,29 +1339,29 @@ const on = (e) => e instanceof U ? { ...e } : e;
1334
1339
  function ue(e, t) {
1335
1340
  t = t || {};
1336
1341
  const n = {};
1337
- function r(c, u, f) {
1338
- return h.isPlainObject(c) && h.isPlainObject(u) ? h.merge.call({ caseless: f }, c, u) : h.isPlainObject(u) ? h.merge({}, u) : h.isArray(u) ? u.slice() : u;
1342
+ function r(c, u, h) {
1343
+ return f.isPlainObject(c) && f.isPlainObject(u) ? f.merge.call({ caseless: h }, c, u) : f.isPlainObject(u) ? f.merge({}, u) : f.isArray(u) ? u.slice() : u;
1339
1344
  }
1340
- function o(c, u, f) {
1341
- if (h.isUndefined(u)) {
1342
- if (!h.isUndefined(c))
1343
- return r(void 0, c, f);
1344
- } else return r(c, u, f);
1345
+ function o(c, u, h) {
1346
+ if (f.isUndefined(u)) {
1347
+ if (!f.isUndefined(c))
1348
+ return r(void 0, c, h);
1349
+ } else return r(c, u, h);
1345
1350
  }
1346
1351
  function s(c, u) {
1347
- if (!h.isUndefined(u))
1352
+ if (!f.isUndefined(u))
1348
1353
  return r(void 0, u);
1349
1354
  }
1350
1355
  function a(c, u) {
1351
- if (h.isUndefined(u)) {
1352
- if (!h.isUndefined(c))
1356
+ if (f.isUndefined(u)) {
1357
+ if (!f.isUndefined(c))
1353
1358
  return r(void 0, c);
1354
1359
  } else return r(void 0, u);
1355
1360
  }
1356
- function l(c, u, f) {
1357
- if (f in t)
1361
+ function l(c, u, h) {
1362
+ if (h in t)
1358
1363
  return r(c, u);
1359
- if (f in e)
1364
+ if (h in e)
1360
1365
  return r(void 0, c);
1361
1366
  }
1362
1367
  const d = {
@@ -1390,9 +1395,9 @@ function ue(e, t) {
1390
1395
  validateStatus: l,
1391
1396
  headers: (c, u) => o(on(c), on(u), !0)
1392
1397
  };
1393
- return h.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
1394
- const f = d[u] || o, y = f(e[u], t[u], u);
1395
- h.isUndefined(y) && f !== l || (n[u] = y);
1398
+ return f.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
1399
+ const h = d[u] || o, y = h(e[u], t[u], u);
1400
+ f.isUndefined(y) && h !== l || (n[u] = y);
1396
1401
  }), n;
1397
1402
  }
1398
1403
  const rr = (e) => {
@@ -1403,15 +1408,15 @@ const rr = (e) => {
1403
1408
  "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
1404
1409
  );
1405
1410
  let d;
1406
- if (h.isFormData(n)) {
1411
+ if (f.isFormData(n)) {
1407
1412
  if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
1408
1413
  a.setContentType(void 0);
1409
1414
  else if ((d = a.getContentType()) !== !1) {
1410
- const [c, ...u] = d ? d.split(";").map((f) => f.trim()).filter(Boolean) : [];
1415
+ const [c, ...u] = d ? d.split(";").map((h) => h.trim()).filter(Boolean) : [];
1411
1416
  a.setContentType([c || "multipart/form-data", ...u].join("; "));
1412
1417
  }
1413
1418
  }
1414
- if (j.hasStandardBrowserEnv && (r && h.isFunction(r) && (r = r(t)), r || r !== !1 && js(t.url))) {
1419
+ if (j.hasStandardBrowserEnv && (r && f.isFunction(r) && (r = r(t)), r || r !== !1 && js(t.url))) {
1415
1420
  const c = o && s && Us.read(s);
1416
1421
  c && a.set(o, c);
1417
1422
  }
@@ -1421,8 +1426,8 @@ const rr = (e) => {
1421
1426
  const o = rr(e);
1422
1427
  let s = o.data;
1423
1428
  const a = U.from(o.headers).normalize();
1424
- let { responseType: l, onUploadProgress: d, onDownloadProgress: c } = o, u, f, y, S, b;
1425
- function m() {
1429
+ let { responseType: l, onUploadProgress: d, onDownloadProgress: c } = o, u, h, y, S, b;
1430
+ function p() {
1426
1431
  S && S(), b && b(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u);
1427
1432
  }
1428
1433
  let g = new XMLHttpRequest();
@@ -1441,9 +1446,9 @@ const rr = (e) => {
1441
1446
  request: g
1442
1447
  };
1443
1448
  tr(function(D) {
1444
- n(D), m();
1449
+ n(D), p();
1445
1450
  }, function(D) {
1446
- r(D), m();
1451
+ r(D), p();
1447
1452
  }, O), g = null;
1448
1453
  }
1449
1454
  "onloadend" in g ? g.onloadend = A : g.onreadystatechange = function() {
@@ -1461,9 +1466,9 @@ const rr = (e) => {
1461
1466
  e,
1462
1467
  g
1463
1468
  )), g = null;
1464
- }, s === void 0 && a.setContentType(null), "setRequestHeader" in g && h.forEach(a.toJSON(), function(P, O) {
1469
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in g && f.forEach(a.toJSON(), function(P, O) {
1465
1470
  g.setRequestHeader(O, P);
1466
- }), h.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), c && ([y, b] = Le(c, !0), g.addEventListener("progress", y)), d && g.upload && ([f, S] = Le(d), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (u = (E) => {
1471
+ }), f.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), l && l !== "json" && (g.responseType = o.responseType), c && ([y, b] = Le(c, !0), g.addEventListener("progress", y)), d && g.upload && ([h, S] = Le(d), g.upload.addEventListener("progress", h), g.upload.addEventListener("loadend", S)), (o.cancelToken || o.signal) && (u = (E) => {
1467
1472
  g && (r(!E || E.type ? new me(null, e, g) : E), g.abort(), g = null);
1468
1473
  }, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
1469
1474
  const x = Is(o.url);
@@ -1494,7 +1499,7 @@ const rr = (e) => {
1494
1499
  };
1495
1500
  e.forEach((c) => c.addEventListener("abort", s));
1496
1501
  const { signal: d } = r;
1497
- return d.unsubscribe = () => h.asap(l), d;
1502
+ return d.unsubscribe = () => f.asap(l), d;
1498
1503
  }
1499
1504
  }, Ws = function* (e, t) {
1500
1505
  let n = e.byteLength;
@@ -1537,9 +1542,9 @@ const rr = (e) => {
1537
1542
  l(), d.close();
1538
1543
  return;
1539
1544
  }
1540
- let f = u.byteLength;
1545
+ let h = u.byteLength;
1541
1546
  if (n) {
1542
- let y = s += f;
1547
+ let y = s += h;
1543
1548
  n(y);
1544
1549
  }
1545
1550
  d.enqueue(new Uint8Array(u));
@@ -1569,12 +1574,12 @@ const rr = (e) => {
1569
1574
  }
1570
1575
  }).headers.has("Content-Type");
1571
1576
  return e && !t;
1572
- }), an = 64 * 1024, mt = or && sr(() => h.isReadableStream(new Response("").body)), Be = {
1577
+ }), an = 64 * 1024, mt = or && sr(() => f.isReadableStream(new Response("").body)), Be = {
1573
1578
  stream: mt && ((e) => e.body)
1574
1579
  };
1575
1580
  Ve && ((e) => {
1576
1581
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
1577
- !Be[t] && (Be[t] = h.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1582
+ !Be[t] && (Be[t] = f.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
1578
1583
  throw new C(`Response type '${t}' is not supported`, C.ERR_NOT_SUPPORT, r);
1579
1584
  });
1580
1585
  });
@@ -1582,19 +1587,19 @@ Ve && ((e) => {
1582
1587
  const Gs = async (e) => {
1583
1588
  if (e == null)
1584
1589
  return 0;
1585
- if (h.isBlob(e))
1590
+ if (f.isBlob(e))
1586
1591
  return e.size;
1587
- if (h.isSpecCompliantForm(e))
1592
+ if (f.isSpecCompliantForm(e))
1588
1593
  return (await new Request(j.origin, {
1589
1594
  method: "POST",
1590
1595
  body: e
1591
1596
  }).arrayBuffer()).byteLength;
1592
- if (h.isArrayBufferView(e) || h.isArrayBuffer(e))
1597
+ if (f.isArrayBufferView(e) || f.isArrayBuffer(e))
1593
1598
  return e.byteLength;
1594
- if (h.isURLSearchParams(e) && (e = e + ""), h.isString(e))
1599
+ if (f.isURLSearchParams(e) && (e = e + ""), f.isString(e))
1595
1600
  return (await Ys(e)).byteLength;
1596
1601
  }, Zs = async (e, t) => {
1597
- const n = h.toFiniteNumber(e.getContentLength());
1602
+ const n = f.toFiniteNumber(e.getContentLength());
1598
1603
  return n ?? Gs(t);
1599
1604
  }, Xs = Ve && (async (e) => {
1600
1605
  let {
@@ -1608,12 +1613,12 @@ const Gs = async (e) => {
1608
1613
  onUploadProgress: d,
1609
1614
  responseType: c,
1610
1615
  headers: u,
1611
- withCredentials: f = "same-origin",
1616
+ withCredentials: h = "same-origin",
1612
1617
  fetchOptions: y
1613
1618
  } = rr(e);
1614
1619
  c = c ? (c + "").toLowerCase() : "text";
1615
1620
  let S = Vs([o, s && s.toAbortSignal()], a), b;
1616
- const m = S && S.unsubscribe && (() => {
1621
+ const p = S && S.unsubscribe && (() => {
1617
1622
  S.unsubscribe();
1618
1623
  });
1619
1624
  let g;
@@ -1624,7 +1629,7 @@ const Gs = async (e) => {
1624
1629
  body: r,
1625
1630
  duplex: "half"
1626
1631
  }), R;
1627
- if (h.isFormData(r) && (R = O.headers.get("content-type")) && u.setContentType(R), O.body) {
1632
+ if (f.isFormData(r) && (R = O.headers.get("content-type")) && u.setContentType(R), O.body) {
1628
1633
  const [D, V] = nn(
1629
1634
  g,
1630
1635
  Le(rn(d))
@@ -1632,7 +1637,7 @@ const Gs = async (e) => {
1632
1637
  r = sn(O.body, an, D, V);
1633
1638
  }
1634
1639
  }
1635
- h.isString(f) || (f = f ? "include" : "omit");
1640
+ f.isString(h) || (h = h ? "include" : "omit");
1636
1641
  const A = "credentials" in Request.prototype;
1637
1642
  b = new Request(t, {
1638
1643
  ...y,
@@ -1641,29 +1646,29 @@ const Gs = async (e) => {
1641
1646
  headers: u.normalize().toJSON(),
1642
1647
  body: r,
1643
1648
  duplex: "half",
1644
- credentials: A ? f : void 0
1649
+ credentials: A ? h : void 0
1645
1650
  });
1646
1651
  let x = await fetch(b);
1647
1652
  const E = mt && (c === "stream" || c === "response");
1648
- if (mt && (l || E && m)) {
1653
+ if (mt && (l || E && p)) {
1649
1654
  const O = {};
1650
1655
  ["status", "statusText", "headers"].forEach((Ee) => {
1651
1656
  O[Ee] = x[Ee];
1652
1657
  });
1653
- const R = h.toFiniteNumber(x.headers.get("content-length")), [D, V] = l && nn(
1658
+ const R = f.toFiniteNumber(x.headers.get("content-length")), [D, V] = l && nn(
1654
1659
  R,
1655
1660
  Le(rn(l), !0)
1656
1661
  ) || [];
1657
1662
  x = new Response(
1658
1663
  sn(x.body, an, D, () => {
1659
- V && V(), m && m();
1664
+ V && V(), p && p();
1660
1665
  }),
1661
1666
  O
1662
1667
  );
1663
1668
  }
1664
1669
  c = c || "text";
1665
- let P = await Be[h.findKey(Be, c) || "text"](x, e);
1666
- return !E && m && m(), await new Promise((O, R) => {
1670
+ let P = await Be[f.findKey(Be, c) || "text"](x, e);
1671
+ return !E && p && p(), await new Promise((O, R) => {
1667
1672
  tr(O, R, {
1668
1673
  data: P,
1669
1674
  headers: U.from(x.headers),
@@ -1674,7 +1679,7 @@ const Gs = async (e) => {
1674
1679
  });
1675
1680
  });
1676
1681
  } catch (A) {
1677
- throw m && m(), A && A.name === "TypeError" && /fetch/i.test(A.message) ? Object.assign(
1682
+ throw p && p(), A && A.name === "TypeError" && /fetch/i.test(A.message) ? Object.assign(
1678
1683
  new C("Network Error", C.ERR_NETWORK, e, b),
1679
1684
  {
1680
1685
  cause: A.cause || A
@@ -1686,7 +1691,7 @@ const Gs = async (e) => {
1686
1691
  xhr: zs,
1687
1692
  fetch: Xs
1688
1693
  };
1689
- h.forEach(gt, (e, t) => {
1694
+ f.forEach(gt, (e, t) => {
1690
1695
  if (e) {
1691
1696
  try {
1692
1697
  Object.defineProperty(e, "name", { value: t });
@@ -1695,9 +1700,9 @@ h.forEach(gt, (e, t) => {
1695
1700
  Object.defineProperty(e, "adapterName", { value: t });
1696
1701
  }
1697
1702
  });
1698
- const ln = (e) => `- ${e}`, Qs = (e) => h.isFunction(e) || e === null || e === !1, ar = {
1703
+ const ln = (e) => `- ${e}`, Qs = (e) => f.isFunction(e) || e === null || e === !1, ar = {
1699
1704
  getAdapter: (e) => {
1700
- e = h.isArray(e) ? e : [e];
1705
+ e = f.isArray(e) ? e : [e];
1701
1706
  const { length: t } = e;
1702
1707
  let n, r;
1703
1708
  const o = {};
@@ -1833,17 +1838,17 @@ let le = class {
1833
1838
  silentJSONParsing: ne.transitional(ne.boolean),
1834
1839
  forcedJSONParsing: ne.transitional(ne.boolean),
1835
1840
  clarifyTimeoutError: ne.transitional(ne.boolean)
1836
- }, !1), o != null && (h.isFunction(o) ? n.paramsSerializer = {
1841
+ }, !1), o != null && (f.isFunction(o) ? n.paramsSerializer = {
1837
1842
  serialize: o
1838
1843
  } : bt.assertOptions(o, {
1839
1844
  encode: ne.function,
1840
1845
  serialize: ne.function
1841
1846
  }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1842
- let a = s && h.merge(
1847
+ let a = s && f.merge(
1843
1848
  s.common,
1844
1849
  s[n.method]
1845
1850
  );
1846
- s && h.forEach(
1851
+ s && f.forEach(
1847
1852
  ["delete", "get", "head", "post", "put", "patch", "common"],
1848
1853
  (b) => {
1849
1854
  delete s[b];
@@ -1851,28 +1856,28 @@ let le = class {
1851
1856
  ), n.headers = U.concat(a, s);
1852
1857
  const l = [];
1853
1858
  let d = !0;
1854
- this.interceptors.request.forEach(function(m) {
1855
- typeof m.runWhen == "function" && m.runWhen(n) === !1 || (d = d && m.synchronous, l.unshift(m.fulfilled, m.rejected));
1859
+ this.interceptors.request.forEach(function(p) {
1860
+ typeof p.runWhen == "function" && p.runWhen(n) === !1 || (d = d && p.synchronous, l.unshift(p.fulfilled, p.rejected));
1856
1861
  });
1857
1862
  const c = [];
1858
- this.interceptors.response.forEach(function(m) {
1859
- c.push(m.fulfilled, m.rejected);
1863
+ this.interceptors.response.forEach(function(p) {
1864
+ c.push(p.fulfilled, p.rejected);
1860
1865
  });
1861
- let u, f = 0, y;
1866
+ let u, h = 0, y;
1862
1867
  if (!d) {
1863
1868
  const b = [cn.bind(this), void 0];
1864
- for (b.unshift.apply(b, l), b.push.apply(b, c), y = b.length, u = Promise.resolve(n); f < y; )
1865
- u = u.then(b[f++], b[f++]);
1869
+ for (b.unshift.apply(b, l), b.push.apply(b, c), y = b.length, u = Promise.resolve(n); h < y; )
1870
+ u = u.then(b[h++], b[h++]);
1866
1871
  return u;
1867
1872
  }
1868
1873
  y = l.length;
1869
1874
  let S = n;
1870
- for (f = 0; f < y; ) {
1871
- const b = l[f++], m = l[f++];
1875
+ for (h = 0; h < y; ) {
1876
+ const b = l[h++], p = l[h++];
1872
1877
  try {
1873
1878
  S = b(S);
1874
1879
  } catch (g) {
1875
- m.call(this, g);
1880
+ p.call(this, g);
1876
1881
  break;
1877
1882
  }
1878
1883
  }
@@ -1881,8 +1886,8 @@ let le = class {
1881
1886
  } catch (b) {
1882
1887
  return Promise.reject(b);
1883
1888
  }
1884
- for (f = 0, y = c.length; f < y; )
1885
- u = u.then(c[f++], c[f++]);
1889
+ for (h = 0, y = c.length; h < y; )
1890
+ u = u.then(c[h++], c[h++]);
1886
1891
  return u;
1887
1892
  }
1888
1893
  getUri(t) {
@@ -1891,7 +1896,7 @@ let le = class {
1891
1896
  return Zn(n, t.params, t.paramsSerializer);
1892
1897
  }
1893
1898
  };
1894
- h.forEach(["delete", "get", "head", "options"], function(t) {
1899
+ f.forEach(["delete", "get", "head", "options"], function(t) {
1895
1900
  le.prototype[t] = function(n, r) {
1896
1901
  return this.request(ue(r || {}, {
1897
1902
  method: t,
@@ -1900,7 +1905,7 @@ h.forEach(["delete", "get", "head", "options"], function(t) {
1900
1905
  }));
1901
1906
  };
1902
1907
  });
1903
- h.forEach(["post", "put", "patch"], function(t) {
1908
+ f.forEach(["post", "put", "patch"], function(t) {
1904
1909
  function n(r) {
1905
1910
  return function(s, a, l) {
1906
1911
  return this.request(ue(l || {}, {
@@ -1994,7 +1999,7 @@ function na(e) {
1994
1999
  };
1995
2000
  }
1996
2001
  function ra(e) {
1997
- return h.isObject(e) && e.isAxiosError === !0;
2002
+ return f.isObject(e) && e.isAxiosError === !0;
1998
2003
  }
1999
2004
  const yt = {
2000
2005
  Continue: 100,
@@ -2066,7 +2071,7 @@ Object.entries(yt).forEach(([e, t]) => {
2066
2071
  });
2067
2072
  function cr(e) {
2068
2073
  const t = new le(e), n = Un(le.prototype.request, t);
2069
- return h.extend(n, le.prototype, t, { allOwnKeys: !0 }), h.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2074
+ return f.extend(n, le.prototype, t, { allOwnKeys: !0 }), f.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2070
2075
  return cr(ue(e, o));
2071
2076
  }, n;
2072
2077
  }
@@ -2086,7 +2091,7 @@ F.spread = na;
2086
2091
  F.isAxiosError = ra;
2087
2092
  F.mergeConfig = ue;
2088
2093
  F.AxiosHeaders = U;
2089
- F.formToJSON = (e) => Qn(h.isHTMLForm(e) ? new FormData(e) : e);
2094
+ F.formToJSON = (e) => Qn(f.isHTMLForm(e) ? new FormData(e) : e);
2090
2095
  F.getAdapter = ar.getAdapter;
2091
2096
  F.HttpStatusCode = yt;
2092
2097
  F.default = F;
@@ -2120,32 +2125,32 @@ function ce(e) {
2120
2125
  };
2121
2126
  }
2122
2127
  function Ut() {
2123
- return p.useContext(Lt).notify;
2128
+ return m.useContext(Lt).notify;
2124
2129
  }
2125
2130
  function sa() {
2126
2131
  const e = Ut();
2127
- return p.useCallback((t) => {
2132
+ return m.useCallback((t) => {
2128
2133
  ce(e)(t);
2129
2134
  }, [e]);
2130
2135
  }
2131
2136
  const aa = ({ create: e = !1 }) => {
2132
- const [t, n] = p.useState(), { id: r } = xr(), { t: o } = L(), s = Ut(), a = At(), l = te(), d = z("breakpoint", "md");
2137
+ const [t, n] = m.useState(), { id: r } = xr(), { t: o } = L(), s = Ut(), a = At(), l = te(), d = z("breakpoint", "md");
2133
2138
  Bt(
2134
2139
  t != null && t.exists ? o("Edit :model “:label“", { model: l.singular(), label: (t == null ? void 0 : t.getLabel()) || "..." }) : o("Create :model", { model: l.singular() })
2135
2140
  ), Do();
2136
- const c = k("cms").getComponent("Breadcrumbs");
2137
- p.useEffect(() => {
2141
+ const c = T("cms").getComponent("Breadcrumbs");
2142
+ m.useEffect(() => {
2138
2143
  e ? n(new l()) : l.find(r).then((S) => n(S ?? void 0));
2139
2144
  }, [r, l, e]);
2140
- const u = p.useCallback(() => {
2141
- s(o(":model saved successfully", { model: l.singular() })), t != null && t.wasRecentlyCreated && a(`/${T.kebab(l.plural())}/${t.getKey()}`);
2142
- }, [s, a, l, t, o]), f = sa(), y = p.useMemo(() => k("cms").getModelFormProps(t), [t]);
2145
+ const u = m.useCallback(() => {
2146
+ s(o(":model saved successfully", { model: l.singular() })), t != null && t.wasRecentlyCreated && a(`/${k.kebab(l.plural())}/${t.getKey()}`);
2147
+ }, [s, a, l, t, o]), h = sa(), y = m.useMemo(() => T("cms").getModelFormProps(t), [t]);
2143
2148
  return t ? /* @__PURE__ */ i(H, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: /* @__PURE__ */ w(Q, { container: !0, children: [
2144
2149
  /* @__PURE__ */ i(Q, { xs: 12, children: /* @__PURE__ */ i(
2145
2150
  c,
2146
2151
  {
2147
2152
  parts: [
2148
- { name: l.plural(), href: "/" + T.kebab(l.plural()) },
2153
+ { name: l.plural(), href: "/" + k.kebab(l.plural()) },
2149
2154
  { name: t.exists ? t.getLabel() : o("New") }
2150
2155
  ]
2151
2156
  }
@@ -2162,7 +2167,7 @@ const aa = ({ create: e = !1 }) => {
2162
2167
  ...y,
2163
2168
  item: t,
2164
2169
  onSuccess: u,
2165
- onError: f
2170
+ onError: h
2166
2171
  }
2167
2172
  )
2168
2173
  }
@@ -2172,13 +2177,13 @@ const aa = ({ create: e = !1 }) => {
2172
2177
  function ia(e) {
2173
2178
  const {
2174
2179
  setDisplacement: t
2175
- } = p.useContext(Lt), n = Ft(), r = v(), o = n.spacing(r ? 3 : 1), s = e === !1 ? o : n.spacing(e);
2176
- p.useEffect(() => (t(s), () => {
2180
+ } = m.useContext(Lt), n = Ft(), r = v(), o = n.spacing(r ? 3 : 1), s = e === !1 ? o : n.spacing(e);
2181
+ m.useEffect(() => (t(s), () => {
2177
2182
  t(o);
2178
2183
  }), [s, o, t]);
2179
2184
  }
2180
2185
  function la() {
2181
- return p.useContext(jn).dialog;
2186
+ return m.useContext(jn).dialog;
2182
2187
  }
2183
2188
  function qt() {
2184
2189
  const e = At(), t = Ut(), n = la(), { t: r } = L(), { refresh: o } = xe();
@@ -2193,25 +2198,25 @@ const ca = Z(vr)(({ theme: e }) => ({
2193
2198
  bottom: e.spacing(2),
2194
2199
  right: e.spacing(2)
2195
2200
  })), da = ({ variant: e = "default" }) => {
2196
- const t = te(), n = v(), [r] = G(), o = r.get("tab") ?? "all", [s, a] = p.useState(!1), l = p.useRef(null), [d, c] = p.useState(0), u = qt(), f = p.useMemo(() => k("cms").getStaticActions(t, o), [t, o]);
2201
+ const t = te(), n = v(), [r] = G(), o = r.get("tab") ?? "all", [s, a] = m.useState(!1), l = m.useRef(null), [d, c] = m.useState(0), u = qt(), h = m.useMemo(() => T("cms").getStaticActions(t, o), [t, o]);
2197
2202
  if (ia(
2198
- e === "fab" && f.length > 0 ? n ? 12 : 10 : !1
2199
- ), f.length === 0)
2203
+ e === "fab" && h.length > 0 ? n ? 12 : 10 : !1
2204
+ ), h.length === 0)
2200
2205
  return null;
2201
- const y = (m, g) => {
2206
+ const y = (p, g) => {
2202
2207
  c(g), a(!1);
2203
2208
  }, S = () => {
2204
- a((m) => !m);
2205
- }, b = (m) => {
2206
- l.current && l.current.contains(m.target) || a(!1);
2209
+ a((p) => !p);
2210
+ }, b = (p) => {
2211
+ l.current && l.current.contains(p.target) || a(!1);
2207
2212
  };
2208
- return e === "fab" ? f.length === 1 ? Jt.createPortal(
2213
+ return e === "fab" ? h.length === 1 ? Jt.createPortal(
2209
2214
  /* @__PURE__ */ i(
2210
2215
  ca,
2211
2216
  {
2212
2217
  color: "primary",
2213
- onClick: () => f[0].callback(u),
2214
- children: f[0].icon || f[0].label.charAt(0).toUpperCase()
2218
+ onClick: () => h[0].callback(u),
2219
+ children: h[0].icon || h[0].label.charAt(0).toUpperCase()
2215
2220
  }
2216
2221
  ),
2217
2222
  document.body
@@ -2225,14 +2230,14 @@ const ca = Z(vr)(({ theme: e }) => ({
2225
2230
  onClose: () => a(!1),
2226
2231
  onOpen: () => a(!0),
2227
2232
  open: s,
2228
- children: f.map((m) => /* @__PURE__ */ i(
2233
+ children: h.map((p) => /* @__PURE__ */ i(
2229
2234
  Br,
2230
2235
  {
2231
- icon: m.icon || m.label.charAt(0).toUpperCase(),
2232
- tooltipTitle: m.label,
2233
- onClick: () => m.callback(u)
2236
+ icon: p.icon || p.label.charAt(0).toUpperCase(),
2237
+ tooltipTitle: p.label,
2238
+ onClick: () => p.callback(u)
2234
2239
  },
2235
- m.label
2240
+ p.label
2236
2241
  ))
2237
2242
  }
2238
2243
  ),
@@ -2243,10 +2248,10 @@ const ca = Z(vr)(({ theme: e }) => ({
2243
2248
  {
2244
2249
  variant: "contained",
2245
2250
  ref: l,
2246
- "aria-label": f[d].label,
2251
+ "aria-label": h[d].label,
2247
2252
  children: [
2248
- /* @__PURE__ */ i(M, { onClick: () => f[d].callback(u), children: f[d].label }),
2249
- f.length > 1 && /* @__PURE__ */ i(
2253
+ /* @__PURE__ */ i(M, { onClick: () => h[d].callback(u), children: h[d].label }),
2254
+ h.length > 1 && /* @__PURE__ */ i(
2250
2255
  M,
2251
2256
  {
2252
2257
  variant: "contained",
@@ -2256,7 +2261,7 @@ const ca = Z(vr)(({ theme: e }) => ({
2256
2261
  "aria-label": `select ${t.singular()} actions`,
2257
2262
  "aria-haspopup": "menu",
2258
2263
  onClick: S,
2259
- children: /* @__PURE__ */ i(kn, {})
2264
+ children: /* @__PURE__ */ i(Tn, {})
2260
2265
  }
2261
2266
  )
2262
2267
  ]
@@ -2269,14 +2274,14 @@ const ca = Z(vr)(({ theme: e }) => ({
2269
2274
  anchorEl: l.current,
2270
2275
  role: void 0,
2271
2276
  transition: !0,
2272
- children: ({ TransitionProps: m, placement: g }) => /* @__PURE__ */ i(
2277
+ children: ({ TransitionProps: p, placement: g }) => /* @__PURE__ */ i(
2273
2278
  Nr,
2274
2279
  {
2275
- ...m,
2280
+ ...p,
2276
2281
  style: {
2277
2282
  transformOrigin: g === "bottom" ? "center top" : "center bottom"
2278
2283
  },
2279
- children: /* @__PURE__ */ i(Ot, { children: /* @__PURE__ */ i(jr, { onClickAway: b, children: /* @__PURE__ */ i(Ur, { id: "split-button-menu", children: f.map((A, x) => /* @__PURE__ */ i(
2284
+ children: /* @__PURE__ */ i(Ot, { children: /* @__PURE__ */ i(jr, { onClickAway: b, children: /* @__PURE__ */ i(Ur, { id: "split-button-menu", children: h.map((A, x) => /* @__PURE__ */ i(
2280
2285
  se,
2281
2286
  {
2282
2287
  selected: x === d,
@@ -2292,7 +2297,7 @@ const ca = Z(vr)(({ theme: e }) => ({
2292
2297
  ] });
2293
2298
  };
2294
2299
  function _t() {
2295
- const { open: e, setOpen: t } = p.useContext(X);
2300
+ const { open: e, setOpen: t } = m.useContext(X);
2296
2301
  return {
2297
2302
  open: e,
2298
2303
  handleDrawerOpen: () => {
@@ -2307,15 +2312,15 @@ function _t() {
2307
2312
  };
2308
2313
  }
2309
2314
  function ur() {
2310
- const { currentPage: e } = p.useContext(X);
2315
+ const { currentPage: e } = m.useContext(X);
2311
2316
  return e;
2312
2317
  }
2313
2318
  function dr() {
2314
- const { showSearch: e } = p.useContext(X);
2319
+ const { showSearch: e } = m.useContext(X);
2315
2320
  return e;
2316
2321
  }
2317
2322
  function fr() {
2318
- const { showBackButton: e } = p.useContext(X);
2323
+ const { showBackButton: e } = m.useContext(X);
2319
2324
  return e;
2320
2325
  }
2321
2326
  const fa = Z(
@@ -2345,16 +2350,16 @@ const fa = Z(
2345
2350
  ["Layout.SearchBar"]: s,
2346
2351
  ["Layout.BackButton"]: a,
2347
2352
  ["Layout.AppLogo"]: l
2348
- } = k("cms").getComponents(), { open: d } = _t(), c = dr(), u = fr(), f = z("appBar.height"), y = z("drawer.width", 280), {
2353
+ } = T("cms").getComponents(), { open: d } = _t(), c = dr(), u = fr(), h = z("appBar.height"), y = z("drawer.width", 280), {
2349
2354
  start: S = null,
2350
2355
  //: title = config('app.name', document.title),
2351
2356
  end: b = null
2352
- } = e, m = ur();
2357
+ } = e, p = ur();
2353
2358
  return /* @__PURE__ */ i(
2354
2359
  r,
2355
2360
  {
2356
2361
  open: d,
2357
- height: f,
2362
+ height: h,
2358
2363
  drawerWidth: y,
2359
2364
  ...t,
2360
2365
  children: /* @__PURE__ */ w(qr, { children: [
@@ -2368,7 +2373,7 @@ const fa = Z(
2368
2373
  variant: "h6",
2369
2374
  noWrap: !0,
2370
2375
  component: "div",
2371
- children: !n && m || oe("app.name", document.title)
2376
+ children: !n && p || oe("app.name", document.title)
2372
2377
  }
2373
2378
  ),
2374
2379
  /* @__PURE__ */ i(H, { sx: { flexGrow: 1 } }),
@@ -2442,7 +2447,7 @@ const dn = (e, t) => ({
2442
2447
  // necessary for content to be below app bar
2443
2448
  ...e.mixins.toolbar
2444
2449
  })), wa = (e) => {
2445
- const t = Ft(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ? ga : ba, a = z("drawer.width", 280), l = z("appBar.height"), d = k("cms").getComponent("RecursiveList"), c = k("cms").getMenuItems();
2450
+ const t = Ft(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ? ga : ba, a = z("drawer.width", 280), l = z("appBar.height"), d = T("cms").getComponent("RecursiveList"), c = T("cms").getMenuItems();
2446
2451
  return /* @__PURE__ */ w(
2447
2452
  s,
2448
2453
  {
@@ -2475,7 +2480,7 @@ const dn = (e, t) => ({
2475
2480
  }, Sa = () => {
2476
2481
  const e = ur(), t = z("breakpoint", "md"), n = fr(), {
2477
2482
  ["Layout.BackButton"]: r
2478
- } = k("cms").getComponents();
2483
+ } = T("cms").getComponents();
2479
2484
  return /* @__PURE__ */ w(
2480
2485
  Ot,
2481
2486
  {
@@ -2493,7 +2498,7 @@ const dn = (e, t) => ({
2493
2498
  ]
2494
2499
  }
2495
2500
  );
2496
- }, Ht = p.createContext({
2501
+ }, Ht = m.createContext({
2497
2502
  Model: null,
2498
2503
  anchorEl: null,
2499
2504
  setAnchorEl: () => {
@@ -2510,7 +2515,7 @@ const dn = (e, t) => ({
2510
2515
  },
2511
2516
  clearFilters: () => {
2512
2517
  }
2513
- }), ge = p.createContext({
2518
+ }), ge = m.createContext({
2514
2519
  key: "",
2515
2520
  type: "",
2516
2521
  operator: "",
@@ -2546,11 +2551,11 @@ const dn = (e, t) => ({
2546
2551
  return a;
2547
2552
  };
2548
2553
  function Ea(e, t) {
2549
- const n = k("filter"), { Model: r, setColumnsFilter: o } = p.useContext(Ht), [s, a] = p.useState(t.key), [l, d] = p.useState(t.operator), [c, u] = p.useState(t.type), [f, y] = p.useState(t.value), [S, b] = p.useState(t.nullable), [m, g] = p.useState(t.is_relation), A = p.useMemo(() => n.getFilterableColumns(r), [r]), x = (O) => () => {
2554
+ const n = T("filter"), { Model: r, setColumnsFilter: o } = m.useContext(Ht), [s, a] = m.useState(t.key), [l, d] = m.useState(t.operator), [c, u] = m.useState(t.type), [h, y] = m.useState(t.value), [S, b] = m.useState(t.nullable), [p, g] = m.useState(t.is_relation), A = m.useMemo(() => n.getFilterableColumns(r), [r]), x = (O) => () => {
2550
2555
  o((R) => R.filter((D, V) => V !== O));
2551
2556
  }, E = async (O) => {
2552
2557
  const R = O.target.value, D = A.find((mr) => mr.key === R), V = (D == null ? void 0 : D.type) ?? "text", Ee = (D == null ? void 0 : D.nullable) ?? !1, Wt = (D == null ? void 0 : D.is_relation) ?? !1;
2553
- Wt ? (d("relation"), y([])) : m && d("equals"), g(Wt), b(Ee), V !== c && (d("equals"), y(() => {
2558
+ Wt ? (d("relation"), y([])) : p && d("equals"), g(Wt), b(Ee), V !== c && (d("equals"), y(() => {
2554
2559
  if (["between", "notBetween"].includes(l))
2555
2560
  return [];
2556
2561
  switch (n.getInputType(V)) {
@@ -2577,17 +2582,17 @@ function Ea(e, t) {
2577
2582
  }
2578
2583
  }), d(R);
2579
2584
  };
2580
- return p.useEffect(() => {
2585
+ return m.useEffect(() => {
2581
2586
  o((O) => O.map((D, V) => e === V ? {
2582
2587
  ...D,
2583
2588
  key: s,
2584
2589
  operator: l,
2585
2590
  type: c,
2586
- value: f,
2591
+ value: h,
2587
2592
  nullable: S,
2588
- is_relation: m
2593
+ is_relation: p
2589
2594
  } : D));
2590
- }, [s, l, c, f, S, m]), {
2595
+ }, [s, l, c, h, S, p]), {
2591
2596
  columns: A,
2592
2597
  key: s,
2593
2598
  setKey: a,
@@ -2595,11 +2600,11 @@ function Ea(e, t) {
2595
2600
  setOperator: d,
2596
2601
  type: c,
2597
2602
  setType: u,
2598
- value: f,
2603
+ value: h,
2599
2604
  setValue: y,
2600
2605
  nullable: S,
2601
2606
  setNullable: b,
2602
- isRelation: m,
2607
+ isRelation: p,
2603
2608
  setIsRelation: g,
2604
2609
  handleKey: E,
2605
2610
  handleOperator: P,
@@ -2609,31 +2614,31 @@ function Ea(e, t) {
2609
2614
  const hn = async (e, t, n) => {
2610
2615
  const r = e.getSchema().relations[t].model, { data: o } = await we().make(r).get(), s = o.all().filter((c) => !n.find((u) => u.getKey() === c.getKey())), a = s.length, l = n.length, d = 15;
2611
2616
  return a + l > d ? W([...n, ...s.slice(0, d - l)]) : W([...n, ...s]);
2612
- }, Ta = async (e, t, n = "", r) => {
2617
+ }, ka = async (e, t, n = "", r) => {
2613
2618
  const o = e.getSchema().relations[t], s = we().make(o.model), a = s.getSchema().primaryKey, { data: l } = await s.searchBy(n).get();
2614
2619
  return W([...r, ...l]).unique(a);
2615
- }, ka = () => {
2620
+ }, Ta = () => {
2616
2621
  const e = v(), t = te(), {
2617
2622
  key: n,
2618
2623
  value: r,
2619
2624
  setValue: o
2620
- } = p.useContext(ge), [s, a] = p.useState(!1), [l, d] = p.useState(""), [c, u] = p.useState(W([])), [f, y] = p.useState([]), S = p.useMemo(
2625
+ } = m.useContext(ge), [s, a] = m.useState(!1), [l, d] = m.useState(""), [c, u] = m.useState(W([])), [h, y] = m.useState([]), S = m.useMemo(
2621
2626
  () => s && c.count() === 0,
2622
2627
  [s, c]
2623
- ), b = async (m, g) => {
2624
- d(g), J.isEmpty(g) || u(await Ta(t, n, g, W(f)));
2628
+ ), b = async (p, g) => {
2629
+ d(g), J.isEmpty(g) || u(await ka(t, n, g, W(h)));
2625
2630
  };
2626
- return p.useEffect(() => {
2631
+ return m.useEffect(() => {
2627
2632
  r.length > 0 && (async () => y(await Ca(t, n, r)))();
2628
- }, []), p.useEffect(() => {
2629
- let m = !0;
2633
+ }, []), m.useEffect(() => {
2634
+ let p = !0;
2630
2635
  if (S)
2631
- return (async () => m && u(await hn(t, n, f)))(), () => {
2632
- m = !1;
2636
+ return (async () => p && u(await hn(t, n, h)))(), () => {
2637
+ p = !1;
2633
2638
  };
2634
- }, [S]), p.useEffect(() => {
2635
- o(f.map((m) => m.getKey())), J.isEmpty(l) ? (async () => u(await hn(t, n, f)))() : u(W([]));
2636
- }, [f]), /* @__PURE__ */ i(
2639
+ }, [S]), m.useEffect(() => {
2640
+ o(h.map((p) => p.getKey())), J.isEmpty(l) ? (async () => u(await hn(t, n, h)))() : u(W([]));
2641
+ }, [h]), /* @__PURE__ */ i(
2637
2642
  _r,
2638
2643
  {
2639
2644
  sx: { width: e ? 377 : "100%" },
@@ -2644,20 +2649,20 @@ const hn = async (e, t, n) => {
2644
2649
  onClose: () => {
2645
2650
  a(!1);
2646
2651
  },
2647
- value: f,
2648
- onChange: (m, g) => {
2652
+ value: h,
2653
+ onChange: (p, g) => {
2649
2654
  y(g);
2650
2655
  },
2651
2656
  inputValue: l,
2652
2657
  onInputChange: b,
2653
2658
  options: c.all() || [],
2654
- getOptionLabel: (m) => m.getLabel(),
2655
- isOptionEqualToValue: (m, g) => m.getKey() === g.getKey(),
2656
- filterOptions: (m) => m,
2657
- renderInput: (m) => /* @__PURE__ */ i(
2659
+ getOptionLabel: (p) => p.getLabel(),
2660
+ isOptionEqualToValue: (p, g) => p.getKey() === g.getKey(),
2661
+ filterOptions: (p) => p,
2662
+ renderInput: (p) => /* @__PURE__ */ i(
2658
2663
  Da,
2659
2664
  {
2660
- params: m,
2665
+ params: p,
2661
2666
  loading: S
2662
2667
  }
2663
2668
  ),
@@ -2677,7 +2682,7 @@ const hn = async (e, t, n) => {
2677
2682
  label: n("Value"),
2678
2683
  InputProps: {
2679
2684
  ...e.InputProps,
2680
- endAdornment: /* @__PURE__ */ w(p.Fragment, { children: [
2685
+ endAdornment: /* @__PURE__ */ w(m.Fragment, { children: [
2681
2686
  t ? /* @__PURE__ */ i(Hr, { color: "inherit", size: 20 }) : null,
2682
2687
  e.InputProps.endAdornment
2683
2688
  ] })
@@ -2685,14 +2690,14 @@ const hn = async (e, t, n) => {
2685
2690
  }
2686
2691
  );
2687
2692
  }, tt = ({ index: e = null }) => {
2688
- const { t } = L(), n = v(), r = k("filter"), {
2693
+ const { t } = L(), n = v(), r = T("filter"), {
2689
2694
  type: o,
2690
2695
  value: s,
2691
2696
  setValue: a
2692
- } = p.useContext(ge), d = r.getInputType(o) === "datetime-local" ? 230 : 167.5, c = e !== null ? `${t("Date")} ${e + 1}` : `${t("Date")}`, u = p.useMemo(
2697
+ } = m.useContext(ge), d = r.getInputType(o) === "datetime-local" ? 230 : 167.5, c = e !== null ? `${t("Date")} ${e + 1}` : `${t("Date")}`, u = m.useMemo(
2693
2698
  () => e !== null ? s[e] : s,
2694
2699
  [s]
2695
- ), f = (y) => {
2700
+ ), h = (y) => {
2696
2701
  a(typeof e == "number" ? (S) => {
2697
2702
  const b = S;
2698
2703
  return b[e] = y.target.value, [...b];
@@ -2704,13 +2709,13 @@ const hn = async (e, t, n) => {
2704
2709
  type: r.getInputType(o),
2705
2710
  label: c,
2706
2711
  value: Oe.toDateTimeLocal(Oe.parse(u)),
2707
- onChange: f,
2712
+ onChange: h,
2708
2713
  size: "small",
2709
2714
  sx: { width: n ? d : "100%" }
2710
2715
  }
2711
2716
  );
2712
2717
  }, Oa = () => {
2713
- const e = v(), { value: t, setValue: n } = p.useContext(ge);
2718
+ const e = v(), { value: t, setValue: n } = m.useContext(ge);
2714
2719
  return /* @__PURE__ */ w(B, { children: [
2715
2720
  /* @__PURE__ */ i(
2716
2721
  zr,
@@ -2727,16 +2732,16 @@ const hn = async (e, t, n) => {
2727
2732
  e && /* @__PURE__ */ i(H, { width: 325 })
2728
2733
  ] });
2729
2734
  }, nt = ({ index: e = null }) => {
2730
- const { t } = L(), n = v(), r = k("filter"), {
2735
+ const { t } = L(), n = v(), r = T("filter"), {
2731
2736
  type: o,
2732
2737
  value: s,
2733
2738
  setValue: a
2734
- } = p.useContext(ge), l = e !== null ? `${t("Value")} ${e + 1}` : `${t("Value")}`, d = p.useMemo(
2739
+ } = m.useContext(ge), l = e !== null ? `${t("Value")} ${e + 1}` : `${t("Value")}`, d = m.useMemo(
2735
2740
  () => e !== null ? s[e] : s,
2736
2741
  [s]
2737
2742
  ), c = (u) => {
2738
- a(typeof e == "number" ? (f) => {
2739
- const y = f;
2743
+ a(typeof e == "number" ? (h) => {
2744
+ const y = h;
2740
2745
  return y[e] = u.target.value, [...y];
2741
2746
  } : u.target.value);
2742
2747
  };
@@ -2752,7 +2757,7 @@ const hn = async (e, t, n) => {
2752
2757
  }
2753
2758
  );
2754
2759
  }, rt = () => {
2755
- const e = v(), t = k("filter"), { type: n, operator: r } = p.useContext(ge), o = p.useMemo(
2760
+ const e = v(), t = T("filter"), { type: n, operator: r } = m.useContext(ge), o = m.useMemo(
2756
2761
  () => ["between", "notBetween"].includes(r),
2757
2762
  [r]
2758
2763
  );
@@ -2777,23 +2782,23 @@ const hn = async (e, t, n) => {
2777
2782
  case "datetime-local":
2778
2783
  return /* @__PURE__ */ i(tt, {});
2779
2784
  case "autocomplete":
2780
- return /* @__PURE__ */ i(ka, {});
2785
+ return /* @__PURE__ */ i(Ta, {});
2781
2786
  case "boolean":
2782
2787
  return /* @__PURE__ */ i(Oa, {});
2783
2788
  default:
2784
2789
  return /* @__PURE__ */ i(nt, {});
2785
2790
  }
2786
2791
  }, Ra = ({ index: e, column: t }) => {
2787
- const { t: n } = L(), r = v(), o = z("breakpoint", "md"), s = k("filter"), a = p.useMemo(() => s.getMatchingOperators(t), [t]), {
2792
+ const { t: n } = L(), r = v(), o = z("breakpoint", "md"), s = T("filter"), a = m.useMemo(() => s.getMatchingOperators(t), [t]), {
2788
2793
  columns: l,
2789
2794
  key: d,
2790
2795
  setKey: c,
2791
2796
  operator: u,
2792
- setOperator: f,
2797
+ setOperator: h,
2793
2798
  type: y,
2794
2799
  setType: S,
2795
2800
  value: b,
2796
- setValue: m,
2801
+ setValue: p,
2797
2802
  isRelation: g,
2798
2803
  setIsRelation: A,
2799
2804
  handleKey: x,
@@ -2809,9 +2814,9 @@ const hn = async (e, t, n) => {
2809
2814
  type: y,
2810
2815
  setType: S,
2811
2816
  operator: u,
2812
- setOperator: f,
2817
+ setOperator: h,
2813
2818
  value: b,
2814
- setValue: m,
2819
+ setValue: p,
2815
2820
  isRelation: g,
2816
2821
  setIsRelation: A
2817
2822
  },
@@ -2955,12 +2960,12 @@ const hn = async (e, t, n) => {
2955
2960
  }
2956
2961
  );
2957
2962
  }, pn = ({ dialog: e = !1 }) => {
2958
- const { t } = L(), n = v(), r = z("breakpoint", "md"), o = k("filter"), {
2963
+ const { t } = L(), n = v(), r = z("breakpoint", "md"), o = T("filter"), {
2959
2964
  columnsFilter: s,
2960
2965
  setColumnsFilter: a,
2961
2966
  handleApplyFilters: l,
2962
2967
  clearFilters: d
2963
- } = p.useContext(Ht), c = () => {
2968
+ } = m.useContext(Ht), c = () => {
2964
2969
  a((u) => [
2965
2970
  ...u,
2966
2971
  {
@@ -2982,13 +2987,13 @@ const hn = async (e, t, n) => {
2982
2987
  p: e ? 0 : 2
2983
2988
  },
2984
2989
  children: [
2985
- /* @__PURE__ */ i(N, { children: s.map((u, f, y) => {
2986
- const S = f == y.length - 1;
2990
+ /* @__PURE__ */ i(N, { children: s.map((u, h, y) => {
2991
+ const S = h == y.length - 1;
2987
2992
  return /* @__PURE__ */ w(B, { children: [
2988
2993
  /* @__PURE__ */ i(
2989
2994
  Ra,
2990
2995
  {
2991
- index: f,
2996
+ index: h,
2992
2997
  column: u
2993
2998
  },
2994
2999
  `row_${u.key}`
@@ -3086,20 +3091,20 @@ function Pa(e, t) {
3086
3091
  }), n);
3087
3092
  }
3088
3093
  const va = (e) => {
3089
- const t = k("filter"), n = new URLSearchParams();
3094
+ const t = T("filter"), n = new URLSearchParams();
3090
3095
  return e.forEach((r) => {
3091
3096
  const { key: o, operator: s, value: a, type: l } = r;
3092
3097
  let d = `:${s}`;
3093
3098
  if (["equals"].includes(s) && (d = ""), Array.isArray(a))
3094
3099
  a.forEach((c, u) => {
3095
- let f = c;
3100
+ let h = c;
3096
3101
  switch (t.getInputType(l)) {
3097
3102
  case "datetime-local": {
3098
- f = new Date(c).toISOString();
3103
+ h = new Date(c).toISOString();
3099
3104
  break;
3100
3105
  }
3101
3106
  }
3102
- n.set(`where[${o}${d}][${u}]`, f);
3107
+ n.set(`where[${o}${d}][${u}]`, h);
3103
3108
  });
3104
3109
  else {
3105
3110
  let c = a;
@@ -3113,13 +3118,13 @@ const va = (e) => {
3113
3118
  }
3114
3119
  }), n;
3115
3120
  }, Fa = () => {
3116
- const { t: e } = L(), t = k("filter"), n = v(), r = te(), [o, s] = G(), a = p.useMemo(() => "where" in mn.toObject(o), [o]), [l, d] = p.useState(null), [c, u] = p.useState([]), f = !!l, y = p.useMemo(() => t.getFilterableColumns(r), [r]), S = (x) => {
3121
+ const { t: e } = L(), t = T("filter"), n = v(), r = te(), [o, s] = G(), a = m.useMemo(() => "where" in mn.toObject(o), [o]), [l, d] = m.useState(null), [c, u] = m.useState([]), h = !!l, y = m.useMemo(() => t.getFilterableColumns(r), [r]), S = (x) => {
3117
3122
  d(x.currentTarget);
3118
3123
  }, b = () => {
3119
3124
  d(null), setTimeout(() => {
3120
3125
  u([]);
3121
3126
  }, 300);
3122
- }, m = () => {
3127
+ }, p = () => {
3123
3128
  g();
3124
3129
  const x = va(c);
3125
3130
  s(x, { replace: !0 }), b();
@@ -3135,7 +3140,7 @@ const va = (e) => {
3135
3140
  u([]);
3136
3141
  }, 300);
3137
3142
  };
3138
- return p.useEffect(() => {
3143
+ return m.useEffect(() => {
3139
3144
  const x = Pa(y, o);
3140
3145
  u(x);
3141
3146
  }, [y, o, l]), /* @__PURE__ */ w(
@@ -3149,7 +3154,7 @@ const va = (e) => {
3149
3154
  setColumnsFilter: u,
3150
3155
  searchParams: o,
3151
3156
  setSearchParams: s,
3152
- handleApplyFilters: m,
3157
+ handleApplyFilters: p,
3153
3158
  clearSearchParams: g,
3154
3159
  clearFilters: A
3155
3160
  },
@@ -3175,7 +3180,7 @@ const va = (e) => {
3175
3180
  Vr,
3176
3181
  {
3177
3182
  id: "model-filter-popover",
3178
- open: f,
3183
+ open: h,
3179
3184
  anchorEl: l,
3180
3185
  onClose: b,
3181
3186
  anchorOrigin: {
@@ -3187,11 +3192,11 @@ const va = (e) => {
3187
3192
  ) : /* @__PURE__ */ w(
3188
3193
  Et,
3189
3194
  {
3190
- open: f,
3195
+ open: h,
3191
3196
  onClose: b,
3192
3197
  fullWidth: !0,
3193
3198
  children: [
3194
- /* @__PURE__ */ w(Tt, { children: [
3199
+ /* @__PURE__ */ w(kt, { children: [
3195
3200
  e("Filter :model", { model: r.plural() }),
3196
3201
  /* @__PURE__ */ i(
3197
3202
  q,
@@ -3202,7 +3207,7 @@ const va = (e) => {
3202
3207
  }
3203
3208
  )
3204
3209
  ] }),
3205
- /* @__PURE__ */ i(kt, { dividers: !0, children: /* @__PURE__ */ i(pn, { dialog: !0 }) }),
3210
+ /* @__PURE__ */ i(Tt, { dividers: !0, children: /* @__PURE__ */ i(pn, { dialog: !0 }) }),
3206
3211
  /* @__PURE__ */ w(Dt, { children: [
3207
3212
  /* @__PURE__ */ i(
3208
3213
  M,
@@ -3216,7 +3221,7 @@ const va = (e) => {
3216
3221
  M,
3217
3222
  {
3218
3223
  variant: "contained",
3219
- onClick: m,
3224
+ onClick: p,
3220
3225
  disabled: t.checkIfCanApplyFilters(c),
3221
3226
  children: e("Apply")
3222
3227
  }
@@ -3228,7 +3233,7 @@ const va = (e) => {
3228
3233
  ]
3229
3234
  }
3230
3235
  );
3231
- }, zt = p.createContext({
3236
+ }, zt = m.createContext({
3232
3237
  columns: [],
3233
3238
  columnCount: 0,
3234
3239
  selected: W([]),
@@ -3241,7 +3246,7 @@ function Vt() {
3241
3246
  const {
3242
3247
  selected: e,
3243
3248
  items: t
3244
- } = p.useContext(zt), n = yn(e), r = () => {
3249
+ } = m.useContext(zt), n = yn(e), r = () => {
3245
3250
  e.splice(0, e.count());
3246
3251
  }, o = (c) => {
3247
3252
  const u = e.search(c);
@@ -3270,13 +3275,13 @@ function Vt() {
3270
3275
  };
3271
3276
  }
3272
3277
  function ae() {
3273
- return p.useContext(zt);
3278
+ return m.useContext(zt);
3274
3279
  }
3275
3280
  function La(e) {
3276
- const [t, n] = p.useState(""), { selected: r } = Vt(), { t: o } = L(), s = qt(), { massActions: a } = ae(), l = (c) => {
3281
+ const [t, n] = m.useState(""), { selected: r } = Vt(), { t: o } = L(), s = qt(), { massActions: a } = ae(), l = (c) => {
3277
3282
  n(c.target.value);
3278
3283
  };
3279
- if (p.useEffect(() => {
3284
+ if (m.useEffect(() => {
3280
3285
  r.isEmpty() && n("");
3281
3286
  }, [r]), a.length === 0)
3282
3287
  return null;
@@ -3352,7 +3357,7 @@ const Ba = () => {
3352
3357
  children: /* @__PURE__ */ i(Rn, {})
3353
3358
  }
3354
3359
  );
3355
- }, We = p.forwardRef(({ to: e, children: t, ...n }, r) => /* @__PURE__ */ i(
3360
+ }, We = m.forwardRef(({ to: e, children: t, ...n }, r) => /* @__PURE__ */ i(
3356
3361
  lt,
3357
3362
  {
3358
3363
  component: Pe,
@@ -3370,7 +3375,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
3370
3375
  "Last &raquo;": /* @__PURE__ */ i(Pn, {}),
3371
3376
  "&laquo; First": /* @__PURE__ */ i(vn, {})
3372
3377
  }[e] || e }) : /* @__PURE__ */ i(B, { children: e }), Ma = ({ variant: e = "default", ...t }) => {
3373
- const n = e === "default", [r, o] = G(), [s, a] = p.useState(r.get("page") || "1"), {
3378
+ const n = e === "default", [r, o] = G(), [s, a] = m.useState(r.get("page") || "1"), {
3374
3379
  links: l,
3375
3380
  meta: {
3376
3381
  current_page: d = 1,
@@ -3378,20 +3383,20 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
3378
3383
  last_page: u = 1
3379
3384
  } = {}
3380
3385
  } = xe(), {
3381
- first: f,
3386
+ first: h,
3382
3387
  prev: y,
3383
3388
  next: S,
3384
3389
  last: b
3385
- } = l || {}, m = (A) => {
3390
+ } = l || {}, p = (A) => {
3386
3391
  A.preventDefault(), o((x) => (x.set("page", s || "1"), x));
3387
3392
  }, g = [
3388
- { url: d > 1 ? f : null, label: "&laquo; First", active: !1 },
3393
+ { url: d > 1 ? h : null, label: "&laquo; First", active: !1 },
3389
3394
  { url: y, label: "&laquo; Previous", active: !1 },
3390
3395
  {
3391
3396
  element: /* @__PURE__ */ i(
3392
3397
  Ar,
3393
3398
  {
3394
- onSubmit: m,
3399
+ onSubmit: p,
3395
3400
  preventScrollReset: !0,
3396
3401
  children: /* @__PURE__ */ i(
3397
3402
  fe,
@@ -3429,7 +3434,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
3429
3434
  { url: S, label: "Next &raquo;", active: !1 },
3430
3435
  { url: d < u ? b : null, label: "Last &raquo;", active: !1 }
3431
3436
  ];
3432
- return p.useEffect(() => {
3437
+ return m.useEffect(() => {
3433
3438
  d && a(String(d));
3434
3439
  }, [d]), /* @__PURE__ */ i(
3435
3440
  N,
@@ -3484,7 +3489,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
3484
3489
  return l.set("per_page", s.target.value.toString()), l;
3485
3490
  });
3486
3491
  }, o = Ct(
3487
- k("cms"),
3492
+ T("cms"),
3488
3493
  "perPageOptions",
3489
3494
  [15, 30, 75, 150]
3490
3495
  );
@@ -3533,8 +3538,8 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
3533
3538
  );
3534
3539
  };
3535
3540
  function Ua(e, t) {
3536
- const [n, r] = p.useState(!1);
3537
- return p.useEffect(() => {
3541
+ const [n, r] = m.useState(!1);
3542
+ return m.useEffect(() => {
3538
3543
  const o = /* @__PURE__ */ new Set(), s = (l) => {
3539
3544
  o.add(l.key), e.every((d) => o.has(d)) && (r(!0), t && t());
3540
3545
  }, a = (l) => {
@@ -3556,8 +3561,8 @@ const qa = Z(fe)(({ theme: e }) => ({
3556
3561
  return e ? r.set("q", e) : r.delete("q"), r;
3557
3562
  });
3558
3563
  }, 500), Ha = () => {
3559
- const [e, t] = G(), n = e.get("q") || "", [r, o] = p.useState(n), [s, a] = p.useState(!1), l = p.useRef(null), { t: d } = L();
3560
- p.useEffect(() => {
3564
+ const [e, t] = G(), n = e.get("q") || "", [r, o] = m.useState(n), [s, a] = m.useState(!1), l = m.useRef(null), { t: d } = L();
3565
+ m.useEffect(() => {
3561
3566
  o(n);
3562
3567
  }, [n]);
3563
3568
  const c = (y) => {
@@ -3566,7 +3571,7 @@ const qa = Z(fe)(({ theme: e }) => ({
3566
3571
  Ua(["Control", "/"], () => {
3567
3572
  l.current.focus();
3568
3573
  });
3569
- const f = u ? 300 : "calc(100vw - 58px)";
3574
+ const h = u ? 300 : "calc(100vw - 58px)";
3570
3575
  return /* @__PURE__ */ w(B, { children: [
3571
3576
  !u && !s && /* @__PURE__ */ i(q, { color: "inherit", onClick: () => a(!0), children: /* @__PURE__ */ i(
3572
3577
  Rt,
@@ -3604,7 +3609,7 @@ const qa = Z(fe)(({ theme: e }) => ({
3604
3609
  },
3605
3610
  onChange: c,
3606
3611
  onBlur: () => a(!1),
3607
- sx: { width: f },
3612
+ sx: { width: h },
3608
3613
  size: "small"
3609
3614
  }
3610
3615
  )
@@ -3623,10 +3628,10 @@ const qa = Z(fe)(({ theme: e }) => ({
3623
3628
  const { t: e } = L(), [t, n] = G(), {
3624
3629
  columns: r,
3625
3630
  Model: o
3626
- } = ae(), s = t.get("order_by") || "", [a = "", l = ""] = s.split(":"), [d, c] = p.useState(a), [u, f] = p.useState(l), [y, S] = p.useState(!1), b = () => {
3631
+ } = ae(), s = t.get("order_by") || "", [a = "", l = ""] = s.split(":"), [d, c] = m.useState(a), [u, h] = m.useState(l), [y, S] = m.useState(!1), b = () => {
3627
3632
  S(!0);
3628
- }, m = () => {
3629
- S(!1), c(a), f(l);
3633
+ }, p = () => {
3634
+ S(!1), c(a), h(l);
3630
3635
  }, g = () => {
3631
3636
  if (!d || !u) {
3632
3637
  S(!1);
@@ -3640,7 +3645,7 @@ const qa = Z(fe)(({ theme: e }) => ({
3640
3645
  n((x) => {
3641
3646
  const E = new URLSearchParams(x);
3642
3647
  return E.delete("order_by"), E;
3643
- }), S(!1), c(""), f("");
3648
+ }), S(!1), c(""), h("");
3644
3649
  };
3645
3650
  return /* @__PURE__ */ w(B, { children: [
3646
3651
  /* @__PURE__ */ i(q, { onClick: b, children: /* @__PURE__ */ i(
@@ -3652,25 +3657,25 @@ const qa = Z(fe)(({ theme: e }) => ({
3652
3657
  children: /* @__PURE__ */ i(Fn, {})
3653
3658
  }
3654
3659
  ) }),
3655
- /* @__PURE__ */ w(Et, { open: y, onClose: m, fullWidth: !0, children: [
3656
- /* @__PURE__ */ w(Tt, { children: [
3660
+ /* @__PURE__ */ w(Et, { open: y, onClose: p, fullWidth: !0, children: [
3661
+ /* @__PURE__ */ w(kt, { children: [
3657
3662
  e("Sort :model", { model: o.plural() }),
3658
3663
  /* @__PURE__ */ i(
3659
3664
  q,
3660
3665
  {
3661
- onClick: m,
3666
+ onClick: p,
3662
3667
  sx: { position: "absolute", right: 8, top: 8 },
3663
3668
  children: /* @__PURE__ */ i(Ne, {})
3664
3669
  }
3665
3670
  )
3666
3671
  ] }),
3667
- /* @__PURE__ */ w(kt, { dividers: !0, children: [
3672
+ /* @__PURE__ */ w(Tt, { dividers: !0, children: [
3668
3673
  /* @__PURE__ */ w(
3669
3674
  $t,
3670
3675
  {
3671
3676
  value: d,
3672
3677
  onChange: (x) => {
3673
- c(x.target.value), u || f("asc");
3678
+ c(x.target.value), u || h("asc");
3674
3679
  },
3675
3680
  children: [
3676
3681
  /* @__PURE__ */ i($, { variant: "caption", children: e("Column") }),
@@ -3693,7 +3698,7 @@ const qa = Z(fe)(({ theme: e }) => ({
3693
3698
  $t,
3694
3699
  {
3695
3700
  value: u,
3696
- onChange: (x) => f(x.target.value),
3701
+ onChange: (x) => h(x.target.value),
3697
3702
  children: [
3698
3703
  /* @__PURE__ */ i(
3699
3704
  Ke,
@@ -3728,17 +3733,17 @@ const qa = Z(fe)(({ theme: e }) => ({
3728
3733
  ] })
3729
3734
  ] });
3730
3735
  }, Wa = ({ items: e, loading: t, children: n, error: r }) => {
3731
- const o = te(), s = p.useMemo(() => W([]), [o, e]), [a] = G(), l = a.get("tab") ?? "all", d = p.useMemo(() => [
3736
+ const o = te(), s = m.useMemo(() => W([]), [o, e]), [a] = G(), l = a.get("tab") ?? "all", d = m.useMemo(() => [
3732
3737
  {
3733
3738
  key: o.getSchema().labeledBy,
3734
- label: T.human(o.getSchema().labeledBy)
3739
+ label: k.human(o.getSchema().labeledBy)
3735
3740
  }
3736
- ], [o]), c = v(), u = p.useMemo(() => k("cms").getMassActions(o, l), [o, l]), f = Ct(
3737
- k("cms"),
3738
- `model${T.studly(o.getSchemaName())}Columns`,
3741
+ ], [o]), c = v(), u = m.useMemo(() => T("cms").getMassActions(o, l), [o, l]), h = Ct(
3742
+ T("cms"),
3743
+ `model${k.studly(o.getSchemaName())}Columns`,
3739
3744
  d
3740
- ), S = (c ? f.length : 1) + (u.length > 0 ? 2 : 1), b = {
3741
- columns: f,
3745
+ ), S = (c ? h.length : 1) + (u.length > 0 ? 2 : 1), b = {
3746
+ columns: h,
3742
3747
  columnCount: S,
3743
3748
  massActions: u,
3744
3749
  items: e,
@@ -3772,8 +3777,8 @@ const qa = Z(fe)(({ theme: e }) => ({
3772
3777
  allSelected: c,
3773
3778
  handleSelectToggleAll: u
3774
3779
  } = Vt(), {
3775
- ["ModelIndex.Table.ShrinkedCell"]: f
3776
- } = k("cms").getComponents(), y = a.get("order_by") || "", [S, b] = y.split(":"), m = (g) => () => {
3780
+ ["ModelIndex.Table.ShrinkedCell"]: h
3781
+ } = T("cms").getComponents(), y = a.get("order_by") || "", [S, b] = y.split(":"), p = (g) => () => {
3777
3782
  l(S === g ? (A) => {
3778
3783
  const x = new URLSearchParams(A);
3779
3784
  return b ? b === "desc" ? (x.delete("order_by"), x) : (x.set("order_by", `${g}:desc`), x) : (x.set("order_by", `${g}:asc`), x);
@@ -3785,7 +3790,7 @@ const qa = Z(fe)(({ theme: e }) => ({
3785
3790
  return /* @__PURE__ */ w(Kr, { ...t, children: [
3786
3791
  e,
3787
3792
  s && /* @__PURE__ */ w(he, { children: [
3788
- n.length > 0 && /* @__PURE__ */ i(f, { children: /* @__PURE__ */ i(
3793
+ n.length > 0 && /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(
3789
3794
  Pt,
3790
3795
  {
3791
3796
  indeterminate: d,
@@ -3804,7 +3809,7 @@ const qa = Z(fe)(({ theme: e }) => ({
3804
3809
  {
3805
3810
  active: x && S === g,
3806
3811
  direction: b,
3807
- onClick: m(g),
3812
+ onClick: p(g),
3808
3813
  children: [
3809
3814
  A,
3810
3815
  x && S === g ? /* @__PURE__ */ i(H, { component: "span", sx: { visibility: "hidden", display: "none" }, children: b === "desc" ? "sorted descending" : "sorted ascending" }) : null
@@ -3814,7 +3819,7 @@ const qa = Z(fe)(({ theme: e }) => ({
3814
3819
  },
3815
3820
  g
3816
3821
  )),
3817
- /* @__PURE__ */ i(f, {})
3822
+ /* @__PURE__ */ i(h, {})
3818
3823
  ] })
3819
3824
  ] });
3820
3825
  }, Ya = () => {
@@ -3824,10 +3829,10 @@ const qa = Z(fe)(({ theme: e }) => ({
3824
3829
  items: n
3825
3830
  } = ae(), r = v(), {
3826
3831
  ["ModelIndex.Table.ShrinkedCell"]: o
3827
- } = k("cms").getComponents(), s = (n == null ? void 0 : n.count()) || 15;
3832
+ } = T("cms").getComponents(), s = (n == null ? void 0 : n.count()) || 15;
3828
3833
  return /* @__PURE__ */ i(B, { children: Array.from({ length: s }).map((a, l) => /* @__PURE__ */ w(he, { children: [
3829
3834
  e.length > 0 && /* @__PURE__ */ i(o, { children: /* @__PURE__ */ i(Pt, {}) }),
3830
- r && t.map(({ key: d, label: c, sortable: u, ...f }, y) => /* @__PURE__ */ i(ee, { ...f, children: /* @__PURE__ */ i(
3835
+ r && t.map(({ key: d, label: c, sortable: u, ...h }, y) => /* @__PURE__ */ i(ee, { ...h, children: /* @__PURE__ */ i(
3831
3836
  Kt,
3832
3837
  {
3833
3838
  variant: "text",
@@ -3852,7 +3857,7 @@ const qa = Z(fe)(({ theme: e }) => ({
3852
3857
  columnCount: a
3853
3858
  } = ae(), {
3854
3859
  ["ModelIndex.StaticActions"]: l
3855
- } = k("cms").getComponents(), d = p.isValidElement(e) ? e : (o || W([])).map(e);
3860
+ } = T("cms").getComponents(), d = m.isValidElement(e) ? e : (o || W([])).map(e);
3856
3861
  return /* @__PURE__ */ i(Jr, { ...t, children: s || !(o != null && o.every((c) => c.getType() === n.getSchemaName())) ? /* @__PURE__ */ i(Ya, {}) : o && o.count() ? d : /* @__PURE__ */ i(he, { children: /* @__PURE__ */ w(ee, { colSpan: a, sx: { textAlign: "center", py: 10 }, children: [
3857
3862
  /* @__PURE__ */ i($, { children: r("No :model found", {
3858
3863
  model: n.plural().toLocaleLowerCase()
@@ -3873,7 +3878,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
3873
3878
  "& label": {
3874
3879
  fontWeight: "bold"
3875
3880
  }
3876
- })), Za = ({ content: e }) => ["string", "number"].includes(typeof e) ? /* @__PURE__ */ i(de, { children: e }) : e instanceof Date ? /* @__PURE__ */ i(de, { children: e.toLocaleString(oe("app.locale", "en")) }) : typeof e == "object" && !p.isValidElement(e) ? /* @__PURE__ */ i(de, { children: JSON.stringify(e) }) : /* @__PURE__ */ i(p.Fragment, { children: e }), Xa = ({ label: e, content: t }) => ["string", "number"].includes(typeof t) ? /* @__PURE__ */ w(de, { children: [
3881
+ })), Za = ({ content: e }) => ["string", "number"].includes(typeof e) ? /* @__PURE__ */ i(de, { children: e }) : e instanceof Date ? /* @__PURE__ */ i(de, { children: e.toLocaleString(oe("app.locale", "en")) }) : typeof e == "object" && !m.isValidElement(e) ? /* @__PURE__ */ i(de, { children: JSON.stringify(e) }) : /* @__PURE__ */ i(m.Fragment, { children: e }), Xa = ({ label: e, content: t }) => ["string", "number"].includes(typeof t) ? /* @__PURE__ */ w(de, { children: [
3877
3882
  /* @__PURE__ */ w("label", { children: [
3878
3883
  e,
3879
3884
  ":"
@@ -3886,14 +3891,14 @@ const I = St(Ga, xt), de = Z($)(() => ({
3886
3891
  ":"
3887
3892
  ] }),
3888
3893
  t.toLocaleString(oe("app.locale", "en"))
3889
- ] }) : typeof t == "object" && !p.isValidElement(t) ? /* @__PURE__ */ w(de, { children: [
3894
+ ] }) : typeof t == "object" && !m.isValidElement(t) ? /* @__PURE__ */ w(de, { children: [
3890
3895
  /* @__PURE__ */ w("label", { children: [
3891
3896
  e,
3892
3897
  ":"
3893
3898
  ] }),
3894
3899
  " ",
3895
3900
  JSON.stringify(t)
3896
- ] }) : /* @__PURE__ */ w(p.Fragment, { children: [
3901
+ ] }) : /* @__PURE__ */ w(m.Fragment, { children: [
3897
3902
  /* @__PURE__ */ i($, { sx: { display: "inline" }, children: /* @__PURE__ */ w("b", { children: [
3898
3903
  e,
3899
3904
  ":"
@@ -3901,16 +3906,16 @@ const I = St(Ga, xt), de = Z($)(() => ({
3901
3906
  " ",
3902
3907
  t
3903
3908
  ] }), Qa = ({ item: e, ...t }) => {
3904
- const n = v(), r = At(), o = te(), { massActions: s, columns: a } = ae(), l = p.useMemo(() => a.map((y) => ({
3909
+ const n = v(), r = At(), o = te(), { massActions: s, columns: a } = ae(), l = m.useMemo(() => a.map((y) => ({
3905
3910
  ...y,
3906
- content: I[`model${T.studly(e.getType())}Get${T.studly(y.key)}Content`](J.get(e, y.key), e)
3911
+ content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](J.get(e, y.key), e)
3907
3912
  //
3908
3913
  })), [a, e]), {
3909
3914
  ["ModelIndex.Table.ShrinkedCell"]: d,
3910
3915
  ["ModelIndex.InstanceActions"]: c
3911
3916
  } = I.getComponents(), {
3912
3917
  isSelected: u,
3913
- handleSelectToggle: f
3918
+ handleSelectToggle: h
3914
3919
  } = Vt();
3915
3920
  return /* @__PURE__ */ w(
3916
3921
  he,
@@ -3924,21 +3929,21 @@ const I = St(Ga, xt), de = Z($)(() => ({
3924
3929
  Pt,
3925
3930
  {
3926
3931
  checked: u(e),
3927
- onChange: () => f(e)
3932
+ onChange: () => h(e)
3928
3933
  }
3929
3934
  ) }),
3930
- n && l.map(({ key: y, label: S, sortable: b, content: m, ...g }) => /* @__PURE__ */ i(
3935
+ n && l.map(({ key: y, label: S, sortable: b, content: p, ...g }) => /* @__PURE__ */ i(
3931
3936
  ee,
3932
3937
  {
3933
3938
  ...g,
3934
3939
  onClick: () => {
3935
- e.deletedAt || r(`/${T.kebab(o.plural())}/${e.getKey()}`);
3940
+ e.deletedAt || r(`/${k.kebab(o.plural())}/${e.getKey()}`);
3936
3941
  },
3937
3942
  children: /* @__PURE__ */ i(
3938
3943
  Za,
3939
3944
  {
3940
3945
  label: S,
3941
- content: m
3946
+ content: p
3942
3947
  }
3943
3948
  )
3944
3949
  },
@@ -3949,7 +3954,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
3949
3954
  {
3950
3955
  sx: { maxWidth: 0, px: 0 },
3951
3956
  onClick: () => {
3952
- e.deletedAt || r(`/${T.kebab(o.plural())}/${e.getKey()}`);
3957
+ e.deletedAt || r(`/${k.kebab(o.plural())}/${e.getKey()}`);
3953
3958
  },
3954
3959
  children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(Xa, { ...S }, y))
3955
3960
  }
@@ -3965,7 +3970,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
3965
3970
  ["ModelIndex.Pagination"]: s,
3966
3971
  ["ModelIndex.PaginationDetails"]: a,
3967
3972
  ["ModelIndex.PerPageSwitch"]: l
3968
- } = k("cms").getComponents();
3973
+ } = T("cms").getComponents();
3969
3974
  return /* @__PURE__ */ w(Gr, { ...t, children: [
3970
3975
  /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i(ee, { colSpan: n, children: /* @__PURE__ */ w(
3971
3976
  N,
@@ -4010,7 +4015,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
4010
4015
  ["ModelIndex.Sort"]: r,
4011
4016
  ["ModelIndex.Pagination"]: o
4012
4017
  // ['ModelIndex.PaginationDetails']: PaginationDetails,
4013
- } = k("cms").getComponents(), s = v(), a = z("breakpoint", "md");
4018
+ } = T("cms").getComponents(), s = v(), a = z("breakpoint", "md");
4014
4019
  return /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i(ee, { colSpan: e, sx: { p: 1 }, children: /* @__PURE__ */ w(
4015
4020
  N,
4016
4021
  {
@@ -4057,9 +4062,9 @@ function ni() {
4057
4062
  const u = new URLSearchParams();
4058
4063
  return c !== "all" && u.set("tab", c), u;
4059
4064
  });
4060
- }, a = p.useMemo(() => e.getSchema().softDeletes ? [{ label: t("Trashed"), value: "trashed" }] : [], [e, t]), l = Ct(
4061
- k("cms"),
4062
- `model${T.studly(e.getSchemaName())}Tabs`,
4065
+ }, a = m.useMemo(() => e.getSchema().softDeletes ? [{ label: t("Trashed"), value: "trashed" }] : [], [e, t]), l = Ct(
4066
+ T("cms"),
4067
+ `model${k.studly(e.getSchemaName())}Tabs`,
4063
4068
  a
4064
4069
  );
4065
4070
  return l.length === 0 ? null : /* @__PURE__ */ i(H, { sx: { maxWidth: { xs: 320, sm: 480 }, bgcolor: "background.paper" }, children: /* @__PURE__ */ w(
@@ -4140,19 +4145,19 @@ const hr = ({
4140
4145
  onClick: n,
4141
4146
  ...r
4142
4147
  }) => {
4143
- const [o, s] = p.useState(null), [a, l] = p.useState(null), [d, c] = p.useState({}), u = z("drawer.width", 280), f = k("cms").getComponent("RecursiveMenu");
4148
+ const [o, s] = m.useState(null), [a, l] = m.useState(null), [d, c] = m.useState({}), u = z("drawer.width", 280), h = T("cms").getComponent("RecursiveMenu");
4144
4149
  return /* @__PURE__ */ w(Qr, { ...r, children: [
4145
4150
  t.map((y) => {
4146
4151
  const {
4147
4152
  text: S,
4148
4153
  icon: b,
4149
- element: m = null,
4154
+ element: p = null,
4150
4155
  key: g,
4151
4156
  children: A,
4152
4157
  to: x,
4153
4158
  onClick: E
4154
4159
  } = y;
4155
- return m || /* @__PURE__ */ w(
4160
+ return p || /* @__PURE__ */ w(
4156
4161
  eo,
4157
4162
  {
4158
4163
  disablePadding: !0,
@@ -4234,7 +4239,7 @@ const hr = ({
4234
4239
  );
4235
4240
  }),
4236
4241
  e && /* @__PURE__ */ i(
4237
- f,
4242
+ h,
4238
4243
  {
4239
4244
  items: a || [],
4240
4245
  onClick: n,
@@ -4256,14 +4261,14 @@ const hr = ({
4256
4261
  onClick: n,
4257
4262
  ...r
4258
4263
  }) => {
4259
- const [o, s] = p.useState({}), a = z("drawer.width", 280);
4264
+ const [o, s] = m.useState({}), a = z("drawer.width", 280);
4260
4265
  return /* @__PURE__ */ w(B, { children: [
4261
4266
  /* @__PURE__ */ i(En, { ...r, children: t.map((l) => {
4262
4267
  const {
4263
4268
  text: d,
4264
4269
  icon: c,
4265
4270
  element: u = null,
4266
- key: f,
4271
+ key: h,
4267
4272
  children: y,
4268
4273
  onClick: S,
4269
4274
  to: b
@@ -4271,15 +4276,15 @@ const hr = ({
4271
4276
  return u || /* @__PURE__ */ w(
4272
4277
  se,
4273
4278
  {
4274
- onClick: (m) => {
4275
- if (S && S(m), y) {
4279
+ onClick: (p) => {
4280
+ if (S && S(p), y) {
4276
4281
  s({
4277
4282
  ...o,
4278
- [f]: o[f] ? null : m.currentTarget
4283
+ [h]: o[h] ? null : p.currentTarget
4279
4284
  });
4280
4285
  return;
4281
4286
  }
4282
- n && n(m);
4287
+ n && n(p);
4283
4288
  },
4284
4289
  ...b ? {
4285
4290
  component: We,
@@ -4303,7 +4308,7 @@ const hr = ({
4303
4308
  !e && y && /* @__PURE__ */ i(Ue, {})
4304
4309
  ]
4305
4310
  },
4306
- f
4311
+ h
4307
4312
  );
4308
4313
  }) }),
4309
4314
  t.map((l) => {
@@ -4332,14 +4337,14 @@ const hr = ({
4332
4337
  title: e.getSchema().softDeletes ? s("Confirm send to trash") : s("Confirm delete permanently"),
4333
4338
  message: s(`Are you sure you want to ${a} :count :model?`, {
4334
4339
  count: t.count(),
4335
- model: T.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4340
+ model: k.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4336
4341
  }),
4337
4342
  type: "confirm"
4338
4343
  }))
4339
4344
  try {
4340
4345
  await e.delete(t.pluck(e.getSchema().primaryKey).all()), n(s(`Successfully ${l} :count :model`, {
4341
4346
  count: t.count(),
4342
- model: T.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4347
+ model: k.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4343
4348
  })), o();
4344
4349
  } catch (c) {
4345
4350
  ce(n)(c);
@@ -4350,14 +4355,14 @@ const hr = ({
4350
4355
  title: s("Confirm restore"),
4351
4356
  message: s("Are you sure you want to restore :count :model?", {
4352
4357
  count: t.count(),
4353
- model: T.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4358
+ model: k.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4354
4359
  }),
4355
4360
  type: "confirm"
4356
4361
  }))
4357
4362
  try {
4358
4363
  await e.restore(t.pluck(e.getSchema().primaryKey).all()), n(s("Successfully restored :count :model", {
4359
4364
  count: t.count(),
4360
- model: T.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4365
+ model: k.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4361
4366
  })), o();
4362
4367
  } catch (l) {
4363
4368
  ce(n)(l);
@@ -4368,14 +4373,14 @@ const hr = ({
4368
4373
  title: s("Confirm permanent deletion"),
4369
4374
  message: s("Are you sure you want to delete permanently :count :model?", {
4370
4375
  count: t.count(),
4371
- model: T.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4376
+ model: k.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4372
4377
  }),
4373
4378
  type: "confirm"
4374
4379
  }))
4375
4380
  try {
4376
4381
  await e.forceDelete(t.pluck(e.getSchema().primaryKey).all()), n(s("Successfully deleted :count :model", {
4377
4382
  count: t.count(),
4378
- model: T.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4383
+ model: k.lcfirst(t.count() === 1 ? e.singular() : e.plural())
4379
4384
  })), o();
4380
4385
  } catch (l) {
4381
4386
  ce(n)(l);
@@ -4387,7 +4392,7 @@ const hr = ({
4387
4392
  if (await r({
4388
4393
  title: e.getSchema().softDeletes ? s("Confirm send to trash") : s("Confirm permanent deletion"),
4389
4394
  message: s(`Are you sure you want to ${a}?`, {
4390
- model: T.lcfirst(e.singular()),
4395
+ model: k.lcfirst(e.singular()),
4391
4396
  label: t.getLabel()
4392
4397
  }),
4393
4398
  type: "confirm"
@@ -4405,7 +4410,7 @@ const hr = ({
4405
4410
  if (await r({
4406
4411
  title: s("Confirm restore"),
4407
4412
  message: s("Are you sure you want to restore :model “:label”?", {
4408
- model: T.lcfirst(e.singular()),
4413
+ model: k.lcfirst(e.singular()),
4409
4414
  label: t.getLabel()
4410
4415
  }),
4411
4416
  type: "confirm"
@@ -4423,7 +4428,7 @@ const hr = ({
4423
4428
  if (await r({
4424
4429
  title: s("Confirm permanent deletion"),
4425
4430
  message: s("Are you sure you want to delete :model “:label” permanently?", {
4426
- model: T.lcfirst(e.singular()),
4431
+ model: k.lcfirst(e.singular()),
4427
4432
  label: t.getLabel()
4428
4433
  }),
4429
4434
  type: "confirm"
@@ -4439,7 +4444,7 @@ const hr = ({
4439
4444
  }
4440
4445
  }, oi = {
4441
4446
  create: (e) => ({ navigate: t }) => {
4442
- t(`/${T.kebab(e.plural())}/create`);
4447
+ t(`/${k.kebab(e.plural())}/create`);
4443
4448
  }
4444
4449
  };
4445
4450
  class si {
@@ -4447,7 +4452,7 @@ class si {
4447
4452
  return "icon";
4448
4453
  }
4449
4454
  }
4450
- const Te = St(si, xt);
4455
+ const ke = St(si, xt);
4451
4456
  class ai {
4452
4457
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4453
4458
  getComponents() {
@@ -4467,21 +4472,21 @@ class ai {
4467
4472
  return this.wireModelFormProps({}, t);
4468
4473
  }
4469
4474
  getMassActions(t, n) {
4470
- return this[`mass${T.studly(t.getSchemaName())}Actions`](
4475
+ return this[`mass${k.studly(t.getSchemaName())}Actions`](
4471
4476
  this.massActions([], t, n),
4472
4477
  t,
4473
4478
  n
4474
4479
  );
4475
4480
  }
4476
4481
  getInstanceActions(t, n) {
4477
- return this[`instance${T.studly(t.getSchemaName())}Actions`](
4482
+ return this[`instance${k.studly(t.getSchemaName())}Actions`](
4478
4483
  this.instanceActions([], t, n),
4479
4484
  t,
4480
4485
  n
4481
4486
  );
4482
4487
  }
4483
4488
  getStaticActions(t, n) {
4484
- return this[`static${T.studly(t.getSchemaName())}Actions`](
4489
+ return this[`static${k.studly(t.getSchemaName())}Actions`](
4485
4490
  this.staticActions([], t, n),
4486
4491
  t,
4487
4492
  n
@@ -4543,7 +4548,7 @@ class li {
4543
4548
  r = "<=";
4544
4549
  break;
4545
4550
  default:
4546
- r = T.human(r);
4551
+ r = k.human(r);
4547
4552
  break;
4548
4553
  }
4549
4554
  return {
@@ -4558,7 +4563,7 @@ class li {
4558
4563
  let a = s.phpType ?? "string";
4559
4564
  return s.cast !== null && !J.isEmpty(s.cast) && (a = s.cast), {
4560
4565
  key: s.name,
4561
- label: T.human(s.name),
4566
+ label: k.human(s.name),
4562
4567
  type: a,
4563
4568
  nullable: s.nullable,
4564
4569
  is_relation: !1
@@ -4569,7 +4574,7 @@ class li {
4569
4574
  ...s,
4570
4575
  {
4571
4576
  key: a,
4572
- label: T.human(a),
4577
+ label: k.human(a),
4573
4578
  type: "autocomplete",
4574
4579
  nullable: !1,
4575
4580
  is_relation: !0
@@ -4609,7 +4614,7 @@ class ui {
4609
4614
  );
4610
4615
  }
4611
4616
  forModel(t, n) {
4612
- Re.reducer(`model${T.studly(t)}`, (r) => {
4617
+ Re.reducer(`model${k.studly(t)}`, (r) => {
4613
4618
  const o = this;
4614
4619
  return class extends r {
4615
4620
  static icon() {
@@ -4635,7 +4640,7 @@ class ui {
4635
4640
  }
4636
4641
  }
4637
4642
  const di = ({ item: e }) => {
4638
- const t = qt(), [n] = G(), r = n.get("tab") ?? "all", o = p.useMemo(() => k("cms").getInstanceActions(e.constructor, r), [e, r]), [s, a] = p.useState(null), l = !!s, d = (u) => {
4643
+ const t = qt(), [n] = G(), r = n.get("tab") ?? "all", o = m.useMemo(() => T("cms").getInstanceActions(e.constructor, r), [e, r]), [s, a] = m.useState(null), l = !!s, d = (u) => {
4639
4644
  a(u.currentTarget);
4640
4645
  }, c = () => {
4641
4646
  a(null);
@@ -4721,11 +4726,11 @@ const Ie = class Ie extends bn {
4721
4726
  // );
4722
4727
  // }
4723
4728
  registerIcons() {
4724
- Te.registerIcon({
4729
+ ke.registerIcon({
4725
4730
  Add: ao,
4726
4731
  AddCircleOutline: Dn,
4727
4732
  ArrowDownward: Bn,
4728
- ArrowDropDown: kn,
4733
+ ArrowDropDown: Tn,
4729
4734
  ArrowUpward: Ln,
4730
4735
  CategoryOutlined: io,
4731
4736
  ChevronLeft: je,
@@ -4743,7 +4748,7 @@ const Ie = class Ie extends bn {
4743
4748
  PeopleOutlined: co,
4744
4749
  Search: ut,
4745
4750
  SwapVert: Fn
4746
- }), Te.forModel("user", "PeopleOutlined");
4751
+ }), ke.forModel("user", "PeopleOutlined");
4747
4752
  }
4748
4753
  bootRoutes() {
4749
4754
  I.reducer("cmsRoutes", So, 0), wr.reducer("domRouterOptions", (t) => ({
@@ -4755,7 +4760,7 @@ const Ie = class Ie extends bn {
4755
4760
  I.reducer("componentMap", () => ({
4756
4761
  Layout: Eo,
4757
4762
  Dashboard: xo,
4758
- ModelIndex: ko,
4763
+ ModelIndex: To,
4759
4764
  ModelItem: aa,
4760
4765
  Error: Ao,
4761
4766
  DesktopPageTitle: Sa,
@@ -4793,12 +4798,12 @@ const Ie = class Ie extends bn {
4793
4798
  key: "dashboard",
4794
4799
  text: "Dashboard",
4795
4800
  to: "/",
4796
- icon: Te.render("DashboardOutlined")
4801
+ icon: ke.render("DashboardOutlined")
4797
4802
  },
4798
4803
  ...Object.entries(n).sort(([r], [o]) => r.localeCompare(o)).map(([r, o]) => ({
4799
4804
  key: r,
4800
4805
  text: o.plural(),
4801
- to: "/" + T.kebab(o.plural()),
4806
+ to: "/" + k.kebab(o.plural()),
4802
4807
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4803
4808
  icon: o.icon()
4804
4809
  }))
@@ -4875,7 +4880,7 @@ const Ie = class Ie extends bn {
4875
4880
  key: "create",
4876
4881
  label: `Create ${n.singular()}`,
4877
4882
  callback: oi.create(n),
4878
- icon: Te.render("Add")
4883
+ icon: ke.render("Add")
4879
4884
  }
4880
4885
  ], 0);
4881
4886
  }
@@ -4930,7 +4935,7 @@ class mi extends bn {
4930
4935
  translateModelColumns() {
4931
4936
  for (const t of Object.keys(Re.make()))
4932
4937
  I.reducer(
4933
- `model${T.studly(t)}Columns`,
4938
+ `model${k.studly(t)}Columns`,
4934
4939
  (n) => n.map((r) => ({
4935
4940
  ...r,
4936
4941
  label: Y.t(r.label)
@@ -4980,7 +4985,7 @@ class mi extends bn {
4980
4985
  );
4981
4986
  }
4982
4987
  translateFormLabels() {
4983
- Tr.reducer(
4988
+ kr.reducer(
4984
4989
  "getDefaultInputProps",
4985
4990
  (t) => Array.isArray(t) ? t.map((n) => ({
4986
4991
  ...n,
@@ -5009,13 +5014,13 @@ const gi = {
5009
5014
  providers: n,
5010
5015
  ...r
5011
5016
  }) => {
5012
- const o = Me("(prefers-color-scheme: dark)"), s = p.useMemo(() => uo({
5017
+ const o = Me("(prefers-color-scheme: dark)"), s = m.useMemo(() => uo({
5013
5018
  ...e,
5014
5019
  palette: {
5015
5020
  ...e.palette,
5016
5021
  mode: o ? "dark" : "light"
5017
5022
  }
5018
- }, ...t ?? []), [e, o, t]), a = p.useMemo(() => [
5023
+ }, ...t ?? []), [e, o, t]), a = m.useMemo(() => [
5019
5024
  wt,
5020
5025
  mi,
5021
5026
  ...n || []
@@ -5023,7 +5028,7 @@ const gi = {
5023
5028
  return /* @__PURE__ */ w(fo, { theme: s, children: [
5024
5029
  /* @__PURE__ */ i(ro, {}),
5025
5030
  /* @__PURE__ */ i(
5026
- kr,
5031
+ Tr,
5027
5032
  {
5028
5033
  routes: bi,
5029
5034
  providers: a,
@@ -5043,7 +5048,7 @@ export {
5043
5048
  wt as CmsServiceProvider,
5044
5049
  go as DialogProvider,
5045
5050
  Gi as Filter,
5046
- Te as Icon,
5051
+ ke as Icon,
5047
5052
  po as LayoutProvider,
5048
5053
  We as Link,
5049
5054
  Ji as LuminixCms,
@@ -5063,7 +5068,7 @@ export {
5063
5068
  _t as useMenu,
5064
5069
  Ut as useNotify,
5065
5070
  ur as usePageTitle,
5066
- To as useSearch,
5071
+ ko as useSearch,
5067
5072
  Vt as useSelection,
5068
5073
  Bt as useSetPageTitle,
5069
5074
  ae as useTable