@luminix/mui-cms 0.2.10 → 0.2.12
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/bundle/mui-cms.bundle.iife.js +35 -35
- package/dist/mui-cms.js +560 -557
- package/package.json +1 -1
package/dist/mui-cms.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var $e = (e, t, n) =>
|
|
4
|
-
import { Str as k, Obj as J, DateTime as Oe, Query as
|
|
5
|
-
import { config as oe, collect as W, app as T, model as we, App as xt, Model as Re, Route as
|
|
1
|
+
var br = Object.defineProperty;
|
|
2
|
+
var yr = (e, t, n) => t in e ? br(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var $e = (e, t, n) => yr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { Str as k, Obj as J, DateTime as Oe, Query as gn, Func as wr, MakeFacade as St, Reducible as bn, ServiceProvider as yn } 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 Sr, Config as re } from "@luminix/core";
|
|
6
6
|
import { jsx as i, jsxs as w, Fragment as B } from "react/jsx-runtime";
|
|
7
|
-
import { Outlet as
|
|
8
|
-
import { useCollection as
|
|
9
|
-
import { useMediaQuery as Me, Dialog as Et, DialogTitle as kt, DialogContent as Tt, DialogContentText as
|
|
10
|
-
import m, { useContext as
|
|
11
|
-
import { useTranslation as L, initReactI18next as
|
|
12
|
-
import { Close as Ne, ArrowDropDown as
|
|
13
|
-
import { useTheme as Ft, styled as Z, createTheme as
|
|
14
|
-
import
|
|
7
|
+
import { Outlet as xr, useParams as Ar, useNavigate as At, useSearchParams as G, Link as Pe, Form as Cr } from "react-router-dom";
|
|
8
|
+
import { useCollection as wn, PaginationProvider as Er, usePagination as xe, ModelForm as kr, useApplyReducers as Ct, Forms as Tr, LuminixProvider as Dr } from "@luminix/react";
|
|
9
|
+
import { useMediaQuery as Me, Dialog as Et, DialogTitle as kt, DialogContent as Tt, DialogContentText as Or, TextField as fe, DialogActions as Dt, Button as M, Snackbar as Rr, Alert as Pr, IconButton as q, AlertTitle as vr, Box as H, Unstable_Grid2 as Q, Fab as Fr, SpeedDial as Lr, SpeedDialIcon as Br, SpeedDialAction as Ir, ButtonGroup as Mr, Popper as Nr, Grow as jr, Paper as Ot, ClickAwayListener as Ur, MenuList as qr, MenuItem as se, AppBar as Sn, Toolbar as _r, Typography as $, Drawer as xn, Divider as ve, Autocomplete as Hr, CircularProgress as zr, Switch as Vr, Stack as N, FormControl as at, InputLabel as it, Select as Fe, Badge as Rt, Popover as Wr, Link as lt, Collapse as An, TableCell as ee, RadioGroup as Kt, FormControlLabel as Ke, Radio as Ye, TableContainer as $r, Table as Kr, TableHead as Yr, TableRow as he, Checkbox as Pt, TableSortLabel as Jr, Skeleton as Yt, TableBody as Gr, TableFooter as Zr, Tabs as Xr, Tab as Jt, Breadcrumbs as Qr, List as eo, ListItem as to, ListItemButton as no, ListItemIcon as Cn, ListItemText as En, Menu as kn, Avatar as ro, CssBaseline as oo } from "@mui/material";
|
|
10
|
+
import m, { useContext as Tn, useMemo as so } from "react";
|
|
11
|
+
import { useTranslation as L, initReactI18next as ao } from "react-i18next";
|
|
12
|
+
import { Close as Ne, ArrowDropDown as Dn, ChevronLeft as je, ChevronRight as Ue, HighlightOffOutlined as ct, AddCircleOutline as On, FilterList as Rn, Menu as Pn, LastPage as vn, FirstPage as Fn, Search as ut, SwapVert as Ln, ArrowUpward as Bn, ArrowDownward as In, MoreVert as vt, ExpandLess as Mn, ExpandMore as Nn, Add as io, CategoryOutlined as lo, DashboardOutlined as co, PeopleOutlined as uo } from "@mui/icons-material";
|
|
13
|
+
import { useTheme as Ft, styled as Z, createTheme as fo, ThemeProvider as ho } from "@mui/material/styles";
|
|
14
|
+
import Gt from "react-dom";
|
|
15
15
|
import Y from "i18next";
|
|
16
|
-
const
|
|
16
|
+
const po = {
|
|
17
17
|
open: !1,
|
|
18
18
|
setOpen: () => {
|
|
19
19
|
},
|
|
@@ -28,7 +28,7 @@ const ho = {
|
|
|
28
28
|
showBackButton: !1,
|
|
29
29
|
setShowBackButton: () => {
|
|
30
30
|
}
|
|
31
|
-
}, X = m.createContext(
|
|
31
|
+
}, X = m.createContext(po), Je = document.title, mo = ({ children: e }) => {
|
|
32
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,
|
|
@@ -44,23 +44,23 @@ const ho = {
|
|
|
44
44
|
return m.useEffect(() => (document.title = r ? `${r} | ${oe("app.name", Je)}` : oe("app.name", Je), () => {
|
|
45
45
|
document.title = Je;
|
|
46
46
|
}), [r]), /* @__PURE__ */ i(X.Provider, { value: h, children: e });
|
|
47
|
-
},
|
|
47
|
+
}, jn = m.createContext({
|
|
48
48
|
Model: null
|
|
49
|
-
}), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(
|
|
49
|
+
}), Ge = ({ Model: e, children: t }) => /* @__PURE__ */ i(jn.Provider, { value: { Model: e }, children: t }), Un = m.createContext({
|
|
50
50
|
isOpen: !1,
|
|
51
51
|
dialog: () => Promise.reject(new Error("Trying to access DialogContext outside of DialogProvider")),
|
|
52
52
|
dismissDialog: () => {
|
|
53
53
|
},
|
|
54
54
|
current: void 0
|
|
55
55
|
});
|
|
56
|
-
function
|
|
56
|
+
function go(e) {
|
|
57
57
|
const [t, n] = m.useState(e);
|
|
58
58
|
return m.useEffect(() => {
|
|
59
59
|
e && n(e);
|
|
60
60
|
}, [e]), e || t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const [{ current: n, resolve: r }, o] = m.useState({}), [s, a] = m.useState(""), l =
|
|
62
|
+
function bo({ children: e, ...t }) {
|
|
63
|
+
const [{ current: n, resolve: r }, o] = m.useState({}), [s, a] = m.useState(""), l = go(n), {
|
|
64
64
|
type: d = "alert",
|
|
65
65
|
dialogProps: c = {},
|
|
66
66
|
textFieldProps: u = {}
|
|
@@ -76,7 +76,7 @@ function go({ children: e, ...t }) {
|
|
|
76
76
|
d === "prompt" ? s : !0
|
|
77
77
|
), o({});
|
|
78
78
|
};
|
|
79
|
-
return /* @__PURE__ */ w(
|
|
79
|
+
return /* @__PURE__ */ w(Un.Provider, { value: {
|
|
80
80
|
isOpen: !!n,
|
|
81
81
|
current: n,
|
|
82
82
|
dialog: h,
|
|
@@ -95,7 +95,7 @@ function go({ children: e, ...t }) {
|
|
|
95
95
|
children: [
|
|
96
96
|
(l == null ? void 0 : l.title) && /* @__PURE__ */ i(kt, { id: "alert-dialog-title", children: l.title }),
|
|
97
97
|
/* @__PURE__ */ w(Tt, { children: [
|
|
98
|
-
/* @__PURE__ */ i(
|
|
98
|
+
/* @__PURE__ */ i(Or, { id: "alert-dialog-description", children: l == null ? void 0 : l.message }),
|
|
99
99
|
d === "prompt" && /* @__PURE__ */ i(
|
|
100
100
|
fe,
|
|
101
101
|
{
|
|
@@ -123,7 +123,7 @@ function go({ children: e, ...t }) {
|
|
|
123
123
|
] });
|
|
124
124
|
}
|
|
125
125
|
function v() {
|
|
126
|
-
const { isBreakpointUp: e } =
|
|
126
|
+
const { isBreakpointUp: e } = Tn(X);
|
|
127
127
|
return e;
|
|
128
128
|
}
|
|
129
129
|
const Lt = m.createContext({
|
|
@@ -137,11 +137,11 @@ const Lt = m.createContext({
|
|
|
137
137
|
displacement: "8px",
|
|
138
138
|
setDisplacement: () => {
|
|
139
139
|
}
|
|
140
|
-
}), dt = W([]),
|
|
140
|
+
}), dt = W([]), yo = (e) => {
|
|
141
141
|
dt.push(
|
|
142
142
|
typeof e == "string" ? { message: e } : e
|
|
143
143
|
);
|
|
144
|
-
},
|
|
144
|
+
}, wo = ({
|
|
145
145
|
children: e,
|
|
146
146
|
autoHideDuration: t = 6e3,
|
|
147
147
|
variant: n,
|
|
@@ -149,7 +149,7 @@ const Lt = m.createContext({
|
|
|
149
149
|
sx: o,
|
|
150
150
|
...s
|
|
151
151
|
}) => {
|
|
152
|
-
const a =
|
|
152
|
+
const a = wn(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
153
|
A !== "clickaway" && h(void 0);
|
|
154
154
|
};
|
|
155
155
|
return m.useEffect(() => {
|
|
@@ -161,7 +161,7 @@ const Lt = m.createContext({
|
|
|
161
161
|
}
|
|
162
162
|
}, [u, a]), /* @__PURE__ */ w(Lt.Provider, { value: {
|
|
163
163
|
isOpen: !!u,
|
|
164
|
-
notify:
|
|
164
|
+
notify: yo,
|
|
165
165
|
dismissNotification: p,
|
|
166
166
|
notifications: a.all(),
|
|
167
167
|
current: u,
|
|
@@ -170,7 +170,7 @@ const Lt = m.createContext({
|
|
|
170
170
|
}, children: [
|
|
171
171
|
e,
|
|
172
172
|
/* @__PURE__ */ i(
|
|
173
|
-
|
|
173
|
+
Rr,
|
|
174
174
|
{
|
|
175
175
|
open: !!u,
|
|
176
176
|
autoHideDuration: t,
|
|
@@ -182,7 +182,7 @@ const Lt = m.createContext({
|
|
|
182
182
|
},
|
|
183
183
|
...s,
|
|
184
184
|
children: u && /* @__PURE__ */ w(
|
|
185
|
-
|
|
185
|
+
Pr,
|
|
186
186
|
{
|
|
187
187
|
onClose: p,
|
|
188
188
|
severity: u.severity,
|
|
@@ -202,7 +202,7 @@ const Lt = m.createContext({
|
|
|
202
202
|
/* @__PURE__ */ i(q, { "aria-label": "close", color: "inherit", size: "small", onClick: p, children: /* @__PURE__ */ i(Ne, {}) }, "close")
|
|
203
203
|
],
|
|
204
204
|
children: [
|
|
205
|
-
u.title && /* @__PURE__ */ i(
|
|
205
|
+
u.title && /* @__PURE__ */ i(vr, { children: u.title }),
|
|
206
206
|
u.message
|
|
207
207
|
]
|
|
208
208
|
}
|
|
@@ -210,17 +210,17 @@ const Lt = m.createContext({
|
|
|
210
210
|
}
|
|
211
211
|
)
|
|
212
212
|
] });
|
|
213
|
-
},
|
|
213
|
+
}, So = ({ children: e }) => {
|
|
214
214
|
const t = Me("(prefers-color-scheme: dark)");
|
|
215
215
|
return /* @__PURE__ */ i(
|
|
216
|
-
|
|
216
|
+
wo,
|
|
217
217
|
{
|
|
218
218
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
219
219
|
variant: t ? "standard" : "filled",
|
|
220
|
-
children: /* @__PURE__ */ i(
|
|
220
|
+
children: /* @__PURE__ */ i(bo, { children: /* @__PURE__ */ i(mo, { children: e }) })
|
|
221
221
|
}
|
|
222
222
|
);
|
|
223
|
-
},
|
|
223
|
+
}, xo = (e, {
|
|
224
224
|
Layout: t,
|
|
225
225
|
Dashboard: n,
|
|
226
226
|
ModelIndex: r,
|
|
@@ -228,7 +228,7 @@ const Lt = m.createContext({
|
|
|
228
228
|
/* Error */
|
|
229
229
|
}, s) => [
|
|
230
230
|
{
|
|
231
|
-
element: /* @__PURE__ */ i(
|
|
231
|
+
element: /* @__PURE__ */ i(So, { children: /* @__PURE__ */ i(t, { children: /* @__PURE__ */ i(xr, {}) }) }),
|
|
232
232
|
// errorElement: (
|
|
233
233
|
// <Error />
|
|
234
234
|
// ),
|
|
@@ -242,7 +242,7 @@ const Lt = m.createContext({
|
|
|
242
242
|
{
|
|
243
243
|
path: "/" + k.kebab(l.plural()),
|
|
244
244
|
name: `luminix.cms.${a}.index`,
|
|
245
|
-
element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(
|
|
245
|
+
element: /* @__PURE__ */ i(Ge, { Model: l, children: /* @__PURE__ */ i(Er, { factory: l.query, children: /* @__PURE__ */ i(r, {}) }) })
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
path: "/" + k.kebab(l.plural()) + "/create",
|
|
@@ -264,10 +264,10 @@ function Bt(e) {
|
|
|
264
264
|
t("");
|
|
265
265
|
}), [e, t]);
|
|
266
266
|
}
|
|
267
|
-
const
|
|
267
|
+
const Ao = () => {
|
|
268
268
|
const { t: e } = L();
|
|
269
269
|
return Bt(e("Dashboard")), /* @__PURE__ */ i(H, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: "Dashboard" });
|
|
270
|
-
},
|
|
270
|
+
}, Co = ({ error: e }) => /* @__PURE__ */ w("div", { children: [
|
|
271
271
|
/* @__PURE__ */ i("h1", { children: "Ops..." }),
|
|
272
272
|
/* @__PURE__ */ i("p", { children: "Something went wrong" }),
|
|
273
273
|
T().hasDebugModeEnabled() && e && /* @__PURE__ */ i(B, { children: /* @__PURE__ */ w("pre", { style: { whiteSpace: "pre-wrap" }, children: [
|
|
@@ -277,14 +277,14 @@ const xo = () => {
|
|
|
277
277
|
] }) })
|
|
278
278
|
] });
|
|
279
279
|
function z(e, t) {
|
|
280
|
-
const { layout: n } =
|
|
281
|
-
return
|
|
280
|
+
const { layout: n } = Tn(X);
|
|
281
|
+
return so(() => J.get(n, e, t), [n, e, t]);
|
|
282
282
|
}
|
|
283
|
-
const
|
|
283
|
+
const Eo = Z("div")(({ theme: e }) => ({
|
|
284
284
|
padding: e.spacing(0, 1),
|
|
285
285
|
// necessary for content to be below app bar
|
|
286
286
|
...e.mixins.toolbar
|
|
287
|
-
})),
|
|
287
|
+
})), ko = ({ children: e, slotProps: t, ...n }) => {
|
|
288
288
|
const {
|
|
289
289
|
DesktopPageTitle: r,
|
|
290
290
|
["Layout.AppBar"]: o,
|
|
@@ -313,7 +313,7 @@ const Co = Z("div")(({ theme: e }) => ({
|
|
|
313
313
|
},
|
|
314
314
|
...c,
|
|
315
315
|
children: [
|
|
316
|
-
/* @__PURE__ */ i(
|
|
316
|
+
/* @__PURE__ */ i(Eo, { style: { height: a } }),
|
|
317
317
|
/* @__PURE__ */ i(r, {}),
|
|
318
318
|
e
|
|
319
319
|
]
|
|
@@ -321,23 +321,23 @@ const Co = Z("div")(({ theme: e }) => ({
|
|
|
321
321
|
)
|
|
322
322
|
] });
|
|
323
323
|
};
|
|
324
|
-
function
|
|
324
|
+
function To() {
|
|
325
325
|
const { setShowSearch: e } = m.useContext(X);
|
|
326
326
|
m.useEffect(() => (e(!0), () => {
|
|
327
327
|
e(!1);
|
|
328
328
|
}), [e]);
|
|
329
329
|
}
|
|
330
330
|
function te() {
|
|
331
|
-
const { Model: e } = m.useContext(
|
|
331
|
+
const { Model: e } = m.useContext(jn);
|
|
332
332
|
return e;
|
|
333
333
|
}
|
|
334
|
-
const
|
|
334
|
+
const Do = () => {
|
|
335
335
|
const e = te(), {
|
|
336
336
|
data: t,
|
|
337
337
|
error: n,
|
|
338
338
|
loading: r
|
|
339
339
|
} = xe();
|
|
340
|
-
Bt(e.plural()),
|
|
340
|
+
Bt(e.plural()), To();
|
|
341
341
|
const o = v(), {
|
|
342
342
|
Breadcrumbs: s,
|
|
343
343
|
["ModelIndex.Pagination"]: a,
|
|
@@ -388,39 +388,39 @@ const To = () => {
|
|
|
388
388
|
) })
|
|
389
389
|
] }) });
|
|
390
390
|
};
|
|
391
|
-
function
|
|
391
|
+
function Oo() {
|
|
392
392
|
const { setShowBackButton: e } = m.useContext(X);
|
|
393
393
|
m.useEffect(() => (e(!0), () => {
|
|
394
394
|
e(!1);
|
|
395
395
|
}), [e]);
|
|
396
396
|
}
|
|
397
|
-
function
|
|
397
|
+
function qn(e, t) {
|
|
398
398
|
return function() {
|
|
399
399
|
return e.apply(t, arguments);
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
|
-
const { toString:
|
|
403
|
-
const n =
|
|
402
|
+
const { toString: Ro } = Object.prototype, { getPrototypeOf: It } = Object, qe = /* @__PURE__ */ ((e) => (t) => {
|
|
403
|
+
const n = Ro.call(t);
|
|
404
404
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
405
405
|
})(/* @__PURE__ */ Object.create(null)), K = (e) => (e = e.toLowerCase(), (t) => qe(t) === e), _e = (e) => (t) => typeof t === e, { isArray: pe } = Array, Se = _e("undefined");
|
|
406
|
-
function
|
|
406
|
+
function Po(e) {
|
|
407
407
|
return e !== null && !Se(e) && e.constructor !== null && !Se(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
408
408
|
}
|
|
409
|
-
const
|
|
410
|
-
function
|
|
409
|
+
const _n = K("ArrayBuffer");
|
|
410
|
+
function vo(e) {
|
|
411
411
|
let t;
|
|
412
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
412
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && _n(e.buffer), t;
|
|
413
413
|
}
|
|
414
|
-
const
|
|
414
|
+
const Fo = _e("string"), _ = _e("function"), Hn = _e("number"), He = (e) => e !== null && typeof e == "object", Lo = (e) => e === !0 || e === !1, Te = (e) => {
|
|
415
415
|
if (qe(e) !== "object")
|
|
416
416
|
return !1;
|
|
417
417
|
const t = It(e);
|
|
418
418
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
419
|
-
},
|
|
419
|
+
}, Bo = K("Date"), Io = K("File"), Mo = K("Blob"), No = K("FileList"), jo = (e) => He(e) && _(e.pipe), Uo = (e) => {
|
|
420
420
|
let t;
|
|
421
421
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = qe(e)) === "formdata" || // detect form-data instance
|
|
422
422
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
423
|
-
},
|
|
423
|
+
}, qo = K("URLSearchParams"), [_o, Ho, zo, Vo] = ["ReadableStream", "Request", "Response", "Headers"].map(K), Wo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
424
424
|
function Ae(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
425
425
|
if (e === null || typeof e > "u")
|
|
426
426
|
return;
|
|
@@ -435,7 +435,7 @@ function Ae(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
435
435
|
l = s[r], t.call(null, e[l], l, e);
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function zn(e, t) {
|
|
439
439
|
t = t.toLowerCase();
|
|
440
440
|
const n = Object.keys(e);
|
|
441
441
|
let r = n.length, o;
|
|
@@ -444,23 +444,23 @@ function Hn(e, t) {
|
|
|
444
444
|
return o;
|
|
445
445
|
return null;
|
|
446
446
|
}
|
|
447
|
-
const ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
447
|
+
const ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Vn = (e) => !Se(e) && e !== ie;
|
|
448
448
|
function ft() {
|
|
449
|
-
const { caseless: e } =
|
|
450
|
-
const s = e &&
|
|
449
|
+
const { caseless: e } = Vn(this) && this || {}, t = {}, n = (r, o) => {
|
|
450
|
+
const s = e && zn(t, o) || o;
|
|
451
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;
|
|
452
452
|
};
|
|
453
453
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
454
454
|
arguments[r] && Ae(arguments[r], n);
|
|
455
455
|
return t;
|
|
456
456
|
}
|
|
457
|
-
const
|
|
458
|
-
n && _(o) ? e[s] =
|
|
459
|
-
}, { allOwnKeys: r }), e),
|
|
457
|
+
const $o = (e, t, n, { allOwnKeys: r } = {}) => (Ae(t, (o, s) => {
|
|
458
|
+
n && _(o) ? e[s] = qn(o, n) : e[s] = o;
|
|
459
|
+
}, { allOwnKeys: r }), e), Ko = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Yo = (e, t, n, r) => {
|
|
460
460
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
461
461
|
value: t.prototype
|
|
462
462
|
}), n && Object.assign(e.prototype, n);
|
|
463
|
-
},
|
|
463
|
+
}, Jo = (e, t, n, r) => {
|
|
464
464
|
let o, s, a;
|
|
465
465
|
const l = {};
|
|
466
466
|
if (t = t || {}, e == null) return t;
|
|
@@ -470,45 +470,45 @@ const Wo = (e, t, n, { allOwnKeys: r } = {}) => (Ae(t, (o, s) => {
|
|
|
470
470
|
e = n !== !1 && It(e);
|
|
471
471
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
472
472
|
return t;
|
|
473
|
-
},
|
|
473
|
+
}, Go = (e, t, n) => {
|
|
474
474
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
475
475
|
const r = e.indexOf(t, n);
|
|
476
476
|
return r !== -1 && r === n;
|
|
477
|
-
},
|
|
477
|
+
}, Zo = (e) => {
|
|
478
478
|
if (!e) return null;
|
|
479
479
|
if (pe(e)) return e;
|
|
480
480
|
let t = e.length;
|
|
481
|
-
if (!
|
|
481
|
+
if (!Hn(t)) return null;
|
|
482
482
|
const n = new Array(t);
|
|
483
483
|
for (; t-- > 0; )
|
|
484
484
|
n[t] = e[t];
|
|
485
485
|
return n;
|
|
486
|
-
},
|
|
486
|
+
}, Xo = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && It(Uint8Array)), Qo = (e, t) => {
|
|
487
487
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
488
488
|
let o;
|
|
489
489
|
for (; (o = r.next()) && !o.done; ) {
|
|
490
490
|
const s = o.value;
|
|
491
491
|
t.call(e, s[0], s[1]);
|
|
492
492
|
}
|
|
493
|
-
},
|
|
493
|
+
}, es = (e, t) => {
|
|
494
494
|
let n;
|
|
495
495
|
const r = [];
|
|
496
496
|
for (; (n = e.exec(t)) !== null; )
|
|
497
497
|
r.push(n);
|
|
498
498
|
return r;
|
|
499
|
-
},
|
|
499
|
+
}, ts = K("HTMLFormElement"), ns = (e) => e.toLowerCase().replace(
|
|
500
500
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
501
501
|
function(n, r, o) {
|
|
502
502
|
return r.toUpperCase() + o;
|
|
503
503
|
}
|
|
504
|
-
),
|
|
504
|
+
), Zt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), rs = K("RegExp"), Wn = (e, t) => {
|
|
505
505
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
506
506
|
Ae(n, (o, s) => {
|
|
507
507
|
let a;
|
|
508
508
|
(a = t(o, s, e)) !== !1 && (r[s] = a || o);
|
|
509
509
|
}), Object.defineProperties(e, r);
|
|
510
|
-
},
|
|
511
|
-
|
|
510
|
+
}, os = (e) => {
|
|
511
|
+
Wn(e, (t, n) => {
|
|
512
512
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
513
513
|
return !1;
|
|
514
514
|
const r = e[n];
|
|
@@ -522,29 +522,29 @@ const Wo = (e, t, n, { allOwnKeys: r } = {}) => (Ae(t, (o, s) => {
|
|
|
522
522
|
});
|
|
523
523
|
}
|
|
524
524
|
});
|
|
525
|
-
},
|
|
525
|
+
}, ss = (e, t) => {
|
|
526
526
|
const n = {}, r = (o) => {
|
|
527
527
|
o.forEach((s) => {
|
|
528
528
|
n[s] = !0;
|
|
529
529
|
});
|
|
530
530
|
};
|
|
531
531
|
return pe(e) ? r(e) : r(String(e).split(t)), n;
|
|
532
|
-
},
|
|
533
|
-
},
|
|
534
|
-
DIGIT:
|
|
532
|
+
}, as = () => {
|
|
533
|
+
}, is = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Ze = "abcdefghijklmnopqrstuvwxyz", Xt = "0123456789", $n = {
|
|
534
|
+
DIGIT: Xt,
|
|
535
535
|
ALPHA: Ze,
|
|
536
|
-
ALPHA_DIGIT: Ze + Ze.toUpperCase() +
|
|
537
|
-
},
|
|
536
|
+
ALPHA_DIGIT: Ze + Ze.toUpperCase() + Xt
|
|
537
|
+
}, ls = (e = 16, t = $n.ALPHA_DIGIT) => {
|
|
538
538
|
let n = "";
|
|
539
539
|
const { length: r } = t;
|
|
540
540
|
for (; e--; )
|
|
541
541
|
n += t[Math.random() * r | 0];
|
|
542
542
|
return n;
|
|
543
543
|
};
|
|
544
|
-
function
|
|
544
|
+
function cs(e) {
|
|
545
545
|
return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
546
546
|
}
|
|
547
|
-
const
|
|
547
|
+
const us = (e) => {
|
|
548
548
|
const t = new Array(10), n = (r, o) => {
|
|
549
549
|
if (He(r)) {
|
|
550
550
|
if (t.indexOf(r) >= 0)
|
|
@@ -561,72 +561,72 @@ const cs = (e) => {
|
|
|
561
561
|
return r;
|
|
562
562
|
};
|
|
563
563
|
return n(e, 0);
|
|
564
|
-
},
|
|
564
|
+
}, ds = K("AsyncFunction"), fs = (e) => e && (He(e) || _(e)) && _(e.then) && _(e.catch), Kn = ((e, t) => e ? setImmediate : t ? ((n, r) => (ie.addEventListener("message", ({ source: o, data: s }) => {
|
|
565
565
|
o === ie && s === n && r.length && r.shift()();
|
|
566
566
|
}, !1), (o) => {
|
|
567
567
|
r.push(o), ie.postMessage(n, "*");
|
|
568
568
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
569
569
|
typeof setImmediate == "function",
|
|
570
570
|
_(ie.postMessage)
|
|
571
|
-
),
|
|
571
|
+
), hs = typeof queueMicrotask < "u" ? queueMicrotask.bind(ie) : typeof process < "u" && process.nextTick || Kn, f = {
|
|
572
572
|
isArray: pe,
|
|
573
|
-
isArrayBuffer:
|
|
574
|
-
isBuffer:
|
|
575
|
-
isFormData:
|
|
576
|
-
isArrayBufferView:
|
|
577
|
-
isString:
|
|
578
|
-
isNumber:
|
|
579
|
-
isBoolean:
|
|
573
|
+
isArrayBuffer: _n,
|
|
574
|
+
isBuffer: Po,
|
|
575
|
+
isFormData: Uo,
|
|
576
|
+
isArrayBufferView: vo,
|
|
577
|
+
isString: Fo,
|
|
578
|
+
isNumber: Hn,
|
|
579
|
+
isBoolean: Lo,
|
|
580
580
|
isObject: He,
|
|
581
581
|
isPlainObject: Te,
|
|
582
|
-
isReadableStream:
|
|
583
|
-
isRequest:
|
|
584
|
-
isResponse:
|
|
585
|
-
isHeaders:
|
|
582
|
+
isReadableStream: _o,
|
|
583
|
+
isRequest: Ho,
|
|
584
|
+
isResponse: zo,
|
|
585
|
+
isHeaders: Vo,
|
|
586
586
|
isUndefined: Se,
|
|
587
|
-
isDate:
|
|
588
|
-
isFile:
|
|
589
|
-
isBlob:
|
|
590
|
-
isRegExp:
|
|
587
|
+
isDate: Bo,
|
|
588
|
+
isFile: Io,
|
|
589
|
+
isBlob: Mo,
|
|
590
|
+
isRegExp: rs,
|
|
591
591
|
isFunction: _,
|
|
592
|
-
isStream:
|
|
593
|
-
isURLSearchParams:
|
|
594
|
-
isTypedArray:
|
|
595
|
-
isFileList:
|
|
592
|
+
isStream: jo,
|
|
593
|
+
isURLSearchParams: qo,
|
|
594
|
+
isTypedArray: Xo,
|
|
595
|
+
isFileList: No,
|
|
596
596
|
forEach: Ae,
|
|
597
597
|
merge: ft,
|
|
598
|
-
extend:
|
|
599
|
-
trim:
|
|
600
|
-
stripBOM:
|
|
601
|
-
inherits:
|
|
602
|
-
toFlatObject:
|
|
598
|
+
extend: $o,
|
|
599
|
+
trim: Wo,
|
|
600
|
+
stripBOM: Ko,
|
|
601
|
+
inherits: Yo,
|
|
602
|
+
toFlatObject: Jo,
|
|
603
603
|
kindOf: qe,
|
|
604
604
|
kindOfTest: K,
|
|
605
|
-
endsWith:
|
|
606
|
-
toArray:
|
|
607
|
-
forEachEntry:
|
|
608
|
-
matchAll:
|
|
609
|
-
isHTMLForm:
|
|
610
|
-
hasOwnProperty:
|
|
611
|
-
hasOwnProp:
|
|
605
|
+
endsWith: Go,
|
|
606
|
+
toArray: Zo,
|
|
607
|
+
forEachEntry: Qo,
|
|
608
|
+
matchAll: es,
|
|
609
|
+
isHTMLForm: ts,
|
|
610
|
+
hasOwnProperty: Zt,
|
|
611
|
+
hasOwnProp: Zt,
|
|
612
612
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
613
|
-
reduceDescriptors:
|
|
614
|
-
freezeMethods:
|
|
615
|
-
toObjectSet:
|
|
616
|
-
toCamelCase:
|
|
617
|
-
noop:
|
|
618
|
-
toFiniteNumber:
|
|
619
|
-
findKey:
|
|
613
|
+
reduceDescriptors: Wn,
|
|
614
|
+
freezeMethods: os,
|
|
615
|
+
toObjectSet: ss,
|
|
616
|
+
toCamelCase: ns,
|
|
617
|
+
noop: as,
|
|
618
|
+
toFiniteNumber: is,
|
|
619
|
+
findKey: zn,
|
|
620
620
|
global: ie,
|
|
621
|
-
isContextDefined:
|
|
622
|
-
ALPHABET:
|
|
623
|
-
generateString:
|
|
624
|
-
isSpecCompliantForm:
|
|
625
|
-
toJSONObject:
|
|
626
|
-
isAsyncFn:
|
|
627
|
-
isThenable:
|
|
628
|
-
setImmediate:
|
|
629
|
-
asap:
|
|
621
|
+
isContextDefined: Vn,
|
|
622
|
+
ALPHABET: $n,
|
|
623
|
+
generateString: ls,
|
|
624
|
+
isSpecCompliantForm: cs,
|
|
625
|
+
toJSONObject: us,
|
|
626
|
+
isAsyncFn: ds,
|
|
627
|
+
isThenable: fs,
|
|
628
|
+
setImmediate: Kn,
|
|
629
|
+
asap: hs
|
|
630
630
|
};
|
|
631
631
|
function C(e, t, n, r, o) {
|
|
632
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);
|
|
@@ -652,7 +652,7 @@ f.inherits(C, Error, {
|
|
|
652
652
|
};
|
|
653
653
|
}
|
|
654
654
|
});
|
|
655
|
-
const
|
|
655
|
+
const Yn = C.prototype, Jn = {};
|
|
656
656
|
[
|
|
657
657
|
"ERR_BAD_OPTION_VALUE",
|
|
658
658
|
"ERR_BAD_OPTION",
|
|
@@ -668,32 +668,32 @@ const Kn = C.prototype, Yn = {};
|
|
|
668
668
|
"ERR_INVALID_URL"
|
|
669
669
|
// eslint-disable-next-line func-names
|
|
670
670
|
].forEach((e) => {
|
|
671
|
-
|
|
671
|
+
Jn[e] = { value: e };
|
|
672
672
|
});
|
|
673
|
-
Object.defineProperties(C,
|
|
674
|
-
Object.defineProperty(
|
|
673
|
+
Object.defineProperties(C, Jn);
|
|
674
|
+
Object.defineProperty(Yn, "isAxiosError", { value: !0 });
|
|
675
675
|
C.from = (e, t, n, r, o, s) => {
|
|
676
|
-
const a = Object.create(
|
|
676
|
+
const a = Object.create(Yn);
|
|
677
677
|
return f.toFlatObject(e, a, function(d) {
|
|
678
678
|
return d !== Error.prototype;
|
|
679
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;
|
|
680
680
|
};
|
|
681
|
-
const
|
|
681
|
+
const ps = null;
|
|
682
682
|
function ht(e) {
|
|
683
683
|
return f.isPlainObject(e) || f.isArray(e);
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Gn(e) {
|
|
686
686
|
return f.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Qt(e, t, n) {
|
|
689
689
|
return e ? e.concat(t).map(function(o, s) {
|
|
690
|
-
return o =
|
|
690
|
+
return o = Gn(o), !n && s ? "[" + o + "]" : o;
|
|
691
691
|
}).join(n ? "." : "") : t;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function ms(e) {
|
|
694
694
|
return f.isArray(e) && !e.some(ht);
|
|
695
695
|
}
|
|
696
|
-
const
|
|
696
|
+
const gs = f.toFlatObject(f, {}, null, function(t) {
|
|
697
697
|
return /^is[A-Z]/.test(t);
|
|
698
698
|
});
|
|
699
699
|
function ze(e, t, n) {
|
|
@@ -722,18 +722,18 @@ function ze(e, t, n) {
|
|
|
722
722
|
if (b && !g && typeof b == "object") {
|
|
723
723
|
if (f.endsWith(p, "{}"))
|
|
724
724
|
p = r ? p : p.slice(0, -2), b = JSON.stringify(b);
|
|
725
|
-
else if (f.isArray(b) &&
|
|
726
|
-
return p =
|
|
725
|
+
else if (f.isArray(b) && ms(b) || (f.isFileList(b) || f.endsWith(p, "[]")) && (A = f.toArray(b)))
|
|
726
|
+
return p = Gn(p), A.forEach(function(E, P) {
|
|
727
727
|
!(f.isUndefined(E) || E === null) && t.append(
|
|
728
728
|
// eslint-disable-next-line no-nested-ternary
|
|
729
|
-
a === !0 ?
|
|
729
|
+
a === !0 ? Qt([p], P, s) : a === null ? p : p + "[]",
|
|
730
730
|
c(E)
|
|
731
731
|
);
|
|
732
732
|
}), !1;
|
|
733
733
|
}
|
|
734
|
-
return ht(b) ? !0 : (t.append(
|
|
734
|
+
return ht(b) ? !0 : (t.append(Qt(g, p, s), c(b)), !1);
|
|
735
735
|
}
|
|
736
|
-
const h = [], y = Object.assign(
|
|
736
|
+
const h = [], y = Object.assign(gs, {
|
|
737
737
|
defaultVisitor: u,
|
|
738
738
|
convertValue: c,
|
|
739
739
|
isVisitable: ht
|
|
@@ -757,7 +757,7 @@ function ze(e, t, n) {
|
|
|
757
757
|
throw new TypeError("data must be an object");
|
|
758
758
|
return S(e), t;
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function en(e) {
|
|
761
761
|
const t = {
|
|
762
762
|
"!": "%21",
|
|
763
763
|
"'": "%27",
|
|
@@ -774,25 +774,25 @@ function Qt(e) {
|
|
|
774
774
|
function Mt(e, t) {
|
|
775
775
|
this._pairs = [], e && ze(e, this, t);
|
|
776
776
|
}
|
|
777
|
-
const
|
|
778
|
-
|
|
777
|
+
const Zn = Mt.prototype;
|
|
778
|
+
Zn.append = function(t, n) {
|
|
779
779
|
this._pairs.push([t, n]);
|
|
780
780
|
};
|
|
781
|
-
|
|
781
|
+
Zn.toString = function(t) {
|
|
782
782
|
const n = t ? function(r) {
|
|
783
|
-
return t.call(this, r,
|
|
784
|
-
} :
|
|
783
|
+
return t.call(this, r, en);
|
|
784
|
+
} : en;
|
|
785
785
|
return this._pairs.map(function(o) {
|
|
786
786
|
return n(o[0]) + "=" + n(o[1]);
|
|
787
787
|
}, "").join("&");
|
|
788
788
|
};
|
|
789
|
-
function
|
|
789
|
+
function bs(e) {
|
|
790
790
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function Xn(e, t, n) {
|
|
793
793
|
if (!t)
|
|
794
794
|
return e;
|
|
795
|
-
const r = n && n.encode ||
|
|
795
|
+
const r = n && n.encode || bs, o = n && n.serialize;
|
|
796
796
|
let s;
|
|
797
797
|
if (o ? s = o(t, n) : s = f.isURLSearchParams(t) ? t.toString() : new Mt(t, n).toString(r), s) {
|
|
798
798
|
const a = e.indexOf("#");
|
|
@@ -800,7 +800,7 @@ function Zn(e, t, n) {
|
|
|
800
800
|
}
|
|
801
801
|
return e;
|
|
802
802
|
}
|
|
803
|
-
class
|
|
803
|
+
class tn {
|
|
804
804
|
constructor() {
|
|
805
805
|
this.handlers = [];
|
|
806
806
|
}
|
|
@@ -854,41 +854,41 @@ class en {
|
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
|
-
const
|
|
857
|
+
const Qn = {
|
|
858
858
|
silentJSONParsing: !0,
|
|
859
859
|
forcedJSONParsing: !0,
|
|
860
860
|
clarifyTimeoutError: !1
|
|
861
|
-
},
|
|
861
|
+
}, ys = typeof URLSearchParams < "u" ? URLSearchParams : Mt, ws = typeof FormData < "u" ? FormData : null, Ss = typeof Blob < "u" ? Blob : null, xs = {
|
|
862
862
|
isBrowser: !0,
|
|
863
863
|
classes: {
|
|
864
|
-
URLSearchParams:
|
|
865
|
-
FormData:
|
|
866
|
-
Blob:
|
|
864
|
+
URLSearchParams: ys,
|
|
865
|
+
FormData: ws,
|
|
866
|
+
Blob: Ss
|
|
867
867
|
},
|
|
868
868
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
869
|
-
}, Nt = typeof window < "u" && typeof document < "u", pt = typeof navigator == "object" && navigator || void 0,
|
|
870
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
869
|
+
}, Nt = typeof window < "u" && typeof document < "u", pt = typeof navigator == "object" && navigator || void 0, As = Nt && (!pt || ["ReactNative", "NativeScript", "NS"].indexOf(pt.product) < 0), Cs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
870
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Es = Nt && window.location.href || "http://localhost", ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
871
871
|
__proto__: null,
|
|
872
872
|
hasBrowserEnv: Nt,
|
|
873
|
-
hasStandardBrowserEnv:
|
|
874
|
-
hasStandardBrowserWebWorkerEnv:
|
|
873
|
+
hasStandardBrowserEnv: As,
|
|
874
|
+
hasStandardBrowserWebWorkerEnv: Cs,
|
|
875
875
|
navigator: pt,
|
|
876
|
-
origin:
|
|
876
|
+
origin: Es
|
|
877
877
|
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
878
|
-
...
|
|
879
|
-
...
|
|
878
|
+
...ks,
|
|
879
|
+
...xs
|
|
880
880
|
};
|
|
881
|
-
function
|
|
881
|
+
function Ts(e, t) {
|
|
882
882
|
return ze(e, new j.classes.URLSearchParams(), Object.assign({
|
|
883
883
|
visitor: function(n, r, o, s) {
|
|
884
884
|
return j.isNode && f.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
885
885
|
}
|
|
886
886
|
}, t));
|
|
887
887
|
}
|
|
888
|
-
function
|
|
888
|
+
function Ds(e) {
|
|
889
889
|
return f.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function Os(e) {
|
|
892
892
|
const t = {}, n = Object.keys(e);
|
|
893
893
|
let r;
|
|
894
894
|
const o = n.length;
|
|
@@ -897,22 +897,22 @@ function Ds(e) {
|
|
|
897
897
|
s = n[r], t[s] = e[s];
|
|
898
898
|
return t;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function er(e) {
|
|
901
901
|
function t(n, r, o, s) {
|
|
902
902
|
let a = n[s++];
|
|
903
903
|
if (a === "__proto__") return !0;
|
|
904
904
|
const l = Number.isFinite(+a), d = s >= n.length;
|
|
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] =
|
|
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] = Os(o[a])), !l);
|
|
906
906
|
}
|
|
907
907
|
if (f.isFormData(e) && f.isFunction(e.entries)) {
|
|
908
908
|
const n = {};
|
|
909
909
|
return f.forEachEntry(e, (r, o) => {
|
|
910
|
-
t(
|
|
910
|
+
t(Ds(r), o, n, 0);
|
|
911
911
|
}), n;
|
|
912
912
|
}
|
|
913
913
|
return null;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function Rs(e, t, n) {
|
|
916
916
|
if (f.isString(e))
|
|
917
917
|
try {
|
|
918
918
|
return (t || JSON.parse)(e), f.trim(e);
|
|
@@ -923,12 +923,12 @@ function Os(e, t, n) {
|
|
|
923
923
|
return (0, JSON.stringify)(e);
|
|
924
924
|
}
|
|
925
925
|
const Ce = {
|
|
926
|
-
transitional:
|
|
926
|
+
transitional: Qn,
|
|
927
927
|
adapter: ["xhr", "http", "fetch"],
|
|
928
928
|
transformRequest: [function(t, n) {
|
|
929
929
|
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = f.isObject(t);
|
|
930
930
|
if (s && f.isHTMLForm(t) && (t = new FormData(t)), f.isFormData(t))
|
|
931
|
-
return o ? JSON.stringify(
|
|
931
|
+
return o ? JSON.stringify(er(t)) : t;
|
|
932
932
|
if (f.isArrayBuffer(t) || f.isBuffer(t) || f.isStream(t) || f.isFile(t) || f.isBlob(t) || f.isReadableStream(t))
|
|
933
933
|
return t;
|
|
934
934
|
if (f.isArrayBufferView(t))
|
|
@@ -938,7 +938,7 @@ const Ce = {
|
|
|
938
938
|
let l;
|
|
939
939
|
if (s) {
|
|
940
940
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
941
|
-
return
|
|
941
|
+
return Ts(t, this.formSerializer).toString();
|
|
942
942
|
if ((l = f.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
943
943
|
const d = this.env && this.env.FormData;
|
|
944
944
|
return ze(
|
|
@@ -948,7 +948,7 @@ const Ce = {
|
|
|
948
948
|
);
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
return s || o ? (n.setContentType("application/json", !1),
|
|
951
|
+
return s || o ? (n.setContentType("application/json", !1), Rs(t)) : t;
|
|
952
952
|
}],
|
|
953
953
|
transformResponse: [function(t) {
|
|
954
954
|
const n = this.transitional || Ce.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
@@ -991,7 +991,7 @@ const Ce = {
|
|
|
991
991
|
f.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
992
992
|
Ce.headers[e] = {};
|
|
993
993
|
});
|
|
994
|
-
const
|
|
994
|
+
const Ps = f.toObjectSet([
|
|
995
995
|
"age",
|
|
996
996
|
"authorization",
|
|
997
997
|
"content-length",
|
|
@@ -1009,28 +1009,28 @@ const Rs = f.toObjectSet([
|
|
|
1009
1009
|
"referer",
|
|
1010
1010
|
"retry-after",
|
|
1011
1011
|
"user-agent"
|
|
1012
|
-
]),
|
|
1012
|
+
]), vs = (e) => {
|
|
1013
1013
|
const t = {};
|
|
1014
1014
|
let n, r, o;
|
|
1015
1015
|
return e && e.split(`
|
|
1016
1016
|
`).forEach(function(a) {
|
|
1017
|
-
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] &&
|
|
1017
|
+
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && Ps[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
1018
1018
|
}), t;
|
|
1019
|
-
},
|
|
1019
|
+
}, nn = Symbol("internals");
|
|
1020
1020
|
function be(e) {
|
|
1021
1021
|
return e && String(e).trim().toLowerCase();
|
|
1022
1022
|
}
|
|
1023
1023
|
function De(e) {
|
|
1024
1024
|
return e === !1 || e == null ? e : f.isArray(e) ? e.map(De) : String(e);
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function Fs(e) {
|
|
1027
1027
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1028
1028
|
let r;
|
|
1029
1029
|
for (; r = n.exec(e); )
|
|
1030
1030
|
t[r[1]] = r[2];
|
|
1031
1031
|
return t;
|
|
1032
1032
|
}
|
|
1033
|
-
const
|
|
1033
|
+
const Ls = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1034
1034
|
function Xe(e, t, n, r, o) {
|
|
1035
1035
|
if (f.isFunction(r))
|
|
1036
1036
|
return r.call(this, t, n);
|
|
@@ -1041,10 +1041,10 @@ function Xe(e, t, n, r, o) {
|
|
|
1041
1041
|
return r.test(t);
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function Bs(e) {
|
|
1045
1045
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function Is(e, t) {
|
|
1048
1048
|
const n = f.toCamelCase(" " + t);
|
|
1049
1049
|
["get", "set", "has"].forEach((r) => {
|
|
1050
1050
|
Object.defineProperty(e, r + n, {
|
|
@@ -1071,8 +1071,8 @@ let U = class {
|
|
|
1071
1071
|
const a = (l, d) => f.forEach(l, (c, u) => s(c, u, d));
|
|
1072
1072
|
if (f.isPlainObject(t) || t instanceof this.constructor)
|
|
1073
1073
|
a(t, n);
|
|
1074
|
-
else if (f.isString(t) && (t = t.trim()) && !
|
|
1075
|
-
a(
|
|
1074
|
+
else if (f.isString(t) && (t = t.trim()) && !Ls(t))
|
|
1075
|
+
a(vs(t), n);
|
|
1076
1076
|
else if (f.isHeaders(t))
|
|
1077
1077
|
for (const [l, d] of t.entries())
|
|
1078
1078
|
s(d, l, r);
|
|
@@ -1088,7 +1088,7 @@ let U = class {
|
|
|
1088
1088
|
if (!n)
|
|
1089
1089
|
return o;
|
|
1090
1090
|
if (n === !0)
|
|
1091
|
-
return
|
|
1091
|
+
return Fs(o);
|
|
1092
1092
|
if (f.isFunction(n))
|
|
1093
1093
|
return n.call(this, o, r);
|
|
1094
1094
|
if (f.isRegExp(n))
|
|
@@ -1132,7 +1132,7 @@ let U = class {
|
|
|
1132
1132
|
n[a] = De(o), delete n[s];
|
|
1133
1133
|
return;
|
|
1134
1134
|
}
|
|
1135
|
-
const l = t ?
|
|
1135
|
+
const l = t ? Bs(s) : String(s).trim();
|
|
1136
1136
|
l !== s && delete n[s], n[l] = De(o), r[l] = !0;
|
|
1137
1137
|
}), this;
|
|
1138
1138
|
}
|
|
@@ -1163,12 +1163,12 @@ let U = class {
|
|
|
1163
1163
|
return n.forEach((o) => r.set(o)), r;
|
|
1164
1164
|
}
|
|
1165
1165
|
static accessor(t) {
|
|
1166
|
-
const r = (this[
|
|
1166
|
+
const r = (this[nn] = this[nn] = {
|
|
1167
1167
|
accessors: {}
|
|
1168
1168
|
}).accessors, o = this.prototype;
|
|
1169
1169
|
function s(a) {
|
|
1170
1170
|
const l = be(a);
|
|
1171
|
-
r[l] || (
|
|
1171
|
+
r[l] || (Is(o, a), r[l] = !0);
|
|
1172
1172
|
}
|
|
1173
1173
|
return f.isArray(t) ? t.forEach(s) : s(t), this;
|
|
1174
1174
|
}
|
|
@@ -1191,7 +1191,7 @@ function Qe(e, t) {
|
|
|
1191
1191
|
s = l.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
1192
1192
|
}), o.normalize(), s;
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1194
|
+
function tr(e) {
|
|
1195
1195
|
return !!(e && e.__CANCEL__);
|
|
1196
1196
|
}
|
|
1197
1197
|
function me(e, t, n) {
|
|
@@ -1200,7 +1200,7 @@ function me(e, t, n) {
|
|
|
1200
1200
|
f.inherits(me, C, {
|
|
1201
1201
|
__CANCEL__: !0
|
|
1202
1202
|
});
|
|
1203
|
-
function
|
|
1203
|
+
function nr(e, t, n) {
|
|
1204
1204
|
const r = n.config.validateStatus;
|
|
1205
1205
|
!n.status || !r || r(n.status) ? e(n) : t(new C(
|
|
1206
1206
|
"Request failed with status code " + n.status,
|
|
@@ -1210,11 +1210,11 @@ function tr(e, t, n) {
|
|
|
1210
1210
|
n
|
|
1211
1211
|
));
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function Ms(e) {
|
|
1214
1214
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1215
1215
|
return t && t[1] || "";
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Ns(e, t) {
|
|
1218
1218
|
e = e || 10;
|
|
1219
1219
|
const n = new Array(e), r = new Array(e);
|
|
1220
1220
|
let o = 0, s = 0, a;
|
|
@@ -1230,7 +1230,7 @@ function Ms(e, t) {
|
|
|
1230
1230
|
return S ? Math.round(y * 1e3 / S) : void 0;
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1233
|
+
function js(e, t) {
|
|
1234
1234
|
let n = 0, r = 1e3 / t, o, s;
|
|
1235
1235
|
const a = (c, u = Date.now()) => {
|
|
1236
1236
|
n = u, o = null, s && (clearTimeout(s), s = null), e.apply(null, c);
|
|
@@ -1244,8 +1244,8 @@ function Ns(e, t) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
const Le = (e, t, n = 3) => {
|
|
1246
1246
|
let r = 0;
|
|
1247
|
-
const o =
|
|
1248
|
-
return
|
|
1247
|
+
const o = Ns(50, 250);
|
|
1248
|
+
return js((s) => {
|
|
1249
1249
|
const a = s.loaded, l = s.lengthComputable ? s.total : void 0, d = a - r, c = o(d), u = a <= l;
|
|
1250
1250
|
r = a;
|
|
1251
1251
|
const h = {
|
|
@@ -1261,14 +1261,14 @@ const Le = (e, t, n = 3) => {
|
|
|
1261
1261
|
};
|
|
1262
1262
|
e(h);
|
|
1263
1263
|
}, n);
|
|
1264
|
-
},
|
|
1264
|
+
}, rn = (e, t) => {
|
|
1265
1265
|
const n = e != null;
|
|
1266
1266
|
return [(r) => t[0]({
|
|
1267
1267
|
lengthComputable: n,
|
|
1268
1268
|
total: e,
|
|
1269
1269
|
loaded: r
|
|
1270
1270
|
}), t[1]];
|
|
1271
|
-
},
|
|
1271
|
+
}, on = (e) => (...t) => f.asap(() => e(...t)), Us = j.hasStandardBrowserEnv ? (
|
|
1272
1272
|
// Standard browser envs have full support of the APIs needed to test
|
|
1273
1273
|
// whether the request URL is of the same origin as current location.
|
|
1274
1274
|
function() {
|
|
@@ -1299,7 +1299,7 @@ const Le = (e, t, n = 3) => {
|
|
|
1299
1299
|
return !0;
|
|
1300
1300
|
};
|
|
1301
1301
|
}()
|
|
1302
|
-
),
|
|
1302
|
+
), qs = j.hasStandardBrowserEnv ? (
|
|
1303
1303
|
// Standard browser envs support document.cookie
|
|
1304
1304
|
{
|
|
1305
1305
|
write(e, t, n, r, o, s) {
|
|
@@ -1326,16 +1326,16 @@ const Le = (e, t, n = 3) => {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
1328
|
);
|
|
1329
|
-
function
|
|
1329
|
+
function _s(e) {
|
|
1330
1330
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1332
|
+
function Hs(e, t) {
|
|
1333
1333
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1336
|
-
return e && !
|
|
1335
|
+
function rr(e, t) {
|
|
1336
|
+
return e && !_s(t) ? Hs(e, t) : t;
|
|
1337
1337
|
}
|
|
1338
|
-
const
|
|
1338
|
+
const sn = (e) => e instanceof U ? { ...e } : e;
|
|
1339
1339
|
function ue(e, t) {
|
|
1340
1340
|
t = t || {};
|
|
1341
1341
|
const n = {};
|
|
@@ -1393,17 +1393,17 @@ function ue(e, t) {
|
|
|
1393
1393
|
socketPath: a,
|
|
1394
1394
|
responseEncoding: a,
|
|
1395
1395
|
validateStatus: l,
|
|
1396
|
-
headers: (c, u) => o(
|
|
1396
|
+
headers: (c, u) => o(sn(c), sn(u), !0)
|
|
1397
1397
|
};
|
|
1398
1398
|
return f.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1399
1399
|
const h = d[u] || o, y = h(e[u], t[u], u);
|
|
1400
1400
|
f.isUndefined(y) && h !== l || (n[u] = y);
|
|
1401
1401
|
}), n;
|
|
1402
1402
|
}
|
|
1403
|
-
const
|
|
1403
|
+
const or = (e) => {
|
|
1404
1404
|
const t = ue({}, e);
|
|
1405
1405
|
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: l } = t;
|
|
1406
|
-
t.headers = a = U.from(a), t.url =
|
|
1406
|
+
t.headers = a = U.from(a), t.url = Xn(rr(t.baseURL, t.url), e.params, e.paramsSerializer), l && a.set(
|
|
1407
1407
|
"Authorization",
|
|
1408
1408
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1409
1409
|
);
|
|
@@ -1416,14 +1416,14 @@ const rr = (e) => {
|
|
|
1416
1416
|
a.setContentType([c || "multipart/form-data", ...u].join("; "));
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
if (j.hasStandardBrowserEnv && (r && f.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1420
|
-
const c = o && s &&
|
|
1419
|
+
if (j.hasStandardBrowserEnv && (r && f.isFunction(r) && (r = r(t)), r || r !== !1 && Us(t.url))) {
|
|
1420
|
+
const c = o && s && qs.read(s);
|
|
1421
1421
|
c && a.set(o, c);
|
|
1422
1422
|
}
|
|
1423
1423
|
return t;
|
|
1424
|
-
},
|
|
1424
|
+
}, zs = typeof XMLHttpRequest < "u", Vs = zs && function(e) {
|
|
1425
1425
|
return new Promise(function(n, r) {
|
|
1426
|
-
const o =
|
|
1426
|
+
const o = or(e);
|
|
1427
1427
|
let s = o.data;
|
|
1428
1428
|
const a = U.from(o.headers).normalize();
|
|
1429
1429
|
let { responseType: l, onUploadProgress: d, onDownloadProgress: c } = o, u, h, y, S, b;
|
|
@@ -1445,7 +1445,7 @@ const rr = (e) => {
|
|
|
1445
1445
|
config: e,
|
|
1446
1446
|
request: g
|
|
1447
1447
|
};
|
|
1448
|
-
|
|
1448
|
+
nr(function(D) {
|
|
1449
1449
|
n(D), p();
|
|
1450
1450
|
}, function(D) {
|
|
1451
1451
|
r(D), p();
|
|
@@ -1459,7 +1459,7 @@ const rr = (e) => {
|
|
|
1459
1459
|
r(new C("Network Error", C.ERR_NETWORK, e, g)), g = null;
|
|
1460
1460
|
}, g.ontimeout = function() {
|
|
1461
1461
|
let P = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1462
|
-
const O = o.transitional ||
|
|
1462
|
+
const O = o.transitional || Qn;
|
|
1463
1463
|
o.timeoutErrorMessage && (P = o.timeoutErrorMessage), r(new C(
|
|
1464
1464
|
P,
|
|
1465
1465
|
O.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED,
|
|
@@ -1471,14 +1471,14 @@ const rr = (e) => {
|
|
|
1471
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) => {
|
|
1472
1472
|
g && (r(!E || E.type ? new me(null, e, g) : E), g.abort(), g = null);
|
|
1473
1473
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1474
|
-
const x =
|
|
1474
|
+
const x = Ms(o.url);
|
|
1475
1475
|
if (x && j.protocols.indexOf(x) === -1) {
|
|
1476
1476
|
r(new C("Unsupported protocol " + x + ":", C.ERR_BAD_REQUEST, e));
|
|
1477
1477
|
return;
|
|
1478
1478
|
}
|
|
1479
1479
|
g.send(s || null);
|
|
1480
1480
|
});
|
|
1481
|
-
},
|
|
1481
|
+
}, Ws = (e, t) => {
|
|
1482
1482
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1483
1483
|
if (t || n) {
|
|
1484
1484
|
let r = new AbortController(), o;
|
|
@@ -1501,7 +1501,7 @@ const rr = (e) => {
|
|
|
1501
1501
|
const { signal: d } = r;
|
|
1502
1502
|
return d.unsubscribe = () => f.asap(l), d;
|
|
1503
1503
|
}
|
|
1504
|
-
},
|
|
1504
|
+
}, $s = function* (e, t) {
|
|
1505
1505
|
let n = e.byteLength;
|
|
1506
1506
|
if (n < t) {
|
|
1507
1507
|
yield e;
|
|
@@ -1510,10 +1510,10 @@ const rr = (e) => {
|
|
|
1510
1510
|
let r = 0, o;
|
|
1511
1511
|
for (; r < n; )
|
|
1512
1512
|
o = r + t, yield e.slice(r, o), r = o;
|
|
1513
|
-
},
|
|
1514
|
-
for await (const n of
|
|
1515
|
-
yield*
|
|
1516
|
-
},
|
|
1513
|
+
}, Ks = async function* (e, t) {
|
|
1514
|
+
for await (const n of Ys(e))
|
|
1515
|
+
yield* $s(n, t);
|
|
1516
|
+
}, Ys = async function* (e) {
|
|
1517
1517
|
if (e[Symbol.asyncIterator]) {
|
|
1518
1518
|
yield* e;
|
|
1519
1519
|
return;
|
|
@@ -1529,8 +1529,8 @@ const rr = (e) => {
|
|
|
1529
1529
|
} finally {
|
|
1530
1530
|
await t.cancel();
|
|
1531
1531
|
}
|
|
1532
|
-
},
|
|
1533
|
-
const o =
|
|
1532
|
+
}, an = (e, t, n, r) => {
|
|
1533
|
+
const o = Ks(e, t);
|
|
1534
1534
|
let s = 0, a, l = (d) => {
|
|
1535
1535
|
a || (a = !0, r && r(d));
|
|
1536
1536
|
};
|
|
@@ -1558,13 +1558,13 @@ const rr = (e) => {
|
|
|
1558
1558
|
}, {
|
|
1559
1559
|
highWaterMark: 2
|
|
1560
1560
|
});
|
|
1561
|
-
}, Ve = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1561
|
+
}, Ve = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", sr = Ve && typeof ReadableStream == "function", Js = Ve && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), ar = (e, ...t) => {
|
|
1562
1562
|
try {
|
|
1563
1563
|
return !!e(...t);
|
|
1564
1564
|
} catch {
|
|
1565
1565
|
return !1;
|
|
1566
1566
|
}
|
|
1567
|
-
},
|
|
1567
|
+
}, Gs = sr && ar(() => {
|
|
1568
1568
|
let e = !1;
|
|
1569
1569
|
const t = new Request(j.origin, {
|
|
1570
1570
|
body: new ReadableStream(),
|
|
@@ -1574,7 +1574,7 @@ const rr = (e) => {
|
|
|
1574
1574
|
}
|
|
1575
1575
|
}).headers.has("Content-Type");
|
|
1576
1576
|
return e && !t;
|
|
1577
|
-
}),
|
|
1577
|
+
}), ln = 64 * 1024, mt = sr && ar(() => f.isReadableStream(new Response("").body)), Be = {
|
|
1578
1578
|
stream: mt && ((e) => e.body)
|
|
1579
1579
|
};
|
|
1580
1580
|
Ve && ((e) => {
|
|
@@ -1584,7 +1584,7 @@ Ve && ((e) => {
|
|
|
1584
1584
|
});
|
|
1585
1585
|
});
|
|
1586
1586
|
})(new Response());
|
|
1587
|
-
const
|
|
1587
|
+
const Zs = async (e) => {
|
|
1588
1588
|
if (e == null)
|
|
1589
1589
|
return 0;
|
|
1590
1590
|
if (f.isBlob(e))
|
|
@@ -1597,11 +1597,11 @@ const Gs = async (e) => {
|
|
|
1597
1597
|
if (f.isArrayBufferView(e) || f.isArrayBuffer(e))
|
|
1598
1598
|
return e.byteLength;
|
|
1599
1599
|
if (f.isURLSearchParams(e) && (e = e + ""), f.isString(e))
|
|
1600
|
-
return (await
|
|
1601
|
-
},
|
|
1600
|
+
return (await Js(e)).byteLength;
|
|
1601
|
+
}, Xs = async (e, t) => {
|
|
1602
1602
|
const n = f.toFiniteNumber(e.getContentLength());
|
|
1603
|
-
return n ??
|
|
1604
|
-
},
|
|
1603
|
+
return n ?? Zs(t);
|
|
1604
|
+
}, Qs = Ve && (async (e) => {
|
|
1605
1605
|
let {
|
|
1606
1606
|
url: t,
|
|
1607
1607
|
method: n,
|
|
@@ -1615,26 +1615,26 @@ const Gs = async (e) => {
|
|
|
1615
1615
|
headers: u,
|
|
1616
1616
|
withCredentials: h = "same-origin",
|
|
1617
1617
|
fetchOptions: y
|
|
1618
|
-
} =
|
|
1618
|
+
} = or(e);
|
|
1619
1619
|
c = c ? (c + "").toLowerCase() : "text";
|
|
1620
|
-
let S =
|
|
1620
|
+
let S = Ws([o, s && s.toAbortSignal()], a), b;
|
|
1621
1621
|
const p = S && S.unsubscribe && (() => {
|
|
1622
1622
|
S.unsubscribe();
|
|
1623
1623
|
});
|
|
1624
1624
|
let g;
|
|
1625
1625
|
try {
|
|
1626
|
-
if (d &&
|
|
1626
|
+
if (d && Gs && n !== "get" && n !== "head" && (g = await Xs(u, r)) !== 0) {
|
|
1627
1627
|
let O = new Request(t, {
|
|
1628
1628
|
method: "POST",
|
|
1629
1629
|
body: r,
|
|
1630
1630
|
duplex: "half"
|
|
1631
1631
|
}), R;
|
|
1632
1632
|
if (f.isFormData(r) && (R = O.headers.get("content-type")) && u.setContentType(R), O.body) {
|
|
1633
|
-
const [D, V] =
|
|
1633
|
+
const [D, V] = rn(
|
|
1634
1634
|
g,
|
|
1635
|
-
Le(
|
|
1635
|
+
Le(on(d))
|
|
1636
1636
|
);
|
|
1637
|
-
r =
|
|
1637
|
+
r = an(O.body, ln, D, V);
|
|
1638
1638
|
}
|
|
1639
1639
|
}
|
|
1640
1640
|
f.isString(h) || (h = h ? "include" : "omit");
|
|
@@ -1655,12 +1655,12 @@ const Gs = async (e) => {
|
|
|
1655
1655
|
["status", "statusText", "headers"].forEach((Ee) => {
|
|
1656
1656
|
O[Ee] = x[Ee];
|
|
1657
1657
|
});
|
|
1658
|
-
const R = f.toFiniteNumber(x.headers.get("content-length")), [D, V] = l &&
|
|
1658
|
+
const R = f.toFiniteNumber(x.headers.get("content-length")), [D, V] = l && rn(
|
|
1659
1659
|
R,
|
|
1660
|
-
Le(
|
|
1660
|
+
Le(on(l), !0)
|
|
1661
1661
|
) || [];
|
|
1662
1662
|
x = new Response(
|
|
1663
|
-
|
|
1663
|
+
an(x.body, ln, D, () => {
|
|
1664
1664
|
V && V(), p && p();
|
|
1665
1665
|
}),
|
|
1666
1666
|
O
|
|
@@ -1669,7 +1669,7 @@ const Gs = async (e) => {
|
|
|
1669
1669
|
c = c || "text";
|
|
1670
1670
|
let P = await Be[f.findKey(Be, c) || "text"](x, e);
|
|
1671
1671
|
return !E && p && p(), await new Promise((O, R) => {
|
|
1672
|
-
|
|
1672
|
+
nr(O, R, {
|
|
1673
1673
|
data: P,
|
|
1674
1674
|
headers: U.from(x.headers),
|
|
1675
1675
|
status: x.status,
|
|
@@ -1687,9 +1687,9 @@ const Gs = async (e) => {
|
|
|
1687
1687
|
) : C.from(A, A && A.code, e, b);
|
|
1688
1688
|
}
|
|
1689
1689
|
}), gt = {
|
|
1690
|
-
http:
|
|
1691
|
-
xhr:
|
|
1692
|
-
fetch:
|
|
1690
|
+
http: ps,
|
|
1691
|
+
xhr: Vs,
|
|
1692
|
+
fetch: Qs
|
|
1693
1693
|
};
|
|
1694
1694
|
f.forEach(gt, (e, t) => {
|
|
1695
1695
|
if (e) {
|
|
@@ -1700,7 +1700,7 @@ f.forEach(gt, (e, t) => {
|
|
|
1700
1700
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1701
1701
|
}
|
|
1702
1702
|
});
|
|
1703
|
-
const
|
|
1703
|
+
const cn = (e) => `- ${e}`, ea = (e) => f.isFunction(e) || e === null || e === !1, ir = {
|
|
1704
1704
|
getAdapter: (e) => {
|
|
1705
1705
|
e = f.isArray(e) ? e : [e];
|
|
1706
1706
|
const { length: t } = e;
|
|
@@ -1709,7 +1709,7 @@ const ln = (e) => `- ${e}`, Qs = (e) => f.isFunction(e) || e === null || e === !
|
|
|
1709
1709
|
for (let s = 0; s < t; s++) {
|
|
1710
1710
|
n = e[s];
|
|
1711
1711
|
let a;
|
|
1712
|
-
if (r = n, !
|
|
1712
|
+
if (r = n, !ea(n) && (r = gt[(a = String(n)).toLowerCase()], r === void 0))
|
|
1713
1713
|
throw new C(`Unknown adapter '${a}'`);
|
|
1714
1714
|
if (r)
|
|
1715
1715
|
break;
|
|
@@ -1720,8 +1720,8 @@ const ln = (e) => `- ${e}`, Qs = (e) => f.isFunction(e) || e === null || e === !
|
|
|
1720
1720
|
([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1721
1721
|
);
|
|
1722
1722
|
let a = t ? s.length > 1 ? `since :
|
|
1723
|
-
` + s.map(
|
|
1724
|
-
`) : " " +
|
|
1723
|
+
` + s.map(cn).join(`
|
|
1724
|
+
`) : " " + cn(s[0]) : "as no adapter specified";
|
|
1725
1725
|
throw new C(
|
|
1726
1726
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1727
1727
|
"ERR_NOT_SUPPORT"
|
|
@@ -1735,34 +1735,34 @@ function et(e) {
|
|
|
1735
1735
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1736
1736
|
throw new me(null, e);
|
|
1737
1737
|
}
|
|
1738
|
-
function
|
|
1738
|
+
function un(e) {
|
|
1739
1739
|
return et(e), e.headers = U.from(e.headers), e.data = Qe.call(
|
|
1740
1740
|
e,
|
|
1741
1741
|
e.transformRequest
|
|
1742
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1742
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ir.getAdapter(e.adapter || Ce.adapter)(e).then(function(r) {
|
|
1743
1743
|
return et(e), r.data = Qe.call(
|
|
1744
1744
|
e,
|
|
1745
1745
|
e.transformResponse,
|
|
1746
1746
|
r
|
|
1747
1747
|
), r.headers = U.from(r.headers), r;
|
|
1748
1748
|
}, function(r) {
|
|
1749
|
-
return
|
|
1749
|
+
return tr(r) || (et(e), r && r.response && (r.response.data = Qe.call(
|
|
1750
1750
|
e,
|
|
1751
1751
|
e.transformResponse,
|
|
1752
1752
|
r.response
|
|
1753
1753
|
), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
|
|
1754
1754
|
});
|
|
1755
1755
|
}
|
|
1756
|
-
const
|
|
1756
|
+
const lr = "1.7.7", jt = {};
|
|
1757
1757
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1758
1758
|
jt[e] = function(r) {
|
|
1759
1759
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1760
1760
|
};
|
|
1761
1761
|
});
|
|
1762
|
-
const
|
|
1762
|
+
const dn = {};
|
|
1763
1763
|
jt.transitional = function(t, n, r) {
|
|
1764
1764
|
function o(s, a) {
|
|
1765
|
-
return "[Axios v" +
|
|
1765
|
+
return "[Axios v" + lr + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
|
|
1766
1766
|
}
|
|
1767
1767
|
return (s, a, l) => {
|
|
1768
1768
|
if (t === !1)
|
|
@@ -1770,7 +1770,7 @@ jt.transitional = function(t, n, r) {
|
|
|
1770
1770
|
o(a, " has been removed" + (n ? " in " + n : "")),
|
|
1771
1771
|
C.ERR_DEPRECATED
|
|
1772
1772
|
);
|
|
1773
|
-
return n && !
|
|
1773
|
+
return n && !dn[a] && (dn[a] = !0, console.warn(
|
|
1774
1774
|
o(
|
|
1775
1775
|
a,
|
|
1776
1776
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1778,7 +1778,7 @@ jt.transitional = function(t, n, r) {
|
|
|
1778
1778
|
)), t ? t(s, a, l) : !0;
|
|
1779
1779
|
};
|
|
1780
1780
|
};
|
|
1781
|
-
function
|
|
1781
|
+
function ta(e, t, n) {
|
|
1782
1782
|
if (typeof e != "object")
|
|
1783
1783
|
throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
|
|
1784
1784
|
const r = Object.keys(e);
|
|
@@ -1796,14 +1796,14 @@ function ea(e, t, n) {
|
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
const bt = {
|
|
1799
|
-
assertOptions:
|
|
1799
|
+
assertOptions: ta,
|
|
1800
1800
|
validators: jt
|
|
1801
1801
|
}, ne = bt.validators;
|
|
1802
1802
|
let le = class {
|
|
1803
1803
|
constructor(t) {
|
|
1804
1804
|
this.defaults = t, this.interceptors = {
|
|
1805
|
-
request: new
|
|
1806
|
-
response: new
|
|
1805
|
+
request: new tn(),
|
|
1806
|
+
response: new tn()
|
|
1807
1807
|
};
|
|
1808
1808
|
}
|
|
1809
1809
|
/**
|
|
@@ -1865,7 +1865,7 @@ let le = class {
|
|
|
1865
1865
|
});
|
|
1866
1866
|
let u, h = 0, y;
|
|
1867
1867
|
if (!d) {
|
|
1868
|
-
const b = [
|
|
1868
|
+
const b = [un.bind(this), void 0];
|
|
1869
1869
|
for (b.unshift.apply(b, l), b.push.apply(b, c), y = b.length, u = Promise.resolve(n); h < y; )
|
|
1870
1870
|
u = u.then(b[h++], b[h++]);
|
|
1871
1871
|
return u;
|
|
@@ -1882,7 +1882,7 @@ let le = class {
|
|
|
1882
1882
|
}
|
|
1883
1883
|
}
|
|
1884
1884
|
try {
|
|
1885
|
-
u =
|
|
1885
|
+
u = un.call(this, S);
|
|
1886
1886
|
} catch (b) {
|
|
1887
1887
|
return Promise.reject(b);
|
|
1888
1888
|
}
|
|
@@ -1892,8 +1892,8 @@ let le = class {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
getUri(t) {
|
|
1894
1894
|
t = ue(this.defaults, t);
|
|
1895
|
-
const n =
|
|
1896
|
-
return
|
|
1895
|
+
const n = rr(t.baseURL, t.url);
|
|
1896
|
+
return Xn(n, t.params, t.paramsSerializer);
|
|
1897
1897
|
}
|
|
1898
1898
|
};
|
|
1899
1899
|
f.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1920,7 +1920,7 @@ f.forEach(["post", "put", "patch"], function(t) {
|
|
|
1920
1920
|
}
|
|
1921
1921
|
le.prototype[t] = n(), le.prototype[t + "Form"] = n(!0);
|
|
1922
1922
|
});
|
|
1923
|
-
let
|
|
1923
|
+
let na = class cr {
|
|
1924
1924
|
constructor(t) {
|
|
1925
1925
|
if (typeof t != "function")
|
|
1926
1926
|
throw new TypeError("executor must be a function.");
|
|
@@ -1986,19 +1986,19 @@ let ta = class lr {
|
|
|
1986
1986
|
static source() {
|
|
1987
1987
|
let t;
|
|
1988
1988
|
return {
|
|
1989
|
-
token: new
|
|
1989
|
+
token: new cr(function(o) {
|
|
1990
1990
|
t = o;
|
|
1991
1991
|
}),
|
|
1992
1992
|
cancel: t
|
|
1993
1993
|
};
|
|
1994
1994
|
}
|
|
1995
1995
|
};
|
|
1996
|
-
function
|
|
1996
|
+
function ra(e) {
|
|
1997
1997
|
return function(n) {
|
|
1998
1998
|
return e.apply(null, n);
|
|
1999
1999
|
};
|
|
2000
2000
|
}
|
|
2001
|
-
function
|
|
2001
|
+
function oa(e) {
|
|
2002
2002
|
return f.isObject(e) && e.isAxiosError === !0;
|
|
2003
2003
|
}
|
|
2004
2004
|
const yt = {
|
|
@@ -2069,49 +2069,49 @@ const yt = {
|
|
|
2069
2069
|
Object.entries(yt).forEach(([e, t]) => {
|
|
2070
2070
|
yt[t] = e;
|
|
2071
2071
|
});
|
|
2072
|
-
function
|
|
2073
|
-
const t = new le(e), n =
|
|
2072
|
+
function ur(e) {
|
|
2073
|
+
const t = new le(e), n = qn(le.prototype.request, t);
|
|
2074
2074
|
return f.extend(n, le.prototype, t, { allOwnKeys: !0 }), f.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
2075
|
-
return
|
|
2075
|
+
return ur(ue(e, o));
|
|
2076
2076
|
}, n;
|
|
2077
2077
|
}
|
|
2078
|
-
const F =
|
|
2078
|
+
const F = ur(Ce);
|
|
2079
2079
|
F.Axios = le;
|
|
2080
2080
|
F.CanceledError = me;
|
|
2081
|
-
F.CancelToken =
|
|
2082
|
-
F.isCancel =
|
|
2083
|
-
F.VERSION =
|
|
2081
|
+
F.CancelToken = na;
|
|
2082
|
+
F.isCancel = tr;
|
|
2083
|
+
F.VERSION = lr;
|
|
2084
2084
|
F.toFormData = ze;
|
|
2085
2085
|
F.AxiosError = C;
|
|
2086
2086
|
F.Cancel = F.CanceledError;
|
|
2087
2087
|
F.all = function(t) {
|
|
2088
2088
|
return Promise.all(t);
|
|
2089
2089
|
};
|
|
2090
|
-
F.spread =
|
|
2091
|
-
F.isAxiosError =
|
|
2090
|
+
F.spread = ra;
|
|
2091
|
+
F.isAxiosError = oa;
|
|
2092
2092
|
F.mergeConfig = ue;
|
|
2093
2093
|
F.AxiosHeaders = U;
|
|
2094
|
-
F.formToJSON = (e) =>
|
|
2095
|
-
F.getAdapter =
|
|
2094
|
+
F.formToJSON = (e) => er(f.isHTMLForm(e) ? new FormData(e) : e);
|
|
2095
|
+
F.getAdapter = ir.getAdapter;
|
|
2096
2096
|
F.HttpStatusCode = yt;
|
|
2097
2097
|
F.default = F;
|
|
2098
2098
|
const {
|
|
2099
|
-
Axios:
|
|
2100
|
-
AxiosError:
|
|
2101
|
-
CanceledError:
|
|
2102
|
-
isCancel:
|
|
2103
|
-
CancelToken:
|
|
2104
|
-
VERSION:
|
|
2105
|
-
all:
|
|
2106
|
-
Cancel:
|
|
2107
|
-
isAxiosError:
|
|
2108
|
-
spread:
|
|
2109
|
-
toFormData:
|
|
2110
|
-
AxiosHeaders:
|
|
2111
|
-
HttpStatusCode:
|
|
2112
|
-
formToJSON:
|
|
2113
|
-
getAdapter:
|
|
2114
|
-
mergeConfig:
|
|
2099
|
+
Axios: Ii,
|
|
2100
|
+
AxiosError: Mi,
|
|
2101
|
+
CanceledError: Ni,
|
|
2102
|
+
isCancel: ji,
|
|
2103
|
+
CancelToken: Ui,
|
|
2104
|
+
VERSION: qi,
|
|
2105
|
+
all: _i,
|
|
2106
|
+
Cancel: Hi,
|
|
2107
|
+
isAxiosError: sa,
|
|
2108
|
+
spread: zi,
|
|
2109
|
+
toFormData: Vi,
|
|
2110
|
+
AxiosHeaders: Wi,
|
|
2111
|
+
HttpStatusCode: $i,
|
|
2112
|
+
formToJSON: Ki,
|
|
2113
|
+
getAdapter: Yi,
|
|
2114
|
+
mergeConfig: Ji
|
|
2115
2115
|
} = F;
|
|
2116
2116
|
function ce(e) {
|
|
2117
2117
|
return (t) => {
|
|
@@ -2119,7 +2119,7 @@ function ce(e) {
|
|
|
2119
2119
|
if (!(t instanceof Error))
|
|
2120
2120
|
throw t;
|
|
2121
2121
|
e({
|
|
2122
|
-
message:
|
|
2122
|
+
message: sa(t) ? ((n = t.response) == null ? void 0 : n.data.message) ?? t.message : t.message,
|
|
2123
2123
|
severity: "error"
|
|
2124
2124
|
});
|
|
2125
2125
|
};
|
|
@@ -2127,24 +2127,24 @@ function ce(e) {
|
|
|
2127
2127
|
function Ut() {
|
|
2128
2128
|
return m.useContext(Lt).notify;
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2130
|
+
function aa() {
|
|
2131
2131
|
const e = Ut();
|
|
2132
2132
|
return m.useCallback((t) => {
|
|
2133
2133
|
ce(e)(t);
|
|
2134
2134
|
}, [e]);
|
|
2135
2135
|
}
|
|
2136
|
-
const
|
|
2137
|
-
const [t, n] = m.useState(), { id: r } =
|
|
2136
|
+
const ia = ({ create: e = !1 }) => {
|
|
2137
|
+
const [t, n] = m.useState(), { id: r } = Ar(), { t: o } = L(), s = Ut(), a = At(), l = te(), d = z("breakpoint", "md");
|
|
2138
2138
|
Bt(
|
|
2139
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() })
|
|
2140
|
-
),
|
|
2140
|
+
), Oo();
|
|
2141
2141
|
const c = T("cms").getComponent("Breadcrumbs");
|
|
2142
2142
|
m.useEffect(() => {
|
|
2143
2143
|
e ? n(new l()) : l.find(r).then((S) => n(S ?? void 0));
|
|
2144
2144
|
}, [r, l, e]);
|
|
2145
2145
|
const u = m.useCallback(() => {
|
|
2146
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 =
|
|
2147
|
+
}, [s, a, l, t, o]), h = aa(), y = m.useMemo(() => T("cms").getModelFormProps(t), [t]);
|
|
2148
2148
|
return t ? /* @__PURE__ */ i(H, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: /* @__PURE__ */ w(Q, { container: !0, children: [
|
|
2149
2149
|
/* @__PURE__ */ i(Q, { xs: 12, children: /* @__PURE__ */ i(
|
|
2150
2150
|
c,
|
|
@@ -2161,7 +2161,7 @@ const aa = ({ create: e = !1 }) => {
|
|
|
2161
2161
|
xs: 12,
|
|
2162
2162
|
[d]: 6,
|
|
2163
2163
|
children: /* @__PURE__ */ i(
|
|
2164
|
-
|
|
2164
|
+
kr,
|
|
2165
2165
|
{
|
|
2166
2166
|
submitText: "Save",
|
|
2167
2167
|
...y,
|
|
@@ -2174,7 +2174,7 @@ const aa = ({ create: e = !1 }) => {
|
|
|
2174
2174
|
)
|
|
2175
2175
|
] }) }) : null;
|
|
2176
2176
|
};
|
|
2177
|
-
function
|
|
2177
|
+
function la(e) {
|
|
2178
2178
|
const {
|
|
2179
2179
|
setDisplacement: t
|
|
2180
2180
|
} = m.useContext(Lt), n = Ft(), r = v(), o = n.spacing(r ? 3 : 1), s = e === !1 ? o : n.spacing(e);
|
|
@@ -2182,24 +2182,24 @@ function ia(e) {
|
|
|
2182
2182
|
t(o);
|
|
2183
2183
|
}), [s, o, t]);
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2186
|
-
return m.useContext(
|
|
2185
|
+
function ca() {
|
|
2186
|
+
return m.useContext(Un).dialog;
|
|
2187
2187
|
}
|
|
2188
2188
|
function qt() {
|
|
2189
|
-
const e = At(), t = Ut(), n =
|
|
2189
|
+
const e = At(), t = Ut(), n = ca(), { t: r } = L(), { refresh: o } = xe();
|
|
2190
2190
|
return { navigate: e, notify: t, dialog: n, t: r, refresh: o };
|
|
2191
2191
|
}
|
|
2192
|
-
const
|
|
2192
|
+
const ua = Z(Fr)(({ theme: e }) => ({
|
|
2193
2193
|
position: "fixed",
|
|
2194
2194
|
bottom: e.spacing(2),
|
|
2195
2195
|
right: e.spacing(2)
|
|
2196
|
-
})),
|
|
2196
|
+
})), da = Z(Lr)(({ theme: e }) => ({
|
|
2197
2197
|
position: "fixed",
|
|
2198
2198
|
bottom: e.spacing(2),
|
|
2199
2199
|
right: e.spacing(2)
|
|
2200
|
-
})),
|
|
2200
|
+
})), fa = ({ variant: e = "default" }) => {
|
|
2201
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]);
|
|
2202
|
-
if (
|
|
2202
|
+
if (la(
|
|
2203
2203
|
e === "fab" && h.length > 0 ? n ? 12 : 10 : !1
|
|
2204
2204
|
), h.length === 0)
|
|
2205
2205
|
return null;
|
|
@@ -2210,9 +2210,9 @@ const ca = Z(vr)(({ theme: e }) => ({
|
|
|
2210
2210
|
}, b = (p) => {
|
|
2211
2211
|
l.current && l.current.contains(p.target) || a(!1);
|
|
2212
2212
|
};
|
|
2213
|
-
return e === "fab" ? h.length === 1 ?
|
|
2213
|
+
return e === "fab" ? h.length === 1 ? Gt.createPortal(
|
|
2214
2214
|
/* @__PURE__ */ i(
|
|
2215
|
-
|
|
2215
|
+
ua,
|
|
2216
2216
|
{
|
|
2217
2217
|
color: "primary",
|
|
2218
2218
|
onClick: () => h[0].callback(u),
|
|
@@ -2220,18 +2220,18 @@ const ca = Z(vr)(({ theme: e }) => ({
|
|
|
2220
2220
|
}
|
|
2221
2221
|
),
|
|
2222
2222
|
document.body
|
|
2223
|
-
) :
|
|
2223
|
+
) : Gt.createPortal(
|
|
2224
2224
|
/* @__PURE__ */ i(
|
|
2225
|
-
|
|
2225
|
+
da,
|
|
2226
2226
|
{
|
|
2227
2227
|
ariaLabel: `actions for ${t.singular()}`,
|
|
2228
|
-
icon: /* @__PURE__ */ i(
|
|
2228
|
+
icon: /* @__PURE__ */ i(Br, {}),
|
|
2229
2229
|
color: "primary",
|
|
2230
2230
|
onClose: () => a(!1),
|
|
2231
2231
|
onOpen: () => a(!0),
|
|
2232
2232
|
open: s,
|
|
2233
2233
|
children: h.map((p) => /* @__PURE__ */ i(
|
|
2234
|
-
|
|
2234
|
+
Ir,
|
|
2235
2235
|
{
|
|
2236
2236
|
icon: p.icon || p.label.charAt(0).toUpperCase(),
|
|
2237
2237
|
tooltipTitle: p.label,
|
|
@@ -2244,7 +2244,7 @@ const ca = Z(vr)(({ theme: e }) => ({
|
|
|
2244
2244
|
document.body
|
|
2245
2245
|
) : /* @__PURE__ */ w(B, { children: [
|
|
2246
2246
|
/* @__PURE__ */ w(
|
|
2247
|
-
|
|
2247
|
+
Mr,
|
|
2248
2248
|
{
|
|
2249
2249
|
variant: "contained",
|
|
2250
2250
|
ref: l,
|
|
@@ -2261,27 +2261,27 @@ const ca = Z(vr)(({ theme: e }) => ({
|
|
|
2261
2261
|
"aria-label": `select ${t.singular()} actions`,
|
|
2262
2262
|
"aria-haspopup": "menu",
|
|
2263
2263
|
onClick: S,
|
|
2264
|
-
children: /* @__PURE__ */ i(
|
|
2264
|
+
children: /* @__PURE__ */ i(Dn, {})
|
|
2265
2265
|
}
|
|
2266
2266
|
)
|
|
2267
2267
|
]
|
|
2268
2268
|
}
|
|
2269
2269
|
),
|
|
2270
2270
|
/* @__PURE__ */ i(
|
|
2271
|
-
|
|
2271
|
+
Nr,
|
|
2272
2272
|
{
|
|
2273
2273
|
open: s,
|
|
2274
2274
|
anchorEl: l.current,
|
|
2275
2275
|
role: void 0,
|
|
2276
2276
|
transition: !0,
|
|
2277
2277
|
children: ({ TransitionProps: p, placement: g }) => /* @__PURE__ */ i(
|
|
2278
|
-
|
|
2278
|
+
jr,
|
|
2279
2279
|
{
|
|
2280
2280
|
...p,
|
|
2281
2281
|
style: {
|
|
2282
2282
|
transformOrigin: g === "bottom" ? "center top" : "center bottom"
|
|
2283
2283
|
},
|
|
2284
|
-
children: /* @__PURE__ */ i(Ot, { children: /* @__PURE__ */ i(
|
|
2284
|
+
children: /* @__PURE__ */ i(Ot, { children: /* @__PURE__ */ i(Ur, { onClickAway: b, children: /* @__PURE__ */ i(qr, { id: "split-button-menu", children: h.map((A, x) => /* @__PURE__ */ i(
|
|
2285
2285
|
se,
|
|
2286
2286
|
{
|
|
2287
2287
|
selected: x === d,
|
|
@@ -2311,20 +2311,20 @@ function _t() {
|
|
|
2311
2311
|
}
|
|
2312
2312
|
};
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function dr() {
|
|
2315
2315
|
const { currentPage: e } = m.useContext(X);
|
|
2316
2316
|
return e;
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function fr() {
|
|
2319
2319
|
const { showSearch: e } = m.useContext(X);
|
|
2320
2320
|
return e;
|
|
2321
2321
|
}
|
|
2322
|
-
function
|
|
2322
|
+
function hr() {
|
|
2323
2323
|
const { showBackButton: e } = m.useContext(X);
|
|
2324
2324
|
return e;
|
|
2325
2325
|
}
|
|
2326
|
-
const
|
|
2327
|
-
|
|
2326
|
+
const ha = Z(
|
|
2327
|
+
Sn,
|
|
2328
2328
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2329
2329
|
)(({ theme: e, open: t, drawerWidth: n, height: r }) => ({
|
|
2330
2330
|
zIndex: e.zIndex.drawer + 1,
|
|
@@ -2341,20 +2341,20 @@ const fa = Z(
|
|
|
2341
2341
|
duration: e.transitions.duration.enteringScreen
|
|
2342
2342
|
})
|
|
2343
2343
|
}
|
|
2344
|
-
})),
|
|
2345
|
-
|
|
2344
|
+
})), pa = Z(
|
|
2345
|
+
Sn,
|
|
2346
2346
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2347
|
-
)(({ height: e }) => ({ height: e })),
|
|
2348
|
-
const n = v(), r = n ?
|
|
2347
|
+
)(({ height: e }) => ({ height: e })), ma = ({ slots: e = {}, ...t }) => {
|
|
2348
|
+
const n = v(), r = n ? ha : pa, {
|
|
2349
2349
|
["Layout.AppBar.MenuButton"]: o,
|
|
2350
2350
|
["Layout.SearchBar"]: s,
|
|
2351
2351
|
["Layout.BackButton"]: a,
|
|
2352
2352
|
["Layout.AppLogo"]: l
|
|
2353
|
-
} = T("cms").getComponents(), { open: d } = _t(), c =
|
|
2353
|
+
} = T("cms").getComponents(), { open: d } = _t(), c = fr(), u = hr(), h = z("appBar.height"), y = z("drawer.width", 280), {
|
|
2354
2354
|
start: S = null,
|
|
2355
2355
|
//: title = config('app.name', document.title),
|
|
2356
2356
|
end: b = null
|
|
2357
|
-
} = e, p =
|
|
2357
|
+
} = e, p = dr();
|
|
2358
2358
|
return /* @__PURE__ */ i(
|
|
2359
2359
|
r,
|
|
2360
2360
|
{
|
|
@@ -2362,7 +2362,7 @@ const fa = Z(
|
|
|
2362
2362
|
height: h,
|
|
2363
2363
|
drawerWidth: y,
|
|
2364
2364
|
...t,
|
|
2365
|
-
children: /* @__PURE__ */ w(
|
|
2365
|
+
children: /* @__PURE__ */ w(_r, { children: [
|
|
2366
2366
|
(n && !d || !n && !u) && /* @__PURE__ */ i(o, {}),
|
|
2367
2367
|
!n && u && /* @__PURE__ */ i(a, {}),
|
|
2368
2368
|
n ? null : S,
|
|
@@ -2392,7 +2392,7 @@ const fa = Z(
|
|
|
2392
2392
|
}
|
|
2393
2393
|
);
|
|
2394
2394
|
};
|
|
2395
|
-
function
|
|
2395
|
+
function ga(e) {
|
|
2396
2396
|
return /* @__PURE__ */ i(
|
|
2397
2397
|
q,
|
|
2398
2398
|
{
|
|
@@ -2406,14 +2406,14 @@ function ma(e) {
|
|
|
2406
2406
|
}
|
|
2407
2407
|
);
|
|
2408
2408
|
}
|
|
2409
|
-
const
|
|
2409
|
+
const fn = (e, t) => ({
|
|
2410
2410
|
width: t,
|
|
2411
2411
|
transition: e.transitions.create("width", {
|
|
2412
2412
|
easing: e.transitions.easing.sharp,
|
|
2413
2413
|
duration: e.transitions.duration.enteringScreen
|
|
2414
2414
|
}),
|
|
2415
2415
|
overflowX: "hidden"
|
|
2416
|
-
}),
|
|
2416
|
+
}), hn = (e) => ({
|
|
2417
2417
|
transition: e.transitions.create("width", {
|
|
2418
2418
|
easing: e.transitions.easing.sharp,
|
|
2419
2419
|
duration: e.transitions.duration.leavingScreen
|
|
@@ -2421,33 +2421,33 @@ const dn = (e, t) => ({
|
|
|
2421
2421
|
overflowX: "hidden",
|
|
2422
2422
|
width: `calc(${e.spacing(9)} + 1px)`,
|
|
2423
2423
|
[e.breakpoints.up("sm")]: { width: `calc(${e.spacing(10)} + 1px)` }
|
|
2424
|
-
}),
|
|
2425
|
-
|
|
2424
|
+
}), ba = Z(
|
|
2425
|
+
xn,
|
|
2426
2426
|
{ shouldForwardProp: (e) => !["open", "width"].includes(String(e)) }
|
|
2427
2427
|
)(({ theme: e, open: t, width: n }) => ({
|
|
2428
2428
|
flexShrink: 0,
|
|
2429
2429
|
whiteSpace: "nowrap",
|
|
2430
2430
|
boxSizing: "border-box",
|
|
2431
2431
|
...t && {
|
|
2432
|
-
...
|
|
2433
|
-
"& .MuiDrawer-paper":
|
|
2432
|
+
...fn(e, n),
|
|
2433
|
+
"& .MuiDrawer-paper": fn(e, n)
|
|
2434
2434
|
},
|
|
2435
2435
|
...!t && {
|
|
2436
|
-
...
|
|
2437
|
-
"& .MuiDrawer-paper":
|
|
2436
|
+
...hn(e),
|
|
2437
|
+
"& .MuiDrawer-paper": hn(e)
|
|
2438
2438
|
}
|
|
2439
|
-
})),
|
|
2440
|
-
|
|
2439
|
+
})), ya = Z(
|
|
2440
|
+
xn,
|
|
2441
2441
|
{ shouldForwardProp: (e) => e !== "width" }
|
|
2442
|
-
)(() => ({})),
|
|
2442
|
+
)(() => ({})), wa = Z("div")(({ theme: e }) => ({
|
|
2443
2443
|
display: "flex",
|
|
2444
2444
|
alignItems: "center",
|
|
2445
2445
|
justifyContent: "space-between",
|
|
2446
2446
|
padding: e.spacing(0, 1),
|
|
2447
2447
|
// necessary for content to be below app bar
|
|
2448
2448
|
...e.mixins.toolbar
|
|
2449
|
-
})),
|
|
2450
|
-
const t = Ft(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ?
|
|
2449
|
+
})), Sa = (e) => {
|
|
2450
|
+
const t = Ft(), n = v(), { open: r, handleDrawerClose: o } = _t(), s = n ? ba : ya, a = z("drawer.width", 280), l = z("appBar.height"), d = T("cms").getComponent("RecursiveList"), c = T("cms").getMenuItems();
|
|
2451
2451
|
return /* @__PURE__ */ w(
|
|
2452
2452
|
s,
|
|
2453
2453
|
{
|
|
@@ -2464,7 +2464,7 @@ const dn = (e, t) => ({
|
|
|
2464
2464
|
},
|
|
2465
2465
|
...e,
|
|
2466
2466
|
children: [
|
|
2467
|
-
/* @__PURE__ */ i(
|
|
2467
|
+
/* @__PURE__ */ i(wa, { style: { height: l }, children: /* @__PURE__ */ i(q, { onClick: o, children: t.direction === "ltr" ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(Ue, {}) }) }),
|
|
2468
2468
|
/* @__PURE__ */ i(ve, {}),
|
|
2469
2469
|
/* @__PURE__ */ i(H, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden" }, children: /* @__PURE__ */ i(
|
|
2470
2470
|
d,
|
|
@@ -2477,8 +2477,8 @@ const dn = (e, t) => ({
|
|
|
2477
2477
|
]
|
|
2478
2478
|
}
|
|
2479
2479
|
);
|
|
2480
|
-
},
|
|
2481
|
-
const e =
|
|
2480
|
+
}, xa = () => {
|
|
2481
|
+
const e = dr(), t = z("breakpoint", "md"), n = hr(), {
|
|
2482
2482
|
["Layout.BackButton"]: r
|
|
2483
2483
|
} = T("cms").getComponents();
|
|
2484
2484
|
return /* @__PURE__ */ w(
|
|
@@ -2532,17 +2532,17 @@ const dn = (e, t) => ({
|
|
|
2532
2532
|
},
|
|
2533
2533
|
setIsRelation: () => {
|
|
2534
2534
|
}
|
|
2535
|
-
}),
|
|
2535
|
+
}), Aa = (e) => {
|
|
2536
2536
|
if (!Array.isArray(e))
|
|
2537
2537
|
return e;
|
|
2538
2538
|
let t;
|
|
2539
2539
|
return J.isEmpty(e) ? t = "" : t = e[0], t;
|
|
2540
|
-
},
|
|
2540
|
+
}, Ca = (e) => {
|
|
2541
2541
|
if (Array.isArray(e))
|
|
2542
2542
|
return e;
|
|
2543
2543
|
let t;
|
|
2544
2544
|
return J.isEmpty(e) ? t = [] : t = [e, ""], t;
|
|
2545
|
-
},
|
|
2545
|
+
}, Ea = async (e, t, n) => {
|
|
2546
2546
|
const r = e.getSchema().relations[t], o = we().make(r.model), s = o.getSchema().primaryKey, a = [];
|
|
2547
2547
|
for (const l of n) {
|
|
2548
2548
|
const d = await o.where(s, l).first();
|
|
@@ -2550,12 +2550,15 @@ const dn = (e, t) => ({
|
|
|
2550
2550
|
}
|
|
2551
2551
|
return a;
|
|
2552
2552
|
};
|
|
2553
|
-
function
|
|
2553
|
+
function ka(e, t) {
|
|
2554
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) => () => {
|
|
2555
2555
|
o((R) => R.filter((D, V) => V !== O));
|
|
2556
2556
|
}, E = async (O) => {
|
|
2557
|
-
|
|
2558
|
-
|
|
2557
|
+
var $t;
|
|
2558
|
+
const R = O.target.value, D = A.find((gr) => gr.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;
|
|
2559
|
+
d(
|
|
2560
|
+
(($t = n.getMatchingOperators(D)[0]) == null ? void 0 : $t.key) ?? "equals"
|
|
2561
|
+
), Wt && y([]), g(Wt), b(Ee), V !== c && y(() => {
|
|
2559
2562
|
if (["between", "notBetween"].includes(l))
|
|
2560
2563
|
return [];
|
|
2561
2564
|
switch (n.getInputType(V)) {
|
|
@@ -2566,19 +2569,19 @@ function Ea(e, t) {
|
|
|
2566
2569
|
default:
|
|
2567
2570
|
return "";
|
|
2568
2571
|
}
|
|
2569
|
-
})
|
|
2572
|
+
}), a(R), u(V);
|
|
2570
2573
|
}, P = async (O) => {
|
|
2571
2574
|
const R = O.target.value;
|
|
2572
2575
|
l !== R && y((D) => {
|
|
2573
2576
|
switch (R) {
|
|
2574
2577
|
case "between":
|
|
2575
2578
|
case "notBetween":
|
|
2576
|
-
return
|
|
2579
|
+
return Ca(D);
|
|
2577
2580
|
case "null":
|
|
2578
2581
|
case "notNull":
|
|
2579
2582
|
return "1";
|
|
2580
2583
|
default:
|
|
2581
|
-
return
|
|
2584
|
+
return Aa(D);
|
|
2582
2585
|
}
|
|
2583
2586
|
}), d(R);
|
|
2584
2587
|
};
|
|
@@ -2611,13 +2614,13 @@ function Ea(e, t) {
|
|
|
2611
2614
|
handleRemoveColumn: x
|
|
2612
2615
|
};
|
|
2613
2616
|
}
|
|
2614
|
-
const
|
|
2617
|
+
const pn = async (e, t, n) => {
|
|
2615
2618
|
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;
|
|
2616
2619
|
return a + l > d ? W([...n, ...s.slice(0, d - l)]) : W([...n, ...s]);
|
|
2617
|
-
},
|
|
2620
|
+
}, Ta = async (e, t, n = "", r) => {
|
|
2618
2621
|
const o = e.getSchema().relations[t], s = we().make(o.model), a = s.getSchema().primaryKey, { data: l } = await s.searchBy(n).get();
|
|
2619
2622
|
return W([...r, ...l]).unique(a);
|
|
2620
|
-
},
|
|
2623
|
+
}, Da = () => {
|
|
2621
2624
|
const e = v(), t = te(), {
|
|
2622
2625
|
key: n,
|
|
2623
2626
|
value: r,
|
|
@@ -2626,20 +2629,20 @@ const hn = async (e, t, n) => {
|
|
|
2626
2629
|
() => s && c.count() === 0,
|
|
2627
2630
|
[s, c]
|
|
2628
2631
|
), b = async (p, g) => {
|
|
2629
|
-
d(g), J.isEmpty(g) || u(await
|
|
2632
|
+
d(g), J.isEmpty(g) || u(await Ta(t, n, g, W(h)));
|
|
2630
2633
|
};
|
|
2631
2634
|
return m.useEffect(() => {
|
|
2632
|
-
r.length > 0 && (async () => y(await
|
|
2635
|
+
r.length > 0 && (async () => y(await Ea(t, n, r)))();
|
|
2633
2636
|
}, []), m.useEffect(() => {
|
|
2634
2637
|
let p = !0;
|
|
2635
2638
|
if (S)
|
|
2636
|
-
return (async () => p && u(await
|
|
2639
|
+
return (async () => p && u(await pn(t, n, h)))(), () => {
|
|
2637
2640
|
p = !1;
|
|
2638
2641
|
};
|
|
2639
2642
|
}, [S]), m.useEffect(() => {
|
|
2640
|
-
o(h.map((p) => p.getKey())), J.isEmpty(l) ? (async () => u(await
|
|
2643
|
+
o(h.map((p) => p.getKey())), J.isEmpty(l) ? (async () => u(await pn(t, n, h)))() : u(W([]));
|
|
2641
2644
|
}, [h]), /* @__PURE__ */ i(
|
|
2642
|
-
|
|
2645
|
+
Hr,
|
|
2643
2646
|
{
|
|
2644
2647
|
sx: { width: e ? 377 : "100%" },
|
|
2645
2648
|
open: s,
|
|
@@ -2660,7 +2663,7 @@ const hn = async (e, t, n) => {
|
|
|
2660
2663
|
isOptionEqualToValue: (p, g) => p.getKey() === g.getKey(),
|
|
2661
2664
|
filterOptions: (p) => p,
|
|
2662
2665
|
renderInput: (p) => /* @__PURE__ */ i(
|
|
2663
|
-
|
|
2666
|
+
Oa,
|
|
2664
2667
|
{
|
|
2665
2668
|
params: p,
|
|
2666
2669
|
loading: S
|
|
@@ -2673,7 +2676,7 @@ const hn = async (e, t, n) => {
|
|
|
2673
2676
|
multiple: !0
|
|
2674
2677
|
}
|
|
2675
2678
|
);
|
|
2676
|
-
},
|
|
2679
|
+
}, Oa = ({ params: e, loading: t }) => {
|
|
2677
2680
|
const { t: n } = L();
|
|
2678
2681
|
return /* @__PURE__ */ i(
|
|
2679
2682
|
fe,
|
|
@@ -2683,7 +2686,7 @@ const hn = async (e, t, n) => {
|
|
|
2683
2686
|
InputProps: {
|
|
2684
2687
|
...e.InputProps,
|
|
2685
2688
|
endAdornment: /* @__PURE__ */ w(m.Fragment, { children: [
|
|
2686
|
-
t ? /* @__PURE__ */ i(
|
|
2689
|
+
t ? /* @__PURE__ */ i(zr, { color: "inherit", size: 20 }) : null,
|
|
2687
2690
|
e.InputProps.endAdornment
|
|
2688
2691
|
] })
|
|
2689
2692
|
}
|
|
@@ -2714,11 +2717,11 @@ const hn = async (e, t, n) => {
|
|
|
2714
2717
|
sx: { width: n ? d : "100%" }
|
|
2715
2718
|
}
|
|
2716
2719
|
);
|
|
2717
|
-
},
|
|
2720
|
+
}, Ra = () => {
|
|
2718
2721
|
const e = v(), { value: t, setValue: n } = m.useContext(ge);
|
|
2719
2722
|
return /* @__PURE__ */ w(B, { children: [
|
|
2720
2723
|
/* @__PURE__ */ i(
|
|
2721
|
-
|
|
2724
|
+
Vr,
|
|
2722
2725
|
{
|
|
2723
2726
|
checked: t,
|
|
2724
2727
|
onChange: (o) => {
|
|
@@ -2782,13 +2785,13 @@ const hn = async (e, t, n) => {
|
|
|
2782
2785
|
case "datetime-local":
|
|
2783
2786
|
return /* @__PURE__ */ i(tt, {});
|
|
2784
2787
|
case "autocomplete":
|
|
2785
|
-
return /* @__PURE__ */ i(
|
|
2788
|
+
return /* @__PURE__ */ i(Da, {});
|
|
2786
2789
|
case "boolean":
|
|
2787
|
-
return /* @__PURE__ */ i(
|
|
2790
|
+
return /* @__PURE__ */ i(Ra, {});
|
|
2788
2791
|
default:
|
|
2789
2792
|
return /* @__PURE__ */ i(nt, {});
|
|
2790
2793
|
}
|
|
2791
|
-
},
|
|
2794
|
+
}, Pa = ({ index: e, column: t }) => {
|
|
2792
2795
|
const { t: n } = L(), r = v(), o = z("breakpoint", "md"), s = T("filter"), a = m.useMemo(() => s.getMatchingOperators(t), [t]), {
|
|
2793
2796
|
columns: l,
|
|
2794
2797
|
key: d,
|
|
@@ -2804,7 +2807,7 @@ const hn = async (e, t, n) => {
|
|
|
2804
2807
|
handleKey: x,
|
|
2805
2808
|
handleOperator: E,
|
|
2806
2809
|
handleRemoveColumn: P
|
|
2807
|
-
} =
|
|
2810
|
+
} = ka(e, t), O = ["boolean"].includes(s.getInputType(y));
|
|
2808
2811
|
return /* @__PURE__ */ i(
|
|
2809
2812
|
ge.Provider,
|
|
2810
2813
|
{
|
|
@@ -2959,7 +2962,7 @@ const hn = async (e, t, n) => {
|
|
|
2959
2962
|
)
|
|
2960
2963
|
}
|
|
2961
2964
|
);
|
|
2962
|
-
},
|
|
2965
|
+
}, mn = ({ dialog: e = !1 }) => {
|
|
2963
2966
|
const { t } = L(), n = v(), r = z("breakpoint", "md"), o = T("filter"), {
|
|
2964
2967
|
columnsFilter: s,
|
|
2965
2968
|
setColumnsFilter: a,
|
|
@@ -2970,7 +2973,7 @@ const hn = async (e, t, n) => {
|
|
|
2970
2973
|
...u,
|
|
2971
2974
|
{
|
|
2972
2975
|
key: "",
|
|
2973
|
-
operator: "
|
|
2976
|
+
operator: "contains",
|
|
2974
2977
|
type: "text",
|
|
2975
2978
|
value: "",
|
|
2976
2979
|
appended: !1,
|
|
@@ -2991,7 +2994,7 @@ const hn = async (e, t, n) => {
|
|
|
2991
2994
|
const S = h == y.length - 1;
|
|
2992
2995
|
return /* @__PURE__ */ w(B, { children: [
|
|
2993
2996
|
/* @__PURE__ */ i(
|
|
2994
|
-
|
|
2997
|
+
Pa,
|
|
2995
2998
|
{
|
|
2996
2999
|
index: h,
|
|
2997
3000
|
column: u
|
|
@@ -3028,7 +3031,7 @@ const hn = async (e, t, n) => {
|
|
|
3028
3031
|
onClick: c,
|
|
3029
3032
|
color: "primary",
|
|
3030
3033
|
sx: { fontSize: 32 },
|
|
3031
|
-
children: /* @__PURE__ */ i(
|
|
3034
|
+
children: /* @__PURE__ */ i(On, { fontSize: "inherit" })
|
|
3032
3035
|
}
|
|
3033
3036
|
)
|
|
3034
3037
|
}
|
|
@@ -3057,8 +3060,8 @@ const hn = async (e, t, n) => {
|
|
|
3057
3060
|
}
|
|
3058
3061
|
);
|
|
3059
3062
|
};
|
|
3060
|
-
function
|
|
3061
|
-
const n = [], r =
|
|
3063
|
+
function va(e, t) {
|
|
3064
|
+
const n = [], r = gn.toObject(t);
|
|
3062
3065
|
return !("where" in r) || J.isEmpty(r.where) ? [] : (Object.entries(r.where).forEach(([o, s]) => {
|
|
3063
3066
|
let [a, l = "equals"] = o.split(":");
|
|
3064
3067
|
const d = e.find((u) => u.key === a);
|
|
@@ -3090,7 +3093,7 @@ function Pa(e, t) {
|
|
|
3090
3093
|
});
|
|
3091
3094
|
}), n);
|
|
3092
3095
|
}
|
|
3093
|
-
const
|
|
3096
|
+
const Fa = (e) => {
|
|
3094
3097
|
const t = T("filter"), n = new URLSearchParams();
|
|
3095
3098
|
return e.forEach((r) => {
|
|
3096
3099
|
const { key: o, operator: s, value: a, type: l } = r;
|
|
@@ -3117,8 +3120,8 @@ const va = (e) => {
|
|
|
3117
3120
|
n.set(`where[${o}${d}]`, c);
|
|
3118
3121
|
}
|
|
3119
3122
|
}), n;
|
|
3120
|
-
},
|
|
3121
|
-
const { t: e } = L(), t = T("filter"), n = v(), r = te(), [o, s] = G(), a = m.useMemo(() => "where" in
|
|
3123
|
+
}, La = () => {
|
|
3124
|
+
const { t: e } = L(), t = T("filter"), n = v(), r = te(), [o, s] = G(), a = m.useMemo(() => "where" in gn.toObject(o), [o]), [l, d] = m.useState(null), [c, u] = m.useState([]), h = !!l, y = m.useMemo(() => t.getFilterableColumns(r), [r]), S = (x) => {
|
|
3122
3125
|
d(x.currentTarget);
|
|
3123
3126
|
}, b = () => {
|
|
3124
3127
|
d(null), setTimeout(() => {
|
|
@@ -3126,7 +3129,7 @@ const va = (e) => {
|
|
|
3126
3129
|
}, 300);
|
|
3127
3130
|
}, p = () => {
|
|
3128
3131
|
g();
|
|
3129
|
-
const x =
|
|
3132
|
+
const x = Fa(c);
|
|
3130
3133
|
s(x, { replace: !0 }), b();
|
|
3131
3134
|
}, g = () => {
|
|
3132
3135
|
s((x) => {
|
|
@@ -3141,7 +3144,7 @@ const va = (e) => {
|
|
|
3141
3144
|
}, 300);
|
|
3142
3145
|
};
|
|
3143
3146
|
return m.useEffect(() => {
|
|
3144
|
-
const x =
|
|
3147
|
+
const x = va(y, o);
|
|
3145
3148
|
u(x);
|
|
3146
3149
|
}, [y, o, l]), /* @__PURE__ */ w(
|
|
3147
3150
|
Ht.Provider,
|
|
@@ -3171,13 +3174,13 @@ const va = (e) => {
|
|
|
3171
3174
|
color: "secondary",
|
|
3172
3175
|
variant: "dot",
|
|
3173
3176
|
invisible: !a,
|
|
3174
|
-
children: /* @__PURE__ */ i(
|
|
3177
|
+
children: /* @__PURE__ */ i(Rn, {})
|
|
3175
3178
|
}
|
|
3176
3179
|
)
|
|
3177
3180
|
}
|
|
3178
3181
|
),
|
|
3179
3182
|
n ? /* @__PURE__ */ i(
|
|
3180
|
-
|
|
3183
|
+
Wr,
|
|
3181
3184
|
{
|
|
3182
3185
|
id: "model-filter-popover",
|
|
3183
3186
|
open: h,
|
|
@@ -3187,7 +3190,7 @@ const va = (e) => {
|
|
|
3187
3190
|
vertical: "bottom",
|
|
3188
3191
|
horizontal: "left"
|
|
3189
3192
|
},
|
|
3190
|
-
children: /* @__PURE__ */ i(
|
|
3193
|
+
children: /* @__PURE__ */ i(mn, {})
|
|
3191
3194
|
}
|
|
3192
3195
|
) : /* @__PURE__ */ w(
|
|
3193
3196
|
Et,
|
|
@@ -3207,7 +3210,7 @@ const va = (e) => {
|
|
|
3207
3210
|
}
|
|
3208
3211
|
)
|
|
3209
3212
|
] }),
|
|
3210
|
-
/* @__PURE__ */ i(Tt, { dividers: !0, children: /* @__PURE__ */ i(
|
|
3213
|
+
/* @__PURE__ */ i(Tt, { dividers: !0, children: /* @__PURE__ */ i(mn, { dialog: !0 }) }),
|
|
3211
3214
|
/* @__PURE__ */ w(Dt, { children: [
|
|
3212
3215
|
/* @__PURE__ */ i(
|
|
3213
3216
|
M,
|
|
@@ -3246,7 +3249,7 @@ function Vt() {
|
|
|
3246
3249
|
const {
|
|
3247
3250
|
selected: e,
|
|
3248
3251
|
items: t
|
|
3249
|
-
} = m.useContext(zt), n =
|
|
3252
|
+
} = m.useContext(zt), n = wn(e), r = () => {
|
|
3250
3253
|
e.splice(0, e.count());
|
|
3251
3254
|
}, o = (c) => {
|
|
3252
3255
|
const u = e.search(c);
|
|
@@ -3277,7 +3280,7 @@ function Vt() {
|
|
|
3277
3280
|
function ae() {
|
|
3278
3281
|
return m.useContext(zt);
|
|
3279
3282
|
}
|
|
3280
|
-
function
|
|
3283
|
+
function Ba(e) {
|
|
3281
3284
|
const [t, n] = m.useState(""), { selected: r } = Vt(), { t: o } = L(), s = qt(), { massActions: a } = ae(), l = (c) => {
|
|
3282
3285
|
n(c.target.value);
|
|
3283
3286
|
};
|
|
@@ -3344,7 +3347,7 @@ function La(e) {
|
|
|
3344
3347
|
}
|
|
3345
3348
|
);
|
|
3346
3349
|
}
|
|
3347
|
-
const
|
|
3350
|
+
const Ia = () => {
|
|
3348
3351
|
const { handleDrawerOpen: e } = _t();
|
|
3349
3352
|
return /* @__PURE__ */ i(
|
|
3350
3353
|
q,
|
|
@@ -3354,7 +3357,7 @@ const Ba = () => {
|
|
|
3354
3357
|
edge: "start",
|
|
3355
3358
|
onClick: e,
|
|
3356
3359
|
sx: { mr: { md: 2 } },
|
|
3357
|
-
children: /* @__PURE__ */ i(
|
|
3360
|
+
children: /* @__PURE__ */ i(Pn, {})
|
|
3358
3361
|
}
|
|
3359
3362
|
);
|
|
3360
3363
|
}, We = m.forwardRef(({ to: e, children: t, ...n }, r) => /* @__PURE__ */ i(
|
|
@@ -3369,12 +3372,12 @@ const Ba = () => {
|
|
|
3369
3372
|
}
|
|
3370
3373
|
));
|
|
3371
3374
|
We.displayName = "Link";
|
|
3372
|
-
const
|
|
3375
|
+
const Ma = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */ i(B, { children: {
|
|
3373
3376
|
"« Previous": /* @__PURE__ */ i(je, {}),
|
|
3374
3377
|
"Next »": /* @__PURE__ */ i(Ue, {}),
|
|
3375
|
-
"Last »": /* @__PURE__ */ i(
|
|
3376
|
-
"« First": /* @__PURE__ */ i(
|
|
3377
|
-
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }),
|
|
3378
|
+
"Last »": /* @__PURE__ */ i(vn, {}),
|
|
3379
|
+
"« First": /* @__PURE__ */ i(Fn, {})
|
|
3380
|
+
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }), Na = ({ variant: e = "default", ...t }) => {
|
|
3378
3381
|
const n = e === "default", [r, o] = G(), [s, a] = m.useState(r.get("page") || "1"), {
|
|
3379
3382
|
links: l,
|
|
3380
3383
|
meta: {
|
|
@@ -3394,7 +3397,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3394
3397
|
{ url: y, label: "« Previous", active: !1 },
|
|
3395
3398
|
{
|
|
3396
3399
|
element: /* @__PURE__ */ i(
|
|
3397
|
-
|
|
3400
|
+
Cr,
|
|
3398
3401
|
{
|
|
3399
3402
|
onSubmit: p,
|
|
3400
3403
|
preventScrollReset: !0,
|
|
@@ -3459,13 +3462,13 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3459
3462
|
disabled: !A.url,
|
|
3460
3463
|
component: We,
|
|
3461
3464
|
to: A.url,
|
|
3462
|
-
children: /* @__PURE__ */ i(
|
|
3465
|
+
children: /* @__PURE__ */ i(Ma, { label: A.label })
|
|
3463
3466
|
},
|
|
3464
3467
|
x
|
|
3465
3468
|
))
|
|
3466
3469
|
}
|
|
3467
3470
|
);
|
|
3468
|
-
},
|
|
3471
|
+
}, ja = () => {
|
|
3469
3472
|
const { t: e } = L(), {
|
|
3470
3473
|
meta: {
|
|
3471
3474
|
total: t = 0,
|
|
@@ -3478,7 +3481,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3478
3481
|
to: r,
|
|
3479
3482
|
total: t
|
|
3480
3483
|
}) });
|
|
3481
|
-
},
|
|
3484
|
+
}, Ua = () => {
|
|
3482
3485
|
const { t: e } = L(), {
|
|
3483
3486
|
meta: {
|
|
3484
3487
|
per_page: t = 15
|
|
@@ -3537,7 +3540,7 @@ const Ia = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3537
3540
|
}
|
|
3538
3541
|
);
|
|
3539
3542
|
};
|
|
3540
|
-
function
|
|
3543
|
+
function qa(e, t) {
|
|
3541
3544
|
const [n, r] = m.useState(!1);
|
|
3542
3545
|
return m.useEffect(() => {
|
|
3543
3546
|
const o = /* @__PURE__ */ new Set(), s = (l) => {
|
|
@@ -3550,25 +3553,25 @@ function Ua(e, t) {
|
|
|
3550
3553
|
};
|
|
3551
3554
|
}, [e, t]), n;
|
|
3552
3555
|
}
|
|
3553
|
-
const
|
|
3556
|
+
const _a = Z(fe)(({ theme: e }) => ({
|
|
3554
3557
|
"& .MuiInputBase-root": {
|
|
3555
3558
|
backgroundColor: e.palette.background.paper
|
|
3556
3559
|
}
|
|
3557
3560
|
// transition: 'width 250ms ease-in-out',
|
|
3558
|
-
})),
|
|
3561
|
+
})), Ha = wr.throttle((e, t) => {
|
|
3559
3562
|
t((n) => {
|
|
3560
3563
|
const r = new URLSearchParams(n);
|
|
3561
3564
|
return e ? r.set("q", e) : r.delete("q"), r;
|
|
3562
3565
|
});
|
|
3563
|
-
}, 500),
|
|
3566
|
+
}, 500), za = () => {
|
|
3564
3567
|
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
3568
|
m.useEffect(() => {
|
|
3566
3569
|
o(n);
|
|
3567
3570
|
}, [n]);
|
|
3568
3571
|
const c = (y) => {
|
|
3569
|
-
o(y.target.value),
|
|
3572
|
+
o(y.target.value), Ha(y.target.value, t);
|
|
3570
3573
|
}, u = v();
|
|
3571
|
-
|
|
3574
|
+
qa(["Control", "/"], () => {
|
|
3572
3575
|
l.current.focus();
|
|
3573
3576
|
});
|
|
3574
3577
|
const h = u ? 300 : "calc(100vw - 58px)";
|
|
@@ -3587,7 +3590,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3587
3590
|
}
|
|
3588
3591
|
) }),
|
|
3589
3592
|
/* @__PURE__ */ i(
|
|
3590
|
-
|
|
3593
|
+
An,
|
|
3591
3594
|
{
|
|
3592
3595
|
orientation: "horizontal",
|
|
3593
3596
|
in: u || s,
|
|
@@ -3597,7 +3600,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3597
3600
|
},
|
|
3598
3601
|
unmountOnExit: !1,
|
|
3599
3602
|
children: /* @__PURE__ */ i(
|
|
3600
|
-
|
|
3603
|
+
_a,
|
|
3601
3604
|
{
|
|
3602
3605
|
placeholder: u ? `(Ctrl + /) ${d("Search...")}` : `${d("Search...")}`,
|
|
3603
3606
|
value: r,
|
|
@@ -3616,7 +3619,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3616
3619
|
}
|
|
3617
3620
|
)
|
|
3618
3621
|
] });
|
|
3619
|
-
},
|
|
3622
|
+
}, Va = ({ children: e, ...t }) => /* @__PURE__ */ i(
|
|
3620
3623
|
ee,
|
|
3621
3624
|
{
|
|
3622
3625
|
sx: { width: "1px" },
|
|
@@ -3624,7 +3627,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3624
3627
|
...t,
|
|
3625
3628
|
children: e
|
|
3626
3629
|
}
|
|
3627
|
-
),
|
|
3630
|
+
), Wa = () => {
|
|
3628
3631
|
const { t: e } = L(), [t, n] = G(), {
|
|
3629
3632
|
columns: r,
|
|
3630
3633
|
Model: o
|
|
@@ -3654,7 +3657,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3654
3657
|
color: "secondary",
|
|
3655
3658
|
variant: "dot",
|
|
3656
3659
|
invisible: !a,
|
|
3657
|
-
children: /* @__PURE__ */ i(
|
|
3660
|
+
children: /* @__PURE__ */ i(Ln, {})
|
|
3658
3661
|
}
|
|
3659
3662
|
) }),
|
|
3660
3663
|
/* @__PURE__ */ w(Et, { open: y, onClose: p, fullWidth: !0, children: [
|
|
@@ -3671,7 +3674,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3671
3674
|
] }),
|
|
3672
3675
|
/* @__PURE__ */ w(Tt, { dividers: !0, children: [
|
|
3673
3676
|
/* @__PURE__ */ w(
|
|
3674
|
-
|
|
3677
|
+
Kt,
|
|
3675
3678
|
{
|
|
3676
3679
|
value: d,
|
|
3677
3680
|
onChange: (x) => {
|
|
@@ -3695,7 +3698,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3695
3698
|
/* @__PURE__ */ i($, { variant: "caption", children: e("Direction") }),
|
|
3696
3699
|
/* @__PURE__ */ i(ve, {}),
|
|
3697
3700
|
/* @__PURE__ */ w(
|
|
3698
|
-
|
|
3701
|
+
Kt,
|
|
3699
3702
|
{
|
|
3700
3703
|
value: u,
|
|
3701
3704
|
onChange: (x) => h(x.target.value),
|
|
@@ -3707,7 +3710,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3707
3710
|
control: /* @__PURE__ */ i(Ye, {}),
|
|
3708
3711
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3709
3712
|
e("Ascending"),
|
|
3710
|
-
/* @__PURE__ */ i(
|
|
3713
|
+
/* @__PURE__ */ i(Bn, {})
|
|
3711
3714
|
] })
|
|
3712
3715
|
}
|
|
3713
3716
|
),
|
|
@@ -3718,7 +3721,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3718
3721
|
control: /* @__PURE__ */ i(Ye, {}),
|
|
3719
3722
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3720
3723
|
e("Descending"),
|
|
3721
|
-
/* @__PURE__ */ i(
|
|
3724
|
+
/* @__PURE__ */ i(In, {})
|
|
3722
3725
|
] })
|
|
3723
3726
|
}
|
|
3724
3727
|
)
|
|
@@ -3732,7 +3735,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3732
3735
|
] })
|
|
3733
3736
|
] })
|
|
3734
3737
|
] });
|
|
3735
|
-
},
|
|
3738
|
+
}, $a = ({ items: e, loading: t, children: n, error: r }) => {
|
|
3736
3739
|
const o = te(), s = m.useMemo(() => W([]), [o, e]), [a] = G(), l = a.get("tab") ?? "all", d = m.useMemo(() => [
|
|
3737
3740
|
{
|
|
3738
3741
|
key: o.getSchema().labeledBy,
|
|
@@ -3753,21 +3756,21 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3753
3756
|
Model: o
|
|
3754
3757
|
};
|
|
3755
3758
|
return /* @__PURE__ */ i(zt.Provider, { value: b, children: n });
|
|
3756
|
-
},
|
|
3759
|
+
}, Ka = ({
|
|
3757
3760
|
items: e,
|
|
3758
3761
|
loading: t,
|
|
3759
3762
|
error: n,
|
|
3760
3763
|
children: r,
|
|
3761
3764
|
...o
|
|
3762
3765
|
}) => /* @__PURE__ */ i(
|
|
3763
|
-
|
|
3766
|
+
$a,
|
|
3764
3767
|
{
|
|
3765
3768
|
items: e,
|
|
3766
3769
|
loading: t,
|
|
3767
3770
|
error: n,
|
|
3768
|
-
children: /* @__PURE__ */ i(
|
|
3771
|
+
children: /* @__PURE__ */ i($r, { component: Ot, children: /* @__PURE__ */ i(Kr, { ...o, children: r }) })
|
|
3769
3772
|
}
|
|
3770
|
-
),
|
|
3773
|
+
), Ya = ({ children: e, ...t }) => {
|
|
3771
3774
|
const {
|
|
3772
3775
|
massActions: n,
|
|
3773
3776
|
columns: r,
|
|
@@ -3787,7 +3790,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3787
3790
|
return x.set("order_by", `${g}:asc`), x;
|
|
3788
3791
|
});
|
|
3789
3792
|
};
|
|
3790
|
-
return /* @__PURE__ */ w(
|
|
3793
|
+
return /* @__PURE__ */ w(Yr, { ...t, children: [
|
|
3791
3794
|
e,
|
|
3792
3795
|
s && /* @__PURE__ */ w(he, { children: [
|
|
3793
3796
|
n.length > 0 && /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(
|
|
@@ -3805,7 +3808,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3805
3808
|
sortDirection: x && S === g && b || !1,
|
|
3806
3809
|
...E,
|
|
3807
3810
|
children: /* @__PURE__ */ w(
|
|
3808
|
-
|
|
3811
|
+
Jr,
|
|
3809
3812
|
{
|
|
3810
3813
|
active: x && S === g,
|
|
3811
3814
|
direction: b,
|
|
@@ -3822,7 +3825,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3822
3825
|
/* @__PURE__ */ i(h, {})
|
|
3823
3826
|
] })
|
|
3824
3827
|
] });
|
|
3825
|
-
},
|
|
3828
|
+
}, Ja = () => {
|
|
3826
3829
|
const {
|
|
3827
3830
|
massActions: e,
|
|
3828
3831
|
columns: t,
|
|
@@ -3833,14 +3836,14 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3833
3836
|
return /* @__PURE__ */ i(B, { children: Array.from({ length: s }).map((a, l) => /* @__PURE__ */ w(he, { children: [
|
|
3834
3837
|
e.length > 0 && /* @__PURE__ */ i(o, { children: /* @__PURE__ */ i(Pt, {}) }),
|
|
3835
3838
|
r && t.map(({ key: d, label: c, sortable: u, ...h }, y) => /* @__PURE__ */ i(ee, { ...h, children: /* @__PURE__ */ i(
|
|
3836
|
-
|
|
3839
|
+
Yt,
|
|
3837
3840
|
{
|
|
3838
3841
|
variant: "text",
|
|
3839
3842
|
height: 24
|
|
3840
3843
|
}
|
|
3841
3844
|
) }, y)),
|
|
3842
3845
|
!r && /* @__PURE__ */ i(ee, { sx: { px: 0 }, children: Array.from({ length: t.length }).map((d, c) => /* @__PURE__ */ i(
|
|
3843
|
-
|
|
3846
|
+
Yt,
|
|
3844
3847
|
{
|
|
3845
3848
|
variant: "text",
|
|
3846
3849
|
width: "100%",
|
|
@@ -3850,7 +3853,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3850
3853
|
)) }),
|
|
3851
3854
|
/* @__PURE__ */ i(o, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(vt, {}) }) })
|
|
3852
3855
|
] }, l)) });
|
|
3853
|
-
},
|
|
3856
|
+
}, Ga = ({ children: e, ...t }) => {
|
|
3854
3857
|
const n = te(), { t: r } = L(), {
|
|
3855
3858
|
items: o,
|
|
3856
3859
|
loading: s,
|
|
@@ -3858,7 +3861,7 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3858
3861
|
} = ae(), {
|
|
3859
3862
|
["ModelIndex.StaticActions"]: l
|
|
3860
3863
|
} = T("cms").getComponents(), d = m.isValidElement(e) ? e : (o || W([])).map(e);
|
|
3861
|
-
return /* @__PURE__ */ i(
|
|
3864
|
+
return /* @__PURE__ */ i(Gr, { ...t, children: s || !(o != null && o.every((c) => c.getType() === n.getSchemaName())) ? /* @__PURE__ */ i(Ja, {}) : o && o.count() ? d : /* @__PURE__ */ i(he, { children: /* @__PURE__ */ w(ee, { colSpan: a, sx: { textAlign: "center", py: 10 }, children: [
|
|
3862
3865
|
/* @__PURE__ */ i($, { children: r("No :model found", {
|
|
3863
3866
|
model: n.plural().toLocaleLowerCase()
|
|
3864
3867
|
}) }),
|
|
@@ -3866,19 +3869,19 @@ const qa = Z(fe)(({ theme: e }) => ({
|
|
|
3866
3869
|
/* @__PURE__ */ i(l, {})
|
|
3867
3870
|
] }) }) });
|
|
3868
3871
|
};
|
|
3869
|
-
class
|
|
3872
|
+
class Za {
|
|
3870
3873
|
getFacadeAccessor() {
|
|
3871
3874
|
return "cms";
|
|
3872
3875
|
}
|
|
3873
3876
|
}
|
|
3874
|
-
const I = St(
|
|
3877
|
+
const I = St(Za, xt), de = Z($)(() => ({
|
|
3875
3878
|
whiteSpace: "nowrap",
|
|
3876
3879
|
overflow: "hidden",
|
|
3877
3880
|
textOverflow: "ellipsis",
|
|
3878
3881
|
"& label": {
|
|
3879
3882
|
fontWeight: "bold"
|
|
3880
3883
|
}
|
|
3881
|
-
})),
|
|
3884
|
+
})), Xa = ({ 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 }), Qa = ({ label: e, content: t }) => ["string", "number"].includes(typeof t) ? /* @__PURE__ */ w(de, { children: [
|
|
3882
3885
|
/* @__PURE__ */ w("label", { children: [
|
|
3883
3886
|
e,
|
|
3884
3887
|
":"
|
|
@@ -3905,7 +3908,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
|
|
|
3905
3908
|
] }) }),
|
|
3906
3909
|
" ",
|
|
3907
3910
|
t
|
|
3908
|
-
] }),
|
|
3911
|
+
] }), ei = ({ item: e, ...t }) => {
|
|
3909
3912
|
const n = v(), r = At(), o = te(), { massActions: s, columns: a } = ae(), l = m.useMemo(() => a.map((y) => ({
|
|
3910
3913
|
...y,
|
|
3911
3914
|
content: I[`model${k.studly(e.getType())}Get${k.studly(y.key)}Content`](J.get(e, y.key), e)
|
|
@@ -3940,7 +3943,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
|
|
|
3940
3943
|
e.deletedAt || r(`/${k.kebab(o.plural())}/${e.getKey()}`);
|
|
3941
3944
|
},
|
|
3942
3945
|
children: /* @__PURE__ */ i(
|
|
3943
|
-
|
|
3946
|
+
Xa,
|
|
3944
3947
|
{
|
|
3945
3948
|
label: S,
|
|
3946
3949
|
content: p
|
|
@@ -3956,14 +3959,14 @@ const I = St(Ga, xt), de = Z($)(() => ({
|
|
|
3956
3959
|
onClick: () => {
|
|
3957
3960
|
e.deletedAt || r(`/${k.kebab(o.plural())}/${e.getKey()}`);
|
|
3958
3961
|
},
|
|
3959
|
-
children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(
|
|
3962
|
+
children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(Qa, { ...S }, y))
|
|
3960
3963
|
}
|
|
3961
3964
|
),
|
|
3962
3965
|
/* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(c, { item: e }) })
|
|
3963
3966
|
]
|
|
3964
3967
|
}
|
|
3965
3968
|
);
|
|
3966
|
-
},
|
|
3969
|
+
}, ti = ({ children: e, ...t }) => {
|
|
3967
3970
|
const {
|
|
3968
3971
|
columnCount: n
|
|
3969
3972
|
} = ae(), r = v(), o = z("breakpoint", "md"), {
|
|
@@ -3971,7 +3974,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
|
|
|
3971
3974
|
["ModelIndex.PaginationDetails"]: a,
|
|
3972
3975
|
["ModelIndex.PerPageSwitch"]: l
|
|
3973
3976
|
} = T("cms").getComponents();
|
|
3974
|
-
return /* @__PURE__ */ w(
|
|
3977
|
+
return /* @__PURE__ */ w(Zr, { ...t, children: [
|
|
3975
3978
|
/* @__PURE__ */ i(he, { children: /* @__PURE__ */ i(ee, { colSpan: n, children: /* @__PURE__ */ w(
|
|
3976
3979
|
N,
|
|
3977
3980
|
{
|
|
@@ -4006,7 +4009,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
|
|
|
4006
4009
|
) }) }),
|
|
4007
4010
|
e
|
|
4008
4011
|
] });
|
|
4009
|
-
},
|
|
4012
|
+
}, ni = () => {
|
|
4010
4013
|
const {
|
|
4011
4014
|
columnCount: e
|
|
4012
4015
|
} = ae(), {
|
|
@@ -4056,7 +4059,7 @@ const I = St(Ga, xt), de = Z($)(() => ({
|
|
|
4056
4059
|
}
|
|
4057
4060
|
) }) });
|
|
4058
4061
|
};
|
|
4059
|
-
function
|
|
4062
|
+
function ri() {
|
|
4060
4063
|
const e = te(), { t } = L(), [n, r] = G(), o = n.get("tab") || "all", s = (d, c) => {
|
|
4061
4064
|
r(() => {
|
|
4062
4065
|
const u = new URLSearchParams();
|
|
@@ -4068,7 +4071,7 @@ function ni() {
|
|
|
4068
4071
|
a
|
|
4069
4072
|
);
|
|
4070
4073
|
return l.length === 0 ? null : /* @__PURE__ */ i(H, { sx: { maxWidth: { xs: 320, sm: 480 }, bgcolor: "background.paper" }, children: /* @__PURE__ */ w(
|
|
4071
|
-
|
|
4074
|
+
Xr,
|
|
4072
4075
|
{
|
|
4073
4076
|
value: o,
|
|
4074
4077
|
onChange: s,
|
|
@@ -4078,14 +4081,14 @@ function ni() {
|
|
|
4078
4081
|
allowScrollButtonsMobile: !0,
|
|
4079
4082
|
children: [
|
|
4080
4083
|
/* @__PURE__ */ i(
|
|
4081
|
-
|
|
4084
|
+
Jt,
|
|
4082
4085
|
{
|
|
4083
4086
|
label: t("All"),
|
|
4084
4087
|
value: "all"
|
|
4085
4088
|
}
|
|
4086
4089
|
),
|
|
4087
4090
|
l.map((d) => /* @__PURE__ */ i(
|
|
4088
|
-
|
|
4091
|
+
Jt,
|
|
4089
4092
|
{
|
|
4090
4093
|
label: d.label,
|
|
4091
4094
|
value: d.value
|
|
@@ -4096,13 +4099,13 @@ function ni() {
|
|
|
4096
4099
|
}
|
|
4097
4100
|
) });
|
|
4098
4101
|
}
|
|
4099
|
-
function
|
|
4102
|
+
function oi(e) {
|
|
4100
4103
|
const {
|
|
4101
4104
|
parts: t,
|
|
4102
4105
|
...n
|
|
4103
4106
|
} = e;
|
|
4104
4107
|
return /* @__PURE__ */ w(
|
|
4105
|
-
|
|
4108
|
+
Qr,
|
|
4106
4109
|
{
|
|
4107
4110
|
"aria-label": "breadcrumb",
|
|
4108
4111
|
...n,
|
|
@@ -4139,14 +4142,14 @@ function ri(e) {
|
|
|
4139
4142
|
}
|
|
4140
4143
|
);
|
|
4141
4144
|
}
|
|
4142
|
-
const
|
|
4145
|
+
const pr = ({
|
|
4143
4146
|
collapsed: e = !1,
|
|
4144
4147
|
items: t,
|
|
4145
4148
|
onClick: n,
|
|
4146
4149
|
...r
|
|
4147
4150
|
}) => {
|
|
4148
4151
|
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");
|
|
4149
|
-
return /* @__PURE__ */ w(
|
|
4152
|
+
return /* @__PURE__ */ w(eo, { ...r, children: [
|
|
4150
4153
|
t.map((y) => {
|
|
4151
4154
|
const {
|
|
4152
4155
|
text: S,
|
|
@@ -4158,13 +4161,13 @@ const hr = ({
|
|
|
4158
4161
|
onClick: E
|
|
4159
4162
|
} = y;
|
|
4160
4163
|
return p || /* @__PURE__ */ w(
|
|
4161
|
-
|
|
4164
|
+
to,
|
|
4162
4165
|
{
|
|
4163
4166
|
disablePadding: !0,
|
|
4164
4167
|
sx: { display: "block" },
|
|
4165
4168
|
children: [
|
|
4166
4169
|
/* @__PURE__ */ w(
|
|
4167
|
-
|
|
4170
|
+
no,
|
|
4168
4171
|
{
|
|
4169
4172
|
sx: {
|
|
4170
4173
|
minHeight: 48,
|
|
@@ -4188,7 +4191,7 @@ const hr = ({
|
|
|
4188
4191
|
...x ? { to: x, component: We } : {},
|
|
4189
4192
|
children: [
|
|
4190
4193
|
/* @__PURE__ */ w(
|
|
4191
|
-
|
|
4194
|
+
Cn,
|
|
4192
4195
|
{
|
|
4193
4196
|
sx: {
|
|
4194
4197
|
minWidth: 0,
|
|
@@ -4211,19 +4214,19 @@ const hr = ({
|
|
|
4211
4214
|
]
|
|
4212
4215
|
}
|
|
4213
4216
|
),
|
|
4214
|
-
!e && /* @__PURE__ */ i(
|
|
4215
|
-
!e && A && (d[g] ? /* @__PURE__ */ i(
|
|
4217
|
+
!e && /* @__PURE__ */ i(En, { primary: S }),
|
|
4218
|
+
!e && A && (d[g] ? /* @__PURE__ */ i(Mn, {}) : /* @__PURE__ */ i(Nn, {}))
|
|
4216
4219
|
]
|
|
4217
4220
|
}
|
|
4218
4221
|
),
|
|
4219
4222
|
A && !e && /* @__PURE__ */ i(
|
|
4220
|
-
|
|
4223
|
+
An,
|
|
4221
4224
|
{
|
|
4222
4225
|
in: d[g],
|
|
4223
4226
|
timeout: "auto",
|
|
4224
4227
|
unmountOnExit: !0,
|
|
4225
4228
|
children: /* @__PURE__ */ i(
|
|
4226
|
-
|
|
4229
|
+
pr,
|
|
4227
4230
|
{
|
|
4228
4231
|
items: A,
|
|
4229
4232
|
onClick: n,
|
|
@@ -4255,7 +4258,7 @@ const hr = ({
|
|
|
4255
4258
|
}
|
|
4256
4259
|
)
|
|
4257
4260
|
] });
|
|
4258
|
-
},
|
|
4261
|
+
}, mr = ({
|
|
4259
4262
|
collapsed: e = !1,
|
|
4260
4263
|
items: t,
|
|
4261
4264
|
onClick: n,
|
|
@@ -4263,7 +4266,7 @@ const hr = ({
|
|
|
4263
4266
|
}) => {
|
|
4264
4267
|
const [o, s] = m.useState({}), a = z("drawer.width", 280);
|
|
4265
4268
|
return /* @__PURE__ */ w(B, { children: [
|
|
4266
|
-
/* @__PURE__ */ i(
|
|
4269
|
+
/* @__PURE__ */ i(kn, { ...r, children: t.map((l) => {
|
|
4267
4270
|
const {
|
|
4268
4271
|
text: d,
|
|
4269
4272
|
icon: c,
|
|
@@ -4293,7 +4296,7 @@ const hr = ({
|
|
|
4293
4296
|
} : {},
|
|
4294
4297
|
children: [
|
|
4295
4298
|
c && /* @__PURE__ */ i(
|
|
4296
|
-
|
|
4299
|
+
Cn,
|
|
4297
4300
|
{
|
|
4298
4301
|
sx: {
|
|
4299
4302
|
minWidth: 0,
|
|
@@ -4304,7 +4307,7 @@ const hr = ({
|
|
|
4304
4307
|
children: c
|
|
4305
4308
|
}
|
|
4306
4309
|
),
|
|
4307
|
-
/* @__PURE__ */ i(
|
|
4310
|
+
/* @__PURE__ */ i(En, { sx: { opacity: e ? 0 : 1 }, children: d }),
|
|
4308
4311
|
!e && y && /* @__PURE__ */ i(Ue, {})
|
|
4309
4312
|
]
|
|
4310
4313
|
},
|
|
@@ -4314,7 +4317,7 @@ const hr = ({
|
|
|
4314
4317
|
t.map((l) => {
|
|
4315
4318
|
const { key: d, children: c } = l;
|
|
4316
4319
|
return c ? /* @__PURE__ */ i(
|
|
4317
|
-
|
|
4320
|
+
mr,
|
|
4318
4321
|
{
|
|
4319
4322
|
items: c,
|
|
4320
4323
|
onClick: n,
|
|
@@ -4442,18 +4445,18 @@ const hr = ({
|
|
|
4442
4445
|
ce(n)(l);
|
|
4443
4446
|
}
|
|
4444
4447
|
}
|
|
4445
|
-
},
|
|
4448
|
+
}, si = {
|
|
4446
4449
|
create: (e) => ({ navigate: t }) => {
|
|
4447
4450
|
t(`/${k.kebab(e.plural())}/create`);
|
|
4448
4451
|
}
|
|
4449
4452
|
};
|
|
4450
|
-
class
|
|
4453
|
+
class ai {
|
|
4451
4454
|
getFacadeAccessor() {
|
|
4452
4455
|
return "icon";
|
|
4453
4456
|
}
|
|
4454
4457
|
}
|
|
4455
|
-
const ke = St(
|
|
4456
|
-
class
|
|
4458
|
+
const ke = St(ai, xt);
|
|
4459
|
+
class ii {
|
|
4457
4460
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4458
4461
|
getComponents() {
|
|
4459
4462
|
return this.componentMap({});
|
|
@@ -4493,8 +4496,8 @@ class ai {
|
|
|
4493
4496
|
);
|
|
4494
4497
|
}
|
|
4495
4498
|
}
|
|
4496
|
-
const
|
|
4497
|
-
class
|
|
4499
|
+
const li = bn(ii), ye = (e) => !(typeof e > "u" || e === null || J.isEmpty(e));
|
|
4500
|
+
class ci {
|
|
4498
4501
|
getInputType(t) {
|
|
4499
4502
|
switch (t) {
|
|
4500
4503
|
case "int":
|
|
@@ -4559,7 +4562,7 @@ class li {
|
|
|
4559
4562
|
}
|
|
4560
4563
|
getFilterableColumns(t) {
|
|
4561
4564
|
const { attributes: n = [], relations: r = {} } = t.getSchema(), o = [
|
|
4562
|
-
...n.filter((s) => !s.hidden && !s.appended).map((s) => {
|
|
4565
|
+
...n.filter((s) => !s.hidden && !s.appended && !s.virtual).map((s) => {
|
|
4563
4566
|
let a = s.phpType ?? "string";
|
|
4564
4567
|
return s.cast !== null && !J.isEmpty(s.cast) && (a = s.cast), {
|
|
4565
4568
|
key: s.name,
|
|
@@ -4596,8 +4599,8 @@ class li {
|
|
|
4596
4599
|
}).includes(!0));
|
|
4597
4600
|
}
|
|
4598
4601
|
}
|
|
4599
|
-
const
|
|
4600
|
-
class
|
|
4602
|
+
const ui = bn(ci);
|
|
4603
|
+
class di {
|
|
4601
4604
|
constructor() {
|
|
4602
4605
|
$e(this, "icons", []);
|
|
4603
4606
|
Re.reducer(
|
|
@@ -4639,7 +4642,7 @@ class ui {
|
|
|
4639
4642
|
return this.icons.map((t) => t.name);
|
|
4640
4643
|
}
|
|
4641
4644
|
}
|
|
4642
|
-
const
|
|
4645
|
+
const fi = ({ item: e }) => {
|
|
4643
4646
|
const t = qt(), [n] = G(), r = n.get("tab") ?? "all", o = m.useMemo(() => T("cms").getInstanceActions(T("model").make(e.getType()), r), [e, r]), [s, a] = m.useState(null), l = !!s, d = (u) => {
|
|
4644
4647
|
a(u.currentTarget);
|
|
4645
4648
|
}, c = () => {
|
|
@@ -4656,7 +4659,7 @@ const di = ({ item: e }) => {
|
|
|
4656
4659
|
}
|
|
4657
4660
|
),
|
|
4658
4661
|
/* @__PURE__ */ i(
|
|
4659
|
-
|
|
4662
|
+
kn,
|
|
4660
4663
|
{
|
|
4661
4664
|
id: "model-item-actions",
|
|
4662
4665
|
anchorEl: s,
|
|
@@ -4685,13 +4688,13 @@ const di = ({ item: e }) => {
|
|
|
4685
4688
|
}
|
|
4686
4689
|
)
|
|
4687
4690
|
] });
|
|
4688
|
-
},
|
|
4689
|
-
function
|
|
4690
|
-
const e = Me("(prefers-color-scheme: dark)"), t =
|
|
4691
|
+
}, hi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABbWlDQ1BpY2MAACiRdZG9S0JRGMZ/aqWU0VBDRIOBRYORFERj2eAiIWaQ1aI3PwI/LvcqIa1BS4PQELX0NfQf1Bq0FgRBEUQ0Nve1hNzeo4ISdS7nvj+ec56Xc54D9lBWy5ltfsjli0YkGPAsxZY9zldcdADjDMU1U58Nh0P8O77usal6N6Z6/b/vz9G1ljQ1sLmEpzTdKArPCIc2irriHeE+LRNfEz4S9hlyQOFrpSfq/KI4XecPxUY0Mgd21dOTbuFEC2sZIyc8KuzNZUta4zzqJu5kfnFB6oDMQUwiBAngIUGJdbIUGZOal8z+9vlrvnkK4tHkr1PGEEeajHh9opaka1JqSvSkfFnKKvffeZqpyYl6d3cA2p8t630YnLtQrVjW97FlVU/A8QSX+aa/IDlNf4peaWreQ+jZgvOrppbYg4tt6H/U40a8Jjlk2lMpeDuD7hj03kLnSj2rxjqnDxDdlCe6gf0DGJH9Pas/3QVn+hiI/rEAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAWBSURBVFhHxZl/TFtVFMe/pZQOGMIA0W3iBgOloLIBzrkZJsuWmCwah/8sYW4my0QYc1NijM5o1MQ4/3B/CUb/0Bn+mTHzD4PjRxEUxEGmcWb8VsbPTTYYDBjQFlrPubTQ0va9+6qdJ3lp+t69537eOfeec+59OpAklpWvQkhICV0FsNvT4XCE8X0tYrPb8WBsLL7L34eoMPnukxYrjpprYe4fgEGvtxJDOzFU0PXJYHHRnC6x/NNwAqnQGY35WFiAY35eC9dSWwv1Ld+zB/kPpEr3H52dRVFNLRoGBxEeGir66fhXr4fDYjlHfwv4bjHD0Q1pxSsbWglu27q1eDpl08pHfv8PT0+jsLoGLdeuLcFxY2EgupxMxQx4iC0XqDiooz4kBCeys2GgXxnpnbiFF6urcenGDQ84j76LTC8woClQt7JCC73t3k3JeDIxUYYN7WNjOFJVjZ7xcf9wpMnJZGLARedLqfds5HA4EGkw4DhZT6fTqWr4dWREuHVwagqrnHNOpZNcK39K5sgNh0xp2JyQ4K/J0v3m4WFyaw3G5uZgpEUgKwFbb4GslxARgZItW1THqunrQ4m5DtNWq/Q8dSkNGJDDysGMDGyMjlYE/LanB6X1DZijuRoquYjcFQYEOE9BOZnADj/ysF84O1n4y8uXcbKxCdye4TiYuwvPWjXogAB5oMLNmYgP5xjvWzj4nu3sQkZ8HPQ67/DDcAzeTatZSTQDMtxD8fHYn5ampBc71q9H5XP5YBCOle4SQiueXf5mY6MIO0pW1AzIoeV4dpYIL0qitFJnCa60oQHfdHUrxkLWrwmQU9rO+xPxbKp8vl35ElwclJjNOH/liiqcZkB2DRkQH1xooUCrF65ZF7ka+1JTRLpTEy4OXqLi4Ee34kCtjyYLMlDj0BDqBwYI1AFek2W7d1OFpA739+3bOEKB+sLVq1KWc4FrAuTQwQUBXzM0j157NAf7KZOoCae2w1VV+H3kuiY41qv+6m6j302Zg4Un+d7kZJTm5Kix4c+JCRys/F7ASeZfD53SgGy9A+kmMUjqmjX4aGcuwlRyKocQhmsbHQ0ITtqCHMcYZteGDTDFxeLjvDzcExmpaL3fqHJ5nuD+IgsGYjmXcqk5yBE/JSZGWO7D3FyCjFOE44VUVGvGGK1apXioqMT5UAqQ499TSUlYTcFZDa62rx/HKM7dCqBy8QWsCsjWuy8qCgU0/9SksrcXL9fVYdY2r7ms8qdbEZDhWN7Zvl1AKsm57m68SmWVjaytlFuVdPh65ncVczKPNhpxelee6layor0dJ36oF+WUTEbxBeLvnpcFecXaFux4JiUFrz+2VSwMJfns0h94t7lZNNFL7EuUdPl65gXIC6IwMxPvPbFDtJ+g/XIMWdKXnL54EadaWxFK9R7n6WCIh4ut5KKta+/Fyce3iRru/eZfMDg56TWu69mpllYYggjHA3tY0E6ABaZ0Ebt4L8HVbgYVp+7Cm6W3m5rwObnWSFklOHZbHtEDkA5vkBwTLazXT5ZjN7u7jt3/xk+N+KqtTXPS93KD5A0PF/Mq7Lx5U1jlWFYWktx2bDM2G16pr8eZOwjH7+AZZsh9Pw8Ni3dzX5FTlBVKKACf7ehCxL/b60vabbmZ5xyk+yvDyjidBHBeNff3I8Lgteg1D6i1g9eId7mFFA4xXAVziX6nLed6Ea9Mcn1mRjzjovQoWU7L/kGrdWTaM+DSkSqX8nzIw3Bv0YkAn6m4Tj5llAWhzTwDdohjVxIG7KAqmE+hvu7s/F/hnEwdDHiGz4RdwoG4liwnc94XBIstq1xk+oIBy/jAms6EFw+w6YbaXiOYYGw5ZnEeopeLTEWfIYzOzxAHAv0M8Z9A63T8GaLN7TOE5R/LwhBxBS+RxAAAAABJRU5ErkJggg==", pi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAABbWlDQ1BpY2MAACiRdZG9S0JRGMZ/aqWU0VBDRIOBRYORFERj2eAiIWaQ1aI3PwI/LvcqIa1BS4PQELX0NfQf1Bq0FgRBEUQ0Nve1hNzeo4ISdS7nvj+ec56Xc54D9lBWy5ltfsjli0YkGPAsxZY9zldcdADjDMU1U58Nh0P8O77usal6N6Z6/b/vz9G1ljQ1sLmEpzTdKArPCIc2irriHeE+LRNfEz4S9hlyQOFrpSfq/KI4XecPxUY0Mgd21dOTbuFEC2sZIyc8KuzNZUta4zzqJu5kfnFB6oDMQUwiBAngIUGJdbIUGZOal8z+9vlrvnkK4tHkr1PGEEeajHh9opaka1JqSvSkfFnKKvffeZqpyYl6d3cA2p8t630YnLtQrVjW97FlVU/A8QSX+aa/IDlNf4peaWreQ+jZgvOrppbYg4tt6H/U40a8Jjlk2lMpeDuD7hj03kLnSj2rxjqnDxDdlCe6gf0DGJH9Pas/3QVn+hiI/rEAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAUfSURBVFhHzZhdTFxFFMfPwsKypUCBlAS2XWyKfPSB0qZay6ql6NK1NE3TJjWxD/pgfCD6Uq2JMcZYY1RelKrVWmtTqTEmYuqTJiYWGwVpwkLLZwKWBhXS8lEEkd1l2fX8Z7lm6Z17996rLp5kumQ6d+Z3/3POmXPHRmyRaDSDf562ER2NEm3h33T0m7WfZ2Zof8uXNBcKUYqNZ0lgi5EIrXM46H2vl2rcGzE6xK2f2wVu79lstoCd4Zzo4OkOYUTiaTFKbic7/TS1sEAZdrt8QFxvaGmJCjIz6XSdl3YVFSn/A2Gqllt1NBo9ipkaAMfKCbMK6L95ky4ODZHDAFyQ4Yqzs+nDvXVUVVCwvLLqB4I1pPA/jytgVuF4F6iJ1VsIhxO+YIDHlObmUnP9Pj04hfYJO0NVqNhNdlwaHaVvb9xIqB5eYBsrdsa3VyhowCqwxYkdRmcm+BLUW2IV9SYCXLWriD6oq6NC9j2DZsBhEsx0cWiYOsbHyZGaqjkScLVuN8N5KTcDCcO46b10wll+DwbpHb9fN6X8yXAHS0ro7do9tDbdfPb6R4DNff00OD1NTslGICsgIB6rqKDG3Q8aSj0yRSwDjs/P09meHkrX2NoIJ+GGbVX0iscjW9dwn2XA091X6de5Oal6OCF8m+6iR8vLhcKccFVACCr4bQmnHL30ZuOH1U+rplvZgSNt3xctNL+4qOl/OE3CDCoz9EP5N3nrD5WW6gJaUrCps5OmAwGpegoQIldmgFvD8Aia/Zs3y4as6DMN2PbbGH02MIgCgxChKAoyJH4o2zZsfc5ycbAnVhwkBDS9xT+NjYm8B0CcqeN/zNNXw8MiUcugFAKlODjD5+/OwsKEYMoA04B3zny89Xtq7uvTjGaMB5wray195POJo86Mmd7i+MlPdXXT+d5e3RwHlTfl5NDHj/hoS36+GTYxFtWMYZvkWk+x77hAaLxyRVe5AMOV5+WJysUKnGlAnByIztHZWTp+qVX4oFbljFNk6/r19AnD3c25zqoZVhARiLJqYGqKnmttpV84SaelyB/HS+zkKvlCfb3RskqT33CQIDnX8/cG6rieiQmya8Ah9XiLi+mU92HTlYuM0nCQfDMyQvDBWa5gtOCg3AFOvk0P1VKWhcrFMiDA4H/prJoe3GE+tt7iE0JW3cgWN9Ind6K4J6MUpRNt7XSdt1gGh4McyqGsOsnK/ZtwwNDd4hneztfa2+nzwUFprgNckOGerKykV+/3SF/AiEp6YzQBv74+Qm90dFDf5CStSUtTzYEiKMSR/cz27fTirvs0043qQZMd0ig+19NLL1y+LBTBN8QMVy78lf/31DiHw9yev/ceOrZjh8klzQ1X+eDVW7fY59oE0MueanJzWgGMYoBDO8GV8n8NhzVVgJ/2D9AER+2RsjLxgd3NwEpCVioWFJpPba00J4XF0SofRLRmss+5s7PopR9+jJXrrOYS+1sa132NNbsFfLJMpWBZfp5Y+92uLhq+fVuohyrYydBII8mEA4cK0OPaIADDEb4pYDhEKk4FXJEd4O/bZJtqi6Ga4msoEBDFqII9Lley2cR6KkBcPsKwrYA7yxc9cfd3SYdUbXG+0ykCAkfWHZeLSYfDggBc8X2IG6hs/vJ6nVPJAxti/rgqZLFFw0gj1/DxrhhvbZQL0/iu1fz7GhQ8H69QKue8mo3iQvv/YOegoJNby2rKpLE2mGKXifyHg9uz3Lq4BTUeSEY31vZzOwYmbOFfRuevM6ot++oAAAAASUVORK5CYII=";
|
|
4692
|
+
function mi() {
|
|
4693
|
+
const e = Me("(prefers-color-scheme: dark)"), t = fr();
|
|
4691
4694
|
return /* @__PURE__ */ i(
|
|
4692
|
-
|
|
4695
|
+
ro,
|
|
4693
4696
|
{
|
|
4694
|
-
src: e ?
|
|
4697
|
+
src: e ? hi : pi,
|
|
4695
4698
|
alt: "Luminix",
|
|
4696
4699
|
variant: "square",
|
|
4697
4700
|
sx: {
|
|
@@ -4702,9 +4705,9 @@ function pi() {
|
|
|
4702
4705
|
}
|
|
4703
4706
|
);
|
|
4704
4707
|
}
|
|
4705
|
-
const Ie = class Ie extends
|
|
4708
|
+
const Ie = class Ie extends yn {
|
|
4706
4709
|
register() {
|
|
4707
|
-
this.app.singleton("cms", () => new
|
|
4710
|
+
this.app.singleton("cms", () => new li()), this.app.singleton("filter", () => new ui()), this.app.singleton("icon", () => new di()), this.registerIcons();
|
|
4708
4711
|
}
|
|
4709
4712
|
boot() {
|
|
4710
4713
|
this.bootComponents(), this.bootRoutes(), this.bootMenu(), this.bootMassActions(), this.bootInstanceActions(), this.bootStaticActions(), Ie.applyUserDefaults && this.bootDefaultUserModifiers();
|
|
@@ -4727,68 +4730,68 @@ const Ie = class Ie extends bn {
|
|
|
4727
4730
|
// }
|
|
4728
4731
|
registerIcons() {
|
|
4729
4732
|
ke.registerIcon({
|
|
4730
|
-
Add:
|
|
4731
|
-
AddCircleOutline:
|
|
4732
|
-
ArrowDownward:
|
|
4733
|
-
ArrowDropDown:
|
|
4734
|
-
ArrowUpward:
|
|
4735
|
-
CategoryOutlined:
|
|
4733
|
+
Add: io,
|
|
4734
|
+
AddCircleOutline: On,
|
|
4735
|
+
ArrowDownward: In,
|
|
4736
|
+
ArrowDropDown: Dn,
|
|
4737
|
+
ArrowUpward: Bn,
|
|
4738
|
+
CategoryOutlined: lo,
|
|
4736
4739
|
ChevronLeft: je,
|
|
4737
4740
|
ChevronRight: Ue,
|
|
4738
4741
|
Close: Ne,
|
|
4739
|
-
DashboardOutlined:
|
|
4740
|
-
ExpandLess:
|
|
4741
|
-
ExpandMore:
|
|
4742
|
-
FilterList:
|
|
4743
|
-
FirstPage:
|
|
4742
|
+
DashboardOutlined: co,
|
|
4743
|
+
ExpandLess: Mn,
|
|
4744
|
+
ExpandMore: Nn,
|
|
4745
|
+
FilterList: Rn,
|
|
4746
|
+
FirstPage: Fn,
|
|
4744
4747
|
HighlightOffOutlined: ct,
|
|
4745
|
-
LastPage:
|
|
4746
|
-
Menu:
|
|
4748
|
+
LastPage: vn,
|
|
4749
|
+
Menu: Pn,
|
|
4747
4750
|
MoreVert: vt,
|
|
4748
|
-
PeopleOutlined:
|
|
4751
|
+
PeopleOutlined: uo,
|
|
4749
4752
|
Search: ut,
|
|
4750
|
-
SwapVert:
|
|
4753
|
+
SwapVert: Ln
|
|
4751
4754
|
}), ke.forModel("user", "PeopleOutlined");
|
|
4752
4755
|
}
|
|
4753
4756
|
bootRoutes() {
|
|
4754
|
-
I.reducer("cmsRoutes",
|
|
4757
|
+
I.reducer("cmsRoutes", xo, 0), Sr.reducer("domRouterOptions", (t) => ({
|
|
4755
4758
|
...t,
|
|
4756
4759
|
basename: re.get("luminix.admin.url", "/admin")
|
|
4757
4760
|
}));
|
|
4758
4761
|
}
|
|
4759
4762
|
bootComponents() {
|
|
4760
4763
|
I.reducer("componentMap", () => ({
|
|
4761
|
-
Layout:
|
|
4762
|
-
Dashboard:
|
|
4763
|
-
ModelIndex:
|
|
4764
|
-
ModelItem:
|
|
4765
|
-
Error:
|
|
4766
|
-
DesktopPageTitle:
|
|
4767
|
-
RecursiveList:
|
|
4768
|
-
RecursiveMenu:
|
|
4769
|
-
Breadcrumbs:
|
|
4770
|
-
"Layout.AppBar":
|
|
4771
|
-
"Layout.AppLogo":
|
|
4772
|
-
"Layout.Drawer":
|
|
4773
|
-
"Layout.AppBar.MenuButton":
|
|
4774
|
-
"Layout.SearchBar":
|
|
4775
|
-
"Layout.BackButton":
|
|
4776
|
-
"ModelIndex.Filter":
|
|
4777
|
-
"ModelIndex.InstanceActions":
|
|
4778
|
-
"ModelIndex.MassActions":
|
|
4779
|
-
"ModelIndex.Pagination":
|
|
4780
|
-
"ModelIndex.PaginationDetails":
|
|
4781
|
-
"ModelIndex.PerPageSwitch":
|
|
4782
|
-
"ModelIndex.Sort":
|
|
4783
|
-
"ModelIndex.StaticActions":
|
|
4784
|
-
"ModelIndex.Table":
|
|
4785
|
-
"ModelIndex.Table.TableHead":
|
|
4786
|
-
"ModelIndex.Table.TableBody":
|
|
4787
|
-
"ModelIndex.Table.TableFooter":
|
|
4788
|
-
"ModelIndex.Table.TableToolbar":
|
|
4789
|
-
"ModelIndex.Table.TableBody.TableRow":
|
|
4790
|
-
"ModelIndex.Table.ShrinkedCell":
|
|
4791
|
-
"ModelIndex.Tabs":
|
|
4764
|
+
Layout: ko,
|
|
4765
|
+
Dashboard: Ao,
|
|
4766
|
+
ModelIndex: Do,
|
|
4767
|
+
ModelItem: ia,
|
|
4768
|
+
Error: Co,
|
|
4769
|
+
DesktopPageTitle: xa,
|
|
4770
|
+
RecursiveList: pr,
|
|
4771
|
+
RecursiveMenu: mr,
|
|
4772
|
+
Breadcrumbs: oi,
|
|
4773
|
+
"Layout.AppBar": ma,
|
|
4774
|
+
"Layout.AppLogo": mi,
|
|
4775
|
+
"Layout.Drawer": Sa,
|
|
4776
|
+
"Layout.AppBar.MenuButton": Ia,
|
|
4777
|
+
"Layout.SearchBar": za,
|
|
4778
|
+
"Layout.BackButton": ga,
|
|
4779
|
+
"ModelIndex.Filter": La,
|
|
4780
|
+
"ModelIndex.InstanceActions": fi,
|
|
4781
|
+
"ModelIndex.MassActions": Ba,
|
|
4782
|
+
"ModelIndex.Pagination": Na,
|
|
4783
|
+
"ModelIndex.PaginationDetails": ja,
|
|
4784
|
+
"ModelIndex.PerPageSwitch": Ua,
|
|
4785
|
+
"ModelIndex.Sort": Wa,
|
|
4786
|
+
"ModelIndex.StaticActions": fa,
|
|
4787
|
+
"ModelIndex.Table": Ka,
|
|
4788
|
+
"ModelIndex.Table.TableHead": Ya,
|
|
4789
|
+
"ModelIndex.Table.TableBody": Ga,
|
|
4790
|
+
"ModelIndex.Table.TableFooter": ti,
|
|
4791
|
+
"ModelIndex.Table.TableToolbar": ni,
|
|
4792
|
+
"ModelIndex.Table.TableBody.TableRow": ei,
|
|
4793
|
+
"ModelIndex.Table.ShrinkedCell": Va,
|
|
4794
|
+
"ModelIndex.Tabs": ri
|
|
4792
4795
|
}), 0);
|
|
4793
4796
|
}
|
|
4794
4797
|
bootMenu() {
|
|
@@ -4879,7 +4882,7 @@ const Ie = class Ie extends bn {
|
|
|
4879
4882
|
{
|
|
4880
4883
|
key: "create",
|
|
4881
4884
|
label: `Create ${n.singular()}`,
|
|
4882
|
-
callback:
|
|
4885
|
+
callback: si.create(n),
|
|
4883
4886
|
icon: ke.render("Add")
|
|
4884
4887
|
}
|
|
4885
4888
|
], 0);
|
|
@@ -4887,7 +4890,7 @@ const Ie = class Ie extends bn {
|
|
|
4887
4890
|
};
|
|
4888
4891
|
$e(Ie, "applyUserDefaults", !0);
|
|
4889
4892
|
let wt = Ie;
|
|
4890
|
-
class
|
|
4893
|
+
class gi extends yn {
|
|
4891
4894
|
register() {
|
|
4892
4895
|
this.app.once("booting", () => {
|
|
4893
4896
|
this.initI18Next(), this.translateModelNames();
|
|
@@ -4897,7 +4900,7 @@ class mi extends bn {
|
|
|
4897
4900
|
this.translateModelColumns(), this.translateMenuEntries(), this.translateInstanceActions(), this.translateMassActions(), this.translateFormLabels(), this.translateStaticActions();
|
|
4898
4901
|
}
|
|
4899
4902
|
initI18Next() {
|
|
4900
|
-
Y.use(
|
|
4903
|
+
Y.use(ao).init({
|
|
4901
4904
|
lng: re.get("app.locale", "en"),
|
|
4902
4905
|
fallbackLng: re.get("app.fallback_locale", "en"),
|
|
4903
4906
|
resources: {
|
|
@@ -4985,7 +4988,7 @@ class mi extends bn {
|
|
|
4985
4988
|
);
|
|
4986
4989
|
}
|
|
4987
4990
|
translateFormLabels() {
|
|
4988
|
-
|
|
4991
|
+
Tr.reducer(
|
|
4989
4992
|
"getDefaultInputProps",
|
|
4990
4993
|
(t) => Array.isArray(t) ? t.map((n) => ({
|
|
4991
4994
|
...n,
|
|
@@ -4999,7 +5002,7 @@ class mi extends bn {
|
|
|
4999
5002
|
);
|
|
5000
5003
|
}
|
|
5001
5004
|
}
|
|
5002
|
-
const
|
|
5005
|
+
const bi = {
|
|
5003
5006
|
palette: {
|
|
5004
5007
|
primary: {
|
|
5005
5008
|
main: "#1d9798"
|
|
@@ -5008,13 +5011,13 @@ const gi = {
|
|
|
5008
5011
|
main: "#fa510c"
|
|
5009
5012
|
}
|
|
5010
5013
|
}
|
|
5011
|
-
},
|
|
5012
|
-
theme: e =
|
|
5014
|
+
}, yi = (e) => e.make("cms").getRoutes(), Gi = ({
|
|
5015
|
+
theme: e = bi,
|
|
5013
5016
|
themeArgs: t,
|
|
5014
5017
|
providers: n,
|
|
5015
5018
|
...r
|
|
5016
5019
|
}) => {
|
|
5017
|
-
const o = Me("(prefers-color-scheme: dark)"), s = m.useMemo(() =>
|
|
5020
|
+
const o = Me("(prefers-color-scheme: dark)"), s = m.useMemo(() => fo({
|
|
5018
5021
|
...e,
|
|
5019
5022
|
palette: {
|
|
5020
5023
|
...e.palette,
|
|
@@ -5022,53 +5025,53 @@ const gi = {
|
|
|
5022
5025
|
}
|
|
5023
5026
|
}, ...t ?? []), [e, o, t]), a = m.useMemo(() => [
|
|
5024
5027
|
wt,
|
|
5025
|
-
|
|
5028
|
+
gi,
|
|
5026
5029
|
...n || []
|
|
5027
5030
|
], [n]);
|
|
5028
|
-
return /* @__PURE__ */ w(
|
|
5029
|
-
/* @__PURE__ */ i(
|
|
5031
|
+
return /* @__PURE__ */ w(ho, { theme: s, children: [
|
|
5032
|
+
/* @__PURE__ */ i(oo, {}),
|
|
5030
5033
|
/* @__PURE__ */ i(
|
|
5031
|
-
|
|
5034
|
+
Dr,
|
|
5032
5035
|
{
|
|
5033
|
-
routes:
|
|
5036
|
+
routes: yi,
|
|
5034
5037
|
providers: a,
|
|
5035
5038
|
...r
|
|
5036
5039
|
}
|
|
5037
5040
|
)
|
|
5038
5041
|
] });
|
|
5039
5042
|
};
|
|
5040
|
-
class
|
|
5043
|
+
class wi {
|
|
5041
5044
|
getFacadeAccessor() {
|
|
5042
5045
|
return "filter";
|
|
5043
5046
|
}
|
|
5044
5047
|
}
|
|
5045
|
-
const
|
|
5048
|
+
const Zi = St(wi, xt);
|
|
5046
5049
|
export {
|
|
5047
5050
|
I as Cms,
|
|
5048
5051
|
wt as CmsServiceProvider,
|
|
5049
|
-
|
|
5050
|
-
|
|
5052
|
+
bo as DialogProvider,
|
|
5053
|
+
Zi as Filter,
|
|
5051
5054
|
ke as Icon,
|
|
5052
|
-
|
|
5055
|
+
mo as LayoutProvider,
|
|
5053
5056
|
We as Link,
|
|
5054
|
-
|
|
5057
|
+
Gi as LuminixCms,
|
|
5055
5058
|
Ge as ModelProvider,
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
+
wo as NotificationProvider,
|
|
5060
|
+
$a as TableProvider,
|
|
5061
|
+
gi as i18NextServiceProvider,
|
|
5059
5062
|
qt as useActionEvent,
|
|
5060
|
-
|
|
5063
|
+
Oo as useBackButton,
|
|
5061
5064
|
te as useCurrentModel,
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5065
|
+
ca as useDialog,
|
|
5066
|
+
la as useDisplaceNotifications,
|
|
5067
|
+
aa as useHandleError,
|
|
5068
|
+
fr as useHasSearch,
|
|
5066
5069
|
v as useIsDesktopMode,
|
|
5067
5070
|
z as useLayoutConfig,
|
|
5068
5071
|
_t as useMenu,
|
|
5069
5072
|
Ut as useNotify,
|
|
5070
|
-
|
|
5071
|
-
|
|
5073
|
+
dr as usePageTitle,
|
|
5074
|
+
To as useSearch,
|
|
5072
5075
|
Vt as useSelection,
|
|
5073
5076
|
Bt as useSetPageTitle,
|
|
5074
5077
|
ae as useTable
|