@luminix/mui-cms 0.1.8 → 0.1.10
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 +32 -32
- package/dist/mui-cms.js +1019 -938
- package/package.json +1 -1
- package/types/dist.d.ts +3 -1
- package/types/facades/Icon.d.ts +7 -0
- package/types/providers/CmsServiceProvider.d.ts +1 -1
- package/types/services/IconService.d.ts +10 -0
package/dist/mui-cms.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var mr = Object.defineProperty;
|
|
2
|
+
var gr = (e, t, n) => t in e ? mr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Ve = (e, t, n) => gr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { config as se, collect as W, app as T, model as ye, App as wt, Model as Oe, Route as br, Config as re } from "@luminix/core";
|
|
4
5
|
import { jsx as i, jsxs as w, Fragment as B } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import Vt from "react-dom";
|
|
6
|
+
import { Outlet as yr, useParams as wr, useNavigate as St, useSearchParams as K, Link as Re, Form as Sr } from "react-router-dom";
|
|
7
|
+
import { useCollection as mn, PaginationProvider as Ar, usePagination as Se, ModelForm as xr, useApplyReducers as At, Forms as Cr, LuminixProvider as Er } from "@luminix/react";
|
|
8
|
+
import { useMediaQuery as Ie, Dialog as xt, DialogTitle as Ct, DialogContent as Et, DialogContentText as kr, DialogActions as kt, Button as M, Snackbar as Tr, Alert as Dr, IconButton as q, AlertTitle as Or, Box as V, Unstable_Grid2 as Q, Fab as Rr, SpeedDial as Pr, SpeedDialIcon as vr, SpeedDialAction as Fr, ButtonGroup as Br, Popper as Lr, Grow as Ir, Paper as Tt, ClickAwayListener as Mr, MenuList as Nr, MenuItem as oe, AppBar as gn, Toolbar as jr, Typography as $, Avatar as Ur, Drawer as bn, Divider as Pe, Autocomplete as qr, TextField as Ae, CircularProgress as _r, Switch as Hr, Stack as N, FormControl as ot, InputLabel as at, Select as ve, Badge as Dt, Popover as zr, Link as it, Collapse as yn, TableCell as ee, RadioGroup as Vt, FormControlLabel as $e, Radio as Ke, TableContainer as Wr, Table as Vr, TableHead as $r, TableRow as fe, Checkbox as Ot, TableSortLabel as Kr, Skeleton as $t, TableBody as Yr, TableFooter as Jr, Tabs as Gr, Tab as Kt, Breadcrumbs as Zr, List as Xr, ListItem as Qr, ListItemButton as es, ListItemIcon as wn, ListItemText as Sn, Menu as An, CssBaseline as ts } from "@mui/material";
|
|
9
|
+
import h, { useContext as xn, useMemo as ns } from "react";
|
|
10
|
+
import { useTranslation as L, initReactI18next as rs } from "react-i18next";
|
|
11
|
+
import { Close as Me, ArrowDropDown as Cn, ChevronLeft as Ne, ChevronRight as je, HighlightOffOutlined as lt, AddCircleOutline as En, FilterList as kn, Menu as Tn, LastPage as Dn, FirstPage as On, Search as ct, SwapVert as Rn, ArrowUpward as Pn, ArrowDownward as vn, MoreVert as Rt, ExpandLess as Fn, ExpandMore as Bn, Add as ss, CategoryOutlined as os, DashboardOutlined as as, PeopleOutlined as is } from "@mui/icons-material";
|
|
12
|
+
import { useTheme as Pt, styled as Z, createTheme as ls, ThemeProvider as cs } from "@mui/material/styles";
|
|
13
|
+
import { Str as E, Obj as G, Query as Ln, DateTime as Yt, Func as us, MakeFacade as vt, Reducible as In, ServiceProvider as Mn } from "@luminix/support";
|
|
14
|
+
import Jt from "react-dom";
|
|
15
15
|
import J from "i18next";
|
|
16
|
-
const
|
|
16
|
+
const ds = {
|
|
17
17
|
open: !1,
|
|
18
18
|
setOpen: () => {
|
|
19
19
|
},
|
|
@@ -28,8 +28,8 @@ const us = {
|
|
|
28
28
|
showBackButton: !1,
|
|
29
29
|
setShowBackButton: () => {
|
|
30
30
|
}
|
|
31
|
-
}, X = h.createContext(
|
|
32
|
-
const [t, n] = h.useState(!1), [r, s] = h.useState(""), [o, a] = h.useState(!1), [l, d] = h.useState(!1), u = se("luminix.cms.layout", {}), c =
|
|
31
|
+
}, X = h.createContext(ds), Ye = document.title, fs = ({ children: e }) => {
|
|
32
|
+
const [t, n] = h.useState(!1), [r, s] = h.useState(""), [o, a] = h.useState(!1), [l, d] = h.useState(!1), u = se("luminix.cms.layout", {}), c = Ie((y) => y.breakpoints.up((u == null ? void 0 : u.breakpoint) || "md")), f = {
|
|
33
33
|
open: t,
|
|
34
34
|
setOpen: n,
|
|
35
35
|
layout: u,
|
|
@@ -41,26 +41,26 @@ const us = {
|
|
|
41
41
|
showBackButton: l,
|
|
42
42
|
setShowBackButton: d
|
|
43
43
|
};
|
|
44
|
-
return h.useEffect(() => (document.title = r ? `${r} | ${se("app.name",
|
|
45
|
-
document.title =
|
|
44
|
+
return h.useEffect(() => (document.title = r ? `${r} | ${se("app.name", Ye)}` : se("app.name", Ye), () => {
|
|
45
|
+
document.title = Ye;
|
|
46
46
|
}), [r]), /* @__PURE__ */ i(X.Provider, { value: f, children: e });
|
|
47
|
-
},
|
|
47
|
+
}, Nn = h.createContext({
|
|
48
48
|
Model: null
|
|
49
|
-
}),
|
|
49
|
+
}), Je = ({ Model: e, children: t }) => /* @__PURE__ */ i(Nn.Provider, { value: { Model: e }, children: t }), jn = h.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 ps(e) {
|
|
57
57
|
const [t, n] = h.useState(e);
|
|
58
58
|
return h.useEffect(() => {
|
|
59
59
|
e && n(e);
|
|
60
60
|
}, [e]), e || t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
const [{ current: n, resolve: r }, s] = h.useState({}), o =
|
|
62
|
+
function hs({ children: e, ...t }) {
|
|
63
|
+
const [{ current: n, resolve: r }, s] = h.useState({}), o = ps(n), a = h.useCallback((c) => new Promise((f) => {
|
|
64
64
|
s({
|
|
65
65
|
current: typeof c == "string" ? { message: c } : c,
|
|
66
66
|
resolve: f
|
|
@@ -70,7 +70,7 @@ function ps({ children: e, ...t }) {
|
|
|
70
70
|
}, u = () => {
|
|
71
71
|
r && r(!0), s({});
|
|
72
72
|
};
|
|
73
|
-
return /* @__PURE__ */ w(
|
|
73
|
+
return /* @__PURE__ */ w(jn.Provider, { value: {
|
|
74
74
|
isOpen: !!n,
|
|
75
75
|
current: n,
|
|
76
76
|
dialog: a,
|
|
@@ -78,7 +78,7 @@ function ps({ children: e, ...t }) {
|
|
|
78
78
|
}, children: [
|
|
79
79
|
e,
|
|
80
80
|
/* @__PURE__ */ w(
|
|
81
|
-
|
|
81
|
+
xt,
|
|
82
82
|
{
|
|
83
83
|
open: !!n,
|
|
84
84
|
"aria-labelledby": "alert-dialog-title",
|
|
@@ -86,14 +86,14 @@ function ps({ children: e, ...t }) {
|
|
|
86
86
|
...(n == null ? void 0 : n.dismissable) ?? !0 ? { onClose: d } : {},
|
|
87
87
|
...t,
|
|
88
88
|
children: [
|
|
89
|
-
(o == null ? void 0 : o.title) && /* @__PURE__ */ i(
|
|
90
|
-
/* @__PURE__ */ i(
|
|
91
|
-
/* @__PURE__ */ w(
|
|
89
|
+
(o == null ? void 0 : o.title) && /* @__PURE__ */ i(Ct, { id: "alert-dialog-title", children: o.title }),
|
|
90
|
+
/* @__PURE__ */ i(Et, { children: /* @__PURE__ */ i(kr, { id: "alert-dialog-description", children: o == null ? void 0 : o.message }) }),
|
|
91
|
+
/* @__PURE__ */ w(kt, { children: [
|
|
92
92
|
(o == null ? void 0 : o.type) === "confirm" && /* @__PURE__ */ w(B, { children: [
|
|
93
|
-
/* @__PURE__ */ i(
|
|
94
|
-
/* @__PURE__ */ i(
|
|
93
|
+
/* @__PURE__ */ i(M, { onClick: d, children: (o == null ? void 0 : o.cancelText) ?? l("No") }),
|
|
94
|
+
/* @__PURE__ */ i(M, { onClick: u, autoFocus: !0, children: (o == null ? void 0 : o.confirmText) ?? l("Yes") })
|
|
95
95
|
] }),
|
|
96
|
-
((o == null ? void 0 : o.type) ?? "alert") === "alert" && /* @__PURE__ */ i(
|
|
96
|
+
((o == null ? void 0 : o.type) ?? "alert") === "alert" && /* @__PURE__ */ i(M, { onClick: d, autoFocus: !0, children: (o == null ? void 0 : o.confirmText) ?? l("Ok") })
|
|
97
97
|
] })
|
|
98
98
|
]
|
|
99
99
|
}
|
|
@@ -101,10 +101,10 @@ function ps({ children: e, ...t }) {
|
|
|
101
101
|
] });
|
|
102
102
|
}
|
|
103
103
|
function v() {
|
|
104
|
-
const { isBreakpointUp: e } =
|
|
104
|
+
const { isBreakpointUp: e } = xn(X);
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const Ft = h.createContext({
|
|
108
108
|
isOpen: !1,
|
|
109
109
|
notify: () => {
|
|
110
110
|
},
|
|
@@ -115,11 +115,11 @@ const kt = h.createContext({
|
|
|
115
115
|
displacement: "8px",
|
|
116
116
|
setDisplacement: () => {
|
|
117
117
|
}
|
|
118
|
-
}),
|
|
119
|
-
|
|
118
|
+
}), ut = W([]), ms = (e) => {
|
|
119
|
+
ut.push(
|
|
120
120
|
typeof e == "string" ? { message: e } : e
|
|
121
121
|
);
|
|
122
|
-
},
|
|
122
|
+
}, gs = ({
|
|
123
123
|
children: e,
|
|
124
124
|
autoHideDuration: t = 6e3,
|
|
125
125
|
variant: n,
|
|
@@ -127,19 +127,19 @@ const kt = h.createContext({
|
|
|
127
127
|
sx: s,
|
|
128
128
|
...o
|
|
129
129
|
}) => {
|
|
130
|
-
const a =
|
|
131
|
-
|
|
130
|
+
const a = mn(ut), l = v(), u = Pt().spacing(l ? 3 : 1), [c, f] = h.useState(), [y, S] = h.useState(u), { vertical: b = "bottom" } = r || {}, m = (g, x) => {
|
|
131
|
+
x !== "clickaway" && f(void 0);
|
|
132
132
|
};
|
|
133
133
|
return h.useEffect(() => {
|
|
134
134
|
if (!c && a.isNotEmpty()) {
|
|
135
135
|
const g = setTimeout(() => {
|
|
136
|
-
f(
|
|
136
|
+
f(ut.pull(0) ?? void 0);
|
|
137
137
|
}, 100);
|
|
138
138
|
return () => clearTimeout(g);
|
|
139
139
|
}
|
|
140
|
-
}, [c, a]), /* @__PURE__ */ w(
|
|
140
|
+
}, [c, a]), /* @__PURE__ */ w(Ft.Provider, { value: {
|
|
141
141
|
isOpen: !!c,
|
|
142
|
-
notify:
|
|
142
|
+
notify: ms,
|
|
143
143
|
dismissNotification: m,
|
|
144
144
|
notifications: a.all(),
|
|
145
145
|
current: c,
|
|
@@ -148,7 +148,7 @@ const kt = h.createContext({
|
|
|
148
148
|
}, children: [
|
|
149
149
|
e,
|
|
150
150
|
/* @__PURE__ */ i(
|
|
151
|
-
|
|
151
|
+
Tr,
|
|
152
152
|
{
|
|
153
153
|
open: !!c,
|
|
154
154
|
autoHideDuration: t,
|
|
@@ -160,27 +160,27 @@ const kt = h.createContext({
|
|
|
160
160
|
},
|
|
161
161
|
...o,
|
|
162
162
|
children: c && /* @__PURE__ */ w(
|
|
163
|
-
|
|
163
|
+
Dr,
|
|
164
164
|
{
|
|
165
165
|
onClose: m,
|
|
166
166
|
severity: c.severity,
|
|
167
167
|
variant: n,
|
|
168
168
|
sx: { width: "100%" },
|
|
169
169
|
action: c.actions && [
|
|
170
|
-
...c.actions.map(({ label: g, callback:
|
|
171
|
-
|
|
170
|
+
...c.actions.map(({ label: g, callback: x }, A) => /* @__PURE__ */ i(
|
|
171
|
+
M,
|
|
172
172
|
{
|
|
173
173
|
color: "inherit",
|
|
174
174
|
size: "small",
|
|
175
|
-
onClick:
|
|
175
|
+
onClick: x,
|
|
176
176
|
children: g
|
|
177
177
|
},
|
|
178
|
-
|
|
178
|
+
A
|
|
179
179
|
)),
|
|
180
|
-
/* @__PURE__ */ i(q, { "aria-label": "close", color: "inherit", size: "small", onClick: m, children: /* @__PURE__ */ i(
|
|
180
|
+
/* @__PURE__ */ i(q, { "aria-label": "close", color: "inherit", size: "small", onClick: m, children: /* @__PURE__ */ i(Me, {}) }, "close")
|
|
181
181
|
],
|
|
182
182
|
children: [
|
|
183
|
-
c.title && /* @__PURE__ */ i(
|
|
183
|
+
c.title && /* @__PURE__ */ i(Or, { children: c.title }),
|
|
184
184
|
c.message
|
|
185
185
|
]
|
|
186
186
|
}
|
|
@@ -188,17 +188,17 @@ const kt = h.createContext({
|
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
] });
|
|
191
|
-
},
|
|
192
|
-
const t =
|
|
191
|
+
}, bs = ({ children: e }) => {
|
|
192
|
+
const t = Ie("(prefers-color-scheme: dark)");
|
|
193
193
|
return /* @__PURE__ */ i(
|
|
194
|
-
|
|
194
|
+
gs,
|
|
195
195
|
{
|
|
196
196
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
197
197
|
variant: t ? "standard" : "filled",
|
|
198
|
-
children: /* @__PURE__ */ i(
|
|
198
|
+
children: /* @__PURE__ */ i(hs, { children: /* @__PURE__ */ i(fs, { children: e }) })
|
|
199
199
|
}
|
|
200
200
|
);
|
|
201
|
-
},
|
|
201
|
+
}, ys = (e, {
|
|
202
202
|
Layout: t,
|
|
203
203
|
Dashboard: n,
|
|
204
204
|
ModelIndex: r,
|
|
@@ -206,7 +206,7 @@ const kt = h.createContext({
|
|
|
206
206
|
/* Error */
|
|
207
207
|
}, o) => [
|
|
208
208
|
{
|
|
209
|
-
element: /* @__PURE__ */ i(
|
|
209
|
+
element: /* @__PURE__ */ i(bs, { children: /* @__PURE__ */ i(t, { children: /* @__PURE__ */ i(yr, {}) }) }),
|
|
210
210
|
// errorElement: (
|
|
211
211
|
// <Error />
|
|
212
212
|
// ),
|
|
@@ -218,34 +218,34 @@ const kt = h.createContext({
|
|
|
218
218
|
},
|
|
219
219
|
...Object.entries(o).flatMap(([a, l]) => [
|
|
220
220
|
{
|
|
221
|
-
path: "/" +
|
|
221
|
+
path: "/" + E.kebab(l.plural()),
|
|
222
222
|
name: `luminix.cms.${a}.index`,
|
|
223
|
-
element: /* @__PURE__ */ i(
|
|
223
|
+
element: /* @__PURE__ */ i(Je, { Model: l, children: /* @__PURE__ */ i(Ar, { factory: l.query, children: /* @__PURE__ */ i(r, {}) }) })
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
|
-
path: "/" +
|
|
226
|
+
path: "/" + E.kebab(l.plural()) + "/create",
|
|
227
227
|
name: `luminix.cms.${a}.item`,
|
|
228
|
-
element: /* @__PURE__ */ i(
|
|
228
|
+
element: /* @__PURE__ */ i(Je, { Model: l, children: /* @__PURE__ */ i(s, { create: !0 }) })
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
|
-
path: "/" +
|
|
231
|
+
path: "/" + E.kebab(l.plural()) + "/:id",
|
|
232
232
|
name: `luminix.cms.${a}.item`,
|
|
233
|
-
element: /* @__PURE__ */ i(
|
|
233
|
+
element: /* @__PURE__ */ i(Je, { Model: l, children: /* @__PURE__ */ i(s, {}) })
|
|
234
234
|
}
|
|
235
235
|
])
|
|
236
236
|
]
|
|
237
237
|
}
|
|
238
238
|
];
|
|
239
|
-
function
|
|
239
|
+
function Bt(e) {
|
|
240
240
|
const { setCurrentPage: t } = h.useContext(X);
|
|
241
241
|
h.useEffect(() => (t(e), () => {
|
|
242
242
|
t("");
|
|
243
243
|
}), [e, t]);
|
|
244
244
|
}
|
|
245
|
-
const
|
|
245
|
+
const ws = () => {
|
|
246
246
|
const { t: e } = L();
|
|
247
|
-
return
|
|
248
|
-
},
|
|
247
|
+
return Bt(e("Dashboard")), /* @__PURE__ */ i(B, { children: "Dashboard" });
|
|
248
|
+
}, Ss = ({ error: e }) => /* @__PURE__ */ w("div", { children: [
|
|
249
249
|
/* @__PURE__ */ i("h1", { children: "Ops..." }),
|
|
250
250
|
/* @__PURE__ */ i("p", { children: "Something went wrong" }),
|
|
251
251
|
T().hasDebugModeEnabled() && e && /* @__PURE__ */ i(B, { children: /* @__PURE__ */ w("pre", { style: { whiteSpace: "pre-wrap" }, children: [
|
|
@@ -255,10 +255,10 @@ const ys = () => {
|
|
|
255
255
|
] }) })
|
|
256
256
|
] });
|
|
257
257
|
function H(e, t) {
|
|
258
|
-
const { layout: n } =
|
|
259
|
-
return
|
|
258
|
+
const { layout: n } = xn(X);
|
|
259
|
+
return ns(() => G.get(n, e, t), [n, e, t]);
|
|
260
260
|
}
|
|
261
|
-
const
|
|
261
|
+
const As = Z("div")(({ theme: e }) => ({
|
|
262
262
|
padding: e.spacing(0, 1),
|
|
263
263
|
// necessary for content to be below app bar
|
|
264
264
|
...e.mixins.toolbar
|
|
@@ -291,7 +291,7 @@ const Ss = Z("div")(({ theme: e }) => ({
|
|
|
291
291
|
},
|
|
292
292
|
...u,
|
|
293
293
|
children: [
|
|
294
|
-
/* @__PURE__ */ i(
|
|
294
|
+
/* @__PURE__ */ i(As, { style: { height: a } }),
|
|
295
295
|
/* @__PURE__ */ i(r, {}),
|
|
296
296
|
/* @__PURE__ */ i(V, { sx: { p: { xs: 1, sm: 2, md: 3 } }, children: e })
|
|
297
297
|
]
|
|
@@ -299,23 +299,23 @@ const Ss = Z("div")(({ theme: e }) => ({
|
|
|
299
299
|
)
|
|
300
300
|
] });
|
|
301
301
|
};
|
|
302
|
-
function
|
|
302
|
+
function Cs() {
|
|
303
303
|
const { setShowSearch: e } = h.useContext(X);
|
|
304
304
|
h.useEffect(() => (e(!0), () => {
|
|
305
305
|
e(!1);
|
|
306
306
|
}), [e]);
|
|
307
307
|
}
|
|
308
308
|
function te() {
|
|
309
|
-
const { Model: e } = h.useContext(
|
|
309
|
+
const { Model: e } = h.useContext(Nn);
|
|
310
310
|
return e;
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const Es = () => {
|
|
313
313
|
const e = te(), {
|
|
314
314
|
data: t,
|
|
315
315
|
error: n,
|
|
316
316
|
loading: r
|
|
317
317
|
} = Se();
|
|
318
|
-
|
|
318
|
+
Bt(e.plural()), Cs();
|
|
319
319
|
const s = v(), {
|
|
320
320
|
Breadcrumbs: o,
|
|
321
321
|
["ModelIndex.Pagination"]: a,
|
|
@@ -366,40 +366,40 @@ const Cs = () => {
|
|
|
366
366
|
) })
|
|
367
367
|
] });
|
|
368
368
|
};
|
|
369
|
-
function
|
|
369
|
+
function ks() {
|
|
370
370
|
const { setShowBackButton: e } = h.useContext(X);
|
|
371
371
|
h.useEffect(() => (e(!0), () => {
|
|
372
372
|
e(!1);
|
|
373
373
|
}), [e]);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Un(e, t) {
|
|
376
376
|
return function() {
|
|
377
377
|
return e.apply(t, arguments);
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
const { toString:
|
|
381
|
-
const n =
|
|
380
|
+
const { toString: Ts } = Object.prototype, { getPrototypeOf: Lt } = Object, Ue = /* @__PURE__ */ ((e) => (t) => {
|
|
381
|
+
const n = Ts.call(t);
|
|
382
382
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
383
|
-
})(/* @__PURE__ */ Object.create(null)), Y = (e) => (e = e.toLowerCase(), (t) =>
|
|
384
|
-
function
|
|
383
|
+
})(/* @__PURE__ */ Object.create(null)), Y = (e) => (e = e.toLowerCase(), (t) => Ue(t) === e), qe = (e) => (t) => typeof t === e, { isArray: pe } = Array, we = qe("undefined");
|
|
384
|
+
function Ds(e) {
|
|
385
385
|
return e !== null && !we(e) && e.constructor !== null && !we(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
386
386
|
}
|
|
387
|
-
const
|
|
388
|
-
function
|
|
387
|
+
const qn = Y("ArrayBuffer");
|
|
388
|
+
function Os(e) {
|
|
389
389
|
let t;
|
|
390
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
390
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && qn(e.buffer), t;
|
|
391
391
|
}
|
|
392
|
-
const Rs =
|
|
393
|
-
if (
|
|
392
|
+
const Rs = qe("string"), _ = qe("function"), _n = qe("number"), _e = (e) => e !== null && typeof e == "object", Ps = (e) => e === !0 || e === !1, Te = (e) => {
|
|
393
|
+
if (Ue(e) !== "object")
|
|
394
394
|
return !1;
|
|
395
|
-
const t =
|
|
395
|
+
const t = Lt(e);
|
|
396
396
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
397
|
-
},
|
|
397
|
+
}, vs = Y("Date"), Fs = Y("File"), Bs = Y("Blob"), Ls = Y("FileList"), Is = (e) => _e(e) && _(e.pipe), Ms = (e) => {
|
|
398
398
|
let t;
|
|
399
|
-
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t =
|
|
399
|
+
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = Ue(e)) === "formdata" || // detect form-data instance
|
|
400
400
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
401
|
-
}, Ns = Y("URLSearchParams"), [
|
|
402
|
-
function
|
|
401
|
+
}, Ns = Y("URLSearchParams"), [js, Us, qs, _s] = ["ReadableStream", "Request", "Response", "Headers"].map(Y), Hs = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
402
|
+
function xe(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
403
403
|
if (e === null || typeof e > "u")
|
|
404
404
|
return;
|
|
405
405
|
let r, s;
|
|
@@ -413,7 +413,7 @@ function Ae(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
413
413
|
l = o[r], t.call(null, e[l], l, e);
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Hn(e, t) {
|
|
417
417
|
t = t.toLowerCase();
|
|
418
418
|
const n = Object.keys(e);
|
|
419
419
|
let r = n.length, s;
|
|
@@ -422,71 +422,71 @@ function Rn(e, t) {
|
|
|
422
422
|
return s;
|
|
423
423
|
return null;
|
|
424
424
|
}
|
|
425
|
-
const ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
426
|
-
function
|
|
427
|
-
const { caseless: e } =
|
|
428
|
-
const o = e &&
|
|
429
|
-
|
|
425
|
+
const ie = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, zn = (e) => !we(e) && e !== ie;
|
|
426
|
+
function dt() {
|
|
427
|
+
const { caseless: e } = zn(this) && this || {}, t = {}, n = (r, s) => {
|
|
428
|
+
const o = e && Hn(t, s) || s;
|
|
429
|
+
Te(t[o]) && Te(r) ? t[o] = dt(t[o], r) : Te(r) ? t[o] = dt({}, r) : pe(r) ? t[o] = r.slice() : t[o] = r;
|
|
430
430
|
};
|
|
431
431
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
432
|
-
arguments[r] &&
|
|
432
|
+
arguments[r] && xe(arguments[r], n);
|
|
433
433
|
return t;
|
|
434
434
|
}
|
|
435
|
-
const
|
|
436
|
-
n && _(s) ? e[o] =
|
|
437
|
-
}, { allOwnKeys: r }), e),
|
|
435
|
+
const zs = (e, t, n, { allOwnKeys: r } = {}) => (xe(t, (s, o) => {
|
|
436
|
+
n && _(s) ? e[o] = Un(s, n) : e[o] = s;
|
|
437
|
+
}, { allOwnKeys: r }), e), Ws = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Vs = (e, t, n, r) => {
|
|
438
438
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
439
439
|
value: t.prototype
|
|
440
440
|
}), n && Object.assign(e.prototype, n);
|
|
441
|
-
},
|
|
441
|
+
}, $s = (e, t, n, r) => {
|
|
442
442
|
let s, o, a;
|
|
443
443
|
const l = {};
|
|
444
444
|
if (t = t || {}, e == null) return t;
|
|
445
445
|
do {
|
|
446
446
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
447
447
|
a = s[o], (!r || r(a, e, t)) && !l[a] && (t[a] = e[a], l[a] = !0);
|
|
448
|
-
e = n !== !1 &&
|
|
448
|
+
e = n !== !1 && Lt(e);
|
|
449
449
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
450
450
|
return t;
|
|
451
451
|
}, Ks = (e, t, n) => {
|
|
452
452
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
453
453
|
const r = e.indexOf(t, n);
|
|
454
454
|
return r !== -1 && r === n;
|
|
455
|
-
},
|
|
455
|
+
}, Ys = (e) => {
|
|
456
456
|
if (!e) return null;
|
|
457
457
|
if (pe(e)) return e;
|
|
458
458
|
let t = e.length;
|
|
459
|
-
if (!
|
|
459
|
+
if (!_n(t)) return null;
|
|
460
460
|
const n = new Array(t);
|
|
461
461
|
for (; t-- > 0; )
|
|
462
462
|
n[t] = e[t];
|
|
463
463
|
return n;
|
|
464
|
-
},
|
|
464
|
+
}, Js = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Lt(Uint8Array)), Gs = (e, t) => {
|
|
465
465
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
466
466
|
let s;
|
|
467
467
|
for (; (s = r.next()) && !s.done; ) {
|
|
468
468
|
const o = s.value;
|
|
469
469
|
t.call(e, o[0], o[1]);
|
|
470
470
|
}
|
|
471
|
-
},
|
|
471
|
+
}, Zs = (e, t) => {
|
|
472
472
|
let n;
|
|
473
473
|
const r = [];
|
|
474
474
|
for (; (n = e.exec(t)) !== null; )
|
|
475
475
|
r.push(n);
|
|
476
476
|
return r;
|
|
477
|
-
},
|
|
477
|
+
}, Xs = Y("HTMLFormElement"), Qs = (e) => e.toLowerCase().replace(
|
|
478
478
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
479
479
|
function(n, r, s) {
|
|
480
480
|
return r.toUpperCase() + s;
|
|
481
481
|
}
|
|
482
|
-
),
|
|
482
|
+
), Gt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), eo = Y("RegExp"), Wn = (e, t) => {
|
|
483
483
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
484
|
-
|
|
484
|
+
xe(n, (s, o) => {
|
|
485
485
|
let a;
|
|
486
486
|
(a = t(s, o, e)) !== !1 && (r[o] = a || s);
|
|
487
487
|
}), Object.defineProperties(e, r);
|
|
488
|
-
},
|
|
489
|
-
|
|
488
|
+
}, to = (e) => {
|
|
489
|
+
Wn(e, (t, n) => {
|
|
490
490
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
491
491
|
return !1;
|
|
492
492
|
const r = e[n];
|
|
@@ -500,37 +500,37 @@ const Hs = (e, t, n, { allOwnKeys: r } = {}) => (Ae(t, (s, o) => {
|
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
502
|
});
|
|
503
|
-
},
|
|
503
|
+
}, no = (e, t) => {
|
|
504
504
|
const n = {}, r = (s) => {
|
|
505
505
|
s.forEach((o) => {
|
|
506
506
|
n[o] = !0;
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
509
|
return pe(e) ? r(e) : r(String(e).split(t)), n;
|
|
510
|
-
},
|
|
511
|
-
},
|
|
512
|
-
DIGIT:
|
|
513
|
-
ALPHA:
|
|
514
|
-
ALPHA_DIGIT:
|
|
515
|
-
},
|
|
510
|
+
}, ro = () => {
|
|
511
|
+
}, so = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Ge = "abcdefghijklmnopqrstuvwxyz", Zt = "0123456789", Vn = {
|
|
512
|
+
DIGIT: Zt,
|
|
513
|
+
ALPHA: Ge,
|
|
514
|
+
ALPHA_DIGIT: Ge + Ge.toUpperCase() + Zt
|
|
515
|
+
}, oo = (e = 16, t = Vn.ALPHA_DIGIT) => {
|
|
516
516
|
let n = "";
|
|
517
517
|
const { length: r } = t;
|
|
518
518
|
for (; e--; )
|
|
519
519
|
n += t[Math.random() * r | 0];
|
|
520
520
|
return n;
|
|
521
521
|
};
|
|
522
|
-
function
|
|
522
|
+
function ao(e) {
|
|
523
523
|
return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
524
524
|
}
|
|
525
|
-
const
|
|
525
|
+
const io = (e) => {
|
|
526
526
|
const t = new Array(10), n = (r, s) => {
|
|
527
|
-
if (
|
|
527
|
+
if (_e(r)) {
|
|
528
528
|
if (t.indexOf(r) >= 0)
|
|
529
529
|
return;
|
|
530
530
|
if (!("toJSON" in r)) {
|
|
531
531
|
t[s] = r;
|
|
532
532
|
const o = pe(r) ? [] : {};
|
|
533
|
-
return
|
|
533
|
+
return xe(r, (a, l) => {
|
|
534
534
|
const d = n(a, s + 1);
|
|
535
535
|
!we(d) && (o[l] = d);
|
|
536
536
|
}), t[s] = void 0, o;
|
|
@@ -539,72 +539,72 @@ const ao = (e) => {
|
|
|
539
539
|
return r;
|
|
540
540
|
};
|
|
541
541
|
return n(e, 0);
|
|
542
|
-
},
|
|
542
|
+
}, lo = Y("AsyncFunction"), co = (e) => e && (_e(e) || _(e)) && _(e.then) && _(e.catch), $n = ((e, t) => e ? setImmediate : t ? ((n, r) => (ie.addEventListener("message", ({ source: s, data: o }) => {
|
|
543
543
|
s === ie && o === n && r.length && r.shift()();
|
|
544
544
|
}, !1), (s) => {
|
|
545
545
|
r.push(s), ie.postMessage(n, "*");
|
|
546
546
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
547
547
|
typeof setImmediate == "function",
|
|
548
548
|
_(ie.postMessage)
|
|
549
|
-
),
|
|
549
|
+
), uo = typeof queueMicrotask < "u" ? queueMicrotask.bind(ie) : typeof process < "u" && process.nextTick || $n, p = {
|
|
550
550
|
isArray: pe,
|
|
551
|
-
isArrayBuffer:
|
|
552
|
-
isBuffer:
|
|
553
|
-
isFormData:
|
|
554
|
-
isArrayBufferView:
|
|
551
|
+
isArrayBuffer: qn,
|
|
552
|
+
isBuffer: Ds,
|
|
553
|
+
isFormData: Ms,
|
|
554
|
+
isArrayBufferView: Os,
|
|
555
555
|
isString: Rs,
|
|
556
|
-
isNumber:
|
|
557
|
-
isBoolean:
|
|
558
|
-
isObject:
|
|
559
|
-
isPlainObject:
|
|
560
|
-
isReadableStream:
|
|
561
|
-
isRequest:
|
|
562
|
-
isResponse:
|
|
563
|
-
isHeaders:
|
|
556
|
+
isNumber: _n,
|
|
557
|
+
isBoolean: Ps,
|
|
558
|
+
isObject: _e,
|
|
559
|
+
isPlainObject: Te,
|
|
560
|
+
isReadableStream: js,
|
|
561
|
+
isRequest: Us,
|
|
562
|
+
isResponse: qs,
|
|
563
|
+
isHeaders: _s,
|
|
564
564
|
isUndefined: we,
|
|
565
|
-
isDate:
|
|
566
|
-
isFile:
|
|
567
|
-
isBlob:
|
|
568
|
-
isRegExp:
|
|
565
|
+
isDate: vs,
|
|
566
|
+
isFile: Fs,
|
|
567
|
+
isBlob: Bs,
|
|
568
|
+
isRegExp: eo,
|
|
569
569
|
isFunction: _,
|
|
570
|
-
isStream:
|
|
570
|
+
isStream: Is,
|
|
571
571
|
isURLSearchParams: Ns,
|
|
572
|
-
isTypedArray:
|
|
573
|
-
isFileList:
|
|
574
|
-
forEach:
|
|
575
|
-
merge:
|
|
576
|
-
extend:
|
|
577
|
-
trim:
|
|
578
|
-
stripBOM:
|
|
579
|
-
inherits:
|
|
580
|
-
toFlatObject:
|
|
581
|
-
kindOf:
|
|
572
|
+
isTypedArray: Js,
|
|
573
|
+
isFileList: Ls,
|
|
574
|
+
forEach: xe,
|
|
575
|
+
merge: dt,
|
|
576
|
+
extend: zs,
|
|
577
|
+
trim: Hs,
|
|
578
|
+
stripBOM: Ws,
|
|
579
|
+
inherits: Vs,
|
|
580
|
+
toFlatObject: $s,
|
|
581
|
+
kindOf: Ue,
|
|
582
582
|
kindOfTest: Y,
|
|
583
583
|
endsWith: Ks,
|
|
584
|
-
toArray:
|
|
585
|
-
forEachEntry:
|
|
586
|
-
matchAll:
|
|
587
|
-
isHTMLForm:
|
|
588
|
-
hasOwnProperty:
|
|
589
|
-
hasOwnProp:
|
|
584
|
+
toArray: Ys,
|
|
585
|
+
forEachEntry: Gs,
|
|
586
|
+
matchAll: Zs,
|
|
587
|
+
isHTMLForm: Xs,
|
|
588
|
+
hasOwnProperty: Gt,
|
|
589
|
+
hasOwnProp: Gt,
|
|
590
590
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
591
|
-
reduceDescriptors:
|
|
592
|
-
freezeMethods:
|
|
593
|
-
toObjectSet:
|
|
594
|
-
toCamelCase:
|
|
595
|
-
noop:
|
|
596
|
-
toFiniteNumber:
|
|
597
|
-
findKey:
|
|
591
|
+
reduceDescriptors: Wn,
|
|
592
|
+
freezeMethods: to,
|
|
593
|
+
toObjectSet: no,
|
|
594
|
+
toCamelCase: Qs,
|
|
595
|
+
noop: ro,
|
|
596
|
+
toFiniteNumber: so,
|
|
597
|
+
findKey: Hn,
|
|
598
598
|
global: ie,
|
|
599
|
-
isContextDefined:
|
|
600
|
-
ALPHABET:
|
|
601
|
-
generateString:
|
|
602
|
-
isSpecCompliantForm:
|
|
603
|
-
toJSONObject:
|
|
604
|
-
isAsyncFn:
|
|
605
|
-
isThenable:
|
|
606
|
-
setImmediate:
|
|
607
|
-
asap:
|
|
599
|
+
isContextDefined: zn,
|
|
600
|
+
ALPHABET: Vn,
|
|
601
|
+
generateString: oo,
|
|
602
|
+
isSpecCompliantForm: ao,
|
|
603
|
+
toJSONObject: io,
|
|
604
|
+
isAsyncFn: lo,
|
|
605
|
+
isThenable: co,
|
|
606
|
+
setImmediate: $n,
|
|
607
|
+
asap: uo
|
|
608
608
|
};
|
|
609
609
|
function C(e, t, n, r, s) {
|
|
610
610
|
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), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -630,7 +630,7 @@ p.inherits(C, Error, {
|
|
|
630
630
|
};
|
|
631
631
|
}
|
|
632
632
|
});
|
|
633
|
-
const
|
|
633
|
+
const Kn = C.prototype, Yn = {};
|
|
634
634
|
[
|
|
635
635
|
"ERR_BAD_OPTION_VALUE",
|
|
636
636
|
"ERR_BAD_OPTION",
|
|
@@ -646,35 +646,35 @@ const Bn = C.prototype, Ln = {};
|
|
|
646
646
|
"ERR_INVALID_URL"
|
|
647
647
|
// eslint-disable-next-line func-names
|
|
648
648
|
].forEach((e) => {
|
|
649
|
-
|
|
649
|
+
Yn[e] = { value: e };
|
|
650
650
|
});
|
|
651
|
-
Object.defineProperties(C,
|
|
652
|
-
Object.defineProperty(
|
|
651
|
+
Object.defineProperties(C, Yn);
|
|
652
|
+
Object.defineProperty(Kn, "isAxiosError", { value: !0 });
|
|
653
653
|
C.from = (e, t, n, r, s, o) => {
|
|
654
|
-
const a = Object.create(
|
|
654
|
+
const a = Object.create(Kn);
|
|
655
655
|
return p.toFlatObject(e, a, function(d) {
|
|
656
656
|
return d !== Error.prototype;
|
|
657
657
|
}, (l) => l !== "isAxiosError"), C.call(a, e.message, t, n, r, s), a.cause = e, a.name = e.name, o && Object.assign(a, o), a;
|
|
658
658
|
};
|
|
659
|
-
const
|
|
660
|
-
function
|
|
659
|
+
const fo = null;
|
|
660
|
+
function ft(e) {
|
|
661
661
|
return p.isPlainObject(e) || p.isArray(e);
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function Jn(e) {
|
|
664
664
|
return p.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function Xt(e, t, n) {
|
|
667
667
|
return e ? e.concat(t).map(function(s, o) {
|
|
668
|
-
return s =
|
|
668
|
+
return s = Jn(s), !n && o ? "[" + s + "]" : s;
|
|
669
669
|
}).join(n ? "." : "") : t;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
672
|
-
return p.isArray(e) && !e.some(
|
|
671
|
+
function po(e) {
|
|
672
|
+
return p.isArray(e) && !e.some(ft);
|
|
673
673
|
}
|
|
674
|
-
const
|
|
674
|
+
const ho = p.toFlatObject(p, {}, null, function(t) {
|
|
675
675
|
return /^is[A-Z]/.test(t);
|
|
676
676
|
});
|
|
677
|
-
function
|
|
677
|
+
function He(e, t, n) {
|
|
678
678
|
if (!p.isObject(e))
|
|
679
679
|
throw new TypeError("target must be an object");
|
|
680
680
|
t = t || new FormData(), n = p.toFlatObject(n, {
|
|
@@ -696,38 +696,38 @@ function Me(e, t, n) {
|
|
|
696
696
|
return p.isArrayBuffer(b) || p.isTypedArray(b) ? d && typeof Blob == "function" ? new Blob([b]) : Buffer.from(b) : b;
|
|
697
697
|
}
|
|
698
698
|
function c(b, m, g) {
|
|
699
|
-
let
|
|
699
|
+
let x = b;
|
|
700
700
|
if (b && !g && typeof b == "object") {
|
|
701
701
|
if (p.endsWith(m, "{}"))
|
|
702
702
|
m = r ? m : m.slice(0, -2), b = JSON.stringify(b);
|
|
703
|
-
else if (p.isArray(b) &&
|
|
704
|
-
return m =
|
|
705
|
-
!(p.isUndefined(
|
|
703
|
+
else if (p.isArray(b) && po(b) || (p.isFileList(b) || p.endsWith(m, "[]")) && (x = p.toArray(b)))
|
|
704
|
+
return m = Jn(m), x.forEach(function(k, P) {
|
|
705
|
+
!(p.isUndefined(k) || k === null) && t.append(
|
|
706
706
|
// eslint-disable-next-line no-nested-ternary
|
|
707
|
-
a === !0 ?
|
|
708
|
-
u(
|
|
707
|
+
a === !0 ? Xt([m], P, o) : a === null ? m : m + "[]",
|
|
708
|
+
u(k)
|
|
709
709
|
);
|
|
710
710
|
}), !1;
|
|
711
711
|
}
|
|
712
|
-
return
|
|
712
|
+
return ft(b) ? !0 : (t.append(Xt(g, m, o), u(b)), !1);
|
|
713
713
|
}
|
|
714
|
-
const f = [], y = Object.assign(
|
|
714
|
+
const f = [], y = Object.assign(ho, {
|
|
715
715
|
defaultVisitor: c,
|
|
716
716
|
convertValue: u,
|
|
717
|
-
isVisitable:
|
|
717
|
+
isVisitable: ft
|
|
718
718
|
});
|
|
719
719
|
function S(b, m) {
|
|
720
720
|
if (!p.isUndefined(b)) {
|
|
721
721
|
if (f.indexOf(b) !== -1)
|
|
722
722
|
throw Error("Circular reference detected in " + m.join("."));
|
|
723
|
-
f.push(b), p.forEach(b, function(
|
|
724
|
-
(!(p.isUndefined(
|
|
723
|
+
f.push(b), p.forEach(b, function(x, A) {
|
|
724
|
+
(!(p.isUndefined(x) || x === null) && s.call(
|
|
725
725
|
t,
|
|
726
|
-
|
|
727
|
-
p.isString(
|
|
726
|
+
x,
|
|
727
|
+
p.isString(A) ? A.trim() : A,
|
|
728
728
|
m,
|
|
729
729
|
y
|
|
730
|
-
)) === !0 && S(
|
|
730
|
+
)) === !0 && S(x, m ? m.concat(A) : [A]);
|
|
731
731
|
}), f.pop();
|
|
732
732
|
}
|
|
733
733
|
}
|
|
@@ -735,7 +735,7 @@ function Me(e, t, n) {
|
|
|
735
735
|
throw new TypeError("data must be an object");
|
|
736
736
|
return S(e), t;
|
|
737
737
|
}
|
|
738
|
-
function
|
|
738
|
+
function Qt(e) {
|
|
739
739
|
const t = {
|
|
740
740
|
"!": "%21",
|
|
741
741
|
"'": "%27",
|
|
@@ -749,36 +749,36 @@ function Jt(e) {
|
|
|
749
749
|
return t[r];
|
|
750
750
|
});
|
|
751
751
|
}
|
|
752
|
-
function
|
|
753
|
-
this._pairs = [], e &&
|
|
752
|
+
function It(e, t) {
|
|
753
|
+
this._pairs = [], e && He(e, this, t);
|
|
754
754
|
}
|
|
755
|
-
const
|
|
756
|
-
|
|
755
|
+
const Gn = It.prototype;
|
|
756
|
+
Gn.append = function(t, n) {
|
|
757
757
|
this._pairs.push([t, n]);
|
|
758
758
|
};
|
|
759
|
-
|
|
759
|
+
Gn.toString = function(t) {
|
|
760
760
|
const n = t ? function(r) {
|
|
761
|
-
return t.call(this, r,
|
|
762
|
-
} :
|
|
761
|
+
return t.call(this, r, Qt);
|
|
762
|
+
} : Qt;
|
|
763
763
|
return this._pairs.map(function(s) {
|
|
764
764
|
return n(s[0]) + "=" + n(s[1]);
|
|
765
765
|
}, "").join("&");
|
|
766
766
|
};
|
|
767
|
-
function
|
|
767
|
+
function mo(e) {
|
|
768
768
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function Zn(e, t, n) {
|
|
771
771
|
if (!t)
|
|
772
772
|
return e;
|
|
773
|
-
const r = n && n.encode ||
|
|
773
|
+
const r = n && n.encode || mo, s = n && n.serialize;
|
|
774
774
|
let o;
|
|
775
|
-
if (s ? o = s(t, n) : o = p.isURLSearchParams(t) ? t.toString() : new
|
|
775
|
+
if (s ? o = s(t, n) : o = p.isURLSearchParams(t) ? t.toString() : new It(t, n).toString(r), o) {
|
|
776
776
|
const a = e.indexOf("#");
|
|
777
777
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
778
778
|
}
|
|
779
779
|
return e;
|
|
780
780
|
}
|
|
781
|
-
class
|
|
781
|
+
class en {
|
|
782
782
|
constructor() {
|
|
783
783
|
this.handlers = [];
|
|
784
784
|
}
|
|
@@ -832,41 +832,41 @@ class Gt {
|
|
|
832
832
|
});
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const Xn = {
|
|
836
836
|
silentJSONParsing: !0,
|
|
837
837
|
forcedJSONParsing: !0,
|
|
838
838
|
clarifyTimeoutError: !1
|
|
839
|
-
},
|
|
839
|
+
}, go = typeof URLSearchParams < "u" ? URLSearchParams : It, bo = typeof FormData < "u" ? FormData : null, yo = typeof Blob < "u" ? Blob : null, wo = {
|
|
840
840
|
isBrowser: !0,
|
|
841
841
|
classes: {
|
|
842
|
-
URLSearchParams:
|
|
843
|
-
FormData:
|
|
844
|
-
Blob:
|
|
842
|
+
URLSearchParams: go,
|
|
843
|
+
FormData: bo,
|
|
844
|
+
Blob: yo
|
|
845
845
|
},
|
|
846
846
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
847
|
-
},
|
|
848
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xo =
|
|
847
|
+
}, Mt = typeof window < "u" && typeof document < "u", pt = typeof navigator == "object" && navigator || void 0, So = Mt && (!pt || ["ReactNative", "NativeScript", "NS"].indexOf(pt.product) < 0), Ao = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
848
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xo = Mt && window.location.href || "http://localhost", Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
849
849
|
__proto__: null,
|
|
850
|
-
hasBrowserEnv:
|
|
851
|
-
hasStandardBrowserEnv:
|
|
852
|
-
hasStandardBrowserWebWorkerEnv:
|
|
853
|
-
navigator:
|
|
850
|
+
hasBrowserEnv: Mt,
|
|
851
|
+
hasStandardBrowserEnv: So,
|
|
852
|
+
hasStandardBrowserWebWorkerEnv: Ao,
|
|
853
|
+
navigator: pt,
|
|
854
854
|
origin: xo
|
|
855
855
|
}, Symbol.toStringTag, { value: "Module" })), j = {
|
|
856
|
-
...
|
|
857
|
-
...
|
|
856
|
+
...Co,
|
|
857
|
+
...wo
|
|
858
858
|
};
|
|
859
|
-
function
|
|
860
|
-
return
|
|
859
|
+
function Eo(e, t) {
|
|
860
|
+
return He(e, new j.classes.URLSearchParams(), Object.assign({
|
|
861
861
|
visitor: function(n, r, s, o) {
|
|
862
862
|
return j.isNode && p.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
863
863
|
}
|
|
864
864
|
}, t));
|
|
865
865
|
}
|
|
866
|
-
function
|
|
866
|
+
function ko(e) {
|
|
867
867
|
return p.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
868
868
|
}
|
|
869
|
-
function
|
|
869
|
+
function To(e) {
|
|
870
870
|
const t = {}, n = Object.keys(e);
|
|
871
871
|
let r;
|
|
872
872
|
const s = n.length;
|
|
@@ -875,22 +875,22 @@ function ko(e) {
|
|
|
875
875
|
o = n[r], t[o] = e[o];
|
|
876
876
|
return t;
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function Qn(e) {
|
|
879
879
|
function t(n, r, s, o) {
|
|
880
880
|
let a = n[o++];
|
|
881
881
|
if (a === "__proto__") return !0;
|
|
882
882
|
const l = Number.isFinite(+a), d = o >= n.length;
|
|
883
|
-
return a = !a && p.isArray(s) ? s.length : a, d ? (p.hasOwnProp(s, a) ? s[a] = [s[a], r] : s[a] = r, !l) : ((!s[a] || !p.isObject(s[a])) && (s[a] = []), t(n, r, s[a], o) && p.isArray(s[a]) && (s[a] =
|
|
883
|
+
return a = !a && p.isArray(s) ? s.length : a, d ? (p.hasOwnProp(s, a) ? s[a] = [s[a], r] : s[a] = r, !l) : ((!s[a] || !p.isObject(s[a])) && (s[a] = []), t(n, r, s[a], o) && p.isArray(s[a]) && (s[a] = To(s[a])), !l);
|
|
884
884
|
}
|
|
885
885
|
if (p.isFormData(e) && p.isFunction(e.entries)) {
|
|
886
886
|
const n = {};
|
|
887
887
|
return p.forEachEntry(e, (r, s) => {
|
|
888
|
-
t(
|
|
888
|
+
t(ko(r), s, n, 0);
|
|
889
889
|
}), n;
|
|
890
890
|
}
|
|
891
891
|
return null;
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function Do(e, t, n) {
|
|
894
894
|
if (p.isString(e))
|
|
895
895
|
try {
|
|
896
896
|
return (t || JSON.parse)(e), p.trim(e);
|
|
@@ -901,12 +901,12 @@ function To(e, t, n) {
|
|
|
901
901
|
return (0, JSON.stringify)(e);
|
|
902
902
|
}
|
|
903
903
|
const Ce = {
|
|
904
|
-
transitional:
|
|
904
|
+
transitional: Xn,
|
|
905
905
|
adapter: ["xhr", "http", "fetch"],
|
|
906
906
|
transformRequest: [function(t, n) {
|
|
907
907
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = p.isObject(t);
|
|
908
908
|
if (o && p.isHTMLForm(t) && (t = new FormData(t)), p.isFormData(t))
|
|
909
|
-
return s ? JSON.stringify(
|
|
909
|
+
return s ? JSON.stringify(Qn(t)) : t;
|
|
910
910
|
if (p.isArrayBuffer(t) || p.isBuffer(t) || p.isStream(t) || p.isFile(t) || p.isBlob(t) || p.isReadableStream(t))
|
|
911
911
|
return t;
|
|
912
912
|
if (p.isArrayBufferView(t))
|
|
@@ -916,17 +916,17 @@ const Ce = {
|
|
|
916
916
|
let l;
|
|
917
917
|
if (o) {
|
|
918
918
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
919
|
-
return
|
|
919
|
+
return Eo(t, this.formSerializer).toString();
|
|
920
920
|
if ((l = p.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
921
921
|
const d = this.env && this.env.FormData;
|
|
922
|
-
return
|
|
922
|
+
return He(
|
|
923
923
|
l ? { "files[]": t } : t,
|
|
924
924
|
d && new d(),
|
|
925
925
|
this.formSerializer
|
|
926
926
|
);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
929
|
+
return o || s ? (n.setContentType("application/json", !1), Do(t)) : t;
|
|
930
930
|
}],
|
|
931
931
|
transformResponse: [function(t) {
|
|
932
932
|
const n = this.transitional || Ce.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -969,7 +969,7 @@ const Ce = {
|
|
|
969
969
|
p.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
970
970
|
Ce.headers[e] = {};
|
|
971
971
|
});
|
|
972
|
-
const
|
|
972
|
+
const Oo = p.toObjectSet([
|
|
973
973
|
"age",
|
|
974
974
|
"authorization",
|
|
975
975
|
"content-length",
|
|
@@ -992,24 +992,24 @@ const Do = p.toObjectSet([
|
|
|
992
992
|
let n, r, s;
|
|
993
993
|
return e && e.split(`
|
|
994
994
|
`).forEach(function(a) {
|
|
995
|
-
s = a.indexOf(":"), n = a.substring(0, s).trim().toLowerCase(), r = a.substring(s + 1).trim(), !(!n || t[n] &&
|
|
995
|
+
s = a.indexOf(":"), n = a.substring(0, s).trim().toLowerCase(), r = a.substring(s + 1).trim(), !(!n || t[n] && Oo[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
996
996
|
}), t;
|
|
997
|
-
},
|
|
997
|
+
}, tn = Symbol("internals");
|
|
998
998
|
function ge(e) {
|
|
999
999
|
return e && String(e).trim().toLowerCase();
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1002
|
-
return e === !1 || e == null ? e : p.isArray(e) ? e.map(
|
|
1001
|
+
function De(e) {
|
|
1002
|
+
return e === !1 || e == null ? e : p.isArray(e) ? e.map(De) : String(e);
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function Po(e) {
|
|
1005
1005
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
1006
1006
|
let r;
|
|
1007
1007
|
for (; r = n.exec(e); )
|
|
1008
1008
|
t[r[1]] = r[2];
|
|
1009
1009
|
return t;
|
|
1010
1010
|
}
|
|
1011
|
-
const
|
|
1012
|
-
function
|
|
1011
|
+
const vo = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
1012
|
+
function Ze(e, t, n, r, s) {
|
|
1013
1013
|
if (p.isFunction(r))
|
|
1014
1014
|
return r.call(this, t, n);
|
|
1015
1015
|
if (s && (t = n), !!p.isString(t)) {
|
|
@@ -1019,10 +1019,10 @@ function Ve(e, t, n, r, s) {
|
|
|
1019
1019
|
return r.test(t);
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Fo(e) {
|
|
1023
1023
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Bo(e, t) {
|
|
1026
1026
|
const n = p.toCamelCase(" " + t);
|
|
1027
1027
|
["get", "set", "has"].forEach((r) => {
|
|
1028
1028
|
Object.defineProperty(e, r + n, {
|
|
@@ -1044,12 +1044,12 @@ let U = class {
|
|
|
1044
1044
|
if (!c)
|
|
1045
1045
|
throw new Error("header name must be a non-empty string");
|
|
1046
1046
|
const f = p.findKey(s, c);
|
|
1047
|
-
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] =
|
|
1047
|
+
(!f || s[f] === void 0 || u === !0 || u === void 0 && s[f] !== !1) && (s[f || d] = De(l));
|
|
1048
1048
|
}
|
|
1049
1049
|
const a = (l, d) => p.forEach(l, (u, c) => o(u, c, d));
|
|
1050
1050
|
if (p.isPlainObject(t) || t instanceof this.constructor)
|
|
1051
1051
|
a(t, n);
|
|
1052
|
-
else if (p.isString(t) && (t = t.trim()) && !
|
|
1052
|
+
else if (p.isString(t) && (t = t.trim()) && !vo(t))
|
|
1053
1053
|
a(Ro(t), n);
|
|
1054
1054
|
else if (p.isHeaders(t))
|
|
1055
1055
|
for (const [l, d] of t.entries())
|
|
@@ -1066,7 +1066,7 @@ let U = class {
|
|
|
1066
1066
|
if (!n)
|
|
1067
1067
|
return s;
|
|
1068
1068
|
if (n === !0)
|
|
1069
|
-
return
|
|
1069
|
+
return Po(s);
|
|
1070
1070
|
if (p.isFunction(n))
|
|
1071
1071
|
return n.call(this, s, r);
|
|
1072
1072
|
if (p.isRegExp(n))
|
|
@@ -1078,7 +1078,7 @@ let U = class {
|
|
|
1078
1078
|
has(t, n) {
|
|
1079
1079
|
if (t = ge(t), t) {
|
|
1080
1080
|
const r = p.findKey(this, t);
|
|
1081
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
1081
|
+
return !!(r && this[r] !== void 0 && (!n || Ze(this, this[r], r, n)));
|
|
1082
1082
|
}
|
|
1083
1083
|
return !1;
|
|
1084
1084
|
}
|
|
@@ -1088,7 +1088,7 @@ let U = class {
|
|
|
1088
1088
|
function o(a) {
|
|
1089
1089
|
if (a = ge(a), a) {
|
|
1090
1090
|
const l = p.findKey(r, a);
|
|
1091
|
-
l && (!n ||
|
|
1091
|
+
l && (!n || Ze(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
1094
|
return p.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -1098,7 +1098,7 @@ let U = class {
|
|
|
1098
1098
|
let r = n.length, s = !1;
|
|
1099
1099
|
for (; r--; ) {
|
|
1100
1100
|
const o = n[r];
|
|
1101
|
-
(!t ||
|
|
1101
|
+
(!t || Ze(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
1102
1102
|
}
|
|
1103
1103
|
return s;
|
|
1104
1104
|
}
|
|
@@ -1107,11 +1107,11 @@ let U = class {
|
|
|
1107
1107
|
return p.forEach(this, (s, o) => {
|
|
1108
1108
|
const a = p.findKey(r, o);
|
|
1109
1109
|
if (a) {
|
|
1110
|
-
n[a] =
|
|
1110
|
+
n[a] = De(s), delete n[o];
|
|
1111
1111
|
return;
|
|
1112
1112
|
}
|
|
1113
|
-
const l = t ?
|
|
1114
|
-
l !== o && delete n[o], n[l] =
|
|
1113
|
+
const l = t ? Fo(o) : String(o).trim();
|
|
1114
|
+
l !== o && delete n[o], n[l] = De(s), r[l] = !0;
|
|
1115
1115
|
}), this;
|
|
1116
1116
|
}
|
|
1117
1117
|
concat(...t) {
|
|
@@ -1141,12 +1141,12 @@ let U = class {
|
|
|
1141
1141
|
return n.forEach((s) => r.set(s)), r;
|
|
1142
1142
|
}
|
|
1143
1143
|
static accessor(t) {
|
|
1144
|
-
const r = (this[
|
|
1144
|
+
const r = (this[tn] = this[tn] = {
|
|
1145
1145
|
accessors: {}
|
|
1146
1146
|
}).accessors, s = this.prototype;
|
|
1147
1147
|
function o(a) {
|
|
1148
1148
|
const l = ge(a);
|
|
1149
|
-
r[l] || (
|
|
1149
|
+
r[l] || (Bo(s, a), r[l] = !0);
|
|
1150
1150
|
}
|
|
1151
1151
|
return p.isArray(t) ? t.forEach(o) : o(t), this;
|
|
1152
1152
|
}
|
|
@@ -1162,14 +1162,14 @@ p.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
|
1162
1162
|
};
|
|
1163
1163
|
});
|
|
1164
1164
|
p.freezeMethods(U);
|
|
1165
|
-
function
|
|
1165
|
+
function Xe(e, t) {
|
|
1166
1166
|
const n = this || Ce, r = t || n, s = U.from(r.headers);
|
|
1167
1167
|
let o = r.data;
|
|
1168
1168
|
return p.forEach(e, function(l) {
|
|
1169
1169
|
o = l.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
1170
1170
|
}), s.normalize(), o;
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function er(e) {
|
|
1173
1173
|
return !!(e && e.__CANCEL__);
|
|
1174
1174
|
}
|
|
1175
1175
|
function he(e, t, n) {
|
|
@@ -1178,7 +1178,7 @@ function he(e, t, n) {
|
|
|
1178
1178
|
p.inherits(he, C, {
|
|
1179
1179
|
__CANCEL__: !0
|
|
1180
1180
|
});
|
|
1181
|
-
function
|
|
1181
|
+
function tr(e, t, n) {
|
|
1182
1182
|
const r = n.config.validateStatus;
|
|
1183
1183
|
!n.status || !r || r(n.status) ? e(n) : t(new C(
|
|
1184
1184
|
"Request failed with status code " + n.status,
|
|
@@ -1188,11 +1188,11 @@ function _n(e, t, n) {
|
|
|
1188
1188
|
n
|
|
1189
1189
|
));
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function Lo(e) {
|
|
1192
1192
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1193
1193
|
return t && t[1] || "";
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function Io(e, t) {
|
|
1196
1196
|
e = e || 10;
|
|
1197
1197
|
const n = new Array(e), r = new Array(e);
|
|
1198
1198
|
let s = 0, o = 0, a;
|
|
@@ -1208,7 +1208,7 @@ function Lo(e, t) {
|
|
|
1208
1208
|
return S ? Math.round(y * 1e3 / S) : void 0;
|
|
1209
1209
|
};
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function Mo(e, t) {
|
|
1212
1212
|
let n = 0, r = 1e3 / t, s, o;
|
|
1213
1213
|
const a = (u, c = Date.now()) => {
|
|
1214
1214
|
n = c, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
@@ -1220,10 +1220,10 @@ function Io(e, t) {
|
|
|
1220
1220
|
}, r - f)));
|
|
1221
1221
|
}, () => s && a(s)];
|
|
1222
1222
|
}
|
|
1223
|
-
const
|
|
1223
|
+
const Fe = (e, t, n = 3) => {
|
|
1224
1224
|
let r = 0;
|
|
1225
|
-
const s =
|
|
1226
|
-
return
|
|
1225
|
+
const s = Io(50, 250);
|
|
1226
|
+
return Mo((o) => {
|
|
1227
1227
|
const a = o.loaded, l = o.lengthComputable ? o.total : void 0, d = a - r, u = s(d), c = a <= l;
|
|
1228
1228
|
r = a;
|
|
1229
1229
|
const f = {
|
|
@@ -1239,14 +1239,14 @@ const Pe = (e, t, n = 3) => {
|
|
|
1239
1239
|
};
|
|
1240
1240
|
e(f);
|
|
1241
1241
|
}, n);
|
|
1242
|
-
},
|
|
1242
|
+
}, nn = (e, t) => {
|
|
1243
1243
|
const n = e != null;
|
|
1244
1244
|
return [(r) => t[0]({
|
|
1245
1245
|
lengthComputable: n,
|
|
1246
1246
|
total: e,
|
|
1247
1247
|
loaded: r
|
|
1248
1248
|
}), t[1]];
|
|
1249
|
-
},
|
|
1249
|
+
}, rn = (e) => (...t) => p.asap(() => e(...t)), No = j.hasStandardBrowserEnv ? (
|
|
1250
1250
|
// Standard browser envs have full support of the APIs needed to test
|
|
1251
1251
|
// whether the request URL is of the same origin as current location.
|
|
1252
1252
|
function() {
|
|
@@ -1277,7 +1277,7 @@ const Pe = (e, t, n = 3) => {
|
|
|
1277
1277
|
return !0;
|
|
1278
1278
|
};
|
|
1279
1279
|
}()
|
|
1280
|
-
),
|
|
1280
|
+
), jo = j.hasStandardBrowserEnv ? (
|
|
1281
1281
|
// Standard browser envs support document.cookie
|
|
1282
1282
|
{
|
|
1283
1283
|
write(e, t, n, r, s, o) {
|
|
@@ -1304,16 +1304,16 @@ const Pe = (e, t, n = 3) => {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
1306
|
);
|
|
1307
|
-
function
|
|
1307
|
+
function Uo(e) {
|
|
1308
1308
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function qo(e, t) {
|
|
1311
1311
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1314
|
-
return e && !
|
|
1313
|
+
function nr(e, t) {
|
|
1314
|
+
return e && !Uo(t) ? qo(e, t) : t;
|
|
1315
1315
|
}
|
|
1316
|
-
const
|
|
1316
|
+
const sn = (e) => e instanceof U ? { ...e } : e;
|
|
1317
1317
|
function ue(e, t) {
|
|
1318
1318
|
t = t || {};
|
|
1319
1319
|
const n = {};
|
|
@@ -1371,17 +1371,17 @@ function ue(e, t) {
|
|
|
1371
1371
|
socketPath: a,
|
|
1372
1372
|
responseEncoding: a,
|
|
1373
1373
|
validateStatus: l,
|
|
1374
|
-
headers: (u, c) => s(
|
|
1374
|
+
headers: (u, c) => s(sn(u), sn(c), !0)
|
|
1375
1375
|
};
|
|
1376
1376
|
return p.forEach(Object.keys(Object.assign({}, e, t)), function(c) {
|
|
1377
1377
|
const f = d[c] || s, y = f(e[c], t[c], c);
|
|
1378
1378
|
p.isUndefined(y) && f !== l || (n[c] = y);
|
|
1379
1379
|
}), n;
|
|
1380
1380
|
}
|
|
1381
|
-
const
|
|
1381
|
+
const rr = (e) => {
|
|
1382
1382
|
const t = ue({}, e);
|
|
1383
1383
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: a, auth: l } = t;
|
|
1384
|
-
t.headers = a = U.from(a), t.url =
|
|
1384
|
+
t.headers = a = U.from(a), t.url = Zn(nr(t.baseURL, t.url), e.params, e.paramsSerializer), l && a.set(
|
|
1385
1385
|
"Authorization",
|
|
1386
1386
|
"Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
|
|
1387
1387
|
);
|
|
@@ -1395,13 +1395,13 @@ const zn = (e) => {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
if (j.hasStandardBrowserEnv && (r && p.isFunction(r) && (r = r(t)), r || r !== !1 && No(t.url))) {
|
|
1398
|
-
const u = s && o &&
|
|
1398
|
+
const u = s && o && jo.read(o);
|
|
1399
1399
|
u && a.set(s, u);
|
|
1400
1400
|
}
|
|
1401
1401
|
return t;
|
|
1402
|
-
},
|
|
1402
|
+
}, _o = typeof XMLHttpRequest < "u", Ho = _o && function(e) {
|
|
1403
1403
|
return new Promise(function(n, r) {
|
|
1404
|
-
const s =
|
|
1404
|
+
const s = rr(e);
|
|
1405
1405
|
let o = s.data;
|
|
1406
1406
|
const a = U.from(s.headers).normalize();
|
|
1407
1407
|
let { responseType: l, onUploadProgress: d, onDownloadProgress: u } = s, c, f, y, S, b;
|
|
@@ -1410,53 +1410,53 @@ const zn = (e) => {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
let g = new XMLHttpRequest();
|
|
1412
1412
|
g.open(s.method.toUpperCase(), s.url, !0), g.timeout = s.timeout;
|
|
1413
|
-
function
|
|
1413
|
+
function x() {
|
|
1414
1414
|
if (!g)
|
|
1415
1415
|
return;
|
|
1416
|
-
const
|
|
1416
|
+
const k = U.from(
|
|
1417
1417
|
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
1418
|
-
),
|
|
1418
|
+
), O = {
|
|
1419
1419
|
data: !l || l === "text" || l === "json" ? g.responseText : g.response,
|
|
1420
1420
|
status: g.status,
|
|
1421
1421
|
statusText: g.statusText,
|
|
1422
|
-
headers:
|
|
1422
|
+
headers: k,
|
|
1423
1423
|
config: e,
|
|
1424
1424
|
request: g
|
|
1425
1425
|
};
|
|
1426
|
-
|
|
1426
|
+
tr(function(D) {
|
|
1427
1427
|
n(D), m();
|
|
1428
1428
|
}, function(D) {
|
|
1429
1429
|
r(D), m();
|
|
1430
|
-
},
|
|
1430
|
+
}, O), g = null;
|
|
1431
1431
|
}
|
|
1432
|
-
"onloadend" in g ? g.onloadend =
|
|
1433
|
-
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1432
|
+
"onloadend" in g ? g.onloadend = x : g.onreadystatechange = function() {
|
|
1433
|
+
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(x);
|
|
1434
1434
|
}, g.onabort = function() {
|
|
1435
1435
|
g && (r(new C("Request aborted", C.ECONNABORTED, e, g)), g = null);
|
|
1436
1436
|
}, g.onerror = function() {
|
|
1437
1437
|
r(new C("Network Error", C.ERR_NETWORK, e, g)), g = null;
|
|
1438
1438
|
}, g.ontimeout = function() {
|
|
1439
1439
|
let P = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1440
|
-
const
|
|
1440
|
+
const O = s.transitional || Xn;
|
|
1441
1441
|
s.timeoutErrorMessage && (P = s.timeoutErrorMessage), r(new C(
|
|
1442
1442
|
P,
|
|
1443
|
-
|
|
1443
|
+
O.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED,
|
|
1444
1444
|
e,
|
|
1445
1445
|
g
|
|
1446
1446
|
)), g = null;
|
|
1447
|
-
}, o === void 0 && a.setContentType(null), "setRequestHeader" in g && p.forEach(a.toJSON(), function(P,
|
|
1448
|
-
g.setRequestHeader(
|
|
1449
|
-
}), p.isUndefined(s.withCredentials) || (g.withCredentials = !!s.withCredentials), l && l !== "json" && (g.responseType = s.responseType), u && ([y, b] =
|
|
1450
|
-
g && (r(!
|
|
1447
|
+
}, o === void 0 && a.setContentType(null), "setRequestHeader" in g && p.forEach(a.toJSON(), function(P, O) {
|
|
1448
|
+
g.setRequestHeader(O, P);
|
|
1449
|
+
}), p.isUndefined(s.withCredentials) || (g.withCredentials = !!s.withCredentials), l && l !== "json" && (g.responseType = s.responseType), u && ([y, b] = Fe(u, !0), g.addEventListener("progress", y)), d && g.upload && ([f, S] = Fe(d), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (c = (k) => {
|
|
1450
|
+
g && (r(!k || k.type ? new he(null, e, g) : k), g.abort(), g = null);
|
|
1451
1451
|
}, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
|
|
1452
|
-
const
|
|
1453
|
-
if (
|
|
1454
|
-
r(new C("Unsupported protocol " +
|
|
1452
|
+
const A = Lo(s.url);
|
|
1453
|
+
if (A && j.protocols.indexOf(A) === -1) {
|
|
1454
|
+
r(new C("Unsupported protocol " + A + ":", C.ERR_BAD_REQUEST, e));
|
|
1455
1455
|
return;
|
|
1456
1456
|
}
|
|
1457
1457
|
g.send(o || null);
|
|
1458
1458
|
});
|
|
1459
|
-
},
|
|
1459
|
+
}, zo = (e, t) => {
|
|
1460
1460
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1461
1461
|
if (t || n) {
|
|
1462
1462
|
let r = new AbortController(), s;
|
|
@@ -1479,7 +1479,7 @@ const zn = (e) => {
|
|
|
1479
1479
|
const { signal: d } = r;
|
|
1480
1480
|
return d.unsubscribe = () => p.asap(l), d;
|
|
1481
1481
|
}
|
|
1482
|
-
},
|
|
1482
|
+
}, Wo = function* (e, t) {
|
|
1483
1483
|
let n = e.byteLength;
|
|
1484
1484
|
if (n < t) {
|
|
1485
1485
|
yield e;
|
|
@@ -1488,10 +1488,10 @@ const zn = (e) => {
|
|
|
1488
1488
|
let r = 0, s;
|
|
1489
1489
|
for (; r < n; )
|
|
1490
1490
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1491
|
-
},
|
|
1492
|
-
for await (const n of
|
|
1493
|
-
yield*
|
|
1494
|
-
},
|
|
1491
|
+
}, Vo = async function* (e, t) {
|
|
1492
|
+
for await (const n of $o(e))
|
|
1493
|
+
yield* Wo(n, t);
|
|
1494
|
+
}, $o = async function* (e) {
|
|
1495
1495
|
if (e[Symbol.asyncIterator]) {
|
|
1496
1496
|
yield* e;
|
|
1497
1497
|
return;
|
|
@@ -1507,8 +1507,8 @@ const zn = (e) => {
|
|
|
1507
1507
|
} finally {
|
|
1508
1508
|
await t.cancel();
|
|
1509
1509
|
}
|
|
1510
|
-
},
|
|
1511
|
-
const s =
|
|
1510
|
+
}, on = (e, t, n, r) => {
|
|
1511
|
+
const s = Vo(e, t);
|
|
1512
1512
|
let o = 0, a, l = (d) => {
|
|
1513
1513
|
a || (a = !0, r && r(d));
|
|
1514
1514
|
};
|
|
@@ -1536,13 +1536,13 @@ const zn = (e) => {
|
|
|
1536
1536
|
}, {
|
|
1537
1537
|
highWaterMark: 2
|
|
1538
1538
|
});
|
|
1539
|
-
},
|
|
1539
|
+
}, ze = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", sr = ze && typeof ReadableStream == "function", Ko = ze && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), or = (e, ...t) => {
|
|
1540
1540
|
try {
|
|
1541
1541
|
return !!e(...t);
|
|
1542
1542
|
} catch {
|
|
1543
1543
|
return !1;
|
|
1544
1544
|
}
|
|
1545
|
-
},
|
|
1545
|
+
}, Yo = sr && or(() => {
|
|
1546
1546
|
let e = !1;
|
|
1547
1547
|
const t = new Request(j.origin, {
|
|
1548
1548
|
body: new ReadableStream(),
|
|
@@ -1552,17 +1552,17 @@ const zn = (e) => {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
}).headers.has("Content-Type");
|
|
1554
1554
|
return e && !t;
|
|
1555
|
-
}),
|
|
1556
|
-
stream:
|
|
1555
|
+
}), an = 64 * 1024, ht = sr && or(() => p.isReadableStream(new Response("").body)), Be = {
|
|
1556
|
+
stream: ht && ((e) => e.body)
|
|
1557
1557
|
};
|
|
1558
|
-
|
|
1558
|
+
ze && ((e) => {
|
|
1559
1559
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1560
|
-
!
|
|
1560
|
+
!Be[t] && (Be[t] = p.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1561
1561
|
throw new C(`Response type '${t}' is not supported`, C.ERR_NOT_SUPPORT, r);
|
|
1562
1562
|
});
|
|
1563
1563
|
});
|
|
1564
1564
|
})(new Response());
|
|
1565
|
-
const
|
|
1565
|
+
const Jo = async (e) => {
|
|
1566
1566
|
if (e == null)
|
|
1567
1567
|
return 0;
|
|
1568
1568
|
if (p.isBlob(e))
|
|
@@ -1576,10 +1576,10 @@ const Yo = async (e) => {
|
|
|
1576
1576
|
return e.byteLength;
|
|
1577
1577
|
if (p.isURLSearchParams(e) && (e = e + ""), p.isString(e))
|
|
1578
1578
|
return (await Ko(e)).byteLength;
|
|
1579
|
-
},
|
|
1579
|
+
}, Go = async (e, t) => {
|
|
1580
1580
|
const n = p.toFiniteNumber(e.getContentLength());
|
|
1581
|
-
return n ??
|
|
1582
|
-
},
|
|
1581
|
+
return n ?? Jo(t);
|
|
1582
|
+
}, Zo = ze && (async (e) => {
|
|
1583
1583
|
let {
|
|
1584
1584
|
url: t,
|
|
1585
1585
|
method: n,
|
|
@@ -1593,30 +1593,30 @@ const Yo = async (e) => {
|
|
|
1593
1593
|
headers: c,
|
|
1594
1594
|
withCredentials: f = "same-origin",
|
|
1595
1595
|
fetchOptions: y
|
|
1596
|
-
} =
|
|
1596
|
+
} = rr(e);
|
|
1597
1597
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1598
|
-
let S =
|
|
1598
|
+
let S = zo([s, o && o.toAbortSignal()], a), b;
|
|
1599
1599
|
const m = S && S.unsubscribe && (() => {
|
|
1600
1600
|
S.unsubscribe();
|
|
1601
1601
|
});
|
|
1602
1602
|
let g;
|
|
1603
1603
|
try {
|
|
1604
|
-
if (d &&
|
|
1605
|
-
let
|
|
1604
|
+
if (d && Yo && n !== "get" && n !== "head" && (g = await Go(c, r)) !== 0) {
|
|
1605
|
+
let O = new Request(t, {
|
|
1606
1606
|
method: "POST",
|
|
1607
1607
|
body: r,
|
|
1608
1608
|
duplex: "half"
|
|
1609
|
-
}),
|
|
1610
|
-
if (p.isFormData(r) && (
|
|
1611
|
-
const [D, z] =
|
|
1609
|
+
}), R;
|
|
1610
|
+
if (p.isFormData(r) && (R = O.headers.get("content-type")) && c.setContentType(R), O.body) {
|
|
1611
|
+
const [D, z] = nn(
|
|
1612
1612
|
g,
|
|
1613
|
-
|
|
1613
|
+
Fe(rn(d))
|
|
1614
1614
|
);
|
|
1615
|
-
r =
|
|
1615
|
+
r = on(O.body, an, D, z);
|
|
1616
1616
|
}
|
|
1617
1617
|
}
|
|
1618
1618
|
p.isString(f) || (f = f ? "include" : "omit");
|
|
1619
|
-
const
|
|
1619
|
+
const x = "credentials" in Request.prototype;
|
|
1620
1620
|
b = new Request(t, {
|
|
1621
1621
|
...y,
|
|
1622
1622
|
signal: S,
|
|
@@ -1624,52 +1624,52 @@ const Yo = async (e) => {
|
|
|
1624
1624
|
headers: c.normalize().toJSON(),
|
|
1625
1625
|
body: r,
|
|
1626
1626
|
duplex: "half",
|
|
1627
|
-
credentials:
|
|
1627
|
+
credentials: x ? f : void 0
|
|
1628
1628
|
});
|
|
1629
|
-
let
|
|
1630
|
-
const
|
|
1631
|
-
if (
|
|
1632
|
-
const
|
|
1629
|
+
let A = await fetch(b);
|
|
1630
|
+
const k = ht && (u === "stream" || u === "response");
|
|
1631
|
+
if (ht && (l || k && m)) {
|
|
1632
|
+
const O = {};
|
|
1633
1633
|
["status", "statusText", "headers"].forEach((Ee) => {
|
|
1634
|
-
|
|
1634
|
+
O[Ee] = A[Ee];
|
|
1635
1635
|
});
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1638
|
-
|
|
1636
|
+
const R = p.toFiniteNumber(A.headers.get("content-length")), [D, z] = l && nn(
|
|
1637
|
+
R,
|
|
1638
|
+
Fe(rn(l), !0)
|
|
1639
1639
|
) || [];
|
|
1640
|
-
|
|
1641
|
-
|
|
1640
|
+
A = new Response(
|
|
1641
|
+
on(A.body, an, D, () => {
|
|
1642
1642
|
z && z(), m && m();
|
|
1643
1643
|
}),
|
|
1644
|
-
|
|
1644
|
+
O
|
|
1645
1645
|
);
|
|
1646
1646
|
}
|
|
1647
1647
|
u = u || "text";
|
|
1648
|
-
let P = await
|
|
1649
|
-
return !
|
|
1650
|
-
|
|
1648
|
+
let P = await Be[p.findKey(Be, u) || "text"](A, e);
|
|
1649
|
+
return !k && m && m(), await new Promise((O, R) => {
|
|
1650
|
+
tr(O, R, {
|
|
1651
1651
|
data: P,
|
|
1652
|
-
headers: U.from(
|
|
1653
|
-
status:
|
|
1654
|
-
statusText:
|
|
1652
|
+
headers: U.from(A.headers),
|
|
1653
|
+
status: A.status,
|
|
1654
|
+
statusText: A.statusText,
|
|
1655
1655
|
config: e,
|
|
1656
1656
|
request: b
|
|
1657
1657
|
});
|
|
1658
1658
|
});
|
|
1659
|
-
} catch (
|
|
1660
|
-
throw m && m(),
|
|
1659
|
+
} catch (x) {
|
|
1660
|
+
throw m && m(), x && x.name === "TypeError" && /fetch/i.test(x.message) ? Object.assign(
|
|
1661
1661
|
new C("Network Error", C.ERR_NETWORK, e, b),
|
|
1662
1662
|
{
|
|
1663
|
-
cause:
|
|
1663
|
+
cause: x.cause || x
|
|
1664
1664
|
}
|
|
1665
|
-
) : C.from(
|
|
1665
|
+
) : C.from(x, x && x.code, e, b);
|
|
1666
1666
|
}
|
|
1667
|
-
}),
|
|
1668
|
-
http:
|
|
1669
|
-
xhr:
|
|
1670
|
-
fetch:
|
|
1667
|
+
}), mt = {
|
|
1668
|
+
http: fo,
|
|
1669
|
+
xhr: Ho,
|
|
1670
|
+
fetch: Zo
|
|
1671
1671
|
};
|
|
1672
|
-
p.forEach(
|
|
1672
|
+
p.forEach(mt, (e, t) => {
|
|
1673
1673
|
if (e) {
|
|
1674
1674
|
try {
|
|
1675
1675
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1678,7 +1678,7 @@ p.forEach(lt, (e, t) => {
|
|
|
1678
1678
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1679
1679
|
}
|
|
1680
1680
|
});
|
|
1681
|
-
const
|
|
1681
|
+
const ln = (e) => `- ${e}`, Xo = (e) => p.isFunction(e) || e === null || e === !1, ar = {
|
|
1682
1682
|
getAdapter: (e) => {
|
|
1683
1683
|
e = p.isArray(e) ? e : [e];
|
|
1684
1684
|
const { length: t } = e;
|
|
@@ -1687,7 +1687,7 @@ const rn = (e) => `- ${e}`, Zo = (e) => p.isFunction(e) || e === null || e === !
|
|
|
1687
1687
|
for (let o = 0; o < t; o++) {
|
|
1688
1688
|
n = e[o];
|
|
1689
1689
|
let a;
|
|
1690
|
-
if (r = n, !
|
|
1690
|
+
if (r = n, !Xo(n) && (r = mt[(a = String(n)).toLowerCase()], r === void 0))
|
|
1691
1691
|
throw new C(`Unknown adapter '${a}'`);
|
|
1692
1692
|
if (r)
|
|
1693
1693
|
break;
|
|
@@ -1698,8 +1698,8 @@ const rn = (e) => `- ${e}`, Zo = (e) => p.isFunction(e) || e === null || e === !
|
|
|
1698
1698
|
([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1699
1699
|
);
|
|
1700
1700
|
let a = t ? o.length > 1 ? `since :
|
|
1701
|
-
` + o.map(
|
|
1702
|
-
`) : " " +
|
|
1701
|
+
` + o.map(ln).join(`
|
|
1702
|
+
`) : " " + ln(o[0]) : "as no adapter specified";
|
|
1703
1703
|
throw new C(
|
|
1704
1704
|
"There is no suitable adapter to dispatch the request " + a,
|
|
1705
1705
|
"ERR_NOT_SUPPORT"
|
|
@@ -1707,40 +1707,40 @@ const rn = (e) => `- ${e}`, Zo = (e) => p.isFunction(e) || e === null || e === !
|
|
|
1707
1707
|
}
|
|
1708
1708
|
return r;
|
|
1709
1709
|
},
|
|
1710
|
-
adapters:
|
|
1710
|
+
adapters: mt
|
|
1711
1711
|
};
|
|
1712
|
-
function
|
|
1712
|
+
function Qe(e) {
|
|
1713
1713
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1714
1714
|
throw new he(null, e);
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1717
|
-
return
|
|
1716
|
+
function cn(e) {
|
|
1717
|
+
return Qe(e), e.headers = U.from(e.headers), e.data = Xe.call(
|
|
1718
1718
|
e,
|
|
1719
1719
|
e.transformRequest
|
|
1720
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1721
|
-
return
|
|
1720
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ar.getAdapter(e.adapter || Ce.adapter)(e).then(function(r) {
|
|
1721
|
+
return Qe(e), r.data = Xe.call(
|
|
1722
1722
|
e,
|
|
1723
1723
|
e.transformResponse,
|
|
1724
1724
|
r
|
|
1725
1725
|
), r.headers = U.from(r.headers), r;
|
|
1726
1726
|
}, function(r) {
|
|
1727
|
-
return
|
|
1727
|
+
return er(r) || (Qe(e), r && r.response && (r.response.data = Xe.call(
|
|
1728
1728
|
e,
|
|
1729
1729
|
e.transformResponse,
|
|
1730
1730
|
r.response
|
|
1731
1731
|
), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
|
|
1732
1732
|
});
|
|
1733
1733
|
}
|
|
1734
|
-
const
|
|
1734
|
+
const ir = "1.7.7", Nt = {};
|
|
1735
1735
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1736
|
-
|
|
1736
|
+
Nt[e] = function(r) {
|
|
1737
1737
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1738
1738
|
};
|
|
1739
1739
|
});
|
|
1740
|
-
const
|
|
1741
|
-
|
|
1740
|
+
const un = {};
|
|
1741
|
+
Nt.transitional = function(t, n, r) {
|
|
1742
1742
|
function s(o, a) {
|
|
1743
|
-
return "[Axios v" +
|
|
1743
|
+
return "[Axios v" + ir + "] Transitional option '" + o + "'" + a + (r ? ". " + r : "");
|
|
1744
1744
|
}
|
|
1745
1745
|
return (o, a, l) => {
|
|
1746
1746
|
if (t === !1)
|
|
@@ -1748,7 +1748,7 @@ Pt.transitional = function(t, n, r) {
|
|
|
1748
1748
|
s(a, " has been removed" + (n ? " in " + n : "")),
|
|
1749
1749
|
C.ERR_DEPRECATED
|
|
1750
1750
|
);
|
|
1751
|
-
return n && !
|
|
1751
|
+
return n && !un[a] && (un[a] = !0, console.warn(
|
|
1752
1752
|
s(
|
|
1753
1753
|
a,
|
|
1754
1754
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1756,7 +1756,7 @@ Pt.transitional = function(t, n, r) {
|
|
|
1756
1756
|
)), t ? t(o, a, l) : !0;
|
|
1757
1757
|
};
|
|
1758
1758
|
};
|
|
1759
|
-
function
|
|
1759
|
+
function Qo(e, t, n) {
|
|
1760
1760
|
if (typeof e != "object")
|
|
1761
1761
|
throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
|
|
1762
1762
|
const r = Object.keys(e);
|
|
@@ -1773,15 +1773,15 @@ function Xo(e, t, n) {
|
|
|
1773
1773
|
throw new C("Unknown option " + o, C.ERR_BAD_OPTION);
|
|
1774
1774
|
}
|
|
1775
1775
|
}
|
|
1776
|
-
const
|
|
1777
|
-
assertOptions:
|
|
1778
|
-
validators:
|
|
1779
|
-
}, ne =
|
|
1776
|
+
const gt = {
|
|
1777
|
+
assertOptions: Qo,
|
|
1778
|
+
validators: Nt
|
|
1779
|
+
}, ne = gt.validators;
|
|
1780
1780
|
let le = class {
|
|
1781
1781
|
constructor(t) {
|
|
1782
1782
|
this.defaults = t, this.interceptors = {
|
|
1783
|
-
request: new
|
|
1784
|
-
response: new
|
|
1783
|
+
request: new en(),
|
|
1784
|
+
response: new en()
|
|
1785
1785
|
};
|
|
1786
1786
|
}
|
|
1787
1787
|
/**
|
|
@@ -1812,13 +1812,13 @@ let le = class {
|
|
|
1812
1812
|
_request(t, n) {
|
|
1813
1813
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ue(this.defaults, n);
|
|
1814
1814
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1815
|
-
r !== void 0 &&
|
|
1815
|
+
r !== void 0 && gt.assertOptions(r, {
|
|
1816
1816
|
silentJSONParsing: ne.transitional(ne.boolean),
|
|
1817
1817
|
forcedJSONParsing: ne.transitional(ne.boolean),
|
|
1818
1818
|
clarifyTimeoutError: ne.transitional(ne.boolean)
|
|
1819
1819
|
}, !1), s != null && (p.isFunction(s) ? n.paramsSerializer = {
|
|
1820
1820
|
serialize: s
|
|
1821
|
-
} :
|
|
1821
|
+
} : gt.assertOptions(s, {
|
|
1822
1822
|
encode: ne.function,
|
|
1823
1823
|
serialize: ne.function
|
|
1824
1824
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1843,7 +1843,7 @@ let le = class {
|
|
|
1843
1843
|
});
|
|
1844
1844
|
let c, f = 0, y;
|
|
1845
1845
|
if (!d) {
|
|
1846
|
-
const b = [
|
|
1846
|
+
const b = [cn.bind(this), void 0];
|
|
1847
1847
|
for (b.unshift.apply(b, l), b.push.apply(b, u), y = b.length, c = Promise.resolve(n); f < y; )
|
|
1848
1848
|
c = c.then(b[f++], b[f++]);
|
|
1849
1849
|
return c;
|
|
@@ -1860,7 +1860,7 @@ let le = class {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
1862
|
try {
|
|
1863
|
-
c =
|
|
1863
|
+
c = cn.call(this, S);
|
|
1864
1864
|
} catch (b) {
|
|
1865
1865
|
return Promise.reject(b);
|
|
1866
1866
|
}
|
|
@@ -1870,8 +1870,8 @@ let le = class {
|
|
|
1870
1870
|
}
|
|
1871
1871
|
getUri(t) {
|
|
1872
1872
|
t = ue(this.defaults, t);
|
|
1873
|
-
const n =
|
|
1874
|
-
return
|
|
1873
|
+
const n = nr(t.baseURL, t.url);
|
|
1874
|
+
return Zn(n, t.params, t.paramsSerializer);
|
|
1875
1875
|
}
|
|
1876
1876
|
};
|
|
1877
1877
|
p.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1898,7 +1898,7 @@ p.forEach(["post", "put", "patch"], function(t) {
|
|
|
1898
1898
|
}
|
|
1899
1899
|
le.prototype[t] = n(), le.prototype[t + "Form"] = n(!0);
|
|
1900
1900
|
});
|
|
1901
|
-
let
|
|
1901
|
+
let ea = class lr {
|
|
1902
1902
|
constructor(t) {
|
|
1903
1903
|
if (typeof t != "function")
|
|
1904
1904
|
throw new TypeError("executor must be a function.");
|
|
@@ -1964,22 +1964,22 @@ let Qo = class Yn {
|
|
|
1964
1964
|
static source() {
|
|
1965
1965
|
let t;
|
|
1966
1966
|
return {
|
|
1967
|
-
token: new
|
|
1967
|
+
token: new lr(function(s) {
|
|
1968
1968
|
t = s;
|
|
1969
1969
|
}),
|
|
1970
1970
|
cancel: t
|
|
1971
1971
|
};
|
|
1972
1972
|
}
|
|
1973
1973
|
};
|
|
1974
|
-
function
|
|
1974
|
+
function ta(e) {
|
|
1975
1975
|
return function(n) {
|
|
1976
1976
|
return e.apply(null, n);
|
|
1977
1977
|
};
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function na(e) {
|
|
1980
1980
|
return p.isObject(e) && e.isAxiosError === !0;
|
|
1981
1981
|
}
|
|
1982
|
-
const
|
|
1982
|
+
const bt = {
|
|
1983
1983
|
Continue: 100,
|
|
1984
1984
|
SwitchingProtocols: 101,
|
|
1985
1985
|
Processing: 102,
|
|
@@ -2044,52 +2044,52 @@ const ut = {
|
|
|
2044
2044
|
NotExtended: 510,
|
|
2045
2045
|
NetworkAuthenticationRequired: 511
|
|
2046
2046
|
};
|
|
2047
|
-
Object.entries(
|
|
2048
|
-
|
|
2047
|
+
Object.entries(bt).forEach(([e, t]) => {
|
|
2048
|
+
bt[t] = e;
|
|
2049
2049
|
});
|
|
2050
|
-
function
|
|
2051
|
-
const t = new le(e), n =
|
|
2050
|
+
function cr(e) {
|
|
2051
|
+
const t = new le(e), n = Un(le.prototype.request, t);
|
|
2052
2052
|
return p.extend(n, le.prototype, t, { allOwnKeys: !0 }), p.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2053
|
-
return
|
|
2053
|
+
return cr(ue(e, s));
|
|
2054
2054
|
}, n;
|
|
2055
2055
|
}
|
|
2056
|
-
const F =
|
|
2056
|
+
const F = cr(Ce);
|
|
2057
2057
|
F.Axios = le;
|
|
2058
2058
|
F.CanceledError = he;
|
|
2059
|
-
F.CancelToken =
|
|
2060
|
-
F.isCancel =
|
|
2061
|
-
F.VERSION =
|
|
2062
|
-
F.toFormData =
|
|
2059
|
+
F.CancelToken = ea;
|
|
2060
|
+
F.isCancel = er;
|
|
2061
|
+
F.VERSION = ir;
|
|
2062
|
+
F.toFormData = He;
|
|
2063
2063
|
F.AxiosError = C;
|
|
2064
2064
|
F.Cancel = F.CanceledError;
|
|
2065
2065
|
F.all = function(t) {
|
|
2066
2066
|
return Promise.all(t);
|
|
2067
2067
|
};
|
|
2068
|
-
F.spread =
|
|
2069
|
-
F.isAxiosError =
|
|
2068
|
+
F.spread = ta;
|
|
2069
|
+
F.isAxiosError = na;
|
|
2070
2070
|
F.mergeConfig = ue;
|
|
2071
2071
|
F.AxiosHeaders = U;
|
|
2072
|
-
F.formToJSON = (e) =>
|
|
2073
|
-
F.getAdapter =
|
|
2074
|
-
F.HttpStatusCode =
|
|
2072
|
+
F.formToJSON = (e) => Qn(p.isHTMLForm(e) ? new FormData(e) : e);
|
|
2073
|
+
F.getAdapter = ar.getAdapter;
|
|
2074
|
+
F.HttpStatusCode = bt;
|
|
2075
2075
|
F.default = F;
|
|
2076
2076
|
const {
|
|
2077
|
-
Axios:
|
|
2078
|
-
AxiosError:
|
|
2079
|
-
CanceledError:
|
|
2080
|
-
isCancel:
|
|
2081
|
-
CancelToken:
|
|
2082
|
-
VERSION:
|
|
2083
|
-
all:
|
|
2084
|
-
Cancel:
|
|
2085
|
-
isAxiosError:
|
|
2086
|
-
spread:
|
|
2087
|
-
toFormData:
|
|
2088
|
-
AxiosHeaders:
|
|
2089
|
-
HttpStatusCode:
|
|
2090
|
-
formToJSON:
|
|
2091
|
-
getAdapter:
|
|
2092
|
-
mergeConfig:
|
|
2077
|
+
Axios: Bi,
|
|
2078
|
+
AxiosError: Li,
|
|
2079
|
+
CanceledError: Ii,
|
|
2080
|
+
isCancel: Mi,
|
|
2081
|
+
CancelToken: Ni,
|
|
2082
|
+
VERSION: ji,
|
|
2083
|
+
all: Ui,
|
|
2084
|
+
Cancel: qi,
|
|
2085
|
+
isAxiosError: ra,
|
|
2086
|
+
spread: _i,
|
|
2087
|
+
toFormData: Hi,
|
|
2088
|
+
AxiosHeaders: zi,
|
|
2089
|
+
HttpStatusCode: Wi,
|
|
2090
|
+
formToJSON: Vi,
|
|
2091
|
+
getAdapter: $i,
|
|
2092
|
+
mergeConfig: Ki
|
|
2093
2093
|
} = F;
|
|
2094
2094
|
function ce(e) {
|
|
2095
2095
|
return (t) => {
|
|
@@ -2097,38 +2097,38 @@ function ce(e) {
|
|
|
2097
2097
|
if (!(t instanceof Error))
|
|
2098
2098
|
throw t;
|
|
2099
2099
|
e({
|
|
2100
|
-
message:
|
|
2100
|
+
message: ra(t) ? ((n = t.response) == null ? void 0 : n.data.message) ?? t.message : t.message,
|
|
2101
2101
|
severity: "error"
|
|
2102
2102
|
});
|
|
2103
2103
|
};
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2106
|
-
return h.useContext(
|
|
2105
|
+
function jt() {
|
|
2106
|
+
return h.useContext(Ft).notify;
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2109
|
-
const e =
|
|
2108
|
+
function sa() {
|
|
2109
|
+
const e = jt();
|
|
2110
2110
|
return h.useCallback((t) => {
|
|
2111
2111
|
ce(e)(t);
|
|
2112
2112
|
}, [e]);
|
|
2113
2113
|
}
|
|
2114
|
-
const
|
|
2115
|
-
const [t, n] = h.useState(), { id: r } =
|
|
2116
|
-
|
|
2114
|
+
const oa = ({ create: e = !1 }) => {
|
|
2115
|
+
const [t, n] = h.useState(), { id: r } = wr(), { t: s } = L(), o = jt(), a = St(), l = te(), d = H("breakpoint", "md");
|
|
2116
|
+
Bt(
|
|
2117
2117
|
t != null && t.exists ? s("Edit :model “:label“", { model: l.singular(), label: (t == null ? void 0 : t.getLabel()) || "..." }) : s("Create :model", { model: l.singular() })
|
|
2118
|
-
),
|
|
2118
|
+
), ks();
|
|
2119
2119
|
const u = T("cms").getComponent("Breadcrumbs");
|
|
2120
2120
|
h.useEffect(() => {
|
|
2121
2121
|
e ? n(new l()) : l.find(r).then((S) => n(S ?? void 0));
|
|
2122
2122
|
}, [r, l, e]);
|
|
2123
2123
|
const c = h.useCallback(() => {
|
|
2124
|
-
o(s(":model saved successfully", { model: l.singular() })), t != null && t.wasRecentlyCreated && a(`/${
|
|
2125
|
-
}, [o, a, l, t, s]), f =
|
|
2124
|
+
o(s(":model saved successfully", { model: l.singular() })), t != null && t.wasRecentlyCreated && a(`/${E.kebab(l.plural())}/${t.getKey()}`);
|
|
2125
|
+
}, [o, a, l, t, s]), f = sa(), y = h.useMemo(() => T("cms").getModelFormProps(t), [t]);
|
|
2126
2126
|
return t ? /* @__PURE__ */ w(Q, { container: !0, children: [
|
|
2127
2127
|
/* @__PURE__ */ i(Q, { xs: 12, children: /* @__PURE__ */ i(
|
|
2128
2128
|
u,
|
|
2129
2129
|
{
|
|
2130
2130
|
parts: [
|
|
2131
|
-
{ name: l.plural(), href: "/" +
|
|
2131
|
+
{ name: l.plural(), href: "/" + E.kebab(l.plural()) },
|
|
2132
2132
|
{ name: t.exists ? t.getLabel() : s("New") }
|
|
2133
2133
|
]
|
|
2134
2134
|
}
|
|
@@ -2139,7 +2139,7 @@ const sa = ({ create: e = !1 }) => {
|
|
|
2139
2139
|
xs: 12,
|
|
2140
2140
|
[d]: 6,
|
|
2141
2141
|
children: /* @__PURE__ */ i(
|
|
2142
|
-
|
|
2142
|
+
xr,
|
|
2143
2143
|
{
|
|
2144
2144
|
submitText: "Save",
|
|
2145
2145
|
...y,
|
|
@@ -2152,32 +2152,32 @@ const sa = ({ create: e = !1 }) => {
|
|
|
2152
2152
|
)
|
|
2153
2153
|
] }) : null;
|
|
2154
2154
|
};
|
|
2155
|
-
function
|
|
2155
|
+
function aa(e) {
|
|
2156
2156
|
const {
|
|
2157
2157
|
setDisplacement: t
|
|
2158
|
-
} = h.useContext(
|
|
2158
|
+
} = h.useContext(Ft), n = Pt(), r = v(), s = n.spacing(r ? 3 : 1), o = e === !1 ? s : n.spacing(e);
|
|
2159
2159
|
h.useEffect(() => (t(o), () => {
|
|
2160
2160
|
t(s);
|
|
2161
2161
|
}), [o, s, t]);
|
|
2162
2162
|
}
|
|
2163
|
-
function
|
|
2164
|
-
return h.useContext(
|
|
2163
|
+
function ia() {
|
|
2164
|
+
return h.useContext(jn).dialog;
|
|
2165
2165
|
}
|
|
2166
|
-
function
|
|
2167
|
-
const e =
|
|
2166
|
+
function Ut() {
|
|
2167
|
+
const e = St(), t = jt(), n = ia(), { t: r } = L(), { refresh: s } = Se();
|
|
2168
2168
|
return { navigate: e, notify: t, dialog: n, t: r, refresh: s };
|
|
2169
2169
|
}
|
|
2170
|
-
const
|
|
2170
|
+
const la = Z(Rr)(({ theme: e }) => ({
|
|
2171
2171
|
position: "fixed",
|
|
2172
2172
|
bottom: e.spacing(2),
|
|
2173
2173
|
right: e.spacing(2)
|
|
2174
|
-
})),
|
|
2174
|
+
})), ca = Z(Pr)(({ theme: e }) => ({
|
|
2175
2175
|
position: "fixed",
|
|
2176
2176
|
bottom: e.spacing(2),
|
|
2177
2177
|
right: e.spacing(2)
|
|
2178
|
-
})),
|
|
2179
|
-
const t = te(), n = v(), [r] =
|
|
2180
|
-
if (
|
|
2178
|
+
})), ua = ({ variant: e = "default" }) => {
|
|
2179
|
+
const t = te(), n = v(), [r] = K(), s = r.get("tab") ?? "all", [o, a] = h.useState(!1), l = h.useRef(null), [d, u] = h.useState(0), c = Ut(), f = h.useMemo(() => T("cms").getStaticActions(t, s), [t, s]);
|
|
2180
|
+
if (aa(
|
|
2181
2181
|
e === "fab" && f.length > 0 ? n ? 12 : 10 : !1
|
|
2182
2182
|
), f.length === 0)
|
|
2183
2183
|
return null;
|
|
@@ -2188,9 +2188,9 @@ const ia = Z(gr)(({ theme: e }) => ({
|
|
|
2188
2188
|
}, b = (m) => {
|
|
2189
2189
|
l.current && l.current.contains(m.target) || a(!1);
|
|
2190
2190
|
};
|
|
2191
|
-
return e === "fab" ? f.length === 1 ?
|
|
2191
|
+
return e === "fab" ? f.length === 1 ? Jt.createPortal(
|
|
2192
2192
|
/* @__PURE__ */ i(
|
|
2193
|
-
|
|
2193
|
+
la,
|
|
2194
2194
|
{
|
|
2195
2195
|
color: "primary",
|
|
2196
2196
|
onClick: () => f[0].callback(c),
|
|
@@ -2198,18 +2198,18 @@ const ia = Z(gr)(({ theme: e }) => ({
|
|
|
2198
2198
|
}
|
|
2199
2199
|
),
|
|
2200
2200
|
document.body
|
|
2201
|
-
) :
|
|
2201
|
+
) : Jt.createPortal(
|
|
2202
2202
|
/* @__PURE__ */ i(
|
|
2203
|
-
|
|
2203
|
+
ca,
|
|
2204
2204
|
{
|
|
2205
2205
|
ariaLabel: `actions for ${t.singular()}`,
|
|
2206
|
-
icon: /* @__PURE__ */ i(
|
|
2206
|
+
icon: /* @__PURE__ */ i(vr, {}),
|
|
2207
2207
|
color: "primary",
|
|
2208
2208
|
onClose: () => a(!1),
|
|
2209
2209
|
onOpen: () => a(!0),
|
|
2210
2210
|
open: o,
|
|
2211
2211
|
children: f.map((m) => /* @__PURE__ */ i(
|
|
2212
|
-
|
|
2212
|
+
Fr,
|
|
2213
2213
|
{
|
|
2214
2214
|
icon: m.icon || m.label.charAt(0).toUpperCase(),
|
|
2215
2215
|
tooltipTitle: m.label,
|
|
@@ -2222,15 +2222,15 @@ const ia = Z(gr)(({ theme: e }) => ({
|
|
|
2222
2222
|
document.body
|
|
2223
2223
|
) : /* @__PURE__ */ w(B, { children: [
|
|
2224
2224
|
/* @__PURE__ */ w(
|
|
2225
|
-
|
|
2225
|
+
Br,
|
|
2226
2226
|
{
|
|
2227
2227
|
variant: "contained",
|
|
2228
2228
|
ref: l,
|
|
2229
2229
|
"aria-label": f[d].label,
|
|
2230
2230
|
children: [
|
|
2231
|
-
/* @__PURE__ */ i(
|
|
2231
|
+
/* @__PURE__ */ i(M, { onClick: () => f[d].callback(c), children: f[d].label }),
|
|
2232
2232
|
f.length > 1 && /* @__PURE__ */ i(
|
|
2233
|
-
|
|
2233
|
+
M,
|
|
2234
2234
|
{
|
|
2235
2235
|
variant: "contained",
|
|
2236
2236
|
size: "small",
|
|
@@ -2239,34 +2239,34 @@ const ia = Z(gr)(({ theme: e }) => ({
|
|
|
2239
2239
|
"aria-label": `select ${t.singular()} actions`,
|
|
2240
2240
|
"aria-haspopup": "menu",
|
|
2241
2241
|
onClick: S,
|
|
2242
|
-
children: /* @__PURE__ */ i(
|
|
2242
|
+
children: /* @__PURE__ */ i(Cn, {})
|
|
2243
2243
|
}
|
|
2244
2244
|
)
|
|
2245
2245
|
]
|
|
2246
2246
|
}
|
|
2247
2247
|
),
|
|
2248
2248
|
/* @__PURE__ */ i(
|
|
2249
|
-
|
|
2249
|
+
Lr,
|
|
2250
2250
|
{
|
|
2251
2251
|
open: o,
|
|
2252
2252
|
anchorEl: l.current,
|
|
2253
2253
|
role: void 0,
|
|
2254
2254
|
transition: !0,
|
|
2255
2255
|
children: ({ TransitionProps: m, placement: g }) => /* @__PURE__ */ i(
|
|
2256
|
-
|
|
2256
|
+
Ir,
|
|
2257
2257
|
{
|
|
2258
2258
|
...m,
|
|
2259
2259
|
style: {
|
|
2260
2260
|
transformOrigin: g === "bottom" ? "center top" : "center bottom"
|
|
2261
2261
|
},
|
|
2262
|
-
children: /* @__PURE__ */ i(
|
|
2262
|
+
children: /* @__PURE__ */ i(Tt, { children: /* @__PURE__ */ i(Mr, { onClickAway: b, children: /* @__PURE__ */ i(Nr, { id: "split-button-menu", children: f.map((x, A) => /* @__PURE__ */ i(
|
|
2263
2263
|
oe,
|
|
2264
2264
|
{
|
|
2265
|
-
selected:
|
|
2266
|
-
onClick: (
|
|
2267
|
-
children:
|
|
2265
|
+
selected: A === d,
|
|
2266
|
+
onClick: (k) => y(k, A),
|
|
2267
|
+
children: x.label
|
|
2268
2268
|
},
|
|
2269
|
-
|
|
2269
|
+
x.label
|
|
2270
2270
|
)) }) }) })
|
|
2271
2271
|
}
|
|
2272
2272
|
)
|
|
@@ -2274,7 +2274,7 @@ const ia = Z(gr)(({ theme: e }) => ({
|
|
|
2274
2274
|
)
|
|
2275
2275
|
] });
|
|
2276
2276
|
};
|
|
2277
|
-
function
|
|
2277
|
+
function qt() {
|
|
2278
2278
|
const { open: e, setOpen: t } = h.useContext(X);
|
|
2279
2279
|
return {
|
|
2280
2280
|
open: e,
|
|
@@ -2289,21 +2289,21 @@ function Bt() {
|
|
|
2289
2289
|
}
|
|
2290
2290
|
};
|
|
2291
2291
|
}
|
|
2292
|
-
function
|
|
2292
|
+
function ur() {
|
|
2293
2293
|
const { currentPage: e } = h.useContext(X);
|
|
2294
2294
|
return e;
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function da() {
|
|
2297
2297
|
const { showSearch: e } = h.useContext(X);
|
|
2298
2298
|
return e;
|
|
2299
2299
|
}
|
|
2300
|
-
const
|
|
2301
|
-
function
|
|
2300
|
+
const fa = "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==", pa = "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=";
|
|
2301
|
+
function dr() {
|
|
2302
2302
|
const { showBackButton: e } = h.useContext(X);
|
|
2303
2303
|
return e;
|
|
2304
2304
|
}
|
|
2305
|
-
const
|
|
2306
|
-
|
|
2305
|
+
const ha = Z(
|
|
2306
|
+
gn,
|
|
2307
2307
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2308
2308
|
)(({ theme: e, open: t, drawerWidth: n, height: r }) => ({
|
|
2309
2309
|
zIndex: e.zIndex.drawer + 1,
|
|
@@ -2320,19 +2320,19 @@ const pa = Z(
|
|
|
2320
2320
|
duration: e.transitions.duration.enteringScreen
|
|
2321
2321
|
})
|
|
2322
2322
|
}
|
|
2323
|
-
})),
|
|
2324
|
-
|
|
2323
|
+
})), ma = Z(
|
|
2324
|
+
gn,
|
|
2325
2325
|
{ shouldForwardProp: (e) => !["open", "drawerWidth", "height"].includes(String(e)) }
|
|
2326
|
-
)(({ height: e }) => ({ height: e })),
|
|
2327
|
-
const n = v(), r =
|
|
2326
|
+
)(({ height: e }) => ({ height: e })), ga = ({ slots: e = {}, ...t }) => {
|
|
2327
|
+
const n = v(), r = Ie("(prefers-color-scheme: dark)"), s = n ? ha : ma, {
|
|
2328
2328
|
["Layout.AppBar.MenuButton"]: o,
|
|
2329
2329
|
["Layout.SearchBar"]: a,
|
|
2330
2330
|
["Layout.BackButton"]: l
|
|
2331
|
-
} = T("cms").getComponents(), { open: d } =
|
|
2331
|
+
} = T("cms").getComponents(), { open: d } = qt(), u = da(), c = dr(), f = H("appBar.height"), y = H("drawer.width", 280), {
|
|
2332
2332
|
start: S = null,
|
|
2333
2333
|
//: title = config('app.name', document.title),
|
|
2334
2334
|
end: b = null
|
|
2335
|
-
} = e, m =
|
|
2335
|
+
} = e, m = ur();
|
|
2336
2336
|
return /* @__PURE__ */ i(
|
|
2337
2337
|
s,
|
|
2338
2338
|
{
|
|
@@ -2340,12 +2340,12 @@ const pa = Z(
|
|
|
2340
2340
|
height: f,
|
|
2341
2341
|
drawerWidth: y,
|
|
2342
2342
|
...t,
|
|
2343
|
-
children: /* @__PURE__ */ w(
|
|
2343
|
+
children: /* @__PURE__ */ w(jr, { children: [
|
|
2344
2344
|
(n && !d || !n && !c) && /* @__PURE__ */ i(o, {}),
|
|
2345
2345
|
!n && c && /* @__PURE__ */ i(l, {}),
|
|
2346
2346
|
n ? null : S,
|
|
2347
2347
|
/* @__PURE__ */ i(
|
|
2348
|
-
|
|
2348
|
+
$,
|
|
2349
2349
|
{
|
|
2350
2350
|
width: "100%",
|
|
2351
2351
|
variant: "h6",
|
|
@@ -2363,9 +2363,9 @@ const pa = Z(
|
|
|
2363
2363
|
children: [
|
|
2364
2364
|
u && /* @__PURE__ */ i(a, {}),
|
|
2365
2365
|
b || /* @__PURE__ */ i(
|
|
2366
|
-
|
|
2366
|
+
Ur,
|
|
2367
2367
|
{
|
|
2368
|
-
src: r ?
|
|
2368
|
+
src: r ? fa : pa,
|
|
2369
2369
|
alt: "Luminix",
|
|
2370
2370
|
variant: "square",
|
|
2371
2371
|
sx: {
|
|
@@ -2382,28 +2382,28 @@ const pa = Z(
|
|
|
2382
2382
|
}
|
|
2383
2383
|
);
|
|
2384
2384
|
};
|
|
2385
|
-
function
|
|
2385
|
+
function ba(e) {
|
|
2386
2386
|
return /* @__PURE__ */ i(
|
|
2387
2387
|
q,
|
|
2388
2388
|
{
|
|
2389
|
-
component:
|
|
2389
|
+
component: Re,
|
|
2390
2390
|
to: -1,
|
|
2391
2391
|
edge: "start",
|
|
2392
2392
|
color: "inherit",
|
|
2393
2393
|
"aria-label": "back",
|
|
2394
2394
|
...e,
|
|
2395
|
-
children: /* @__PURE__ */ i(
|
|
2395
|
+
children: /* @__PURE__ */ i(Ne, {})
|
|
2396
2396
|
}
|
|
2397
2397
|
);
|
|
2398
2398
|
}
|
|
2399
|
-
const
|
|
2399
|
+
const dn = (e, t) => ({
|
|
2400
2400
|
width: t,
|
|
2401
2401
|
transition: e.transitions.create("width", {
|
|
2402
2402
|
easing: e.transitions.easing.sharp,
|
|
2403
2403
|
duration: e.transitions.duration.enteringScreen
|
|
2404
2404
|
}),
|
|
2405
2405
|
overflowX: "hidden"
|
|
2406
|
-
}),
|
|
2406
|
+
}), fn = (e) => ({
|
|
2407
2407
|
transition: e.transitions.create("width", {
|
|
2408
2408
|
easing: e.transitions.easing.sharp,
|
|
2409
2409
|
duration: e.transitions.duration.leavingScreen
|
|
@@ -2411,33 +2411,33 @@ const an = (e, t) => ({
|
|
|
2411
2411
|
overflowX: "hidden",
|
|
2412
2412
|
width: `calc(${e.spacing(9)} + 1px)`,
|
|
2413
2413
|
[e.breakpoints.up("sm")]: { width: `calc(${e.spacing(10)} + 1px)` }
|
|
2414
|
-
}),
|
|
2415
|
-
|
|
2414
|
+
}), ya = Z(
|
|
2415
|
+
bn,
|
|
2416
2416
|
{ shouldForwardProp: (e) => !["open", "width"].includes(String(e)) }
|
|
2417
2417
|
)(({ theme: e, open: t, width: n }) => ({
|
|
2418
2418
|
flexShrink: 0,
|
|
2419
2419
|
whiteSpace: "nowrap",
|
|
2420
2420
|
boxSizing: "border-box",
|
|
2421
2421
|
...t && {
|
|
2422
|
-
...
|
|
2423
|
-
"& .MuiDrawer-paper":
|
|
2422
|
+
...dn(e, n),
|
|
2423
|
+
"& .MuiDrawer-paper": dn(e, n)
|
|
2424
2424
|
},
|
|
2425
2425
|
...!t && {
|
|
2426
|
-
...
|
|
2427
|
-
"& .MuiDrawer-paper":
|
|
2426
|
+
...fn(e),
|
|
2427
|
+
"& .MuiDrawer-paper": fn(e)
|
|
2428
2428
|
}
|
|
2429
|
-
})),
|
|
2430
|
-
|
|
2429
|
+
})), wa = Z(
|
|
2430
|
+
bn,
|
|
2431
2431
|
{ shouldForwardProp: (e) => e !== "width" }
|
|
2432
|
-
)(() => ({})),
|
|
2432
|
+
)(() => ({})), Sa = Z("div")(({ theme: e }) => ({
|
|
2433
2433
|
display: "flex",
|
|
2434
2434
|
alignItems: "center",
|
|
2435
2435
|
justifyContent: "space-between",
|
|
2436
2436
|
padding: e.spacing(0, 1),
|
|
2437
2437
|
// necessary for content to be below app bar
|
|
2438
2438
|
...e.mixins.toolbar
|
|
2439
|
-
})),
|
|
2440
|
-
const t =
|
|
2439
|
+
})), Aa = (e) => {
|
|
2440
|
+
const t = Pt(), n = v(), { open: r, handleDrawerClose: s } = qt(), o = n ? ya : wa, a = H("drawer.width", 280), l = H("appBar.height"), d = T("cms").getComponent("RecursiveList"), u = T("cms").getMenuItems();
|
|
2441
2441
|
return /* @__PURE__ */ w(
|
|
2442
2442
|
o,
|
|
2443
2443
|
{
|
|
@@ -2454,8 +2454,8 @@ const an = (e, t) => ({
|
|
|
2454
2454
|
},
|
|
2455
2455
|
...e,
|
|
2456
2456
|
children: [
|
|
2457
|
-
/* @__PURE__ */ i(
|
|
2458
|
-
/* @__PURE__ */ i(
|
|
2457
|
+
/* @__PURE__ */ i(Sa, { style: { height: l }, children: /* @__PURE__ */ i(q, { onClick: s, children: t.direction === "ltr" ? /* @__PURE__ */ i(Ne, {}) : /* @__PURE__ */ i(je, {}) }) }),
|
|
2458
|
+
/* @__PURE__ */ i(Pe, {}),
|
|
2459
2459
|
/* @__PURE__ */ i(V, { sx: { flexGrow: 1, overflowY: "auto", overflowX: "hidden" }, children: /* @__PURE__ */ i(
|
|
2460
2460
|
d,
|
|
2461
2461
|
{
|
|
@@ -2468,11 +2468,11 @@ const an = (e, t) => ({
|
|
|
2468
2468
|
}
|
|
2469
2469
|
);
|
|
2470
2470
|
}, xa = () => {
|
|
2471
|
-
const e =
|
|
2471
|
+
const e = ur(), t = H("breakpoint", "md"), n = dr(), {
|
|
2472
2472
|
["Layout.BackButton"]: r
|
|
2473
2473
|
} = T("cms").getComponents();
|
|
2474
2474
|
return /* @__PURE__ */ w(
|
|
2475
|
-
|
|
2475
|
+
Tt,
|
|
2476
2476
|
{
|
|
2477
2477
|
sx: {
|
|
2478
2478
|
display: { xs: "none", [t]: "flex" },
|
|
@@ -2484,11 +2484,11 @@ const an = (e, t) => ({
|
|
|
2484
2484
|
},
|
|
2485
2485
|
children: [
|
|
2486
2486
|
n && /* @__PURE__ */ i(r, {}),
|
|
2487
|
-
/* @__PURE__ */ i(
|
|
2487
|
+
/* @__PURE__ */ i($, { variant: "h5", noWrap: !0, children: e })
|
|
2488
2488
|
]
|
|
2489
2489
|
}
|
|
2490
2490
|
);
|
|
2491
|
-
},
|
|
2491
|
+
}, _t = h.createContext({
|
|
2492
2492
|
Model: null,
|
|
2493
2493
|
anchorEl: null,
|
|
2494
2494
|
setAnchorEl: () => {
|
|
@@ -2522,17 +2522,17 @@ const an = (e, t) => ({
|
|
|
2522
2522
|
},
|
|
2523
2523
|
setIsRelation: () => {
|
|
2524
2524
|
}
|
|
2525
|
-
}),
|
|
2525
|
+
}), Ca = (e) => {
|
|
2526
2526
|
if (!Array.isArray(e))
|
|
2527
2527
|
return e;
|
|
2528
2528
|
let t;
|
|
2529
2529
|
return G.isEmpty(e) ? t = "" : t = e[0], t;
|
|
2530
|
-
},
|
|
2530
|
+
}, Ea = (e) => {
|
|
2531
2531
|
if (Array.isArray(e))
|
|
2532
2532
|
return e;
|
|
2533
2533
|
let t;
|
|
2534
2534
|
return G.isEmpty(e) ? t = [] : t = [e, ""], t;
|
|
2535
|
-
},
|
|
2535
|
+
}, ka = async (e, t, n) => {
|
|
2536
2536
|
const r = e.getSchema().relations[t], s = ye().make(r.model), o = s.getSchema().primaryKey, a = [];
|
|
2537
2537
|
for (const l of n) {
|
|
2538
2538
|
const d = await s.where(o, l).first();
|
|
@@ -2540,12 +2540,12 @@ const an = (e, t) => ({
|
|
|
2540
2540
|
}
|
|
2541
2541
|
return a;
|
|
2542
2542
|
};
|
|
2543
|
-
function
|
|
2544
|
-
const n = T("filter"), { Model: r, setColumnsFilter: s } = h.useContext(
|
|
2545
|
-
s((
|
|
2546
|
-
},
|
|
2547
|
-
const
|
|
2548
|
-
|
|
2543
|
+
function Ta(e, t) {
|
|
2544
|
+
const n = T("filter"), { Model: r, setColumnsFilter: s } = h.useContext(_t), [o, a] = h.useState(t.key), [l, d] = h.useState(t.operator), [u, c] = h.useState(t.type), [f, y] = h.useState(t.value), [S, b] = h.useState(t.nullable), [m, g] = h.useState(t.is_relation), x = h.useMemo(() => n.getFilterableColumns(r), [r]), A = (O) => () => {
|
|
2545
|
+
s((R) => R.filter((D, z) => z !== O));
|
|
2546
|
+
}, k = async (O) => {
|
|
2547
|
+
const R = O.target.value, D = x.find((hr) => hr.key === R), z = (D == null ? void 0 : D.type) ?? "text", Ee = (D == null ? void 0 : D.nullable) ?? !1, Wt = (D == null ? void 0 : D.is_relation) ?? !1;
|
|
2548
|
+
Wt ? (d("relation"), y([])) : m && d("equals"), g(Wt), b(Ee), z !== u && (d("equals"), y(() => {
|
|
2549
2549
|
if (["between", "notBetween"].includes(l))
|
|
2550
2550
|
return [];
|
|
2551
2551
|
switch (n.getInputType(z)) {
|
|
@@ -2556,24 +2556,24 @@ function ka(e, t) {
|
|
|
2556
2556
|
default:
|
|
2557
2557
|
return "";
|
|
2558
2558
|
}
|
|
2559
|
-
})), a(
|
|
2560
|
-
}, P = async (
|
|
2561
|
-
const
|
|
2562
|
-
l !==
|
|
2563
|
-
switch (
|
|
2559
|
+
})), a(R), c(z);
|
|
2560
|
+
}, P = async (O) => {
|
|
2561
|
+
const R = O.target.value;
|
|
2562
|
+
l !== R && y((D) => {
|
|
2563
|
+
switch (R) {
|
|
2564
2564
|
case "between":
|
|
2565
2565
|
case "notBetween":
|
|
2566
|
-
return
|
|
2566
|
+
return Ea(D);
|
|
2567
2567
|
case "null":
|
|
2568
2568
|
case "notNull":
|
|
2569
2569
|
return "1";
|
|
2570
2570
|
default:
|
|
2571
|
-
return
|
|
2571
|
+
return Ca(D);
|
|
2572
2572
|
}
|
|
2573
|
-
}), d(
|
|
2573
|
+
}), d(R);
|
|
2574
2574
|
};
|
|
2575
2575
|
return h.useEffect(() => {
|
|
2576
|
-
s((
|
|
2576
|
+
s((O) => O.map((D, z) => e === z ? {
|
|
2577
2577
|
...D,
|
|
2578
2578
|
key: o,
|
|
2579
2579
|
operator: l,
|
|
@@ -2583,7 +2583,7 @@ function ka(e, t) {
|
|
|
2583
2583
|
is_relation: m
|
|
2584
2584
|
} : D));
|
|
2585
2585
|
}, [o, l, u, f, S, m]), {
|
|
2586
|
-
columns:
|
|
2586
|
+
columns: x,
|
|
2587
2587
|
key: o,
|
|
2588
2588
|
setKey: a,
|
|
2589
2589
|
operator: l,
|
|
@@ -2596,18 +2596,18 @@ function ka(e, t) {
|
|
|
2596
2596
|
setNullable: b,
|
|
2597
2597
|
isRelation: m,
|
|
2598
2598
|
setIsRelation: g,
|
|
2599
|
-
handleKey:
|
|
2599
|
+
handleKey: k,
|
|
2600
2600
|
handleOperator: P,
|
|
2601
|
-
handleRemoveColumn:
|
|
2601
|
+
handleRemoveColumn: A
|
|
2602
2602
|
};
|
|
2603
2603
|
}
|
|
2604
|
-
const
|
|
2604
|
+
const pn = async (e, t, n) => {
|
|
2605
2605
|
const r = e.getSchema().relations[t].model, { data: s } = await ye().make(r).get(), o = s.all().filter((u) => !n.find((c) => c.getKey() === u.getKey())), a = o.length, l = n.length, d = 15;
|
|
2606
2606
|
return a + l > d ? W([...n, ...o.slice(0, d - l)]) : W([...n, ...o]);
|
|
2607
|
-
},
|
|
2607
|
+
}, Da = async (e, t, n = "", r) => {
|
|
2608
2608
|
const s = e.getSchema().relations[t], o = ye().make(s.model), a = o.getSchema().primaryKey, { data: l } = await o.searchBy(n).get();
|
|
2609
2609
|
return W([...r, ...l]).unique(a);
|
|
2610
|
-
},
|
|
2610
|
+
}, Oa = () => {
|
|
2611
2611
|
const e = v(), t = te(), {
|
|
2612
2612
|
key: n,
|
|
2613
2613
|
value: r,
|
|
@@ -2616,20 +2616,20 @@ const cn = async (e, t, n) => {
|
|
|
2616
2616
|
() => o && u.count() === 0,
|
|
2617
2617
|
[o, u]
|
|
2618
2618
|
), b = async (m, g) => {
|
|
2619
|
-
d(g), G.isEmpty(g) || c(await
|
|
2619
|
+
d(g), G.isEmpty(g) || c(await Da(t, n, g, W(f)));
|
|
2620
2620
|
};
|
|
2621
2621
|
return h.useEffect(() => {
|
|
2622
|
-
r.length > 0 && (async () => y(await
|
|
2622
|
+
r.length > 0 && (async () => y(await ka(t, n, r)))();
|
|
2623
2623
|
}, []), h.useEffect(() => {
|
|
2624
2624
|
let m = !0;
|
|
2625
2625
|
if (S)
|
|
2626
|
-
return (async () => m && c(await
|
|
2626
|
+
return (async () => m && c(await pn(t, n, f)))(), () => {
|
|
2627
2627
|
m = !1;
|
|
2628
2628
|
};
|
|
2629
2629
|
}, [S]), h.useEffect(() => {
|
|
2630
|
-
s(f.map((m) => m.getKey())), G.isEmpty(l) ? (async () => c(await
|
|
2630
|
+
s(f.map((m) => m.getKey())), G.isEmpty(l) ? (async () => c(await pn(t, n, f)))() : c(W([]));
|
|
2631
2631
|
}, [f]), /* @__PURE__ */ i(
|
|
2632
|
-
|
|
2632
|
+
qr,
|
|
2633
2633
|
{
|
|
2634
2634
|
sx: { width: e ? 377 : "100%" },
|
|
2635
2635
|
open: o,
|
|
@@ -2666,20 +2666,20 @@ const cn = async (e, t, n) => {
|
|
|
2666
2666
|
}, Ra = ({ params: e, loading: t }) => {
|
|
2667
2667
|
const { t: n } = L();
|
|
2668
2668
|
return /* @__PURE__ */ i(
|
|
2669
|
-
|
|
2669
|
+
Ae,
|
|
2670
2670
|
{
|
|
2671
2671
|
...e,
|
|
2672
2672
|
label: n("Value"),
|
|
2673
2673
|
InputProps: {
|
|
2674
2674
|
...e.InputProps,
|
|
2675
2675
|
endAdornment: /* @__PURE__ */ w(h.Fragment, { children: [
|
|
2676
|
-
t ? /* @__PURE__ */ i(
|
|
2676
|
+
t ? /* @__PURE__ */ i(_r, { color: "inherit", size: 20 }) : null,
|
|
2677
2677
|
e.InputProps.endAdornment
|
|
2678
2678
|
] })
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
2681
|
);
|
|
2682
|
-
},
|
|
2682
|
+
}, et = ({ index: e = null }) => {
|
|
2683
2683
|
const { t } = L(), n = v(), r = T("filter"), {
|
|
2684
2684
|
type: s,
|
|
2685
2685
|
value: o,
|
|
@@ -2694,7 +2694,7 @@ const cn = async (e, t, n) => {
|
|
|
2694
2694
|
} : y.target.value);
|
|
2695
2695
|
};
|
|
2696
2696
|
return /* @__PURE__ */ i(
|
|
2697
|
-
|
|
2697
|
+
Ae,
|
|
2698
2698
|
{
|
|
2699
2699
|
type: r.getInputType(s),
|
|
2700
2700
|
label: u,
|
|
@@ -2704,11 +2704,11 @@ const cn = async (e, t, n) => {
|
|
|
2704
2704
|
sx: { width: n ? d : "100%" }
|
|
2705
2705
|
}
|
|
2706
2706
|
);
|
|
2707
|
-
},
|
|
2707
|
+
}, Pa = () => {
|
|
2708
2708
|
const e = v(), { value: t, setValue: n } = h.useContext(me);
|
|
2709
2709
|
return /* @__PURE__ */ w(B, { children: [
|
|
2710
2710
|
/* @__PURE__ */ i(
|
|
2711
|
-
|
|
2711
|
+
Hr,
|
|
2712
2712
|
{
|
|
2713
2713
|
checked: t,
|
|
2714
2714
|
onChange: (s) => {
|
|
@@ -2721,7 +2721,7 @@ const cn = async (e, t, n) => {
|
|
|
2721
2721
|
),
|
|
2722
2722
|
e && /* @__PURE__ */ i(V, { width: 325 })
|
|
2723
2723
|
] });
|
|
2724
|
-
},
|
|
2724
|
+
}, tt = ({ index: e = null }) => {
|
|
2725
2725
|
const { t } = L(), n = v(), r = T("filter"), {
|
|
2726
2726
|
type: s,
|
|
2727
2727
|
value: o,
|
|
@@ -2736,7 +2736,7 @@ const cn = async (e, t, n) => {
|
|
|
2736
2736
|
} : c.target.value);
|
|
2737
2737
|
};
|
|
2738
2738
|
return /* @__PURE__ */ i(
|
|
2739
|
-
|
|
2739
|
+
Ae,
|
|
2740
2740
|
{
|
|
2741
2741
|
type: r.getInputType(s),
|
|
2742
2742
|
label: l,
|
|
@@ -2746,7 +2746,7 @@ const cn = async (e, t, n) => {
|
|
|
2746
2746
|
size: "small"
|
|
2747
2747
|
}
|
|
2748
2748
|
);
|
|
2749
|
-
},
|
|
2749
|
+
}, nt = () => {
|
|
2750
2750
|
const e = v(), t = T("filter"), { type: n, operator: r } = h.useContext(me), s = h.useMemo(
|
|
2751
2751
|
() => ["between", "notBetween"].includes(r),
|
|
2752
2752
|
[r]
|
|
@@ -2758,27 +2758,27 @@ const cn = async (e, t, n) => {
|
|
|
2758
2758
|
case "date":
|
|
2759
2759
|
case "datetime-local":
|
|
2760
2760
|
return /* @__PURE__ */ w(B, { children: [
|
|
2761
|
-
/* @__PURE__ */ i(
|
|
2762
|
-
/* @__PURE__ */ i(
|
|
2761
|
+
/* @__PURE__ */ i(et, { index: 0 }),
|
|
2762
|
+
/* @__PURE__ */ i(et, { index: 1 })
|
|
2763
2763
|
] });
|
|
2764
2764
|
default:
|
|
2765
2765
|
return /* @__PURE__ */ w(B, { children: [
|
|
2766
|
-
/* @__PURE__ */ i(
|
|
2767
|
-
/* @__PURE__ */ i(
|
|
2766
|
+
/* @__PURE__ */ i(tt, { index: 0 }),
|
|
2767
|
+
/* @__PURE__ */ i(tt, { index: 1 })
|
|
2768
2768
|
] });
|
|
2769
2769
|
}
|
|
2770
2770
|
switch (t.getInputType(n)) {
|
|
2771
2771
|
case "date":
|
|
2772
2772
|
case "datetime-local":
|
|
2773
|
-
return /* @__PURE__ */ i(
|
|
2773
|
+
return /* @__PURE__ */ i(et, {});
|
|
2774
2774
|
case "autocomplete":
|
|
2775
|
-
return /* @__PURE__ */ i(Da, {});
|
|
2776
|
-
case "boolean":
|
|
2777
2775
|
return /* @__PURE__ */ i(Oa, {});
|
|
2776
|
+
case "boolean":
|
|
2777
|
+
return /* @__PURE__ */ i(Pa, {});
|
|
2778
2778
|
default:
|
|
2779
|
-
return /* @__PURE__ */ i(
|
|
2779
|
+
return /* @__PURE__ */ i(tt, {});
|
|
2780
2780
|
}
|
|
2781
|
-
},
|
|
2781
|
+
}, va = ({ index: e, column: t }) => {
|
|
2782
2782
|
const { t: n } = L(), r = v(), s = H("breakpoint", "md"), o = T("filter"), a = h.useMemo(() => o.getMatchingOperators(t), [t]), {
|
|
2783
2783
|
columns: l,
|
|
2784
2784
|
key: d,
|
|
@@ -2790,11 +2790,11 @@ const cn = async (e, t, n) => {
|
|
|
2790
2790
|
value: b,
|
|
2791
2791
|
setValue: m,
|
|
2792
2792
|
isRelation: g,
|
|
2793
|
-
setIsRelation:
|
|
2794
|
-
handleKey:
|
|
2795
|
-
handleOperator:
|
|
2793
|
+
setIsRelation: x,
|
|
2794
|
+
handleKey: A,
|
|
2795
|
+
handleOperator: k,
|
|
2796
2796
|
handleRemoveColumn: P
|
|
2797
|
-
} =
|
|
2797
|
+
} = Ta(e, t), O = ["boolean"].includes(o.getInputType(y));
|
|
2798
2798
|
return /* @__PURE__ */ i(
|
|
2799
2799
|
me.Provider,
|
|
2800
2800
|
{
|
|
@@ -2808,7 +2808,7 @@ const cn = async (e, t, n) => {
|
|
|
2808
2808
|
value: b,
|
|
2809
2809
|
setValue: m,
|
|
2810
2810
|
isRelation: g,
|
|
2811
|
-
setIsRelation:
|
|
2811
|
+
setIsRelation: x
|
|
2812
2812
|
},
|
|
2813
2813
|
children: /* @__PURE__ */ w(
|
|
2814
2814
|
Q,
|
|
@@ -2828,7 +2828,7 @@ const cn = async (e, t, n) => {
|
|
|
2828
2828
|
gap: 0.5,
|
|
2829
2829
|
children: [
|
|
2830
2830
|
/* @__PURE__ */ w(
|
|
2831
|
-
|
|
2831
|
+
N,
|
|
2832
2832
|
{
|
|
2833
2833
|
display: "flex",
|
|
2834
2834
|
flexDirection: {
|
|
@@ -2841,18 +2841,18 @@ const cn = async (e, t, n) => {
|
|
|
2841
2841
|
gap: 1.5,
|
|
2842
2842
|
children: [
|
|
2843
2843
|
/* @__PURE__ */ w(
|
|
2844
|
-
|
|
2844
|
+
N,
|
|
2845
2845
|
{
|
|
2846
2846
|
direction: "row",
|
|
2847
2847
|
alignItems: "center",
|
|
2848
2848
|
...!r && { width: "100%" },
|
|
2849
2849
|
gap: 1,
|
|
2850
2850
|
children: [
|
|
2851
|
-
/* @__PURE__ */ w(
|
|
2852
|
-
width: r ? 195 : `calc(100% - ${
|
|
2851
|
+
/* @__PURE__ */ w(ot, { sx: {
|
|
2852
|
+
width: r ? 195 : `calc(100% - ${O ? 88 : 44}px)`
|
|
2853
2853
|
}, children: [
|
|
2854
2854
|
/* @__PURE__ */ i(
|
|
2855
|
-
|
|
2855
|
+
at,
|
|
2856
2856
|
{
|
|
2857
2857
|
id: "filter-column-select-label",
|
|
2858
2858
|
size: "small",
|
|
@@ -2860,38 +2860,38 @@ const cn = async (e, t, n) => {
|
|
|
2860
2860
|
}
|
|
2861
2861
|
),
|
|
2862
2862
|
/* @__PURE__ */ i(
|
|
2863
|
-
|
|
2863
|
+
ve,
|
|
2864
2864
|
{
|
|
2865
2865
|
labelId: "filter-column-select-label",
|
|
2866
2866
|
id: "filter-column-select",
|
|
2867
2867
|
value: d,
|
|
2868
2868
|
label: n("Column"),
|
|
2869
|
-
onChange:
|
|
2869
|
+
onChange: A,
|
|
2870
2870
|
size: "small",
|
|
2871
|
-
children: l.map(({ key:
|
|
2871
|
+
children: l.map(({ key: R, label: D }) => /* @__PURE__ */ i(
|
|
2872
2872
|
oe,
|
|
2873
2873
|
{
|
|
2874
|
-
value:
|
|
2874
|
+
value: R,
|
|
2875
2875
|
children: n(D)
|
|
2876
2876
|
},
|
|
2877
|
-
`column_${
|
|
2877
|
+
`column_${R}_option`
|
|
2878
2878
|
))
|
|
2879
2879
|
}
|
|
2880
2880
|
)
|
|
2881
2881
|
] }),
|
|
2882
2882
|
!r && /* @__PURE__ */ w(
|
|
2883
|
-
|
|
2883
|
+
N,
|
|
2884
2884
|
{
|
|
2885
2885
|
direction: "row",
|
|
2886
2886
|
alignItems: "center",
|
|
2887
2887
|
children: [
|
|
2888
|
-
|
|
2888
|
+
O && /* @__PURE__ */ i(nt, {}),
|
|
2889
2889
|
/* @__PURE__ */ i(
|
|
2890
2890
|
q,
|
|
2891
2891
|
{
|
|
2892
2892
|
color: "error",
|
|
2893
2893
|
onClick: P(e),
|
|
2894
|
-
children: /* @__PURE__ */ i(
|
|
2894
|
+
children: /* @__PURE__ */ i(lt, {})
|
|
2895
2895
|
}
|
|
2896
2896
|
)
|
|
2897
2897
|
]
|
|
@@ -2900,11 +2900,11 @@ const cn = async (e, t, n) => {
|
|
|
2900
2900
|
]
|
|
2901
2901
|
}
|
|
2902
2902
|
),
|
|
2903
|
-
!g && !
|
|
2903
|
+
!g && !O && /* @__PURE__ */ w(ot, { sx: {
|
|
2904
2904
|
width: r ? 147.5 : "100%"
|
|
2905
2905
|
}, children: [
|
|
2906
2906
|
/* @__PURE__ */ i(
|
|
2907
|
-
|
|
2907
|
+
at,
|
|
2908
2908
|
{
|
|
2909
2909
|
id: "filter-operator-select-label",
|
|
2910
2910
|
size: "small",
|
|
@@ -2912,26 +2912,26 @@ const cn = async (e, t, n) => {
|
|
|
2912
2912
|
}
|
|
2913
2913
|
),
|
|
2914
2914
|
/* @__PURE__ */ i(
|
|
2915
|
-
|
|
2915
|
+
ve,
|
|
2916
2916
|
{
|
|
2917
2917
|
labelId: "filter-operator-select-label",
|
|
2918
2918
|
id: "filter-operator-select",
|
|
2919
2919
|
value: c,
|
|
2920
2920
|
label: n("Operator"),
|
|
2921
|
-
onChange:
|
|
2921
|
+
onChange: k,
|
|
2922
2922
|
size: "small",
|
|
2923
|
-
children: a.map(({ key:
|
|
2923
|
+
children: a.map(({ key: R, label: D }) => /* @__PURE__ */ i(
|
|
2924
2924
|
oe,
|
|
2925
2925
|
{
|
|
2926
|
-
value:
|
|
2926
|
+
value: R,
|
|
2927
2927
|
children: n(D)
|
|
2928
2928
|
},
|
|
2929
|
-
`operator_${
|
|
2929
|
+
`operator_${R}_option`
|
|
2930
2930
|
))
|
|
2931
2931
|
}
|
|
2932
2932
|
)
|
|
2933
2933
|
] }),
|
|
2934
|
-
r ? /* @__PURE__ */ i(
|
|
2934
|
+
r ? /* @__PURE__ */ i(nt, {}) : !O && /* @__PURE__ */ i(nt, {})
|
|
2935
2935
|
]
|
|
2936
2936
|
},
|
|
2937
2937
|
`filter_${d}_${e}`
|
|
@@ -2941,7 +2941,7 @@ const cn = async (e, t, n) => {
|
|
|
2941
2941
|
{
|
|
2942
2942
|
color: "error",
|
|
2943
2943
|
onClick: P(e),
|
|
2944
|
-
children: /* @__PURE__ */ i(
|
|
2944
|
+
children: /* @__PURE__ */ i(lt, {})
|
|
2945
2945
|
}
|
|
2946
2946
|
)
|
|
2947
2947
|
]
|
|
@@ -2949,13 +2949,13 @@ const cn = async (e, t, n) => {
|
|
|
2949
2949
|
)
|
|
2950
2950
|
}
|
|
2951
2951
|
);
|
|
2952
|
-
},
|
|
2952
|
+
}, hn = ({ dialog: e = !1 }) => {
|
|
2953
2953
|
const { t } = L(), n = v(), r = H("breakpoint", "md"), s = T("filter"), {
|
|
2954
2954
|
columnsFilter: o,
|
|
2955
2955
|
setColumnsFilter: a,
|
|
2956
2956
|
handleApplyFilters: l,
|
|
2957
2957
|
clearFilters: d
|
|
2958
|
-
} = h.useContext(
|
|
2958
|
+
} = h.useContext(_t), u = () => {
|
|
2959
2959
|
a((c) => [
|
|
2960
2960
|
...c,
|
|
2961
2961
|
{
|
|
@@ -2977,18 +2977,18 @@ const cn = async (e, t, n) => {
|
|
|
2977
2977
|
p: e ? 0 : 2
|
|
2978
2978
|
},
|
|
2979
2979
|
children: [
|
|
2980
|
-
/* @__PURE__ */ i(
|
|
2980
|
+
/* @__PURE__ */ i(N, { children: o.map((c, f, y) => {
|
|
2981
2981
|
const S = f == y.length - 1;
|
|
2982
2982
|
return /* @__PURE__ */ w(B, { children: [
|
|
2983
2983
|
/* @__PURE__ */ i(
|
|
2984
|
-
|
|
2984
|
+
va,
|
|
2985
2985
|
{
|
|
2986
2986
|
index: f,
|
|
2987
2987
|
column: c
|
|
2988
2988
|
},
|
|
2989
2989
|
`row_${c.key}`
|
|
2990
2990
|
),
|
|
2991
|
-
!n && /* @__PURE__ */ i(
|
|
2991
|
+
!n && /* @__PURE__ */ i(Pe, { sx: {
|
|
2992
2992
|
mt: S ? 0.625 : 1.25,
|
|
2993
2993
|
mb: S ? 0.75 : 1.5,
|
|
2994
2994
|
...S && {
|
|
@@ -2998,13 +2998,13 @@ const cn = async (e, t, n) => {
|
|
|
2998
2998
|
] });
|
|
2999
2999
|
}) }),
|
|
3000
3000
|
/* @__PURE__ */ i(
|
|
3001
|
-
|
|
3001
|
+
N,
|
|
3002
3002
|
{
|
|
3003
3003
|
direction: "row",
|
|
3004
3004
|
alignItems: "center",
|
|
3005
3005
|
justifyContent: "center",
|
|
3006
3006
|
children: n ? /* @__PURE__ */ i(
|
|
3007
|
-
|
|
3007
|
+
M,
|
|
3008
3008
|
{
|
|
3009
3009
|
variant: "outlined",
|
|
3010
3010
|
onClick: u,
|
|
@@ -3018,21 +3018,21 @@ const cn = async (e, t, n) => {
|
|
|
3018
3018
|
onClick: u,
|
|
3019
3019
|
color: "primary",
|
|
3020
3020
|
sx: { fontSize: 32 },
|
|
3021
|
-
children: /* @__PURE__ */ i(
|
|
3021
|
+
children: /* @__PURE__ */ i(En, { fontSize: "inherit" })
|
|
3022
3022
|
}
|
|
3023
3023
|
)
|
|
3024
3024
|
}
|
|
3025
3025
|
),
|
|
3026
3026
|
n && /* @__PURE__ */ w(
|
|
3027
|
-
|
|
3027
|
+
N,
|
|
3028
3028
|
{
|
|
3029
3029
|
direction: "row",
|
|
3030
3030
|
justifyContent: "space-between",
|
|
3031
3031
|
mt: 2,
|
|
3032
3032
|
children: [
|
|
3033
|
-
/* @__PURE__ */ i(
|
|
3033
|
+
/* @__PURE__ */ i(M, { onClick: d, children: t("Clear") }),
|
|
3034
3034
|
/* @__PURE__ */ i(
|
|
3035
|
-
|
|
3035
|
+
M,
|
|
3036
3036
|
{
|
|
3037
3037
|
variant: "contained",
|
|
3038
3038
|
onClick: l,
|
|
@@ -3046,21 +3046,21 @@ const cn = async (e, t, n) => {
|
|
|
3046
3046
|
]
|
|
3047
3047
|
}
|
|
3048
3048
|
);
|
|
3049
|
-
},
|
|
3050
|
-
const n = T("filter"), r =
|
|
3049
|
+
}, Fa = (e, t) => {
|
|
3050
|
+
const n = T("filter"), r = Ln.toObject(t), s = Object.keys(r).reduce((a, l) => (["where"].includes(l) && (a[l] = r[l]), a), {}), o = [];
|
|
3051
3051
|
return Object.entries(s).forEach(([, a]) => {
|
|
3052
3052
|
Object.entries(a).forEach(([l, d]) => {
|
|
3053
3053
|
e.filter((u) => {
|
|
3054
3054
|
const c = (() => {
|
|
3055
|
-
const y =
|
|
3055
|
+
const y = E.camel(l.split(E.camel(u.key))[1]);
|
|
3056
3056
|
return G.isEmpty(y) ? "equals" : y;
|
|
3057
3057
|
})();
|
|
3058
3058
|
if (!n.getOperators().includes(c))
|
|
3059
3059
|
return !1;
|
|
3060
|
-
const f =
|
|
3060
|
+
const f = E.snake(l.split(E.ucfirst(c))[0]);
|
|
3061
3061
|
return u.key === f;
|
|
3062
3062
|
}).forEach((u) => {
|
|
3063
|
-
let c =
|
|
3063
|
+
let c = E.camel(l.split(E.camel(u.key))[1]);
|
|
3064
3064
|
(typeof c > "u" || c === null || G.isEmpty(c)) && (c = "equals");
|
|
3065
3065
|
let f = d;
|
|
3066
3066
|
switch (n.getInputType(u.type)) {
|
|
@@ -3069,7 +3069,7 @@ const cn = async (e, t, n) => {
|
|
|
3069
3069
|
break;
|
|
3070
3070
|
}
|
|
3071
3071
|
case "datetime-local": {
|
|
3072
|
-
Array.isArray(d) ? f = d.map((y) =>
|
|
3072
|
+
Array.isArray(d) ? f = d.map((y) => Yt.toDateTimeLocal(y)) : f = Yt.toDateTimeLocal(d);
|
|
3073
3073
|
break;
|
|
3074
3074
|
}
|
|
3075
3075
|
case "boolean": {
|
|
@@ -3088,12 +3088,12 @@ const cn = async (e, t, n) => {
|
|
|
3088
3088
|
});
|
|
3089
3089
|
});
|
|
3090
3090
|
}), o;
|
|
3091
|
-
},
|
|
3091
|
+
}, Ba = (e) => {
|
|
3092
3092
|
const t = T("filter"), n = new URLSearchParams();
|
|
3093
3093
|
return e.forEach((r) => {
|
|
3094
3094
|
const { key: s, operator: o, value: a, type: l } = r;
|
|
3095
|
-
let d =
|
|
3096
|
-
if (["equals"].includes(
|
|
3095
|
+
let d = E.ucfirst(o);
|
|
3096
|
+
if (["equals"].includes(E.camel(o)) && (d = ""), Array.isArray(a))
|
|
3097
3097
|
a.forEach((u, c) => {
|
|
3098
3098
|
let f = u;
|
|
3099
3099
|
switch (t.getInputType(l)) {
|
|
@@ -3102,7 +3102,7 @@ const cn = async (e, t, n) => {
|
|
|
3102
3102
|
break;
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
3105
|
-
n.set(`where[${
|
|
3105
|
+
n.set(`where[${E.camel(s)}${d}][${c}]`, f);
|
|
3106
3106
|
});
|
|
3107
3107
|
else {
|
|
3108
3108
|
let u = a;
|
|
@@ -3112,37 +3112,37 @@ const cn = async (e, t, n) => {
|
|
|
3112
3112
|
break;
|
|
3113
3113
|
}
|
|
3114
3114
|
}
|
|
3115
|
-
n.set(`where[${
|
|
3115
|
+
n.set(`where[${E.camel(s)}${d}]`, u);
|
|
3116
3116
|
}
|
|
3117
3117
|
}), n;
|
|
3118
|
-
},
|
|
3119
|
-
const { t: e } = L(), t = T("filter"), n = v(), r = te(), [s, o] =
|
|
3120
|
-
d(
|
|
3118
|
+
}, La = () => {
|
|
3119
|
+
const { t: e } = L(), t = T("filter"), n = v(), r = te(), [s, o] = K(), a = h.useMemo(() => "where" in Ln.toObject(s), [s]), [l, d] = h.useState(null), [u, c] = h.useState([]), f = !!l, y = h.useMemo(() => t.getFilterableColumns(r), [r]), S = (A) => {
|
|
3120
|
+
d(A.currentTarget);
|
|
3121
3121
|
}, b = () => {
|
|
3122
3122
|
d(null), setTimeout(() => {
|
|
3123
3123
|
c([]);
|
|
3124
3124
|
}, 300);
|
|
3125
3125
|
}, m = () => {
|
|
3126
3126
|
g();
|
|
3127
|
-
const
|
|
3128
|
-
o(
|
|
3127
|
+
const A = Ba(u);
|
|
3128
|
+
o(A, { replace: !0 }), b();
|
|
3129
3129
|
}, g = () => {
|
|
3130
|
-
o((
|
|
3131
|
-
const
|
|
3132
|
-
for (const [P] of
|
|
3133
|
-
P.startsWith("where[") &&
|
|
3134
|
-
return
|
|
3130
|
+
o((A) => {
|
|
3131
|
+
const k = new URLSearchParams(A);
|
|
3132
|
+
for (const [P] of A.entries())
|
|
3133
|
+
P.startsWith("where[") && k.delete(P);
|
|
3134
|
+
return k;
|
|
3135
3135
|
});
|
|
3136
|
-
},
|
|
3136
|
+
}, x = () => {
|
|
3137
3137
|
g(), b(), setTimeout(() => {
|
|
3138
3138
|
c([]);
|
|
3139
3139
|
}, 300);
|
|
3140
3140
|
};
|
|
3141
3141
|
return h.useEffect(() => {
|
|
3142
|
-
const
|
|
3143
|
-
c(
|
|
3142
|
+
const A = Fa(y, s);
|
|
3143
|
+
c(A);
|
|
3144
3144
|
}, [y, s, l]), /* @__PURE__ */ w(
|
|
3145
|
-
|
|
3145
|
+
_t.Provider,
|
|
3146
3146
|
{
|
|
3147
3147
|
value: {
|
|
3148
3148
|
Model: r,
|
|
@@ -3154,7 +3154,7 @@ const cn = async (e, t, n) => {
|
|
|
3154
3154
|
setSearchParams: o,
|
|
3155
3155
|
handleApplyFilters: m,
|
|
3156
3156
|
clearSearchParams: g,
|
|
3157
|
-
clearFilters:
|
|
3157
|
+
clearFilters: x
|
|
3158
3158
|
},
|
|
3159
3159
|
children: [
|
|
3160
3160
|
/* @__PURE__ */ i(
|
|
@@ -3164,18 +3164,18 @@ const cn = async (e, t, n) => {
|
|
|
3164
3164
|
"aria-label": "filter",
|
|
3165
3165
|
onClick: S,
|
|
3166
3166
|
children: /* @__PURE__ */ i(
|
|
3167
|
-
|
|
3167
|
+
Dt,
|
|
3168
3168
|
{
|
|
3169
3169
|
color: "secondary",
|
|
3170
3170
|
variant: "dot",
|
|
3171
3171
|
invisible: !a,
|
|
3172
|
-
children: /* @__PURE__ */ i(
|
|
3172
|
+
children: /* @__PURE__ */ i(kn, {})
|
|
3173
3173
|
}
|
|
3174
3174
|
)
|
|
3175
3175
|
}
|
|
3176
3176
|
),
|
|
3177
3177
|
n ? /* @__PURE__ */ i(
|
|
3178
|
-
|
|
3178
|
+
zr,
|
|
3179
3179
|
{
|
|
3180
3180
|
id: "model-filter-popover",
|
|
3181
3181
|
open: f,
|
|
@@ -3185,38 +3185,38 @@ const cn = async (e, t, n) => {
|
|
|
3185
3185
|
vertical: "bottom",
|
|
3186
3186
|
horizontal: "left"
|
|
3187
3187
|
},
|
|
3188
|
-
children: /* @__PURE__ */ i(
|
|
3188
|
+
children: /* @__PURE__ */ i(hn, {})
|
|
3189
3189
|
}
|
|
3190
3190
|
) : /* @__PURE__ */ w(
|
|
3191
|
-
|
|
3191
|
+
xt,
|
|
3192
3192
|
{
|
|
3193
3193
|
open: f,
|
|
3194
3194
|
onClose: b,
|
|
3195
3195
|
fullWidth: !0,
|
|
3196
3196
|
children: [
|
|
3197
|
-
/* @__PURE__ */ w(
|
|
3197
|
+
/* @__PURE__ */ w(Ct, { children: [
|
|
3198
3198
|
e("Filter :model", { model: r.plural() }),
|
|
3199
3199
|
/* @__PURE__ */ i(
|
|
3200
3200
|
q,
|
|
3201
3201
|
{
|
|
3202
3202
|
onClick: b,
|
|
3203
3203
|
sx: { position: "absolute", right: 8, top: 8 },
|
|
3204
|
-
children: /* @__PURE__ */ i(
|
|
3204
|
+
children: /* @__PURE__ */ i(Me, {})
|
|
3205
3205
|
}
|
|
3206
3206
|
)
|
|
3207
3207
|
] }),
|
|
3208
|
-
/* @__PURE__ */ i(
|
|
3209
|
-
/* @__PURE__ */ w(
|
|
3208
|
+
/* @__PURE__ */ i(Et, { dividers: !0, children: /* @__PURE__ */ i(hn, { dialog: !0 }) }),
|
|
3209
|
+
/* @__PURE__ */ w(kt, { children: [
|
|
3210
3210
|
/* @__PURE__ */ i(
|
|
3211
|
-
|
|
3211
|
+
M,
|
|
3212
3212
|
{
|
|
3213
|
-
onClick:
|
|
3213
|
+
onClick: x,
|
|
3214
3214
|
sx: { mr: "auto" },
|
|
3215
3215
|
children: e("Clear")
|
|
3216
3216
|
}
|
|
3217
3217
|
),
|
|
3218
3218
|
/* @__PURE__ */ i(
|
|
3219
|
-
|
|
3219
|
+
M,
|
|
3220
3220
|
{
|
|
3221
3221
|
variant: "contained",
|
|
3222
3222
|
onClick: m,
|
|
@@ -3231,7 +3231,7 @@ const cn = async (e, t, n) => {
|
|
|
3231
3231
|
]
|
|
3232
3232
|
}
|
|
3233
3233
|
);
|
|
3234
|
-
},
|
|
3234
|
+
}, Ht = h.createContext({
|
|
3235
3235
|
columns: [],
|
|
3236
3236
|
columnCount: 0,
|
|
3237
3237
|
selected: W([]),
|
|
@@ -3240,11 +3240,11 @@ const cn = async (e, t, n) => {
|
|
|
3240
3240
|
error: new Error("Trying to access TableContext outside of TableProvider"),
|
|
3241
3241
|
Model: null
|
|
3242
3242
|
});
|
|
3243
|
-
function
|
|
3243
|
+
function zt() {
|
|
3244
3244
|
const {
|
|
3245
3245
|
selected: e,
|
|
3246
3246
|
items: t
|
|
3247
|
-
} = h.useContext(
|
|
3247
|
+
} = h.useContext(Ht), n = mn(e), r = () => {
|
|
3248
3248
|
e.splice(0, e.count());
|
|
3249
3249
|
}, s = (u) => {
|
|
3250
3250
|
const c = e.search(u);
|
|
@@ -3273,10 +3273,10 @@ function Nt() {
|
|
|
3273
3273
|
};
|
|
3274
3274
|
}
|
|
3275
3275
|
function ae() {
|
|
3276
|
-
return h.useContext(
|
|
3276
|
+
return h.useContext(Ht);
|
|
3277
3277
|
}
|
|
3278
|
-
function
|
|
3279
|
-
const [t, n] = h.useState(""), { selected: r } =
|
|
3278
|
+
function Ia(e) {
|
|
3279
|
+
const [t, n] = h.useState(""), { selected: r } = zt(), { t: s } = L(), o = Ut(), { massActions: a } = ae(), l = (u) => {
|
|
3280
3280
|
n(u.target.value);
|
|
3281
3281
|
};
|
|
3282
3282
|
if (h.useEffect(() => {
|
|
@@ -3285,21 +3285,21 @@ function La(e) {
|
|
|
3285
3285
|
return null;
|
|
3286
3286
|
const d = r.isEmpty() ? s("Select items to apply") : s("Select action");
|
|
3287
3287
|
return /* @__PURE__ */ w(
|
|
3288
|
-
|
|
3288
|
+
N,
|
|
3289
3289
|
{
|
|
3290
3290
|
direction: "row",
|
|
3291
3291
|
alignItems: "center",
|
|
3292
3292
|
...e,
|
|
3293
3293
|
children: [
|
|
3294
3294
|
/* @__PURE__ */ w(
|
|
3295
|
-
|
|
3295
|
+
ot,
|
|
3296
3296
|
{
|
|
3297
3297
|
sx: { m: 1, minWidth: 200 },
|
|
3298
3298
|
size: "small",
|
|
3299
3299
|
children: [
|
|
3300
|
-
/* @__PURE__ */ i(
|
|
3300
|
+
/* @__PURE__ */ i(at, { id: "mass-actions-select-label", children: d }),
|
|
3301
3301
|
/* @__PURE__ */ w(
|
|
3302
|
-
|
|
3302
|
+
ve,
|
|
3303
3303
|
{
|
|
3304
3304
|
labelId: "mass-actions-select-label",
|
|
3305
3305
|
id: "mass-actions-select",
|
|
@@ -3324,7 +3324,7 @@ function La(e) {
|
|
|
3324
3324
|
}
|
|
3325
3325
|
),
|
|
3326
3326
|
/* @__PURE__ */ i(
|
|
3327
|
-
|
|
3327
|
+
M,
|
|
3328
3328
|
{
|
|
3329
3329
|
size: "small",
|
|
3330
3330
|
disabled: r.isEmpty() || !t,
|
|
@@ -3342,8 +3342,8 @@ function La(e) {
|
|
|
3342
3342
|
}
|
|
3343
3343
|
);
|
|
3344
3344
|
}
|
|
3345
|
-
const
|
|
3346
|
-
const { handleDrawerOpen: e } =
|
|
3345
|
+
const Ma = () => {
|
|
3346
|
+
const { handleDrawerOpen: e } = qt();
|
|
3347
3347
|
return /* @__PURE__ */ i(
|
|
3348
3348
|
q,
|
|
3349
3349
|
{
|
|
@@ -3352,13 +3352,13 @@ const Ia = () => {
|
|
|
3352
3352
|
edge: "start",
|
|
3353
3353
|
onClick: e,
|
|
3354
3354
|
sx: { mr: { md: 2 } },
|
|
3355
|
-
children: /* @__PURE__ */ i(
|
|
3355
|
+
children: /* @__PURE__ */ i(Tn, {})
|
|
3356
3356
|
}
|
|
3357
3357
|
);
|
|
3358
|
-
},
|
|
3359
|
-
|
|
3358
|
+
}, We = h.forwardRef(({ to: e, children: t, ...n }, r) => /* @__PURE__ */ i(
|
|
3359
|
+
it,
|
|
3360
3360
|
{
|
|
3361
|
-
component:
|
|
3361
|
+
component: Re,
|
|
3362
3362
|
to: e,
|
|
3363
3363
|
ref: r,
|
|
3364
3364
|
sx: { textDecoration: "none" },
|
|
@@ -3366,14 +3366,14 @@ const Ia = () => {
|
|
|
3366
3366
|
children: t
|
|
3367
3367
|
}
|
|
3368
3368
|
));
|
|
3369
|
-
|
|
3369
|
+
We.displayName = "Link";
|
|
3370
3370
|
const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */ i(B, { children: {
|
|
3371
|
-
"« Previous": /* @__PURE__ */ i(
|
|
3372
|
-
"Next »": /* @__PURE__ */ i(
|
|
3373
|
-
"Last »": /* @__PURE__ */ i(
|
|
3374
|
-
"« First": /* @__PURE__ */ i(
|
|
3375
|
-
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }),
|
|
3376
|
-
const n = e === "default", [r, s] =
|
|
3371
|
+
"« Previous": /* @__PURE__ */ i(Ne, {}),
|
|
3372
|
+
"Next »": /* @__PURE__ */ i(je, {}),
|
|
3373
|
+
"Last »": /* @__PURE__ */ i(Dn, {}),
|
|
3374
|
+
"« First": /* @__PURE__ */ i(On, {})
|
|
3375
|
+
}[e] || e }) : /* @__PURE__ */ i(B, { children: e }), ja = ({ variant: e = "default", ...t }) => {
|
|
3376
|
+
const n = e === "default", [r, s] = K(), [o, a] = h.useState(r.get("page") || "1"), {
|
|
3377
3377
|
links: l,
|
|
3378
3378
|
meta: {
|
|
3379
3379
|
current_page: d = 1,
|
|
@@ -3385,19 +3385,19 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3385
3385
|
prev: y,
|
|
3386
3386
|
next: S,
|
|
3387
3387
|
last: b
|
|
3388
|
-
} = l || {}, m = (
|
|
3389
|
-
|
|
3388
|
+
} = l || {}, m = (x) => {
|
|
3389
|
+
x.preventDefault(), s((A) => (A.set("page", o || "1"), A));
|
|
3390
3390
|
}, g = [
|
|
3391
3391
|
{ url: d > 1 ? f : null, label: "« First", active: !1 },
|
|
3392
3392
|
{ url: y, label: "« Previous", active: !1 },
|
|
3393
3393
|
{
|
|
3394
3394
|
element: /* @__PURE__ */ i(
|
|
3395
|
-
|
|
3395
|
+
Sr,
|
|
3396
3396
|
{
|
|
3397
3397
|
onSubmit: m,
|
|
3398
3398
|
preventScrollReset: !0,
|
|
3399
3399
|
children: /* @__PURE__ */ i(
|
|
3400
|
-
|
|
3400
|
+
Ae,
|
|
3401
3401
|
{
|
|
3402
3402
|
size: "small",
|
|
3403
3403
|
type: "number",
|
|
@@ -3415,11 +3415,11 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3415
3415
|
value: o,
|
|
3416
3416
|
error: Number(o) > c,
|
|
3417
3417
|
helperText: Number(o) > c ? `Max ${c}` : void 0,
|
|
3418
|
-
onChange: (
|
|
3419
|
-
!Number.isNaN(Number(
|
|
3418
|
+
onChange: (x) => {
|
|
3419
|
+
!Number.isNaN(Number(x.target.value)) && Number(x.target.value) > 0 && a(x.target.value), x.target.value === "" && a("");
|
|
3420
3420
|
},
|
|
3421
|
-
onBlur: (
|
|
3422
|
-
s((
|
|
3421
|
+
onBlur: (x) => {
|
|
3422
|
+
s((A) => (A.set("page", x.target.value || "1"), A), { replace: !0 });
|
|
3423
3423
|
},
|
|
3424
3424
|
disabled: c === 1,
|
|
3425
3425
|
"aria-label": "Page number"
|
|
@@ -3435,17 +3435,17 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3435
3435
|
return h.useEffect(() => {
|
|
3436
3436
|
d && a(String(d));
|
|
3437
3437
|
}, [d]), /* @__PURE__ */ i(
|
|
3438
|
-
|
|
3438
|
+
N,
|
|
3439
3439
|
{
|
|
3440
3440
|
spacing: 1,
|
|
3441
3441
|
direction: "row",
|
|
3442
3442
|
justifyContent: "center",
|
|
3443
3443
|
alignItems: "center",
|
|
3444
3444
|
...t,
|
|
3445
|
-
children: (n ? u : g).map((
|
|
3446
|
-
|
|
3445
|
+
children: (n ? u : g).map((x, A) => x.element || /* @__PURE__ */ i(
|
|
3446
|
+
M,
|
|
3447
3447
|
{
|
|
3448
|
-
variant:
|
|
3448
|
+
variant: x.active ? "contained" : "text",
|
|
3449
3449
|
color: "primary",
|
|
3450
3450
|
size: "small",
|
|
3451
3451
|
sx: {
|
|
@@ -3454,16 +3454,16 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3454
3454
|
height: 32,
|
|
3455
3455
|
borderRadius: "50%"
|
|
3456
3456
|
},
|
|
3457
|
-
disabled: !
|
|
3458
|
-
component:
|
|
3459
|
-
to:
|
|
3460
|
-
children: /* @__PURE__ */ i(Na, { label:
|
|
3457
|
+
disabled: !x.url,
|
|
3458
|
+
component: We,
|
|
3459
|
+
to: x.url,
|
|
3460
|
+
children: /* @__PURE__ */ i(Na, { label: x.label })
|
|
3461
3461
|
},
|
|
3462
|
-
|
|
3462
|
+
A
|
|
3463
3463
|
))
|
|
3464
3464
|
}
|
|
3465
3465
|
);
|
|
3466
|
-
},
|
|
3466
|
+
}, Ua = () => {
|
|
3467
3467
|
const { t: e } = L(), {
|
|
3468
3468
|
meta: {
|
|
3469
3469
|
total: t = 0,
|
|
@@ -3471,39 +3471,39 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3471
3471
|
to: r = 0
|
|
3472
3472
|
} = {}
|
|
3473
3473
|
} = Se();
|
|
3474
|
-
return /* @__PURE__ */ i(
|
|
3474
|
+
return /* @__PURE__ */ i($, { variant: "caption", noWrap: !0, children: e(":from–:to of :total", {
|
|
3475
3475
|
from: n,
|
|
3476
3476
|
to: r,
|
|
3477
3477
|
total: t
|
|
3478
3478
|
}) });
|
|
3479
|
-
},
|
|
3479
|
+
}, qa = () => {
|
|
3480
3480
|
const { t: e } = L(), {
|
|
3481
3481
|
meta: {
|
|
3482
3482
|
per_page: t = 15
|
|
3483
3483
|
} = {}
|
|
3484
|
-
} = Se(), [, n] =
|
|
3484
|
+
} = Se(), [, n] = K(), r = (o) => {
|
|
3485
3485
|
n((a) => {
|
|
3486
3486
|
const l = new URLSearchParams(a);
|
|
3487
3487
|
return l.set("per_page", o.target.value.toString()), l;
|
|
3488
3488
|
});
|
|
3489
|
-
}, s =
|
|
3489
|
+
}, s = At(
|
|
3490
3490
|
T("cms"),
|
|
3491
3491
|
"perPageOptions",
|
|
3492
3492
|
[15, 30, 75, 150]
|
|
3493
3493
|
);
|
|
3494
3494
|
return /* @__PURE__ */ w(
|
|
3495
|
-
|
|
3495
|
+
N,
|
|
3496
3496
|
{
|
|
3497
3497
|
direction: "row",
|
|
3498
3498
|
alignItems: "center",
|
|
3499
3499
|
gap: 1,
|
|
3500
3500
|
children: [
|
|
3501
|
-
/* @__PURE__ */ w(
|
|
3501
|
+
/* @__PURE__ */ w($, { variant: "caption", children: [
|
|
3502
3502
|
e("Rows per page"),
|
|
3503
3503
|
":"
|
|
3504
3504
|
] }),
|
|
3505
3505
|
/* @__PURE__ */ i(
|
|
3506
|
-
|
|
3506
|
+
ve,
|
|
3507
3507
|
{
|
|
3508
3508
|
value: t,
|
|
3509
3509
|
onChange: r,
|
|
@@ -3535,7 +3535,7 @@ const Na = ({ label: e }) => isNaN(e) || isNaN(parseFloat(e)) ? /* @__PURE__ */
|
|
|
3535
3535
|
}
|
|
3536
3536
|
);
|
|
3537
3537
|
};
|
|
3538
|
-
function
|
|
3538
|
+
function _a(e, t) {
|
|
3539
3539
|
const [n, r] = h.useState(!1);
|
|
3540
3540
|
return h.useEffect(() => {
|
|
3541
3541
|
const s = /* @__PURE__ */ new Set(), o = (l) => {
|
|
@@ -3548,31 +3548,31 @@ function qa(e, t) {
|
|
|
3548
3548
|
};
|
|
3549
3549
|
}, [e, t]), n;
|
|
3550
3550
|
}
|
|
3551
|
-
const
|
|
3551
|
+
const Ha = Z(Ae)(({ theme: e }) => ({
|
|
3552
3552
|
"& .MuiInputBase-root": {
|
|
3553
3553
|
backgroundColor: e.palette.background.paper
|
|
3554
3554
|
}
|
|
3555
3555
|
// transition: 'width 250ms ease-in-out',
|
|
3556
|
-
})),
|
|
3556
|
+
})), za = us.throttle((e, t) => {
|
|
3557
3557
|
t((n) => {
|
|
3558
3558
|
const r = new URLSearchParams(n);
|
|
3559
3559
|
return e ? r.set("q", e) : r.delete("q"), r;
|
|
3560
3560
|
});
|
|
3561
|
-
}, 500),
|
|
3562
|
-
const [e, t] =
|
|
3561
|
+
}, 500), Wa = () => {
|
|
3562
|
+
const [e, t] = K(), n = e.get("q") || "", [r, s] = h.useState(n), [o, a] = h.useState(!1), l = h.useRef(null), { t: d } = L();
|
|
3563
3563
|
h.useEffect(() => {
|
|
3564
3564
|
s(n);
|
|
3565
3565
|
}, [n]);
|
|
3566
3566
|
const u = (y) => {
|
|
3567
|
-
s(y.target.value),
|
|
3567
|
+
s(y.target.value), za(y.target.value, t);
|
|
3568
3568
|
}, c = v();
|
|
3569
|
-
|
|
3569
|
+
_a(["Control", "/"], () => {
|
|
3570
3570
|
l.current.focus();
|
|
3571
3571
|
});
|
|
3572
3572
|
const f = c ? 300 : "calc(100vw - 58px)";
|
|
3573
3573
|
return /* @__PURE__ */ w(B, { children: [
|
|
3574
3574
|
!c && !o && /* @__PURE__ */ i(q, { color: "inherit", onClick: () => a(!0), children: /* @__PURE__ */ i(
|
|
3575
|
-
|
|
3575
|
+
Dt,
|
|
3576
3576
|
{
|
|
3577
3577
|
variant: "dot",
|
|
3578
3578
|
color: "secondary",
|
|
@@ -3581,11 +3581,11 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3581
3581
|
vertical: "bottom",
|
|
3582
3582
|
horizontal: "left"
|
|
3583
3583
|
},
|
|
3584
|
-
children: /* @__PURE__ */ i(
|
|
3584
|
+
children: /* @__PURE__ */ i(ct, {})
|
|
3585
3585
|
}
|
|
3586
3586
|
) }),
|
|
3587
3587
|
/* @__PURE__ */ i(
|
|
3588
|
-
|
|
3588
|
+
yn,
|
|
3589
3589
|
{
|
|
3590
3590
|
orientation: "horizontal",
|
|
3591
3591
|
in: c || o,
|
|
@@ -3595,12 +3595,12 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3595
3595
|
},
|
|
3596
3596
|
unmountOnExit: !1,
|
|
3597
3597
|
children: /* @__PURE__ */ i(
|
|
3598
|
-
|
|
3598
|
+
Ha,
|
|
3599
3599
|
{
|
|
3600
3600
|
placeholder: c ? `(Ctrl + /) ${d("Search...")}` : `${d("Search...")}`,
|
|
3601
3601
|
value: r,
|
|
3602
3602
|
InputProps: {
|
|
3603
|
-
endAdornment: /* @__PURE__ */ i(
|
|
3603
|
+
endAdornment: /* @__PURE__ */ i(ct, {})
|
|
3604
3604
|
},
|
|
3605
3605
|
inputProps: {
|
|
3606
3606
|
ref: l
|
|
@@ -3614,7 +3614,7 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3614
3614
|
}
|
|
3615
3615
|
)
|
|
3616
3616
|
] });
|
|
3617
|
-
},
|
|
3617
|
+
}, Va = ({ children: e, ...t }) => /* @__PURE__ */ i(
|
|
3618
3618
|
ee,
|
|
3619
3619
|
{
|
|
3620
3620
|
sx: { width: "1px" },
|
|
@@ -3622,8 +3622,8 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3622
3622
|
...t,
|
|
3623
3623
|
children: e
|
|
3624
3624
|
}
|
|
3625
|
-
),
|
|
3626
|
-
const { t: e } = L(), [t, n] =
|
|
3625
|
+
), $a = () => {
|
|
3626
|
+
const { t: e } = L(), [t, n] = K(), {
|
|
3627
3627
|
columns: r,
|
|
3628
3628
|
Model: s
|
|
3629
3629
|
} = ae(), o = t.get("order_by") || "", [a = "", l = ""] = o.split(":"), [d, u] = h.useState(a), [c, f] = h.useState(l), [y, S] = h.useState(!1), b = () => {
|
|
@@ -3635,88 +3635,88 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3635
3635
|
S(!1);
|
|
3636
3636
|
return;
|
|
3637
3637
|
}
|
|
3638
|
-
n((
|
|
3639
|
-
const
|
|
3640
|
-
return
|
|
3638
|
+
n((A) => {
|
|
3639
|
+
const k = new URLSearchParams(A);
|
|
3640
|
+
return k.set("order_by", `${d}:${c}`), k;
|
|
3641
3641
|
}), S(!1);
|
|
3642
|
-
},
|
|
3643
|
-
n((
|
|
3644
|
-
const
|
|
3645
|
-
return
|
|
3642
|
+
}, x = () => {
|
|
3643
|
+
n((A) => {
|
|
3644
|
+
const k = new URLSearchParams(A);
|
|
3645
|
+
return k.delete("order_by"), k;
|
|
3646
3646
|
}), S(!1), u(""), f("");
|
|
3647
3647
|
};
|
|
3648
3648
|
return /* @__PURE__ */ w(B, { children: [
|
|
3649
3649
|
/* @__PURE__ */ i(q, { onClick: b, children: /* @__PURE__ */ i(
|
|
3650
|
-
|
|
3650
|
+
Dt,
|
|
3651
3651
|
{
|
|
3652
3652
|
color: "secondary",
|
|
3653
3653
|
variant: "dot",
|
|
3654
3654
|
invisible: !a,
|
|
3655
|
-
children: /* @__PURE__ */ i(
|
|
3655
|
+
children: /* @__PURE__ */ i(Rn, {})
|
|
3656
3656
|
}
|
|
3657
3657
|
) }),
|
|
3658
|
-
/* @__PURE__ */ w(
|
|
3659
|
-
/* @__PURE__ */ w(
|
|
3658
|
+
/* @__PURE__ */ w(xt, { open: y, onClose: m, fullWidth: !0, children: [
|
|
3659
|
+
/* @__PURE__ */ w(Ct, { children: [
|
|
3660
3660
|
e("Sort :model", { model: s.plural() }),
|
|
3661
3661
|
/* @__PURE__ */ i(
|
|
3662
3662
|
q,
|
|
3663
3663
|
{
|
|
3664
3664
|
onClick: m,
|
|
3665
3665
|
sx: { position: "absolute", right: 8, top: 8 },
|
|
3666
|
-
children: /* @__PURE__ */ i(
|
|
3666
|
+
children: /* @__PURE__ */ i(Me, {})
|
|
3667
3667
|
}
|
|
3668
3668
|
)
|
|
3669
3669
|
] }),
|
|
3670
|
-
/* @__PURE__ */ w(
|
|
3670
|
+
/* @__PURE__ */ w(Et, { dividers: !0, children: [
|
|
3671
3671
|
/* @__PURE__ */ w(
|
|
3672
|
-
|
|
3672
|
+
Vt,
|
|
3673
3673
|
{
|
|
3674
3674
|
value: d,
|
|
3675
|
-
onChange: (
|
|
3676
|
-
u(
|
|
3675
|
+
onChange: (A) => {
|
|
3676
|
+
u(A.target.value), c || f("asc");
|
|
3677
3677
|
},
|
|
3678
3678
|
children: [
|
|
3679
|
-
/* @__PURE__ */ i(
|
|
3680
|
-
/* @__PURE__ */ i(
|
|
3681
|
-
W(r).whereStrict("sortable", "!=", !1).map(({ key:
|
|
3682
|
-
|
|
3679
|
+
/* @__PURE__ */ i($, { variant: "caption", children: e("Column") }),
|
|
3680
|
+
/* @__PURE__ */ i(Pe, {}),
|
|
3681
|
+
W(r).whereStrict("sortable", "!=", !1).map(({ key: A, label: k }) => /* @__PURE__ */ i(
|
|
3682
|
+
$e,
|
|
3683
3683
|
{
|
|
3684
|
-
value:
|
|
3685
|
-
control: /* @__PURE__ */ i(
|
|
3686
|
-
label:
|
|
3684
|
+
value: A,
|
|
3685
|
+
control: /* @__PURE__ */ i(Ke, {}),
|
|
3686
|
+
label: k
|
|
3687
3687
|
},
|
|
3688
|
-
|
|
3688
|
+
A
|
|
3689
3689
|
))
|
|
3690
3690
|
]
|
|
3691
3691
|
}
|
|
3692
3692
|
),
|
|
3693
|
-
/* @__PURE__ */ i(
|
|
3694
|
-
/* @__PURE__ */ i(
|
|
3693
|
+
/* @__PURE__ */ i($, { variant: "caption", children: e("Direction") }),
|
|
3694
|
+
/* @__PURE__ */ i(Pe, {}),
|
|
3695
3695
|
/* @__PURE__ */ w(
|
|
3696
|
-
|
|
3696
|
+
Vt,
|
|
3697
3697
|
{
|
|
3698
3698
|
value: c,
|
|
3699
|
-
onChange: (
|
|
3699
|
+
onChange: (A) => f(A.target.value),
|
|
3700
3700
|
children: [
|
|
3701
3701
|
/* @__PURE__ */ i(
|
|
3702
|
-
|
|
3702
|
+
$e,
|
|
3703
3703
|
{
|
|
3704
3704
|
value: "asc",
|
|
3705
|
-
control: /* @__PURE__ */ i(
|
|
3705
|
+
control: /* @__PURE__ */ i(Ke, {}),
|
|
3706
3706
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3707
3707
|
e("Ascending"),
|
|
3708
|
-
/* @__PURE__ */ i(
|
|
3708
|
+
/* @__PURE__ */ i(Pn, {})
|
|
3709
3709
|
] })
|
|
3710
3710
|
}
|
|
3711
3711
|
),
|
|
3712
3712
|
/* @__PURE__ */ i(
|
|
3713
|
-
|
|
3713
|
+
$e,
|
|
3714
3714
|
{
|
|
3715
3715
|
value: "desc",
|
|
3716
|
-
control: /* @__PURE__ */ i(
|
|
3716
|
+
control: /* @__PURE__ */ i(Ke, {}),
|
|
3717
3717
|
label: /* @__PURE__ */ w(B, { children: [
|
|
3718
3718
|
e("Descending"),
|
|
3719
|
-
/* @__PURE__ */ i(
|
|
3719
|
+
/* @__PURE__ */ i(vn, {})
|
|
3720
3720
|
] })
|
|
3721
3721
|
}
|
|
3722
3722
|
)
|
|
@@ -3724,21 +3724,21 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3724
3724
|
}
|
|
3725
3725
|
)
|
|
3726
3726
|
] }),
|
|
3727
|
-
/* @__PURE__ */ w(
|
|
3728
|
-
/* @__PURE__ */ i(
|
|
3729
|
-
/* @__PURE__ */ i(
|
|
3727
|
+
/* @__PURE__ */ w(kt, { children: [
|
|
3728
|
+
/* @__PURE__ */ i(M, { onClick: x, sx: { mr: "auto" }, children: e("Clear") }),
|
|
3729
|
+
/* @__PURE__ */ i(M, { onClick: g, variant: "contained", children: e("Apply") })
|
|
3730
3730
|
] })
|
|
3731
3731
|
] })
|
|
3732
3732
|
] });
|
|
3733
3733
|
}, Ka = ({ items: e, loading: t, children: n, error: r }) => {
|
|
3734
|
-
const s = te(), o = h.useMemo(() => W([]), [s, e]), [a] =
|
|
3734
|
+
const s = te(), o = h.useMemo(() => W([]), [s, e]), [a] = K(), l = a.get("tab") ?? "all", d = h.useMemo(() => [
|
|
3735
3735
|
{
|
|
3736
3736
|
key: s.getSchema().labeledBy,
|
|
3737
|
-
label:
|
|
3737
|
+
label: E.human(s.getSchema().labeledBy)
|
|
3738
3738
|
}
|
|
3739
|
-
], [s]), u = v(), c = h.useMemo(() => T("cms").getMassActions(s, l), [s, l]), f =
|
|
3739
|
+
], [s]), u = v(), c = h.useMemo(() => T("cms").getMassActions(s, l), [s, l]), f = At(
|
|
3740
3740
|
T("cms"),
|
|
3741
|
-
`model${
|
|
3741
|
+
`model${E.studly(s.getSchemaName())}Columns`,
|
|
3742
3742
|
d
|
|
3743
3743
|
), S = (u ? f.length : 1) + (c.length > 0 ? 2 : 1), b = {
|
|
3744
3744
|
columns: f,
|
|
@@ -3750,8 +3750,8 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3750
3750
|
error: r,
|
|
3751
3751
|
Model: s
|
|
3752
3752
|
};
|
|
3753
|
-
return /* @__PURE__ */ i(
|
|
3754
|
-
},
|
|
3753
|
+
return /* @__PURE__ */ i(Ht.Provider, { value: b, children: n });
|
|
3754
|
+
}, Ya = ({
|
|
3755
3755
|
items: e,
|
|
3756
3756
|
loading: t,
|
|
3757
3757
|
error: n,
|
|
@@ -3763,33 +3763,33 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3763
3763
|
items: e,
|
|
3764
3764
|
loading: t,
|
|
3765
3765
|
error: n,
|
|
3766
|
-
children: /* @__PURE__ */ i(
|
|
3766
|
+
children: /* @__PURE__ */ i(Wr, { component: Tt, children: /* @__PURE__ */ i(Vr, { ...s, children: r }) })
|
|
3767
3767
|
}
|
|
3768
|
-
),
|
|
3768
|
+
), Ja = ({ children: e, ...t }) => {
|
|
3769
3769
|
const {
|
|
3770
3770
|
massActions: n,
|
|
3771
3771
|
columns: r,
|
|
3772
3772
|
items: s
|
|
3773
|
-
} = ae(), o = v(), [a, l] =
|
|
3773
|
+
} = ae(), o = v(), [a, l] = K(), {
|
|
3774
3774
|
indeterminate: d,
|
|
3775
3775
|
allSelected: u,
|
|
3776
3776
|
handleSelectToggleAll: c
|
|
3777
|
-
} =
|
|
3777
|
+
} = zt(), {
|
|
3778
3778
|
["ModelIndex.Table.ShrinkedCell"]: f
|
|
3779
3779
|
} = T("cms").getComponents(), y = a.get("order_by") || "", [S, b] = y.split(":"), m = (g) => () => {
|
|
3780
|
-
l(S === g ? (
|
|
3781
|
-
const
|
|
3782
|
-
return b ? b === "desc" ? (
|
|
3783
|
-
} : (
|
|
3784
|
-
const
|
|
3785
|
-
return
|
|
3780
|
+
l(S === g ? (x) => {
|
|
3781
|
+
const A = new URLSearchParams(x);
|
|
3782
|
+
return b ? b === "desc" ? (A.delete("order_by"), A) : (A.set("order_by", `${g}:desc`), A) : (A.set("order_by", `${g}:asc`), A);
|
|
3783
|
+
} : (x) => {
|
|
3784
|
+
const A = new URLSearchParams(x);
|
|
3785
|
+
return A.set("order_by", `${g}:asc`), A;
|
|
3786
3786
|
});
|
|
3787
3787
|
};
|
|
3788
|
-
return /* @__PURE__ */ w(
|
|
3788
|
+
return /* @__PURE__ */ w($r, { ...t, children: [
|
|
3789
3789
|
e,
|
|
3790
3790
|
o && /* @__PURE__ */ w(fe, { children: [
|
|
3791
3791
|
n.length > 0 && /* @__PURE__ */ i(f, { children: /* @__PURE__ */ i(
|
|
3792
|
-
|
|
3792
|
+
Ot,
|
|
3793
3793
|
{
|
|
3794
3794
|
indeterminate: d,
|
|
3795
3795
|
checked: u,
|
|
@@ -3797,20 +3797,20 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3797
3797
|
disabled: s && s.count() === 0
|
|
3798
3798
|
}
|
|
3799
3799
|
) }),
|
|
3800
|
-
r.map(({ key: g, label:
|
|
3800
|
+
r.map(({ key: g, label: x, sortable: A = !0, ...k }) => /* @__PURE__ */ i(
|
|
3801
3801
|
ee,
|
|
3802
3802
|
{
|
|
3803
|
-
sortDirection:
|
|
3804
|
-
...
|
|
3803
|
+
sortDirection: A && S === g && b || !1,
|
|
3804
|
+
...k,
|
|
3805
3805
|
children: /* @__PURE__ */ w(
|
|
3806
|
-
|
|
3806
|
+
Kr,
|
|
3807
3807
|
{
|
|
3808
|
-
active:
|
|
3808
|
+
active: A && S === g,
|
|
3809
3809
|
direction: b,
|
|
3810
3810
|
onClick: m(g),
|
|
3811
3811
|
children: [
|
|
3812
|
-
|
|
3813
|
-
|
|
3812
|
+
x,
|
|
3813
|
+
A && S === g ? /* @__PURE__ */ i(V, { component: "span", sx: { visibility: "hidden", display: "none" }, children: b === "desc" ? "sorted descending" : "sorted ascending" }) : null
|
|
3814
3814
|
]
|
|
3815
3815
|
}
|
|
3816
3816
|
)
|
|
@@ -3820,24 +3820,24 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3820
3820
|
/* @__PURE__ */ i(f, {})
|
|
3821
3821
|
] })
|
|
3822
3822
|
] });
|
|
3823
|
-
},
|
|
3823
|
+
}, Ga = () => {
|
|
3824
3824
|
const {
|
|
3825
3825
|
massActions: e,
|
|
3826
3826
|
columns: t
|
|
3827
3827
|
} = ae(), n = v(), {
|
|
3828
3828
|
["ModelIndex.Table.ShrinkedCell"]: r
|
|
3829
|
-
} = T("cms").getComponents(), [s] =
|
|
3829
|
+
} = T("cms").getComponents(), [s] = K(), o = parseInt(s.get("per_page") || "15");
|
|
3830
3830
|
return /* @__PURE__ */ i(B, { children: Array.from({ length: o }).map((a, l) => /* @__PURE__ */ w(fe, { children: [
|
|
3831
|
-
e.length > 0 && /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(
|
|
3831
|
+
e.length > 0 && /* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(Ot, {}) }),
|
|
3832
3832
|
n && t.map(({ key: d, label: u, sortable: c, ...f }, y) => /* @__PURE__ */ i(ee, { ...f, children: /* @__PURE__ */ i(
|
|
3833
|
-
|
|
3833
|
+
$t,
|
|
3834
3834
|
{
|
|
3835
3835
|
variant: "text",
|
|
3836
3836
|
height: 24
|
|
3837
3837
|
}
|
|
3838
3838
|
) }, y)),
|
|
3839
3839
|
!n && /* @__PURE__ */ i(ee, { sx: { px: 0 }, children: Array.from({ length: t.length }).map((d, u) => /* @__PURE__ */ i(
|
|
3840
|
-
|
|
3840
|
+
$t,
|
|
3841
3841
|
{
|
|
3842
3842
|
variant: "text",
|
|
3843
3843
|
width: "100%",
|
|
@@ -3845,9 +3845,9 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3845
3845
|
},
|
|
3846
3846
|
u
|
|
3847
3847
|
)) }),
|
|
3848
|
-
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(
|
|
3848
|
+
/* @__PURE__ */ i(r, { children: /* @__PURE__ */ i(q, { children: /* @__PURE__ */ i(Rt, {}) }) })
|
|
3849
3849
|
] }, l)) });
|
|
3850
|
-
},
|
|
3850
|
+
}, Za = ({ children: e, ...t }) => {
|
|
3851
3851
|
const n = te(), { t: r } = L(), {
|
|
3852
3852
|
items: s,
|
|
3853
3853
|
loading: o,
|
|
@@ -3855,11 +3855,11 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3855
3855
|
} = ae(), {
|
|
3856
3856
|
["ModelIndex.StaticActions"]: l
|
|
3857
3857
|
} = T("cms").getComponents(), d = h.isValidElement(e) ? e : (s || W([])).map(e);
|
|
3858
|
-
return /* @__PURE__ */ w(
|
|
3859
|
-
o && /* @__PURE__ */ i(
|
|
3858
|
+
return /* @__PURE__ */ w(Yr, { ...t, children: [
|
|
3859
|
+
o && /* @__PURE__ */ i(Ga, {}),
|
|
3860
3860
|
d,
|
|
3861
3861
|
s && !s.count() && /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ w(ee, { colSpan: a, sx: { textAlign: "center", py: 10 }, children: [
|
|
3862
|
-
/* @__PURE__ */ i(
|
|
3862
|
+
/* @__PURE__ */ i($, { children: r("No :model found", {
|
|
3863
3863
|
model: n.plural().toLocaleLowerCase()
|
|
3864
3864
|
}) }),
|
|
3865
3865
|
/* @__PURE__ */ i("br", {}),
|
|
@@ -3867,19 +3867,19 @@ const _a = Z(xe)(({ theme: e }) => ({
|
|
|
3867
3867
|
] }) })
|
|
3868
3868
|
] });
|
|
3869
3869
|
};
|
|
3870
|
-
class
|
|
3870
|
+
class Xa {
|
|
3871
3871
|
getFacadeAccessor() {
|
|
3872
3872
|
return "cms";
|
|
3873
3873
|
}
|
|
3874
3874
|
}
|
|
3875
|
-
const I =
|
|
3875
|
+
const I = vt(Xa, wt), de = Z($)(() => ({
|
|
3876
3876
|
whiteSpace: "nowrap",
|
|
3877
3877
|
overflow: "hidden",
|
|
3878
3878
|
textOverflow: "ellipsis",
|
|
3879
3879
|
"& label": {
|
|
3880
3880
|
fontWeight: "bold"
|
|
3881
3881
|
}
|
|
3882
|
-
})),
|
|
3882
|
+
})), Qa = ({ content: e }) => ["string", "number"].includes(typeof e) ? /* @__PURE__ */ i(de, { children: e }) : e instanceof Date ? /* @__PURE__ */ i(de, { children: e.toLocaleString(se("app.locale", "en")) }) : typeof e == "object" && !h.isValidElement(e) ? /* @__PURE__ */ i(de, { children: JSON.stringify(e) }) : /* @__PURE__ */ i(h.Fragment, { children: e }), ei = ({ label: e, content: t }) => ["string", "number"].includes(typeof t) ? /* @__PURE__ */ w(de, { children: [
|
|
3883
3883
|
/* @__PURE__ */ w("label", { children: [
|
|
3884
3884
|
e,
|
|
3885
3885
|
":"
|
|
@@ -3900,23 +3900,23 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
3900
3900
|
" ",
|
|
3901
3901
|
JSON.stringify(t)
|
|
3902
3902
|
] }) : /* @__PURE__ */ w(h.Fragment, { children: [
|
|
3903
|
-
/* @__PURE__ */ i(
|
|
3903
|
+
/* @__PURE__ */ i($, { sx: { display: "inline" }, children: /* @__PURE__ */ w("b", { children: [
|
|
3904
3904
|
e,
|
|
3905
3905
|
":"
|
|
3906
3906
|
] }) }),
|
|
3907
3907
|
" ",
|
|
3908
3908
|
t
|
|
3909
|
-
] }),
|
|
3910
|
-
const n = v(), r =
|
|
3909
|
+
] }), ti = ({ item: e, ...t }) => {
|
|
3910
|
+
const n = v(), r = St(), s = te(), { massActions: o, columns: a } = ae(), l = h.useMemo(() => a.map((y) => ({
|
|
3911
3911
|
...y,
|
|
3912
|
-
content: I[`model${
|
|
3912
|
+
content: I[`model${E.studly(e.getType())}Get${E.studly(y.key)}Content`](e.getAttribute(y.key), e)
|
|
3913
3913
|
})), [a, e]), {
|
|
3914
3914
|
["ModelIndex.Table.ShrinkedCell"]: d,
|
|
3915
3915
|
["ModelIndex.InstanceActions"]: u
|
|
3916
3916
|
} = I.getComponents(), {
|
|
3917
3917
|
isSelected: c,
|
|
3918
3918
|
handleSelectToggle: f
|
|
3919
|
-
} =
|
|
3919
|
+
} = zt();
|
|
3920
3920
|
return /* @__PURE__ */ w(
|
|
3921
3921
|
fe,
|
|
3922
3922
|
{
|
|
@@ -3926,7 +3926,7 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
3926
3926
|
hover: !e.deletedAt,
|
|
3927
3927
|
children: [
|
|
3928
3928
|
o.length > 0 && /* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(
|
|
3929
|
-
|
|
3929
|
+
Ot,
|
|
3930
3930
|
{
|
|
3931
3931
|
checked: c(e),
|
|
3932
3932
|
onChange: () => f(e)
|
|
@@ -3937,10 +3937,10 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
3937
3937
|
{
|
|
3938
3938
|
...g,
|
|
3939
3939
|
onClick: () => {
|
|
3940
|
-
e.deletedAt || r(`/${
|
|
3940
|
+
e.deletedAt || r(`/${E.kebab(s.plural())}/${e.getKey()}`);
|
|
3941
3941
|
},
|
|
3942
3942
|
children: /* @__PURE__ */ i(
|
|
3943
|
-
|
|
3943
|
+
Qa,
|
|
3944
3944
|
{
|
|
3945
3945
|
label: S,
|
|
3946
3946
|
content: m
|
|
@@ -3954,16 +3954,16 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
3954
3954
|
{
|
|
3955
3955
|
sx: { maxWidth: 0, px: 0 },
|
|
3956
3956
|
onClick: () => {
|
|
3957
|
-
e.deletedAt || r(`/${
|
|
3957
|
+
e.deletedAt || r(`/${E.kebab(s.plural())}/${e.getKey()}`);
|
|
3958
3958
|
},
|
|
3959
|
-
children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(
|
|
3959
|
+
children: l.map(({ key: y, ...S }) => /* @__PURE__ */ i(ei, { ...S }, y))
|
|
3960
3960
|
}
|
|
3961
3961
|
),
|
|
3962
3962
|
/* @__PURE__ */ i(d, { children: /* @__PURE__ */ i(u, { item: e }) })
|
|
3963
3963
|
]
|
|
3964
3964
|
}
|
|
3965
3965
|
);
|
|
3966
|
-
},
|
|
3966
|
+
}, ni = ({ children: e, ...t }) => {
|
|
3967
3967
|
const {
|
|
3968
3968
|
columnCount: n
|
|
3969
3969
|
} = ae(), r = v(), s = H("breakpoint", "md"), {
|
|
@@ -3971,9 +3971,9 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
3971
3971
|
["ModelIndex.PaginationDetails"]: a,
|
|
3972
3972
|
["ModelIndex.PerPageSwitch"]: l
|
|
3973
3973
|
} = T("cms").getComponents();
|
|
3974
|
-
return /* @__PURE__ */ w(
|
|
3974
|
+
return /* @__PURE__ */ w(Jr, { ...t, children: [
|
|
3975
3975
|
/* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: n, children: /* @__PURE__ */ w(
|
|
3976
|
-
|
|
3976
|
+
N,
|
|
3977
3977
|
{
|
|
3978
3978
|
direction: r ? "row" : "column-reverse",
|
|
3979
3979
|
alignItems: "center",
|
|
@@ -3981,7 +3981,7 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
3981
3981
|
gap: 3,
|
|
3982
3982
|
children: [
|
|
3983
3983
|
/* @__PURE__ */ w(
|
|
3984
|
-
|
|
3984
|
+
N,
|
|
3985
3985
|
{
|
|
3986
3986
|
direction: r ? "row" : "column-reverse",
|
|
3987
3987
|
alignItems: r ? "center" : "flex-start",
|
|
@@ -4006,7 +4006,7 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
4006
4006
|
) }) }),
|
|
4007
4007
|
e
|
|
4008
4008
|
] });
|
|
4009
|
-
},
|
|
4009
|
+
}, ri = () => {
|
|
4010
4010
|
const {
|
|
4011
4011
|
columnCount: e
|
|
4012
4012
|
} = ae(), {
|
|
@@ -4017,14 +4017,14 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
4017
4017
|
// ['ModelIndex.PaginationDetails']: PaginationDetails,
|
|
4018
4018
|
} = T("cms").getComponents(), o = v(), a = H("breakpoint", "md");
|
|
4019
4019
|
return /* @__PURE__ */ i(fe, { children: /* @__PURE__ */ i(ee, { colSpan: e, sx: { p: 1 }, children: /* @__PURE__ */ w(
|
|
4020
|
-
|
|
4020
|
+
N,
|
|
4021
4021
|
{
|
|
4022
4022
|
direction: { xs: "column", [a]: "row" },
|
|
4023
4023
|
justifyContent: "space-between",
|
|
4024
4024
|
spacing: 1,
|
|
4025
4025
|
children: [
|
|
4026
4026
|
/* @__PURE__ */ w(
|
|
4027
|
-
|
|
4027
|
+
N,
|
|
4028
4028
|
{
|
|
4029
4029
|
direction: "row",
|
|
4030
4030
|
alignItems: "center",
|
|
@@ -4036,7 +4036,7 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
4036
4036
|
}
|
|
4037
4037
|
),
|
|
4038
4038
|
o && /* @__PURE__ */ i(
|
|
4039
|
-
|
|
4039
|
+
N,
|
|
4040
4040
|
{
|
|
4041
4041
|
direction: "row",
|
|
4042
4042
|
alignItems: "center",
|
|
@@ -4056,19 +4056,19 @@ const I = cs(Za, rr), de = Z(K)(() => ({
|
|
|
4056
4056
|
}
|
|
4057
4057
|
) }) });
|
|
4058
4058
|
};
|
|
4059
|
-
function
|
|
4060
|
-
const e = te(), { t } = L(), [n, r] =
|
|
4059
|
+
function si() {
|
|
4060
|
+
const e = te(), { t } = L(), [n, r] = K(), s = n.get("tab") || "all", o = (d, u) => {
|
|
4061
4061
|
r(() => {
|
|
4062
4062
|
const c = new URLSearchParams();
|
|
4063
4063
|
return u !== "all" && c.set("tab", u), c;
|
|
4064
4064
|
});
|
|
4065
|
-
}, a = h.useMemo(() => e.getSchema().softDeletes ? [{ label: t("Trashed"), value: "trashed" }] : [], [e, t]), l =
|
|
4065
|
+
}, a = h.useMemo(() => e.getSchema().softDeletes ? [{ label: t("Trashed"), value: "trashed" }] : [], [e, t]), l = At(
|
|
4066
4066
|
T("cms"),
|
|
4067
|
-
`model${
|
|
4067
|
+
`model${E.studly(e.getSchemaName())}Tabs`,
|
|
4068
4068
|
a
|
|
4069
4069
|
);
|
|
4070
4070
|
return l.length === 0 ? null : /* @__PURE__ */ i(V, { sx: { maxWidth: { xs: 320, sm: 480 }, bgcolor: "background.paper" }, children: /* @__PURE__ */ w(
|
|
4071
|
-
|
|
4071
|
+
Gr,
|
|
4072
4072
|
{
|
|
4073
4073
|
value: s,
|
|
4074
4074
|
onChange: o,
|
|
@@ -4078,14 +4078,14 @@ function ri() {
|
|
|
4078
4078
|
allowScrollButtonsMobile: !0,
|
|
4079
4079
|
children: [
|
|
4080
4080
|
/* @__PURE__ */ i(
|
|
4081
|
-
|
|
4081
|
+
Kt,
|
|
4082
4082
|
{
|
|
4083
4083
|
label: t("All"),
|
|
4084
4084
|
value: "all"
|
|
4085
4085
|
}
|
|
4086
4086
|
),
|
|
4087
4087
|
l.map((d) => /* @__PURE__ */ i(
|
|
4088
|
-
|
|
4088
|
+
Kt,
|
|
4089
4089
|
{
|
|
4090
4090
|
label: d.label,
|
|
4091
4091
|
value: d.value
|
|
@@ -4096,39 +4096,39 @@ function ri() {
|
|
|
4096
4096
|
}
|
|
4097
4097
|
) });
|
|
4098
4098
|
}
|
|
4099
|
-
function
|
|
4099
|
+
function oi(e) {
|
|
4100
4100
|
const {
|
|
4101
4101
|
parts: t,
|
|
4102
4102
|
...n
|
|
4103
4103
|
} = e;
|
|
4104
4104
|
return /* @__PURE__ */ w(
|
|
4105
|
-
|
|
4105
|
+
Zr,
|
|
4106
4106
|
{
|
|
4107
4107
|
"aria-label": "breadcrumb",
|
|
4108
4108
|
...n,
|
|
4109
4109
|
children: [
|
|
4110
4110
|
/* @__PURE__ */ i(
|
|
4111
|
-
|
|
4111
|
+
it,
|
|
4112
4112
|
{
|
|
4113
4113
|
underline: "hover",
|
|
4114
4114
|
color: "inherit",
|
|
4115
4115
|
to: "/",
|
|
4116
|
-
component:
|
|
4116
|
+
component: Re,
|
|
4117
4117
|
children: se("app.name", "Laravel")
|
|
4118
4118
|
}
|
|
4119
4119
|
),
|
|
4120
4120
|
t == null ? void 0 : t.map(({ name: r, href: s }, o) => s ? /* @__PURE__ */ i(
|
|
4121
|
-
|
|
4121
|
+
it,
|
|
4122
4122
|
{
|
|
4123
4123
|
underline: "hover",
|
|
4124
4124
|
color: "inherit",
|
|
4125
4125
|
to: s,
|
|
4126
|
-
component:
|
|
4126
|
+
component: Re,
|
|
4127
4127
|
children: r
|
|
4128
4128
|
},
|
|
4129
4129
|
o
|
|
4130
4130
|
) : /* @__PURE__ */ i(
|
|
4131
|
-
|
|
4131
|
+
$,
|
|
4132
4132
|
{
|
|
4133
4133
|
color: "text.primary",
|
|
4134
4134
|
children: r
|
|
@@ -4139,32 +4139,32 @@ function si(e) {
|
|
|
4139
4139
|
}
|
|
4140
4140
|
);
|
|
4141
4141
|
}
|
|
4142
|
-
const
|
|
4142
|
+
const fr = ({
|
|
4143
4143
|
collapsed: e = !1,
|
|
4144
4144
|
items: t,
|
|
4145
4145
|
onClick: n,
|
|
4146
4146
|
...r
|
|
4147
4147
|
}) => {
|
|
4148
4148
|
const [s, o] = h.useState(null), [a, l] = h.useState(null), [d, u] = h.useState({}), c = H("drawer.width", 280), f = T("cms").getComponent("RecursiveMenu");
|
|
4149
|
-
return /* @__PURE__ */ w(
|
|
4149
|
+
return /* @__PURE__ */ w(Xr, { ...r, children: [
|
|
4150
4150
|
t.map((y) => {
|
|
4151
4151
|
const {
|
|
4152
4152
|
text: S,
|
|
4153
4153
|
icon: b,
|
|
4154
4154
|
element: m = null,
|
|
4155
4155
|
key: g,
|
|
4156
|
-
children:
|
|
4157
|
-
to:
|
|
4158
|
-
onClick:
|
|
4156
|
+
children: x,
|
|
4157
|
+
to: A,
|
|
4158
|
+
onClick: k
|
|
4159
4159
|
} = y;
|
|
4160
4160
|
return m || /* @__PURE__ */ w(
|
|
4161
|
-
|
|
4161
|
+
Qr,
|
|
4162
4162
|
{
|
|
4163
4163
|
disablePadding: !0,
|
|
4164
4164
|
sx: { display: "block" },
|
|
4165
4165
|
children: [
|
|
4166
4166
|
/* @__PURE__ */ w(
|
|
4167
|
-
|
|
4167
|
+
es,
|
|
4168
4168
|
{
|
|
4169
4169
|
sx: {
|
|
4170
4170
|
minHeight: 48,
|
|
@@ -4172,9 +4172,9 @@ const Xn = ({
|
|
|
4172
4172
|
px: 2.5
|
|
4173
4173
|
},
|
|
4174
4174
|
onClick: (P) => {
|
|
4175
|
-
if (
|
|
4175
|
+
if (k && k(P), x) {
|
|
4176
4176
|
if (e) {
|
|
4177
|
-
l(() => (o(P.currentTarget),
|
|
4177
|
+
l(() => (o(P.currentTarget), x));
|
|
4178
4178
|
return;
|
|
4179
4179
|
}
|
|
4180
4180
|
u({
|
|
@@ -4185,10 +4185,10 @@ const Xn = ({
|
|
|
4185
4185
|
}
|
|
4186
4186
|
n && n(P);
|
|
4187
4187
|
},
|
|
4188
|
-
...
|
|
4188
|
+
...A ? { to: A, component: We } : {},
|
|
4189
4189
|
children: [
|
|
4190
4190
|
/* @__PURE__ */ w(
|
|
4191
|
-
|
|
4191
|
+
wn,
|
|
4192
4192
|
{
|
|
4193
4193
|
sx: {
|
|
4194
4194
|
minWidth: 0,
|
|
@@ -4201,7 +4201,7 @@ const Xn = ({
|
|
|
4201
4201
|
children: [
|
|
4202
4202
|
b,
|
|
4203
4203
|
e && /* @__PURE__ */ i(
|
|
4204
|
-
|
|
4204
|
+
$,
|
|
4205
4205
|
{
|
|
4206
4206
|
fontSize: 10,
|
|
4207
4207
|
sx: { mt: 0.5 },
|
|
@@ -4211,21 +4211,21 @@ const Xn = ({
|
|
|
4211
4211
|
]
|
|
4212
4212
|
}
|
|
4213
4213
|
),
|
|
4214
|
-
!e && /* @__PURE__ */ i(
|
|
4215
|
-
!e &&
|
|
4214
|
+
!e && /* @__PURE__ */ i(Sn, { primary: S }),
|
|
4215
|
+
!e && x && (d[g] ? /* @__PURE__ */ i(Fn, {}) : /* @__PURE__ */ i(Bn, {}))
|
|
4216
4216
|
]
|
|
4217
4217
|
}
|
|
4218
4218
|
),
|
|
4219
|
-
|
|
4220
|
-
|
|
4219
|
+
x && !e && /* @__PURE__ */ i(
|
|
4220
|
+
yn,
|
|
4221
4221
|
{
|
|
4222
4222
|
in: d[g],
|
|
4223
4223
|
timeout: "auto",
|
|
4224
4224
|
unmountOnExit: !0,
|
|
4225
4225
|
children: /* @__PURE__ */ i(
|
|
4226
|
-
|
|
4226
|
+
fr,
|
|
4227
4227
|
{
|
|
4228
|
-
items:
|
|
4228
|
+
items: x,
|
|
4229
4229
|
onClick: n,
|
|
4230
4230
|
collapsed: e,
|
|
4231
4231
|
sx: { pl: e ? 0 : 2, pb: 0 }
|
|
@@ -4255,7 +4255,7 @@ const Xn = ({
|
|
|
4255
4255
|
}
|
|
4256
4256
|
)
|
|
4257
4257
|
] });
|
|
4258
|
-
},
|
|
4258
|
+
}, pr = ({
|
|
4259
4259
|
collapsed: e = !1,
|
|
4260
4260
|
items: t,
|
|
4261
4261
|
onClick: n,
|
|
@@ -4263,7 +4263,7 @@ const Xn = ({
|
|
|
4263
4263
|
}) => {
|
|
4264
4264
|
const [s, o] = h.useState({}), a = H("drawer.width", 280);
|
|
4265
4265
|
return /* @__PURE__ */ w(B, { children: [
|
|
4266
|
-
/* @__PURE__ */ i(
|
|
4266
|
+
/* @__PURE__ */ i(An, { ...r, children: t.map((l) => {
|
|
4267
4267
|
const {
|
|
4268
4268
|
text: d,
|
|
4269
4269
|
icon: u,
|
|
@@ -4287,13 +4287,13 @@ const Xn = ({
|
|
|
4287
4287
|
n && n(m);
|
|
4288
4288
|
},
|
|
4289
4289
|
...b ? {
|
|
4290
|
-
component:
|
|
4290
|
+
component: We,
|
|
4291
4291
|
to: b
|
|
4292
4292
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4293
4293
|
} : {},
|
|
4294
4294
|
children: [
|
|
4295
4295
|
u && /* @__PURE__ */ i(
|
|
4296
|
-
|
|
4296
|
+
wn,
|
|
4297
4297
|
{
|
|
4298
4298
|
sx: {
|
|
4299
4299
|
minWidth: 0,
|
|
@@ -4304,8 +4304,8 @@ const Xn = ({
|
|
|
4304
4304
|
children: u
|
|
4305
4305
|
}
|
|
4306
4306
|
),
|
|
4307
|
-
/* @__PURE__ */ i(
|
|
4308
|
-
!e && y && /* @__PURE__ */ i(
|
|
4307
|
+
/* @__PURE__ */ i(Sn, { sx: { opacity: e ? 0 : 1 }, children: d }),
|
|
4308
|
+
!e && y && /* @__PURE__ */ i(je, {})
|
|
4309
4309
|
]
|
|
4310
4310
|
},
|
|
4311
4311
|
f
|
|
@@ -4314,7 +4314,7 @@ const Xn = ({
|
|
|
4314
4314
|
t.map((l) => {
|
|
4315
4315
|
const { key: d, children: u } = l;
|
|
4316
4316
|
return u ? /* @__PURE__ */ i(
|
|
4317
|
-
|
|
4317
|
+
pr,
|
|
4318
4318
|
{
|
|
4319
4319
|
items: u,
|
|
4320
4320
|
onClick: n,
|
|
@@ -4330,21 +4330,21 @@ const Xn = ({
|
|
|
4330
4330
|
) : null;
|
|
4331
4331
|
})
|
|
4332
4332
|
] });
|
|
4333
|
-
},
|
|
4333
|
+
}, rt = {
|
|
4334
4334
|
delete: (e) => async ({ selected: t, notify: n, dialog: r, refresh: s, t: o }) => {
|
|
4335
4335
|
const a = e.getSchema().softDeletes ? "send to trash" : "delete permanently", l = e.getSchema().softDeletes ? "sent to trash" : "deleted";
|
|
4336
4336
|
if (await r({
|
|
4337
4337
|
title: e.getSchema().softDeletes ? o("Confirm send to trash") : o("Confirm delete permanently"),
|
|
4338
4338
|
message: o(`Are you sure you want to ${a} :count :model?`, {
|
|
4339
4339
|
count: t.count(),
|
|
4340
|
-
model:
|
|
4340
|
+
model: E.lcfirst(t.count() === 1 ? e.singular() : e.plural())
|
|
4341
4341
|
}),
|
|
4342
4342
|
type: "confirm"
|
|
4343
4343
|
}))
|
|
4344
4344
|
try {
|
|
4345
4345
|
await e.delete(t.pluck(e.getSchema().primaryKey).all()), n(o(`Successfully ${l} :count :model`, {
|
|
4346
4346
|
count: t.count(),
|
|
4347
|
-
model:
|
|
4347
|
+
model: E.lcfirst(t.count() === 1 ? e.singular() : e.plural())
|
|
4348
4348
|
})), s();
|
|
4349
4349
|
} catch (u) {
|
|
4350
4350
|
ce(n)(u);
|
|
@@ -4355,14 +4355,14 @@ const Xn = ({
|
|
|
4355
4355
|
title: o("Confirm restore"),
|
|
4356
4356
|
message: o("Are you sure you want to restore :count :model?", {
|
|
4357
4357
|
count: t.count(),
|
|
4358
|
-
model:
|
|
4358
|
+
model: E.lcfirst(t.count() === 1 ? e.singular() : e.plural())
|
|
4359
4359
|
}),
|
|
4360
4360
|
type: "confirm"
|
|
4361
4361
|
}))
|
|
4362
4362
|
try {
|
|
4363
4363
|
await e.restore(t.pluck(e.getSchema().primaryKey).all()), n(o("Successfully restored :count :model", {
|
|
4364
4364
|
count: t.count(),
|
|
4365
|
-
model:
|
|
4365
|
+
model: E.lcfirst(t.count() === 1 ? e.singular() : e.plural())
|
|
4366
4366
|
})), s();
|
|
4367
4367
|
} catch (l) {
|
|
4368
4368
|
ce(n)(l);
|
|
@@ -4373,26 +4373,26 @@ const Xn = ({
|
|
|
4373
4373
|
title: o("Confirm permanent deletion"),
|
|
4374
4374
|
message: o("Are you sure you want to delete permanently :count :model?", {
|
|
4375
4375
|
count: t.count(),
|
|
4376
|
-
model:
|
|
4376
|
+
model: E.lcfirst(t.count() === 1 ? e.singular() : e.plural())
|
|
4377
4377
|
}),
|
|
4378
4378
|
type: "confirm"
|
|
4379
4379
|
}))
|
|
4380
4380
|
try {
|
|
4381
4381
|
await e.forceDelete(t.pluck(e.getSchema().primaryKey).all()), n(o("Successfully deleted :count :model", {
|
|
4382
4382
|
count: t.count(),
|
|
4383
|
-
model:
|
|
4383
|
+
model: E.lcfirst(t.count() === 1 ? e.singular() : e.plural())
|
|
4384
4384
|
})), s();
|
|
4385
4385
|
} catch (l) {
|
|
4386
4386
|
ce(n)(l);
|
|
4387
4387
|
}
|
|
4388
4388
|
}
|
|
4389
|
-
},
|
|
4389
|
+
}, st = {
|
|
4390
4390
|
delete: (e) => async ({ item: t, notify: n, dialog: r, refresh: s, t: o }) => {
|
|
4391
4391
|
const a = e.getSchema().softDeletes ? "send :model “:label” to trash" : "delete :model “:label” permanently", l = e.getSchema().softDeletes ? "sent :model “:label” to trash" : "deleted :model “:label”";
|
|
4392
4392
|
if (await r({
|
|
4393
4393
|
title: e.getSchema().softDeletes ? o("Confirm send to trash") : o("Confirm permanent deletion"),
|
|
4394
4394
|
message: o(`Are you sure you want to ${a}?`, {
|
|
4395
|
-
model:
|
|
4395
|
+
model: E.lcfirst(e.singular()),
|
|
4396
4396
|
label: t.getLabel()
|
|
4397
4397
|
}),
|
|
4398
4398
|
type: "confirm"
|
|
@@ -4410,7 +4410,7 @@ const Xn = ({
|
|
|
4410
4410
|
if (await r({
|
|
4411
4411
|
title: o("Confirm restore"),
|
|
4412
4412
|
message: o("Are you sure you want to restore :model “:label”?", {
|
|
4413
|
-
model:
|
|
4413
|
+
model: E.lcfirst(e.singular()),
|
|
4414
4414
|
label: t.getLabel()
|
|
4415
4415
|
}),
|
|
4416
4416
|
type: "confirm"
|
|
@@ -4428,7 +4428,7 @@ const Xn = ({
|
|
|
4428
4428
|
if (await r({
|
|
4429
4429
|
title: o("Confirm permanent deletion"),
|
|
4430
4430
|
message: o("Are you sure you want to delete :model “:label” permanently?", {
|
|
4431
|
-
model:
|
|
4431
|
+
model: E.lcfirst(e.singular()),
|
|
4432
4432
|
label: t.getLabel()
|
|
4433
4433
|
}),
|
|
4434
4434
|
type: "confirm"
|
|
@@ -4442,12 +4442,12 @@ const Xn = ({
|
|
|
4442
4442
|
ce(n)(l);
|
|
4443
4443
|
}
|
|
4444
4444
|
}
|
|
4445
|
-
},
|
|
4445
|
+
}, ai = {
|
|
4446
4446
|
create: (e) => ({ navigate: t }) => {
|
|
4447
|
-
t(`/${
|
|
4447
|
+
t(`/${E.kebab(e.plural())}/create`);
|
|
4448
4448
|
}
|
|
4449
|
-
},
|
|
4450
|
-
const t =
|
|
4449
|
+
}, ii = ({ item: e }) => {
|
|
4450
|
+
const t = Ut(), [n] = K(), r = n.get("tab") ?? "all", s = h.useMemo(() => T("cms").getInstanceActions(e.constructor, r), [e, r]), [o, a] = h.useState(null), l = !!o, d = (c) => {
|
|
4451
4451
|
a(c.currentTarget);
|
|
4452
4452
|
}, u = () => {
|
|
4453
4453
|
a(null);
|
|
@@ -4459,11 +4459,11 @@ const Xn = ({
|
|
|
4459
4459
|
"aria-describedby": "model-item-actions",
|
|
4460
4460
|
"aria-label": "filter",
|
|
4461
4461
|
onClick: d,
|
|
4462
|
-
children: /* @__PURE__ */ i(
|
|
4462
|
+
children: /* @__PURE__ */ i(Rt, {})
|
|
4463
4463
|
}
|
|
4464
4464
|
),
|
|
4465
4465
|
/* @__PURE__ */ i(
|
|
4466
|
-
|
|
4466
|
+
An,
|
|
4467
4467
|
{
|
|
4468
4468
|
id: "model-item-actions",
|
|
4469
4469
|
anchorEl: o,
|
|
@@ -4493,7 +4493,7 @@ const Xn = ({
|
|
|
4493
4493
|
)
|
|
4494
4494
|
] });
|
|
4495
4495
|
};
|
|
4496
|
-
class
|
|
4496
|
+
class li {
|
|
4497
4497
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4498
4498
|
getComponents() {
|
|
4499
4499
|
return this.componentMap({});
|
|
@@ -4512,29 +4512,29 @@ class ii {
|
|
|
4512
4512
|
return this.wireModelFormProps({}, t);
|
|
4513
4513
|
}
|
|
4514
4514
|
getMassActions(t, n) {
|
|
4515
|
-
return this[`mass${
|
|
4515
|
+
return this[`mass${E.studly(t.getSchemaName())}Actions`](
|
|
4516
4516
|
this.massActions([], t, n),
|
|
4517
4517
|
t,
|
|
4518
4518
|
n
|
|
4519
4519
|
);
|
|
4520
4520
|
}
|
|
4521
4521
|
getInstanceActions(t, n) {
|
|
4522
|
-
return this[`instance${
|
|
4522
|
+
return this[`instance${E.studly(t.getSchemaName())}Actions`](
|
|
4523
4523
|
this.instanceActions([], t, n),
|
|
4524
4524
|
t,
|
|
4525
4525
|
n
|
|
4526
4526
|
);
|
|
4527
4527
|
}
|
|
4528
4528
|
getStaticActions(t, n) {
|
|
4529
|
-
return this[`static${
|
|
4529
|
+
return this[`static${E.studly(t.getSchemaName())}Actions`](
|
|
4530
4530
|
this.staticActions([], t, n),
|
|
4531
4531
|
t,
|
|
4532
4532
|
n
|
|
4533
4533
|
);
|
|
4534
4534
|
}
|
|
4535
4535
|
}
|
|
4536
|
-
const
|
|
4537
|
-
class
|
|
4536
|
+
const ci = In(li), be = (e) => !(typeof e > "u" || e === null || G.isEmpty(e));
|
|
4537
|
+
class ui {
|
|
4538
4538
|
getInputType(t) {
|
|
4539
4539
|
switch (t) {
|
|
4540
4540
|
case "int":
|
|
@@ -4588,7 +4588,7 @@ class ci {
|
|
|
4588
4588
|
r = "<=";
|
|
4589
4589
|
break;
|
|
4590
4590
|
default:
|
|
4591
|
-
r =
|
|
4591
|
+
r = E.human(r);
|
|
4592
4592
|
break;
|
|
4593
4593
|
}
|
|
4594
4594
|
return {
|
|
@@ -4604,7 +4604,7 @@ class ci {
|
|
|
4604
4604
|
let o = s.phpType ?? "string";
|
|
4605
4605
|
return s.cast !== null && !G.isEmpty(s.cast) && (o = s.cast), {
|
|
4606
4606
|
key: s.name,
|
|
4607
|
-
label:
|
|
4607
|
+
label: E.human(s.name),
|
|
4608
4608
|
type: o,
|
|
4609
4609
|
nullable: s.nullable,
|
|
4610
4610
|
is_relation: !1
|
|
@@ -4615,7 +4615,7 @@ class ci {
|
|
|
4615
4615
|
...s,
|
|
4616
4616
|
{
|
|
4617
4617
|
key: o,
|
|
4618
|
-
label:
|
|
4618
|
+
label: E.human(o),
|
|
4619
4619
|
type: "autocomplete",
|
|
4620
4620
|
nullable: !1,
|
|
4621
4621
|
is_relation: !0
|
|
@@ -4636,28 +4636,101 @@ class ci {
|
|
|
4636
4636
|
}).includes(!0));
|
|
4637
4637
|
}
|
|
4638
4638
|
}
|
|
4639
|
-
const
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
}
|
|
4645
|
-
boot() {
|
|
4646
|
-
this.bootComponents(), this.bootRoutes(), this.bootMenu(), this.bootMassActions(), this.bootInstanceActions(), this.bootStaticActions(), Fe.applyUserDefaults && this.bootDefaultUserModifiers();
|
|
4647
|
-
}
|
|
4648
|
-
bootModels() {
|
|
4649
|
-
Qe.reducer(
|
|
4639
|
+
const di = In(ui);
|
|
4640
|
+
class fi {
|
|
4641
|
+
constructor() {
|
|
4642
|
+
Ve(this, "icons", []);
|
|
4643
|
+
Oe.reducer(
|
|
4650
4644
|
"model",
|
|
4651
|
-
(t
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
|
|
4645
|
+
(t) => {
|
|
4646
|
+
const n = this;
|
|
4647
|
+
return class extends t {
|
|
4648
|
+
static icon() {
|
|
4649
|
+
return n.render("CategoryOutlined");
|
|
4650
|
+
}
|
|
4651
|
+
};
|
|
4655
4652
|
},
|
|
4656
4653
|
0
|
|
4657
4654
|
);
|
|
4658
4655
|
}
|
|
4656
|
+
forModel(t, n) {
|
|
4657
|
+
Oe.reducer(`model${E.studly(t)}`, (r) => {
|
|
4658
|
+
const s = this;
|
|
4659
|
+
return class extends r {
|
|
4660
|
+
static icon() {
|
|
4661
|
+
return s.render(n);
|
|
4662
|
+
}
|
|
4663
|
+
};
|
|
4664
|
+
});
|
|
4665
|
+
}
|
|
4666
|
+
registerIcon(t, n) {
|
|
4667
|
+
typeof t == "string" && n ? this.icons.push({ name: t, component: n }) : Object.entries(t).forEach(([r, s]) => {
|
|
4668
|
+
this.icons.push({ name: r, component: s });
|
|
4669
|
+
});
|
|
4670
|
+
}
|
|
4671
|
+
make(t) {
|
|
4672
|
+
return this.icons.find((n) => n.name === t).component;
|
|
4673
|
+
}
|
|
4674
|
+
render(t, n = {}) {
|
|
4675
|
+
const r = this.make(t);
|
|
4676
|
+
return r ? /* @__PURE__ */ i(r, { ...n }) : null;
|
|
4677
|
+
}
|
|
4678
|
+
}
|
|
4679
|
+
class pi {
|
|
4680
|
+
getFacadeAccessor() {
|
|
4681
|
+
return "icon";
|
|
4682
|
+
}
|
|
4683
|
+
}
|
|
4684
|
+
const ke = vt(pi, wt), Le = class Le extends Mn {
|
|
4685
|
+
register() {
|
|
4686
|
+
this.app.singleton("cms", () => new ci()), this.app.singleton("filter", () => new di()), this.app.singleton("icon", () => new fi()), this.registerIcons();
|
|
4687
|
+
}
|
|
4688
|
+
boot() {
|
|
4689
|
+
this.bootComponents(), this.bootRoutes(), this.bootMenu(), this.bootMassActions(), this.bootInstanceActions(), this.bootStaticActions(), Le.applyUserDefaults && this.bootDefaultUserModifiers();
|
|
4690
|
+
}
|
|
4691
|
+
// private addIconsToModels() {
|
|
4692
|
+
// Model.reducer(
|
|
4693
|
+
// 'model',
|
|
4694
|
+
// (Base, abstract) => {
|
|
4695
|
+
// return class extends Base {
|
|
4696
|
+
// static icon() {
|
|
4697
|
+
// if (abstract === 'user') {
|
|
4698
|
+
// return Icon.render('PeopleOutlined');
|
|
4699
|
+
// }
|
|
4700
|
+
// return Icon.render('CategoryOutlined');
|
|
4701
|
+
// }
|
|
4702
|
+
// }
|
|
4703
|
+
// },
|
|
4704
|
+
// 0
|
|
4705
|
+
// );
|
|
4706
|
+
// }
|
|
4707
|
+
registerIcons() {
|
|
4708
|
+
ke.registerIcon({
|
|
4709
|
+
Add: ss,
|
|
4710
|
+
AddCircleOutline: En,
|
|
4711
|
+
ArrowDownward: vn,
|
|
4712
|
+
ArrowDropDown: Cn,
|
|
4713
|
+
ArrowUpward: Pn,
|
|
4714
|
+
CategoryOutlined: os,
|
|
4715
|
+
ChevronLeft: Ne,
|
|
4716
|
+
ChevronRight: je,
|
|
4717
|
+
Close: Me,
|
|
4718
|
+
DashboardOutlined: as,
|
|
4719
|
+
ExpandLess: Fn,
|
|
4720
|
+
ExpandMore: Bn,
|
|
4721
|
+
FilterList: kn,
|
|
4722
|
+
FirstPage: On,
|
|
4723
|
+
HighlightOffOutlined: lt,
|
|
4724
|
+
LastPage: Dn,
|
|
4725
|
+
Menu: Tn,
|
|
4726
|
+
MoreVert: Rt,
|
|
4727
|
+
PeopleOutlined: is,
|
|
4728
|
+
Search: ct,
|
|
4729
|
+
SwapVert: Rn
|
|
4730
|
+
}), ke.forModel("user", "PeopleOutlined");
|
|
4731
|
+
}
|
|
4659
4732
|
bootRoutes() {
|
|
4660
|
-
I.reducer("cmsRoutes",
|
|
4733
|
+
I.reducer("cmsRoutes", ys, 0), br.reducer("domRouterOptions", (t) => ({
|
|
4661
4734
|
...t,
|
|
4662
4735
|
basename: re.get("luminix.admin.url", "/admin")
|
|
4663
4736
|
}));
|
|
@@ -4665,35 +4738,35 @@ const ui = xn(ci), Fe = class Fe extends An {
|
|
|
4665
4738
|
bootComponents() {
|
|
4666
4739
|
I.reducer("componentMap", () => ({
|
|
4667
4740
|
Layout: xs,
|
|
4668
|
-
Dashboard:
|
|
4669
|
-
ModelIndex:
|
|
4670
|
-
ModelItem:
|
|
4671
|
-
Error:
|
|
4741
|
+
Dashboard: ws,
|
|
4742
|
+
ModelIndex: Es,
|
|
4743
|
+
ModelItem: oa,
|
|
4744
|
+
Error: Ss,
|
|
4672
4745
|
DesktopPageTitle: xa,
|
|
4673
|
-
RecursiveList:
|
|
4674
|
-
RecursiveMenu:
|
|
4675
|
-
Breadcrumbs:
|
|
4676
|
-
"Layout.AppBar":
|
|
4677
|
-
"Layout.Drawer":
|
|
4678
|
-
"Layout.AppBar.MenuButton":
|
|
4679
|
-
"Layout.SearchBar":
|
|
4680
|
-
"Layout.BackButton":
|
|
4681
|
-
"ModelIndex.Filter":
|
|
4682
|
-
"ModelIndex.InstanceActions":
|
|
4683
|
-
"ModelIndex.MassActions":
|
|
4684
|
-
"ModelIndex.Pagination":
|
|
4685
|
-
"ModelIndex.PaginationDetails":
|
|
4686
|
-
"ModelIndex.PerPageSwitch":
|
|
4687
|
-
"ModelIndex.Sort":
|
|
4688
|
-
"ModelIndex.StaticActions":
|
|
4689
|
-
"ModelIndex.Table":
|
|
4690
|
-
"ModelIndex.Table.TableHead":
|
|
4691
|
-
"ModelIndex.Table.TableBody":
|
|
4692
|
-
"ModelIndex.Table.TableFooter":
|
|
4693
|
-
"ModelIndex.Table.TableToolbar":
|
|
4694
|
-
"ModelIndex.Table.TableBody.TableRow":
|
|
4695
|
-
"ModelIndex.Table.ShrinkedCell":
|
|
4696
|
-
"ModelIndex.Tabs":
|
|
4746
|
+
RecursiveList: fr,
|
|
4747
|
+
RecursiveMenu: pr,
|
|
4748
|
+
Breadcrumbs: oi,
|
|
4749
|
+
"Layout.AppBar": ga,
|
|
4750
|
+
"Layout.Drawer": Aa,
|
|
4751
|
+
"Layout.AppBar.MenuButton": Ma,
|
|
4752
|
+
"Layout.SearchBar": Wa,
|
|
4753
|
+
"Layout.BackButton": ba,
|
|
4754
|
+
"ModelIndex.Filter": La,
|
|
4755
|
+
"ModelIndex.InstanceActions": ii,
|
|
4756
|
+
"ModelIndex.MassActions": Ia,
|
|
4757
|
+
"ModelIndex.Pagination": ja,
|
|
4758
|
+
"ModelIndex.PaginationDetails": Ua,
|
|
4759
|
+
"ModelIndex.PerPageSwitch": qa,
|
|
4760
|
+
"ModelIndex.Sort": $a,
|
|
4761
|
+
"ModelIndex.StaticActions": ua,
|
|
4762
|
+
"ModelIndex.Table": Ya,
|
|
4763
|
+
"ModelIndex.Table.TableHead": Ja,
|
|
4764
|
+
"ModelIndex.Table.TableBody": Za,
|
|
4765
|
+
"ModelIndex.Table.TableFooter": ni,
|
|
4766
|
+
"ModelIndex.Table.TableToolbar": ri,
|
|
4767
|
+
"ModelIndex.Table.TableBody.TableRow": ti,
|
|
4768
|
+
"ModelIndex.Table.ShrinkedCell": Va,
|
|
4769
|
+
"ModelIndex.Tabs": si
|
|
4697
4770
|
}), 0);
|
|
4698
4771
|
}
|
|
4699
4772
|
bootMenu() {
|
|
@@ -4703,12 +4776,12 @@ const ui = xn(ci), Fe = class Fe extends An {
|
|
|
4703
4776
|
key: "dashboard",
|
|
4704
4777
|
text: "Dashboard",
|
|
4705
4778
|
to: "/",
|
|
4706
|
-
icon:
|
|
4779
|
+
icon: ke.render("DashboardOutlined")
|
|
4707
4780
|
},
|
|
4708
4781
|
...Object.entries(n).sort(([r], [s]) => r.localeCompare(s)).map(([r, s]) => ({
|
|
4709
4782
|
key: r,
|
|
4710
4783
|
text: s.plural(),
|
|
4711
|
-
to: "/" +
|
|
4784
|
+
to: "/" + E.kebab(s.plural()),
|
|
4712
4785
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4713
4786
|
icon: s.icon()
|
|
4714
4787
|
}))
|
|
@@ -4745,15 +4818,15 @@ const ui = xn(ci), Fe = class Fe extends An {
|
|
|
4745
4818
|
return r !== "trashed" ? s.push({
|
|
4746
4819
|
key: "delete",
|
|
4747
4820
|
label: o ? "Send to trash" : "Delete permanently",
|
|
4748
|
-
callback:
|
|
4821
|
+
callback: rt.delete(n)
|
|
4749
4822
|
}) : (s.push({
|
|
4750
4823
|
key: "restore",
|
|
4751
4824
|
label: "Restore",
|
|
4752
|
-
callback:
|
|
4825
|
+
callback: rt.restore(n)
|
|
4753
4826
|
}), s.push({
|
|
4754
4827
|
key: "forceDelete",
|
|
4755
4828
|
label: "Delete permanently",
|
|
4756
|
-
callback:
|
|
4829
|
+
callback: rt.forceDelete(n)
|
|
4757
4830
|
})), [
|
|
4758
4831
|
...t,
|
|
4759
4832
|
...s
|
|
@@ -4765,13 +4838,13 @@ const ui = xn(ci), Fe = class Fe extends An {
|
|
|
4765
4838
|
const s = [], { softDeletes: o } = n.getSchema();
|
|
4766
4839
|
return r !== "trashed" ? s.push({
|
|
4767
4840
|
label: o ? "Send to trash" : "Delete permanently",
|
|
4768
|
-
callback:
|
|
4841
|
+
callback: st.delete(n)
|
|
4769
4842
|
}) : (s.push({
|
|
4770
4843
|
label: "Restore",
|
|
4771
|
-
callback:
|
|
4844
|
+
callback: st.restore(n)
|
|
4772
4845
|
}), s.push({
|
|
4773
4846
|
label: "Delete permanently",
|
|
4774
|
-
callback:
|
|
4847
|
+
callback: st.forceDelete(n)
|
|
4775
4848
|
})), [
|
|
4776
4849
|
...t,
|
|
4777
4850
|
...s
|
|
@@ -4784,15 +4857,15 @@ const ui = xn(ci), Fe = class Fe extends An {
|
|
|
4784
4857
|
{
|
|
4785
4858
|
key: "create",
|
|
4786
4859
|
label: `Create ${n.singular()}`,
|
|
4787
|
-
callback:
|
|
4788
|
-
icon:
|
|
4860
|
+
callback: ai.create(n),
|
|
4861
|
+
icon: ke.render("Add")
|
|
4789
4862
|
}
|
|
4790
4863
|
], 0);
|
|
4791
4864
|
}
|
|
4792
4865
|
};
|
|
4793
|
-
|
|
4794
|
-
let
|
|
4795
|
-
class
|
|
4866
|
+
Ve(Le, "applyUserDefaults", !0);
|
|
4867
|
+
let yt = Le;
|
|
4868
|
+
class hi extends Mn {
|
|
4796
4869
|
register() {
|
|
4797
4870
|
this.app.once("booting", () => {
|
|
4798
4871
|
this.initI18Next(), this.translateModelNames();
|
|
@@ -4802,7 +4875,7 @@ class di extends An {
|
|
|
4802
4875
|
this.translateModelColumns(), this.translateMenuEntries(), this.translateInstanceActions(), this.translateMassActions(), this.translateFormLabels(), this.translateStaticActions();
|
|
4803
4876
|
}
|
|
4804
4877
|
initI18Next() {
|
|
4805
|
-
J.use(
|
|
4878
|
+
J.use(rs).init({
|
|
4806
4879
|
lng: re.get("app.locale", "en"),
|
|
4807
4880
|
fallbackLng: re.get("app.fallback_locale", "en"),
|
|
4808
4881
|
resources: {
|
|
@@ -4824,7 +4897,7 @@ class di extends An {
|
|
|
4824
4897
|
});
|
|
4825
4898
|
}
|
|
4826
4899
|
translateModelNames() {
|
|
4827
|
-
|
|
4900
|
+
Oe.reducer(
|
|
4828
4901
|
"model",
|
|
4829
4902
|
(t) => class extends t {
|
|
4830
4903
|
static singular() {
|
|
@@ -4838,9 +4911,9 @@ class di extends An {
|
|
|
4838
4911
|
);
|
|
4839
4912
|
}
|
|
4840
4913
|
translateModelColumns() {
|
|
4841
|
-
for (const t of Object.keys(
|
|
4914
|
+
for (const t of Object.keys(Oe.make()))
|
|
4842
4915
|
I.reducer(
|
|
4843
|
-
`model${
|
|
4916
|
+
`model${E.studly(t)}Columns`,
|
|
4844
4917
|
(n) => n.map((r) => ({
|
|
4845
4918
|
...r,
|
|
4846
4919
|
label: J.t(r.label)
|
|
@@ -4890,7 +4963,7 @@ class di extends An {
|
|
|
4890
4963
|
);
|
|
4891
4964
|
}
|
|
4892
4965
|
translateFormLabels() {
|
|
4893
|
-
|
|
4966
|
+
Cr.reducer(
|
|
4894
4967
|
"getDefaultInputProps",
|
|
4895
4968
|
(t) => (Array.isArray(t) ? t.map((n) => {
|
|
4896
4969
|
n != null && n.label && (n.label = J.t(n.label));
|
|
@@ -4899,7 +4972,7 @@ class di extends An {
|
|
|
4899
4972
|
);
|
|
4900
4973
|
}
|
|
4901
4974
|
}
|
|
4902
|
-
const
|
|
4975
|
+
const mi = {
|
|
4903
4976
|
palette: {
|
|
4904
4977
|
primary: {
|
|
4905
4978
|
main: "#1d9798"
|
|
@@ -4908,58 +4981,66 @@ const fi = {
|
|
|
4908
4981
|
main: "#fa510c"
|
|
4909
4982
|
}
|
|
4910
4983
|
}
|
|
4911
|
-
},
|
|
4912
|
-
theme: e =
|
|
4984
|
+
}, gi = (e) => e.make("cms").getRoutes(), Yi = ({
|
|
4985
|
+
theme: e = mi,
|
|
4913
4986
|
themeArgs: t,
|
|
4914
4987
|
providers: n,
|
|
4915
4988
|
...r
|
|
4916
4989
|
}) => {
|
|
4917
|
-
const s =
|
|
4990
|
+
const s = Ie("(prefers-color-scheme: dark)"), o = h.useMemo(() => ls({
|
|
4918
4991
|
...e,
|
|
4919
4992
|
palette: {
|
|
4920
4993
|
...e.palette,
|
|
4921
4994
|
mode: s ? "dark" : "light"
|
|
4922
4995
|
}
|
|
4923
4996
|
}, ...t ?? []), [e, s, t]), a = h.useMemo(() => [
|
|
4924
|
-
|
|
4925
|
-
|
|
4997
|
+
yt,
|
|
4998
|
+
hi,
|
|
4926
4999
|
...n || []
|
|
4927
5000
|
], [n]);
|
|
4928
|
-
return /* @__PURE__ */ w(
|
|
4929
|
-
/* @__PURE__ */ i(
|
|
5001
|
+
return /* @__PURE__ */ w(cs, { theme: o, children: [
|
|
5002
|
+
/* @__PURE__ */ i(ts, {}),
|
|
4930
5003
|
/* @__PURE__ */ i(
|
|
4931
|
-
|
|
5004
|
+
Er,
|
|
4932
5005
|
{
|
|
4933
|
-
routes:
|
|
5006
|
+
routes: gi,
|
|
4934
5007
|
providers: a,
|
|
4935
5008
|
...r
|
|
4936
5009
|
}
|
|
4937
5010
|
)
|
|
4938
5011
|
] });
|
|
4939
5012
|
};
|
|
5013
|
+
class bi {
|
|
5014
|
+
getFacadeAccessor() {
|
|
5015
|
+
return "filter";
|
|
5016
|
+
}
|
|
5017
|
+
}
|
|
5018
|
+
const Ji = vt(bi, wt);
|
|
4940
5019
|
export {
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
5020
|
+
I as Cms,
|
|
5021
|
+
yt as CmsServiceProvider,
|
|
5022
|
+
hs as DialogProvider,
|
|
5023
|
+
Ji as Filter,
|
|
5024
|
+
fs as LayoutProvider,
|
|
5025
|
+
We as Link,
|
|
5026
|
+
Yi as LuminixCms,
|
|
5027
|
+
Je as ModelProvider,
|
|
5028
|
+
gs as NotificationProvider,
|
|
5029
|
+
hi as i18NextServiceProvider,
|
|
5030
|
+
Ut as useActionEvent,
|
|
5031
|
+
ks as useBackButton,
|
|
4951
5032
|
te as useCurrentModel,
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
5033
|
+
ia as useDialog,
|
|
5034
|
+
aa as useDisplaceNotifications,
|
|
5035
|
+
sa as useHandleError,
|
|
5036
|
+
da as useHasSearch,
|
|
4956
5037
|
v as useIsDesktopMode,
|
|
4957
5038
|
H as useLayoutConfig,
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
5039
|
+
qt as useMenu,
|
|
5040
|
+
jt as useNotify,
|
|
5041
|
+
ur as usePageTitle,
|
|
5042
|
+
Cs as useSearch,
|
|
5043
|
+
zt as useSelection,
|
|
5044
|
+
Bt as useSetPageTitle,
|
|
4964
5045
|
ae as useTable
|
|
4965
5046
|
};
|