@viglet/viglet-design-system 2026.2.45 → 2026.2.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breadcrumb.context-ClxdzHen.js +8461 -0
- package/dist/breadcrumb.context-CpjMnEsE.cjs +51 -0
- package/dist/chunk-D-qHiVGv.cjs +1 -0
- package/dist/floating-formulas-bg.cjs.js +1 -1
- package/dist/i18n-BVqIoqtS.cjs +1 -0
- package/dist/i18n.cjs.js +1 -1
- package/dist/i18n.es.js +1 -1
- package/dist/index.cjs.js +39 -92
- package/dist/index.es.js +9442 -21401
- package/dist/preset.css +9 -0
- package/dist/router.cjs.js +4 -0
- package/dist/router.es.js +3530 -0
- package/dist/src/components/index.d.ts +0 -13
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/router/blank-slate.d.ts.map +1 -0
- package/dist/src/components/router/dialog.delete.d.ts.map +1 -0
- package/dist/src/components/router/gradient-button-link.d.ts +9 -0
- package/dist/src/components/router/gradient-button-link.d.ts.map +1 -0
- package/dist/src/components/{grid.list.d.ts → router/grid.list.d.ts} +1 -1
- package/dist/src/components/router/grid.list.d.ts.map +1 -0
- package/dist/src/components/router/index.d.ts +15 -0
- package/dist/src/components/router/index.d.ts.map +1 -0
- package/dist/src/components/router/internal.sidebar.d.ts.map +1 -0
- package/dist/src/components/router/loading-provider.d.ts.map +1 -0
- package/dist/src/components/router/nav-main.d.ts.map +1 -0
- package/dist/src/components/{nav-user.d.ts → router/nav-user.d.ts} +1 -1
- package/dist/src/components/router/nav-user.d.ts.map +1 -0
- package/dist/src/components/router/page-content.d.ts.map +1 -0
- package/dist/src/components/router/page-header.d.ts.map +1 -0
- package/dist/src/components/router/page.d.ts.map +1 -0
- package/dist/src/components/router/sticky.page.header.d.ts.map +1 -0
- package/dist/src/components/router/sub.page.d.ts.map +1 -0
- package/dist/src/components/router/sub.page.header.d.ts.map +1 -0
- package/dist/src/components/ui/gradient-button.d.ts +1 -3
- package/dist/src/components/ui/gradient-button.d.ts.map +1 -1
- package/dist/src/router.d.ts +2 -0
- package/dist/src/router.d.ts.map +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/package.json +7 -1
- package/dist/i18n-fhLjmEl9.cjs +0 -1
- package/dist/src/components/blank-slate.d.ts.map +0 -1
- package/dist/src/components/dialog.delete.d.ts.map +0 -1
- package/dist/src/components/grid.list.d.ts.map +0 -1
- package/dist/src/components/internal.sidebar.d.ts.map +0 -1
- package/dist/src/components/loading-provider.d.ts.map +0 -1
- package/dist/src/components/nav-main.d.ts.map +0 -1
- package/dist/src/components/nav-user.d.ts.map +0 -1
- package/dist/src/components/page-content.d.ts.map +0 -1
- package/dist/src/components/page-header.d.ts.map +0 -1
- package/dist/src/components/page.d.ts.map +0 -1
- package/dist/src/components/sticky.page.header.d.ts.map +0 -1
- package/dist/src/components/sub.page.d.ts.map +0 -1
- package/dist/src/components/sub.page.header.d.ts.map +0 -1
- /package/dist/{i18n-DNvbCNFH.js → i18n-DFQANHU9.js} +0 -0
- /package/dist/src/components/{blank-slate.d.ts → router/blank-slate.d.ts} +0 -0
- /package/dist/src/components/{dialog.delete.d.ts → router/dialog.delete.d.ts} +0 -0
- /package/dist/src/components/{internal.sidebar.d.ts → router/internal.sidebar.d.ts} +0 -0
- /package/dist/src/components/{loading-provider.d.ts → router/loading-provider.d.ts} +0 -0
- /package/dist/src/components/{nav-main.d.ts → router/nav-main.d.ts} +0 -0
- /package/dist/src/components/{page-content.d.ts → router/page-content.d.ts} +0 -0
- /package/dist/src/components/{page-header.d.ts → router/page-header.d.ts} +0 -0
- /package/dist/src/components/{page.d.ts → router/page.d.ts} +0 -0
- /package/dist/src/components/{sticky.page.header.d.ts → router/sticky.page.header.d.ts} +0 -0
- /package/dist/src/components/{sub.page.d.ts → router/sub.page.d.ts} +0 -0
- /package/dist/src/components/{sub.page.header.d.ts → router/sub.page.header.d.ts} +0 -0
|
@@ -0,0 +1,3530 @@
|
|
|
1
|
+
import { $ as e, A as t, An as n, B as r, Bt as i, C as a, Cn as o, Et as s, Gt as c, Ht as l, Jt as u, N as d, P as f, Sn as p, St as m, T as h, Tn as g, Ut as _, Wt as v, X as y, Y as b, Yt as ee, Z as te, _ as x, _t as S, at as ne, b as re, bt as ie, ct as ae, d as oe, dt as se, f as ce, fn as le, ft as ue, g as de, gt as C, ht as fe, i as pe, it as me, jn as he, jt as w, kn as ge, l as _e, lt as T, m as ve, mt as ye, n as be, pt as xe, tr as Se, u as Ce, ut as we, v as Te, w as E, wn as Ee, x as D, xn as De, xt as O, yn as Oe, yt as ke } from "./breadcrumb.context-ClxdzHen.js";
|
|
2
|
+
import * as Ae from "react";
|
|
3
|
+
import k, { createElement as je, forwardRef as Me, useEffect as Ne, useState as A } from "react";
|
|
4
|
+
import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
|
|
5
|
+
import { useTranslation as P } from "react-i18next";
|
|
6
|
+
import { NavLink as F, Outlet as Pe, useLocation as Fe, useNavigate as I } from "react-router-dom";
|
|
7
|
+
var Ie = C("outline", "chevron-left", "ChevronLeft", [["path", {
|
|
8
|
+
d: "M15 6l-6 6l6 6",
|
|
9
|
+
key: "svg-0"
|
|
10
|
+
}]]), Le = C("outline", "chevron-right", "ChevronRight", [["path", {
|
|
11
|
+
d: "M9 6l6 6l-6 6",
|
|
12
|
+
key: "svg-0"
|
|
13
|
+
}]]), L = C("outline", "dots-vertical", "DotsVertical", [
|
|
14
|
+
["path", {
|
|
15
|
+
d: "M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
|
|
16
|
+
key: "svg-0"
|
|
17
|
+
}],
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M11 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
|
|
20
|
+
key: "svg-1"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M11 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",
|
|
24
|
+
key: "svg-2"
|
|
25
|
+
}]
|
|
26
|
+
]), Re = C("outline", "download", "Download", [
|
|
27
|
+
["path", {
|
|
28
|
+
d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2",
|
|
29
|
+
key: "svg-0"
|
|
30
|
+
}],
|
|
31
|
+
["path", {
|
|
32
|
+
d: "M7 11l5 5l5 -5",
|
|
33
|
+
key: "svg-1"
|
|
34
|
+
}],
|
|
35
|
+
["path", {
|
|
36
|
+
d: "M12 4l0 12",
|
|
37
|
+
key: "svg-2"
|
|
38
|
+
}]
|
|
39
|
+
]), ze = C("outline", "plus", "Plus", [["path", {
|
|
40
|
+
d: "M12 5l0 14",
|
|
41
|
+
key: "svg-0"
|
|
42
|
+
}], ["path", {
|
|
43
|
+
d: "M5 12l14 0",
|
|
44
|
+
key: "svg-1"
|
|
45
|
+
}]]), Be = C("outline", "search", "Search", [["path", {
|
|
46
|
+
d: "M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",
|
|
47
|
+
key: "svg-0"
|
|
48
|
+
}], ["path", {
|
|
49
|
+
d: "M21 21l-6 -6",
|
|
50
|
+
key: "svg-1"
|
|
51
|
+
}]]);
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/components/router/gradient-button-link.tsx
|
|
54
|
+
function Ve({ className: e, variant: t, size: n, to: r, onClick: i, children: a }) {
|
|
55
|
+
return /* @__PURE__ */ M(F, {
|
|
56
|
+
to: r,
|
|
57
|
+
"data-slot": "gradient-button",
|
|
58
|
+
className: Se(we({
|
|
59
|
+
variant: t,
|
|
60
|
+
size: n,
|
|
61
|
+
className: e
|
|
62
|
+
})),
|
|
63
|
+
onClick: (e) => {
|
|
64
|
+
let t = typeof r == "string" ? r : r.pathname;
|
|
65
|
+
t && globalThis.location.pathname === t && globalThis.location.reload(), i && i(e);
|
|
66
|
+
},
|
|
67
|
+
children: a
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
//#region src/components/router/blank-slate.tsx
|
|
72
|
+
var He = ({ icon: e, title: t, description: n, urlNew: r, buttonText: i }) => /* @__PURE__ */ M("div", {
|
|
73
|
+
className: "flex items-center justify-center px-6 py-16",
|
|
74
|
+
children: /* @__PURE__ */ M("div", {
|
|
75
|
+
className: "relative w-full max-w-md overflow-hidden rounded-2xl border border-border/50 bg-card/80 backdrop-blur-sm shadow-xl",
|
|
76
|
+
children: /* @__PURE__ */ N("div", {
|
|
77
|
+
className: "relative flex flex-col items-center text-center px-8 py-12 space-y-6",
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ N("div", {
|
|
80
|
+
className: "relative",
|
|
81
|
+
children: [/* @__PURE__ */ M("div", { className: "absolute inset-0 rounded-2xl bg-gradient-to-br from-blue-500/20 to-indigo-500/20 blur-xl animate-pulse" }), /* @__PURE__ */ M("div", {
|
|
82
|
+
className: "relative inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-blue-600 to-indigo-600 shadow-lg shadow-blue-500/25 ring-4 ring-blue-500/10",
|
|
83
|
+
children: /* @__PURE__ */ M(e, {
|
|
84
|
+
className: "text-white",
|
|
85
|
+
size: 30
|
|
86
|
+
})
|
|
87
|
+
})]
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ N("div", {
|
|
90
|
+
className: "space-y-2",
|
|
91
|
+
children: [/* @__PURE__ */ M("h2", {
|
|
92
|
+
className: "text-xl font-semibold tracking-tight",
|
|
93
|
+
children: t
|
|
94
|
+
}), /* @__PURE__ */ M("p", {
|
|
95
|
+
className: "text-sm text-muted-foreground leading-relaxed max-w-xs mx-auto",
|
|
96
|
+
children: n
|
|
97
|
+
})]
|
|
98
|
+
}),
|
|
99
|
+
r && /* @__PURE__ */ M(Ve, {
|
|
100
|
+
size: "lg",
|
|
101
|
+
to: r,
|
|
102
|
+
children: i
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
}), Ue = ({ feature: e, name: t, onDelete: n, open: r, setOpen: a, trigger: o, blockedBy: s, title: d, description: f, confirmLabel: p }) => {
|
|
108
|
+
let m = s && s.length > 0, h = I(), { t: g } = P(), [y, b] = A(""), te = y === t;
|
|
109
|
+
function x(e) {
|
|
110
|
+
a(e), e || b("");
|
|
111
|
+
}
|
|
112
|
+
return /* @__PURE__ */ N(i, {
|
|
113
|
+
open: r,
|
|
114
|
+
onOpenChange: x,
|
|
115
|
+
children: [o !== null && /* @__PURE__ */ M(ee, {
|
|
116
|
+
asChild: !0,
|
|
117
|
+
children: o ?? /* @__PURE__ */ M(T, {
|
|
118
|
+
variant: "ghost",
|
|
119
|
+
size: "icon-sm",
|
|
120
|
+
children: /* @__PURE__ */ M(xe, { className: "size-5!" })
|
|
121
|
+
})
|
|
122
|
+
}), /* @__PURE__ */ M(l, {
|
|
123
|
+
className: "sm:max-w-md",
|
|
124
|
+
children: m ? /* @__PURE__ */ N(j, { children: [
|
|
125
|
+
/* @__PURE__ */ N(c, { children: [
|
|
126
|
+
/* @__PURE__ */ M("div", {
|
|
127
|
+
className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-amber-500/10 ring-1 ring-amber-500/20 mb-2",
|
|
128
|
+
children: /* @__PURE__ */ M(fe, { className: "size-6 text-amber-500" })
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ M(u, {
|
|
131
|
+
className: "text-center",
|
|
132
|
+
children: g("dialog.cannotDelete", { feature: e })
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ M(_, {
|
|
135
|
+
className: "text-center",
|
|
136
|
+
children: g("dialog.inUse", { name: t })
|
|
137
|
+
})
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ N("div", {
|
|
140
|
+
className: "space-y-3",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ M("p", {
|
|
143
|
+
className: "text-sm text-muted-foreground",
|
|
144
|
+
children: g("dialog.dependingSites", { feature: e })
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ M("div", {
|
|
147
|
+
className: "flex flex-wrap gap-2",
|
|
148
|
+
children: s.map((e) => {
|
|
149
|
+
let t = e.language ? _e(e.language) : void 0;
|
|
150
|
+
return /* @__PURE__ */ M(Ce, {
|
|
151
|
+
text: e.name,
|
|
152
|
+
href: e.href,
|
|
153
|
+
onClick: (e) => {
|
|
154
|
+
a(!1), e && h(e);
|
|
155
|
+
},
|
|
156
|
+
prefix: t ? /* @__PURE__ */ M("img", {
|
|
157
|
+
src: `https://flagcdn.com/w40/${t}.png`,
|
|
158
|
+
alt: e.language,
|
|
159
|
+
className: "w-4 h-3 object-cover rounded-sm"
|
|
160
|
+
}) : void 0
|
|
161
|
+
}, e.id);
|
|
162
|
+
})
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ M("p", {
|
|
165
|
+
className: "text-xs text-muted-foreground",
|
|
166
|
+
children: g("dialog.removeDependencies", { feature: e })
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ M(v, { children: /* @__PURE__ */ M(T, {
|
|
171
|
+
onClick: () => a(!1),
|
|
172
|
+
variant: "outline",
|
|
173
|
+
className: "w-full",
|
|
174
|
+
children: g("dialog.understood")
|
|
175
|
+
}) })
|
|
176
|
+
] }) : /* @__PURE__ */ N(j, { children: [
|
|
177
|
+
/* @__PURE__ */ N(c, { children: [
|
|
178
|
+
/* @__PURE__ */ M("div", {
|
|
179
|
+
className: "mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10 ring-1 ring-red-500/20 mb-2",
|
|
180
|
+
children: /* @__PURE__ */ M(xe, { className: "size-6 text-red-500" })
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ M(u, {
|
|
183
|
+
className: "text-center",
|
|
184
|
+
children: d ?? g("dialog.deleteFeature", { feature: e })
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ M(_, {
|
|
187
|
+
className: "text-center",
|
|
188
|
+
children: f ?? g("dialog.permanentDelete", { name: t })
|
|
189
|
+
})
|
|
190
|
+
] }),
|
|
191
|
+
/* @__PURE__ */ N("div", {
|
|
192
|
+
className: "space-y-2",
|
|
193
|
+
children: [/* @__PURE__ */ N("label", {
|
|
194
|
+
className: "text-sm text-muted-foreground",
|
|
195
|
+
children: [
|
|
196
|
+
g("dialog.typeToConfirm"),
|
|
197
|
+
" ",
|
|
198
|
+
/* @__PURE__ */ M("span", {
|
|
199
|
+
className: "font-mono font-semibold text-foreground bg-muted px-1.5 py-0.5 rounded",
|
|
200
|
+
children: t
|
|
201
|
+
}),
|
|
202
|
+
" ",
|
|
203
|
+
g("dialog.toConfirm")
|
|
204
|
+
]
|
|
205
|
+
}), /* @__PURE__ */ M(ae, {
|
|
206
|
+
value: y,
|
|
207
|
+
onChange: (e) => b(e.target.value),
|
|
208
|
+
placeholder: t,
|
|
209
|
+
className: "font-mono text-sm",
|
|
210
|
+
autoFocus: !0
|
|
211
|
+
})]
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ N(v, {
|
|
214
|
+
className: "flex-col gap-2 sm:flex-col",
|
|
215
|
+
children: [/* @__PURE__ */ N(T, {
|
|
216
|
+
onClick: n,
|
|
217
|
+
variant: "destructive",
|
|
218
|
+
disabled: !te,
|
|
219
|
+
className: "w-full",
|
|
220
|
+
children: [/* @__PURE__ */ M(xe, { className: "size-4" }), p ?? g("dialog.deleteFeature", { feature: e })]
|
|
221
|
+
}), /* @__PURE__ */ M(T, {
|
|
222
|
+
onClick: () => x(!1),
|
|
223
|
+
variant: "ghost",
|
|
224
|
+
className: "w-full",
|
|
225
|
+
children: g("common.cancel")
|
|
226
|
+
})]
|
|
227
|
+
})
|
|
228
|
+
] })
|
|
229
|
+
})]
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region node_modules/@tanstack/table-core/build/lib/index.mjs
|
|
234
|
+
function R(e, t) {
|
|
235
|
+
return typeof e == "function" ? e(t) : e;
|
|
236
|
+
}
|
|
237
|
+
function z(e, t) {
|
|
238
|
+
return (n) => {
|
|
239
|
+
t.setState((t) => ({
|
|
240
|
+
...t,
|
|
241
|
+
[e]: R(n, t[e])
|
|
242
|
+
}));
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function We(e) {
|
|
246
|
+
return e instanceof Function;
|
|
247
|
+
}
|
|
248
|
+
function Ge(e) {
|
|
249
|
+
return Array.isArray(e) && e.every((e) => typeof e == "number");
|
|
250
|
+
}
|
|
251
|
+
function Ke(e, t) {
|
|
252
|
+
let n = [], r = (e) => {
|
|
253
|
+
e.forEach((e) => {
|
|
254
|
+
n.push(e);
|
|
255
|
+
let i = t(e);
|
|
256
|
+
i != null && i.length && r(i);
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
return r(e), n;
|
|
260
|
+
}
|
|
261
|
+
function B(e, t, n) {
|
|
262
|
+
let r = [], i;
|
|
263
|
+
return (a) => {
|
|
264
|
+
let o;
|
|
265
|
+
n.key && n.debug && (o = Date.now());
|
|
266
|
+
let s = e(a);
|
|
267
|
+
if (!(s.length !== r.length || s.some((e, t) => r[t] !== e))) return i;
|
|
268
|
+
r = s;
|
|
269
|
+
let c;
|
|
270
|
+
if (n.key && n.debug && (c = Date.now()), i = t(...s), n == null || n.onChange == null || n.onChange(i), n.key && n.debug && n != null && n.debug()) {
|
|
271
|
+
let e = Math.round((Date.now() - o) * 100) / 100, t = Math.round((Date.now() - c) * 100) / 100, r = t / 16, i = (e, t) => {
|
|
272
|
+
for (e = String(e); e.length < t;) e = " " + e;
|
|
273
|
+
return e;
|
|
274
|
+
};
|
|
275
|
+
console.info(`%c⏱ ${i(t, 5)} /${i(e, 5)} ms`, `
|
|
276
|
+
font-size: .6rem;
|
|
277
|
+
font-weight: bold;
|
|
278
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * r, 120))}deg 100% 31%);`, n?.key);
|
|
279
|
+
}
|
|
280
|
+
return i;
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function V(e, t, n, r) {
|
|
284
|
+
return {
|
|
285
|
+
debug: () => e?.debugAll ?? e[t],
|
|
286
|
+
key: process.env.NODE_ENV === "development" && n,
|
|
287
|
+
onChange: r
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function qe(e, t, n, r) {
|
|
291
|
+
let i = {
|
|
292
|
+
id: `${t.id}_${n.id}`,
|
|
293
|
+
row: t,
|
|
294
|
+
column: n,
|
|
295
|
+
getValue: () => t.getValue(r),
|
|
296
|
+
renderValue: () => i.getValue() ?? e.options.renderFallbackValue,
|
|
297
|
+
getContext: B(() => [
|
|
298
|
+
e,
|
|
299
|
+
n,
|
|
300
|
+
t,
|
|
301
|
+
i
|
|
302
|
+
], (e, t, n, r) => ({
|
|
303
|
+
table: e,
|
|
304
|
+
column: t,
|
|
305
|
+
row: n,
|
|
306
|
+
cell: r,
|
|
307
|
+
getValue: r.getValue,
|
|
308
|
+
renderValue: r.renderValue
|
|
309
|
+
}), V(e.options, "debugCells", "cell.getContext"))
|
|
310
|
+
};
|
|
311
|
+
return e._features.forEach((r) => {
|
|
312
|
+
r.createCell == null || r.createCell(i, n, t, e);
|
|
313
|
+
}, {}), i;
|
|
314
|
+
}
|
|
315
|
+
function Je(e, t, n, r) {
|
|
316
|
+
let i = {
|
|
317
|
+
...e._getDefaultColumnDef(),
|
|
318
|
+
...t
|
|
319
|
+
}, a = i.accessorKey, o = i.id ?? (a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) ?? (typeof i.header == "string" ? i.header : void 0), s;
|
|
320
|
+
if (i.accessorFn ? s = i.accessorFn : a && (s = a.includes(".") ? (e) => {
|
|
321
|
+
let t = e;
|
|
322
|
+
for (let e of a.split(".")) t = t?.[e], process.env.NODE_ENV !== "production" && t === void 0 && console.warn(`"${e}" in deeply nested key "${a}" returned undefined.`);
|
|
323
|
+
return t;
|
|
324
|
+
} : (e) => e[i.accessorKey]), !o) throw process.env.NODE_ENV === "production" ? Error() : Error(i.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header");
|
|
325
|
+
let c = {
|
|
326
|
+
id: `${String(o)}`,
|
|
327
|
+
accessorFn: s,
|
|
328
|
+
parent: r,
|
|
329
|
+
depth: n,
|
|
330
|
+
columnDef: i,
|
|
331
|
+
columns: [],
|
|
332
|
+
getFlatColumns: B(() => [!0], () => [c, ...c.columns?.flatMap((e) => e.getFlatColumns())], V(e.options, "debugColumns", "column.getFlatColumns")),
|
|
333
|
+
getLeafColumns: B(() => [e._getOrderColumnsFn()], (e) => {
|
|
334
|
+
var t;
|
|
335
|
+
return (t = c.columns) != null && t.length ? e(c.columns.flatMap((e) => e.getLeafColumns())) : [c];
|
|
336
|
+
}, V(e.options, "debugColumns", "column.getLeafColumns"))
|
|
337
|
+
};
|
|
338
|
+
for (let t of e._features) t.createColumn == null || t.createColumn(c, e);
|
|
339
|
+
return c;
|
|
340
|
+
}
|
|
341
|
+
var H = "debugHeaders";
|
|
342
|
+
function Ye(e, t, n) {
|
|
343
|
+
let r = {
|
|
344
|
+
id: n.id ?? t.id,
|
|
345
|
+
column: t,
|
|
346
|
+
index: n.index,
|
|
347
|
+
isPlaceholder: !!n.isPlaceholder,
|
|
348
|
+
placeholderId: n.placeholderId,
|
|
349
|
+
depth: n.depth,
|
|
350
|
+
subHeaders: [],
|
|
351
|
+
colSpan: 0,
|
|
352
|
+
rowSpan: 0,
|
|
353
|
+
headerGroup: null,
|
|
354
|
+
getLeafHeaders: () => {
|
|
355
|
+
let e = [], t = (n) => {
|
|
356
|
+
n.subHeaders && n.subHeaders.length && n.subHeaders.map(t), e.push(n);
|
|
357
|
+
};
|
|
358
|
+
return t(r), e;
|
|
359
|
+
},
|
|
360
|
+
getContext: () => ({
|
|
361
|
+
table: e,
|
|
362
|
+
header: r,
|
|
363
|
+
column: t
|
|
364
|
+
})
|
|
365
|
+
};
|
|
366
|
+
return e._features.forEach((t) => {
|
|
367
|
+
t.createHeader == null || t.createHeader(r, e);
|
|
368
|
+
}), r;
|
|
369
|
+
}
|
|
370
|
+
var Xe = { createTable: (e) => {
|
|
371
|
+
e.getHeaderGroups = B(() => [
|
|
372
|
+
e.getAllColumns(),
|
|
373
|
+
e.getVisibleLeafColumns(),
|
|
374
|
+
e.getState().columnPinning.left,
|
|
375
|
+
e.getState().columnPinning.right
|
|
376
|
+
], (t, n, r, i) => {
|
|
377
|
+
let a = r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], o = i?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], s = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id)));
|
|
378
|
+
return U(t, [
|
|
379
|
+
...a,
|
|
380
|
+
...s,
|
|
381
|
+
...o
|
|
382
|
+
], e);
|
|
383
|
+
}, V(e.options, H, "getHeaderGroups")), e.getCenterHeaderGroups = B(() => [
|
|
384
|
+
e.getAllColumns(),
|
|
385
|
+
e.getVisibleLeafColumns(),
|
|
386
|
+
e.getState().columnPinning.left,
|
|
387
|
+
e.getState().columnPinning.right
|
|
388
|
+
], (t, n, r, i) => (n = n.filter((e) => !(r != null && r.includes(e.id)) && !(i != null && i.includes(e.id))), U(t, n, e, "center")), V(e.options, H, "getCenterHeaderGroups")), e.getLeftHeaderGroups = B(() => [
|
|
389
|
+
e.getAllColumns(),
|
|
390
|
+
e.getVisibleLeafColumns(),
|
|
391
|
+
e.getState().columnPinning.left
|
|
392
|
+
], (t, n, r) => U(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "left"), V(e.options, H, "getLeftHeaderGroups")), e.getRightHeaderGroups = B(() => [
|
|
393
|
+
e.getAllColumns(),
|
|
394
|
+
e.getVisibleLeafColumns(),
|
|
395
|
+
e.getState().columnPinning.right
|
|
396
|
+
], (t, n, r) => U(t, r?.map((e) => n.find((t) => t.id === e)).filter(Boolean) ?? [], e, "right"), V(e.options, H, "getRightHeaderGroups")), e.getFooterGroups = B(() => [e.getHeaderGroups()], (e) => [...e].reverse(), V(e.options, H, "getFooterGroups")), e.getLeftFooterGroups = B(() => [e.getLeftHeaderGroups()], (e) => [...e].reverse(), V(e.options, H, "getLeftFooterGroups")), e.getCenterFooterGroups = B(() => [e.getCenterHeaderGroups()], (e) => [...e].reverse(), V(e.options, H, "getCenterFooterGroups")), e.getRightFooterGroups = B(() => [e.getRightHeaderGroups()], (e) => [...e].reverse(), V(e.options, H, "getRightFooterGroups")), e.getFlatHeaders = B(() => [e.getHeaderGroups()], (e) => e.map((e) => e.headers).flat(), V(e.options, H, "getFlatHeaders")), e.getLeftFlatHeaders = B(() => [e.getLeftHeaderGroups()], (e) => e.map((e) => e.headers).flat(), V(e.options, H, "getLeftFlatHeaders")), e.getCenterFlatHeaders = B(() => [e.getCenterHeaderGroups()], (e) => e.map((e) => e.headers).flat(), V(e.options, H, "getCenterFlatHeaders")), e.getRightFlatHeaders = B(() => [e.getRightHeaderGroups()], (e) => e.map((e) => e.headers).flat(), V(e.options, H, "getRightFlatHeaders")), e.getCenterLeafHeaders = B(() => [e.getCenterFlatHeaders()], (e) => e.filter((e) => {
|
|
397
|
+
var t;
|
|
398
|
+
return !((t = e.subHeaders) != null && t.length);
|
|
399
|
+
}), V(e.options, H, "getCenterLeafHeaders")), e.getLeftLeafHeaders = B(() => [e.getLeftFlatHeaders()], (e) => e.filter((e) => {
|
|
400
|
+
var t;
|
|
401
|
+
return !((t = e.subHeaders) != null && t.length);
|
|
402
|
+
}), V(e.options, H, "getLeftLeafHeaders")), e.getRightLeafHeaders = B(() => [e.getRightFlatHeaders()], (e) => e.filter((e) => {
|
|
403
|
+
var t;
|
|
404
|
+
return !((t = e.subHeaders) != null && t.length);
|
|
405
|
+
}), V(e.options, H, "getRightLeafHeaders")), e.getLeafHeaders = B(() => [
|
|
406
|
+
e.getLeftHeaderGroups(),
|
|
407
|
+
e.getCenterHeaderGroups(),
|
|
408
|
+
e.getRightHeaderGroups()
|
|
409
|
+
], (e, t, n) => [
|
|
410
|
+
...e[0]?.headers ?? [],
|
|
411
|
+
...t[0]?.headers ?? [],
|
|
412
|
+
...n[0]?.headers ?? []
|
|
413
|
+
].map((e) => e.getLeafHeaders()).flat(), V(e.options, H, "getLeafHeaders"));
|
|
414
|
+
} };
|
|
415
|
+
function U(e, t, n, r) {
|
|
416
|
+
let i = 0, a = function(e, t) {
|
|
417
|
+
t === void 0 && (t = 1), i = Math.max(i, t), e.filter((e) => e.getIsVisible()).forEach((e) => {
|
|
418
|
+
var n;
|
|
419
|
+
(n = e.columns) != null && n.length && a(e.columns, t + 1);
|
|
420
|
+
}, 0);
|
|
421
|
+
};
|
|
422
|
+
a(e);
|
|
423
|
+
let o = [], s = (e, t) => {
|
|
424
|
+
let i = {
|
|
425
|
+
depth: t,
|
|
426
|
+
id: [r, `${t}`].filter(Boolean).join("_"),
|
|
427
|
+
headers: []
|
|
428
|
+
}, a = [];
|
|
429
|
+
e.forEach((e) => {
|
|
430
|
+
let o = [...a].reverse()[0], s = e.column.depth === i.depth, c, l = !1;
|
|
431
|
+
if (s && e.column.parent ? c = e.column.parent : (c = e.column, l = !0), o && o?.column === c) o.subHeaders.push(e);
|
|
432
|
+
else {
|
|
433
|
+
let i = Ye(n, c, {
|
|
434
|
+
id: [
|
|
435
|
+
r,
|
|
436
|
+
t,
|
|
437
|
+
c.id,
|
|
438
|
+
e?.id
|
|
439
|
+
].filter(Boolean).join("_"),
|
|
440
|
+
isPlaceholder: l,
|
|
441
|
+
placeholderId: l ? `${a.filter((e) => e.column === c).length}` : void 0,
|
|
442
|
+
depth: t,
|
|
443
|
+
index: a.length
|
|
444
|
+
});
|
|
445
|
+
i.subHeaders.push(e), a.push(i);
|
|
446
|
+
}
|
|
447
|
+
i.headers.push(e), e.headerGroup = i;
|
|
448
|
+
}), o.push(i), t > 0 && s(a, t - 1);
|
|
449
|
+
};
|
|
450
|
+
s(t.map((e, t) => Ye(n, e, {
|
|
451
|
+
depth: i,
|
|
452
|
+
index: t
|
|
453
|
+
})), i - 1), o.reverse();
|
|
454
|
+
let c = (e) => e.filter((e) => e.column.getIsVisible()).map((e) => {
|
|
455
|
+
let t = 0, n = 0, r = [0];
|
|
456
|
+
e.subHeaders && e.subHeaders.length ? (r = [], c(e.subHeaders).forEach((e) => {
|
|
457
|
+
let { colSpan: n, rowSpan: i } = e;
|
|
458
|
+
t += n, r.push(i);
|
|
459
|
+
})) : t = 1;
|
|
460
|
+
let i = Math.min(...r);
|
|
461
|
+
return n += i, e.colSpan = t, e.rowSpan = n, {
|
|
462
|
+
colSpan: t,
|
|
463
|
+
rowSpan: n
|
|
464
|
+
};
|
|
465
|
+
});
|
|
466
|
+
return c(o[0]?.headers ?? []), o;
|
|
467
|
+
}
|
|
468
|
+
var Ze = (e, t, n, r, i, a, o) => {
|
|
469
|
+
let s = {
|
|
470
|
+
id: t,
|
|
471
|
+
index: r,
|
|
472
|
+
original: n,
|
|
473
|
+
depth: i,
|
|
474
|
+
parentId: o,
|
|
475
|
+
_valuesCache: {},
|
|
476
|
+
_uniqueValuesCache: {},
|
|
477
|
+
getValue: (t) => {
|
|
478
|
+
if (s._valuesCache.hasOwnProperty(t)) return s._valuesCache[t];
|
|
479
|
+
let n = e.getColumn(t);
|
|
480
|
+
if (n != null && n.accessorFn) return s._valuesCache[t] = n.accessorFn(s.original, r), s._valuesCache[t];
|
|
481
|
+
},
|
|
482
|
+
getUniqueValues: (t) => {
|
|
483
|
+
if (s._uniqueValuesCache.hasOwnProperty(t)) return s._uniqueValuesCache[t];
|
|
484
|
+
let n = e.getColumn(t);
|
|
485
|
+
if (n != null && n.accessorFn) return n.columnDef.getUniqueValues ? (s._uniqueValuesCache[t] = n.columnDef.getUniqueValues(s.original, r), s._uniqueValuesCache[t]) : (s._uniqueValuesCache[t] = [s.getValue(t)], s._uniqueValuesCache[t]);
|
|
486
|
+
},
|
|
487
|
+
renderValue: (t) => s.getValue(t) ?? e.options.renderFallbackValue,
|
|
488
|
+
subRows: a ?? [],
|
|
489
|
+
getLeafRows: () => Ke(s.subRows, (e) => e.subRows),
|
|
490
|
+
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
491
|
+
getParentRows: () => {
|
|
492
|
+
let e = [], t = s;
|
|
493
|
+
for (;;) {
|
|
494
|
+
let n = t.getParentRow();
|
|
495
|
+
if (!n) break;
|
|
496
|
+
e.push(n), t = n;
|
|
497
|
+
}
|
|
498
|
+
return e.reverse();
|
|
499
|
+
},
|
|
500
|
+
getAllCells: B(() => [e.getAllLeafColumns()], (t) => t.map((t) => qe(e, s, t, t.id)), V(e.options, "debugRows", "getAllCells")),
|
|
501
|
+
_getAllCellsByColumnId: B(() => [s.getAllCells()], (e) => e.reduce((e, t) => (e[t.column.id] = t, e), {}), V(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
502
|
+
};
|
|
503
|
+
for (let t = 0; t < e._features.length; t++) {
|
|
504
|
+
let n = e._features[t];
|
|
505
|
+
n == null || n.createRow == null || n.createRow(s, e);
|
|
506
|
+
}
|
|
507
|
+
return s;
|
|
508
|
+
}, Qe = { createColumn: (e, t) => {
|
|
509
|
+
e._getFacetedRowModel = t.options.getFacetedRowModel && t.options.getFacetedRowModel(t, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : t.getPreFilteredRowModel(), e._getFacetedUniqueValues = t.options.getFacetedUniqueValues && t.options.getFacetedUniqueValues(t, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = t.options.getFacetedMinMaxValues && t.options.getFacetedMinMaxValues(t, e.id), e.getFacetedMinMaxValues = () => {
|
|
510
|
+
if (e._getFacetedMinMaxValues) return e._getFacetedMinMaxValues();
|
|
511
|
+
};
|
|
512
|
+
} }, $e = (e, t, n) => {
|
|
513
|
+
var r, i;
|
|
514
|
+
let a = n == null || (r = n.toString()) == null ? void 0 : r.toLowerCase();
|
|
515
|
+
return !!(!((i = e.getValue(t)) == null || (i = i.toString()) == null || (i = i.toLowerCase()) == null) && i.includes(a));
|
|
516
|
+
};
|
|
517
|
+
$e.autoRemove = (e) => G(e);
|
|
518
|
+
var et = (e, t, n) => {
|
|
519
|
+
var r;
|
|
520
|
+
return !!(!((r = e.getValue(t)) == null || (r = r.toString()) == null) && r.includes(n));
|
|
521
|
+
};
|
|
522
|
+
et.autoRemove = (e) => G(e);
|
|
523
|
+
var tt = (e, t, n) => {
|
|
524
|
+
var r;
|
|
525
|
+
return ((r = e.getValue(t)) == null || (r = r.toString()) == null ? void 0 : r.toLowerCase()) === n?.toLowerCase();
|
|
526
|
+
};
|
|
527
|
+
tt.autoRemove = (e) => G(e);
|
|
528
|
+
var nt = (e, t, n) => e.getValue(t)?.includes(n);
|
|
529
|
+
nt.autoRemove = (e) => G(e);
|
|
530
|
+
var rt = (e, t, n) => !n.some((n) => {
|
|
531
|
+
var r;
|
|
532
|
+
return !((r = e.getValue(t)) != null && r.includes(n));
|
|
533
|
+
});
|
|
534
|
+
rt.autoRemove = (e) => G(e) || !(e != null && e.length);
|
|
535
|
+
var it = (e, t, n) => n.some((n) => e.getValue(t)?.includes(n));
|
|
536
|
+
it.autoRemove = (e) => G(e) || !(e != null && e.length);
|
|
537
|
+
var at = (e, t, n) => e.getValue(t) === n;
|
|
538
|
+
at.autoRemove = (e) => G(e);
|
|
539
|
+
var ot = (e, t, n) => e.getValue(t) == n;
|
|
540
|
+
ot.autoRemove = (e) => G(e);
|
|
541
|
+
var st = (e, t, n) => {
|
|
542
|
+
let [r, i] = n, a = e.getValue(t);
|
|
543
|
+
return a >= r && a <= i;
|
|
544
|
+
};
|
|
545
|
+
st.resolveFilterValue = (e) => {
|
|
546
|
+
let [t, n] = e, r = typeof t == "number" ? t : parseFloat(t), i = typeof n == "number" ? n : parseFloat(n), a = t === null || Number.isNaN(r) ? -Infinity : r, o = n === null || Number.isNaN(i) ? Infinity : i;
|
|
547
|
+
if (a > o) {
|
|
548
|
+
let e = a;
|
|
549
|
+
a = o, o = e;
|
|
550
|
+
}
|
|
551
|
+
return [a, o];
|
|
552
|
+
}, st.autoRemove = (e) => G(e) || G(e[0]) && G(e[1]);
|
|
553
|
+
var W = {
|
|
554
|
+
includesString: $e,
|
|
555
|
+
includesStringSensitive: et,
|
|
556
|
+
equalsString: tt,
|
|
557
|
+
arrIncludes: nt,
|
|
558
|
+
arrIncludesAll: rt,
|
|
559
|
+
arrIncludesSome: it,
|
|
560
|
+
equals: at,
|
|
561
|
+
weakEquals: ot,
|
|
562
|
+
inNumberRange: st
|
|
563
|
+
};
|
|
564
|
+
function G(e) {
|
|
565
|
+
return e == null || e === "";
|
|
566
|
+
}
|
|
567
|
+
var ct = {
|
|
568
|
+
getDefaultColumnDef: () => ({ filterFn: "auto" }),
|
|
569
|
+
getInitialState: (e) => ({
|
|
570
|
+
columnFilters: [],
|
|
571
|
+
...e
|
|
572
|
+
}),
|
|
573
|
+
getDefaultOptions: (e) => ({
|
|
574
|
+
onColumnFiltersChange: z("columnFilters", e),
|
|
575
|
+
filterFromLeafRows: !1,
|
|
576
|
+
maxLeafRowFilterDepth: 100
|
|
577
|
+
}),
|
|
578
|
+
createColumn: (e, t) => {
|
|
579
|
+
e.getAutoFilterFn = () => {
|
|
580
|
+
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
581
|
+
return typeof n == "string" ? W.includesString : typeof n == "number" ? W.inNumberRange : typeof n == "boolean" || typeof n == "object" && n ? W.equals : Array.isArray(n) ? W.arrIncludes : W.weakEquals;
|
|
582
|
+
}, e.getFilterFn = () => We(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : t.options.filterFns?.[e.columnDef.filterFn] ?? W[e.columnDef.filterFn], e.getCanFilter = () => (e.columnDef.enableColumnFilter ?? !0) && (t.options.enableColumnFilters ?? !0) && (t.options.enableFilters ?? !0) && !!e.accessorFn, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
|
|
583
|
+
var n;
|
|
584
|
+
return (n = t.getState().columnFilters) == null || (n = n.find((t) => t.id === e.id)) == null ? void 0 : n.value;
|
|
585
|
+
}, e.getFilterIndex = () => t.getState().columnFilters?.findIndex((t) => t.id === e.id) ?? -1, e.setFilterValue = (n) => {
|
|
586
|
+
t.setColumnFilters((t) => {
|
|
587
|
+
let r = e.getFilterFn(), i = t?.find((t) => t.id === e.id), a = R(n, i ? i.value : void 0);
|
|
588
|
+
if (lt(r, a, e)) return t?.filter((t) => t.id !== e.id) ?? [];
|
|
589
|
+
let o = {
|
|
590
|
+
id: e.id,
|
|
591
|
+
value: a
|
|
592
|
+
};
|
|
593
|
+
return i ? t?.map((t) => t.id === e.id ? o : t) ?? [] : t != null && t.length ? [...t, o] : [o];
|
|
594
|
+
});
|
|
595
|
+
};
|
|
596
|
+
},
|
|
597
|
+
createRow: (e, t) => {
|
|
598
|
+
e.columnFilters = {}, e.columnFiltersMeta = {};
|
|
599
|
+
},
|
|
600
|
+
createTable: (e) => {
|
|
601
|
+
e.setColumnFilters = (t) => {
|
|
602
|
+
let n = e.getAllLeafColumns();
|
|
603
|
+
e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange((e) => R(t, e)?.filter((e) => {
|
|
604
|
+
let t = n.find((t) => t.id === e.id);
|
|
605
|
+
return !(t && lt(t.getFilterFn(), e.value, t));
|
|
606
|
+
}));
|
|
607
|
+
}, e.resetColumnFilters = (t) => {
|
|
608
|
+
e.setColumnFilters(t ? [] : e.initialState?.columnFilters ?? []);
|
|
609
|
+
}, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
function lt(e, t, n) {
|
|
613
|
+
return (e && e.autoRemove ? e.autoRemove(t, n) : !1) || t === void 0 || typeof t == "string" && !t;
|
|
614
|
+
}
|
|
615
|
+
var ut = {
|
|
616
|
+
sum: (e, t, n) => n.reduce((t, n) => {
|
|
617
|
+
let r = n.getValue(e);
|
|
618
|
+
return t + (typeof r == "number" ? r : 0);
|
|
619
|
+
}, 0),
|
|
620
|
+
min: (e, t, n) => {
|
|
621
|
+
let r;
|
|
622
|
+
return n.forEach((t) => {
|
|
623
|
+
let n = t.getValue(e);
|
|
624
|
+
n != null && (r > n || r === void 0 && n >= n) && (r = n);
|
|
625
|
+
}), r;
|
|
626
|
+
},
|
|
627
|
+
max: (e, t, n) => {
|
|
628
|
+
let r;
|
|
629
|
+
return n.forEach((t) => {
|
|
630
|
+
let n = t.getValue(e);
|
|
631
|
+
n != null && (r < n || r === void 0 && n >= n) && (r = n);
|
|
632
|
+
}), r;
|
|
633
|
+
},
|
|
634
|
+
extent: (e, t, n) => {
|
|
635
|
+
let r, i;
|
|
636
|
+
return n.forEach((t) => {
|
|
637
|
+
let n = t.getValue(e);
|
|
638
|
+
n != null && (r === void 0 ? n >= n && (r = i = n) : (r > n && (r = n), i < n && (i = n)));
|
|
639
|
+
}), [r, i];
|
|
640
|
+
},
|
|
641
|
+
mean: (e, t) => {
|
|
642
|
+
let n = 0, r = 0;
|
|
643
|
+
if (t.forEach((t) => {
|
|
644
|
+
let i = t.getValue(e);
|
|
645
|
+
i != null && (i = +i) >= i && (++n, r += i);
|
|
646
|
+
}), n) return r / n;
|
|
647
|
+
},
|
|
648
|
+
median: (e, t) => {
|
|
649
|
+
if (!t.length) return;
|
|
650
|
+
let n = t.map((t) => t.getValue(e));
|
|
651
|
+
if (!Ge(n)) return;
|
|
652
|
+
if (n.length === 1) return n[0];
|
|
653
|
+
let r = Math.floor(n.length / 2), i = n.sort((e, t) => e - t);
|
|
654
|
+
return n.length % 2 == 0 ? (i[r - 1] + i[r]) / 2 : i[r];
|
|
655
|
+
},
|
|
656
|
+
unique: (e, t) => Array.from(new Set(t.map((t) => t.getValue(e))).values()),
|
|
657
|
+
uniqueCount: (e, t) => new Set(t.map((t) => t.getValue(e))).size,
|
|
658
|
+
count: (e, t) => t.length
|
|
659
|
+
}, dt = {
|
|
660
|
+
getDefaultColumnDef: () => ({
|
|
661
|
+
aggregatedCell: (e) => {
|
|
662
|
+
var t;
|
|
663
|
+
return ((t = e.getValue()) == null || t.toString == null ? void 0 : t.toString()) ?? null;
|
|
664
|
+
},
|
|
665
|
+
aggregationFn: "auto"
|
|
666
|
+
}),
|
|
667
|
+
getInitialState: (e) => ({
|
|
668
|
+
grouping: [],
|
|
669
|
+
...e
|
|
670
|
+
}),
|
|
671
|
+
getDefaultOptions: (e) => ({
|
|
672
|
+
onGroupingChange: z("grouping", e),
|
|
673
|
+
groupedColumnMode: "reorder"
|
|
674
|
+
}),
|
|
675
|
+
createColumn: (e, t) => {
|
|
676
|
+
e.toggleGrouping = () => {
|
|
677
|
+
t.setGrouping((t) => t != null && t.includes(e.id) ? t.filter((t) => t !== e.id) : [...t ?? [], e.id]);
|
|
678
|
+
}, e.getCanGroup = () => (e.columnDef.enableGrouping ?? !0) && (t.options.enableGrouping ?? !0) && (!!e.accessorFn || !!e.columnDef.getGroupingValue), e.getIsGrouped = () => t.getState().grouping?.includes(e.id), e.getGroupedIndex = () => t.getState().grouping?.indexOf(e.id), e.getToggleGroupingHandler = () => {
|
|
679
|
+
let t = e.getCanGroup();
|
|
680
|
+
return () => {
|
|
681
|
+
t && e.toggleGrouping();
|
|
682
|
+
};
|
|
683
|
+
}, e.getAutoAggregationFn = () => {
|
|
684
|
+
let n = t.getCoreRowModel().flatRows[0]?.getValue(e.id);
|
|
685
|
+
if (typeof n == "number") return ut.sum;
|
|
686
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return ut.extent;
|
|
687
|
+
}, e.getAggregationFn = () => {
|
|
688
|
+
if (!e) throw Error();
|
|
689
|
+
return We(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : t.options.aggregationFns?.[e.columnDef.aggregationFn] ?? ut[e.columnDef.aggregationFn];
|
|
690
|
+
};
|
|
691
|
+
},
|
|
692
|
+
createTable: (e) => {
|
|
693
|
+
e.setGrouping = (t) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(t), e.resetGrouping = (t) => {
|
|
694
|
+
e.setGrouping(t ? [] : e.initialState?.grouping ?? []);
|
|
695
|
+
}, e.getPreGroupedRowModel = () => e.getFilteredRowModel(), e.getGroupedRowModel = () => (!e._getGroupedRowModel && e.options.getGroupedRowModel && (e._getGroupedRowModel = e.options.getGroupedRowModel(e)), e.options.manualGrouping || !e._getGroupedRowModel ? e.getPreGroupedRowModel() : e._getGroupedRowModel());
|
|
696
|
+
},
|
|
697
|
+
createRow: (e, t) => {
|
|
698
|
+
e.getIsGrouped = () => !!e.groupingColumnId, e.getGroupingValue = (n) => {
|
|
699
|
+
if (e._groupingValuesCache.hasOwnProperty(n)) return e._groupingValuesCache[n];
|
|
700
|
+
let r = t.getColumn(n);
|
|
701
|
+
return r != null && r.columnDef.getGroupingValue ? (e._groupingValuesCache[n] = r.columnDef.getGroupingValue(e.original), e._groupingValuesCache[n]) : e.getValue(n);
|
|
702
|
+
}, e._groupingValuesCache = {};
|
|
703
|
+
},
|
|
704
|
+
createCell: (e, t, n, r) => {
|
|
705
|
+
e.getIsGrouped = () => t.getIsGrouped() && t.id === n.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && t.getIsGrouped(), e.getIsAggregated = () => {
|
|
706
|
+
var t;
|
|
707
|
+
return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((t = n.subRows) != null && t.length);
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
function ft(e, t, n) {
|
|
712
|
+
if (!(t != null && t.length) || !n) return e;
|
|
713
|
+
let r = e.filter((e) => !t.includes(e.id));
|
|
714
|
+
return n === "remove" ? r : [...t.map((t) => e.find((e) => e.id === t)).filter(Boolean), ...r];
|
|
715
|
+
}
|
|
716
|
+
var pt = {
|
|
717
|
+
getInitialState: (e) => ({
|
|
718
|
+
columnOrder: [],
|
|
719
|
+
...e
|
|
720
|
+
}),
|
|
721
|
+
getDefaultOptions: (e) => ({ onColumnOrderChange: z("columnOrder", e) }),
|
|
722
|
+
createColumn: (e, t) => {
|
|
723
|
+
e.getIndex = B((e) => [q(t, e)], (t) => t.findIndex((t) => t.id === e.id), V(t.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (n) => q(t, n)[0]?.id === e.id, e.getIsLastColumn = (n) => {
|
|
724
|
+
let r = q(t, n);
|
|
725
|
+
return r[r.length - 1]?.id === e.id;
|
|
726
|
+
};
|
|
727
|
+
},
|
|
728
|
+
createTable: (e) => {
|
|
729
|
+
e.setColumnOrder = (t) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(t), e.resetColumnOrder = (t) => {
|
|
730
|
+
e.setColumnOrder(t ? [] : e.initialState.columnOrder ?? []);
|
|
731
|
+
}, e._getOrderColumnsFn = B(() => [
|
|
732
|
+
e.getState().columnOrder,
|
|
733
|
+
e.getState().grouping,
|
|
734
|
+
e.options.groupedColumnMode
|
|
735
|
+
], (e, t, n) => (r) => {
|
|
736
|
+
let i = [];
|
|
737
|
+
if (!(e != null && e.length)) i = r;
|
|
738
|
+
else {
|
|
739
|
+
let t = [...e], n = [...r];
|
|
740
|
+
for (; n.length && t.length;) {
|
|
741
|
+
let e = t.shift(), r = n.findIndex((t) => t.id === e);
|
|
742
|
+
r > -1 && i.push(n.splice(r, 1)[0]);
|
|
743
|
+
}
|
|
744
|
+
i = [...i, ...n];
|
|
745
|
+
}
|
|
746
|
+
return ft(i, t, n);
|
|
747
|
+
}, V(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
748
|
+
}
|
|
749
|
+
}, mt = () => ({
|
|
750
|
+
left: [],
|
|
751
|
+
right: []
|
|
752
|
+
}), ht = {
|
|
753
|
+
getInitialState: (e) => ({
|
|
754
|
+
columnPinning: mt(),
|
|
755
|
+
...e
|
|
756
|
+
}),
|
|
757
|
+
getDefaultOptions: (e) => ({ onColumnPinningChange: z("columnPinning", e) }),
|
|
758
|
+
createColumn: (e, t) => {
|
|
759
|
+
e.pin = (n) => {
|
|
760
|
+
let r = e.getLeafColumns().map((e) => e.id).filter(Boolean);
|
|
761
|
+
t.setColumnPinning((e) => n === "right" ? {
|
|
762
|
+
left: (e?.left ?? []).filter((e) => !(r != null && r.includes(e))),
|
|
763
|
+
right: [...(e?.right ?? []).filter((e) => !(r != null && r.includes(e))), ...r]
|
|
764
|
+
} : n === "left" ? {
|
|
765
|
+
left: [...(e?.left ?? []).filter((e) => !(r != null && r.includes(e))), ...r],
|
|
766
|
+
right: (e?.right ?? []).filter((e) => !(r != null && r.includes(e)))
|
|
767
|
+
} : {
|
|
768
|
+
left: (e?.left ?? []).filter((e) => !(r != null && r.includes(e))),
|
|
769
|
+
right: (e?.right ?? []).filter((e) => !(r != null && r.includes(e)))
|
|
770
|
+
});
|
|
771
|
+
}, e.getCanPin = () => e.getLeafColumns().some((e) => (e.columnDef.enablePinning ?? !0) && (t.options.enableColumnPinning ?? t.options.enablePinning ?? !0)), e.getIsPinned = () => {
|
|
772
|
+
let n = e.getLeafColumns().map((e) => e.id), { left: r, right: i } = t.getState().columnPinning, a = n.some((e) => r?.includes(e)), o = n.some((e) => i?.includes(e));
|
|
773
|
+
return a ? "left" : o ? "right" : !1;
|
|
774
|
+
}, e.getPinnedIndex = () => {
|
|
775
|
+
var n;
|
|
776
|
+
let r = e.getIsPinned();
|
|
777
|
+
return r ? ((n = t.getState().columnPinning) == null || (n = n[r]) == null ? void 0 : n.indexOf(e.id)) ?? -1 : 0;
|
|
778
|
+
};
|
|
779
|
+
},
|
|
780
|
+
createRow: (e, t) => {
|
|
781
|
+
e.getCenterVisibleCells = B(() => [
|
|
782
|
+
e._getAllVisibleCells(),
|
|
783
|
+
t.getState().columnPinning.left,
|
|
784
|
+
t.getState().columnPinning.right
|
|
785
|
+
], (e, t, n) => {
|
|
786
|
+
let r = [...t ?? [], ...n ?? []];
|
|
787
|
+
return e.filter((e) => !r.includes(e.column.id));
|
|
788
|
+
}, V(t.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = B(() => [e._getAllVisibleCells(), t.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
|
|
789
|
+
...e,
|
|
790
|
+
position: "left"
|
|
791
|
+
})), V(t.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = B(() => [e._getAllVisibleCells(), t.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.column.id === t)).filter(Boolean).map((e) => ({
|
|
792
|
+
...e,
|
|
793
|
+
position: "right"
|
|
794
|
+
})), V(t.options, "debugRows", "getRightVisibleCells"));
|
|
795
|
+
},
|
|
796
|
+
createTable: (e) => {
|
|
797
|
+
e.setColumnPinning = (t) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(t), e.resetColumnPinning = (t) => e.setColumnPinning(t ? mt() : e.initialState?.columnPinning ?? mt()), e.getIsSomeColumnsPinned = (t) => {
|
|
798
|
+
let n = e.getState().columnPinning;
|
|
799
|
+
return t ? !!n[t]?.length : !!(n.left?.length || n.right?.length);
|
|
800
|
+
}, e.getLeftLeafColumns = B(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), V(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = B(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (e, t) => (t ?? []).map((t) => e.find((e) => e.id === t)).filter(Boolean), V(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = B(() => [
|
|
801
|
+
e.getAllLeafColumns(),
|
|
802
|
+
e.getState().columnPinning.left,
|
|
803
|
+
e.getState().columnPinning.right
|
|
804
|
+
], (e, t, n) => {
|
|
805
|
+
let r = [...t ?? [], ...n ?? []];
|
|
806
|
+
return e.filter((e) => !r.includes(e.id));
|
|
807
|
+
}, V(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
function gt(e) {
|
|
811
|
+
return e || (typeof document < "u" ? document : null);
|
|
812
|
+
}
|
|
813
|
+
var K = {
|
|
814
|
+
size: 150,
|
|
815
|
+
minSize: 20,
|
|
816
|
+
maxSize: 2 ** 53 - 1
|
|
817
|
+
}, _t = () => ({
|
|
818
|
+
startOffset: null,
|
|
819
|
+
startSize: null,
|
|
820
|
+
deltaOffset: null,
|
|
821
|
+
deltaPercentage: null,
|
|
822
|
+
isResizingColumn: !1,
|
|
823
|
+
columnSizingStart: []
|
|
824
|
+
}), vt = {
|
|
825
|
+
getDefaultColumnDef: () => K,
|
|
826
|
+
getInitialState: (e) => ({
|
|
827
|
+
columnSizing: {},
|
|
828
|
+
columnSizingInfo: _t(),
|
|
829
|
+
...e
|
|
830
|
+
}),
|
|
831
|
+
getDefaultOptions: (e) => ({
|
|
832
|
+
columnResizeMode: "onEnd",
|
|
833
|
+
columnResizeDirection: "ltr",
|
|
834
|
+
onColumnSizingChange: z("columnSizing", e),
|
|
835
|
+
onColumnSizingInfoChange: z("columnSizingInfo", e)
|
|
836
|
+
}),
|
|
837
|
+
createColumn: (e, t) => {
|
|
838
|
+
e.getSize = () => {
|
|
839
|
+
let n = t.getState().columnSizing[e.id];
|
|
840
|
+
return Math.min(Math.max(e.columnDef.minSize ?? K.minSize, n ?? e.columnDef.size ?? K.size), e.columnDef.maxSize ?? K.maxSize);
|
|
841
|
+
}, e.getStart = B((e) => [
|
|
842
|
+
e,
|
|
843
|
+
q(t, e),
|
|
844
|
+
t.getState().columnSizing
|
|
845
|
+
], (t, n) => n.slice(0, e.getIndex(t)).reduce((e, t) => e + t.getSize(), 0), V(t.options, "debugColumns", "getStart")), e.getAfter = B((e) => [
|
|
846
|
+
e,
|
|
847
|
+
q(t, e),
|
|
848
|
+
t.getState().columnSizing
|
|
849
|
+
], (t, n) => n.slice(e.getIndex(t) + 1).reduce((e, t) => e + t.getSize(), 0), V(t.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
850
|
+
t.setColumnSizing((t) => {
|
|
851
|
+
let { [e.id]: n, ...r } = t;
|
|
852
|
+
return r;
|
|
853
|
+
});
|
|
854
|
+
}, e.getCanResize = () => (e.columnDef.enableResizing ?? !0) && (t.options.enableColumnResizing ?? !0), e.getIsResizing = () => t.getState().columnSizingInfo.isResizingColumn === e.id;
|
|
855
|
+
},
|
|
856
|
+
createHeader: (e, t) => {
|
|
857
|
+
e.getSize = () => {
|
|
858
|
+
let t = 0, n = (e) => {
|
|
859
|
+
e.subHeaders.length ? e.subHeaders.forEach(n) : t += e.column.getSize() ?? 0;
|
|
860
|
+
};
|
|
861
|
+
return n(e), t;
|
|
862
|
+
}, e.getStart = () => {
|
|
863
|
+
if (e.index > 0) {
|
|
864
|
+
let t = e.headerGroup.headers[e.index - 1];
|
|
865
|
+
return t.getStart() + t.getSize();
|
|
866
|
+
}
|
|
867
|
+
return 0;
|
|
868
|
+
}, e.getResizeHandler = (n) => {
|
|
869
|
+
let r = t.getColumn(e.column.id), i = r?.getCanResize();
|
|
870
|
+
return (a) => {
|
|
871
|
+
if (!r || !i || (a.persist == null || a.persist(), xt(a) && a.touches && a.touches.length > 1)) return;
|
|
872
|
+
let o = e.getSize(), s = e ? e.getLeafHeaders().map((e) => [e.column.id, e.column.getSize()]) : [[r.id, r.getSize()]], c = xt(a) ? Math.round(a.touches[0].clientX) : a.clientX, l = {}, u = (e, n) => {
|
|
873
|
+
typeof n == "number" && (t.setColumnSizingInfo((e) => {
|
|
874
|
+
let r = t.options.columnResizeDirection === "rtl" ? -1 : 1, i = (n - (e?.startOffset ?? 0)) * r, a = Math.max(i / (e?.startSize ?? 0), -.999999);
|
|
875
|
+
return e.columnSizingStart.forEach((e) => {
|
|
876
|
+
let [t, n] = e;
|
|
877
|
+
l[t] = Math.round(Math.max(n + n * a, 0) * 100) / 100;
|
|
878
|
+
}), {
|
|
879
|
+
...e,
|
|
880
|
+
deltaOffset: i,
|
|
881
|
+
deltaPercentage: a
|
|
882
|
+
};
|
|
883
|
+
}), (t.options.columnResizeMode === "onChange" || e === "end") && t.setColumnSizing((e) => ({
|
|
884
|
+
...e,
|
|
885
|
+
...l
|
|
886
|
+
})));
|
|
887
|
+
}, d = (e) => u("move", e), f = (e) => {
|
|
888
|
+
u("end", e), t.setColumnSizingInfo((e) => ({
|
|
889
|
+
...e,
|
|
890
|
+
isResizingColumn: !1,
|
|
891
|
+
startOffset: null,
|
|
892
|
+
startSize: null,
|
|
893
|
+
deltaOffset: null,
|
|
894
|
+
deltaPercentage: null,
|
|
895
|
+
columnSizingStart: []
|
|
896
|
+
}));
|
|
897
|
+
}, p = gt(n), m = {
|
|
898
|
+
moveHandler: (e) => d(e.clientX),
|
|
899
|
+
upHandler: (e) => {
|
|
900
|
+
p?.removeEventListener("mousemove", m.moveHandler), p?.removeEventListener("mouseup", m.upHandler), f(e.clientX);
|
|
901
|
+
}
|
|
902
|
+
}, h = {
|
|
903
|
+
moveHandler: (e) => (e.cancelable && (e.preventDefault(), e.stopPropagation()), d(e.touches[0].clientX), !1),
|
|
904
|
+
upHandler: (e) => {
|
|
905
|
+
p?.removeEventListener("touchmove", h.moveHandler), p?.removeEventListener("touchend", h.upHandler), e.cancelable && (e.preventDefault(), e.stopPropagation()), f(e.touches[0]?.clientX);
|
|
906
|
+
}
|
|
907
|
+
}, g = bt() ? { passive: !1 } : !1;
|
|
908
|
+
xt(a) ? (p?.addEventListener("touchmove", h.moveHandler, g), p?.addEventListener("touchend", h.upHandler, g)) : (p?.addEventListener("mousemove", m.moveHandler, g), p?.addEventListener("mouseup", m.upHandler, g)), t.setColumnSizingInfo((e) => ({
|
|
909
|
+
...e,
|
|
910
|
+
startOffset: c,
|
|
911
|
+
startSize: o,
|
|
912
|
+
deltaOffset: 0,
|
|
913
|
+
deltaPercentage: 0,
|
|
914
|
+
columnSizingStart: s,
|
|
915
|
+
isResizingColumn: r.id
|
|
916
|
+
}));
|
|
917
|
+
};
|
|
918
|
+
};
|
|
919
|
+
},
|
|
920
|
+
createTable: (e) => {
|
|
921
|
+
e.setColumnSizing = (t) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(t), e.setColumnSizingInfo = (t) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(t), e.resetColumnSizing = (t) => {
|
|
922
|
+
e.setColumnSizing(t ? {} : e.initialState.columnSizing ?? {});
|
|
923
|
+
}, e.resetHeaderSizeInfo = (t) => {
|
|
924
|
+
e.setColumnSizingInfo(t ? _t() : e.initialState.columnSizingInfo ?? _t());
|
|
925
|
+
}, e.getTotalSize = () => e.getHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getLeftTotalSize = () => e.getLeftHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getCenterTotalSize = () => e.getCenterHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0, e.getRightTotalSize = () => e.getRightHeaderGroups()[0]?.headers.reduce((e, t) => e + t.getSize(), 0) ?? 0;
|
|
926
|
+
}
|
|
927
|
+
}, yt = null;
|
|
928
|
+
function bt() {
|
|
929
|
+
if (typeof yt == "boolean") return yt;
|
|
930
|
+
let e = !1;
|
|
931
|
+
try {
|
|
932
|
+
let t = { get passive() {
|
|
933
|
+
return e = !0, !1;
|
|
934
|
+
} }, n = () => {};
|
|
935
|
+
window.addEventListener("test", n, t), window.removeEventListener("test", n);
|
|
936
|
+
} catch {
|
|
937
|
+
e = !1;
|
|
938
|
+
}
|
|
939
|
+
return yt = e, yt;
|
|
940
|
+
}
|
|
941
|
+
function xt(e) {
|
|
942
|
+
return e.type === "touchstart";
|
|
943
|
+
}
|
|
944
|
+
var St = {
|
|
945
|
+
getInitialState: (e) => ({
|
|
946
|
+
columnVisibility: {},
|
|
947
|
+
...e
|
|
948
|
+
}),
|
|
949
|
+
getDefaultOptions: (e) => ({ onColumnVisibilityChange: z("columnVisibility", e) }),
|
|
950
|
+
createColumn: (e, t) => {
|
|
951
|
+
e.toggleVisibility = (n) => {
|
|
952
|
+
e.getCanHide() && t.setColumnVisibility((t) => ({
|
|
953
|
+
...t,
|
|
954
|
+
[e.id]: n ?? !e.getIsVisible()
|
|
955
|
+
}));
|
|
956
|
+
}, e.getIsVisible = () => {
|
|
957
|
+
let n = e.columns;
|
|
958
|
+
return (n.length ? n.some((e) => e.getIsVisible()) : t.getState().columnVisibility?.[e.id]) ?? !0;
|
|
959
|
+
}, e.getCanHide = () => (e.columnDef.enableHiding ?? !0) && (t.options.enableHiding ?? !0), e.getToggleVisibilityHandler = () => (t) => {
|
|
960
|
+
e.toggleVisibility == null || e.toggleVisibility(t.target.checked);
|
|
961
|
+
};
|
|
962
|
+
},
|
|
963
|
+
createRow: (e, t) => {
|
|
964
|
+
e._getAllVisibleCells = B(() => [e.getAllCells(), t.getState().columnVisibility], (e) => e.filter((e) => e.column.getIsVisible()), V(t.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = B(() => [
|
|
965
|
+
e.getLeftVisibleCells(),
|
|
966
|
+
e.getCenterVisibleCells(),
|
|
967
|
+
e.getRightVisibleCells()
|
|
968
|
+
], (e, t, n) => [
|
|
969
|
+
...e,
|
|
970
|
+
...t,
|
|
971
|
+
...n
|
|
972
|
+
], V(t.options, "debugRows", "getVisibleCells"));
|
|
973
|
+
},
|
|
974
|
+
createTable: (e) => {
|
|
975
|
+
let t = (t, n) => B(() => [n(), n().filter((e) => e.getIsVisible()).map((e) => e.id).join("_")], (e) => e.filter((e) => e.getIsVisible == null ? void 0 : e.getIsVisible()), V(e.options, "debugColumns", t));
|
|
976
|
+
e.getVisibleFlatColumns = t("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = t("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = t("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = t("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = t("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
|
977
|
+
e.setColumnVisibility(t ? {} : e.initialState.columnVisibility ?? {});
|
|
978
|
+
}, e.toggleAllColumnsVisible = (t) => {
|
|
979
|
+
t ??= !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((e, n) => ({
|
|
980
|
+
...e,
|
|
981
|
+
[n.id]: t || !(n.getCanHide != null && n.getCanHide())
|
|
982
|
+
}), {}));
|
|
983
|
+
}, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((e) => !(e.getIsVisible != null && e.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((e) => e.getIsVisible == null ? void 0 : e.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
|
|
984
|
+
e.toggleAllColumnsVisible(t.target?.checked);
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
};
|
|
988
|
+
function q(e, t) {
|
|
989
|
+
return t ? t === "center" ? e.getCenterVisibleLeafColumns() : t === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
990
|
+
}
|
|
991
|
+
var Ct = { createTable: (e) => {
|
|
992
|
+
e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
|
|
993
|
+
if (e._getGlobalFacetedMinMaxValues) return e._getGlobalFacetedMinMaxValues();
|
|
994
|
+
};
|
|
995
|
+
} }, wt = {
|
|
996
|
+
getInitialState: (e) => ({
|
|
997
|
+
globalFilter: void 0,
|
|
998
|
+
...e
|
|
999
|
+
}),
|
|
1000
|
+
getDefaultOptions: (e) => ({
|
|
1001
|
+
onGlobalFilterChange: z("globalFilter", e),
|
|
1002
|
+
globalFilterFn: "auto",
|
|
1003
|
+
getColumnCanGlobalFilter: (t) => {
|
|
1004
|
+
var n;
|
|
1005
|
+
let r = (n = e.getCoreRowModel().flatRows[0]) == null || (n = n._getAllCellsByColumnId()[t.id]) == null ? void 0 : n.getValue();
|
|
1006
|
+
return typeof r == "string" || typeof r == "number";
|
|
1007
|
+
}
|
|
1008
|
+
}),
|
|
1009
|
+
createColumn: (e, t) => {
|
|
1010
|
+
e.getCanGlobalFilter = () => (e.columnDef.enableGlobalFilter ?? !0) && (t.options.enableGlobalFilter ?? !0) && (t.options.enableFilters ?? !0) && ((t.options.getColumnCanGlobalFilter == null ? void 0 : t.options.getColumnCanGlobalFilter(e)) ?? !0) && !!e.accessorFn;
|
|
1011
|
+
},
|
|
1012
|
+
createTable: (e) => {
|
|
1013
|
+
e.getGlobalAutoFilterFn = () => W.includesString, e.getGlobalFilterFn = () => {
|
|
1014
|
+
let { globalFilterFn: t } = e.options;
|
|
1015
|
+
return We(t) ? t : t === "auto" ? e.getGlobalAutoFilterFn() : e.options.filterFns?.[t] ?? W[t];
|
|
1016
|
+
}, e.setGlobalFilter = (t) => {
|
|
1017
|
+
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(t);
|
|
1018
|
+
}, e.resetGlobalFilter = (t) => {
|
|
1019
|
+
e.setGlobalFilter(t ? void 0 : e.initialState.globalFilter);
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
}, Tt = {
|
|
1023
|
+
getInitialState: (e) => ({
|
|
1024
|
+
expanded: {},
|
|
1025
|
+
...e
|
|
1026
|
+
}),
|
|
1027
|
+
getDefaultOptions: (e) => ({
|
|
1028
|
+
onExpandedChange: z("expanded", e),
|
|
1029
|
+
paginateExpandedRows: !0
|
|
1030
|
+
}),
|
|
1031
|
+
createTable: (e) => {
|
|
1032
|
+
let t = !1, n = !1;
|
|
1033
|
+
e._autoResetExpanded = () => {
|
|
1034
|
+
if (!t) {
|
|
1035
|
+
e._queue(() => {
|
|
1036
|
+
t = !0;
|
|
1037
|
+
});
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
if (e.options.autoResetAll ?? e.options.autoResetExpanded ?? !e.options.manualExpanding) {
|
|
1041
|
+
if (n) return;
|
|
1042
|
+
n = !0, e._queue(() => {
|
|
1043
|
+
e.resetExpanded(), n = !1;
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
}, e.setExpanded = (t) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(t), e.toggleAllRowsExpanded = (t) => {
|
|
1047
|
+
t ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
|
|
1048
|
+
}, e.resetExpanded = (t) => {
|
|
1049
|
+
e.setExpanded(t ? {} : e.initialState?.expanded ?? {});
|
|
1050
|
+
}, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((e) => e.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (t) => {
|
|
1051
|
+
t.persist == null || t.persist(), e.toggleAllRowsExpanded();
|
|
1052
|
+
}, e.getIsSomeRowsExpanded = () => {
|
|
1053
|
+
let t = e.getState().expanded;
|
|
1054
|
+
return t === !0 || Object.values(t).some(Boolean);
|
|
1055
|
+
}, e.getIsAllRowsExpanded = () => {
|
|
1056
|
+
let t = e.getState().expanded;
|
|
1057
|
+
return typeof t == "boolean" ? t === !0 : !(!Object.keys(t).length || e.getRowModel().flatRows.some((e) => !e.getIsExpanded()));
|
|
1058
|
+
}, e.getExpandedDepth = () => {
|
|
1059
|
+
let t = 0;
|
|
1060
|
+
return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((e) => {
|
|
1061
|
+
let n = e.split(".");
|
|
1062
|
+
t = Math.max(t, n.length);
|
|
1063
|
+
}), t;
|
|
1064
|
+
}, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
|
|
1065
|
+
},
|
|
1066
|
+
createRow: (e, t) => {
|
|
1067
|
+
e.toggleExpanded = (n) => {
|
|
1068
|
+
t.setExpanded((r) => {
|
|
1069
|
+
let i = r === !0 ? !0 : !!(r != null && r[e.id]), a = {};
|
|
1070
|
+
if (r === !0 ? Object.keys(t.getRowModel().rowsById).forEach((e) => {
|
|
1071
|
+
a[e] = !0;
|
|
1072
|
+
}) : a = r, n ??= !i, !i && n) return {
|
|
1073
|
+
...a,
|
|
1074
|
+
[e.id]: !0
|
|
1075
|
+
};
|
|
1076
|
+
if (i && !n) {
|
|
1077
|
+
let { [e.id]: t, ...n } = a;
|
|
1078
|
+
return n;
|
|
1079
|
+
}
|
|
1080
|
+
return r;
|
|
1081
|
+
});
|
|
1082
|
+
}, e.getIsExpanded = () => {
|
|
1083
|
+
let n = t.getState().expanded;
|
|
1084
|
+
return !!((t.options.getIsRowExpanded == null ? void 0 : t.options.getIsRowExpanded(e)) ?? (n === !0 || n?.[e.id]));
|
|
1085
|
+
}, e.getCanExpand = () => {
|
|
1086
|
+
var n;
|
|
1087
|
+
return (t.options.getRowCanExpand == null ? void 0 : t.options.getRowCanExpand(e)) ?? ((t.options.enableExpanding ?? !0) && !!((n = e.subRows) != null && n.length));
|
|
1088
|
+
}, e.getIsAllParentsExpanded = () => {
|
|
1089
|
+
let n = !0, r = e;
|
|
1090
|
+
for (; n && r.parentId;) r = t.getRow(r.parentId, !0), n = r.getIsExpanded();
|
|
1091
|
+
return n;
|
|
1092
|
+
}, e.getToggleExpandedHandler = () => {
|
|
1093
|
+
let t = e.getCanExpand();
|
|
1094
|
+
return () => {
|
|
1095
|
+
t && e.toggleExpanded();
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
}, Et = 0, Dt = 10, Ot = () => ({
|
|
1100
|
+
pageIndex: Et,
|
|
1101
|
+
pageSize: Dt
|
|
1102
|
+
}), kt = {
|
|
1103
|
+
getInitialState: (e) => ({
|
|
1104
|
+
...e,
|
|
1105
|
+
pagination: {
|
|
1106
|
+
...Ot(),
|
|
1107
|
+
...e?.pagination
|
|
1108
|
+
}
|
|
1109
|
+
}),
|
|
1110
|
+
getDefaultOptions: (e) => ({ onPaginationChange: z("pagination", e) }),
|
|
1111
|
+
createTable: (e) => {
|
|
1112
|
+
let t = !1, n = !1;
|
|
1113
|
+
e._autoResetPageIndex = () => {
|
|
1114
|
+
if (!t) {
|
|
1115
|
+
e._queue(() => {
|
|
1116
|
+
t = !0;
|
|
1117
|
+
});
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
if (e.options.autoResetAll ?? e.options.autoResetPageIndex ?? !e.options.manualPagination) {
|
|
1121
|
+
if (n) return;
|
|
1122
|
+
n = !0, e._queue(() => {
|
|
1123
|
+
e.resetPageIndex(), n = !1;
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
}, e.setPagination = (t) => e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange((e) => R(t, e)), e.resetPagination = (t) => {
|
|
1127
|
+
e.setPagination(t ? Ot() : e.initialState.pagination ?? Ot());
|
|
1128
|
+
}, e.setPageIndex = (t) => {
|
|
1129
|
+
e.setPagination((n) => {
|
|
1130
|
+
let r = R(t, n.pageIndex), i = e.options.pageCount === void 0 || e.options.pageCount === -1 ? 2 ** 53 - 1 : e.options.pageCount - 1;
|
|
1131
|
+
return r = Math.max(0, Math.min(r, i)), {
|
|
1132
|
+
...n,
|
|
1133
|
+
pageIndex: r
|
|
1134
|
+
};
|
|
1135
|
+
});
|
|
1136
|
+
}, e.resetPageIndex = (t) => {
|
|
1137
|
+
var n;
|
|
1138
|
+
e.setPageIndex(t ? Et : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageIndex) ?? Et);
|
|
1139
|
+
}, e.resetPageSize = (t) => {
|
|
1140
|
+
var n;
|
|
1141
|
+
e.setPageSize(t ? Dt : ((n = e.initialState) == null || (n = n.pagination) == null ? void 0 : n.pageSize) ?? Dt);
|
|
1142
|
+
}, e.setPageSize = (t) => {
|
|
1143
|
+
e.setPagination((e) => {
|
|
1144
|
+
let n = Math.max(1, R(t, e.pageSize)), r = e.pageSize * e.pageIndex, i = Math.floor(r / n);
|
|
1145
|
+
return {
|
|
1146
|
+
...e,
|
|
1147
|
+
pageIndex: i,
|
|
1148
|
+
pageSize: n
|
|
1149
|
+
};
|
|
1150
|
+
});
|
|
1151
|
+
}, e.setPageCount = (t) => e.setPagination((n) => {
|
|
1152
|
+
let r = R(t, e.options.pageCount ?? -1);
|
|
1153
|
+
return typeof r == "number" && (r = Math.max(-1, r)), {
|
|
1154
|
+
...n,
|
|
1155
|
+
pageCount: r
|
|
1156
|
+
};
|
|
1157
|
+
}), e.getPageOptions = B(() => [e.getPageCount()], (e) => {
|
|
1158
|
+
let t = [];
|
|
1159
|
+
return e && e > 0 && (t = [...Array(e)].fill(null).map((e, t) => t)), t;
|
|
1160
|
+
}, V(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
1161
|
+
let { pageIndex: t } = e.getState().pagination, n = e.getPageCount();
|
|
1162
|
+
return n === -1 ? !0 : n === 0 ? !1 : t < n - 1;
|
|
1163
|
+
}, e.previousPage = () => e.setPageIndex((e) => e - 1), e.nextPage = () => e.setPageIndex((e) => e + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => e.options.pageCount ?? Math.ceil(e.getRowCount() / e.getState().pagination.pageSize), e.getRowCount = () => e.options.rowCount ?? e.getPrePaginationRowModel().rows.length;
|
|
1164
|
+
}
|
|
1165
|
+
}, At = () => ({
|
|
1166
|
+
top: [],
|
|
1167
|
+
bottom: []
|
|
1168
|
+
}), jt = {
|
|
1169
|
+
getInitialState: (e) => ({
|
|
1170
|
+
rowPinning: At(),
|
|
1171
|
+
...e
|
|
1172
|
+
}),
|
|
1173
|
+
getDefaultOptions: (e) => ({ onRowPinningChange: z("rowPinning", e) }),
|
|
1174
|
+
createRow: (e, t) => {
|
|
1175
|
+
e.pin = (n, r, i) => {
|
|
1176
|
+
let a = r ? e.getLeafRows().map((e) => {
|
|
1177
|
+
let { id: t } = e;
|
|
1178
|
+
return t;
|
|
1179
|
+
}) : [], o = i ? e.getParentRows().map((e) => {
|
|
1180
|
+
let { id: t } = e;
|
|
1181
|
+
return t;
|
|
1182
|
+
}) : [], s = new Set([
|
|
1183
|
+
...o,
|
|
1184
|
+
e.id,
|
|
1185
|
+
...a
|
|
1186
|
+
]);
|
|
1187
|
+
t.setRowPinning((e) => n === "bottom" ? {
|
|
1188
|
+
top: (e?.top ?? []).filter((e) => !(s != null && s.has(e))),
|
|
1189
|
+
bottom: [...(e?.bottom ?? []).filter((e) => !(s != null && s.has(e))), ...Array.from(s)]
|
|
1190
|
+
} : n === "top" ? {
|
|
1191
|
+
top: [...(e?.top ?? []).filter((e) => !(s != null && s.has(e))), ...Array.from(s)],
|
|
1192
|
+
bottom: (e?.bottom ?? []).filter((e) => !(s != null && s.has(e)))
|
|
1193
|
+
} : {
|
|
1194
|
+
top: (e?.top ?? []).filter((e) => !(s != null && s.has(e))),
|
|
1195
|
+
bottom: (e?.bottom ?? []).filter((e) => !(s != null && s.has(e)))
|
|
1196
|
+
});
|
|
1197
|
+
}, e.getCanPin = () => {
|
|
1198
|
+
let { enableRowPinning: n, enablePinning: r } = t.options;
|
|
1199
|
+
return typeof n == "function" ? n(e) : n ?? r ?? !0;
|
|
1200
|
+
}, e.getIsPinned = () => {
|
|
1201
|
+
let n = [e.id], { top: r, bottom: i } = t.getState().rowPinning, a = n.some((e) => r?.includes(e)), o = n.some((e) => i?.includes(e));
|
|
1202
|
+
return a ? "top" : o ? "bottom" : !1;
|
|
1203
|
+
}, e.getPinnedIndex = () => {
|
|
1204
|
+
let n = e.getIsPinned();
|
|
1205
|
+
return n ? ((n === "top" ? t.getTopRows() : t.getBottomRows())?.map((e) => {
|
|
1206
|
+
let { id: t } = e;
|
|
1207
|
+
return t;
|
|
1208
|
+
}))?.indexOf(e.id) ?? -1 : -1;
|
|
1209
|
+
};
|
|
1210
|
+
},
|
|
1211
|
+
createTable: (e) => {
|
|
1212
|
+
e.setRowPinning = (t) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(t), e.resetRowPinning = (t) => e.setRowPinning(t ? At() : e.initialState?.rowPinning ?? At()), e.getIsSomeRowsPinned = (t) => {
|
|
1213
|
+
let n = e.getState().rowPinning;
|
|
1214
|
+
return t ? !!n[t]?.length : !!(n.top?.length || n.bottom?.length);
|
|
1215
|
+
}, e._getPinnedRows = (t, n, r) => (e.options.keepPinnedRows ?? !0 ? (n ?? []).map((t) => {
|
|
1216
|
+
let n = e.getRow(t, !0);
|
|
1217
|
+
return n.getIsAllParentsExpanded() ? n : null;
|
|
1218
|
+
}) : (n ?? []).map((e) => t.find((t) => t.id === e))).filter(Boolean).map((e) => ({
|
|
1219
|
+
...e,
|
|
1220
|
+
position: r
|
|
1221
|
+
})), e.getTopRows = B(() => [e.getRowModel().rows, e.getState().rowPinning.top], (t, n) => e._getPinnedRows(t, n, "top"), V(e.options, "debugRows", "getTopRows")), e.getBottomRows = B(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (t, n) => e._getPinnedRows(t, n, "bottom"), V(e.options, "debugRows", "getBottomRows")), e.getCenterRows = B(() => [
|
|
1222
|
+
e.getRowModel().rows,
|
|
1223
|
+
e.getState().rowPinning.top,
|
|
1224
|
+
e.getState().rowPinning.bottom
|
|
1225
|
+
], (e, t, n) => {
|
|
1226
|
+
let r = new Set([...t ?? [], ...n ?? []]);
|
|
1227
|
+
return e.filter((e) => !r.has(e.id));
|
|
1228
|
+
}, V(e.options, "debugRows", "getCenterRows"));
|
|
1229
|
+
}
|
|
1230
|
+
}, Mt = {
|
|
1231
|
+
getInitialState: (e) => ({
|
|
1232
|
+
rowSelection: {},
|
|
1233
|
+
...e
|
|
1234
|
+
}),
|
|
1235
|
+
getDefaultOptions: (e) => ({
|
|
1236
|
+
onRowSelectionChange: z("rowSelection", e),
|
|
1237
|
+
enableRowSelection: !0,
|
|
1238
|
+
enableMultiRowSelection: !0,
|
|
1239
|
+
enableSubRowSelection: !0
|
|
1240
|
+
}),
|
|
1241
|
+
createTable: (e) => {
|
|
1242
|
+
e.setRowSelection = (t) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(t), e.resetRowSelection = (t) => e.setRowSelection(t ? {} : e.initialState.rowSelection ?? {}), e.toggleAllRowsSelected = (t) => {
|
|
1243
|
+
e.setRowSelection((n) => {
|
|
1244
|
+
t = t === void 0 ? !e.getIsAllRowsSelected() : t;
|
|
1245
|
+
let r = { ...n }, i = e.getPreGroupedRowModel().flatRows;
|
|
1246
|
+
return t ? i.forEach((e) => {
|
|
1247
|
+
e.getCanSelect() && (r[e.id] = !0);
|
|
1248
|
+
}) : i.forEach((e) => {
|
|
1249
|
+
delete r[e.id];
|
|
1250
|
+
}), r;
|
|
1251
|
+
});
|
|
1252
|
+
}, e.toggleAllPageRowsSelected = (t) => e.setRowSelection((n) => {
|
|
1253
|
+
let r = t === void 0 ? !e.getIsAllPageRowsSelected() : t, i = { ...n };
|
|
1254
|
+
return e.getRowModel().rows.forEach((t) => {
|
|
1255
|
+
Nt(i, t.id, r, !0, e);
|
|
1256
|
+
}), i;
|
|
1257
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = B(() => [e.getState().rowSelection, e.getCoreRowModel()], (t, n) => Object.keys(t).length ? Pt(e, n) : {
|
|
1258
|
+
rows: [],
|
|
1259
|
+
flatRows: [],
|
|
1260
|
+
rowsById: {}
|
|
1261
|
+
}, V(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = B(() => [e.getState().rowSelection, e.getFilteredRowModel()], (t, n) => Object.keys(t).length ? Pt(e, n) : {
|
|
1262
|
+
rows: [],
|
|
1263
|
+
flatRows: [],
|
|
1264
|
+
rowsById: {}
|
|
1265
|
+
}, V(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = B(() => [e.getState().rowSelection, e.getSortedRowModel()], (t, n) => Object.keys(t).length ? Pt(e, n) : {
|
|
1266
|
+
rows: [],
|
|
1267
|
+
flatRows: [],
|
|
1268
|
+
rowsById: {}
|
|
1269
|
+
}, V(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
1270
|
+
let t = e.getFilteredRowModel().flatRows, { rowSelection: n } = e.getState(), r = !!(t.length && Object.keys(n).length);
|
|
1271
|
+
return r && t.some((e) => e.getCanSelect() && !n[e.id]) && (r = !1), r;
|
|
1272
|
+
}, e.getIsAllPageRowsSelected = () => {
|
|
1273
|
+
let t = e.getPaginationRowModel().flatRows.filter((e) => e.getCanSelect()), { rowSelection: n } = e.getState(), r = !!t.length;
|
|
1274
|
+
return r && t.some((e) => !n[e.id]) && (r = !1), r;
|
|
1275
|
+
}, e.getIsSomeRowsSelected = () => {
|
|
1276
|
+
let t = Object.keys(e.getState().rowSelection ?? {}).length;
|
|
1277
|
+
return t > 0 && t < e.getFilteredRowModel().flatRows.length;
|
|
1278
|
+
}, e.getIsSomePageRowsSelected = () => {
|
|
1279
|
+
let t = e.getPaginationRowModel().flatRows;
|
|
1280
|
+
return e.getIsAllPageRowsSelected() ? !1 : t.filter((e) => e.getCanSelect()).some((e) => e.getIsSelected() || e.getIsSomeSelected());
|
|
1281
|
+
}, e.getToggleAllRowsSelectedHandler = () => (t) => {
|
|
1282
|
+
e.toggleAllRowsSelected(t.target.checked);
|
|
1283
|
+
}, e.getToggleAllPageRowsSelectedHandler = () => (t) => {
|
|
1284
|
+
e.toggleAllPageRowsSelected(t.target.checked);
|
|
1285
|
+
};
|
|
1286
|
+
},
|
|
1287
|
+
createRow: (e, t) => {
|
|
1288
|
+
e.toggleSelected = (n, r) => {
|
|
1289
|
+
let i = e.getIsSelected();
|
|
1290
|
+
t.setRowSelection((a) => {
|
|
1291
|
+
if (n = n === void 0 ? !i : n, e.getCanSelect() && i === n) return a;
|
|
1292
|
+
let o = { ...a };
|
|
1293
|
+
return Nt(o, e.id, n, r?.selectChildren ?? !0, t), o;
|
|
1294
|
+
});
|
|
1295
|
+
}, e.getIsSelected = () => {
|
|
1296
|
+
let { rowSelection: n } = t.getState();
|
|
1297
|
+
return Ft(e, n);
|
|
1298
|
+
}, e.getIsSomeSelected = () => {
|
|
1299
|
+
let { rowSelection: n } = t.getState();
|
|
1300
|
+
return It(e, n) === "some";
|
|
1301
|
+
}, e.getIsAllSubRowsSelected = () => {
|
|
1302
|
+
let { rowSelection: n } = t.getState();
|
|
1303
|
+
return It(e, n) === "all";
|
|
1304
|
+
}, e.getCanSelect = () => typeof t.options.enableRowSelection == "function" ? t.options.enableRowSelection(e) : t.options.enableRowSelection ?? !0, e.getCanSelectSubRows = () => typeof t.options.enableSubRowSelection == "function" ? t.options.enableSubRowSelection(e) : t.options.enableSubRowSelection ?? !0, e.getCanMultiSelect = () => typeof t.options.enableMultiRowSelection == "function" ? t.options.enableMultiRowSelection(e) : t.options.enableMultiRowSelection ?? !0, e.getToggleSelectedHandler = () => {
|
|
1305
|
+
let t = e.getCanSelect();
|
|
1306
|
+
return (n) => {
|
|
1307
|
+
t && e.toggleSelected(n.target?.checked);
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1310
|
+
}
|
|
1311
|
+
}, Nt = (e, t, n, r, i) => {
|
|
1312
|
+
var a;
|
|
1313
|
+
let o = i.getRow(t, !0);
|
|
1314
|
+
n ? (o.getCanMultiSelect() || Object.keys(e).forEach((t) => delete e[t]), o.getCanSelect() && (e[t] = !0)) : delete e[t], r && (a = o.subRows) != null && a.length && o.getCanSelectSubRows() && o.subRows.forEach((t) => Nt(e, t.id, n, r, i));
|
|
1315
|
+
};
|
|
1316
|
+
function Pt(e, t) {
|
|
1317
|
+
let n = e.getState().rowSelection, r = [], i = {}, a = function(e, t) {
|
|
1318
|
+
return e.map((e) => {
|
|
1319
|
+
var t;
|
|
1320
|
+
let o = Ft(e, n);
|
|
1321
|
+
if (o && (r.push(e), i[e.id] = e), (t = e.subRows) != null && t.length && (e = {
|
|
1322
|
+
...e,
|
|
1323
|
+
subRows: a(e.subRows)
|
|
1324
|
+
}), o) return e;
|
|
1325
|
+
}).filter(Boolean);
|
|
1326
|
+
};
|
|
1327
|
+
return {
|
|
1328
|
+
rows: a(t.rows),
|
|
1329
|
+
flatRows: r,
|
|
1330
|
+
rowsById: i
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
function Ft(e, t) {
|
|
1334
|
+
return t[e.id] ?? !1;
|
|
1335
|
+
}
|
|
1336
|
+
function It(e, t, n) {
|
|
1337
|
+
var r;
|
|
1338
|
+
if (!((r = e.subRows) != null && r.length)) return !1;
|
|
1339
|
+
let i = !0, a = !1;
|
|
1340
|
+
return e.subRows.forEach((e) => {
|
|
1341
|
+
if (!(a && !i) && (e.getCanSelect() && (Ft(e, t) ? a = !0 : i = !1), e.subRows && e.subRows.length)) {
|
|
1342
|
+
let n = It(e, t);
|
|
1343
|
+
n === "all" ? a = !0 : (n === "some" && (a = !0), i = !1);
|
|
1344
|
+
}
|
|
1345
|
+
}), i ? "all" : a ? "some" : !1;
|
|
1346
|
+
}
|
|
1347
|
+
var Lt = /([0-9]+)/gm, Rt = (e, t, n) => Gt(J(e.getValue(n)).toLowerCase(), J(t.getValue(n)).toLowerCase()), zt = (e, t, n) => Gt(J(e.getValue(n)), J(t.getValue(n))), Bt = (e, t, n) => Wt(J(e.getValue(n)).toLowerCase(), J(t.getValue(n)).toLowerCase()), Vt = (e, t, n) => Wt(J(e.getValue(n)), J(t.getValue(n))), Ht = (e, t, n) => {
|
|
1348
|
+
let r = e.getValue(n), i = t.getValue(n);
|
|
1349
|
+
return r > i ? 1 : r < i ? -1 : 0;
|
|
1350
|
+
}, Ut = (e, t, n) => Wt(e.getValue(n), t.getValue(n));
|
|
1351
|
+
function Wt(e, t) {
|
|
1352
|
+
return e === t ? 0 : e > t ? 1 : -1;
|
|
1353
|
+
}
|
|
1354
|
+
function J(e) {
|
|
1355
|
+
return typeof e == "number" ? isNaN(e) || e === Infinity || e === -Infinity ? "" : String(e) : typeof e == "string" ? e : "";
|
|
1356
|
+
}
|
|
1357
|
+
function Gt(e, t) {
|
|
1358
|
+
let n = e.split(Lt).filter(Boolean), r = t.split(Lt).filter(Boolean);
|
|
1359
|
+
for (; n.length && r.length;) {
|
|
1360
|
+
let e = n.shift(), t = r.shift(), i = parseInt(e, 10), a = parseInt(t, 10), o = [i, a].sort();
|
|
1361
|
+
if (isNaN(o[0])) {
|
|
1362
|
+
if (e > t) return 1;
|
|
1363
|
+
if (t > e) return -1;
|
|
1364
|
+
continue;
|
|
1365
|
+
}
|
|
1366
|
+
if (isNaN(o[1])) return isNaN(i) ? -1 : 1;
|
|
1367
|
+
if (i > a) return 1;
|
|
1368
|
+
if (a > i) return -1;
|
|
1369
|
+
}
|
|
1370
|
+
return n.length - r.length;
|
|
1371
|
+
}
|
|
1372
|
+
var Y = {
|
|
1373
|
+
alphanumeric: Rt,
|
|
1374
|
+
alphanumericCaseSensitive: zt,
|
|
1375
|
+
text: Bt,
|
|
1376
|
+
textCaseSensitive: Vt,
|
|
1377
|
+
datetime: Ht,
|
|
1378
|
+
basic: Ut
|
|
1379
|
+
}, Kt = [
|
|
1380
|
+
Xe,
|
|
1381
|
+
St,
|
|
1382
|
+
pt,
|
|
1383
|
+
ht,
|
|
1384
|
+
Qe,
|
|
1385
|
+
ct,
|
|
1386
|
+
Ct,
|
|
1387
|
+
wt,
|
|
1388
|
+
{
|
|
1389
|
+
getInitialState: (e) => ({
|
|
1390
|
+
sorting: [],
|
|
1391
|
+
...e
|
|
1392
|
+
}),
|
|
1393
|
+
getDefaultColumnDef: () => ({
|
|
1394
|
+
sortingFn: "auto",
|
|
1395
|
+
sortUndefined: 1
|
|
1396
|
+
}),
|
|
1397
|
+
getDefaultOptions: (e) => ({
|
|
1398
|
+
onSortingChange: z("sorting", e),
|
|
1399
|
+
isMultiSortEvent: (e) => e.shiftKey
|
|
1400
|
+
}),
|
|
1401
|
+
createColumn: (e, t) => {
|
|
1402
|
+
e.getAutoSortingFn = () => {
|
|
1403
|
+
let n = t.getFilteredRowModel().flatRows.slice(10), r = !1;
|
|
1404
|
+
for (let t of n) {
|
|
1405
|
+
let n = t?.getValue(e.id);
|
|
1406
|
+
if (Object.prototype.toString.call(n) === "[object Date]") return Y.datetime;
|
|
1407
|
+
if (typeof n == "string" && (r = !0, n.split(Lt).length > 1)) return Y.alphanumeric;
|
|
1408
|
+
}
|
|
1409
|
+
return r ? Y.text : Y.basic;
|
|
1410
|
+
}, e.getAutoSortDir = () => typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id) == "string" ? "asc" : "desc", e.getSortingFn = () => {
|
|
1411
|
+
if (!e) throw Error();
|
|
1412
|
+
return We(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : t.options.sortingFns?.[e.columnDef.sortingFn] ?? Y[e.columnDef.sortingFn];
|
|
1413
|
+
}, e.toggleSorting = (n, r) => {
|
|
1414
|
+
let i = e.getNextSortingOrder(), a = n != null;
|
|
1415
|
+
t.setSorting((o) => {
|
|
1416
|
+
let s = o?.find((t) => t.id === e.id), c = o?.findIndex((t) => t.id === e.id), l = [], u, d = a ? n : i === "desc";
|
|
1417
|
+
return u = o != null && o.length && e.getCanMultiSort() && r ? s ? "toggle" : "add" : o != null && o.length && c !== o.length - 1 ? "replace" : s ? "toggle" : "replace", u === "toggle" && (a || i || (u = "remove")), u === "add" ? (l = [...o, {
|
|
1418
|
+
id: e.id,
|
|
1419
|
+
desc: d
|
|
1420
|
+
}], l.splice(0, l.length - (t.options.maxMultiSortColCount ?? 2 ** 53 - 1))) : l = u === "toggle" ? o.map((t) => t.id === e.id ? {
|
|
1421
|
+
...t,
|
|
1422
|
+
desc: d
|
|
1423
|
+
} : t) : u === "remove" ? o.filter((t) => t.id !== e.id) : [{
|
|
1424
|
+
id: e.id,
|
|
1425
|
+
desc: d
|
|
1426
|
+
}], l;
|
|
1427
|
+
});
|
|
1428
|
+
}, e.getFirstSortDir = () => e.columnDef.sortDescFirst ?? t.options.sortDescFirst ?? e.getAutoSortDir() === "desc" ? "desc" : "asc", e.getNextSortingOrder = (n) => {
|
|
1429
|
+
let r = e.getFirstSortDir(), i = e.getIsSorted();
|
|
1430
|
+
return i ? i !== r && (t.options.enableSortingRemoval ?? !0) && (!n || (t.options.enableMultiRemove ?? !0)) ? !1 : i === "desc" ? "asc" : "desc" : r;
|
|
1431
|
+
}, e.getCanSort = () => (e.columnDef.enableSorting ?? !0) && (t.options.enableSorting ?? !0) && !!e.accessorFn, e.getCanMultiSort = () => e.columnDef.enableMultiSort ?? t.options.enableMultiSort ?? !!e.accessorFn, e.getIsSorted = () => {
|
|
1432
|
+
let n = t.getState().sorting?.find((t) => t.id === e.id);
|
|
1433
|
+
return n ? n.desc ? "desc" : "asc" : !1;
|
|
1434
|
+
}, e.getSortIndex = () => t.getState().sorting?.findIndex((t) => t.id === e.id) ?? -1, e.clearSorting = () => {
|
|
1435
|
+
t.setSorting((t) => t != null && t.length ? t.filter((t) => t.id !== e.id) : []);
|
|
1436
|
+
}, e.getToggleSortingHandler = () => {
|
|
1437
|
+
let n = e.getCanSort();
|
|
1438
|
+
return (r) => {
|
|
1439
|
+
n && (r.persist == null || r.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? t.options.isMultiSortEvent == null ? void 0 : t.options.isMultiSortEvent(r) : !1));
|
|
1440
|
+
};
|
|
1441
|
+
};
|
|
1442
|
+
},
|
|
1443
|
+
createTable: (e) => {
|
|
1444
|
+
e.setSorting = (t) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(t), e.resetSorting = (t) => {
|
|
1445
|
+
e.setSorting(t ? [] : e.initialState?.sorting ?? []);
|
|
1446
|
+
}, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
dt,
|
|
1450
|
+
Tt,
|
|
1451
|
+
kt,
|
|
1452
|
+
jt,
|
|
1453
|
+
Mt,
|
|
1454
|
+
vt
|
|
1455
|
+
];
|
|
1456
|
+
function qt(e) {
|
|
1457
|
+
process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
|
|
1458
|
+
let t = [...Kt, ...e._features ?? []], n = { _features: t }, r = n._features.reduce((e, t) => Object.assign(e, t.getDefaultOptions == null ? void 0 : t.getDefaultOptions(n)), {}), i = (e) => n.options.mergeOptions ? n.options.mergeOptions(r, e) : {
|
|
1459
|
+
...r,
|
|
1460
|
+
...e
|
|
1461
|
+
}, a = { ...e.initialState ?? {} };
|
|
1462
|
+
n._features.forEach((e) => {
|
|
1463
|
+
a = (e.getInitialState == null ? void 0 : e.getInitialState(a)) ?? a;
|
|
1464
|
+
});
|
|
1465
|
+
let o = [], s = !1, c = {
|
|
1466
|
+
_features: t,
|
|
1467
|
+
options: {
|
|
1468
|
+
...r,
|
|
1469
|
+
...e
|
|
1470
|
+
},
|
|
1471
|
+
initialState: a,
|
|
1472
|
+
_queue: (e) => {
|
|
1473
|
+
o.push(e), s || (s = !0, Promise.resolve().then(() => {
|
|
1474
|
+
for (; o.length;) o.shift()();
|
|
1475
|
+
s = !1;
|
|
1476
|
+
}).catch((e) => setTimeout(() => {
|
|
1477
|
+
throw e;
|
|
1478
|
+
})));
|
|
1479
|
+
},
|
|
1480
|
+
reset: () => {
|
|
1481
|
+
n.setState(n.initialState);
|
|
1482
|
+
},
|
|
1483
|
+
setOptions: (e) => {
|
|
1484
|
+
n.options = i(R(e, n.options));
|
|
1485
|
+
},
|
|
1486
|
+
getState: () => n.options.state,
|
|
1487
|
+
setState: (e) => {
|
|
1488
|
+
n.options.onStateChange == null || n.options.onStateChange(e);
|
|
1489
|
+
},
|
|
1490
|
+
_getRowId: (e, t, r) => (n.options.getRowId == null ? void 0 : n.options.getRowId(e, t, r)) ?? `${r ? [r.id, t].join(".") : t}`,
|
|
1491
|
+
getCoreRowModel: () => (n._getCoreRowModel ||= n.options.getCoreRowModel(n), n._getCoreRowModel()),
|
|
1492
|
+
getRowModel: () => n.getPaginationRowModel(),
|
|
1493
|
+
getRow: (e, t) => {
|
|
1494
|
+
let r = (t ? n.getPrePaginationRowModel() : n.getRowModel()).rowsById[e];
|
|
1495
|
+
if (!r && (r = n.getCoreRowModel().rowsById[e], !r)) throw process.env.NODE_ENV === "production" ? Error() : Error(`getRow could not find row with ID: ${e}`);
|
|
1496
|
+
return r;
|
|
1497
|
+
},
|
|
1498
|
+
_getDefaultColumnDef: B(() => [n.options.defaultColumn], (e) => (e ??= {}, {
|
|
1499
|
+
header: (e) => {
|
|
1500
|
+
let t = e.header.column.columnDef;
|
|
1501
|
+
return t.accessorKey ? t.accessorKey : t.accessorFn ? t.id : null;
|
|
1502
|
+
},
|
|
1503
|
+
cell: (e) => {
|
|
1504
|
+
var t;
|
|
1505
|
+
return ((t = e.renderValue()) == null || t.toString == null ? void 0 : t.toString()) ?? null;
|
|
1506
|
+
},
|
|
1507
|
+
...n._features.reduce((e, t) => Object.assign(e, t.getDefaultColumnDef == null ? void 0 : t.getDefaultColumnDef()), {}),
|
|
1508
|
+
...e
|
|
1509
|
+
}), V(e, "debugColumns", "_getDefaultColumnDef")),
|
|
1510
|
+
_getColumnDefs: () => n.options.columns,
|
|
1511
|
+
getAllColumns: B(() => [n._getColumnDefs()], (e) => {
|
|
1512
|
+
let t = function(e, r, i) {
|
|
1513
|
+
return i === void 0 && (i = 0), e.map((e) => {
|
|
1514
|
+
let a = Je(n, e, i, r), o = e;
|
|
1515
|
+
return a.columns = o.columns ? t(o.columns, a, i + 1) : [], a;
|
|
1516
|
+
});
|
|
1517
|
+
};
|
|
1518
|
+
return t(e);
|
|
1519
|
+
}, V(e, "debugColumns", "getAllColumns")),
|
|
1520
|
+
getAllFlatColumns: B(() => [n.getAllColumns()], (e) => e.flatMap((e) => e.getFlatColumns()), V(e, "debugColumns", "getAllFlatColumns")),
|
|
1521
|
+
_getAllFlatColumnsById: B(() => [n.getAllFlatColumns()], (e) => e.reduce((e, t) => (e[t.id] = t, e), {}), V(e, "debugColumns", "getAllFlatColumnsById")),
|
|
1522
|
+
getAllLeafColumns: B(() => [n.getAllColumns(), n._getOrderColumnsFn()], (e, t) => t(e.flatMap((e) => e.getLeafColumns())), V(e, "debugColumns", "getAllLeafColumns")),
|
|
1523
|
+
getColumn: (e) => {
|
|
1524
|
+
let t = n._getAllFlatColumnsById()[e];
|
|
1525
|
+
return process.env.NODE_ENV !== "production" && !t && console.error(`[Table] Column with id '${e}' does not exist.`), t;
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
Object.assign(n, c);
|
|
1529
|
+
for (let e = 0; e < n._features.length; e++) {
|
|
1530
|
+
let t = n._features[e];
|
|
1531
|
+
t == null || t.createTable == null || t.createTable(n);
|
|
1532
|
+
}
|
|
1533
|
+
return n;
|
|
1534
|
+
}
|
|
1535
|
+
function Jt() {
|
|
1536
|
+
return (e) => B(() => [e.options.data], (t) => {
|
|
1537
|
+
let n = {
|
|
1538
|
+
rows: [],
|
|
1539
|
+
flatRows: [],
|
|
1540
|
+
rowsById: {}
|
|
1541
|
+
}, r = function(t, i, a) {
|
|
1542
|
+
i === void 0 && (i = 0);
|
|
1543
|
+
let o = [];
|
|
1544
|
+
for (let c = 0; c < t.length; c++) {
|
|
1545
|
+
let l = Ze(e, e._getRowId(t[c], c, a), t[c], c, i, void 0, a?.id);
|
|
1546
|
+
if (n.flatRows.push(l), n.rowsById[l.id] = l, o.push(l), e.options.getSubRows) {
|
|
1547
|
+
var s;
|
|
1548
|
+
l.originalSubRows = e.options.getSubRows(t[c], c), (s = l.originalSubRows) != null && s.length && (l.subRows = r(l.originalSubRows, i + 1, l));
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
return o;
|
|
1552
|
+
};
|
|
1553
|
+
return n.rows = r(t), n;
|
|
1554
|
+
}, V(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
1555
|
+
}
|
|
1556
|
+
function Yt(e) {
|
|
1557
|
+
let t = [], n = (e) => {
|
|
1558
|
+
var r;
|
|
1559
|
+
t.push(e), (r = e.subRows) != null && r.length && e.getIsExpanded() && e.subRows.forEach(n);
|
|
1560
|
+
};
|
|
1561
|
+
return e.rows.forEach(n), {
|
|
1562
|
+
rows: t,
|
|
1563
|
+
flatRows: e.flatRows,
|
|
1564
|
+
rowsById: e.rowsById
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
function Xt(e, t, n) {
|
|
1568
|
+
return n.options.filterFromLeafRows ? Zt(e, t, n) : Qt(e, t, n);
|
|
1569
|
+
}
|
|
1570
|
+
function Zt(e, t, n) {
|
|
1571
|
+
let r = [], i = {}, a = n.options.maxLeafRowFilterDepth ?? 100, o = function(e, s) {
|
|
1572
|
+
s === void 0 && (s = 0);
|
|
1573
|
+
let c = [];
|
|
1574
|
+
for (let u = 0; u < e.length; u++) {
|
|
1575
|
+
var l;
|
|
1576
|
+
let d = e[u], f = Ze(n, d.id, d.original, d.index, d.depth, void 0, d.parentId);
|
|
1577
|
+
if (f.columnFilters = d.columnFilters, (l = d.subRows) != null && l.length && s < a) {
|
|
1578
|
+
if (f.subRows = o(d.subRows, s + 1), d = f, t(d) && !f.subRows.length) {
|
|
1579
|
+
c.push(d), i[d.id] = d, r.push(d);
|
|
1580
|
+
continue;
|
|
1581
|
+
}
|
|
1582
|
+
if (t(d) || f.subRows.length) {
|
|
1583
|
+
c.push(d), i[d.id] = d, r.push(d);
|
|
1584
|
+
continue;
|
|
1585
|
+
}
|
|
1586
|
+
} else d = f, t(d) && (c.push(d), i[d.id] = d, r.push(d));
|
|
1587
|
+
}
|
|
1588
|
+
return c;
|
|
1589
|
+
};
|
|
1590
|
+
return {
|
|
1591
|
+
rows: o(e),
|
|
1592
|
+
flatRows: r,
|
|
1593
|
+
rowsById: i
|
|
1594
|
+
};
|
|
1595
|
+
}
|
|
1596
|
+
function Qt(e, t, n) {
|
|
1597
|
+
let r = [], i = {}, a = n.options.maxLeafRowFilterDepth ?? 100, o = function(e, s) {
|
|
1598
|
+
s === void 0 && (s = 0);
|
|
1599
|
+
let c = [];
|
|
1600
|
+
for (let u = 0; u < e.length; u++) {
|
|
1601
|
+
let d = e[u];
|
|
1602
|
+
if (t(d)) {
|
|
1603
|
+
var l;
|
|
1604
|
+
if ((l = d.subRows) != null && l.length && s < a) {
|
|
1605
|
+
let e = Ze(n, d.id, d.original, d.index, d.depth, void 0, d.parentId);
|
|
1606
|
+
e.subRows = o(d.subRows, s + 1), d = e;
|
|
1607
|
+
}
|
|
1608
|
+
c.push(d), r.push(d), i[d.id] = d;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
return c;
|
|
1612
|
+
};
|
|
1613
|
+
return {
|
|
1614
|
+
rows: o(e),
|
|
1615
|
+
flatRows: r,
|
|
1616
|
+
rowsById: i
|
|
1617
|
+
};
|
|
1618
|
+
}
|
|
1619
|
+
function $t() {
|
|
1620
|
+
return (e) => B(() => [
|
|
1621
|
+
e.getPreFilteredRowModel(),
|
|
1622
|
+
e.getState().columnFilters,
|
|
1623
|
+
e.getState().globalFilter
|
|
1624
|
+
], (t, n, r) => {
|
|
1625
|
+
if (!t.rows.length || !(n != null && n.length) && !r) {
|
|
1626
|
+
for (let e = 0; e < t.flatRows.length; e++) t.flatRows[e].columnFilters = {}, t.flatRows[e].columnFiltersMeta = {};
|
|
1627
|
+
return t;
|
|
1628
|
+
}
|
|
1629
|
+
let i = [], a = [];
|
|
1630
|
+
(n ?? []).forEach((t) => {
|
|
1631
|
+
let n = e.getColumn(t.id);
|
|
1632
|
+
if (!n) return;
|
|
1633
|
+
let r = n.getFilterFn();
|
|
1634
|
+
if (!r) {
|
|
1635
|
+
process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${n.id}.`);
|
|
1636
|
+
return;
|
|
1637
|
+
}
|
|
1638
|
+
i.push({
|
|
1639
|
+
id: t.id,
|
|
1640
|
+
filterFn: r,
|
|
1641
|
+
resolvedValue: (r.resolveFilterValue == null ? void 0 : r.resolveFilterValue(t.value)) ?? t.value
|
|
1642
|
+
});
|
|
1643
|
+
});
|
|
1644
|
+
let o = (n ?? []).map((e) => e.id), s = e.getGlobalFilterFn(), c = e.getAllLeafColumns().filter((e) => e.getCanGlobalFilter());
|
|
1645
|
+
r && s && c.length && (o.push("__global__"), c.forEach((e) => {
|
|
1646
|
+
a.push({
|
|
1647
|
+
id: e.id,
|
|
1648
|
+
filterFn: s,
|
|
1649
|
+
resolvedValue: (s.resolveFilterValue == null ? void 0 : s.resolveFilterValue(r)) ?? r
|
|
1650
|
+
});
|
|
1651
|
+
}));
|
|
1652
|
+
let l, u;
|
|
1653
|
+
for (let e = 0; e < t.flatRows.length; e++) {
|
|
1654
|
+
let n = t.flatRows[e];
|
|
1655
|
+
if (n.columnFilters = {}, i.length) for (let e = 0; e < i.length; e++) {
|
|
1656
|
+
l = i[e];
|
|
1657
|
+
let t = l.id;
|
|
1658
|
+
n.columnFilters[t] = l.filterFn(n, t, l.resolvedValue, (e) => {
|
|
1659
|
+
n.columnFiltersMeta[t] = e;
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
if (a.length) {
|
|
1663
|
+
for (let e = 0; e < a.length; e++) {
|
|
1664
|
+
u = a[e];
|
|
1665
|
+
let t = u.id;
|
|
1666
|
+
if (u.filterFn(n, t, u.resolvedValue, (e) => {
|
|
1667
|
+
n.columnFiltersMeta[t] = e;
|
|
1668
|
+
})) {
|
|
1669
|
+
n.columnFilters.__global__ = !0;
|
|
1670
|
+
break;
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
n.columnFilters.__global__ !== !0 && (n.columnFilters.__global__ = !1);
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
return Xt(t.rows, (e) => {
|
|
1677
|
+
for (let t = 0; t < o.length; t++) if (e.columnFilters[o[t]] === !1) return !1;
|
|
1678
|
+
return !0;
|
|
1679
|
+
}, e);
|
|
1680
|
+
}, V(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
|
|
1681
|
+
}
|
|
1682
|
+
function en(e) {
|
|
1683
|
+
return (e) => B(() => [
|
|
1684
|
+
e.getState().pagination,
|
|
1685
|
+
e.getPrePaginationRowModel(),
|
|
1686
|
+
e.options.paginateExpandedRows ? void 0 : e.getState().expanded
|
|
1687
|
+
], (t, n) => {
|
|
1688
|
+
if (!n.rows.length) return n;
|
|
1689
|
+
let { pageSize: r, pageIndex: i } = t, { rows: a, flatRows: o, rowsById: s } = n, c = r * i, l = c + r;
|
|
1690
|
+
a = a.slice(c, l);
|
|
1691
|
+
let u;
|
|
1692
|
+
u = e.options.paginateExpandedRows ? {
|
|
1693
|
+
rows: a,
|
|
1694
|
+
flatRows: o,
|
|
1695
|
+
rowsById: s
|
|
1696
|
+
} : Yt({
|
|
1697
|
+
rows: a,
|
|
1698
|
+
flatRows: o,
|
|
1699
|
+
rowsById: s
|
|
1700
|
+
}), u.flatRows = [];
|
|
1701
|
+
let d = (e) => {
|
|
1702
|
+
u.flatRows.push(e), e.subRows.length && e.subRows.forEach(d);
|
|
1703
|
+
};
|
|
1704
|
+
return u.rows.forEach(d), u;
|
|
1705
|
+
}, V(e.options, "debugTable", "getPaginationRowModel"));
|
|
1706
|
+
}
|
|
1707
|
+
function tn() {
|
|
1708
|
+
return (e) => B(() => [e.getState().sorting, e.getPreSortedRowModel()], (t, n) => {
|
|
1709
|
+
if (!n.rows.length || !(t != null && t.length)) return n;
|
|
1710
|
+
let r = e.getState().sorting, i = [], a = r.filter((t) => e.getColumn(t.id)?.getCanSort()), o = {};
|
|
1711
|
+
a.forEach((t) => {
|
|
1712
|
+
let n = e.getColumn(t.id);
|
|
1713
|
+
n && (o[t.id] = {
|
|
1714
|
+
sortUndefined: n.columnDef.sortUndefined,
|
|
1715
|
+
invertSorting: n.columnDef.invertSorting,
|
|
1716
|
+
sortingFn: n.getSortingFn()
|
|
1717
|
+
});
|
|
1718
|
+
});
|
|
1719
|
+
let s = (e) => {
|
|
1720
|
+
let t = e.map((e) => ({ ...e }));
|
|
1721
|
+
return t.sort((e, t) => {
|
|
1722
|
+
for (let n = 0; n < a.length; n += 1) {
|
|
1723
|
+
let r = a[n], i = o[r.id], s = i.sortUndefined, c = r?.desc ?? !1, l = 0;
|
|
1724
|
+
if (s) {
|
|
1725
|
+
let n = e.getValue(r.id), i = t.getValue(r.id), a = n === void 0, o = i === void 0;
|
|
1726
|
+
if (a || o) {
|
|
1727
|
+
if (s === "first") return a ? -1 : 1;
|
|
1728
|
+
if (s === "last") return a ? 1 : -1;
|
|
1729
|
+
l = a && o ? 0 : a ? s : -s;
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
if (l === 0 && (l = i.sortingFn(e, t, r.id)), l !== 0) return c && (l *= -1), i.invertSorting && (l *= -1), l;
|
|
1733
|
+
}
|
|
1734
|
+
return e.index - t.index;
|
|
1735
|
+
}), t.forEach((e) => {
|
|
1736
|
+
var t;
|
|
1737
|
+
i.push(e), (t = e.subRows) != null && t.length && (e.subRows = s(e.subRows));
|
|
1738
|
+
}), t;
|
|
1739
|
+
};
|
|
1740
|
+
return {
|
|
1741
|
+
rows: s(n.rows),
|
|
1742
|
+
flatRows: i,
|
|
1743
|
+
rowsById: n.rowsById
|
|
1744
|
+
};
|
|
1745
|
+
}, V(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
|
|
1746
|
+
}
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region node_modules/@tanstack/react-table/build/lib/index.mjs
|
|
1749
|
+
function nn(e) {
|
|
1750
|
+
let t = {
|
|
1751
|
+
state: {},
|
|
1752
|
+
onStateChange: () => {},
|
|
1753
|
+
renderFallbackValue: null,
|
|
1754
|
+
...e
|
|
1755
|
+
}, [n] = Ae.useState(() => ({ current: qt(t) })), [r, i] = Ae.useState(() => n.current.initialState);
|
|
1756
|
+
return n.current.setOptions((t) => ({
|
|
1757
|
+
...t,
|
|
1758
|
+
...e,
|
|
1759
|
+
state: {
|
|
1760
|
+
...r,
|
|
1761
|
+
...e.state
|
|
1762
|
+
},
|
|
1763
|
+
onStateChange: (t) => {
|
|
1764
|
+
i(t), e.onStateChange == null || e.onStateChange(t);
|
|
1765
|
+
}
|
|
1766
|
+
})), n.current;
|
|
1767
|
+
}
|
|
1768
|
+
//#endregion
|
|
1769
|
+
//#region node_modules/@iconify/react/dist/iconify.js
|
|
1770
|
+
function rn(e, t) {
|
|
1771
|
+
let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
|
|
1772
|
+
function a(e) {
|
|
1773
|
+
if (n[e]) return i[e] = [];
|
|
1774
|
+
if (!(e in i)) {
|
|
1775
|
+
i[e] = null;
|
|
1776
|
+
let t = r[e] && r[e].parent, n = t && a(t);
|
|
1777
|
+
n && (i[e] = [t].concat(n));
|
|
1778
|
+
}
|
|
1779
|
+
return i[e];
|
|
1780
|
+
}
|
|
1781
|
+
return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
|
|
1782
|
+
}
|
|
1783
|
+
var an = Object.freeze({
|
|
1784
|
+
left: 0,
|
|
1785
|
+
top: 0,
|
|
1786
|
+
width: 16,
|
|
1787
|
+
height: 16
|
|
1788
|
+
}), on = Object.freeze({
|
|
1789
|
+
rotate: 0,
|
|
1790
|
+
vFlip: !1,
|
|
1791
|
+
hFlip: !1
|
|
1792
|
+
}), sn = Object.freeze({
|
|
1793
|
+
...an,
|
|
1794
|
+
...on
|
|
1795
|
+
}), cn = Object.freeze({
|
|
1796
|
+
...sn,
|
|
1797
|
+
body: "",
|
|
1798
|
+
hidden: !1
|
|
1799
|
+
});
|
|
1800
|
+
function ln(e, t) {
|
|
1801
|
+
let n = {};
|
|
1802
|
+
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
1803
|
+
let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
1804
|
+
return r && (n.rotate = r), n;
|
|
1805
|
+
}
|
|
1806
|
+
function un(e, t) {
|
|
1807
|
+
let n = ln(e, t);
|
|
1808
|
+
for (let r in cn) r in on ? r in e && !(r in n) && (n[r] = on[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
1809
|
+
return n;
|
|
1810
|
+
}
|
|
1811
|
+
function dn(e, t, n) {
|
|
1812
|
+
let r = e.icons, i = e.aliases || Object.create(null), a = {};
|
|
1813
|
+
function o(e) {
|
|
1814
|
+
a = un(r[e] || i[e], a);
|
|
1815
|
+
}
|
|
1816
|
+
return o(t), n.forEach(o), un(e, a);
|
|
1817
|
+
}
|
|
1818
|
+
function fn(e, t) {
|
|
1819
|
+
let n = [];
|
|
1820
|
+
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
1821
|
+
e.not_found instanceof Array && e.not_found.forEach((e) => {
|
|
1822
|
+
t(e, null), n.push(e);
|
|
1823
|
+
});
|
|
1824
|
+
let r = rn(e);
|
|
1825
|
+
for (let i in r) {
|
|
1826
|
+
let a = r[i];
|
|
1827
|
+
a && (t(i, dn(e, i, a)), n.push(i));
|
|
1828
|
+
}
|
|
1829
|
+
return n;
|
|
1830
|
+
}
|
|
1831
|
+
var pn = {
|
|
1832
|
+
provider: "",
|
|
1833
|
+
aliases: {},
|
|
1834
|
+
not_found: {},
|
|
1835
|
+
...an
|
|
1836
|
+
};
|
|
1837
|
+
function mn(e, t) {
|
|
1838
|
+
for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
1839
|
+
return !0;
|
|
1840
|
+
}
|
|
1841
|
+
function hn(e) {
|
|
1842
|
+
if (typeof e != "object" || !e) return null;
|
|
1843
|
+
let t = e;
|
|
1844
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !mn(e, pn)) return null;
|
|
1845
|
+
let n = t.icons;
|
|
1846
|
+
for (let e in n) {
|
|
1847
|
+
let t = n[e];
|
|
1848
|
+
if (!e || typeof t.body != "string" || !mn(t, cn)) return null;
|
|
1849
|
+
}
|
|
1850
|
+
let r = t.aliases || Object.create(null);
|
|
1851
|
+
for (let e in r) {
|
|
1852
|
+
let t = r[e], i = t.parent;
|
|
1853
|
+
if (!e || typeof i != "string" || !n[i] && !r[i] || !mn(t, cn)) return null;
|
|
1854
|
+
}
|
|
1855
|
+
return t;
|
|
1856
|
+
}
|
|
1857
|
+
var gn = Object.create(null);
|
|
1858
|
+
function _n(e, t) {
|
|
1859
|
+
return {
|
|
1860
|
+
provider: e,
|
|
1861
|
+
prefix: t,
|
|
1862
|
+
icons: Object.create(null),
|
|
1863
|
+
missing: /* @__PURE__ */ new Set()
|
|
1864
|
+
};
|
|
1865
|
+
}
|
|
1866
|
+
function X(e, t) {
|
|
1867
|
+
let n = gn[e] || (gn[e] = Object.create(null));
|
|
1868
|
+
return n[t] || (n[t] = _n(e, t));
|
|
1869
|
+
}
|
|
1870
|
+
function vn(e, t) {
|
|
1871
|
+
return hn(t) ? fn(t, (t, n) => {
|
|
1872
|
+
n ? e.icons[t] = n : e.missing.add(t);
|
|
1873
|
+
}) : [];
|
|
1874
|
+
}
|
|
1875
|
+
function yn(e, t, n) {
|
|
1876
|
+
try {
|
|
1877
|
+
if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
|
|
1878
|
+
} catch {}
|
|
1879
|
+
return !1;
|
|
1880
|
+
}
|
|
1881
|
+
var bn = /^[a-z0-9]+(-[a-z0-9]+)*$/, xn = (e, t, n, r = "") => {
|
|
1882
|
+
let i = e.split(":");
|
|
1883
|
+
if (e.slice(0, 1) === "@") {
|
|
1884
|
+
if (i.length < 2 || i.length > 3) return null;
|
|
1885
|
+
r = i.shift().slice(1);
|
|
1886
|
+
}
|
|
1887
|
+
if (i.length > 3 || !i.length) return null;
|
|
1888
|
+
if (i.length > 1) {
|
|
1889
|
+
let e = i.pop(), n = i.pop(), a = {
|
|
1890
|
+
provider: i.length > 0 ? i[0] : r,
|
|
1891
|
+
prefix: n,
|
|
1892
|
+
name: e
|
|
1893
|
+
};
|
|
1894
|
+
return t && !Sn(a) ? null : a;
|
|
1895
|
+
}
|
|
1896
|
+
let a = i[0], o = a.split("-");
|
|
1897
|
+
if (o.length > 1) {
|
|
1898
|
+
let e = {
|
|
1899
|
+
provider: r,
|
|
1900
|
+
prefix: o.shift(),
|
|
1901
|
+
name: o.join("-")
|
|
1902
|
+
};
|
|
1903
|
+
return t && !Sn(e) ? null : e;
|
|
1904
|
+
}
|
|
1905
|
+
if (n && r === "") {
|
|
1906
|
+
let e = {
|
|
1907
|
+
provider: r,
|
|
1908
|
+
prefix: "",
|
|
1909
|
+
name: a
|
|
1910
|
+
};
|
|
1911
|
+
return t && !Sn(e, n) ? null : e;
|
|
1912
|
+
}
|
|
1913
|
+
return null;
|
|
1914
|
+
}, Sn = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1, Z = !1;
|
|
1915
|
+
function Cn(e) {
|
|
1916
|
+
return typeof e == "boolean" && (Z = e), Z;
|
|
1917
|
+
}
|
|
1918
|
+
function wn(e) {
|
|
1919
|
+
let t = typeof e == "string" ? xn(e, !0, Z) : e;
|
|
1920
|
+
if (t) {
|
|
1921
|
+
let e = X(t.provider, t.prefix), n = t.name;
|
|
1922
|
+
return e.icons[n] || (e.missing.has(n) ? null : void 0);
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
function Tn(e, t) {
|
|
1926
|
+
let n = xn(e, !0, Z);
|
|
1927
|
+
if (!n) return !1;
|
|
1928
|
+
let r = X(n.provider, n.prefix);
|
|
1929
|
+
return t ? yn(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
1930
|
+
}
|
|
1931
|
+
function En(e, t) {
|
|
1932
|
+
if (typeof e != "object") return !1;
|
|
1933
|
+
if (typeof t != "string" && (t = e.provider || ""), Z && !t && !e.prefix) {
|
|
1934
|
+
let t = !1;
|
|
1935
|
+
return hn(e) && (e.prefix = "", fn(e, (e, n) => {
|
|
1936
|
+
Tn(e, n) && (t = !0);
|
|
1937
|
+
})), t;
|
|
1938
|
+
}
|
|
1939
|
+
let n = e.prefix;
|
|
1940
|
+
return Sn({
|
|
1941
|
+
prefix: n,
|
|
1942
|
+
name: "a"
|
|
1943
|
+
}) ? !!vn(X(t, n), e) : !1;
|
|
1944
|
+
}
|
|
1945
|
+
var Dn = Object.freeze({
|
|
1946
|
+
width: null,
|
|
1947
|
+
height: null
|
|
1948
|
+
}), On = Object.freeze({
|
|
1949
|
+
...Dn,
|
|
1950
|
+
...on
|
|
1951
|
+
}), kn = /(-?[0-9.]*[0-9]+[0-9.]*)/g, An = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
1952
|
+
function jn(e, t, n) {
|
|
1953
|
+
if (t === 1) return e;
|
|
1954
|
+
if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
1955
|
+
if (typeof e != "string") return e;
|
|
1956
|
+
let r = e.split(kn);
|
|
1957
|
+
if (r === null || !r.length) return e;
|
|
1958
|
+
let i = [], a = r.shift(), o = An.test(a);
|
|
1959
|
+
for (;;) {
|
|
1960
|
+
if (o) {
|
|
1961
|
+
let e = parseFloat(a);
|
|
1962
|
+
isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
|
|
1963
|
+
} else i.push(a);
|
|
1964
|
+
if (a = r.shift(), a === void 0) return i.join("");
|
|
1965
|
+
o = !o;
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
function Mn(e, t = "defs") {
|
|
1969
|
+
let n = "", r = e.indexOf("<" + t);
|
|
1970
|
+
for (; r >= 0;) {
|
|
1971
|
+
let i = e.indexOf(">", r), a = e.indexOf("</" + t);
|
|
1972
|
+
if (i === -1 || a === -1) break;
|
|
1973
|
+
let o = e.indexOf(">", a);
|
|
1974
|
+
if (o === -1) break;
|
|
1975
|
+
n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
|
|
1976
|
+
}
|
|
1977
|
+
return {
|
|
1978
|
+
defs: n,
|
|
1979
|
+
content: e
|
|
1980
|
+
};
|
|
1981
|
+
}
|
|
1982
|
+
function Nn(e, t) {
|
|
1983
|
+
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
1984
|
+
}
|
|
1985
|
+
function Pn(e, t, n) {
|
|
1986
|
+
let r = Mn(e);
|
|
1987
|
+
return Nn(r.defs, t + r.content + n);
|
|
1988
|
+
}
|
|
1989
|
+
var Fn = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
1990
|
+
function In(e, t) {
|
|
1991
|
+
let n = {
|
|
1992
|
+
...sn,
|
|
1993
|
+
...e
|
|
1994
|
+
}, r = {
|
|
1995
|
+
...On,
|
|
1996
|
+
...t
|
|
1997
|
+
}, i = {
|
|
1998
|
+
left: n.left,
|
|
1999
|
+
top: n.top,
|
|
2000
|
+
width: n.width,
|
|
2001
|
+
height: n.height
|
|
2002
|
+
}, a = n.body;
|
|
2003
|
+
[n, r].forEach((e) => {
|
|
2004
|
+
let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
|
|
2005
|
+
n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
|
|
2006
|
+
let s;
|
|
2007
|
+
switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
|
|
2008
|
+
case 1:
|
|
2009
|
+
s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
|
|
2010
|
+
break;
|
|
2011
|
+
case 2:
|
|
2012
|
+
t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
|
|
2013
|
+
break;
|
|
2014
|
+
case 3:
|
|
2015
|
+
s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
|
|
2016
|
+
break;
|
|
2017
|
+
}
|
|
2018
|
+
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = Pn(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
|
|
2019
|
+
});
|
|
2020
|
+
let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
|
|
2021
|
+
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = jn(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? jn(u, l / c) : s === "auto" ? l : s);
|
|
2022
|
+
let f = {}, p = (e, t) => {
|
|
2023
|
+
Fn(t) || (f[e] = t.toString());
|
|
2024
|
+
};
|
|
2025
|
+
p("width", u), p("height", d);
|
|
2026
|
+
let m = [
|
|
2027
|
+
i.left,
|
|
2028
|
+
i.top,
|
|
2029
|
+
c,
|
|
2030
|
+
l
|
|
2031
|
+
];
|
|
2032
|
+
return f.viewBox = m.join(" "), {
|
|
2033
|
+
attributes: f,
|
|
2034
|
+
viewBox: m,
|
|
2035
|
+
body: a
|
|
2036
|
+
};
|
|
2037
|
+
}
|
|
2038
|
+
var Ln = /\sid="(\S+)"/g, Rn = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16), zn = 0;
|
|
2039
|
+
function Bn(e, t = Rn) {
|
|
2040
|
+
let n = [], r;
|
|
2041
|
+
for (; r = Ln.exec(e);) n.push(r[1]);
|
|
2042
|
+
if (!n.length) return e;
|
|
2043
|
+
let i = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
2044
|
+
return n.forEach((n) => {
|
|
2045
|
+
let r = typeof t == "function" ? t(n) : t + (zn++).toString(), a = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2046
|
+
e = e.replace(RegExp("([#;\"])(" + a + ")([\")]|\\.[a-z])", "g"), "$1" + r + i + "$3");
|
|
2047
|
+
}), e = e.replace(new RegExp(i, "g"), ""), e;
|
|
2048
|
+
}
|
|
2049
|
+
var Vn = Object.create(null);
|
|
2050
|
+
function Hn(e, t) {
|
|
2051
|
+
Vn[e] = t;
|
|
2052
|
+
}
|
|
2053
|
+
function Un(e) {
|
|
2054
|
+
return Vn[e] || Vn[""];
|
|
2055
|
+
}
|
|
2056
|
+
function Wn(e) {
|
|
2057
|
+
let t;
|
|
2058
|
+
if (typeof e.resources == "string") t = [e.resources];
|
|
2059
|
+
else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
|
|
2060
|
+
return {
|
|
2061
|
+
resources: t,
|
|
2062
|
+
path: e.path || "/",
|
|
2063
|
+
maxURL: e.maxURL || 500,
|
|
2064
|
+
rotate: e.rotate || 750,
|
|
2065
|
+
timeout: e.timeout || 5e3,
|
|
2066
|
+
random: e.random === !0,
|
|
2067
|
+
index: e.index || 0,
|
|
2068
|
+
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
2069
|
+
};
|
|
2070
|
+
}
|
|
2071
|
+
for (var Gn = Object.create(null), Kn = ["https://api.simplesvg.com", "https://api.unisvg.com"], qn = []; Kn.length > 0;) Kn.length === 1 || Math.random() > .5 ? qn.push(Kn.shift()) : qn.push(Kn.pop());
|
|
2072
|
+
Gn[""] = Wn({ resources: ["https://api.iconify.design"].concat(qn) });
|
|
2073
|
+
function Jn(e, t) {
|
|
2074
|
+
let n = Wn(t);
|
|
2075
|
+
return n === null ? !1 : (Gn[e] = n, !0);
|
|
2076
|
+
}
|
|
2077
|
+
function Yn(e) {
|
|
2078
|
+
return Gn[e];
|
|
2079
|
+
}
|
|
2080
|
+
var Xn = (() => {
|
|
2081
|
+
let e;
|
|
2082
|
+
try {
|
|
2083
|
+
if (e = fetch, typeof e == "function") return e;
|
|
2084
|
+
} catch {}
|
|
2085
|
+
})();
|
|
2086
|
+
function Zn(e, t) {
|
|
2087
|
+
let n = Yn(e);
|
|
2088
|
+
if (!n) return 0;
|
|
2089
|
+
let r;
|
|
2090
|
+
if (!n.maxURL) r = 0;
|
|
2091
|
+
else {
|
|
2092
|
+
let e = 0;
|
|
2093
|
+
n.resources.forEach((t) => {
|
|
2094
|
+
e = Math.max(e, t.length);
|
|
2095
|
+
});
|
|
2096
|
+
let i = t + ".json?icons=";
|
|
2097
|
+
r = n.maxURL - e - n.path.length - i.length;
|
|
2098
|
+
}
|
|
2099
|
+
return r;
|
|
2100
|
+
}
|
|
2101
|
+
function Qn(e) {
|
|
2102
|
+
return e === 404;
|
|
2103
|
+
}
|
|
2104
|
+
var $n = (e, t, n) => {
|
|
2105
|
+
let r = [], i = Zn(e, t), a = "icons", o = {
|
|
2106
|
+
type: a,
|
|
2107
|
+
provider: e,
|
|
2108
|
+
prefix: t,
|
|
2109
|
+
icons: []
|
|
2110
|
+
}, s = 0;
|
|
2111
|
+
return n.forEach((n, c) => {
|
|
2112
|
+
s += n.length + 1, s >= i && c > 0 && (r.push(o), o = {
|
|
2113
|
+
type: a,
|
|
2114
|
+
provider: e,
|
|
2115
|
+
prefix: t,
|
|
2116
|
+
icons: []
|
|
2117
|
+
}, s = n.length), o.icons.push(n);
|
|
2118
|
+
}), r.push(o), r;
|
|
2119
|
+
};
|
|
2120
|
+
function er(e) {
|
|
2121
|
+
if (typeof e == "string") {
|
|
2122
|
+
let t = Yn(e);
|
|
2123
|
+
if (t) return t.path;
|
|
2124
|
+
}
|
|
2125
|
+
return "/";
|
|
2126
|
+
}
|
|
2127
|
+
var tr = {
|
|
2128
|
+
prepare: $n,
|
|
2129
|
+
send: (e, t, n) => {
|
|
2130
|
+
if (!Xn) {
|
|
2131
|
+
n("abort", 424);
|
|
2132
|
+
return;
|
|
2133
|
+
}
|
|
2134
|
+
let r = er(t.provider);
|
|
2135
|
+
switch (t.type) {
|
|
2136
|
+
case "icons": {
|
|
2137
|
+
let e = t.prefix, n = t.icons.join(","), i = new URLSearchParams({ icons: n });
|
|
2138
|
+
r += e + ".json?" + i.toString();
|
|
2139
|
+
break;
|
|
2140
|
+
}
|
|
2141
|
+
case "custom": {
|
|
2142
|
+
let e = t.uri;
|
|
2143
|
+
r += e.slice(0, 1) === "/" ? e.slice(1) : e;
|
|
2144
|
+
break;
|
|
2145
|
+
}
|
|
2146
|
+
default:
|
|
2147
|
+
n("abort", 400);
|
|
2148
|
+
return;
|
|
2149
|
+
}
|
|
2150
|
+
let i = 503;
|
|
2151
|
+
Xn(e + r).then((e) => {
|
|
2152
|
+
let t = e.status;
|
|
2153
|
+
if (t !== 200) {
|
|
2154
|
+
setTimeout(() => {
|
|
2155
|
+
n(Qn(t) ? "abort" : "next", t);
|
|
2156
|
+
});
|
|
2157
|
+
return;
|
|
2158
|
+
}
|
|
2159
|
+
return i = 501, e.json();
|
|
2160
|
+
}).then((e) => {
|
|
2161
|
+
if (typeof e != "object" || !e) {
|
|
2162
|
+
setTimeout(() => {
|
|
2163
|
+
e === 404 ? n("abort", e) : n("next", i);
|
|
2164
|
+
});
|
|
2165
|
+
return;
|
|
2166
|
+
}
|
|
2167
|
+
setTimeout(() => {
|
|
2168
|
+
n("success", e);
|
|
2169
|
+
});
|
|
2170
|
+
}).catch(() => {
|
|
2171
|
+
n("next", i);
|
|
2172
|
+
});
|
|
2173
|
+
}
|
|
2174
|
+
};
|
|
2175
|
+
function nr(e, t) {
|
|
2176
|
+
e.forEach((e) => {
|
|
2177
|
+
let n = e.loaderCallbacks;
|
|
2178
|
+
n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
|
|
2179
|
+
});
|
|
2180
|
+
}
|
|
2181
|
+
function rr(e) {
|
|
2182
|
+
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
2183
|
+
e.pendingCallbacksFlag = !1;
|
|
2184
|
+
let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
2185
|
+
if (!t.length) return;
|
|
2186
|
+
let n = !1, r = e.provider, i = e.prefix;
|
|
2187
|
+
t.forEach((t) => {
|
|
2188
|
+
let a = t.icons, o = a.pending.length;
|
|
2189
|
+
a.pending = a.pending.filter((t) => {
|
|
2190
|
+
if (t.prefix !== i) return !0;
|
|
2191
|
+
let o = t.name;
|
|
2192
|
+
if (e.icons[o]) a.loaded.push({
|
|
2193
|
+
provider: r,
|
|
2194
|
+
prefix: i,
|
|
2195
|
+
name: o
|
|
2196
|
+
});
|
|
2197
|
+
else if (e.missing.has(o)) a.missing.push({
|
|
2198
|
+
provider: r,
|
|
2199
|
+
prefix: i,
|
|
2200
|
+
name: o
|
|
2201
|
+
});
|
|
2202
|
+
else return n = !0, !0;
|
|
2203
|
+
return !1;
|
|
2204
|
+
}), a.pending.length !== o && (n || nr([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
|
|
2205
|
+
});
|
|
2206
|
+
}));
|
|
2207
|
+
}
|
|
2208
|
+
var ir = 0;
|
|
2209
|
+
function ar(e, t, n) {
|
|
2210
|
+
let r = ir++, i = nr.bind(null, n, r);
|
|
2211
|
+
if (!t.pending.length) return i;
|
|
2212
|
+
let a = {
|
|
2213
|
+
id: r,
|
|
2214
|
+
icons: t,
|
|
2215
|
+
callback: e,
|
|
2216
|
+
abort: i
|
|
2217
|
+
};
|
|
2218
|
+
return n.forEach((e) => {
|
|
2219
|
+
(e.loaderCallbacks ||= []).push(a);
|
|
2220
|
+
}), i;
|
|
2221
|
+
}
|
|
2222
|
+
function or(e) {
|
|
2223
|
+
let t = {
|
|
2224
|
+
loaded: [],
|
|
2225
|
+
missing: [],
|
|
2226
|
+
pending: []
|
|
2227
|
+
}, n = Object.create(null);
|
|
2228
|
+
e.sort((e, t) => e.provider === t.provider ? e.prefix === t.prefix ? e.name.localeCompare(t.name) : e.prefix.localeCompare(t.prefix) : e.provider.localeCompare(t.provider));
|
|
2229
|
+
let r = {
|
|
2230
|
+
provider: "",
|
|
2231
|
+
prefix: "",
|
|
2232
|
+
name: ""
|
|
2233
|
+
};
|
|
2234
|
+
return e.forEach((e) => {
|
|
2235
|
+
if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
|
|
2236
|
+
r = e;
|
|
2237
|
+
let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] = X(i, a)), l;
|
|
2238
|
+
l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
|
|
2239
|
+
let u = {
|
|
2240
|
+
provider: i,
|
|
2241
|
+
prefix: a,
|
|
2242
|
+
name: o
|
|
2243
|
+
};
|
|
2244
|
+
l.push(u);
|
|
2245
|
+
}), t;
|
|
2246
|
+
}
|
|
2247
|
+
function sr(e, t = !0, n = !1) {
|
|
2248
|
+
let r = [];
|
|
2249
|
+
return e.forEach((e) => {
|
|
2250
|
+
let i = typeof e == "string" ? xn(e, t, n) : e;
|
|
2251
|
+
i && r.push(i);
|
|
2252
|
+
}), r;
|
|
2253
|
+
}
|
|
2254
|
+
var cr = {
|
|
2255
|
+
resources: [],
|
|
2256
|
+
index: 0,
|
|
2257
|
+
timeout: 2e3,
|
|
2258
|
+
rotate: 750,
|
|
2259
|
+
random: !1,
|
|
2260
|
+
dataAfterTimeout: !1
|
|
2261
|
+
};
|
|
2262
|
+
function lr(e, t, n, r) {
|
|
2263
|
+
let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
|
|
2264
|
+
if (e.random) {
|
|
2265
|
+
let t = e.resources.slice(0);
|
|
2266
|
+
for (o = []; t.length > 1;) {
|
|
2267
|
+
let e = Math.floor(Math.random() * t.length);
|
|
2268
|
+
o.push(t[e]), t = t.slice(0, e).concat(t.slice(e + 1));
|
|
2269
|
+
}
|
|
2270
|
+
o = o.concat(t);
|
|
2271
|
+
} else o = e.resources.slice(a).concat(e.resources.slice(0, a));
|
|
2272
|
+
let s = Date.now(), c = "pending", l = 0, u, d = null, f = [], p = [];
|
|
2273
|
+
typeof r == "function" && p.push(r);
|
|
2274
|
+
function m() {
|
|
2275
|
+
d &&= (clearTimeout(d), null);
|
|
2276
|
+
}
|
|
2277
|
+
function h() {
|
|
2278
|
+
c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
|
|
2279
|
+
e.status === "pending" && (e.status = "aborted");
|
|
2280
|
+
}), f = [];
|
|
2281
|
+
}
|
|
2282
|
+
function g(e, t) {
|
|
2283
|
+
t && (p = []), typeof e == "function" && p.push(e);
|
|
2284
|
+
}
|
|
2285
|
+
function _() {
|
|
2286
|
+
return {
|
|
2287
|
+
startTime: s,
|
|
2288
|
+
payload: t,
|
|
2289
|
+
status: c,
|
|
2290
|
+
queriesSent: l,
|
|
2291
|
+
queriesPending: f.length,
|
|
2292
|
+
subscribe: g,
|
|
2293
|
+
abort: h
|
|
2294
|
+
};
|
|
2295
|
+
}
|
|
2296
|
+
function v() {
|
|
2297
|
+
c = "failed", p.forEach((e) => {
|
|
2298
|
+
e(void 0, u);
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
function y() {
|
|
2302
|
+
f.forEach((e) => {
|
|
2303
|
+
e.status === "pending" && (e.status = "aborted");
|
|
2304
|
+
}), f = [];
|
|
2305
|
+
}
|
|
2306
|
+
function b(t, n, r) {
|
|
2307
|
+
let i = n !== "success";
|
|
2308
|
+
switch (f = f.filter((e) => e !== t), c) {
|
|
2309
|
+
case "pending": break;
|
|
2310
|
+
case "failed":
|
|
2311
|
+
if (i || !e.dataAfterTimeout) return;
|
|
2312
|
+
break;
|
|
2313
|
+
default: return;
|
|
2314
|
+
}
|
|
2315
|
+
if (n === "abort") {
|
|
2316
|
+
u = r, v();
|
|
2317
|
+
return;
|
|
2318
|
+
}
|
|
2319
|
+
if (i) {
|
|
2320
|
+
u = r, f.length || (o.length ? ee() : v());
|
|
2321
|
+
return;
|
|
2322
|
+
}
|
|
2323
|
+
if (m(), y(), !e.random) {
|
|
2324
|
+
let n = e.resources.indexOf(t.resource);
|
|
2325
|
+
n !== -1 && n !== e.index && (e.index = n);
|
|
2326
|
+
}
|
|
2327
|
+
c = "completed", p.forEach((e) => {
|
|
2328
|
+
e(r);
|
|
2329
|
+
});
|
|
2330
|
+
}
|
|
2331
|
+
function ee() {
|
|
2332
|
+
if (c !== "pending") return;
|
|
2333
|
+
m();
|
|
2334
|
+
let r = o.shift();
|
|
2335
|
+
if (r === void 0) {
|
|
2336
|
+
if (f.length) {
|
|
2337
|
+
d = setTimeout(() => {
|
|
2338
|
+
m(), c === "pending" && (y(), v());
|
|
2339
|
+
}, e.timeout);
|
|
2340
|
+
return;
|
|
2341
|
+
}
|
|
2342
|
+
v();
|
|
2343
|
+
return;
|
|
2344
|
+
}
|
|
2345
|
+
let i = {
|
|
2346
|
+
status: "pending",
|
|
2347
|
+
resource: r,
|
|
2348
|
+
callback: (e, t) => {
|
|
2349
|
+
b(i, e, t);
|
|
2350
|
+
}
|
|
2351
|
+
};
|
|
2352
|
+
f.push(i), l++, d = setTimeout(ee, e.rotate), n(r, t, i.callback);
|
|
2353
|
+
}
|
|
2354
|
+
return setTimeout(ee), _;
|
|
2355
|
+
}
|
|
2356
|
+
function ur(e) {
|
|
2357
|
+
let t = {
|
|
2358
|
+
...cr,
|
|
2359
|
+
...e
|
|
2360
|
+
}, n = [];
|
|
2361
|
+
function r() {
|
|
2362
|
+
n = n.filter((e) => e().status === "pending");
|
|
2363
|
+
}
|
|
2364
|
+
function i(e, i, a) {
|
|
2365
|
+
let o = lr(t, e, i, (e, t) => {
|
|
2366
|
+
r(), a && a(e, t);
|
|
2367
|
+
});
|
|
2368
|
+
return n.push(o), o;
|
|
2369
|
+
}
|
|
2370
|
+
function a(e) {
|
|
2371
|
+
return n.find((t) => e(t)) || null;
|
|
2372
|
+
}
|
|
2373
|
+
return {
|
|
2374
|
+
query: i,
|
|
2375
|
+
find: a,
|
|
2376
|
+
setIndex: (e) => {
|
|
2377
|
+
t.index = e;
|
|
2378
|
+
},
|
|
2379
|
+
getIndex: () => t.index,
|
|
2380
|
+
cleanup: r
|
|
2381
|
+
};
|
|
2382
|
+
}
|
|
2383
|
+
function dr() {}
|
|
2384
|
+
var fr = Object.create(null);
|
|
2385
|
+
function pr(e) {
|
|
2386
|
+
if (!fr[e]) {
|
|
2387
|
+
let t = Yn(e);
|
|
2388
|
+
if (!t) return;
|
|
2389
|
+
fr[e] = {
|
|
2390
|
+
config: t,
|
|
2391
|
+
redundancy: ur(t)
|
|
2392
|
+
};
|
|
2393
|
+
}
|
|
2394
|
+
return fr[e];
|
|
2395
|
+
}
|
|
2396
|
+
function mr(e, t, n) {
|
|
2397
|
+
let r, i;
|
|
2398
|
+
if (typeof e == "string") {
|
|
2399
|
+
let t = Un(e);
|
|
2400
|
+
if (!t) return n(void 0, 424), dr;
|
|
2401
|
+
i = t.send;
|
|
2402
|
+
let a = pr(e);
|
|
2403
|
+
a && (r = a.redundancy);
|
|
2404
|
+
} else {
|
|
2405
|
+
let t = Wn(e);
|
|
2406
|
+
if (t) {
|
|
2407
|
+
r = ur(t);
|
|
2408
|
+
let n = Un(e.resources ? e.resources[0] : "");
|
|
2409
|
+
n && (i = n.send);
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
return !r || !i ? (n(void 0, 424), dr) : r.query(t, i, n)().abort;
|
|
2413
|
+
}
|
|
2414
|
+
function hr() {}
|
|
2415
|
+
function gr(e) {
|
|
2416
|
+
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
2417
|
+
e.iconsLoaderFlag = !1, rr(e);
|
|
2418
|
+
}));
|
|
2419
|
+
}
|
|
2420
|
+
function _r(e) {
|
|
2421
|
+
let t = [], n = [];
|
|
2422
|
+
return e.forEach((e) => {
|
|
2423
|
+
(e.match(bn) ? t : n).push(e);
|
|
2424
|
+
}), {
|
|
2425
|
+
valid: t,
|
|
2426
|
+
invalid: n
|
|
2427
|
+
};
|
|
2428
|
+
}
|
|
2429
|
+
function Q(e, t, n) {
|
|
2430
|
+
function r() {
|
|
2431
|
+
let n = e.pendingIcons;
|
|
2432
|
+
t.forEach((t) => {
|
|
2433
|
+
n && n.delete(t), e.icons[t] || e.missing.add(t);
|
|
2434
|
+
});
|
|
2435
|
+
}
|
|
2436
|
+
if (n && typeof n == "object") try {
|
|
2437
|
+
if (!vn(e, n).length) {
|
|
2438
|
+
r();
|
|
2439
|
+
return;
|
|
2440
|
+
}
|
|
2441
|
+
} catch (e) {
|
|
2442
|
+
console.error(e);
|
|
2443
|
+
}
|
|
2444
|
+
r(), gr(e);
|
|
2445
|
+
}
|
|
2446
|
+
function vr(e, t) {
|
|
2447
|
+
e instanceof Promise ? e.then((e) => {
|
|
2448
|
+
t(e);
|
|
2449
|
+
}).catch(() => {
|
|
2450
|
+
t(null);
|
|
2451
|
+
}) : t(e);
|
|
2452
|
+
}
|
|
2453
|
+
function yr(e, t) {
|
|
2454
|
+
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
2455
|
+
e.iconsQueueFlag = !1;
|
|
2456
|
+
let { provider: t, prefix: n } = e, r = e.iconsToLoad;
|
|
2457
|
+
if (delete e.iconsToLoad, !r || !r.length) return;
|
|
2458
|
+
let i = e.loadIcon;
|
|
2459
|
+
if (e.loadIcons && (r.length > 1 || !i)) {
|
|
2460
|
+
vr(e.loadIcons(r, n, t), (t) => {
|
|
2461
|
+
Q(e, r, t);
|
|
2462
|
+
});
|
|
2463
|
+
return;
|
|
2464
|
+
}
|
|
2465
|
+
if (i) {
|
|
2466
|
+
r.forEach((r) => {
|
|
2467
|
+
vr(i(r, n, t), (t) => {
|
|
2468
|
+
Q(e, [r], t ? {
|
|
2469
|
+
prefix: n,
|
|
2470
|
+
icons: { [r]: t }
|
|
2471
|
+
} : null);
|
|
2472
|
+
});
|
|
2473
|
+
});
|
|
2474
|
+
return;
|
|
2475
|
+
}
|
|
2476
|
+
let { valid: a, invalid: o } = _r(r);
|
|
2477
|
+
if (o.length && Q(e, o, null), !a.length) return;
|
|
2478
|
+
let s = n.match(bn) ? Un(t) : null;
|
|
2479
|
+
if (!s) {
|
|
2480
|
+
Q(e, a, null);
|
|
2481
|
+
return;
|
|
2482
|
+
}
|
|
2483
|
+
s.prepare(t, n, a).forEach((n) => {
|
|
2484
|
+
mr(t, n, (t) => {
|
|
2485
|
+
Q(e, n.icons, t);
|
|
2486
|
+
});
|
|
2487
|
+
});
|
|
2488
|
+
}));
|
|
2489
|
+
}
|
|
2490
|
+
var br = (e, t) => {
|
|
2491
|
+
let n = or(sr(e, !0, Cn()));
|
|
2492
|
+
if (!n.pending.length) {
|
|
2493
|
+
let e = !0;
|
|
2494
|
+
return t && setTimeout(() => {
|
|
2495
|
+
e && t(n.loaded, n.missing, n.pending, hr);
|
|
2496
|
+
}), () => {
|
|
2497
|
+
e = !1;
|
|
2498
|
+
};
|
|
2499
|
+
}
|
|
2500
|
+
let r = Object.create(null), i = [], a, o;
|
|
2501
|
+
return n.pending.forEach((e) => {
|
|
2502
|
+
let { provider: t, prefix: n } = e;
|
|
2503
|
+
if (n === o && t === a) return;
|
|
2504
|
+
a = t, o = n, i.push(X(t, n));
|
|
2505
|
+
let s = r[t] || (r[t] = Object.create(null));
|
|
2506
|
+
s[n] || (s[n] = []);
|
|
2507
|
+
}), n.pending.forEach((e) => {
|
|
2508
|
+
let { provider: t, prefix: n, name: i } = e, a = X(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
|
|
2509
|
+
o.has(i) || (o.add(i), r[t][n].push(i));
|
|
2510
|
+
}), i.forEach((e) => {
|
|
2511
|
+
let t = r[e.provider][e.prefix];
|
|
2512
|
+
t.length && yr(e, t);
|
|
2513
|
+
}), t ? ar(t, n, i) : hr;
|
|
2514
|
+
};
|
|
2515
|
+
function xr(e, t) {
|
|
2516
|
+
let n = { ...e };
|
|
2517
|
+
for (let e in t) {
|
|
2518
|
+
let r = t[e], i = typeof r;
|
|
2519
|
+
e in Dn ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
|
|
2520
|
+
}
|
|
2521
|
+
return n;
|
|
2522
|
+
}
|
|
2523
|
+
var Sr = /[\s,]+/;
|
|
2524
|
+
function Cr(e, t) {
|
|
2525
|
+
t.split(Sr).forEach((t) => {
|
|
2526
|
+
switch (t.trim()) {
|
|
2527
|
+
case "horizontal":
|
|
2528
|
+
e.hFlip = !0;
|
|
2529
|
+
break;
|
|
2530
|
+
case "vertical":
|
|
2531
|
+
e.vFlip = !0;
|
|
2532
|
+
break;
|
|
2533
|
+
}
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2536
|
+
function wr(e, t = 0) {
|
|
2537
|
+
let n = e.replace(/^-?[0-9.]*/, "");
|
|
2538
|
+
function r(e) {
|
|
2539
|
+
for (; e < 0;) e += 4;
|
|
2540
|
+
return e % 4;
|
|
2541
|
+
}
|
|
2542
|
+
if (n === "") {
|
|
2543
|
+
let t = parseInt(e);
|
|
2544
|
+
return isNaN(t) ? 0 : r(t);
|
|
2545
|
+
} else if (n !== e) {
|
|
2546
|
+
let t = 0;
|
|
2547
|
+
switch (n) {
|
|
2548
|
+
case "%":
|
|
2549
|
+
t = 25;
|
|
2550
|
+
break;
|
|
2551
|
+
case "deg": t = 90;
|
|
2552
|
+
}
|
|
2553
|
+
if (t) {
|
|
2554
|
+
let i = parseFloat(e.slice(0, e.length - n.length));
|
|
2555
|
+
return isNaN(i) ? 0 : (i /= t, i % 1 == 0 ? r(i) : 0);
|
|
2556
|
+
}
|
|
2557
|
+
}
|
|
2558
|
+
return t;
|
|
2559
|
+
}
|
|
2560
|
+
function Tr(e, t) {
|
|
2561
|
+
let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
|
|
2562
|
+
for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
|
|
2563
|
+
return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
|
|
2564
|
+
}
|
|
2565
|
+
function Er(e) {
|
|
2566
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
2567
|
+
}
|
|
2568
|
+
function Dr(e) {
|
|
2569
|
+
return "data:image/svg+xml," + Er(e);
|
|
2570
|
+
}
|
|
2571
|
+
function Or(e) {
|
|
2572
|
+
return "url(\"" + Dr(e) + "\")";
|
|
2573
|
+
}
|
|
2574
|
+
var $;
|
|
2575
|
+
function kr() {
|
|
2576
|
+
try {
|
|
2577
|
+
$ = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
|
|
2578
|
+
} catch {
|
|
2579
|
+
$ = null;
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
function Ar(e) {
|
|
2583
|
+
return $ === void 0 && kr(), $ ? $.createHTML(e) : e;
|
|
2584
|
+
}
|
|
2585
|
+
var jr = {
|
|
2586
|
+
...On,
|
|
2587
|
+
inline: !1
|
|
2588
|
+
}, Mr = {
|
|
2589
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2590
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2591
|
+
"aria-hidden": !0,
|
|
2592
|
+
role: "img"
|
|
2593
|
+
}, Nr = { display: "inline-block" }, Pr = { backgroundColor: "currentColor" }, Fr = { backgroundColor: "transparent" }, Ir = {
|
|
2594
|
+
Image: "var(--svg)",
|
|
2595
|
+
Repeat: "no-repeat",
|
|
2596
|
+
Size: "100% 100%"
|
|
2597
|
+
}, Lr = {
|
|
2598
|
+
WebkitMask: Pr,
|
|
2599
|
+
mask: Pr,
|
|
2600
|
+
background: Fr
|
|
2601
|
+
};
|
|
2602
|
+
for (let e in Lr) {
|
|
2603
|
+
let t = Lr[e];
|
|
2604
|
+
for (let n in Ir) t[e + n] = Ir[n];
|
|
2605
|
+
}
|
|
2606
|
+
var Rr = {
|
|
2607
|
+
...jr,
|
|
2608
|
+
inline: !0
|
|
2609
|
+
};
|
|
2610
|
+
function zr(e) {
|
|
2611
|
+
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
2612
|
+
}
|
|
2613
|
+
var Br = (e, t, n) => {
|
|
2614
|
+
let r = t.inline ? Rr : jr, i = xr(r, t), a = t.mode || "svg", o = {}, s = t.style || {}, c = { ...a === "svg" ? Mr : {} };
|
|
2615
|
+
if (n) {
|
|
2616
|
+
let e = xn(n, !1, !0);
|
|
2617
|
+
if (e) {
|
|
2618
|
+
let t = ["iconify"];
|
|
2619
|
+
for (let n of ["provider", "prefix"]) e[n] && t.push("iconify--" + e[n]);
|
|
2620
|
+
c.className = t.join(" ");
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
for (let e in t) {
|
|
2624
|
+
let n = t[e];
|
|
2625
|
+
if (n !== void 0) switch (e) {
|
|
2626
|
+
case "icon":
|
|
2627
|
+
case "style":
|
|
2628
|
+
case "children":
|
|
2629
|
+
case "onLoad":
|
|
2630
|
+
case "mode":
|
|
2631
|
+
case "ssr":
|
|
2632
|
+
case "fallback": break;
|
|
2633
|
+
case "_ref":
|
|
2634
|
+
c.ref = n;
|
|
2635
|
+
break;
|
|
2636
|
+
case "className":
|
|
2637
|
+
c[e] = (c[e] ? c[e] + " " : "") + n;
|
|
2638
|
+
break;
|
|
2639
|
+
case "inline":
|
|
2640
|
+
case "hFlip":
|
|
2641
|
+
case "vFlip":
|
|
2642
|
+
i[e] = n === !0 || n === "true" || n === 1;
|
|
2643
|
+
break;
|
|
2644
|
+
case "flip":
|
|
2645
|
+
typeof n == "string" && Cr(i, n);
|
|
2646
|
+
break;
|
|
2647
|
+
case "color":
|
|
2648
|
+
o.color = n;
|
|
2649
|
+
break;
|
|
2650
|
+
case "rotate":
|
|
2651
|
+
typeof n == "string" ? i[e] = wr(n) : typeof n == "number" && (i[e] = n);
|
|
2652
|
+
break;
|
|
2653
|
+
case "ariaHidden":
|
|
2654
|
+
case "aria-hidden":
|
|
2655
|
+
n !== !0 && n !== "true" && delete c["aria-hidden"];
|
|
2656
|
+
break;
|
|
2657
|
+
default: r[e] === void 0 && (c[e] = n);
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
let l = In(e, i), u = l.attributes;
|
|
2661
|
+
if (i.inline && (o.verticalAlign = "-0.125em"), a === "svg") {
|
|
2662
|
+
c.style = {
|
|
2663
|
+
...o,
|
|
2664
|
+
...s
|
|
2665
|
+
}, Object.assign(c, u);
|
|
2666
|
+
let e = 0, n = t.id;
|
|
2667
|
+
return typeof n == "string" && (n = n.replace(/-/g, "_")), c.dangerouslySetInnerHTML = { __html: Ar(Bn(l.body, n ? () => n + "ID" + e++ : "iconifyReact")) }, je("svg", c);
|
|
2668
|
+
}
|
|
2669
|
+
let { body: d, width: f, height: p } = e, m = a === "mask" || (a === "bg" ? !1 : d.indexOf("currentColor") !== -1), h = Tr(d, {
|
|
2670
|
+
...u,
|
|
2671
|
+
width: f + "",
|
|
2672
|
+
height: p + ""
|
|
2673
|
+
});
|
|
2674
|
+
return c.style = {
|
|
2675
|
+
...o,
|
|
2676
|
+
"--svg": Or(h),
|
|
2677
|
+
width: zr(u.width),
|
|
2678
|
+
height: zr(u.height),
|
|
2679
|
+
...Nr,
|
|
2680
|
+
...m ? Pr : Fr,
|
|
2681
|
+
...s
|
|
2682
|
+
}, je("span", c);
|
|
2683
|
+
};
|
|
2684
|
+
if (Cn(!0), Hn("", tr), typeof document < "u" && typeof window < "u") {
|
|
2685
|
+
let e = window;
|
|
2686
|
+
if (e.IconifyPreload !== void 0) {
|
|
2687
|
+
let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
|
|
2688
|
+
typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
|
|
2689
|
+
try {
|
|
2690
|
+
(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !En(e)) && console.error(n);
|
|
2691
|
+
} catch {
|
|
2692
|
+
console.error(n);
|
|
2693
|
+
}
|
|
2694
|
+
});
|
|
2695
|
+
}
|
|
2696
|
+
if (e.IconifyProviders !== void 0) {
|
|
2697
|
+
let t = e.IconifyProviders;
|
|
2698
|
+
if (typeof t == "object" && t) for (let e in t) {
|
|
2699
|
+
let n = "IconifyProviders[" + e + "] is invalid.";
|
|
2700
|
+
try {
|
|
2701
|
+
let r = t[e];
|
|
2702
|
+
if (typeof r != "object" || !r || r.resources === void 0) continue;
|
|
2703
|
+
Jn(e, r) || console.error(n);
|
|
2704
|
+
} catch {
|
|
2705
|
+
console.error(n);
|
|
2706
|
+
}
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
function Vr(e) {
|
|
2711
|
+
let [t, n] = A(!!e.ssr), [r, i] = A({});
|
|
2712
|
+
function a(t) {
|
|
2713
|
+
if (t) {
|
|
2714
|
+
let t = e.icon;
|
|
2715
|
+
if (typeof t == "object") return {
|
|
2716
|
+
name: "",
|
|
2717
|
+
data: t
|
|
2718
|
+
};
|
|
2719
|
+
let n = wn(t);
|
|
2720
|
+
if (n) return {
|
|
2721
|
+
name: t,
|
|
2722
|
+
data: n
|
|
2723
|
+
};
|
|
2724
|
+
}
|
|
2725
|
+
return { name: "" };
|
|
2726
|
+
}
|
|
2727
|
+
let [o, s] = A(a(!!e.ssr));
|
|
2728
|
+
function c() {
|
|
2729
|
+
let e = r.callback;
|
|
2730
|
+
e && (e(), i({}));
|
|
2731
|
+
}
|
|
2732
|
+
function l(e) {
|
|
2733
|
+
if (JSON.stringify(o) !== JSON.stringify(e)) return c(), s(e), !0;
|
|
2734
|
+
}
|
|
2735
|
+
function u() {
|
|
2736
|
+
var t;
|
|
2737
|
+
let n = e.icon;
|
|
2738
|
+
if (typeof n == "object") {
|
|
2739
|
+
l({
|
|
2740
|
+
name: "",
|
|
2741
|
+
data: n
|
|
2742
|
+
});
|
|
2743
|
+
return;
|
|
2744
|
+
}
|
|
2745
|
+
let r = wn(n);
|
|
2746
|
+
l({
|
|
2747
|
+
name: n,
|
|
2748
|
+
data: r
|
|
2749
|
+
}) && (r === void 0 ? i({ callback: br([n], u) }) : r && ((t = e.onLoad) == null || t.call(e, n)));
|
|
2750
|
+
}
|
|
2751
|
+
Ne(() => (n(!0), c), []), Ne(() => {
|
|
2752
|
+
t && u();
|
|
2753
|
+
}, [e.icon, t]);
|
|
2754
|
+
let { name: d, data: f } = o;
|
|
2755
|
+
return f ? Br({
|
|
2756
|
+
...sn,
|
|
2757
|
+
...f
|
|
2758
|
+
}, e, d) : e.children ? e.children : e.fallback ? e.fallback : je("span", {});
|
|
2759
|
+
}
|
|
2760
|
+
var Hr = Me((e, t) => Vr({
|
|
2761
|
+
...e,
|
|
2762
|
+
_ref: t
|
|
2763
|
+
}));
|
|
2764
|
+
Me((e, t) => Vr({
|
|
2765
|
+
inline: !0,
|
|
2766
|
+
...e,
|
|
2767
|
+
_ref: t
|
|
2768
|
+
}));
|
|
2769
|
+
//#endregion
|
|
2770
|
+
//#region src/components/router/grid.list.tsx
|
|
2771
|
+
var Ur = () => null;
|
|
2772
|
+
Ur.displayName = "GridListNewButton";
|
|
2773
|
+
var Wr = () => null;
|
|
2774
|
+
Wr.displayName = "GridListAction";
|
|
2775
|
+
var Gr = () => null;
|
|
2776
|
+
Gr.displayName = "GridListItemAction";
|
|
2777
|
+
var Kr = [
|
|
2778
|
+
"from-blue-500 to-indigo-500",
|
|
2779
|
+
"from-emerald-500 to-teal-500",
|
|
2780
|
+
"from-violet-500 to-purple-500",
|
|
2781
|
+
"from-amber-500 to-orange-500",
|
|
2782
|
+
"from-rose-500 to-pink-500",
|
|
2783
|
+
"from-cyan-500 to-sky-500",
|
|
2784
|
+
"from-fuchsia-500 to-pink-500",
|
|
2785
|
+
"from-lime-500 to-emerald-500"
|
|
2786
|
+
];
|
|
2787
|
+
function qr(e) {
|
|
2788
|
+
let t = 0;
|
|
2789
|
+
for (let n = 0; n < e.length; n++) t = (e.codePointAt(n) ?? 0) + ((t << 5) - t);
|
|
2790
|
+
return Kr[Math.abs(t) % Kr.length];
|
|
2791
|
+
}
|
|
2792
|
+
function Jr(e) {
|
|
2793
|
+
return e.split(/[\s\-_]+/).filter(Boolean).slice(0, 2).map((e) => e[0].toUpperCase()).join("");
|
|
2794
|
+
}
|
|
2795
|
+
var Yr = [
|
|
2796
|
+
{
|
|
2797
|
+
accessorKey: "name",
|
|
2798
|
+
header: "Name"
|
|
2799
|
+
},
|
|
2800
|
+
{
|
|
2801
|
+
accessorKey: "description",
|
|
2802
|
+
header: "Description"
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
accessorKey: "url",
|
|
2806
|
+
header: "URL"
|
|
2807
|
+
}
|
|
2808
|
+
], Xr = Object.assign(({ gridItemList: t, children: n }) => {
|
|
2809
|
+
let { t: r } = P(), i = I(), a = [], o = [];
|
|
2810
|
+
k.Children.forEach(n, (e) => {
|
|
2811
|
+
if (k.isValidElement(e)) {
|
|
2812
|
+
if (e.type?.displayName === "GridListNewButton") {
|
|
2813
|
+
let { to: t, label: n } = e.props;
|
|
2814
|
+
a.push({
|
|
2815
|
+
key: `new-${n}`,
|
|
2816
|
+
render: () => /* @__PURE__ */ N(O, {
|
|
2817
|
+
onClick: () => i(t),
|
|
2818
|
+
children: [
|
|
2819
|
+
/* @__PURE__ */ M(ze, { className: "size-4 mr-2" }),
|
|
2820
|
+
"New ",
|
|
2821
|
+
n
|
|
2822
|
+
]
|
|
2823
|
+
})
|
|
2824
|
+
});
|
|
2825
|
+
} else if (e.type?.displayName === "GridListAction") {
|
|
2826
|
+
let { children: t } = e.props;
|
|
2827
|
+
a.push({
|
|
2828
|
+
key: `action-${a.length}`,
|
|
2829
|
+
render: () => /* @__PURE__ */ M(j, { children: t })
|
|
2830
|
+
});
|
|
2831
|
+
} else if (e.type?.displayName === "GridListItemAction") {
|
|
2832
|
+
let t = e.props;
|
|
2833
|
+
o.push({
|
|
2834
|
+
key: `item-action-${o.length}`,
|
|
2835
|
+
icon: t.icon,
|
|
2836
|
+
label: t.label,
|
|
2837
|
+
onClick: t.onClick,
|
|
2838
|
+
position: t.position ?? "right"
|
|
2839
|
+
});
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
});
|
|
2843
|
+
let s = o.length > 0, c = o.filter((e) => e.position === "left"), l = o.filter((e) => e.position === "right"), [u, d] = A({
|
|
2844
|
+
pageIndex: 0,
|
|
2845
|
+
pageSize: 12
|
|
2846
|
+
}), [f, p] = k.useState([]), [m, h] = A(""), g = nn({
|
|
2847
|
+
data: t,
|
|
2848
|
+
columns: Yr,
|
|
2849
|
+
onSortingChange: p,
|
|
2850
|
+
getCoreRowModel: Jt(),
|
|
2851
|
+
getPaginationRowModel: en(),
|
|
2852
|
+
getSortedRowModel: tn(),
|
|
2853
|
+
getFilteredRowModel: $t(),
|
|
2854
|
+
state: {
|
|
2855
|
+
globalFilter: m,
|
|
2856
|
+
pagination: u,
|
|
2857
|
+
sorting: f
|
|
2858
|
+
},
|
|
2859
|
+
onGlobalFilterChange: h,
|
|
2860
|
+
getColumnCanGlobalFilter: (e) => e.id === "name" || e.id === "description",
|
|
2861
|
+
onPaginationChange: d
|
|
2862
|
+
}), _ = g.getRowModel().rows;
|
|
2863
|
+
return /* @__PURE__ */ N("div", {
|
|
2864
|
+
className: "px-6",
|
|
2865
|
+
children: [
|
|
2866
|
+
/* @__PURE__ */ N("div", {
|
|
2867
|
+
className: "flex items-center gap-3 mb-4",
|
|
2868
|
+
children: [
|
|
2869
|
+
/* @__PURE__ */ N("div", {
|
|
2870
|
+
className: "relative flex-1 max-w-sm",
|
|
2871
|
+
children: [/* @__PURE__ */ M(Be, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ M(ae, {
|
|
2872
|
+
placeholder: r("forms.common.search"),
|
|
2873
|
+
value: m ?? "",
|
|
2874
|
+
onChange: (e) => h(e.target.value),
|
|
2875
|
+
className: "pl-9"
|
|
2876
|
+
})]
|
|
2877
|
+
}),
|
|
2878
|
+
/* @__PURE__ */ N("span", {
|
|
2879
|
+
className: "text-sm text-muted-foreground whitespace-nowrap",
|
|
2880
|
+
children: [
|
|
2881
|
+
g.getFilteredRowModel().rows.length,
|
|
2882
|
+
" ",
|
|
2883
|
+
g.getFilteredRowModel().rows.length === 1 ? r("forms.common.item") : r("forms.common.items")
|
|
2884
|
+
]
|
|
2885
|
+
}),
|
|
2886
|
+
a.length > 0 && /* @__PURE__ */ M("div", {
|
|
2887
|
+
className: "ml-auto",
|
|
2888
|
+
children: /* @__PURE__ */ N(S, { children: [/* @__PURE__ */ M(w, {
|
|
2889
|
+
asChild: !0,
|
|
2890
|
+
children: /* @__PURE__ */ N(T, {
|
|
2891
|
+
variant: "outline",
|
|
2892
|
+
size: "sm",
|
|
2893
|
+
className: "gap-1.5",
|
|
2894
|
+
children: [/* @__PURE__ */ M(L, { className: "size-4" }), /* @__PURE__ */ M("span", {
|
|
2895
|
+
className: "hidden sm:inline",
|
|
2896
|
+
children: r("forms.common.actions")
|
|
2897
|
+
})]
|
|
2898
|
+
})
|
|
2899
|
+
}), /* @__PURE__ */ M(ke, {
|
|
2900
|
+
align: "end",
|
|
2901
|
+
children: a.map((e) => /* @__PURE__ */ M(k.Fragment, { children: e.render() }, e.key))
|
|
2902
|
+
})] })
|
|
2903
|
+
})
|
|
2904
|
+
]
|
|
2905
|
+
}),
|
|
2906
|
+
_.length > 0 ? /* @__PURE__ */ M("div", {
|
|
2907
|
+
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",
|
|
2908
|
+
children: _.map((e) => {
|
|
2909
|
+
let t = e.getValue("name"), n = e.getValue("description"), i = e.getValue("url"), a = e.original.icon ?? void 0, o = qr(t), u = Jr(t), d = /* @__PURE__ */ N(le, {
|
|
2910
|
+
className: "relative overflow-hidden p-0 h-full transition-all duration-200 hover:shadow-lg hover:shadow-blue-500/10 hover:-translate-y-0.5 border-border/60 hover:border-blue-500/30 dark:hover:border-blue-400/30",
|
|
2911
|
+
children: [/* @__PURE__ */ M("div", { className: `h-1.5 bg-linear-to-r ${o} opacity-70 group-hover:opacity-100 transition-opacity` }), /* @__PURE__ */ N("div", {
|
|
2912
|
+
className: "p-4 flex items-start gap-3",
|
|
2913
|
+
children: [
|
|
2914
|
+
s && c.length > 0 && /* @__PURE__ */ M("div", {
|
|
2915
|
+
className: "flex items-center gap-1 shrink-0 mt-0.5",
|
|
2916
|
+
children: c.map((t) => /* @__PURE__ */ M("button", {
|
|
2917
|
+
type: "button",
|
|
2918
|
+
title: t.label,
|
|
2919
|
+
onClick: () => t.onClick(e.original),
|
|
2920
|
+
className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground hover:text-blue-600 hover:bg-blue-500/10 dark:hover:text-blue-400 dark:hover:bg-blue-400/10 transition-colors cursor-pointer",
|
|
2921
|
+
children: t.icon
|
|
2922
|
+
}, t.key))
|
|
2923
|
+
}),
|
|
2924
|
+
/* @__PURE__ */ M("div", {
|
|
2925
|
+
className: `shrink-0 w-10 h-10 rounded-lg bg-linear-to-br ${o} flex items-center justify-center text-white text-sm font-semibold shadow-sm`,
|
|
2926
|
+
children: a ? /* @__PURE__ */ M(Hr, {
|
|
2927
|
+
icon: a,
|
|
2928
|
+
className: "size-5"
|
|
2929
|
+
}) : u
|
|
2930
|
+
}),
|
|
2931
|
+
/* @__PURE__ */ N("div", {
|
|
2932
|
+
className: "flex-1 min-w-0",
|
|
2933
|
+
children: [/* @__PURE__ */ M("h3", {
|
|
2934
|
+
className: "font-medium text-sm truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors",
|
|
2935
|
+
children: t
|
|
2936
|
+
}), n ? /* @__PURE__ */ M("p", {
|
|
2937
|
+
className: "text-xs text-muted-foreground mt-1 line-clamp-2 leading-relaxed",
|
|
2938
|
+
children: n
|
|
2939
|
+
}) : /* @__PURE__ */ M("p", {
|
|
2940
|
+
className: "text-xs text-muted-foreground/50 mt-1 italic",
|
|
2941
|
+
children: r("forms.common.noDescription")
|
|
2942
|
+
})]
|
|
2943
|
+
}),
|
|
2944
|
+
s ? l.length > 0 && /* @__PURE__ */ M("div", {
|
|
2945
|
+
className: "flex items-center gap-1 shrink-0 mt-0.5",
|
|
2946
|
+
children: l.map((t) => /* @__PURE__ */ M("button", {
|
|
2947
|
+
type: "button",
|
|
2948
|
+
title: t.label,
|
|
2949
|
+
onClick: () => t.onClick(e.original),
|
|
2950
|
+
className: "inline-flex items-center justify-center rounded-md p-1.5 text-muted-foreground hover:text-blue-600 hover:bg-blue-500/10 dark:hover:text-blue-400 dark:hover:bg-blue-400/10 transition-colors cursor-pointer",
|
|
2951
|
+
children: t.icon
|
|
2952
|
+
}, t.key))
|
|
2953
|
+
}) : /* @__PURE__ */ M(Le, { className: "h-4 w-4 text-muted-foreground/40 group-hover:text-blue-500 transition-all group-hover:translate-x-0.5 mt-0.5 shrink-0" })
|
|
2954
|
+
]
|
|
2955
|
+
})]
|
|
2956
|
+
});
|
|
2957
|
+
return s ? /* @__PURE__ */ M("div", {
|
|
2958
|
+
className: "group",
|
|
2959
|
+
children: d
|
|
2960
|
+
}, e.id) : /* @__PURE__ */ M(F, {
|
|
2961
|
+
to: i,
|
|
2962
|
+
className: "group",
|
|
2963
|
+
children: d
|
|
2964
|
+
}, e.id);
|
|
2965
|
+
})
|
|
2966
|
+
}) : /* @__PURE__ */ M(le, {
|
|
2967
|
+
className: "p-8",
|
|
2968
|
+
children: /* @__PURE__ */ N("div", {
|
|
2969
|
+
className: "text-center text-muted-foreground",
|
|
2970
|
+
children: [/* @__PURE__ */ M(Be, { className: "h-8 w-8 mx-auto mb-2 opacity-40" }), /* @__PURE__ */ M("p", {
|
|
2971
|
+
className: "text-sm",
|
|
2972
|
+
children: r("forms.common.noResults")
|
|
2973
|
+
})]
|
|
2974
|
+
})
|
|
2975
|
+
}),
|
|
2976
|
+
g.getPageCount() > 1 && /* @__PURE__ */ N("div", {
|
|
2977
|
+
className: "flex items-center justify-end space-x-2 mt-4",
|
|
2978
|
+
children: [
|
|
2979
|
+
/* @__PURE__ */ N("div", {
|
|
2980
|
+
className: "flex items-center space-x-2",
|
|
2981
|
+
children: [/* @__PURE__ */ M("p", {
|
|
2982
|
+
className: "text-sm text-muted-foreground",
|
|
2983
|
+
children: r("forms.common.perPage")
|
|
2984
|
+
}), /* @__PURE__ */ N(y, {
|
|
2985
|
+
value: `${g.getState().pagination.pageSize}`,
|
|
2986
|
+
onValueChange: (e) => g.setPageSize(Number(e)),
|
|
2987
|
+
children: [/* @__PURE__ */ M(me, {
|
|
2988
|
+
className: "h-8 w-17.5",
|
|
2989
|
+
children: /* @__PURE__ */ M(ne, { placeholder: g.getState().pagination.pageSize })
|
|
2990
|
+
}), /* @__PURE__ */ M(te, {
|
|
2991
|
+
side: "top",
|
|
2992
|
+
children: [
|
|
2993
|
+
12,
|
|
2994
|
+
24,
|
|
2995
|
+
36,
|
|
2996
|
+
48
|
|
2997
|
+
].map((t) => /* @__PURE__ */ M(e, {
|
|
2998
|
+
value: `${t}`,
|
|
2999
|
+
children: t
|
|
3000
|
+
}, t))
|
|
3001
|
+
})]
|
|
3002
|
+
})]
|
|
3003
|
+
}),
|
|
3004
|
+
/* @__PURE__ */ M("div", {
|
|
3005
|
+
className: "flex w-25 items-center justify-center text-sm font-medium",
|
|
3006
|
+
children: r("forms.common.pageOf", {
|
|
3007
|
+
index: g.getState().pagination.pageIndex + 1,
|
|
3008
|
+
count: g.getPageCount()
|
|
3009
|
+
})
|
|
3010
|
+
}),
|
|
3011
|
+
/* @__PURE__ */ N("div", {
|
|
3012
|
+
className: "flex items-center space-x-2",
|
|
3013
|
+
children: [/* @__PURE__ */ M(T, {
|
|
3014
|
+
variant: "outline",
|
|
3015
|
+
size: "sm",
|
|
3016
|
+
onClick: () => g.previousPage(),
|
|
3017
|
+
disabled: !g.getCanPreviousPage(),
|
|
3018
|
+
className: "h-8 w-8 p-0",
|
|
3019
|
+
children: /* @__PURE__ */ M("span", { children: "<" })
|
|
3020
|
+
}), /* @__PURE__ */ M(T, {
|
|
3021
|
+
variant: "outline",
|
|
3022
|
+
size: "sm",
|
|
3023
|
+
onClick: () => g.nextPage(),
|
|
3024
|
+
disabled: !g.getCanNextPage(),
|
|
3025
|
+
className: "h-8 w-8 p-0",
|
|
3026
|
+
children: /* @__PURE__ */ M("span", { children: ">" })
|
|
3027
|
+
})]
|
|
3028
|
+
})
|
|
3029
|
+
]
|
|
3030
|
+
})
|
|
3031
|
+
]
|
|
3032
|
+
});
|
|
3033
|
+
}, {
|
|
3034
|
+
NewButton: Ur,
|
|
3035
|
+
Action: Wr,
|
|
3036
|
+
ItemAction: Gr
|
|
3037
|
+
}), Zr = (e) => (e ?? 0).toLocaleString(), Qr = (e, t, n, r, i) => e.map((e) => /* @__PURE__ */ N(h, { children: [/* @__PURE__ */ M(E, {
|
|
3038
|
+
tooltip: e.title,
|
|
3039
|
+
isActive: n.startsWith((t ?? "") + e.url),
|
|
3040
|
+
asChild: !0,
|
|
3041
|
+
children: /* @__PURE__ */ N(F, {
|
|
3042
|
+
to: (t ?? "") + e.url,
|
|
3043
|
+
onClick: i,
|
|
3044
|
+
children: [e.icon && /* @__PURE__ */ M(e.icon, { className: "size-5!" }), /* @__PURE__ */ M("span", { children: e.title })]
|
|
3045
|
+
})
|
|
3046
|
+
}), !r && e.children && e.children.length > 0 && /* @__PURE__ */ M(D, {
|
|
3047
|
+
className: "ml-4",
|
|
3048
|
+
children: Qr(e.children, t, n, r, i)
|
|
3049
|
+
})] }, e.title)), $r = ({ icon: e, feature: t, name: n, urlBase: r, isNew: i, data: o, onDelete: s, onExport: c, open: l, setOpen: u }) => {
|
|
3050
|
+
let { t: d } = P(), p = Fe().pathname, { state: m, isMobile: g, setOpenMobile: _ } = f(), v = m === "collapsed", y = g ? () => _(!1) : void 0;
|
|
3051
|
+
return /* @__PURE__ */ N(oe, {
|
|
3052
|
+
collapsible: "icon",
|
|
3053
|
+
variant: "inset",
|
|
3054
|
+
position: "absolute",
|
|
3055
|
+
children: [/* @__PURE__ */ M(Te, {
|
|
3056
|
+
className: "pb-3",
|
|
3057
|
+
children: /* @__PURE__ */ M(D, { children: /* @__PURE__ */ N(h, {
|
|
3058
|
+
className: "flex items-center",
|
|
3059
|
+
children: [/* @__PURE__ */ M(E, {
|
|
3060
|
+
asChild: !0,
|
|
3061
|
+
className: "data-[slot=sidebar-menu-button]:p-1.5!",
|
|
3062
|
+
children: /* @__PURE__ */ N(F, {
|
|
3063
|
+
to: r ?? "#",
|
|
3064
|
+
className: "flex items-center gap-2.5",
|
|
3065
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3066
|
+
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10",
|
|
3067
|
+
children: /* @__PURE__ */ M(e, { className: "size-5! text-blue-600 dark:text-blue-400" })
|
|
3068
|
+
}), !v && /* @__PURE__ */ M("span", {
|
|
3069
|
+
className: "text-sm font-semibold whitespace-nowrap truncate",
|
|
3070
|
+
children: i ? d("sidebar.new", { feature: t }) : n
|
|
3071
|
+
})]
|
|
3072
|
+
})
|
|
3073
|
+
}), !v && /* @__PURE__ */ N("div", {
|
|
3074
|
+
className: "flex items-center gap-1 mr-auto",
|
|
3075
|
+
children: [!i && c && /* @__PURE__ */ M(T, {
|
|
3076
|
+
variant: "ghost",
|
|
3077
|
+
size: "icon-sm",
|
|
3078
|
+
onClick: c,
|
|
3079
|
+
children: /* @__PURE__ */ M(Re, { className: "size-5!" })
|
|
3080
|
+
}), !i && s && u && /* @__PURE__ */ M(Ue, {
|
|
3081
|
+
feature: t,
|
|
3082
|
+
name: n,
|
|
3083
|
+
onDelete: s,
|
|
3084
|
+
open: l ?? !1,
|
|
3085
|
+
setOpen: u
|
|
3086
|
+
})]
|
|
3087
|
+
})]
|
|
3088
|
+
}) })
|
|
3089
|
+
}), /* @__PURE__ */ N(ce, { children: [o?.counts && o.counts.length > 0 && /* @__PURE__ */ N(ve, { children: [/* @__PURE__ */ M(x, { children: d("sidebar.indexing") }), /* @__PURE__ */ M(de, {
|
|
3090
|
+
className: "flex flex-col gap-2 pt-4",
|
|
3091
|
+
children: /* @__PURE__ */ M(D, { children: o.counts.map((e) => /* @__PURE__ */ N(h, { children: [/* @__PURE__ */ N(E, {
|
|
3092
|
+
tooltip: e.title + ": " + Zr(e.count),
|
|
3093
|
+
variant: "outline",
|
|
3094
|
+
children: [e.icon && /* @__PURE__ */ M(e.icon, { className: "size-5!" }), /* @__PURE__ */ M("span", { children: e.title })]
|
|
3095
|
+
}), !v && /* @__PURE__ */ M(a, { children: Zr(e.count) })] }, e.title)) })
|
|
3096
|
+
})] }), /* @__PURE__ */ N(ve, { children: [/* @__PURE__ */ M(x, { children: t }), /* @__PURE__ */ M(de, {
|
|
3097
|
+
className: "flex flex-col gap-2",
|
|
3098
|
+
children: /* @__PURE__ */ M(D, { children: o?.navMain && Qr(i ? o.navMain.filter((e) => e.url === "/detail") : o.navMain, r, p, v, y) })
|
|
3099
|
+
})] })] })]
|
|
3100
|
+
});
|
|
3101
|
+
}, ei = ({ checkIsNotUndefined: e, error: t, tryAgainUrl: n, children: i }) => {
|
|
3102
|
+
let { t: a } = P();
|
|
3103
|
+
return t ? /* @__PURE__ */ M(He, {
|
|
3104
|
+
icon: se,
|
|
3105
|
+
title: a("common.errorLoading"),
|
|
3106
|
+
description: t,
|
|
3107
|
+
buttonText: a("common.tryAgain"),
|
|
3108
|
+
urlNew: n
|
|
3109
|
+
}) : e === void 0 && !t ? /* @__PURE__ */ N("div", {
|
|
3110
|
+
className: "space-y-6 py-8 px-6 animate-pulse",
|
|
3111
|
+
children: [
|
|
3112
|
+
/* @__PURE__ */ M(r, { className: "h-8 w-1/3 rounded-md" }),
|
|
3113
|
+
/* @__PURE__ */ M("div", {
|
|
3114
|
+
className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",
|
|
3115
|
+
children: [
|
|
3116
|
+
"skeleton-1",
|
|
3117
|
+
"skeleton-2",
|
|
3118
|
+
"skeleton-3"
|
|
3119
|
+
].map((e) => /* @__PURE__ */ N("div", {
|
|
3120
|
+
className: "space-y-3 p-4 border rounded-xl bg-slate-50/50 dark:bg-slate-900/20",
|
|
3121
|
+
children: [
|
|
3122
|
+
/* @__PURE__ */ M(r, { className: "h-5 w-2/3" }),
|
|
3123
|
+
/* @__PURE__ */ M(r, { className: "h-12 w-full" }),
|
|
3124
|
+
/* @__PURE__ */ M(r, { className: "h-4 w-5/6" })
|
|
3125
|
+
]
|
|
3126
|
+
}, e))
|
|
3127
|
+
}),
|
|
3128
|
+
/* @__PURE__ */ M("div", {
|
|
3129
|
+
className: "pt-4",
|
|
3130
|
+
children: /* @__PURE__ */ M(r, { className: "h-10 w-32 rounded-lg" })
|
|
3131
|
+
})
|
|
3132
|
+
]
|
|
3133
|
+
}) : /* @__PURE__ */ M(j, { children: i });
|
|
3134
|
+
};
|
|
3135
|
+
//#endregion
|
|
3136
|
+
//#region src/components/router/nav-main.tsx
|
|
3137
|
+
function ti({ groups: e }) {
|
|
3138
|
+
let t = Fe().pathname, { isMobile: n, setOpenMobile: r } = f();
|
|
3139
|
+
return /* @__PURE__ */ M(j, { children: e.map((e) => /* @__PURE__ */ N(ve, { children: [e.label && /* @__PURE__ */ M(x, { children: e.label }), /* @__PURE__ */ M(de, {
|
|
3140
|
+
className: "flex flex-col gap-2",
|
|
3141
|
+
children: /* @__PURE__ */ M(D, { children: e.items.map((e) => /* @__PURE__ */ M(h, { children: /* @__PURE__ */ M(E, {
|
|
3142
|
+
tooltip: e.title,
|
|
3143
|
+
isActive: t.startsWith(e.url),
|
|
3144
|
+
asChild: !0,
|
|
3145
|
+
children: /* @__PURE__ */ N(F, {
|
|
3146
|
+
to: e.url,
|
|
3147
|
+
onClick: () => n && r(!1),
|
|
3148
|
+
children: [e.icon && /* @__PURE__ */ M(e.icon, { className: "size-6!" }), /* @__PURE__ */ M("span", { children: e.title })]
|
|
3149
|
+
})
|
|
3150
|
+
}) }, e.title)) })
|
|
3151
|
+
})] }, e.label ?? "_ungrouped")) });
|
|
3152
|
+
}
|
|
3153
|
+
//#endregion
|
|
3154
|
+
//#region src/components/router/nav-user.tsx
|
|
3155
|
+
function ni({ user: e, accountUrl: t, logoutUrl: r, onLogout: i }) {
|
|
3156
|
+
let { t: a } = P(), { isMobile: o } = f(), c = () => {
|
|
3157
|
+
i ? i() : r && (globalThis.location.href = r);
|
|
3158
|
+
}, l = k.useMemo(() => {
|
|
3159
|
+
let t = e.firstName || "", n = e.lastName || "";
|
|
3160
|
+
if (!t && !n) return " ";
|
|
3161
|
+
let r = `${t} ${n}`.trim().split(" ").filter(Boolean);
|
|
3162
|
+
return r.length === 1 ? r[0].charAt(0).toUpperCase() : r[0].charAt(0).toUpperCase() + (r.at(-1)?.charAt(0).toUpperCase() ?? "");
|
|
3163
|
+
}, [e]), u = e?.avatarUrl || "";
|
|
3164
|
+
return /* @__PURE__ */ M(D, { children: /* @__PURE__ */ M(h, { children: /* @__PURE__ */ N(S, { children: [/* @__PURE__ */ M(w, {
|
|
3165
|
+
asChild: !0,
|
|
3166
|
+
children: /* @__PURE__ */ N(E, {
|
|
3167
|
+
size: "lg",
|
|
3168
|
+
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
3169
|
+
children: [
|
|
3170
|
+
/* @__PURE__ */ N(ge, {
|
|
3171
|
+
className: "h-8 w-8 rounded-lg",
|
|
3172
|
+
children: [u && /* @__PURE__ */ M(he, {
|
|
3173
|
+
src: u,
|
|
3174
|
+
alt: e.username
|
|
3175
|
+
}), /* @__PURE__ */ M(n, {
|
|
3176
|
+
className: "rounded-lg",
|
|
3177
|
+
children: l
|
|
3178
|
+
})]
|
|
3179
|
+
}),
|
|
3180
|
+
/* @__PURE__ */ N("div", {
|
|
3181
|
+
className: "grid flex-1 text-left text-sm leading-tight",
|
|
3182
|
+
children: [/* @__PURE__ */ N("span", {
|
|
3183
|
+
className: "truncate font-medium",
|
|
3184
|
+
children: [
|
|
3185
|
+
e.firstName,
|
|
3186
|
+
" ",
|
|
3187
|
+
e.lastName
|
|
3188
|
+
]
|
|
3189
|
+
}), /* @__PURE__ */ M("span", {
|
|
3190
|
+
className: "text-muted-foreground truncate text-xs",
|
|
3191
|
+
children: e.email
|
|
3192
|
+
})]
|
|
3193
|
+
}),
|
|
3194
|
+
/* @__PURE__ */ M(L, { className: "ml-auto size-4" })
|
|
3195
|
+
]
|
|
3196
|
+
})
|
|
3197
|
+
}), /* @__PURE__ */ N(ke, {
|
|
3198
|
+
className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
|
|
3199
|
+
side: o ? "bottom" : "right",
|
|
3200
|
+
align: "end",
|
|
3201
|
+
sideOffset: 4,
|
|
3202
|
+
children: [
|
|
3203
|
+
/* @__PURE__ */ M(m, {
|
|
3204
|
+
className: "p-0 font-normal",
|
|
3205
|
+
children: /* @__PURE__ */ N("div", {
|
|
3206
|
+
className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm",
|
|
3207
|
+
children: [/* @__PURE__ */ N(ge, {
|
|
3208
|
+
className: "h-8 w-8 rounded-lg",
|
|
3209
|
+
children: [u && /* @__PURE__ */ M(he, {
|
|
3210
|
+
src: u,
|
|
3211
|
+
alt: e.username
|
|
3212
|
+
}), /* @__PURE__ */ M(n, {
|
|
3213
|
+
className: "rounded-lg",
|
|
3214
|
+
children: l
|
|
3215
|
+
})]
|
|
3216
|
+
}), /* @__PURE__ */ N("div", {
|
|
3217
|
+
className: "grid flex-1 text-left text-sm leading-tight",
|
|
3218
|
+
children: [/* @__PURE__ */ N("span", {
|
|
3219
|
+
className: "truncate font-medium",
|
|
3220
|
+
children: [
|
|
3221
|
+
e.firstName,
|
|
3222
|
+
" ",
|
|
3223
|
+
e.lastName
|
|
3224
|
+
]
|
|
3225
|
+
}), /* @__PURE__ */ M("span", {
|
|
3226
|
+
className: "text-muted-foreground truncate text-xs",
|
|
3227
|
+
children: e.email
|
|
3228
|
+
})]
|
|
3229
|
+
})]
|
|
3230
|
+
})
|
|
3231
|
+
}),
|
|
3232
|
+
/* @__PURE__ */ M(s, {}),
|
|
3233
|
+
t && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(ie, { children: /* @__PURE__ */ M(F, {
|
|
3234
|
+
to: t,
|
|
3235
|
+
className: "w-full",
|
|
3236
|
+
children: /* @__PURE__ */ N(O, { children: [/* @__PURE__ */ M(ue, {}), a("nav.account")] })
|
|
3237
|
+
}) }), /* @__PURE__ */ M(s, {})] }),
|
|
3238
|
+
/* @__PURE__ */ N(O, {
|
|
3239
|
+
onClick: c,
|
|
3240
|
+
className: "cursor-pointer",
|
|
3241
|
+
children: [/* @__PURE__ */ M(ye, {}), /* @__PURE__ */ M("span", { children: a("nav.logOut") })]
|
|
3242
|
+
})
|
|
3243
|
+
]
|
|
3244
|
+
})] }) }) });
|
|
3245
|
+
}
|
|
3246
|
+
//#endregion
|
|
3247
|
+
//#region src/components/router/page-content.tsx
|
|
3248
|
+
var ri = () => /* @__PURE__ */ M("div", {
|
|
3249
|
+
className: "flex flex-1 flex-col",
|
|
3250
|
+
children: /* @__PURE__ */ M("div", {
|
|
3251
|
+
className: "@container/main flex flex-1 flex-col gap-2",
|
|
3252
|
+
children: /* @__PURE__ */ M("div", {
|
|
3253
|
+
className: "flex flex-col gap-4 py-4 md:gap-6 md:py-6",
|
|
3254
|
+
children: /* @__PURE__ */ M(Pe, {})
|
|
3255
|
+
})
|
|
3256
|
+
})
|
|
3257
|
+
}), ii = ({ icon: e, title: t, urlBase: n, children: r }) => {
|
|
3258
|
+
let { items: i } = be(), a = I(), { t: s } = P(), c = i.length > 0 ? i[i.length - 1] : null, l = i.length > 1 ? i[i.length - 2] : null;
|
|
3259
|
+
return /* @__PURE__ */ M("header", {
|
|
3260
|
+
className: "flex h-(--header-height) shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-(--header-height)",
|
|
3261
|
+
children: /* @__PURE__ */ N("div", {
|
|
3262
|
+
className: "flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6",
|
|
3263
|
+
children: [
|
|
3264
|
+
/* @__PURE__ */ M(d, { className: "-ml-1 hidden md:flex" }),
|
|
3265
|
+
/* @__PURE__ */ M(b, {
|
|
3266
|
+
orientation: "vertical",
|
|
3267
|
+
className: "mx-2 data-[orientation=vertical]:h-4 hidden md:block"
|
|
3268
|
+
}),
|
|
3269
|
+
/* @__PURE__ */ N("div", {
|
|
3270
|
+
className: "hidden md:flex items-center gap-1",
|
|
3271
|
+
children: [e && /* @__PURE__ */ M("div", {
|
|
3272
|
+
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10 mr-1",
|
|
3273
|
+
children: /* @__PURE__ */ M(e, { className: "size-4.5! text-blue-600 dark:text-blue-400" })
|
|
3274
|
+
}), n ? /* @__PURE__ */ M(Oe, { children: /* @__PURE__ */ M(o, { children: i.map((e, t) => /* @__PURE__ */ N(k.Fragment, { children: [t > 0 && /* @__PURE__ */ M(g, {}), /* @__PURE__ */ M(De, { children: e.href ? /* @__PURE__ */ M(p, {
|
|
3275
|
+
asChild: !0,
|
|
3276
|
+
children: /* @__PURE__ */ M(F, {
|
|
3277
|
+
to: e.href,
|
|
3278
|
+
children: e.label
|
|
3279
|
+
})
|
|
3280
|
+
}) : /* @__PURE__ */ M(Ee, { children: e.label }) })] }, e.label)) }) }) : /* @__PURE__ */ M("h1", {
|
|
3281
|
+
className: "text-base font-semibold",
|
|
3282
|
+
children: t
|
|
3283
|
+
})]
|
|
3284
|
+
}),
|
|
3285
|
+
/* @__PURE__ */ N("div", {
|
|
3286
|
+
className: "flex md:hidden items-center gap-2 min-w-0 flex-1",
|
|
3287
|
+
children: [
|
|
3288
|
+
l?.href && /* @__PURE__ */ M("button", {
|
|
3289
|
+
type: "button",
|
|
3290
|
+
title: s("common.goBack"),
|
|
3291
|
+
onClick: () => a(l.href),
|
|
3292
|
+
className: "shrink-0 flex items-center justify-center size-8 rounded-lg hover:bg-muted transition-colors",
|
|
3293
|
+
children: /* @__PURE__ */ M(Ie, { className: "size-4" })
|
|
3294
|
+
}),
|
|
3295
|
+
e && /* @__PURE__ */ M("div", {
|
|
3296
|
+
className: "flex shrink-0 h-7 w-7 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10",
|
|
3297
|
+
children: /* @__PURE__ */ M(e, { className: "size-3.5! text-blue-600 dark:text-blue-400" })
|
|
3298
|
+
}),
|
|
3299
|
+
/* @__PURE__ */ M("span", {
|
|
3300
|
+
className: "text-sm font-semibold truncate",
|
|
3301
|
+
children: c?.label ?? t
|
|
3302
|
+
})
|
|
3303
|
+
]
|
|
3304
|
+
}),
|
|
3305
|
+
/* @__PURE__ */ N("div", {
|
|
3306
|
+
className: "ml-auto flex items-center gap-2",
|
|
3307
|
+
children: [
|
|
3308
|
+
r && /* @__PURE__ */ M("div", {
|
|
3309
|
+
className: "hidden md:flex items-center",
|
|
3310
|
+
children: r
|
|
3311
|
+
}),
|
|
3312
|
+
/* @__PURE__ */ M("div", {
|
|
3313
|
+
className: "hidden md:block",
|
|
3314
|
+
children: /* @__PURE__ */ M(pe, {})
|
|
3315
|
+
}),
|
|
3316
|
+
/* @__PURE__ */ M(d, { className: "md:hidden" })
|
|
3317
|
+
]
|
|
3318
|
+
})
|
|
3319
|
+
]
|
|
3320
|
+
})
|
|
3321
|
+
});
|
|
3322
|
+
}, ai = ({ icon: e, title: t, urlBase: n }) => /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M(ii, {
|
|
3323
|
+
icon: e,
|
|
3324
|
+
title: t,
|
|
3325
|
+
urlBase: n
|
|
3326
|
+
}), /* @__PURE__ */ M(ri, {})] }), oi = ({ icon: e, feature: t, description: n, urlBase: r }) => {
|
|
3327
|
+
let { isMobile: i, toggleSidebar: a } = f(), o = /* @__PURE__ */ N("div", {
|
|
3328
|
+
className: "flex items-center gap-3",
|
|
3329
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3330
|
+
className: `flex h-9 w-9 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10 ${i ? "cursor-pointer active:scale-95 transition-transform" : ""}`,
|
|
3331
|
+
onClick: i ? a : void 0,
|
|
3332
|
+
onKeyDown: i ? (e) => {
|
|
3333
|
+
(e.key === "Enter" || e.key === " ") && a();
|
|
3334
|
+
} : void 0,
|
|
3335
|
+
tabIndex: i ? 0 : void 0,
|
|
3336
|
+
role: i ? "button" : void 0,
|
|
3337
|
+
title: i ? "Open navigation" : void 0,
|
|
3338
|
+
children: /* @__PURE__ */ M(e, { className: "size-5! text-blue-600 dark:text-blue-400" })
|
|
3339
|
+
}), /* @__PURE__ */ N("div", {
|
|
3340
|
+
className: "min-w-0",
|
|
3341
|
+
children: [/* @__PURE__ */ M("h1", {
|
|
3342
|
+
className: "text-base font-semibold leading-tight text-foreground truncate",
|
|
3343
|
+
children: t
|
|
3344
|
+
}), /* @__PURE__ */ M("p", {
|
|
3345
|
+
className: "hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5 truncate",
|
|
3346
|
+
children: n
|
|
3347
|
+
})]
|
|
3348
|
+
})]
|
|
3349
|
+
});
|
|
3350
|
+
return r && !i ? /* @__PURE__ */ M("div", {
|
|
3351
|
+
className: "min-w-0 flex-1",
|
|
3352
|
+
children: /* @__PURE__ */ M(F, {
|
|
3353
|
+
to: r,
|
|
3354
|
+
className: "group inline-flex max-w-full",
|
|
3355
|
+
children: o
|
|
3356
|
+
})
|
|
3357
|
+
}) : /* @__PURE__ */ M("div", {
|
|
3358
|
+
className: "min-w-0 flex-1",
|
|
3359
|
+
children: o
|
|
3360
|
+
});
|
|
3361
|
+
};
|
|
3362
|
+
oi.displayName = "StickyPageHeaderTitle";
|
|
3363
|
+
var si = () => null;
|
|
3364
|
+
si.displayName = "StickyPageHeaderAction";
|
|
3365
|
+
var ci = ({ children: e, menuLabel: t }) => {
|
|
3366
|
+
let n = I(), { t: r } = P(), i = [], a = [];
|
|
3367
|
+
k.Children.forEach(e, (e) => {
|
|
3368
|
+
k.isValidElement(e) && e.type?.displayName === "StickyPageHeaderAction" ? i.push(e.props) : a.push(e);
|
|
3369
|
+
});
|
|
3370
|
+
let o = t ?? r("common.actions");
|
|
3371
|
+
return /* @__PURE__ */ N("div", {
|
|
3372
|
+
className: "flex items-center gap-2 shrink-0",
|
|
3373
|
+
children: [a, i.length > 0 && /* @__PURE__ */ N(S, { children: [/* @__PURE__ */ M(w, {
|
|
3374
|
+
asChild: !0,
|
|
3375
|
+
children: t ? /* @__PURE__ */ N(T, {
|
|
3376
|
+
variant: "outline",
|
|
3377
|
+
size: "sm",
|
|
3378
|
+
className: "gap-1.5",
|
|
3379
|
+
children: [/* @__PURE__ */ M(L, { className: "size-4" }), /* @__PURE__ */ M("span", {
|
|
3380
|
+
className: "hidden sm:inline",
|
|
3381
|
+
children: t
|
|
3382
|
+
})]
|
|
3383
|
+
}) : /* @__PURE__ */ M(T, {
|
|
3384
|
+
variant: "ghost",
|
|
3385
|
+
size: "icon-sm",
|
|
3386
|
+
"aria-label": o,
|
|
3387
|
+
title: o,
|
|
3388
|
+
children: /* @__PURE__ */ M(L, { className: "size-5!" })
|
|
3389
|
+
})
|
|
3390
|
+
}), /* @__PURE__ */ M(ke, {
|
|
3391
|
+
align: "end",
|
|
3392
|
+
children: i.map((e) => {
|
|
3393
|
+
let t = e.icon ?? ze;
|
|
3394
|
+
return /* @__PURE__ */ N(O, {
|
|
3395
|
+
disabled: e.disabled,
|
|
3396
|
+
onClick: () => {
|
|
3397
|
+
e.href && n(e.href), e.onClick && e.onClick();
|
|
3398
|
+
},
|
|
3399
|
+
children: [/* @__PURE__ */ M(t, { className: "size-4 mr-2" }), e.label]
|
|
3400
|
+
}, e.label);
|
|
3401
|
+
})
|
|
3402
|
+
})] })]
|
|
3403
|
+
});
|
|
3404
|
+
};
|
|
3405
|
+
ci.displayName = "StickyPageHeaderActions";
|
|
3406
|
+
var li = Object.assign(({ children: e }) => /* @__PURE__ */ M("header", {
|
|
3407
|
+
className: "sticky top-0 z-10 -mx-4 lg:-mx-6 mb-5 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/80",
|
|
3408
|
+
children: /* @__PURE__ */ N("div", {
|
|
3409
|
+
className: "flex w-full items-center gap-3 px-4 lg:px-6 py-3",
|
|
3410
|
+
children: [/* @__PURE__ */ N("div", {
|
|
3411
|
+
className: "hidden md:flex items-center gap-1",
|
|
3412
|
+
children: [/* @__PURE__ */ M(d, { className: "-ml-1" }), /* @__PURE__ */ M(b, {
|
|
3413
|
+
orientation: "vertical",
|
|
3414
|
+
className: "mx-2 data-[orientation=vertical]:h-4"
|
|
3415
|
+
})]
|
|
3416
|
+
}), e]
|
|
3417
|
+
})
|
|
3418
|
+
}), {
|
|
3419
|
+
Title: oi,
|
|
3420
|
+
Actions: ci,
|
|
3421
|
+
Action: si
|
|
3422
|
+
}), ui = (e) => /* @__PURE__ */ M("div", {
|
|
3423
|
+
className: "w-full px-1 md:px-6 lg:px-8 py-1 md:py-4 min-h-[calc(100svh-10.5rem)]",
|
|
3424
|
+
children: /* @__PURE__ */ M("div", {
|
|
3425
|
+
className: "flex min-h-full w-full md:rounded-xl md:border md:bg-sidebar md:shadow-sm",
|
|
3426
|
+
children: /* @__PURE__ */ N(t, {
|
|
3427
|
+
defaultOpen: !0,
|
|
3428
|
+
className: "min-h-0!",
|
|
3429
|
+
style: {
|
|
3430
|
+
"--sidebar-width": "calc(var(--spacing) * 72)",
|
|
3431
|
+
"--header-height": "calc(var(--spacing) * 12)",
|
|
3432
|
+
minHeight: 0
|
|
3433
|
+
},
|
|
3434
|
+
children: [/* @__PURE__ */ M($r, { ...e }), /* @__PURE__ */ M(re, {
|
|
3435
|
+
className: "md:mr-1.5 md:my-1.5 md:rounded-xl md:border bg-background md:shadow-sm",
|
|
3436
|
+
children: /* @__PURE__ */ M("main", {
|
|
3437
|
+
className: "flex flex-1 flex-col pt-2 md:pt-4 max-md:[&_.px-6]:px-2",
|
|
3438
|
+
children: /* @__PURE__ */ M(Pe, {})
|
|
3439
|
+
})
|
|
3440
|
+
})]
|
|
3441
|
+
})
|
|
3442
|
+
})
|
|
3443
|
+
}), di = () => null;
|
|
3444
|
+
di.displayName = "SubPageHeaderAction";
|
|
3445
|
+
var fi = Object.assign(({ icon: e, feature: t, name: n, description: r, urlBase: i, onDelete: a, open: o, setOpen: s, children: c }) => {
|
|
3446
|
+
let { isMobile: l, toggleSidebar: u } = f(), p = I(), m = [];
|
|
3447
|
+
k.Children.forEach(c, (e) => {
|
|
3448
|
+
k.isValidElement(e) && e.type?.displayName === "SubPageHeaderAction" && m.push(e.props);
|
|
3449
|
+
});
|
|
3450
|
+
let h = /* @__PURE__ */ N("div", {
|
|
3451
|
+
className: "flex items-center gap-3",
|
|
3452
|
+
children: [e && /* @__PURE__ */ M("div", {
|
|
3453
|
+
className: `flex h-9 w-9 items-center justify-center rounded-lg bg-linear-to-br from-blue-500/10 to-indigo-500/10 dark:from-blue-500/20 dark:to-indigo-500/20 ring-1 ring-blue-500/10 dark:ring-blue-400/10 ${l ? "cursor-pointer active:scale-95 transition-transform" : ""}`,
|
|
3454
|
+
onClick: l ? u : void 0,
|
|
3455
|
+
onKeyDown: l ? (e) => {
|
|
3456
|
+
(e.key === "Enter" || e.key === " ") && u();
|
|
3457
|
+
} : void 0,
|
|
3458
|
+
tabIndex: l ? 0 : void 0,
|
|
3459
|
+
title: l ? "Open navigation" : void 0,
|
|
3460
|
+
children: /* @__PURE__ */ M(e, { className: "size-5! text-blue-600 dark:text-blue-400" })
|
|
3461
|
+
}), /* @__PURE__ */ N("div", {
|
|
3462
|
+
className: "min-w-0",
|
|
3463
|
+
children: [/* @__PURE__ */ M("h1", {
|
|
3464
|
+
className: "text-base font-semibold leading-tight text-foreground",
|
|
3465
|
+
children: t
|
|
3466
|
+
}), /* @__PURE__ */ M("p", {
|
|
3467
|
+
className: "hidden md:block text-xs text-muted-foreground leading-relaxed mt-0.5",
|
|
3468
|
+
children: r
|
|
3469
|
+
})]
|
|
3470
|
+
})]
|
|
3471
|
+
});
|
|
3472
|
+
return /* @__PURE__ */ N("header", {
|
|
3473
|
+
className: "mb-5",
|
|
3474
|
+
children: [/* @__PURE__ */ N("div", {
|
|
3475
|
+
className: "flex w-full items-center gap-3 px-4 lg:px-6",
|
|
3476
|
+
children: [
|
|
3477
|
+
/* @__PURE__ */ N("div", {
|
|
3478
|
+
className: "hidden md:flex items-center gap-1",
|
|
3479
|
+
children: [/* @__PURE__ */ M(d, { className: "-ml-1" }), /* @__PURE__ */ M(b, {
|
|
3480
|
+
orientation: "vertical",
|
|
3481
|
+
className: "mx-2 data-[orientation=vertical]:h-4"
|
|
3482
|
+
})]
|
|
3483
|
+
}),
|
|
3484
|
+
/* @__PURE__ */ M("div", {
|
|
3485
|
+
className: "min-w-0 flex-1",
|
|
3486
|
+
children: i && !l ? /* @__PURE__ */ M(F, {
|
|
3487
|
+
to: i,
|
|
3488
|
+
className: "group inline-flex",
|
|
3489
|
+
children: h
|
|
3490
|
+
}) : h
|
|
3491
|
+
}),
|
|
3492
|
+
/* @__PURE__ */ N("div", {
|
|
3493
|
+
className: "flex items-center gap-2",
|
|
3494
|
+
children: [m.length > 0 && /* @__PURE__ */ N(S, { children: [/* @__PURE__ */ M(w, {
|
|
3495
|
+
asChild: !0,
|
|
3496
|
+
children: /* @__PURE__ */ N(T, {
|
|
3497
|
+
variant: "outline",
|
|
3498
|
+
size: "sm",
|
|
3499
|
+
className: "gap-1.5",
|
|
3500
|
+
children: [/* @__PURE__ */ M(L, { className: "size-4" }), /* @__PURE__ */ M("span", {
|
|
3501
|
+
className: "hidden sm:inline",
|
|
3502
|
+
children: "Actions"
|
|
3503
|
+
})]
|
|
3504
|
+
})
|
|
3505
|
+
}), /* @__PURE__ */ M(ke, {
|
|
3506
|
+
align: "end",
|
|
3507
|
+
children: m.map((e) => {
|
|
3508
|
+
let t = e.icon ?? ze;
|
|
3509
|
+
return /* @__PURE__ */ N(O, {
|
|
3510
|
+
disabled: e.disabled,
|
|
3511
|
+
onClick: () => {
|
|
3512
|
+
e.href && p(e.href), e.onClick && e.onClick();
|
|
3513
|
+
},
|
|
3514
|
+
children: [/* @__PURE__ */ M(t, { className: "size-4 mr-2" }), e.label]
|
|
3515
|
+
}, e.label);
|
|
3516
|
+
})
|
|
3517
|
+
})] }), o !== void 0 && a !== void 0 && s !== void 0 && /* @__PURE__ */ M(Ue, {
|
|
3518
|
+
feature: t,
|
|
3519
|
+
name: n,
|
|
3520
|
+
onDelete: a,
|
|
3521
|
+
open: o,
|
|
3522
|
+
setOpen: s
|
|
3523
|
+
})]
|
|
3524
|
+
})
|
|
3525
|
+
]
|
|
3526
|
+
}), /* @__PURE__ */ M(b, { className: "mt-3" })]
|
|
3527
|
+
});
|
|
3528
|
+
}, { Action: di });
|
|
3529
|
+
//#endregion
|
|
3530
|
+
export { He as BlankSlate, Ue as DialogDelete, Ve as GradientButtonLink, Xr as GridList, $r as InternalSidebar, ei as LoadProvider, ti as NavMain, ni as NavUser, ai as Page, ri as PageContent, ii as PageHeader, li as StickyPageHeader, ui as SubPage, fi as SubPageHeader };
|