@sito/dashboard 0.0.64 → 0.0.66
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/README.md +69 -120
- package/dist/Badge-CIeYthEy.js +9 -0
- package/dist/Badge-Z78MlGoQ.cjs +1 -0
- package/dist/Badge.cjs +1 -0
- package/dist/Badge.css +1 -0
- package/dist/Badge.d.ts +2 -0
- package/dist/Badge.js +4 -0
- package/dist/Button-BlYa3uPc.cjs +1 -0
- package/dist/Button-D73-swfo.js +24 -0
- package/dist/Button.cjs +1 -0
- package/dist/Button.css +1 -0
- package/dist/Button.d.ts +2 -0
- package/dist/Button.js +4 -0
- package/dist/Chip-JDQqzO9I.js +37 -0
- package/dist/Chip-a2z-338_.cjs +1 -0
- package/dist/Chip.cjs +1 -0
- package/dist/Chip.css +1 -0
- package/dist/Chip.d.ts +2 -0
- package/dist/Chip.js +4 -0
- package/dist/Close-O9P7wJGf.cjs +1 -0
- package/dist/Close-rKC9AcNX.js +17 -0
- package/dist/Dropdown-CAxauIXt.cjs +1 -0
- package/dist/Dropdown-CbaxuMbk.js +63 -0
- package/dist/Dropdown.cjs +1 -0
- package/dist/Dropdown.css +1 -0
- package/dist/Dropdown.d.ts +2 -0
- package/dist/Dropdown.js +4 -0
- package/dist/File-BuJndWMv.js +17 -0
- package/dist/File-_Hjw2d3F.cjs +1 -0
- package/dist/FileInput-5tMOO7mb.cjs +1 -0
- package/dist/FileInput-B--eBQVa.js +91 -0
- package/dist/FileInput.css +1 -0
- package/dist/Filters-BivtNVS3.js +64 -0
- package/dist/Filters-C5XEbF3V.cjs +1 -0
- package/dist/FiltersProvider-CY2fsw_F.js +57 -0
- package/dist/FiltersProvider-CYqLFEI9.cjs +1 -0
- package/dist/FiltersProvider.cjs +1 -0
- package/dist/FiltersProvider.d.ts +2 -0
- package/dist/FiltersProvider.js +8 -0
- package/dist/Form.cjs +1 -0
- package/dist/Form.d.ts +2 -0
- package/dist/Form.js +13 -0
- package/dist/IconButton-BpsTEj0z.js +29 -0
- package/dist/IconButton-CVnmT2E9.cjs +1 -0
- package/dist/IconButton.cjs +1 -0
- package/dist/IconButton.css +1 -0
- package/dist/IconButton.d.ts +2 -0
- package/dist/IconButton.js +4 -0
- package/dist/Loading-B_c_4XLr.js +26 -0
- package/dist/Loading-CNECRan-.cjs +1 -0
- package/dist/Loading.cjs +1 -0
- package/dist/Loading.css +1 -0
- package/dist/Loading.d.ts +2 -0
- package/dist/Loading.js +4 -0
- package/dist/SvgIcons.cjs +1 -0
- package/dist/SvgIcons.d.ts +2 -0
- package/dist/SvgIcons.js +12 -0
- package/dist/Table-CH9HYQ2I.js +946 -0
- package/dist/Table-CWss4TW5.cjs +1 -0
- package/dist/Table.cjs +1 -0
- package/dist/Table.css +1 -0
- package/dist/Table.d.ts +2 -0
- package/dist/Table.js +18 -0
- package/dist/TableOptions.cjs +1 -0
- package/dist/TableOptions.d.ts +2 -0
- package/dist/TableOptions.js +5 -0
- package/dist/TableOptionsProvider-BchUDA3B.cjs +1 -0
- package/dist/TableOptionsProvider-BfQS8l1N.js +50 -0
- package/dist/TextInput-BLfTozZ9.js +320 -0
- package/dist/TextInput-Bn8zsDnU.cjs +1 -0
- package/dist/TextInput.css +1 -0
- package/dist/Tooltip-B4E-FRwY.js +37 -0
- package/dist/Tooltip-BSKAgRkc.cjs +1 -0
- package/dist/Tooltip.cjs +1 -0
- package/dist/Tooltip.css +1 -0
- package/dist/Tooltip.d.ts +2 -0
- package/dist/Tooltip.js +4 -0
- package/dist/Translation.cjs +1 -0
- package/dist/Translation.d.ts +2 -0
- package/dist/Translation.js +5 -0
- package/dist/TranslationProvider-51Pc9Xrr.cjs +1 -0
- package/dist/TranslationProvider-COebIyxr.js +19 -0
- package/dist/components/Button/Button.stories.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.stories.d.ts +1 -0
- package/dist/components/Dropdown/types.d.ts +1 -0
- package/dist/components/Form/AutocompleteInput/AutocompleteInput.d.ts +3 -3
- package/dist/components/Form/FileInput/FileInput.test.d.ts +1 -0
- package/dist/components/Form/TextInput/TextInput.test.d.ts +1 -0
- package/dist/components/IconButton/IconButton.stories.d.ts +1 -0
- package/dist/components/Table/components/Rows.d.ts +0 -1
- package/dist/components/Table/components/TableSelectionBar.d.ts +18 -0
- package/dist/components/Table/components/TableSelectionBar.test.d.ts +1 -0
- package/dist/components/Table/components/index.d.ts +1 -0
- package/dist/components/Table/hooks/index.d.ts +3 -0
- package/dist/components/Table/hooks/useExpandedRows.d.ts +28 -0
- package/dist/components/Table/hooks/useTableMultiActions.d.ts +20 -0
- package/dist/components/Table/hooks/useTableRowSelection.d.ts +26 -0
- package/dist/components/Table/utils.d.ts +8 -0
- package/dist/components/Table/utils.test.d.ts +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.css +1 -0
- package/dist/index.js +70 -0
- package/dist/lib.cjs +1 -0
- package/dist/lib.d.ts +2 -0
- package/dist/lib.js +6 -0
- package/dist/query-81BrXp3i.cjs +1 -0
- package/dist/query-CwuehjY1.js +4 -0
- package/package.json +92 -12
- package/dist/dashboard.cjs +0 -1
- package/dist/dashboard.js +0 -2511
- package/dist/main.css +0 -1
package/dist/dashboard.js
DELETED
|
@@ -1,2511 +0,0 @@
|
|
|
1
|
-
import "./main.css";
|
|
2
|
-
import { jsx as i, jsxs as S, Fragment as Se } from "react/jsx-runtime";
|
|
3
|
-
import { useRef as H, useEffect as j, useCallback as T, forwardRef as Ee, useState as D, useReducer as zt, createContext as He, useContext as qe, useMemo as z, Fragment as _t } from "react";
|
|
4
|
-
const Bt = (e) => {
|
|
5
|
-
const { count: t, className: r = "" } = e, n = H(null);
|
|
6
|
-
return j(() => {
|
|
7
|
-
n.current?.parentNode && ((n.current?.parentNode).style.position = "relative");
|
|
8
|
-
}, [n]), /* @__PURE__ */ i("span", { ref: n, className: `${r} badge-main`, children: t });
|
|
9
|
-
}, Wt = (e) => {
|
|
10
|
-
const {
|
|
11
|
-
children: t,
|
|
12
|
-
type: r = "button",
|
|
13
|
-
variant: n = "text",
|
|
14
|
-
color: a = "default",
|
|
15
|
-
className: s = "",
|
|
16
|
-
...o
|
|
17
|
-
} = e;
|
|
18
|
-
return /* @__PURE__ */ i(
|
|
19
|
-
"button",
|
|
20
|
-
{
|
|
21
|
-
type: r,
|
|
22
|
-
className: `button ${n} ${a} ${s}`,
|
|
23
|
-
...o,
|
|
24
|
-
children: t
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
function ue(e) {
|
|
29
|
-
const {
|
|
30
|
-
text: t,
|
|
31
|
-
onDelete: r,
|
|
32
|
-
children: n,
|
|
33
|
-
icon: a,
|
|
34
|
-
variant: s = "default",
|
|
35
|
-
iconClassName: o = "",
|
|
36
|
-
className: c = "",
|
|
37
|
-
textClassName: l = ""
|
|
38
|
-
} = e;
|
|
39
|
-
return /* @__PURE__ */ S("div", { className: `chip-main ${s} ${c}`, children: [
|
|
40
|
-
/* @__PURE__ */ i("span", { className: l, children: t }),
|
|
41
|
-
n,
|
|
42
|
-
r ? /* @__PURE__ */ i(
|
|
43
|
-
de,
|
|
44
|
-
{
|
|
45
|
-
icon: a ?? /* @__PURE__ */ i(Qe, {}),
|
|
46
|
-
className: `chip-delete-button ${o}`,
|
|
47
|
-
onClick: r
|
|
48
|
-
}
|
|
49
|
-
) : null
|
|
50
|
-
] });
|
|
51
|
-
}
|
|
52
|
-
const ur = (e) => {
|
|
53
|
-
const { children: t, open: r, onClose: n } = e, a = H(null), s = T(
|
|
54
|
-
(c) => {
|
|
55
|
-
const l = a.current;
|
|
56
|
-
!r || !l || l.contains(c.target) || n();
|
|
57
|
-
},
|
|
58
|
-
[r, n]
|
|
59
|
-
), o = T(
|
|
60
|
-
(c) => {
|
|
61
|
-
r && c.key === "Escape" && n();
|
|
62
|
-
},
|
|
63
|
-
[r, n]
|
|
64
|
-
);
|
|
65
|
-
return j(() => {
|
|
66
|
-
if (r)
|
|
67
|
-
return setTimeout(() => a.current?.focus(), 0), document.addEventListener("mousedown", s), document.addEventListener("keydown", o), () => {
|
|
68
|
-
document.removeEventListener("mousedown", s), document.removeEventListener("keydown", o);
|
|
69
|
-
};
|
|
70
|
-
}, [r, s, o]), /* @__PURE__ */ i(
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
ref: a,
|
|
74
|
-
role: "menu",
|
|
75
|
-
"aria-hidden": !r,
|
|
76
|
-
tabIndex: -1,
|
|
77
|
-
className: `dropdown-main ${r ? "opened" : "closed"}`,
|
|
78
|
-
onClick: (c) => c.stopPropagation(),
|
|
79
|
-
children: t
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
};
|
|
83
|
-
function jt(e) {
|
|
84
|
-
if (e.sheet)
|
|
85
|
-
return e.sheet;
|
|
86
|
-
for (var t = 0; t < document.styleSheets.length; t++)
|
|
87
|
-
if (document.styleSheets[t].ownerNode === e)
|
|
88
|
-
return document.styleSheets[t];
|
|
89
|
-
}
|
|
90
|
-
function Vt(e) {
|
|
91
|
-
var t = document.createElement("style");
|
|
92
|
-
return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
|
|
93
|
-
}
|
|
94
|
-
var Gt = /* @__PURE__ */ (function() {
|
|
95
|
-
function e(r) {
|
|
96
|
-
var n = this;
|
|
97
|
-
this._insertTag = function(a) {
|
|
98
|
-
var s;
|
|
99
|
-
n.tags.length === 0 ? n.insertionPoint ? s = n.insertionPoint.nextSibling : n.prepend ? s = n.container.firstChild : s = n.before : s = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(a, s), n.tags.push(a);
|
|
100
|
-
}, this.isSpeedy = r.speedy === void 0 ? !0 : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
|
|
101
|
-
}
|
|
102
|
-
var t = e.prototype;
|
|
103
|
-
return t.hydrate = function(n) {
|
|
104
|
-
n.forEach(this._insertTag);
|
|
105
|
-
}, t.insert = function(n) {
|
|
106
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Vt(this));
|
|
107
|
-
var a = this.tags[this.tags.length - 1];
|
|
108
|
-
if (this.isSpeedy) {
|
|
109
|
-
var s = jt(a);
|
|
110
|
-
try {
|
|
111
|
-
s.insertRule(n, s.cssRules.length);
|
|
112
|
-
} catch {
|
|
113
|
-
}
|
|
114
|
-
} else
|
|
115
|
-
a.appendChild(document.createTextNode(n));
|
|
116
|
-
this.ctr++;
|
|
117
|
-
}, t.flush = function() {
|
|
118
|
-
this.tags.forEach(function(n) {
|
|
119
|
-
var a;
|
|
120
|
-
return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
|
|
121
|
-
}), this.tags = [], this.ctr = 0;
|
|
122
|
-
}, e;
|
|
123
|
-
})(), W = "-ms-", Le = "-moz-", $ = "-webkit-", mt = "comm", Ke = "rule", Ye = "decl", Ut = "@import", bt = "@keyframes", Ht = "@layer", qt = Math.abs, De = String.fromCharCode, Kt = Object.assign;
|
|
124
|
-
function Yt(e, t) {
|
|
125
|
-
return B(e, 0) ^ 45 ? (((t << 2 ^ B(e, 0)) << 2 ^ B(e, 1)) << 2 ^ B(e, 2)) << 2 ^ B(e, 3) : 0;
|
|
126
|
-
}
|
|
127
|
-
function gt(e) {
|
|
128
|
-
return e.trim();
|
|
129
|
-
}
|
|
130
|
-
function Zt(e, t) {
|
|
131
|
-
return (e = t.exec(e)) ? e[0] : e;
|
|
132
|
-
}
|
|
133
|
-
function E(e, t, r) {
|
|
134
|
-
return e.replace(t, r);
|
|
135
|
-
}
|
|
136
|
-
function Ge(e, t) {
|
|
137
|
-
return e.indexOf(t);
|
|
138
|
-
}
|
|
139
|
-
function B(e, t) {
|
|
140
|
-
return e.charCodeAt(t) | 0;
|
|
141
|
-
}
|
|
142
|
-
function Re(e, t, r) {
|
|
143
|
-
return e.slice(t, r);
|
|
144
|
-
}
|
|
145
|
-
function ne(e) {
|
|
146
|
-
return e.length;
|
|
147
|
-
}
|
|
148
|
-
function Ze(e) {
|
|
149
|
-
return e.length;
|
|
150
|
-
}
|
|
151
|
-
function Te(e, t) {
|
|
152
|
-
return t.push(e), e;
|
|
153
|
-
}
|
|
154
|
-
function Jt(e, t) {
|
|
155
|
-
return e.map(t).join("");
|
|
156
|
-
}
|
|
157
|
-
var ze = 1, ve = 1, vt = 0, G = 0, M = 0, we = "";
|
|
158
|
-
function _e(e, t, r, n, a, s, o) {
|
|
159
|
-
return { value: e, root: t, parent: r, type: n, props: a, children: s, line: ze, column: ve, length: o, return: "" };
|
|
160
|
-
}
|
|
161
|
-
function ye(e, t) {
|
|
162
|
-
return Kt(_e("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
163
|
-
}
|
|
164
|
-
function Xt() {
|
|
165
|
-
return M;
|
|
166
|
-
}
|
|
167
|
-
function Qt() {
|
|
168
|
-
return M = G > 0 ? B(we, --G) : 0, ve--, M === 10 && (ve = 1, ze--), M;
|
|
169
|
-
}
|
|
170
|
-
function U() {
|
|
171
|
-
return M = G < vt ? B(we, G++) : 0, ve++, M === 10 && (ve = 1, ze++), M;
|
|
172
|
-
}
|
|
173
|
-
function re() {
|
|
174
|
-
return B(we, G);
|
|
175
|
-
}
|
|
176
|
-
function Oe() {
|
|
177
|
-
return G;
|
|
178
|
-
}
|
|
179
|
-
function ke(e, t) {
|
|
180
|
-
return Re(we, e, t);
|
|
181
|
-
}
|
|
182
|
-
function $e(e) {
|
|
183
|
-
switch (e) {
|
|
184
|
-
// \0 \t \n \r \s whitespace token
|
|
185
|
-
case 0:
|
|
186
|
-
case 9:
|
|
187
|
-
case 10:
|
|
188
|
-
case 13:
|
|
189
|
-
case 32:
|
|
190
|
-
return 5;
|
|
191
|
-
// ! + , / > @ ~ isolate token
|
|
192
|
-
case 33:
|
|
193
|
-
case 43:
|
|
194
|
-
case 44:
|
|
195
|
-
case 47:
|
|
196
|
-
case 62:
|
|
197
|
-
case 64:
|
|
198
|
-
case 126:
|
|
199
|
-
// ; { } breakpoint token
|
|
200
|
-
case 59:
|
|
201
|
-
case 123:
|
|
202
|
-
case 125:
|
|
203
|
-
return 4;
|
|
204
|
-
// : accompanied token
|
|
205
|
-
case 58:
|
|
206
|
-
return 3;
|
|
207
|
-
// " ' ( [ opening delimit token
|
|
208
|
-
case 34:
|
|
209
|
-
case 39:
|
|
210
|
-
case 40:
|
|
211
|
-
case 91:
|
|
212
|
-
return 2;
|
|
213
|
-
// ) ] closing delimit token
|
|
214
|
-
case 41:
|
|
215
|
-
case 93:
|
|
216
|
-
return 1;
|
|
217
|
-
}
|
|
218
|
-
return 0;
|
|
219
|
-
}
|
|
220
|
-
function wt(e) {
|
|
221
|
-
return ze = ve = 1, vt = ne(we = e), G = 0, [];
|
|
222
|
-
}
|
|
223
|
-
function Ct(e) {
|
|
224
|
-
return we = "", e;
|
|
225
|
-
}
|
|
226
|
-
function Pe(e) {
|
|
227
|
-
return gt(ke(G - 1, Ue(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
228
|
-
}
|
|
229
|
-
function en(e) {
|
|
230
|
-
for (; (M = re()) && M < 33; )
|
|
231
|
-
U();
|
|
232
|
-
return $e(e) > 2 || $e(M) > 3 ? "" : " ";
|
|
233
|
-
}
|
|
234
|
-
function tn(e, t) {
|
|
235
|
-
for (; --t && U() && !(M < 48 || M > 102 || M > 57 && M < 65 || M > 70 && M < 97); )
|
|
236
|
-
;
|
|
237
|
-
return ke(e, Oe() + (t < 6 && re() == 32 && U() == 32));
|
|
238
|
-
}
|
|
239
|
-
function Ue(e) {
|
|
240
|
-
for (; U(); )
|
|
241
|
-
switch (M) {
|
|
242
|
-
// ] ) " '
|
|
243
|
-
case e:
|
|
244
|
-
return G;
|
|
245
|
-
// " '
|
|
246
|
-
case 34:
|
|
247
|
-
case 39:
|
|
248
|
-
e !== 34 && e !== 39 && Ue(M);
|
|
249
|
-
break;
|
|
250
|
-
// (
|
|
251
|
-
case 40:
|
|
252
|
-
e === 41 && Ue(e);
|
|
253
|
-
break;
|
|
254
|
-
// \
|
|
255
|
-
case 92:
|
|
256
|
-
U();
|
|
257
|
-
break;
|
|
258
|
-
}
|
|
259
|
-
return G;
|
|
260
|
-
}
|
|
261
|
-
function nn(e, t) {
|
|
262
|
-
for (; U() && e + M !== 57; )
|
|
263
|
-
if (e + M === 84 && re() === 47)
|
|
264
|
-
break;
|
|
265
|
-
return "/*" + ke(t, G - 1) + "*" + De(e === 47 ? e : U());
|
|
266
|
-
}
|
|
267
|
-
function rn(e) {
|
|
268
|
-
for (; !$e(re()); )
|
|
269
|
-
U();
|
|
270
|
-
return ke(e, G);
|
|
271
|
-
}
|
|
272
|
-
function an(e) {
|
|
273
|
-
return Ct(Fe("", null, null, null, [""], e = wt(e), 0, [0], e));
|
|
274
|
-
}
|
|
275
|
-
function Fe(e, t, r, n, a, s, o, c, l) {
|
|
276
|
-
for (var d = 0, u = 0, h = o, m = 0, p = 0, g = 0, x = 1, k = 1, b = 1, v = 0, R = "", L = a, O = s, P = n, N = R; k; )
|
|
277
|
-
switch (g = v, v = U()) {
|
|
278
|
-
// (
|
|
279
|
-
case 40:
|
|
280
|
-
if (g != 108 && B(N, h - 1) == 58) {
|
|
281
|
-
Ge(N += E(Pe(v), "&", "&\f"), "&\f") != -1 && (b = -1);
|
|
282
|
-
break;
|
|
283
|
-
}
|
|
284
|
-
// " ' [
|
|
285
|
-
case 34:
|
|
286
|
-
case 39:
|
|
287
|
-
case 91:
|
|
288
|
-
N += Pe(v);
|
|
289
|
-
break;
|
|
290
|
-
// \t \n \r \s
|
|
291
|
-
case 9:
|
|
292
|
-
case 10:
|
|
293
|
-
case 13:
|
|
294
|
-
case 32:
|
|
295
|
-
N += en(g);
|
|
296
|
-
break;
|
|
297
|
-
// \
|
|
298
|
-
case 92:
|
|
299
|
-
N += tn(Oe() - 1, 7);
|
|
300
|
-
continue;
|
|
301
|
-
// /
|
|
302
|
-
case 47:
|
|
303
|
-
switch (re()) {
|
|
304
|
-
case 42:
|
|
305
|
-
case 47:
|
|
306
|
-
Te(sn(nn(U(), Oe()), t, r), l);
|
|
307
|
-
break;
|
|
308
|
-
default:
|
|
309
|
-
N += "/";
|
|
310
|
-
}
|
|
311
|
-
break;
|
|
312
|
-
// {
|
|
313
|
-
case 123 * x:
|
|
314
|
-
c[d++] = ne(N) * b;
|
|
315
|
-
// } ; \0
|
|
316
|
-
case 125 * x:
|
|
317
|
-
case 59:
|
|
318
|
-
case 0:
|
|
319
|
-
switch (v) {
|
|
320
|
-
// \0 }
|
|
321
|
-
case 0:
|
|
322
|
-
case 125:
|
|
323
|
-
k = 0;
|
|
324
|
-
// ;
|
|
325
|
-
case 59 + u:
|
|
326
|
-
b == -1 && (N = E(N, /\f/g, "")), p > 0 && ne(N) - h && Te(p > 32 ? st(N + ";", n, r, h - 1) : st(E(N, " ", "") + ";", n, r, h - 2), l);
|
|
327
|
-
break;
|
|
328
|
-
// @ ;
|
|
329
|
-
case 59:
|
|
330
|
-
N += ";";
|
|
331
|
-
// { rule/at-rule
|
|
332
|
-
default:
|
|
333
|
-
if (Te(P = at(N, t, r, d, u, a, c, R, L = [], O = [], h), s), v === 123)
|
|
334
|
-
if (u === 0)
|
|
335
|
-
Fe(N, t, P, P, L, s, h, c, O);
|
|
336
|
-
else
|
|
337
|
-
switch (m === 99 && B(N, 3) === 110 ? 100 : m) {
|
|
338
|
-
// d l m s
|
|
339
|
-
case 100:
|
|
340
|
-
case 108:
|
|
341
|
-
case 109:
|
|
342
|
-
case 115:
|
|
343
|
-
Fe(e, P, P, n && Te(at(e, P, P, 0, 0, a, c, R, a, L = [], h), O), a, O, h, c, n ? L : O);
|
|
344
|
-
break;
|
|
345
|
-
default:
|
|
346
|
-
Fe(N, P, P, P, [""], O, 0, c, O);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
d = u = p = 0, x = b = 1, R = N = "", h = o;
|
|
350
|
-
break;
|
|
351
|
-
// :
|
|
352
|
-
case 58:
|
|
353
|
-
h = 1 + ne(N), p = g;
|
|
354
|
-
default:
|
|
355
|
-
if (x < 1) {
|
|
356
|
-
if (v == 123)
|
|
357
|
-
--x;
|
|
358
|
-
else if (v == 125 && x++ == 0 && Qt() == 125)
|
|
359
|
-
continue;
|
|
360
|
-
}
|
|
361
|
-
switch (N += De(v), v * x) {
|
|
362
|
-
// &
|
|
363
|
-
case 38:
|
|
364
|
-
b = u > 0 ? 1 : (N += "\f", -1);
|
|
365
|
-
break;
|
|
366
|
-
// ,
|
|
367
|
-
case 44:
|
|
368
|
-
c[d++] = (ne(N) - 1) * b, b = 1;
|
|
369
|
-
break;
|
|
370
|
-
// @
|
|
371
|
-
case 64:
|
|
372
|
-
re() === 45 && (N += Pe(U())), m = re(), u = h = ne(R = N += rn(Oe())), v++;
|
|
373
|
-
break;
|
|
374
|
-
// -
|
|
375
|
-
case 45:
|
|
376
|
-
g === 45 && ne(N) == 2 && (x = 0);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
return s;
|
|
380
|
-
}
|
|
381
|
-
function at(e, t, r, n, a, s, o, c, l, d, u) {
|
|
382
|
-
for (var h = a - 1, m = a === 0 ? s : [""], p = Ze(m), g = 0, x = 0, k = 0; g < n; ++g)
|
|
383
|
-
for (var b = 0, v = Re(e, h + 1, h = qt(x = o[g])), R = e; b < p; ++b)
|
|
384
|
-
(R = gt(x > 0 ? m[b] + " " + v : E(v, /&\f/g, m[b]))) && (l[k++] = R);
|
|
385
|
-
return _e(e, t, r, a === 0 ? Ke : c, l, d, u);
|
|
386
|
-
}
|
|
387
|
-
function sn(e, t, r) {
|
|
388
|
-
return _e(e, t, r, mt, De(Xt()), Re(e, 2, -2), 0);
|
|
389
|
-
}
|
|
390
|
-
function st(e, t, r, n) {
|
|
391
|
-
return _e(e, t, r, Ye, Re(e, 0, n), Re(e, n + 1, -1), n);
|
|
392
|
-
}
|
|
393
|
-
function ge(e, t) {
|
|
394
|
-
for (var r = "", n = Ze(e), a = 0; a < n; a++)
|
|
395
|
-
r += t(e[a], a, e, t) || "";
|
|
396
|
-
return r;
|
|
397
|
-
}
|
|
398
|
-
function cn(e, t, r, n) {
|
|
399
|
-
switch (e.type) {
|
|
400
|
-
case Ht:
|
|
401
|
-
if (e.children.length) break;
|
|
402
|
-
case Ut:
|
|
403
|
-
case Ye:
|
|
404
|
-
return e.return = e.return || e.value;
|
|
405
|
-
case mt:
|
|
406
|
-
return "";
|
|
407
|
-
case bt:
|
|
408
|
-
return e.return = e.value + "{" + ge(e.children, n) + "}";
|
|
409
|
-
case Ke:
|
|
410
|
-
e.value = e.props.join(",");
|
|
411
|
-
}
|
|
412
|
-
return ne(r = ge(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
413
|
-
}
|
|
414
|
-
function on(e) {
|
|
415
|
-
var t = Ze(e);
|
|
416
|
-
return function(r, n, a, s) {
|
|
417
|
-
for (var o = "", c = 0; c < t; c++)
|
|
418
|
-
o += e[c](r, n, a, s) || "";
|
|
419
|
-
return o;
|
|
420
|
-
};
|
|
421
|
-
}
|
|
422
|
-
function ln(e) {
|
|
423
|
-
return function(t) {
|
|
424
|
-
t.root || (t = t.return) && e(t);
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
function un(e) {
|
|
428
|
-
var t = /* @__PURE__ */ Object.create(null);
|
|
429
|
-
return function(r) {
|
|
430
|
-
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
var dn = function(t, r, n) {
|
|
434
|
-
for (var a = 0, s = 0; a = s, s = re(), a === 38 && s === 12 && (r[n] = 1), !$e(s); )
|
|
435
|
-
U();
|
|
436
|
-
return ke(t, G);
|
|
437
|
-
}, fn = function(t, r) {
|
|
438
|
-
var n = -1, a = 44;
|
|
439
|
-
do
|
|
440
|
-
switch ($e(a)) {
|
|
441
|
-
case 0:
|
|
442
|
-
a === 38 && re() === 12 && (r[n] = 1), t[n] += dn(G - 1, r, n);
|
|
443
|
-
break;
|
|
444
|
-
case 2:
|
|
445
|
-
t[n] += Pe(a);
|
|
446
|
-
break;
|
|
447
|
-
case 4:
|
|
448
|
-
if (a === 44) {
|
|
449
|
-
t[++n] = re() === 58 ? "&\f" : "", r[n] = t[n].length;
|
|
450
|
-
break;
|
|
451
|
-
}
|
|
452
|
-
// fallthrough
|
|
453
|
-
default:
|
|
454
|
-
t[n] += De(a);
|
|
455
|
-
}
|
|
456
|
-
while (a = U());
|
|
457
|
-
return t;
|
|
458
|
-
}, pn = function(t, r) {
|
|
459
|
-
return Ct(fn(wt(t), r));
|
|
460
|
-
}, it = /* @__PURE__ */ new WeakMap(), hn = function(t) {
|
|
461
|
-
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
462
|
-
// negative .length indicates that this rule has been already prefixed
|
|
463
|
-
t.length < 1)) {
|
|
464
|
-
for (var r = t.value, n = t.parent, a = t.column === n.column && t.line === n.line; n.type !== "rule"; )
|
|
465
|
-
if (n = n.parent, !n) return;
|
|
466
|
-
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !it.get(n)) && !a) {
|
|
467
|
-
it.set(t, !0);
|
|
468
|
-
for (var s = [], o = pn(r, s), c = n.props, l = 0, d = 0; l < o.length; l++)
|
|
469
|
-
for (var u = 0; u < c.length; u++, d++)
|
|
470
|
-
t.props[d] = s[l] ? o[l].replace(/&\f/g, c[u]) : c[u] + " " + o[l];
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}, mn = function(t) {
|
|
474
|
-
if (t.type === "decl") {
|
|
475
|
-
var r = t.value;
|
|
476
|
-
// charcode for l
|
|
477
|
-
r.charCodeAt(0) === 108 && // charcode for b
|
|
478
|
-
r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
function xt(e, t) {
|
|
482
|
-
switch (Yt(e, t)) {
|
|
483
|
-
// color-adjust
|
|
484
|
-
case 5103:
|
|
485
|
-
return $ + "print-" + e + e;
|
|
486
|
-
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
487
|
-
case 5737:
|
|
488
|
-
case 4201:
|
|
489
|
-
case 3177:
|
|
490
|
-
case 3433:
|
|
491
|
-
case 1641:
|
|
492
|
-
case 4457:
|
|
493
|
-
case 2921:
|
|
494
|
-
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
495
|
-
case 5572:
|
|
496
|
-
case 6356:
|
|
497
|
-
case 5844:
|
|
498
|
-
case 3191:
|
|
499
|
-
case 6645:
|
|
500
|
-
case 3005:
|
|
501
|
-
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
502
|
-
case 6391:
|
|
503
|
-
case 5879:
|
|
504
|
-
case 5623:
|
|
505
|
-
case 6135:
|
|
506
|
-
case 4599:
|
|
507
|
-
case 4855:
|
|
508
|
-
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
509
|
-
case 4215:
|
|
510
|
-
case 6389:
|
|
511
|
-
case 5109:
|
|
512
|
-
case 5365:
|
|
513
|
-
case 5621:
|
|
514
|
-
case 3829:
|
|
515
|
-
return $ + e + e;
|
|
516
|
-
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
517
|
-
case 5349:
|
|
518
|
-
case 4246:
|
|
519
|
-
case 4810:
|
|
520
|
-
case 6968:
|
|
521
|
-
case 2756:
|
|
522
|
-
return $ + e + Le + e + W + e + e;
|
|
523
|
-
// flex, flex-direction
|
|
524
|
-
case 6828:
|
|
525
|
-
case 4268:
|
|
526
|
-
return $ + e + W + e + e;
|
|
527
|
-
// order
|
|
528
|
-
case 6165:
|
|
529
|
-
return $ + e + W + "flex-" + e + e;
|
|
530
|
-
// align-items
|
|
531
|
-
case 5187:
|
|
532
|
-
return $ + e + E(e, /(\w+).+(:[^]+)/, $ + "box-$1$2" + W + "flex-$1$2") + e;
|
|
533
|
-
// align-self
|
|
534
|
-
case 5443:
|
|
535
|
-
return $ + e + W + "flex-item-" + E(e, /flex-|-self/, "") + e;
|
|
536
|
-
// align-content
|
|
537
|
-
case 4675:
|
|
538
|
-
return $ + e + W + "flex-line-pack" + E(e, /align-content|flex-|-self/, "") + e;
|
|
539
|
-
// flex-shrink
|
|
540
|
-
case 5548:
|
|
541
|
-
return $ + e + W + E(e, "shrink", "negative") + e;
|
|
542
|
-
// flex-basis
|
|
543
|
-
case 5292:
|
|
544
|
-
return $ + e + W + E(e, "basis", "preferred-size") + e;
|
|
545
|
-
// flex-grow
|
|
546
|
-
case 6060:
|
|
547
|
-
return $ + "box-" + E(e, "-grow", "") + $ + e + W + E(e, "grow", "positive") + e;
|
|
548
|
-
// transition
|
|
549
|
-
case 4554:
|
|
550
|
-
return $ + E(e, /([^-])(transform)/g, "$1" + $ + "$2") + e;
|
|
551
|
-
// cursor
|
|
552
|
-
case 6187:
|
|
553
|
-
return E(E(E(e, /(zoom-|grab)/, $ + "$1"), /(image-set)/, $ + "$1"), e, "") + e;
|
|
554
|
-
// background, background-image
|
|
555
|
-
case 5495:
|
|
556
|
-
case 3959:
|
|
557
|
-
return E(e, /(image-set\([^]*)/, $ + "$1$`$1");
|
|
558
|
-
// justify-content
|
|
559
|
-
case 4968:
|
|
560
|
-
return E(E(e, /(.+:)(flex-)?(.*)/, $ + "box-pack:$3" + W + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + $ + e + e;
|
|
561
|
-
// (margin|padding)-inline-(start|end)
|
|
562
|
-
case 4095:
|
|
563
|
-
case 3583:
|
|
564
|
-
case 4068:
|
|
565
|
-
case 2532:
|
|
566
|
-
return E(e, /(.+)-inline(.+)/, $ + "$1$2") + e;
|
|
567
|
-
// (min|max)?(width|height|inline-size|block-size)
|
|
568
|
-
case 8116:
|
|
569
|
-
case 7059:
|
|
570
|
-
case 5753:
|
|
571
|
-
case 5535:
|
|
572
|
-
case 5445:
|
|
573
|
-
case 5701:
|
|
574
|
-
case 4933:
|
|
575
|
-
case 4677:
|
|
576
|
-
case 5533:
|
|
577
|
-
case 5789:
|
|
578
|
-
case 5021:
|
|
579
|
-
case 4765:
|
|
580
|
-
if (ne(e) - 1 - t > 6) switch (B(e, t + 1)) {
|
|
581
|
-
// (m)ax-content, (m)in-content
|
|
582
|
-
case 109:
|
|
583
|
-
if (B(e, t + 4) !== 45) break;
|
|
584
|
-
// (f)ill-available, (f)it-content
|
|
585
|
-
case 102:
|
|
586
|
-
return E(e, /(.+:)(.+)-([^]+)/, "$1" + $ + "$2-$3$1" + Le + (B(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
587
|
-
// (s)tretch
|
|
588
|
-
case 115:
|
|
589
|
-
return ~Ge(e, "stretch") ? xt(E(e, "stretch", "fill-available"), t) + e : e;
|
|
590
|
-
}
|
|
591
|
-
break;
|
|
592
|
-
// position: sticky
|
|
593
|
-
case 4949:
|
|
594
|
-
if (B(e, t + 1) !== 115) break;
|
|
595
|
-
// display: (flex|inline-flex)
|
|
596
|
-
case 6444:
|
|
597
|
-
switch (B(e, ne(e) - 3 - (~Ge(e, "!important") && 10))) {
|
|
598
|
-
// stic(k)y
|
|
599
|
-
case 107:
|
|
600
|
-
return E(e, ":", ":" + $) + e;
|
|
601
|
-
// (inline-)?fl(e)x
|
|
602
|
-
case 101:
|
|
603
|
-
return E(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + $ + (B(e, 14) === 45 ? "inline-" : "") + "box$3$1" + $ + "$2$3$1" + W + "$2box$3") + e;
|
|
604
|
-
}
|
|
605
|
-
break;
|
|
606
|
-
// writing-mode
|
|
607
|
-
case 5936:
|
|
608
|
-
switch (B(e, t + 11)) {
|
|
609
|
-
// vertical-l(r)
|
|
610
|
-
case 114:
|
|
611
|
-
return $ + e + W + E(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
612
|
-
// vertical-r(l)
|
|
613
|
-
case 108:
|
|
614
|
-
return $ + e + W + E(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
615
|
-
// horizontal(-)tb
|
|
616
|
-
case 45:
|
|
617
|
-
return $ + e + W + E(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
618
|
-
}
|
|
619
|
-
return $ + e + W + e + e;
|
|
620
|
-
}
|
|
621
|
-
return e;
|
|
622
|
-
}
|
|
623
|
-
var bn = function(t, r, n, a) {
|
|
624
|
-
if (t.length > -1 && !t.return) switch (t.type) {
|
|
625
|
-
case Ye:
|
|
626
|
-
t.return = xt(t.value, t.length);
|
|
627
|
-
break;
|
|
628
|
-
case bt:
|
|
629
|
-
return ge([ye(t, {
|
|
630
|
-
value: E(t.value, "@", "@" + $)
|
|
631
|
-
})], a);
|
|
632
|
-
case Ke:
|
|
633
|
-
if (t.length) return Jt(t.props, function(s) {
|
|
634
|
-
switch (Zt(s, /(::plac\w+|:read-\w+)/)) {
|
|
635
|
-
// :read-(only|write)
|
|
636
|
-
case ":read-only":
|
|
637
|
-
case ":read-write":
|
|
638
|
-
return ge([ye(t, {
|
|
639
|
-
props: [E(s, /:(read-\w+)/, ":" + Le + "$1")]
|
|
640
|
-
})], a);
|
|
641
|
-
// :placeholder
|
|
642
|
-
case "::placeholder":
|
|
643
|
-
return ge([ye(t, {
|
|
644
|
-
props: [E(s, /:(plac\w+)/, ":" + $ + "input-$1")]
|
|
645
|
-
}), ye(t, {
|
|
646
|
-
props: [E(s, /:(plac\w+)/, ":" + Le + "$1")]
|
|
647
|
-
}), ye(t, {
|
|
648
|
-
props: [E(s, /:(plac\w+)/, W + "input-$1")]
|
|
649
|
-
})], a);
|
|
650
|
-
}
|
|
651
|
-
return "";
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
}, gn = [bn], vn = function(t) {
|
|
655
|
-
var r = t.key;
|
|
656
|
-
if (r === "css") {
|
|
657
|
-
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
658
|
-
Array.prototype.forEach.call(n, function(x) {
|
|
659
|
-
var k = x.getAttribute("data-emotion");
|
|
660
|
-
k.indexOf(" ") !== -1 && (document.head.appendChild(x), x.setAttribute("data-s", ""));
|
|
661
|
-
});
|
|
662
|
-
}
|
|
663
|
-
var a = t.stylisPlugins || gn, s = {}, o, c = [];
|
|
664
|
-
o = t.container || document.head, Array.prototype.forEach.call(
|
|
665
|
-
// this means we will ignore elements which don't have a space in them which
|
|
666
|
-
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
667
|
-
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
668
|
-
function(x) {
|
|
669
|
-
for (var k = x.getAttribute("data-emotion").split(" "), b = 1; b < k.length; b++)
|
|
670
|
-
s[k[b]] = !0;
|
|
671
|
-
c.push(x);
|
|
672
|
-
}
|
|
673
|
-
);
|
|
674
|
-
var l, d = [hn, mn];
|
|
675
|
-
{
|
|
676
|
-
var u, h = [cn, ln(function(x) {
|
|
677
|
-
u.insert(x);
|
|
678
|
-
})], m = on(d.concat(a, h)), p = function(k) {
|
|
679
|
-
return ge(an(k), m);
|
|
680
|
-
};
|
|
681
|
-
l = function(k, b, v, R) {
|
|
682
|
-
u = v, p(k ? k + "{" + b.styles + "}" : b.styles), R && (g.inserted[b.name] = !0);
|
|
683
|
-
};
|
|
684
|
-
}
|
|
685
|
-
var g = {
|
|
686
|
-
key: r,
|
|
687
|
-
sheet: new Gt({
|
|
688
|
-
key: r,
|
|
689
|
-
container: o,
|
|
690
|
-
nonce: t.nonce,
|
|
691
|
-
speedy: t.speedy,
|
|
692
|
-
prepend: t.prepend,
|
|
693
|
-
insertionPoint: t.insertionPoint
|
|
694
|
-
}),
|
|
695
|
-
nonce: t.nonce,
|
|
696
|
-
inserted: s,
|
|
697
|
-
registered: {},
|
|
698
|
-
insert: l
|
|
699
|
-
};
|
|
700
|
-
return g.sheet.hydrate(c), g;
|
|
701
|
-
};
|
|
702
|
-
function wn(e) {
|
|
703
|
-
for (var t = 0, r, n = 0, a = e.length; a >= 4; ++n, a -= 4)
|
|
704
|
-
r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
|
|
705
|
-
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
|
|
706
|
-
r >>> 24, t = /* Math.imul(k, m): */
|
|
707
|
-
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
708
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
709
|
-
switch (a) {
|
|
710
|
-
case 3:
|
|
711
|
-
t ^= (e.charCodeAt(n + 2) & 255) << 16;
|
|
712
|
-
case 2:
|
|
713
|
-
t ^= (e.charCodeAt(n + 1) & 255) << 8;
|
|
714
|
-
case 1:
|
|
715
|
-
t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
|
|
716
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
717
|
-
}
|
|
718
|
-
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
719
|
-
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
720
|
-
}
|
|
721
|
-
var Cn = {
|
|
722
|
-
animationIterationCount: 1,
|
|
723
|
-
aspectRatio: 1,
|
|
724
|
-
borderImageOutset: 1,
|
|
725
|
-
borderImageSlice: 1,
|
|
726
|
-
borderImageWidth: 1,
|
|
727
|
-
boxFlex: 1,
|
|
728
|
-
boxFlexGroup: 1,
|
|
729
|
-
boxOrdinalGroup: 1,
|
|
730
|
-
columnCount: 1,
|
|
731
|
-
columns: 1,
|
|
732
|
-
flex: 1,
|
|
733
|
-
flexGrow: 1,
|
|
734
|
-
flexPositive: 1,
|
|
735
|
-
flexShrink: 1,
|
|
736
|
-
flexNegative: 1,
|
|
737
|
-
flexOrder: 1,
|
|
738
|
-
gridRow: 1,
|
|
739
|
-
gridRowEnd: 1,
|
|
740
|
-
gridRowSpan: 1,
|
|
741
|
-
gridRowStart: 1,
|
|
742
|
-
gridColumn: 1,
|
|
743
|
-
gridColumnEnd: 1,
|
|
744
|
-
gridColumnSpan: 1,
|
|
745
|
-
gridColumnStart: 1,
|
|
746
|
-
msGridRow: 1,
|
|
747
|
-
msGridRowSpan: 1,
|
|
748
|
-
msGridColumn: 1,
|
|
749
|
-
msGridColumnSpan: 1,
|
|
750
|
-
fontWeight: 1,
|
|
751
|
-
lineHeight: 1,
|
|
752
|
-
opacity: 1,
|
|
753
|
-
order: 1,
|
|
754
|
-
orphans: 1,
|
|
755
|
-
scale: 1,
|
|
756
|
-
tabSize: 1,
|
|
757
|
-
widows: 1,
|
|
758
|
-
zIndex: 1,
|
|
759
|
-
zoom: 1,
|
|
760
|
-
WebkitLineClamp: 1,
|
|
761
|
-
// SVG-related properties
|
|
762
|
-
fillOpacity: 1,
|
|
763
|
-
floodOpacity: 1,
|
|
764
|
-
stopOpacity: 1,
|
|
765
|
-
strokeDasharray: 1,
|
|
766
|
-
strokeDashoffset: 1,
|
|
767
|
-
strokeMiterlimit: 1,
|
|
768
|
-
strokeOpacity: 1,
|
|
769
|
-
strokeWidth: 1
|
|
770
|
-
}, xn = /[A-Z]|^ms/g, Nn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Nt = function(t) {
|
|
771
|
-
return t.charCodeAt(1) === 45;
|
|
772
|
-
}, ct = function(t) {
|
|
773
|
-
return t != null && typeof t != "boolean";
|
|
774
|
-
}, We = /* @__PURE__ */ un(function(e) {
|
|
775
|
-
return Nt(e) ? e : e.replace(xn, "-$&").toLowerCase();
|
|
776
|
-
}), ot = function(t, r) {
|
|
777
|
-
switch (t) {
|
|
778
|
-
case "animation":
|
|
779
|
-
case "animationName":
|
|
780
|
-
if (typeof r == "string")
|
|
781
|
-
return r.replace(Nn, function(n, a, s) {
|
|
782
|
-
return ie = {
|
|
783
|
-
name: a,
|
|
784
|
-
styles: s,
|
|
785
|
-
next: ie
|
|
786
|
-
}, a;
|
|
787
|
-
});
|
|
788
|
-
}
|
|
789
|
-
return Cn[t] !== 1 && !Nt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
|
|
790
|
-
};
|
|
791
|
-
function Me(e, t, r) {
|
|
792
|
-
if (r == null)
|
|
793
|
-
return "";
|
|
794
|
-
var n = r;
|
|
795
|
-
if (n.__emotion_styles !== void 0)
|
|
796
|
-
return n;
|
|
797
|
-
switch (typeof r) {
|
|
798
|
-
case "boolean":
|
|
799
|
-
return "";
|
|
800
|
-
case "object": {
|
|
801
|
-
var a = r;
|
|
802
|
-
if (a.anim === 1)
|
|
803
|
-
return ie = {
|
|
804
|
-
name: a.name,
|
|
805
|
-
styles: a.styles,
|
|
806
|
-
next: ie
|
|
807
|
-
}, a.name;
|
|
808
|
-
var s = r;
|
|
809
|
-
if (s.styles !== void 0) {
|
|
810
|
-
var o = s.next;
|
|
811
|
-
if (o !== void 0)
|
|
812
|
-
for (; o !== void 0; )
|
|
813
|
-
ie = {
|
|
814
|
-
name: o.name,
|
|
815
|
-
styles: o.styles,
|
|
816
|
-
next: ie
|
|
817
|
-
}, o = o.next;
|
|
818
|
-
var c = s.styles + ";";
|
|
819
|
-
return c;
|
|
820
|
-
}
|
|
821
|
-
return yn(e, t, r);
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
var l = r;
|
|
825
|
-
if (t == null)
|
|
826
|
-
return l;
|
|
827
|
-
var d = t[l];
|
|
828
|
-
return d !== void 0 ? d : l;
|
|
829
|
-
}
|
|
830
|
-
function yn(e, t, r) {
|
|
831
|
-
var n = "";
|
|
832
|
-
if (Array.isArray(r))
|
|
833
|
-
for (var a = 0; a < r.length; a++)
|
|
834
|
-
n += Me(e, t, r[a]) + ";";
|
|
835
|
-
else
|
|
836
|
-
for (var s in r) {
|
|
837
|
-
var o = r[s];
|
|
838
|
-
if (typeof o != "object") {
|
|
839
|
-
var c = o;
|
|
840
|
-
t != null && t[c] !== void 0 ? n += s + "{" + t[c] + "}" : ct(c) && (n += We(s) + ":" + ot(s, c) + ";");
|
|
841
|
-
} else if (Array.isArray(o) && typeof o[0] == "string" && (t == null || t[o[0]] === void 0))
|
|
842
|
-
for (var l = 0; l < o.length; l++)
|
|
843
|
-
ct(o[l]) && (n += We(s) + ":" + ot(s, o[l]) + ";");
|
|
844
|
-
else {
|
|
845
|
-
var d = Me(e, t, o);
|
|
846
|
-
switch (s) {
|
|
847
|
-
case "animation":
|
|
848
|
-
case "animationName": {
|
|
849
|
-
n += We(s) + ":" + d + ";";
|
|
850
|
-
break;
|
|
851
|
-
}
|
|
852
|
-
default:
|
|
853
|
-
n += s + "{" + d + "}";
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
return n;
|
|
858
|
-
}
|
|
859
|
-
var lt = /label:\s*([^\s;{]+)\s*(;|$)/g, ie;
|
|
860
|
-
function je(e, t, r) {
|
|
861
|
-
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
862
|
-
return e[0];
|
|
863
|
-
var n = !0, a = "";
|
|
864
|
-
ie = void 0;
|
|
865
|
-
var s = e[0];
|
|
866
|
-
if (s == null || s.raw === void 0)
|
|
867
|
-
n = !1, a += Me(r, t, s);
|
|
868
|
-
else {
|
|
869
|
-
var o = s;
|
|
870
|
-
a += o[0];
|
|
871
|
-
}
|
|
872
|
-
for (var c = 1; c < e.length; c++)
|
|
873
|
-
if (a += Me(r, t, e[c]), n) {
|
|
874
|
-
var l = s;
|
|
875
|
-
a += l[c];
|
|
876
|
-
}
|
|
877
|
-
lt.lastIndex = 0;
|
|
878
|
-
for (var d = "", u; (u = lt.exec(a)) !== null; )
|
|
879
|
-
d += "-" + u[1];
|
|
880
|
-
var h = wn(a) + d;
|
|
881
|
-
return {
|
|
882
|
-
name: h,
|
|
883
|
-
styles: a,
|
|
884
|
-
next: ie
|
|
885
|
-
};
|
|
886
|
-
}
|
|
887
|
-
function yt(e, t, r) {
|
|
888
|
-
var n = "";
|
|
889
|
-
return r.split(" ").forEach(function(a) {
|
|
890
|
-
e[a] !== void 0 ? t.push(e[a] + ";") : a && (n += a + " ");
|
|
891
|
-
}), n;
|
|
892
|
-
}
|
|
893
|
-
var Sn = function(t, r, n) {
|
|
894
|
-
var a = t.key + "-" + r.name;
|
|
895
|
-
// we only need to add the styles to the registered cache if the
|
|
896
|
-
// class name could be used further down
|
|
897
|
-
// the tree but if it's a string tag, we know it won't
|
|
898
|
-
// so we don't have to add it to registered cache.
|
|
899
|
-
// this improves memory usage since we can avoid storing the whole style string
|
|
900
|
-
t.registered[a] === void 0 && (t.registered[a] = r.styles);
|
|
901
|
-
}, Rn = function(t, r, n) {
|
|
902
|
-
Sn(t, r);
|
|
903
|
-
var a = t.key + "-" + r.name;
|
|
904
|
-
if (t.inserted[r.name] === void 0) {
|
|
905
|
-
var s = r;
|
|
906
|
-
do
|
|
907
|
-
t.insert(r === s ? "." + a : "", s, t.sheet, !0), s = s.next;
|
|
908
|
-
while (s !== void 0);
|
|
909
|
-
}
|
|
910
|
-
};
|
|
911
|
-
function ut(e, t) {
|
|
912
|
-
if (e.inserted[t.name] === void 0)
|
|
913
|
-
return e.insert("", t, e.sheet, !0);
|
|
914
|
-
}
|
|
915
|
-
function dt(e, t, r) {
|
|
916
|
-
var n = [], a = yt(e, n, r);
|
|
917
|
-
return n.length < 2 ? r : a + t(n);
|
|
918
|
-
}
|
|
919
|
-
var $n = function(t) {
|
|
920
|
-
var r = vn(t);
|
|
921
|
-
r.sheet.speedy = function(c) {
|
|
922
|
-
this.isSpeedy = c;
|
|
923
|
-
}, r.compat = !0;
|
|
924
|
-
var n = function() {
|
|
925
|
-
for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
|
|
926
|
-
d[u] = arguments[u];
|
|
927
|
-
var h = je(d, r.registered, void 0);
|
|
928
|
-
return Rn(r, h), r.key + "-" + h.name;
|
|
929
|
-
}, a = function() {
|
|
930
|
-
for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
|
|
931
|
-
d[u] = arguments[u];
|
|
932
|
-
var h = je(d, r.registered), m = "animation-" + h.name;
|
|
933
|
-
return ut(r, {
|
|
934
|
-
name: h.name,
|
|
935
|
-
styles: "@keyframes " + m + "{" + h.styles + "}"
|
|
936
|
-
}), m;
|
|
937
|
-
}, s = function() {
|
|
938
|
-
for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
|
|
939
|
-
d[u] = arguments[u];
|
|
940
|
-
var h = je(d, r.registered);
|
|
941
|
-
ut(r, h);
|
|
942
|
-
}, o = function() {
|
|
943
|
-
for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
|
|
944
|
-
d[u] = arguments[u];
|
|
945
|
-
return dt(r.registered, n, En(d));
|
|
946
|
-
};
|
|
947
|
-
return {
|
|
948
|
-
css: n,
|
|
949
|
-
cx: o,
|
|
950
|
-
injectGlobal: s,
|
|
951
|
-
keyframes: a,
|
|
952
|
-
hydrate: function(l) {
|
|
953
|
-
l.forEach(function(d) {
|
|
954
|
-
r.inserted[d] = !0;
|
|
955
|
-
});
|
|
956
|
-
},
|
|
957
|
-
flush: function() {
|
|
958
|
-
r.registered = {}, r.inserted = {}, r.sheet.flush();
|
|
959
|
-
},
|
|
960
|
-
sheet: r.sheet,
|
|
961
|
-
cache: r,
|
|
962
|
-
getRegisteredStyles: yt.bind(null, r.registered),
|
|
963
|
-
merge: dt.bind(null, r.registered, n)
|
|
964
|
-
};
|
|
965
|
-
}, En = function e(t) {
|
|
966
|
-
for (var r = "", n = 0; n < t.length; n++) {
|
|
967
|
-
var a = t[n];
|
|
968
|
-
if (a != null) {
|
|
969
|
-
var s = void 0;
|
|
970
|
-
switch (typeof a) {
|
|
971
|
-
case "boolean":
|
|
972
|
-
break;
|
|
973
|
-
case "object": {
|
|
974
|
-
if (Array.isArray(a))
|
|
975
|
-
s = e(a);
|
|
976
|
-
else {
|
|
977
|
-
s = "";
|
|
978
|
-
for (var o in a)
|
|
979
|
-
a[o] && o && (s && (s += " "), s += o);
|
|
980
|
-
}
|
|
981
|
-
break;
|
|
982
|
-
}
|
|
983
|
-
default:
|
|
984
|
-
s = a;
|
|
985
|
-
}
|
|
986
|
-
s && (r && (r += " "), r += s);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
return r;
|
|
990
|
-
}, kn = $n({
|
|
991
|
-
key: "css"
|
|
992
|
-
}), An = kn.css;
|
|
993
|
-
const Tn = Ee(function(e, t) {
|
|
994
|
-
const {
|
|
995
|
-
state: r,
|
|
996
|
-
value: n,
|
|
997
|
-
onChange: a,
|
|
998
|
-
options: s = [],
|
|
999
|
-
name: o = "",
|
|
1000
|
-
id: c = "",
|
|
1001
|
-
label: l = "",
|
|
1002
|
-
containerClassName: d = "",
|
|
1003
|
-
inputContainerClassName: u = "",
|
|
1004
|
-
helperText: h = "",
|
|
1005
|
-
placeholder: m = "",
|
|
1006
|
-
multiple: p = !1,
|
|
1007
|
-
...g
|
|
1008
|
-
} = e, [x, k] = D("");
|
|
1009
|
-
j(() => {
|
|
1010
|
-
if (!p && n && !Array.isArray(n)) {
|
|
1011
|
-
k(String(n.value ?? n.name ?? ""));
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
k("");
|
|
1015
|
-
}, [p, n]);
|
|
1016
|
-
const [b, v] = D(!1), R = s.filter((C) => {
|
|
1017
|
-
const F = String(C.value ?? C.name).toLowerCase().includes(x?.toLowerCase());
|
|
1018
|
-
return Array.isArray(n) && n.length ? !n.some((K) => K.id === C.id) : n && !Array.isArray(n) ? n.id !== C.id : F;
|
|
1019
|
-
}), L = H(null), O = H(null), [P, N] = D(!1), Q = H(null);
|
|
1020
|
-
j(() => {
|
|
1021
|
-
const C = (K) => {
|
|
1022
|
-
L.current && !L.current.contains(K.target) && v(!1);
|
|
1023
|
-
}, F = (K) => {
|
|
1024
|
-
K.key === "Escape" && v(!1);
|
|
1025
|
-
};
|
|
1026
|
-
return document.addEventListener("mousedown", C), document.addEventListener("keydown", F), () => {
|
|
1027
|
-
document.removeEventListener("mousedown", C), document.removeEventListener("keydown", F);
|
|
1028
|
-
};
|
|
1029
|
-
}, []);
|
|
1030
|
-
const xe = (C) => {
|
|
1031
|
-
k(C.target.value);
|
|
1032
|
-
}, ce = T(
|
|
1033
|
-
(C) => {
|
|
1034
|
-
C ? p ? (k(""), Array.isArray(n) && n.length ? a([...n, C]) : a([C])) : (k(String(C.name ?? C.value ?? "")), a(C)) : a(null), v(!1);
|
|
1035
|
-
},
|
|
1036
|
-
[p, a, n]
|
|
1037
|
-
), ae = T(
|
|
1038
|
-
(C) => {
|
|
1039
|
-
if (!Array.isArray(n)) {
|
|
1040
|
-
a(null);
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
if (C != null)
|
|
1044
|
-
if (C !== -1) {
|
|
1045
|
-
const F = n.filter((K, Ne) => Ne !== C);
|
|
1046
|
-
F.length ? a(F) : a(null);
|
|
1047
|
-
} else {
|
|
1048
|
-
const [F] = n;
|
|
1049
|
-
a([F]);
|
|
1050
|
-
}
|
|
1051
|
-
else a(null);
|
|
1052
|
-
},
|
|
1053
|
-
[a, n]
|
|
1054
|
-
);
|
|
1055
|
-
return j(() => {
|
|
1056
|
-
const C = Q.current?.offsetWidth ?? 0, F = (t ?? O)?.current?.offsetWidth ?? 0;
|
|
1057
|
-
C > F * 0.4 ? N(!0) : N(!1);
|
|
1058
|
-
}, [n]), /* @__PURE__ */ S(
|
|
1059
|
-
"div",
|
|
1060
|
-
{
|
|
1061
|
-
className: `autocomplete-input-container ${d}`,
|
|
1062
|
-
ref: L,
|
|
1063
|
-
children: [
|
|
1064
|
-
/* @__PURE__ */ S("div", { className: "autocomplete-value-input-container", children: [
|
|
1065
|
-
/* @__PURE__ */ i(
|
|
1066
|
-
Ie,
|
|
1067
|
-
{
|
|
1068
|
-
state: r,
|
|
1069
|
-
name: o,
|
|
1070
|
-
id: c,
|
|
1071
|
-
value: x,
|
|
1072
|
-
onChange: xe,
|
|
1073
|
-
placeholder: m,
|
|
1074
|
-
helperText: h,
|
|
1075
|
-
onFocus: () => v(!0),
|
|
1076
|
-
label: l,
|
|
1077
|
-
containerClassName: `autocomplete-text-input ${u}`,
|
|
1078
|
-
ref: t ?? O,
|
|
1079
|
-
...g,
|
|
1080
|
-
children: !p && n && !Array.isArray(n) && (n.value || n.name) && /* @__PURE__ */ i(
|
|
1081
|
-
de,
|
|
1082
|
-
{
|
|
1083
|
-
icon: /* @__PURE__ */ i(Qe, {}),
|
|
1084
|
-
className: "autocomplete-delete-button",
|
|
1085
|
-
onClick: (C) => {
|
|
1086
|
-
ce(), C.stopPropagation();
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
)
|
|
1090
|
-
}
|
|
1091
|
-
),
|
|
1092
|
-
p && Array.isArray(n) && n.length ? /* @__PURE__ */ i("ul", { ref: Q, className: "autocomplete-value-container", children: P ? /* @__PURE__ */ S(Se, { children: [
|
|
1093
|
-
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1094
|
-
ue,
|
|
1095
|
-
{
|
|
1096
|
-
text: n[0]?.value ?? n[0]?.name,
|
|
1097
|
-
onDelete: (C) => {
|
|
1098
|
-
ae(0), C.stopPropagation();
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
) }),
|
|
1102
|
-
n.length > 1 && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1103
|
-
ue,
|
|
1104
|
-
{
|
|
1105
|
-
text: `+${n.length - 1}`,
|
|
1106
|
-
onDelete: (C) => {
|
|
1107
|
-
ae(-1), C.stopPropagation();
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
) })
|
|
1111
|
-
] }) : n.map((C, F) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1112
|
-
ue,
|
|
1113
|
-
{
|
|
1114
|
-
text: String(C.value ?? C.name),
|
|
1115
|
-
onDelete: (K) => {
|
|
1116
|
-
ae(F), K.stopPropagation();
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
) }, C.id ?? C.value ?? C.name)) }) : null
|
|
1120
|
-
] }),
|
|
1121
|
-
b && /* @__PURE__ */ i(
|
|
1122
|
-
"ul",
|
|
1123
|
-
{
|
|
1124
|
-
className: `autocomplete-suggestions-container ${An({ width: L.current?.offsetWidth })}`,
|
|
1125
|
-
children: R.map((C) => /* @__PURE__ */ i(
|
|
1126
|
-
"li",
|
|
1127
|
-
{
|
|
1128
|
-
className: "autocomplete-suggestion-item",
|
|
1129
|
-
onClick: (F) => {
|
|
1130
|
-
ce(C), F.stopPropagation();
|
|
1131
|
-
},
|
|
1132
|
-
children: C.value ?? C.name
|
|
1133
|
-
},
|
|
1134
|
-
C.id ?? C.value ?? C.name
|
|
1135
|
-
))
|
|
1136
|
-
}
|
|
1137
|
-
)
|
|
1138
|
-
]
|
|
1139
|
-
}
|
|
1140
|
-
);
|
|
1141
|
-
}), On = Ee(function(e, t) {
|
|
1142
|
-
const {
|
|
1143
|
-
checked: r,
|
|
1144
|
-
onChange: n,
|
|
1145
|
-
name: a = "",
|
|
1146
|
-
id: s = "",
|
|
1147
|
-
label: o = "",
|
|
1148
|
-
containerClassName: c = "",
|
|
1149
|
-
inputClassName: l = "",
|
|
1150
|
-
labelClassName: d = "",
|
|
1151
|
-
...u
|
|
1152
|
-
} = e;
|
|
1153
|
-
return /* @__PURE__ */ S("label", { className: `input-check-container ${c}`, children: [
|
|
1154
|
-
/* @__PURE__ */ i(
|
|
1155
|
-
"input",
|
|
1156
|
-
{
|
|
1157
|
-
id: s,
|
|
1158
|
-
ref: t,
|
|
1159
|
-
name: a,
|
|
1160
|
-
type: "checkbox",
|
|
1161
|
-
checked: r,
|
|
1162
|
-
onChange: n,
|
|
1163
|
-
className: `input-check ${l}`,
|
|
1164
|
-
...u
|
|
1165
|
-
}
|
|
1166
|
-
),
|
|
1167
|
-
/* @__PURE__ */ i("span", { className: `input-check-label ${d}`, children: o })
|
|
1168
|
-
] });
|
|
1169
|
-
});
|
|
1170
|
-
function ft(e, t = 25) {
|
|
1171
|
-
if (e.length <= t) return e;
|
|
1172
|
-
const r = e.lastIndexOf(".");
|
|
1173
|
-
if (r === -1)
|
|
1174
|
-
return e.slice(0, t - 3) + "...";
|
|
1175
|
-
const n = e.slice(0, r), a = e.slice(r), s = t - a.length - 3;
|
|
1176
|
-
return n.slice(0, s) + "..." + a;
|
|
1177
|
-
}
|
|
1178
|
-
const dr = Ee(function(e, t) {
|
|
1179
|
-
const {
|
|
1180
|
-
children: r,
|
|
1181
|
-
label: n,
|
|
1182
|
-
containerClassName: a = "",
|
|
1183
|
-
inputClassName: s = "",
|
|
1184
|
-
labelClassName: o = "",
|
|
1185
|
-
helperText: c = "",
|
|
1186
|
-
helperTextClassName: l = "",
|
|
1187
|
-
iconClassName: d = "",
|
|
1188
|
-
multiple: u = !1,
|
|
1189
|
-
onChange: h,
|
|
1190
|
-
onClear: m,
|
|
1191
|
-
...p
|
|
1192
|
-
} = e, [g, x] = D([]), k = (v) => {
|
|
1193
|
-
if (v.target.files) {
|
|
1194
|
-
const R = Array.from(v.target.files);
|
|
1195
|
-
x((L) => [...L, ...R]);
|
|
1196
|
-
}
|
|
1197
|
-
h && h(v);
|
|
1198
|
-
}, b = (v) => {
|
|
1199
|
-
x((R) => {
|
|
1200
|
-
const L = R.filter((O, P) => P !== v);
|
|
1201
|
-
return L.length === 0 && m?.(), L;
|
|
1202
|
-
});
|
|
1203
|
-
};
|
|
1204
|
-
return /* @__PURE__ */ S("div", { className: `file-input-container ${a}`, children: [
|
|
1205
|
-
g.length === 0 && /* @__PURE__ */ S("label", { htmlFor: p.name, className: `${o}`, children: [
|
|
1206
|
-
n,
|
|
1207
|
-
/* @__PURE__ */ i(
|
|
1208
|
-
"input",
|
|
1209
|
-
{
|
|
1210
|
-
type: "file",
|
|
1211
|
-
ref: t,
|
|
1212
|
-
multiple: u,
|
|
1213
|
-
onClick: (v) => {
|
|
1214
|
-
v.currentTarget.value = "";
|
|
1215
|
-
},
|
|
1216
|
-
onChange: k,
|
|
1217
|
-
className: `file-input ${s}`,
|
|
1218
|
-
...p
|
|
1219
|
-
}
|
|
1220
|
-
),
|
|
1221
|
-
p.required ? " *" : ""
|
|
1222
|
-
] }),
|
|
1223
|
-
g.length > 1 && /* @__PURE__ */ i("ul", { className: "file-preview-list", children: g.map((v, R) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i("span", { "data-tooltip-id": "tooltip", "data-tooltip-content": v.name, children: /* @__PURE__ */ i(
|
|
1224
|
-
ue,
|
|
1225
|
-
{
|
|
1226
|
-
text: ft(v.name, 25),
|
|
1227
|
-
onDelete: () => b(R)
|
|
1228
|
-
}
|
|
1229
|
-
) }) }, R)) }),
|
|
1230
|
-
g.length === 1 && /* @__PURE__ */ S("div", { className: "file-preview", children: [
|
|
1231
|
-
/* @__PURE__ */ i(Dn, { className: `file-icon ${d}` }),
|
|
1232
|
-
/* @__PURE__ */ i(
|
|
1233
|
-
"span",
|
|
1234
|
-
{
|
|
1235
|
-
className: "!cursor-default",
|
|
1236
|
-
"data-tooltip-id": "tooltip",
|
|
1237
|
-
"data-tooltip-content": g[0]?.name ?? "",
|
|
1238
|
-
children: ft(g[0]?.name ?? "", 25)
|
|
1239
|
-
}
|
|
1240
|
-
),
|
|
1241
|
-
/* @__PURE__ */ i(
|
|
1242
|
-
"button",
|
|
1243
|
-
{
|
|
1244
|
-
onClick: () => {
|
|
1245
|
-
x([]), m?.();
|
|
1246
|
-
},
|
|
1247
|
-
className: "chip-delete-button",
|
|
1248
|
-
type: "button",
|
|
1249
|
-
children: /* @__PURE__ */ i(Qe, {})
|
|
1250
|
-
}
|
|
1251
|
-
)
|
|
1252
|
-
] }),
|
|
1253
|
-
r,
|
|
1254
|
-
!!c && /* @__PURE__ */ i("p", { className: `file-input-helper-text ${l}`, children: c })
|
|
1255
|
-
] });
|
|
1256
|
-
});
|
|
1257
|
-
var Je = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(Je || {});
|
|
1258
|
-
const St = (e) => {
|
|
1259
|
-
switch (e) {
|
|
1260
|
-
case "error":
|
|
1261
|
-
return "input-error";
|
|
1262
|
-
case "good":
|
|
1263
|
-
return "input-good";
|
|
1264
|
-
default:
|
|
1265
|
-
return "input-normal";
|
|
1266
|
-
}
|
|
1267
|
-
}, Rt = (e) => {
|
|
1268
|
-
switch (e) {
|
|
1269
|
-
case "error":
|
|
1270
|
-
return "input-label-error";
|
|
1271
|
-
case "good":
|
|
1272
|
-
return "input-label-good";
|
|
1273
|
-
default:
|
|
1274
|
-
return "input-label-normal";
|
|
1275
|
-
}
|
|
1276
|
-
}, $t = (e) => {
|
|
1277
|
-
switch (e) {
|
|
1278
|
-
case "error":
|
|
1279
|
-
return "input-helper-text-error";
|
|
1280
|
-
case "good":
|
|
1281
|
-
return "input-helper-text-good";
|
|
1282
|
-
default:
|
|
1283
|
-
return "input-helper-text-normal";
|
|
1284
|
-
}
|
|
1285
|
-
}, Xe = Ee(function(e, t) {
|
|
1286
|
-
const {
|
|
1287
|
-
value: r,
|
|
1288
|
-
onChange: n,
|
|
1289
|
-
options: a,
|
|
1290
|
-
containerClassName: s = "",
|
|
1291
|
-
inputClassName: o = "",
|
|
1292
|
-
labelClassName: c = "",
|
|
1293
|
-
helperText: l = "",
|
|
1294
|
-
helperTextClassName: d = "",
|
|
1295
|
-
placeholder: u = "",
|
|
1296
|
-
label: h = "",
|
|
1297
|
-
name: m = "",
|
|
1298
|
-
id: p = "",
|
|
1299
|
-
state: g = Je.default,
|
|
1300
|
-
children: x,
|
|
1301
|
-
...k
|
|
1302
|
-
} = e;
|
|
1303
|
-
return /* @__PURE__ */ S("div", { className: `select-input-container ${s}`, children: [
|
|
1304
|
-
/* @__PURE__ */ i(
|
|
1305
|
-
"select",
|
|
1306
|
-
{
|
|
1307
|
-
...k,
|
|
1308
|
-
id: p,
|
|
1309
|
-
ref: t,
|
|
1310
|
-
name: m,
|
|
1311
|
-
value: r,
|
|
1312
|
-
onChange: n,
|
|
1313
|
-
className: `select-input ${St(g)} peer ${o}`,
|
|
1314
|
-
children: a?.map((b) => /* @__PURE__ */ i("option", { value: b.id, children: b.value ?? b.name ?? b.id }, b.id))
|
|
1315
|
-
}
|
|
1316
|
-
),
|
|
1317
|
-
/* @__PURE__ */ i(
|
|
1318
|
-
"label",
|
|
1319
|
-
{
|
|
1320
|
-
htmlFor: m,
|
|
1321
|
-
className: `select-input-label ${Rt(g)} ${c}`,
|
|
1322
|
-
children: h
|
|
1323
|
-
}
|
|
1324
|
-
),
|
|
1325
|
-
x,
|
|
1326
|
-
(u || l) && /* @__PURE__ */ i(
|
|
1327
|
-
"p",
|
|
1328
|
-
{
|
|
1329
|
-
className: `select-input-helper-text ${$t(g)} ${d}`,
|
|
1330
|
-
children: g !== "error" && g !== "good" ? u : l
|
|
1331
|
-
}
|
|
1332
|
-
)
|
|
1333
|
-
] });
|
|
1334
|
-
}), Ie = Ee(function(e, t) {
|
|
1335
|
-
const {
|
|
1336
|
-
children: r,
|
|
1337
|
-
state: n = Je.default,
|
|
1338
|
-
label: a = "",
|
|
1339
|
-
containerClassName: s = "",
|
|
1340
|
-
inputClassName: o = "",
|
|
1341
|
-
labelClassName: c = "",
|
|
1342
|
-
helperText: l = "",
|
|
1343
|
-
helperTextClassName: d = "",
|
|
1344
|
-
value: u = "",
|
|
1345
|
-
...h
|
|
1346
|
-
} = e;
|
|
1347
|
-
return /* @__PURE__ */ S("div", { className: `text-input-container ${s}`, children: [
|
|
1348
|
-
/* @__PURE__ */ i(
|
|
1349
|
-
"input",
|
|
1350
|
-
{
|
|
1351
|
-
ref: t,
|
|
1352
|
-
value: u,
|
|
1353
|
-
className: `text-input ${St(n)} peer ${o} ${u ? "has-value" : ""} ${h.placeholder ? "has-placeholder" : ""}`,
|
|
1354
|
-
...h
|
|
1355
|
-
}
|
|
1356
|
-
),
|
|
1357
|
-
!!a && /* @__PURE__ */ S(
|
|
1358
|
-
"label",
|
|
1359
|
-
{
|
|
1360
|
-
htmlFor: h.name,
|
|
1361
|
-
className: `text-input-label ${Rt(n)} ${c}`,
|
|
1362
|
-
children: [
|
|
1363
|
-
a,
|
|
1364
|
-
h.required ? " *" : ""
|
|
1365
|
-
]
|
|
1366
|
-
}
|
|
1367
|
-
),
|
|
1368
|
-
r,
|
|
1369
|
-
!!l && /* @__PURE__ */ i(
|
|
1370
|
-
"p",
|
|
1371
|
-
{
|
|
1372
|
-
className: `text-input-helper-text ${$t(n)} ${d}`,
|
|
1373
|
-
children: l
|
|
1374
|
-
}
|
|
1375
|
-
)
|
|
1376
|
-
] });
|
|
1377
|
-
}), de = (e) => {
|
|
1378
|
-
const {
|
|
1379
|
-
children: t,
|
|
1380
|
-
icon: r,
|
|
1381
|
-
type: n = "button",
|
|
1382
|
-
className: a = "",
|
|
1383
|
-
variant: s = "text",
|
|
1384
|
-
color: o = "default",
|
|
1385
|
-
iconClassName: c = "",
|
|
1386
|
-
...l
|
|
1387
|
-
} = e;
|
|
1388
|
-
return /* @__PURE__ */ S(
|
|
1389
|
-
"button",
|
|
1390
|
-
{
|
|
1391
|
-
type: n,
|
|
1392
|
-
className: `icon-button ${a} ${s} ${o}`,
|
|
1393
|
-
...l,
|
|
1394
|
-
children: [
|
|
1395
|
-
/* @__PURE__ */ i("span", { className: c, children: r }),
|
|
1396
|
-
t
|
|
1397
|
-
]
|
|
1398
|
-
}
|
|
1399
|
-
);
|
|
1400
|
-
};
|
|
1401
|
-
function Pn(e) {
|
|
1402
|
-
const {
|
|
1403
|
-
color: t = "stroke-blue-800",
|
|
1404
|
-
className: r = "",
|
|
1405
|
-
loaderClass: n = "",
|
|
1406
|
-
strokeWidth: a = "4",
|
|
1407
|
-
...s
|
|
1408
|
-
} = e;
|
|
1409
|
-
return /* @__PURE__ */ i("div", { ...s, className: `loading ${r}`, children: /* @__PURE__ */ i("div", { className: "loader-container", children: /* @__PURE__ */ i("div", { className: `loader ${n}`, children: /* @__PURE__ */ i("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ i(
|
|
1410
|
-
"circle",
|
|
1411
|
-
{
|
|
1412
|
-
className: `path ${t}`,
|
|
1413
|
-
cx: "50",
|
|
1414
|
-
cy: "50",
|
|
1415
|
-
r: "20",
|
|
1416
|
-
fill: "none",
|
|
1417
|
-
strokeWidth: a,
|
|
1418
|
-
strokeMiterlimit: "10"
|
|
1419
|
-
}
|
|
1420
|
-
) }) }) }) });
|
|
1421
|
-
}
|
|
1422
|
-
function Fn(e) {
|
|
1423
|
-
const { className: t = "" } = e;
|
|
1424
|
-
return /* @__PURE__ */ i(
|
|
1425
|
-
"svg",
|
|
1426
|
-
{
|
|
1427
|
-
className: t,
|
|
1428
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1429
|
-
viewBox: "0 0 512 512",
|
|
1430
|
-
fill: "currentColor",
|
|
1431
|
-
children: /* @__PURE__ */ i("path", { d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" })
|
|
1432
|
-
}
|
|
1433
|
-
);
|
|
1434
|
-
}
|
|
1435
|
-
function Ln(e) {
|
|
1436
|
-
const { className: t = "" } = e;
|
|
1437
|
-
return /* @__PURE__ */ i(
|
|
1438
|
-
"svg",
|
|
1439
|
-
{
|
|
1440
|
-
className: t,
|
|
1441
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1442
|
-
viewBox: "0 0 320 512",
|
|
1443
|
-
fill: "currentColor",
|
|
1444
|
-
children: /* @__PURE__ */ i("path", { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" })
|
|
1445
|
-
}
|
|
1446
|
-
);
|
|
1447
|
-
}
|
|
1448
|
-
function Mn(e) {
|
|
1449
|
-
const { className: t = "" } = e;
|
|
1450
|
-
return /* @__PURE__ */ i(
|
|
1451
|
-
"svg",
|
|
1452
|
-
{
|
|
1453
|
-
className: t,
|
|
1454
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1455
|
-
viewBox: "0 0 320 512",
|
|
1456
|
-
fill: "currentColor",
|
|
1457
|
-
children: /* @__PURE__ */ i("path", { d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" })
|
|
1458
|
-
}
|
|
1459
|
-
);
|
|
1460
|
-
}
|
|
1461
|
-
function In(e) {
|
|
1462
|
-
const { className: t = "" } = e;
|
|
1463
|
-
return /* @__PURE__ */ i(
|
|
1464
|
-
"svg",
|
|
1465
|
-
{
|
|
1466
|
-
className: t,
|
|
1467
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1468
|
-
viewBox: "0 0 512 512",
|
|
1469
|
-
fill: "currentColor",
|
|
1470
|
-
children: /* @__PURE__ */ i("path", { d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z" })
|
|
1471
|
-
}
|
|
1472
|
-
);
|
|
1473
|
-
}
|
|
1474
|
-
function Qe(e) {
|
|
1475
|
-
const { className: t = "" } = e;
|
|
1476
|
-
return /* @__PURE__ */ i(
|
|
1477
|
-
"svg",
|
|
1478
|
-
{
|
|
1479
|
-
className: t,
|
|
1480
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1481
|
-
viewBox: "0 0 384 512",
|
|
1482
|
-
fill: "currentColor",
|
|
1483
|
-
children: /* @__PURE__ */ i("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" })
|
|
1484
|
-
}
|
|
1485
|
-
);
|
|
1486
|
-
}
|
|
1487
|
-
function Dn(e) {
|
|
1488
|
-
const { className: t = "" } = e;
|
|
1489
|
-
return /* @__PURE__ */ i(
|
|
1490
|
-
"svg",
|
|
1491
|
-
{
|
|
1492
|
-
className: t,
|
|
1493
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1494
|
-
viewBox: "0 0 640 640",
|
|
1495
|
-
fill: "currentColor",
|
|
1496
|
-
children: /* @__PURE__ */ i("path", { d: "M192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 234.5C512 217.5 505.3 201.2 493.3 189.2L386.7 82.7C374.7 70.7 358.5 64 341.5 64L192 64zM453.5 240L360 240C346.7 240 336 229.3 336 216L336 122.5L453.5 240z" })
|
|
1497
|
-
}
|
|
1498
|
-
);
|
|
1499
|
-
}
|
|
1500
|
-
const zn = (e) => {
|
|
1501
|
-
const { className: t = "" } = e;
|
|
1502
|
-
return /* @__PURE__ */ i("svg", { className: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ i("path", { d: "M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z" }) });
|
|
1503
|
-
};
|
|
1504
|
-
var le = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.number = 1] = "number", e[e.select = 2] = "select", e[e.autocomplete = 3] = "autocomplete", e[e.date = 4] = "date", e[e.check = 5] = "check", e))(le || {}), be = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(be || {}), q = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(q || {});
|
|
1505
|
-
const pt = (e) => {
|
|
1506
|
-
if (e) {
|
|
1507
|
-
const t = {};
|
|
1508
|
-
return Object.keys(e)?.forEach((n) => {
|
|
1509
|
-
t[n] = { value: e[n] };
|
|
1510
|
-
}), t;
|
|
1511
|
-
}
|
|
1512
|
-
return {};
|
|
1513
|
-
};
|
|
1514
|
-
function _n(e, t) {
|
|
1515
|
-
const { type: r } = t;
|
|
1516
|
-
switch (r) {
|
|
1517
|
-
case q.reset:
|
|
1518
|
-
return {};
|
|
1519
|
-
case q.update: {
|
|
1520
|
-
const { toUpdate: n } = t;
|
|
1521
|
-
return { ...e, ...n };
|
|
1522
|
-
}
|
|
1523
|
-
default:
|
|
1524
|
-
return e;
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
const Et = He({}), Bn = (e) => {
|
|
1528
|
-
const { children: t } = e, { filters: r } = se(), [n, a] = zt(
|
|
1529
|
-
_n,
|
|
1530
|
-
pt(r)
|
|
1531
|
-
);
|
|
1532
|
-
j(() => {
|
|
1533
|
-
a({ type: q.reset });
|
|
1534
|
-
const o = pt(r);
|
|
1535
|
-
Object.keys(o).length && a({
|
|
1536
|
-
type: q.update,
|
|
1537
|
-
toUpdate: o
|
|
1538
|
-
});
|
|
1539
|
-
}, [r]);
|
|
1540
|
-
const s = {
|
|
1541
|
-
currentFilters: n,
|
|
1542
|
-
setCurrentFilters: a
|
|
1543
|
-
};
|
|
1544
|
-
return /* @__PURE__ */ i(Et.Provider, { value: s, children: t });
|
|
1545
|
-
}, Ce = () => {
|
|
1546
|
-
const e = qe(Et);
|
|
1547
|
-
if (e === void 0)
|
|
1548
|
-
throw new Error("tableOptionsContext must be used within a Provider");
|
|
1549
|
-
return e;
|
|
1550
|
-
}, Wn = [20, 50, 100], kt = He({}), fr = (e) => {
|
|
1551
|
-
const { children: t } = e, [r, n] = D(0), [a, s] = D(20), [o, c] = D(0), [l, d] = D("id"), [u, h] = D(be.DESC), [m, p] = D({}), g = T(
|
|
1552
|
-
(R, L) => {
|
|
1553
|
-
let O = u;
|
|
1554
|
-
l === R && (u === be.ASC ? O = be.DESC : O = be.ASC), d(R), h(O), L && L(R, O);
|
|
1555
|
-
},
|
|
1556
|
-
[l, u]
|
|
1557
|
-
), x = T((R) => {
|
|
1558
|
-
const L = Object.entries(R).reduce(
|
|
1559
|
-
(O, [P, N]) => (N && typeof N.value < "u" && N.value !== null && (O[P] = N.value), O),
|
|
1560
|
-
{}
|
|
1561
|
-
);
|
|
1562
|
-
p(L);
|
|
1563
|
-
}, []), k = T(
|
|
1564
|
-
(R) => {
|
|
1565
|
-
R ? (delete m[R.toLowerCase()], p({ ...m })) : p({});
|
|
1566
|
-
},
|
|
1567
|
-
[m]
|
|
1568
|
-
), b = z(() => Object.keys(m).length, [m]), v = {
|
|
1569
|
-
onSort: g,
|
|
1570
|
-
total: r,
|
|
1571
|
-
setTotal: n,
|
|
1572
|
-
sortingBy: l,
|
|
1573
|
-
setSortingBy: d,
|
|
1574
|
-
sortingOrder: u,
|
|
1575
|
-
setSortingOrder: h,
|
|
1576
|
-
pageSize: a,
|
|
1577
|
-
pageSizes: Wn,
|
|
1578
|
-
setPageSize: s,
|
|
1579
|
-
currentPage: o,
|
|
1580
|
-
setCurrentPage: c,
|
|
1581
|
-
filters: m,
|
|
1582
|
-
onFilterApply: x,
|
|
1583
|
-
clearFilters: k,
|
|
1584
|
-
countOfFilters: b
|
|
1585
|
-
};
|
|
1586
|
-
return /* @__PURE__ */ i(kt.Provider, { value: v, children: t });
|
|
1587
|
-
}, se = () => {
|
|
1588
|
-
const e = qe(kt);
|
|
1589
|
-
if (e === void 0)
|
|
1590
|
-
throw new Error("tableOptionsContext must be used within a Provider");
|
|
1591
|
-
return e;
|
|
1592
|
-
}, At = He(
|
|
1593
|
-
{}
|
|
1594
|
-
);
|
|
1595
|
-
function pr(e) {
|
|
1596
|
-
const { children: t, t: r, language: n } = e;
|
|
1597
|
-
return /* @__PURE__ */ i(At.Provider, { value: { t: r, language: n }, children: t });
|
|
1598
|
-
}
|
|
1599
|
-
const X = () => {
|
|
1600
|
-
const e = qe(At);
|
|
1601
|
-
if (e === void 0)
|
|
1602
|
-
throw new Error("translationContext must be used within a Provider");
|
|
1603
|
-
return e;
|
|
1604
|
-
};
|
|
1605
|
-
function jn(e) {
|
|
1606
|
-
const { t } = X(), {
|
|
1607
|
-
entity: r = "",
|
|
1608
|
-
columns: n = [],
|
|
1609
|
-
hasAction: a = !0,
|
|
1610
|
-
onSortCallback: s,
|
|
1611
|
-
selectionState: o,
|
|
1612
|
-
onToggleAllRows: c
|
|
1613
|
-
} = e, l = H(null);
|
|
1614
|
-
j(() => {
|
|
1615
|
-
l.current && (l.current.indeterminate = !!(o?.hasSomeSelected && !o?.allSelected));
|
|
1616
|
-
}, [o]);
|
|
1617
|
-
const { onSort: d, sortingOrder: u, sortingBy: h } = se(), m = z(() => n.sort((p, g) => (g.pos ?? 0) - (p.pos ?? 0)).filter((p) => p.display !== "none")?.map((p) => ({
|
|
1618
|
-
id: p.key,
|
|
1619
|
-
label: p.label,
|
|
1620
|
-
className: p.className ?? "",
|
|
1621
|
-
sortable: p.sortable ?? !0,
|
|
1622
|
-
sortOptions: p.sortOptions
|
|
1623
|
-
})), [n, r, t]);
|
|
1624
|
-
return /* @__PURE__ */ i("thead", { className: "table-headers-row", children: /* @__PURE__ */ S("tr", { children: [
|
|
1625
|
-
/* @__PURE__ */ i("th", { scope: "col", className: "table-headers-column table-headers-checkbox", children: c ? /* @__PURE__ */ i(
|
|
1626
|
-
"input",
|
|
1627
|
-
{
|
|
1628
|
-
type: "checkbox",
|
|
1629
|
-
ref: l,
|
|
1630
|
-
checked: o?.allSelected ?? !1,
|
|
1631
|
-
onChange: c,
|
|
1632
|
-
"aria-label": t("_accessibility:components.table.selectAllRows")
|
|
1633
|
-
}
|
|
1634
|
-
) : null }),
|
|
1635
|
-
m.map((p) => /* @__PURE__ */ i(
|
|
1636
|
-
"th",
|
|
1637
|
-
{
|
|
1638
|
-
scope: "col",
|
|
1639
|
-
className: `table-headers-column ${p.className}`,
|
|
1640
|
-
children: /* @__PURE__ */ S(
|
|
1641
|
-
Wt,
|
|
1642
|
-
{
|
|
1643
|
-
disabled: !p.sortable,
|
|
1644
|
-
onClick: () => d(p.id, s),
|
|
1645
|
-
className: "table-headers-cell",
|
|
1646
|
-
children: [
|
|
1647
|
-
/* @__PURE__ */ i("span", { className: "table-headers-label", children: p.label }),
|
|
1648
|
-
p.sortable && h === p.id && /* @__PURE__ */ i("span", { children: u === be.ASC ? p.sortOptions?.icons?.asc ?? /* @__PURE__ */ i(
|
|
1649
|
-
In,
|
|
1650
|
-
{
|
|
1651
|
-
className: p.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
|
|
1652
|
-
}
|
|
1653
|
-
) : p.sortOptions?.icons?.desc ?? /* @__PURE__ */ i(
|
|
1654
|
-
Fn,
|
|
1655
|
-
{
|
|
1656
|
-
className: p.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
|
|
1657
|
-
}
|
|
1658
|
-
) })
|
|
1659
|
-
]
|
|
1660
|
-
}
|
|
1661
|
-
)
|
|
1662
|
-
},
|
|
1663
|
-
p.id
|
|
1664
|
-
)),
|
|
1665
|
-
a && /* @__PURE__ */ i("th", { scope: "col", className: "table-headers-action", children: /* @__PURE__ */ i("span", { className: "button text default disabled", children: t("_accessibility:labels.actions") }) })
|
|
1666
|
-
] }) });
|
|
1667
|
-
}
|
|
1668
|
-
const Vn = (e) => {
|
|
1669
|
-
const { items: t, text: r, id: n, onClearFilter: a } = e;
|
|
1670
|
-
return /* @__PURE__ */ i(
|
|
1671
|
-
ue,
|
|
1672
|
-
{
|
|
1673
|
-
text: `${r}: ${t.map((s) => s.value ?? s.name).join(", ")}`,
|
|
1674
|
-
onDelete: () => a(n)
|
|
1675
|
-
}
|
|
1676
|
-
);
|
|
1677
|
-
}, Gn = (e) => {
|
|
1678
|
-
const { end: t, start: r, text: n, id: a, onClearFilter: s } = e;
|
|
1679
|
-
return /* @__PURE__ */ i(
|
|
1680
|
-
ue,
|
|
1681
|
-
{
|
|
1682
|
-
text: `${n}: ${r || "♾️"} - ${t || "♾️"}`,
|
|
1683
|
-
onDelete: () => s(a)
|
|
1684
|
-
}
|
|
1685
|
-
);
|
|
1686
|
-
}, Un = (e) => {
|
|
1687
|
-
const { filtersDefinition: t } = e, r = z(() => {
|
|
1688
|
-
const c = {};
|
|
1689
|
-
return t.forEach((l) => {
|
|
1690
|
-
c[l.propertyName] = l.label ?? l.propertyName;
|
|
1691
|
-
}), c;
|
|
1692
|
-
}, [t]), { filters: n, clearFilters: a } = se(), s = z(() => Object.keys(n), [n]), o = T(
|
|
1693
|
-
(c) => n[c]?.end || n[c]?.start ? /* @__PURE__ */ i(
|
|
1694
|
-
Gn,
|
|
1695
|
-
{
|
|
1696
|
-
id: c,
|
|
1697
|
-
text: r[c],
|
|
1698
|
-
start: n[c].start,
|
|
1699
|
-
end: n[c].end,
|
|
1700
|
-
onClearFilter: a
|
|
1701
|
-
}
|
|
1702
|
-
) : Array.isArray(n[c]) ? /* @__PURE__ */ i(
|
|
1703
|
-
Vn,
|
|
1704
|
-
{
|
|
1705
|
-
id: c,
|
|
1706
|
-
text: r[c],
|
|
1707
|
-
items: n[c],
|
|
1708
|
-
onClearFilter: a
|
|
1709
|
-
}
|
|
1710
|
-
) : /* @__PURE__ */ i(
|
|
1711
|
-
ue,
|
|
1712
|
-
{
|
|
1713
|
-
text: `${r[c]}: ${n[c]?.value ?? n[c]?.name ?? n[c]}`,
|
|
1714
|
-
onDelete: () => a(c)
|
|
1715
|
-
}
|
|
1716
|
-
),
|
|
1717
|
-
[n, r]
|
|
1718
|
-
);
|
|
1719
|
-
return /* @__PURE__ */ i("ul", { className: "active-filters-main", children: s?.map((c) => /* @__PURE__ */ i("li", { children: o(c) }, c)) });
|
|
1720
|
-
};
|
|
1721
|
-
function Hn(e) {
|
|
1722
|
-
const { propertyName: t, label: r, placeholder: n, options: a, multiple: s = !0 } = e, { currentFilters: o, setCurrentFilters: c } = Ce(), l = z(() => o[t] ?? a[0], [o]), d = T(
|
|
1723
|
-
(u) => {
|
|
1724
|
-
c({
|
|
1725
|
-
type: q.update,
|
|
1726
|
-
toUpdate: {
|
|
1727
|
-
[t]: {
|
|
1728
|
-
value: u
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
});
|
|
1732
|
-
},
|
|
1733
|
-
[s]
|
|
1734
|
-
);
|
|
1735
|
-
return /* @__PURE__ */ i(
|
|
1736
|
-
Tn,
|
|
1737
|
-
{
|
|
1738
|
-
value: l?.value,
|
|
1739
|
-
label: r,
|
|
1740
|
-
options: a,
|
|
1741
|
-
multiple: s,
|
|
1742
|
-
helperTextClassName: "hidden",
|
|
1743
|
-
containerClassName: "options-widget-container",
|
|
1744
|
-
onChange: d,
|
|
1745
|
-
placeholder: n
|
|
1746
|
-
}
|
|
1747
|
-
);
|
|
1748
|
-
}
|
|
1749
|
-
const qn = (e) => {
|
|
1750
|
-
const { propertyName: t, label: r } = e, { currentFilters: n, setCurrentFilters: a } = Ce(), s = z(() => n[t]?.value ?? "", [n]), o = T((c) => {
|
|
1751
|
-
a({
|
|
1752
|
-
type: q.update,
|
|
1753
|
-
toUpdate: { [t]: { value: c.target.checked } }
|
|
1754
|
-
});
|
|
1755
|
-
}, []);
|
|
1756
|
-
return /* @__PURE__ */ i(On, { label: r, checked: s ?? !1, onChange: o });
|
|
1757
|
-
};
|
|
1758
|
-
function Kn(e) {
|
|
1759
|
-
const { propertyName: t, options: r, label: n, placeholder: a } = e, { currentFilters: s, setCurrentFilters: o } = Ce(), c = z(() => s[t]?.value ?? r[0], [s]), l = T((d) => {
|
|
1760
|
-
o({
|
|
1761
|
-
type: q.update,
|
|
1762
|
-
toUpdate: { [t]: { value: d.target.value } }
|
|
1763
|
-
});
|
|
1764
|
-
}, []);
|
|
1765
|
-
return /* @__PURE__ */ i(
|
|
1766
|
-
Xe,
|
|
1767
|
-
{
|
|
1768
|
-
value: c,
|
|
1769
|
-
label: n,
|
|
1770
|
-
options: r,
|
|
1771
|
-
helperTextClassName: "hidden",
|
|
1772
|
-
containerClassName: "options-widget-container",
|
|
1773
|
-
onChange: l,
|
|
1774
|
-
placeholder: a
|
|
1775
|
-
}
|
|
1776
|
-
);
|
|
1777
|
-
}
|
|
1778
|
-
const Yn = (e) => {
|
|
1779
|
-
const { propertyName: t, label: r, placeholder: n } = e, { currentFilters: a, setCurrentFilters: s } = Ce(), o = z(() => a[t]?.value ?? "", [a]), c = T((l) => {
|
|
1780
|
-
s({
|
|
1781
|
-
type: q.update,
|
|
1782
|
-
toUpdate: { [t]: { value: l.target.value } }
|
|
1783
|
-
});
|
|
1784
|
-
}, []);
|
|
1785
|
-
return /* @__PURE__ */ i(
|
|
1786
|
-
Ie,
|
|
1787
|
-
{
|
|
1788
|
-
value: o ?? "",
|
|
1789
|
-
label: r,
|
|
1790
|
-
onChange: c,
|
|
1791
|
-
containerClassName: "input-widget-container",
|
|
1792
|
-
helperTextClassName: "",
|
|
1793
|
-
placeholder: n
|
|
1794
|
-
}
|
|
1795
|
-
);
|
|
1796
|
-
}, ht = (e) => {
|
|
1797
|
-
const { propertyName: t, label: r, inputType: n } = e, { t: a } = X(), { currentFilters: s, setCurrentFilters: o } = Ce(), c = H(null), l = H(null), d = T((h) => {
|
|
1798
|
-
o({
|
|
1799
|
-
type: q.update,
|
|
1800
|
-
toUpdate: {
|
|
1801
|
-
[t]: {
|
|
1802
|
-
value: { end: l?.current?.value ?? null, start: h.target.value }
|
|
1803
|
-
}
|
|
1804
|
-
}
|
|
1805
|
-
});
|
|
1806
|
-
}, []), u = T((h) => {
|
|
1807
|
-
o({
|
|
1808
|
-
type: q.update,
|
|
1809
|
-
toUpdate: {
|
|
1810
|
-
[t]: {
|
|
1811
|
-
value: {
|
|
1812
|
-
start: c?.current?.value ?? null,
|
|
1813
|
-
end: h.target.value
|
|
1814
|
-
}
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
});
|
|
1818
|
-
}, []);
|
|
1819
|
-
return /* @__PURE__ */ S("div", { className: "range-widget-container", children: [
|
|
1820
|
-
/* @__PURE__ */ i("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
|
|
1821
|
-
/* @__PURE__ */ S("div", { className: "range-widget-row", children: [
|
|
1822
|
-
/* @__PURE__ */ i(
|
|
1823
|
-
Ie,
|
|
1824
|
-
{
|
|
1825
|
-
value: s[t]?.value?.start ?? "",
|
|
1826
|
-
placeholder: a("_accessibility:components.table.filters.range.start"),
|
|
1827
|
-
type: n,
|
|
1828
|
-
ref: c,
|
|
1829
|
-
onChange: d,
|
|
1830
|
-
containerClassName: "input-widget-container",
|
|
1831
|
-
helperTextClassName: ""
|
|
1832
|
-
}
|
|
1833
|
-
),
|
|
1834
|
-
/* @__PURE__ */ i(
|
|
1835
|
-
Ie,
|
|
1836
|
-
{
|
|
1837
|
-
value: s[t]?.value?.end ?? "",
|
|
1838
|
-
placeholder: a("_accessibility:components.table.filters.range.end"),
|
|
1839
|
-
type: n,
|
|
1840
|
-
ref: l,
|
|
1841
|
-
onChange: u,
|
|
1842
|
-
containerClassName: "input-widget-container",
|
|
1843
|
-
helperTextClassName: ""
|
|
1844
|
-
}
|
|
1845
|
-
)
|
|
1846
|
-
] })
|
|
1847
|
-
] });
|
|
1848
|
-
}, Zn = (e) => {
|
|
1849
|
-
switch (e.type) {
|
|
1850
|
-
case le.text:
|
|
1851
|
-
return /* @__PURE__ */ i(Yn, { ...e });
|
|
1852
|
-
case le.number:
|
|
1853
|
-
return /* @__PURE__ */ i(
|
|
1854
|
-
ht,
|
|
1855
|
-
{
|
|
1856
|
-
...e,
|
|
1857
|
-
inputType: "number"
|
|
1858
|
-
}
|
|
1859
|
-
);
|
|
1860
|
-
case le.date:
|
|
1861
|
-
return /* @__PURE__ */ i(
|
|
1862
|
-
ht,
|
|
1863
|
-
{
|
|
1864
|
-
...e,
|
|
1865
|
-
inputType: "date"
|
|
1866
|
-
}
|
|
1867
|
-
);
|
|
1868
|
-
case le.select:
|
|
1869
|
-
return /* @__PURE__ */ i(Kn, { ...e });
|
|
1870
|
-
case le.autocomplete:
|
|
1871
|
-
return /* @__PURE__ */ i(Hn, { ...e });
|
|
1872
|
-
case le.check:
|
|
1873
|
-
return /* @__PURE__ */ i(qn, { ...e });
|
|
1874
|
-
}
|
|
1875
|
-
return /* @__PURE__ */ i(Se, {});
|
|
1876
|
-
}, Jn = (e) => {
|
|
1877
|
-
const { filters: t = [], show: r, handleShow: n } = e, { onFilterApply: a } = se(), { currentFilters: s, setCurrentFilters: o } = Ce(), { t: c } = X(), l = H(null);
|
|
1878
|
-
return j(() => {
|
|
1879
|
-
const d = ({ target: u }) => {
|
|
1880
|
-
l.current && (u?.closest(".filter-dropdown-trigger") || !r || l.current?.contains(u) || n(!1));
|
|
1881
|
-
};
|
|
1882
|
-
return document.addEventListener("click", d), () => document.removeEventListener("click", d);
|
|
1883
|
-
}, [n, r]), j(() => {
|
|
1884
|
-
const d = (u) => {
|
|
1885
|
-
!r || u.code !== "Escape" || n(!1);
|
|
1886
|
-
};
|
|
1887
|
-
return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
|
|
1888
|
-
}, [n, r]), /* @__PURE__ */ i("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */ S("div", { className: "filter-popup", ref: l, children: [
|
|
1889
|
-
/* @__PURE__ */ i("div", { className: "filter-title", children: c("_accessibility:buttons.filters") }),
|
|
1890
|
-
/* @__PURE__ */ i("ul", { className: "filter-container", children: t.map((d) => /* @__PURE__ */ i("li", { className: "filter-container-item", children: Zn(d) }, d.propertyName)) }),
|
|
1891
|
-
/* @__PURE__ */ i("div", { className: "filter-footer", children: /* @__PURE__ */ S("ul", { className: "filter-buttons-row", children: [
|
|
1892
|
-
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1893
|
-
"button",
|
|
1894
|
-
{
|
|
1895
|
-
onClick: () => o({
|
|
1896
|
-
type: q.reset,
|
|
1897
|
-
filters: t
|
|
1898
|
-
}),
|
|
1899
|
-
className: "filter-dropdown-button small filter-dropdown-cancel",
|
|
1900
|
-
children: c("_accessibility:buttons.clear")
|
|
1901
|
-
}
|
|
1902
|
-
) }),
|
|
1903
|
-
/* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
1904
|
-
"button",
|
|
1905
|
-
{
|
|
1906
|
-
className: "filter-dropdown-button small filter-dropdown-submit",
|
|
1907
|
-
onClick: () => {
|
|
1908
|
-
n(!1), a(s);
|
|
1909
|
-
},
|
|
1910
|
-
onBlur: () => n(!1),
|
|
1911
|
-
children: c("_accessibility:buttons.applyFilters")
|
|
1912
|
-
}
|
|
1913
|
-
) })
|
|
1914
|
-
] }) })
|
|
1915
|
-
] }) });
|
|
1916
|
-
}, Xn = () => {
|
|
1917
|
-
const { t: e } = X(), { total: t, pageSize: r, pageSizes: n, currentPage: a } = se(), s = (a + 1) * r > t ? t : (a + 1) * r;
|
|
1918
|
-
return /* @__PURE__ */ S("div", { className: "table-navigation-sizes", children: [
|
|
1919
|
-
n[0] < t && /* @__PURE__ */ i(Se, { children: /* @__PURE__ */ S("p", { children: [
|
|
1920
|
-
a * r + 1,
|
|
1921
|
-
" - ",
|
|
1922
|
-
s,
|
|
1923
|
-
" ",
|
|
1924
|
-
e("_accessibility:components.table.of")
|
|
1925
|
-
] }) }),
|
|
1926
|
-
/* @__PURE__ */ i("p", { children: t })
|
|
1927
|
-
] });
|
|
1928
|
-
};
|
|
1929
|
-
function Qn() {
|
|
1930
|
-
const { t: e } = X(), { total: t, pageSize: r, currentPage: n, setCurrentPage: a } = se(), s = z(() => {
|
|
1931
|
-
const o = Math.ceil(t / r);
|
|
1932
|
-
return Array.from({ length: o }, (c, l) => ({
|
|
1933
|
-
id: l,
|
|
1934
|
-
value: l + 1
|
|
1935
|
-
}));
|
|
1936
|
-
}, [t, r]);
|
|
1937
|
-
return /* @__PURE__ */ S("div", { className: "jump-to-page", children: [
|
|
1938
|
-
/* @__PURE__ */ i("p", { children: e("_accessibility:components.table.jumpToPage") }),
|
|
1939
|
-
/* @__PURE__ */ i(
|
|
1940
|
-
Xe,
|
|
1941
|
-
{
|
|
1942
|
-
value: n,
|
|
1943
|
-
options: s,
|
|
1944
|
-
inputClassName: "jump-to-page-input",
|
|
1945
|
-
containerClassName: "jump-to-page-input-container",
|
|
1946
|
-
helperTextClassName: "hidden",
|
|
1947
|
-
onChange: (o) => a(Number(o.target.value))
|
|
1948
|
-
}
|
|
1949
|
-
)
|
|
1950
|
-
] });
|
|
1951
|
-
}
|
|
1952
|
-
const er = () => {
|
|
1953
|
-
const { t: e } = X(), { total: t, pageSize: r, currentPage: n, setCurrentPage: a } = se();
|
|
1954
|
-
return /* @__PURE__ */ S("div", { className: "table-navigation-pages", children: [
|
|
1955
|
-
/* @__PURE__ */ i(
|
|
1956
|
-
de,
|
|
1957
|
-
{
|
|
1958
|
-
icon: /* @__PURE__ */ i(Ln, { className: "w-2.5" }),
|
|
1959
|
-
className: "table-navigation-buttons",
|
|
1960
|
-
disabled: n === 0,
|
|
1961
|
-
"aria-label": e("_accessibility:buttons.previous"),
|
|
1962
|
-
name: e("_accessibility:buttons.previous"),
|
|
1963
|
-
onClick: () => a(n - 1)
|
|
1964
|
-
}
|
|
1965
|
-
),
|
|
1966
|
-
/* @__PURE__ */ i(
|
|
1967
|
-
de,
|
|
1968
|
-
{
|
|
1969
|
-
icon: /* @__PURE__ */ i(Mn, { className: "w-2.5" }),
|
|
1970
|
-
disabled: Math.floor(t / ((n + 1) * r)) === 0,
|
|
1971
|
-
className: "table-navigation-buttons",
|
|
1972
|
-
name: e("_accessibility:buttons.next"),
|
|
1973
|
-
"aria-label": e("_accessibility:buttons.next"),
|
|
1974
|
-
onClick: () => a(n + 1)
|
|
1975
|
-
}
|
|
1976
|
-
)
|
|
1977
|
-
] });
|
|
1978
|
-
};
|
|
1979
|
-
function tr() {
|
|
1980
|
-
const { t: e } = X(), { pageSizes: t, pageSize: r, setPageSize: n } = se(), a = z(
|
|
1981
|
-
() => t?.map((s) => ({ id: s, value: s })),
|
|
1982
|
-
[t]
|
|
1983
|
-
);
|
|
1984
|
-
return /* @__PURE__ */ S("div", { className: "page-size", children: [
|
|
1985
|
-
/* @__PURE__ */ i("p", { children: e("_accessibility:components.table.pageSizes") }),
|
|
1986
|
-
/* @__PURE__ */ i(
|
|
1987
|
-
Xe,
|
|
1988
|
-
{
|
|
1989
|
-
value: r,
|
|
1990
|
-
options: a,
|
|
1991
|
-
inputClassName: "page-size-input",
|
|
1992
|
-
containerClassName: "page-size-input-container",
|
|
1993
|
-
helperTextClassName: "hidden",
|
|
1994
|
-
onChange: (s) => n(Number(s.target.value))
|
|
1995
|
-
}
|
|
1996
|
-
)
|
|
1997
|
-
] });
|
|
1998
|
-
}
|
|
1999
|
-
function nr() {
|
|
2000
|
-
return /* @__PURE__ */ S("div", { className: "table-footer", children: [
|
|
2001
|
-
/* @__PURE__ */ i(Qn, {}),
|
|
2002
|
-
/* @__PURE__ */ i(tr, {}),
|
|
2003
|
-
/* @__PURE__ */ i(Xn, {}),
|
|
2004
|
-
/* @__PURE__ */ i(er, {})
|
|
2005
|
-
] });
|
|
2006
|
-
}
|
|
2007
|
-
const rr = (e) => e, ar = (e) => {
|
|
2008
|
-
const { t } = X(), {
|
|
2009
|
-
columns: r,
|
|
2010
|
-
softDeleteProperty: n = "deletedAt",
|
|
2011
|
-
data: a,
|
|
2012
|
-
actions: s,
|
|
2013
|
-
selectedRows: o,
|
|
2014
|
-
expandedRows: c = [],
|
|
2015
|
-
onRowSelectionChange: l,
|
|
2016
|
-
onRowExpand: d
|
|
2017
|
-
} = e, u = z(
|
|
2018
|
-
() => r.sort((m, p) => (p.pos ?? 0) - (m.pos ?? 0)).filter((m) => m.display !== "none"),
|
|
2019
|
-
[r]
|
|
2020
|
-
), h = z(
|
|
2021
|
-
() => new Map(
|
|
2022
|
-
c.map((m) => [m.rowId, m])
|
|
2023
|
-
),
|
|
2024
|
-
[c]
|
|
2025
|
-
);
|
|
2026
|
-
return a?.map((m) => {
|
|
2027
|
-
const p = o.has(m.id), g = h.get(m.id), x = !!g, k = u.length + 1 + (s ? 1 : 0);
|
|
2028
|
-
return /* @__PURE__ */ S(_t, { children: [
|
|
2029
|
-
/* @__PURE__ */ S(
|
|
2030
|
-
"tr",
|
|
2031
|
-
{
|
|
2032
|
-
className: `table-row ${d ? "expandable" : ""} ${m[n] ? "deleted-class" : ""} ${p ? "selected" : ""} ${x ? "expanded" : ""}`,
|
|
2033
|
-
onClick: () => d?.(m),
|
|
2034
|
-
children: [
|
|
2035
|
-
/* @__PURE__ */ i("td", { className: "table-row-cell table-row-checkbox", children: /* @__PURE__ */ i(
|
|
2036
|
-
"input",
|
|
2037
|
-
{
|
|
2038
|
-
type: "checkbox",
|
|
2039
|
-
checked: p,
|
|
2040
|
-
onClick: (b) => b.stopPropagation(),
|
|
2041
|
-
onChange: () => l(m),
|
|
2042
|
-
"aria-label": t("_accessibility:components.table.selectRow")
|
|
2043
|
-
}
|
|
2044
|
-
) }),
|
|
2045
|
-
u?.map((b, v) => /* @__PURE__ */ i(
|
|
2046
|
-
"td",
|
|
2047
|
-
{
|
|
2048
|
-
className: `table-row-cell ${v === 0 ? "basic" : ""} ${b.className ?? ""}`,
|
|
2049
|
-
children: b.renderBody ? b.renderBody(m[b.key], m) : rr(m[b.key])
|
|
2050
|
-
},
|
|
2051
|
-
b.key
|
|
2052
|
-
)),
|
|
2053
|
-
s ? /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i("div", { className: "table-row-cell-action", children: s(m).filter((b) => !b.hidden)?.map((b) => /* @__PURE__ */ i(Tt, { content: b.tooltip, children: /* @__PURE__ */ i(
|
|
2054
|
-
de,
|
|
2055
|
-
{
|
|
2056
|
-
icon: b.icon,
|
|
2057
|
-
className: "row-table-action",
|
|
2058
|
-
onClick: (v) => {
|
|
2059
|
-
v.stopPropagation(), b.onClick(m);
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
) }, b.id)) }) }) : null
|
|
2063
|
-
]
|
|
2064
|
-
}
|
|
2065
|
-
),
|
|
2066
|
-
x && g?.content !== null && typeof g?.content < "u" && /* @__PURE__ */ i("tr", { className: "table-row-expanded", children: /* @__PURE__ */ i("td", { className: "table-row-expanded-cell", colSpan: k, children: /* @__PURE__ */ i(
|
|
2067
|
-
"div",
|
|
2068
|
-
{
|
|
2069
|
-
className: `table-row-expanded-content ${g.isVisible ? "open" : "closed"}`,
|
|
2070
|
-
children: /* @__PURE__ */ i("div", { className: "table-row-expanded-inner", children: g.content })
|
|
2071
|
-
}
|
|
2072
|
-
) }) })
|
|
2073
|
-
] }, m.id);
|
|
2074
|
-
});
|
|
2075
|
-
};
|
|
2076
|
-
function sr() {
|
|
2077
|
-
const { t: e } = X();
|
|
2078
|
-
return /* @__PURE__ */ i("div", { className: "table-empty", children: /* @__PURE__ */ i("p", { children: e("_accessibility:components.table.empty") }) });
|
|
2079
|
-
}
|
|
2080
|
-
const ir = (e) => {
|
|
2081
|
-
const { columns: t, title: r, isLoading: n, toolbar: a, filterOptions: s } = e, { countOfFilters: o } = se(), { t: c } = X(), l = z(() => t ? t.sort((p, g) => (g.pos ?? 0) - (p.pos ?? 0)).filter((p) => !!p.filterOptions).map((p) => ({
|
|
2082
|
-
...p.filterOptions,
|
|
2083
|
-
label: p.filterOptions?.label ?? p.label,
|
|
2084
|
-
propertyName: p.key
|
|
2085
|
-
})) : [], [t]), [d, u] = D(!1), h = T(
|
|
2086
|
-
(p) => {
|
|
2087
|
-
s?.dropdown?.setOpened ? s.dropdown.setOpened(p ?? !1) : u(p ?? !1);
|
|
2088
|
-
},
|
|
2089
|
-
[s]
|
|
2090
|
-
), m = z(
|
|
2091
|
-
() => s?.dropdown?.opened ?? d,
|
|
2092
|
-
[s, d]
|
|
2093
|
-
);
|
|
2094
|
-
return /* @__PURE__ */ S("div", { className: `table-header ${m ? "showing-filters" : ""}`, children: [
|
|
2095
|
-
/* @__PURE__ */ S("div", { children: [
|
|
2096
|
-
r && /* @__PURE__ */ i("h1", { className: "table-header-title", children: r }),
|
|
2097
|
-
n ? null : /* @__PURE__ */ S("div", { className: "table-header-content", children: [
|
|
2098
|
-
a,
|
|
2099
|
-
s?.button?.hide !== !0 && /* @__PURE__ */ S(
|
|
2100
|
-
de,
|
|
2101
|
-
{
|
|
2102
|
-
icon: s?.button?.icon ?? /* @__PURE__ */ i(zn, { className: "filter-dropdown-trigger-icon" }),
|
|
2103
|
-
className: "filter-dropdown-button normal filter-dropdown-trigger",
|
|
2104
|
-
"aria-haspopup": "true",
|
|
2105
|
-
onClick: () => h(!m),
|
|
2106
|
-
"aria-expanded": m,
|
|
2107
|
-
children: [
|
|
2108
|
-
/* @__PURE__ */ i(
|
|
2109
|
-
Bt,
|
|
2110
|
-
{
|
|
2111
|
-
count: o,
|
|
2112
|
-
className: `${o > 0 ? "show" : "hide"} `
|
|
2113
|
-
}
|
|
2114
|
-
),
|
|
2115
|
-
/* @__PURE__ */ i("span", { className: "sr-only", children: c("_accessibility:buttons.filters") }),
|
|
2116
|
-
/* @__PURE__ */ i("wbr", {})
|
|
2117
|
-
]
|
|
2118
|
-
}
|
|
2119
|
-
)
|
|
2120
|
-
] })
|
|
2121
|
-
] }),
|
|
2122
|
-
!!l && !!l.length && /* @__PURE__ */ i(
|
|
2123
|
-
Jn,
|
|
2124
|
-
{
|
|
2125
|
-
filters: l,
|
|
2126
|
-
show: m,
|
|
2127
|
-
handleShow: h,
|
|
2128
|
-
options: s
|
|
2129
|
-
}
|
|
2130
|
-
),
|
|
2131
|
-
/* @__PURE__ */ i(Un, { filtersDefinition: l })
|
|
2132
|
-
] });
|
|
2133
|
-
}, Ve = 220;
|
|
2134
|
-
function hr(e) {
|
|
2135
|
-
const {
|
|
2136
|
-
data: t,
|
|
2137
|
-
onSort: r,
|
|
2138
|
-
entity: n = "",
|
|
2139
|
-
isLoading: a = !1,
|
|
2140
|
-
actions: s,
|
|
2141
|
-
columns: o = [],
|
|
2142
|
-
contentClassName: c = "",
|
|
2143
|
-
className: l = "",
|
|
2144
|
-
softDeleteProperty: d = "deletedAt",
|
|
2145
|
-
onRowSelect: u,
|
|
2146
|
-
onSelectedRowsChange: h,
|
|
2147
|
-
allowMultipleExpandedRows: m = !1,
|
|
2148
|
-
expandedRowId: p,
|
|
2149
|
-
onExpandedRowChange: g,
|
|
2150
|
-
onRowExpand: x,
|
|
2151
|
-
...k
|
|
2152
|
-
} = e, { t: b } = X(), [v, R] = D(/* @__PURE__ */ new Set()), [L, O] = D(null), [P, N] = D(null), [Q, xe] = D(null), [ce, ae] = D(null), [C, F] = D(!1), [K, Ne] = D(/* @__PURE__ */ new Set()), [et, fe] = D([]), pe = H(null), oe = H(null), he = H(/* @__PURE__ */ new Map()), ee = typeof p < "u", te = m && !ee, V = ee ? p ?? null : L, Ot = z(() => !t?.length, [t]), Y = z(
|
|
2153
|
-
() => t?.filter((f) => v.has(f.id)) ?? [],
|
|
2154
|
-
[t, v]
|
|
2155
|
-
), me = T(
|
|
2156
|
-
(f) => f === null ? null : t.find((w) => w.id === f) ?? null,
|
|
2157
|
-
[t]
|
|
2158
|
-
), Ae = T(() => {
|
|
2159
|
-
oe.current && (clearTimeout(oe.current), oe.current = null);
|
|
2160
|
-
}, []), Z = T(
|
|
2161
|
-
(f) => {
|
|
2162
|
-
if (typeof f < "u") {
|
|
2163
|
-
const w = he.current.get(f);
|
|
2164
|
-
if (!w) return;
|
|
2165
|
-
clearTimeout(w), he.current.delete(f);
|
|
2166
|
-
return;
|
|
2167
|
-
}
|
|
2168
|
-
he.current.forEach(
|
|
2169
|
-
(w) => clearTimeout(w)
|
|
2170
|
-
), he.current.clear();
|
|
2171
|
-
},
|
|
2172
|
-
[]
|
|
2173
|
-
), tt = T(
|
|
2174
|
-
(f) => {
|
|
2175
|
-
Z(f), fe((w) => w.some(
|
|
2176
|
-
(A) => A.rowId === f
|
|
2177
|
-
) ? w.map(
|
|
2178
|
-
(A) => A.rowId === f ? { ...A, isVisible: !1 } : A
|
|
2179
|
-
) : w), he.current.set(
|
|
2180
|
-
f,
|
|
2181
|
-
setTimeout(() => {
|
|
2182
|
-
fe(
|
|
2183
|
-
(w) => w.filter((y) => y.rowId !== f)
|
|
2184
|
-
), he.current.delete(f);
|
|
2185
|
-
}, Ve)
|
|
2186
|
-
);
|
|
2187
|
-
},
|
|
2188
|
-
[Z]
|
|
2189
|
-
), nt = T(
|
|
2190
|
-
(f, w) => {
|
|
2191
|
-
Z(f), fe((y) => y.some(
|
|
2192
|
-
(I) => I.rowId === f
|
|
2193
|
-
) ? y.map(
|
|
2194
|
-
(I) => I.rowId === f ? { ...I, content: w, isVisible: !1 } : I
|
|
2195
|
-
) : [...y, { rowId: f, content: w, isVisible: !1 }]), requestAnimationFrame(() => {
|
|
2196
|
-
fe(
|
|
2197
|
-
(y) => y.map(
|
|
2198
|
-
(A) => A.rowId === f ? { ...A, isVisible: !0 } : A
|
|
2199
|
-
)
|
|
2200
|
-
);
|
|
2201
|
-
});
|
|
2202
|
-
},
|
|
2203
|
-
[Z]
|
|
2204
|
-
);
|
|
2205
|
-
j(() => {
|
|
2206
|
-
if (!t?.length) {
|
|
2207
|
-
R(/* @__PURE__ */ new Set());
|
|
2208
|
-
return;
|
|
2209
|
-
}
|
|
2210
|
-
R((f) => {
|
|
2211
|
-
const w = /* @__PURE__ */ new Set(), y = new Set(t.map((A) => A.id));
|
|
2212
|
-
return f.forEach((A) => {
|
|
2213
|
-
y.has(A) && w.add(A);
|
|
2214
|
-
}), w;
|
|
2215
|
-
});
|
|
2216
|
-
}, [t]), j(() => {
|
|
2217
|
-
if (!te) return;
|
|
2218
|
-
const f = new Set(t.map((w) => w.id));
|
|
2219
|
-
Ne((w) => {
|
|
2220
|
-
const y = /* @__PURE__ */ new Set();
|
|
2221
|
-
return w.forEach((A) => {
|
|
2222
|
-
if (f.has(A)) {
|
|
2223
|
-
y.add(A);
|
|
2224
|
-
return;
|
|
2225
|
-
}
|
|
2226
|
-
Z(A);
|
|
2227
|
-
}), y;
|
|
2228
|
-
}), fe((w) => (w.forEach((y) => {
|
|
2229
|
-
f.has(y.rowId) || Z(y.rowId);
|
|
2230
|
-
}), w.filter(
|
|
2231
|
-
(y) => f.has(y.rowId)
|
|
2232
|
-
)));
|
|
2233
|
-
}, [t, te, Z]), j(() => {
|
|
2234
|
-
if (te) return;
|
|
2235
|
-
if (V === null) {
|
|
2236
|
-
N(null), ee && (pe.current = null);
|
|
2237
|
-
return;
|
|
2238
|
-
}
|
|
2239
|
-
me(V) || (ee || O(null), N(null), ee && (pe.current = null));
|
|
2240
|
-
}, [
|
|
2241
|
-
t,
|
|
2242
|
-
V,
|
|
2243
|
-
me,
|
|
2244
|
-
ee,
|
|
2245
|
-
te
|
|
2246
|
-
]), j(() => {
|
|
2247
|
-
if (!te) {
|
|
2248
|
-
if (Ae(), V === null || P === null) {
|
|
2249
|
-
if (Q === null) {
|
|
2250
|
-
F(!1), ae(null);
|
|
2251
|
-
return;
|
|
2252
|
-
}
|
|
2253
|
-
F(!1), oe.current = setTimeout(() => {
|
|
2254
|
-
xe(null), ae(null), oe.current = null;
|
|
2255
|
-
}, Ve);
|
|
2256
|
-
return;
|
|
2257
|
-
}
|
|
2258
|
-
if (Q === null) {
|
|
2259
|
-
xe(V), ae(P), requestAnimationFrame(() => F(!0));
|
|
2260
|
-
return;
|
|
2261
|
-
}
|
|
2262
|
-
if (Q === V) {
|
|
2263
|
-
ae(P), requestAnimationFrame(() => F(!0));
|
|
2264
|
-
return;
|
|
2265
|
-
}
|
|
2266
|
-
F(!1), oe.current = setTimeout(() => {
|
|
2267
|
-
xe(V), ae(P), requestAnimationFrame(() => F(!0)), oe.current = null;
|
|
2268
|
-
}, Ve);
|
|
2269
|
-
}
|
|
2270
|
-
}, [
|
|
2271
|
-
Ae,
|
|
2272
|
-
P,
|
|
2273
|
-
V,
|
|
2274
|
-
te,
|
|
2275
|
-
Q
|
|
2276
|
-
]), j(
|
|
2277
|
-
() => () => {
|
|
2278
|
-
Ae(), Z();
|
|
2279
|
-
},
|
|
2280
|
-
[Ae, Z]
|
|
2281
|
-
), j(() => {
|
|
2282
|
-
if (!ee) return;
|
|
2283
|
-
if (V === null) {
|
|
2284
|
-
N(null), pe.current = null;
|
|
2285
|
-
return;
|
|
2286
|
-
}
|
|
2287
|
-
const f = me(V);
|
|
2288
|
-
if (!f) {
|
|
2289
|
-
N(null), pe.current = null;
|
|
2290
|
-
return;
|
|
2291
|
-
}
|
|
2292
|
-
const w = pe.current;
|
|
2293
|
-
N(x?.(f, w) ?? null), pe.current = f;
|
|
2294
|
-
}, [V, me, ee, x]);
|
|
2295
|
-
const Pt = T(
|
|
2296
|
-
(f) => {
|
|
2297
|
-
R((w) => {
|
|
2298
|
-
const y = new Set(w);
|
|
2299
|
-
return y.has(f.id) ? (y.delete(f.id), u?.(f, !1)) : (y.add(f.id), u?.(f, !0)), y;
|
|
2300
|
-
});
|
|
2301
|
-
},
|
|
2302
|
-
[u]
|
|
2303
|
-
), Ft = T(
|
|
2304
|
-
(f) => {
|
|
2305
|
-
if (te) {
|
|
2306
|
-
if (K.has(f.id)) {
|
|
2307
|
-
Ne((_) => {
|
|
2308
|
-
const J = new Set(_);
|
|
2309
|
-
return J.delete(f.id), J;
|
|
2310
|
-
}), tt(f.id), g?.(null, f);
|
|
2311
|
-
return;
|
|
2312
|
-
}
|
|
2313
|
-
Ne((_) => {
|
|
2314
|
-
const J = new Set(_);
|
|
2315
|
-
return J.add(f.id), J;
|
|
2316
|
-
});
|
|
2317
|
-
const I = x?.(f, null) ?? null;
|
|
2318
|
-
I !== null && typeof I < "u" ? nt(f.id, I) : (Z(f.id), fe(
|
|
2319
|
-
(_) => _.filter((J) => J.rowId !== f.id)
|
|
2320
|
-
)), g?.(f, null);
|
|
2321
|
-
return;
|
|
2322
|
-
}
|
|
2323
|
-
const w = V === f.id, y = w ? f : me(V);
|
|
2324
|
-
if (ee) {
|
|
2325
|
-
g?.(w ? null : f, y);
|
|
2326
|
-
return;
|
|
2327
|
-
}
|
|
2328
|
-
if (w) {
|
|
2329
|
-
O(null), N(null), g?.(null, f);
|
|
2330
|
-
return;
|
|
2331
|
-
}
|
|
2332
|
-
O(f.id), N(x?.(f, y) ?? null), g?.(f, y);
|
|
2333
|
-
},
|
|
2334
|
-
[
|
|
2335
|
-
V,
|
|
2336
|
-
tt,
|
|
2337
|
-
Z,
|
|
2338
|
-
nt,
|
|
2339
|
-
me,
|
|
2340
|
-
K,
|
|
2341
|
-
ee,
|
|
2342
|
-
te,
|
|
2343
|
-
g,
|
|
2344
|
-
x
|
|
2345
|
-
]
|
|
2346
|
-
), Lt = T(() => {
|
|
2347
|
-
R((f) => {
|
|
2348
|
-
const w = new Set(f), y = t ?? [], A = y.every(
|
|
2349
|
-
(I) => w.has(I.id)
|
|
2350
|
-
);
|
|
2351
|
-
return y.forEach((I) => {
|
|
2352
|
-
const _ = w.has(I.id);
|
|
2353
|
-
A ? _ && (w.delete(I.id), u?.(I, !1)) : _ || (w.add(I.id), u?.(I, !0));
|
|
2354
|
-
}), w;
|
|
2355
|
-
});
|
|
2356
|
-
}, [t, u]), Mt = z(() => {
|
|
2357
|
-
if (!t?.length)
|
|
2358
|
-
return { allSelected: !1, hasSomeSelected: !1 };
|
|
2359
|
-
const f = t.every((y) => v.has(y.id)), w = t.some((y) => v.has(y.id));
|
|
2360
|
-
return { allSelected: f, hasSomeSelected: w };
|
|
2361
|
-
}, [t, v]);
|
|
2362
|
-
j(() => {
|
|
2363
|
-
h && h(Y);
|
|
2364
|
-
}, [Y, h]);
|
|
2365
|
-
const rt = z(() => !s || !Y.length ? [] : Y.reduce(
|
|
2366
|
-
(f, w, y) => {
|
|
2367
|
-
const A = s(w).filter(
|
|
2368
|
-
(_) => _.multiple && !_.hidden
|
|
2369
|
-
);
|
|
2370
|
-
if (y === 0) return A;
|
|
2371
|
-
const I = new Map(
|
|
2372
|
-
f.map((_) => [_.id, _])
|
|
2373
|
-
);
|
|
2374
|
-
return A.reduce((_, J) => {
|
|
2375
|
-
const Be = I.get(J.id);
|
|
2376
|
-
return Be && _.push({
|
|
2377
|
-
...Be,
|
|
2378
|
-
...J,
|
|
2379
|
-
disabled: J.disabled || Be.disabled
|
|
2380
|
-
}), _;
|
|
2381
|
-
}, []);
|
|
2382
|
-
},
|
|
2383
|
-
[]
|
|
2384
|
-
), [s, Y]), It = T(
|
|
2385
|
-
(f) => {
|
|
2386
|
-
if (Y.length) {
|
|
2387
|
-
if (f.onMultipleClick) {
|
|
2388
|
-
f.onMultipleClick(Y);
|
|
2389
|
-
return;
|
|
2390
|
-
}
|
|
2391
|
-
Y.forEach((w) => f.onClick(w));
|
|
2392
|
-
}
|
|
2393
|
-
},
|
|
2394
|
-
[Y]
|
|
2395
|
-
), Dt = z(() => te ? et : Q === null || ce === null || typeof ce > "u" ? [] : [
|
|
2396
|
-
{
|
|
2397
|
-
rowId: Q,
|
|
2398
|
-
content: ce,
|
|
2399
|
-
isVisible: C
|
|
2400
|
-
}
|
|
2401
|
-
], [
|
|
2402
|
-
C,
|
|
2403
|
-
te,
|
|
2404
|
-
ce,
|
|
2405
|
-
Q,
|
|
2406
|
-
et
|
|
2407
|
-
]);
|
|
2408
|
-
return /* @__PURE__ */ i(Bn, { children: /* @__PURE__ */ S("div", { className: `${l} table-main`, children: [
|
|
2409
|
-
/* @__PURE__ */ i(ir, { columns: o, isLoading: a, ...k }),
|
|
2410
|
-
a ? /* @__PURE__ */ i(Pn, { className: "table-loading" }) : /* @__PURE__ */ i(Se, { children: Ot ? /* @__PURE__ */ i(sr, {}) : /* @__PURE__ */ S(Se, { children: [
|
|
2411
|
-
!!Y.length && /* @__PURE__ */ S("div", { className: "table-selection-bar", children: [
|
|
2412
|
-
/* @__PURE__ */ i("p", { className: "table-selection-bar-count", children: b("_accessibility:components.table.selectedCount", {
|
|
2413
|
-
count: Y.length
|
|
2414
|
-
}) }),
|
|
2415
|
-
rt.length > 0 && /* @__PURE__ */ i("div", { className: "table-selection-bar-actions", children: rt.map((f) => /* @__PURE__ */ i(Tt, { content: f.tooltip, children: /* @__PURE__ */ i(
|
|
2416
|
-
de,
|
|
2417
|
-
{
|
|
2418
|
-
icon: f.icon,
|
|
2419
|
-
className: "multi-table-action",
|
|
2420
|
-
onClick: () => It(f),
|
|
2421
|
-
disabled: f.disabled
|
|
2422
|
-
}
|
|
2423
|
-
) }, f.id)) })
|
|
2424
|
-
] }),
|
|
2425
|
-
/* @__PURE__ */ i("div", { className: `${c} table-body`, children: /* @__PURE__ */ S("table", { className: "table-content", children: [
|
|
2426
|
-
/* @__PURE__ */ i(
|
|
2427
|
-
jn,
|
|
2428
|
-
{
|
|
2429
|
-
entity: n,
|
|
2430
|
-
columns: o,
|
|
2431
|
-
onSortCallback: r,
|
|
2432
|
-
hasAction: !!s,
|
|
2433
|
-
selectionState: Mt,
|
|
2434
|
-
onToggleAllRows: Lt
|
|
2435
|
-
}
|
|
2436
|
-
),
|
|
2437
|
-
/* @__PURE__ */ i("tbody", { children: /* @__PURE__ */ i(
|
|
2438
|
-
ar,
|
|
2439
|
-
{
|
|
2440
|
-
data: t,
|
|
2441
|
-
actions: s,
|
|
2442
|
-
columns: o,
|
|
2443
|
-
softDeleteProperty: d,
|
|
2444
|
-
selectedRows: v,
|
|
2445
|
-
expandedRows: Dt,
|
|
2446
|
-
onRowSelectionChange: Pt,
|
|
2447
|
-
onRowExpand: x ? Ft : void 0
|
|
2448
|
-
}
|
|
2449
|
-
) })
|
|
2450
|
-
] }) }),
|
|
2451
|
-
/* @__PURE__ */ i(nr, {})
|
|
2452
|
-
] }) })
|
|
2453
|
-
] }) });
|
|
2454
|
-
}
|
|
2455
|
-
function Tt(e) {
|
|
2456
|
-
const { content: t, children: r, className: n = "" } = e;
|
|
2457
|
-
return /* @__PURE__ */ S("div", { className: `tooltip-container ${n}`, children: [
|
|
2458
|
-
r,
|
|
2459
|
-
/* @__PURE__ */ i("div", { className: "tooltip-text", children: t })
|
|
2460
|
-
] });
|
|
2461
|
-
}
|
|
2462
|
-
export {
|
|
2463
|
-
Un as ActiveFilters,
|
|
2464
|
-
Vn as ArrayChip,
|
|
2465
|
-
Tn as AutocompleteInput,
|
|
2466
|
-
Bt as Badge,
|
|
2467
|
-
Wt as Button,
|
|
2468
|
-
On as CheckInput,
|
|
2469
|
-
Fn as ChevronDown,
|
|
2470
|
-
Ln as ChevronLeft,
|
|
2471
|
-
Mn as ChevronRight,
|
|
2472
|
-
In as ChevronUp,
|
|
2473
|
-
ue as Chip,
|
|
2474
|
-
Qe as Close,
|
|
2475
|
-
jn as Columns,
|
|
2476
|
-
Xn as CountOfTotal,
|
|
2477
|
-
ur as Dropdown,
|
|
2478
|
-
Dn as File,
|
|
2479
|
-
dr as FileInput,
|
|
2480
|
-
Jn as FilterDropdown,
|
|
2481
|
-
le as FilterTypes,
|
|
2482
|
-
zn as Filters,
|
|
2483
|
-
q as FiltersActions,
|
|
2484
|
-
Bn as FiltersProvider,
|
|
2485
|
-
nr as Footer,
|
|
2486
|
-
de as IconButton,
|
|
2487
|
-
Pn as Loading,
|
|
2488
|
-
er as Navigation,
|
|
2489
|
-
tr as PageSize,
|
|
2490
|
-
Gn as RangeChip,
|
|
2491
|
-
ar as Rows,
|
|
2492
|
-
Xe as SelectInput,
|
|
2493
|
-
be as SortOrder,
|
|
2494
|
-
Je as State,
|
|
2495
|
-
hr as Table,
|
|
2496
|
-
sr as TableEmpty,
|
|
2497
|
-
ir as TableHeader,
|
|
2498
|
-
fr as TableOptionsProvider,
|
|
2499
|
-
Ie as TextInput,
|
|
2500
|
-
Tt as Tooltip,
|
|
2501
|
-
pr as TranslationProvider,
|
|
2502
|
-
_n as filtersReducer,
|
|
2503
|
-
$t as helperTextStateClassName,
|
|
2504
|
-
pt as initializer,
|
|
2505
|
-
St as inputStateClassName,
|
|
2506
|
-
Rt as labelStateClassName,
|
|
2507
|
-
Zn as renderFilterComponent,
|
|
2508
|
-
Ce as useFilters,
|
|
2509
|
-
se as useTableOptions,
|
|
2510
|
-
X as useTranslation
|
|
2511
|
-
};
|