@sito/dashboard 0.0.64 → 0.0.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dashboard.js CHANGED
@@ -1,1261 +1,346 @@
1
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) => {
2
+ import { jsx as t, jsxs as g, Fragment as ee } from "react/jsx-runtime";
3
+ import { useRef as B, useCallback as C, useEffect as I, forwardRef as te, useState as T, useMemo as A, useLayoutEffect as ve, useReducer as we, createContext as re, useContext as ae, Fragment as xe, useId as ye, isValidElement as Se, cloneElement as $e } from "react";
4
+ const Ee = (e) => {
5
+ const { count: l, className: r = "" } = e;
6
+ return /* @__PURE__ */ t("span", { className: `${r} badge-main`, children: l });
7
+ }, Re = (e) => {
10
8
  const {
11
- children: t,
9
+ children: l,
12
10
  type: r = "button",
13
11
  variant: n = "text",
14
- color: a = "default",
15
- className: s = "",
16
- ...o
12
+ color: s = "default",
13
+ className: a = "",
14
+ ...u
17
15
  } = e;
18
- return /* @__PURE__ */ i(
16
+ return /* @__PURE__ */ t(
19
17
  "button",
20
18
  {
21
19
  type: r,
22
- className: `button ${n} ${a} ${s}`,
23
- ...o,
24
- children: t
20
+ className: `button ${n} ${s} ${a}`,
21
+ ...u,
22
+ children: l
25
23
  }
26
24
  );
27
25
  };
28
- function ue(e) {
26
+ function G(e) {
29
27
  const {
30
- text: t,
28
+ text: l,
31
29
  onDelete: r,
32
30
  children: n,
33
- icon: a,
34
- variant: s = "default",
35
- iconClassName: o = "",
36
- className: c = "",
37
- textClassName: l = ""
31
+ icon: s,
32
+ variant: a = "default",
33
+ iconClassName: u = "",
34
+ className: o = "",
35
+ textClassName: c = ""
38
36
  } = 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
- ] });
37
+ return /* @__PURE__ */ g(
38
+ "div",
39
+ {
40
+ className: `chip-main ${a} ${r ? "deletable" : ""} ${o}`,
41
+ children: [
42
+ /* @__PURE__ */ t("span", { className: c, children: l }),
43
+ n,
44
+ r ? /* @__PURE__ */ t(
45
+ q,
46
+ {
47
+ icon: s ?? /* @__PURE__ */ t(ce, {}),
48
+ className: `chip-delete-button ${u}`,
49
+ onClick: r
50
+ }
51
+ ) : null
52
+ ]
53
+ }
54
+ );
51
55
  }
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();
56
+ const pt = (e) => {
57
+ const { children: l, open: r, onClose: n } = e, s = B(null), a = C(
58
+ (o) => {
59
+ const c = s.current;
60
+ !r || !c || c.contains(o.target) || n();
57
61
  },
58
62
  [r, n]
59
- ), o = T(
60
- (c) => {
61
- r && c.key === "Escape" && n();
63
+ ), u = C(
64
+ (o) => {
65
+ r && o.key === "Escape" && n();
62
66
  },
63
67
  [r, n]
64
68
  );
65
- return j(() => {
69
+ return I(() => {
66
70
  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);
71
+ return setTimeout(() => s.current?.focus(), 0), document.addEventListener("mousedown", a), document.addEventListener("keydown", u), () => {
72
+ document.removeEventListener("mousedown", a), document.removeEventListener("keydown", u);
69
73
  };
70
- }, [r, s, o]), /* @__PURE__ */ i(
74
+ }, [r, a, u]), /* @__PURE__ */ t(
71
75
  "div",
72
76
  {
73
- ref: a,
77
+ ref: s,
74
78
  role: "menu",
75
79
  "aria-hidden": !r,
76
80
  tabIndex: -1,
77
81
  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);
82
+ onClick: (o) => o.stopPropagation(),
83
+ children: l
672
84
  }
673
85
  );
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) {
86
+ }, ke = te(function(e, l) {
994
87
  const {
995
88
  state: r,
996
89
  value: n,
997
- onChange: a,
998
- options: s = [],
999
- name: o = "",
1000
- id: c = "",
1001
- label: l = "",
90
+ onChange: s,
91
+ options: a = [],
92
+ name: u = "",
93
+ id: o = "",
94
+ label: c = "",
1002
95
  containerClassName: d = "",
1003
- inputContainerClassName: u = "",
96
+ inputContainerClassName: p = "",
1004
97
  helperText: h = "",
1005
98
  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 ?? ""));
99
+ multiple: i = !1,
100
+ ...v
101
+ } = e, [S, $] = T("");
102
+ I(() => {
103
+ if (!i && n && !Array.isArray(n)) {
104
+ $(String(n.value ?? n.name ?? ""));
1012
105
  return;
1013
106
  }
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);
107
+ $("");
108
+ }, [i, n]);
109
+ const [w, L] = T(!1), E = A(
110
+ () => a.filter((b) => {
111
+ const M = String(b.value ?? b.name).toLowerCase().includes(S?.toLowerCase());
112
+ return Array.isArray(n) && n.length ? M && !n.some((W) => W.id === b.id) : n && !Array.isArray(n) ? M && n.id !== b.id : M;
113
+ }),
114
+ [a, n, S]
115
+ ), N = B(null), y = B(null), [P, R] = T(!1), O = B(null);
116
+ I(() => {
117
+ const b = (W) => {
118
+ N.current && !N.current.contains(W.target) && L(!1);
119
+ }, M = (W) => {
120
+ W.key === "Escape" && L(!1);
1025
121
  };
1026
- return document.addEventListener("mousedown", C), document.addEventListener("keydown", F), () => {
1027
- document.removeEventListener("mousedown", C), document.removeEventListener("keydown", F);
122
+ return document.addEventListener("mousedown", b), document.addEventListener("keydown", M), () => {
123
+ document.removeEventListener("mousedown", b), document.removeEventListener("keydown", M);
1028
124
  };
1029
125
  }, []);
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);
126
+ const F = C((b) => {
127
+ $(b.target.value);
128
+ }, []), j = C(
129
+ (b) => {
130
+ b ? i ? ($(""), Array.isArray(n) && n.length ? s([...n, b]) : s([b])) : ($(String(b.name ?? b.value ?? "")), s(b)) : s(null), L(!1);
1035
131
  },
1036
- [p, a, n]
1037
- ), ae = T(
1038
- (C) => {
132
+ [i, s, n]
133
+ ), z = C(
134
+ (b) => {
1039
135
  if (!Array.isArray(n)) {
1040
- a(null);
136
+ s(null);
1041
137
  return;
1042
138
  }
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);
139
+ const M = n.filter((W, f) => f !== b);
140
+ M.length ? s(M) : s(null);
1052
141
  },
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(
142
+ [s, n]
143
+ ), J = C(() => {
144
+ Array.isArray(n) && s([n[0]]);
145
+ }, [s, n]);
146
+ return ve(() => {
147
+ const b = O.current?.offsetWidth ?? 0, M = N.current?.offsetWidth ?? 0;
148
+ R(b > M * 0.4);
149
+ }, [n]), /* @__PURE__ */ g(
1059
150
  "div",
1060
151
  {
1061
152
  className: `autocomplete-input-container ${d}`,
1062
- ref: L,
153
+ ref: N,
1063
154
  children: [
1064
- /* @__PURE__ */ S("div", { className: "autocomplete-value-input-container", children: [
1065
- /* @__PURE__ */ i(
1066
- Ie,
155
+ /* @__PURE__ */ g("div", { className: "autocomplete-value-input-container", children: [
156
+ /* @__PURE__ */ t(
157
+ ne,
1067
158
  {
1068
159
  state: r,
1069
- name: o,
1070
- id: c,
1071
- value: x,
1072
- onChange: xe,
160
+ name: u,
161
+ id: o,
162
+ value: S,
163
+ onChange: F,
1073
164
  placeholder: m,
1074
165
  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,
166
+ onFocus: () => L(!0),
167
+ label: c,
168
+ containerClassName: `autocomplete-text-input ${p}`,
169
+ ref: l ?? y,
170
+ ...v,
171
+ children: !i && n && !Array.isArray(n) && (n.value || n.name) && /* @__PURE__ */ t(
172
+ q,
1082
173
  {
1083
- icon: /* @__PURE__ */ i(Qe, {}),
174
+ icon: /* @__PURE__ */ t(ce, {}),
1084
175
  className: "autocomplete-delete-button",
1085
- onClick: (C) => {
1086
- ce(), C.stopPropagation();
176
+ onClick: (b) => {
177
+ j(), b.stopPropagation();
1087
178
  }
1088
179
  }
1089
180
  )
1090
181
  }
1091
182
  ),
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,
183
+ i && Array.isArray(n) && n.length ? /* @__PURE__ */ t("ul", { ref: O, className: "autocomplete-value-container", children: P ? /* @__PURE__ */ g(ee, { children: [
184
+ /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
185
+ G,
1095
186
  {
1096
187
  text: n[0]?.value ?? n[0]?.name,
1097
- onDelete: (C) => {
1098
- ae(0), C.stopPropagation();
188
+ onDelete: (b) => {
189
+ z(0), b.stopPropagation();
1099
190
  }
1100
191
  }
1101
192
  ) }),
1102
- n.length > 1 && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1103
- ue,
193
+ n.length > 1 && /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
194
+ G,
1104
195
  {
1105
196
  text: `+${n.length - 1}`,
1106
- onDelete: (C) => {
1107
- ae(-1), C.stopPropagation();
197
+ onDelete: (b) => {
198
+ J(), b.stopPropagation();
1108
199
  }
1109
200
  }
1110
201
  ) })
1111
- ] }) : n.map((C, F) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1112
- ue,
202
+ ] }) : n.map((b, M) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
203
+ G,
1113
204
  {
1114
- text: String(C.value ?? C.name),
1115
- onDelete: (K) => {
1116
- ae(F), K.stopPropagation();
205
+ text: String(b.value ?? b.name),
206
+ onDelete: (W) => {
207
+ z(M), W.stopPropagation();
1117
208
  }
1118
209
  }
1119
- ) }, C.id ?? C.value ?? C.name)) }) : null
210
+ ) }, b.id ?? b.value ?? b.name)) }) : null
1120
211
  ] }),
1121
- b && /* @__PURE__ */ i(
212
+ w && /* @__PURE__ */ t(
1122
213
  "ul",
1123
214
  {
1124
- className: `autocomplete-suggestions-container ${An({ width: L.current?.offsetWidth })}`,
1125
- children: R.map((C) => /* @__PURE__ */ i(
215
+ className: "autocomplete-suggestions-container",
216
+ style: { width: N.current?.offsetWidth },
217
+ children: E.map((b) => /* @__PURE__ */ t(
1126
218
  "li",
1127
219
  {
1128
220
  className: "autocomplete-suggestion-item",
1129
- onClick: (F) => {
1130
- ce(C), F.stopPropagation();
221
+ onClick: (M) => {
222
+ j(b), M.stopPropagation();
1131
223
  },
1132
- children: C.value ?? C.name
224
+ children: b.value ?? b.name
1133
225
  },
1134
- C.id ?? C.value ?? C.name
226
+ b.id ?? b.value ?? b.name
1135
227
  ))
1136
228
  }
1137
229
  )
1138
230
  ]
1139
231
  }
1140
232
  );
1141
- }), On = Ee(function(e, t) {
233
+ }), Ae = te(function(e, l) {
1142
234
  const {
1143
235
  checked: r,
1144
236
  onChange: n,
1145
- name: a = "",
1146
- id: s = "",
1147
- label: o = "",
1148
- containerClassName: c = "",
1149
- inputClassName: l = "",
237
+ name: s = "",
238
+ id: a = "",
239
+ label: u = "",
240
+ containerClassName: o = "",
241
+ inputClassName: c = "",
1150
242
  labelClassName: d = "",
1151
- ...u
243
+ ...p
1152
244
  } = e;
1153
- return /* @__PURE__ */ S("label", { className: `input-check-container ${c}`, children: [
1154
- /* @__PURE__ */ i(
245
+ return /* @__PURE__ */ g("label", { className: `input-check-container ${o}`, children: [
246
+ /* @__PURE__ */ t(
1155
247
  "input",
1156
248
  {
1157
- id: s,
1158
- ref: t,
1159
- name: a,
249
+ id: a,
250
+ ref: l,
251
+ name: s,
1160
252
  type: "checkbox",
1161
253
  checked: r,
1162
254
  onChange: n,
1163
- className: `input-check ${l}`,
1164
- ...u
255
+ className: `input-check ${c}`,
256
+ ...p
1165
257
  }
1166
258
  ),
1167
- /* @__PURE__ */ i("span", { className: `input-check-label ${d}`, children: o })
259
+ /* @__PURE__ */ t("span", { className: `input-check-label ${d}`, children: u })
1168
260
  ] });
1169
261
  });
1170
- function ft(e, t = 25) {
1171
- if (e.length <= t) return e;
262
+ function de(e, l = 25) {
263
+ if (e.length <= l) return e;
1172
264
  const r = e.lastIndexOf(".");
1173
265
  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;
266
+ return e.slice(0, l - 3) + "...";
267
+ const n = e.slice(0, r), s = e.slice(r), a = l - s.length - 3;
268
+ return n.slice(0, a) + "..." + s;
1177
269
  }
1178
- const dr = Ee(function(e, t) {
270
+ const ht = te(function(e, l) {
1179
271
  const {
1180
272
  children: r,
1181
273
  label: n,
1182
- containerClassName: a = "",
1183
- inputClassName: s = "",
1184
- labelClassName: o = "",
1185
- helperText: c = "",
1186
- helperTextClassName: l = "",
274
+ containerClassName: s = "",
275
+ inputClassName: a = "",
276
+ labelClassName: u = "",
277
+ helperText: o = "",
278
+ helperTextClassName: c = "",
1187
279
  iconClassName: d = "",
1188
- multiple: u = !1,
280
+ multiple: p = !1,
1189
281
  onChange: h,
1190
282
  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: [
283
+ ...i
284
+ } = e, [v, S] = T([]), $ = C(
285
+ (N) => {
286
+ if (N.target.files) {
287
+ const y = Array.from(N.target.files);
288
+ S((P) => [...P, ...y]);
289
+ }
290
+ h?.(N);
291
+ },
292
+ [h]
293
+ ), w = C(
294
+ (N) => {
295
+ S((y) => {
296
+ const P = y.filter((R, O) => O !== N);
297
+ return P.length === 0 && m?.(), P;
298
+ });
299
+ },
300
+ [m]
301
+ ), L = C(() => {
302
+ S([]), m?.();
303
+ }, [m]), E = C(
304
+ (N) => {
305
+ N.currentTarget.value = "";
306
+ },
307
+ []
308
+ );
309
+ return /* @__PURE__ */ g("div", { className: `file-input-container ${s}`, children: [
310
+ v.length === 0 && /* @__PURE__ */ g("label", { htmlFor: i.name, className: `${u}`, children: [
1206
311
  n,
1207
- /* @__PURE__ */ i(
312
+ /* @__PURE__ */ t(
1208
313
  "input",
1209
314
  {
1210
315
  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
316
+ ref: l,
317
+ multiple: p,
318
+ onClick: E,
319
+ onChange: $,
320
+ className: `file-input ${a}`,
321
+ ...i
1219
322
  }
1220
323
  ),
1221
- p.required ? " *" : ""
324
+ i.required ? " *" : ""
1222
325
  ] }),
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,
326
+ v.length > 1 && /* @__PURE__ */ t("ul", { className: "file-preview-list", children: v.map((N, y) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(le, { content: N.name, children: /* @__PURE__ */ t(
327
+ G,
1225
328
  {
1226
- text: ft(v.name, 25),
1227
- onDelete: () => b(R)
329
+ text: de(N.name, 25),
330
+ onDelete: () => w(y)
1228
331
  }
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
- )
332
+ ) }) }, `${N.name}-${N.lastModified}`)) }),
333
+ v.length === 1 && /* @__PURE__ */ g("div", { className: "file-preview", children: [
334
+ /* @__PURE__ */ t(Me, { className: `file-icon ${d}` }),
335
+ /* @__PURE__ */ t(le, { content: v[0]?.name ?? "", children: /* @__PURE__ */ t("span", { className: "!cursor-default", children: de(v[0]?.name ?? "", 25) }) }),
336
+ /* @__PURE__ */ t(q, { icon: /* @__PURE__ */ t(ce, {}), onClick: L, type: "button" })
1252
337
  ] }),
1253
338
  r,
1254
- !!c && /* @__PURE__ */ i("p", { className: `file-input-helper-text ${l}`, children: c })
339
+ !!o && /* @__PURE__ */ t("p", { className: `file-input-helper-text ${c}`, children: o })
1255
340
  ] });
1256
341
  });
1257
- var Je = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(Je || {});
1258
- const St = (e) => {
342
+ var oe = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(oe || {});
343
+ const he = (e) => {
1259
344
  switch (e) {
1260
345
  case "error":
1261
346
  return "input-error";
@@ -1264,7 +349,7 @@ const St = (e) => {
1264
349
  default:
1265
350
  return "input-normal";
1266
351
  }
1267
- }, Rt = (e) => {
352
+ }, me = (e) => {
1268
353
  switch (e) {
1269
354
  case "error":
1270
355
  return "input-label-error";
@@ -1273,7 +358,7 @@ const St = (e) => {
1273
358
  default:
1274
359
  return "input-label-normal";
1275
360
  }
1276
- }, $t = (e) => {
361
+ }, fe = (e) => {
1277
362
  switch (e) {
1278
363
  case "error":
1279
364
  return "input-helper-text-error";
@@ -1282,463 +367,465 @@ const St = (e) => {
1282
367
  default:
1283
368
  return "input-helper-text-normal";
1284
369
  }
1285
- }, Xe = Ee(function(e, t) {
370
+ }, ie = te(function(e, l) {
1286
371
  const {
1287
372
  value: r,
1288
373
  onChange: n,
1289
- options: a,
1290
- containerClassName: s = "",
1291
- inputClassName: o = "",
1292
- labelClassName: c = "",
1293
- helperText: l = "",
374
+ options: s,
375
+ containerClassName: a = "",
376
+ inputClassName: u = "",
377
+ labelClassName: o = "",
378
+ helperText: c = "",
1294
379
  helperTextClassName: d = "",
1295
- placeholder: u = "",
1296
- label: h = "",
1297
- name: m = "",
1298
- id: p = "",
1299
- state: g = Je.default,
1300
- children: x,
1301
- ...k
380
+ label: p = "",
381
+ name: h = "",
382
+ id: m = "",
383
+ state: i = oe.default,
384
+ children: v,
385
+ ...S
1302
386
  } = e;
1303
- return /* @__PURE__ */ S("div", { className: `select-input-container ${s}`, children: [
1304
- /* @__PURE__ */ i(
387
+ return /* @__PURE__ */ g("div", { className: `select-input-container ${a}`, children: [
388
+ /* @__PURE__ */ t(
1305
389
  "select",
1306
390
  {
1307
- ...k,
1308
- id: p,
1309
- ref: t,
1310
- name: m,
391
+ ...S,
392
+ id: m,
393
+ ref: l,
394
+ name: h,
1311
395
  value: r,
1312
396
  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))
397
+ className: `select-input ${he(i)} peer ${u}`,
398
+ children: s?.map(($) => /* @__PURE__ */ t("option", { value: $.id, children: $.value ?? $.name ?? $.id }, $.id))
1315
399
  }
1316
400
  ),
1317
- /* @__PURE__ */ i(
401
+ /* @__PURE__ */ t(
1318
402
  "label",
1319
403
  {
1320
404
  htmlFor: m,
1321
- className: `select-input-label ${Rt(g)} ${c}`,
1322
- children: h
405
+ className: `select-input-label ${me(i)} ${o}`,
406
+ children: p
1323
407
  }
1324
408
  ),
1325
- x,
1326
- (u || l) && /* @__PURE__ */ i(
409
+ v,
410
+ c && /* @__PURE__ */ t(
1327
411
  "p",
1328
412
  {
1329
- className: `select-input-helper-text ${$t(g)} ${d}`,
1330
- children: g !== "error" && g !== "good" ? u : l
413
+ className: `select-input-helper-text ${fe(i)} ${d}`,
414
+ children: c
1331
415
  }
1332
416
  )
1333
417
  ] });
1334
- }), Ie = Ee(function(e, t) {
418
+ }), ne = te(function(e, l) {
1335
419
  const {
1336
420
  children: r,
1337
- state: n = Je.default,
1338
- label: a = "",
1339
- containerClassName: s = "",
1340
- inputClassName: o = "",
1341
- labelClassName: c = "",
1342
- helperText: l = "",
421
+ state: n = oe.default,
422
+ label: s = "",
423
+ containerClassName: a = "",
424
+ inputClassName: u = "",
425
+ labelClassName: o = "",
426
+ helperText: c = "",
1343
427
  helperTextClassName: d = "",
1344
- value: u = "",
428
+ value: p = "",
1345
429
  ...h
1346
430
  } = e;
1347
- return /* @__PURE__ */ S("div", { className: `text-input-container ${s}`, children: [
1348
- /* @__PURE__ */ i(
431
+ return /* @__PURE__ */ g("div", { className: `text-input-container ${a}`, children: [
432
+ /* @__PURE__ */ t(
1349
433
  "input",
1350
434
  {
1351
- ref: t,
1352
- value: u,
1353
- className: `text-input ${St(n)} peer ${o} ${u ? "has-value" : ""} ${h.placeholder ? "has-placeholder" : ""}`,
435
+ ref: l,
436
+ value: p,
437
+ className: `text-input ${he(n)} peer ${u} ${p ? "has-value" : ""} ${h.placeholder ? "has-placeholder" : ""}`,
1354
438
  ...h
1355
439
  }
1356
440
  ),
1357
- !!a && /* @__PURE__ */ S(
441
+ !!s && /* @__PURE__ */ g(
1358
442
  "label",
1359
443
  {
1360
- htmlFor: h.name,
1361
- className: `text-input-label ${Rt(n)} ${c}`,
444
+ htmlFor: h.id,
445
+ className: `text-input-label ${me(n)} ${o}`,
1362
446
  children: [
1363
- a,
447
+ s,
1364
448
  h.required ? " *" : ""
1365
449
  ]
1366
450
  }
1367
451
  ),
1368
452
  r,
1369
- !!l && /* @__PURE__ */ i(
453
+ !!c && /* @__PURE__ */ t(
1370
454
  "p",
1371
455
  {
1372
- className: `text-input-helper-text ${$t(n)} ${d}`,
1373
- children: l
456
+ className: `text-input-helper-text ${fe(n)} ${d}`,
457
+ children: c
1374
458
  }
1375
459
  )
1376
460
  ] });
1377
- }), de = (e) => {
461
+ }), q = (e) => {
1378
462
  const {
1379
- children: t,
463
+ children: l,
1380
464
  icon: r,
1381
465
  type: n = "button",
1382
- className: a = "",
1383
- variant: s = "text",
1384
- color: o = "default",
1385
- iconClassName: c = "",
1386
- ...l
466
+ className: s = "",
467
+ variant: a = "text",
468
+ color: u = "default",
469
+ iconClassName: o = "",
470
+ ...c
1387
471
  } = e;
1388
- return /* @__PURE__ */ S(
472
+ return /* @__PURE__ */ g(
1389
473
  "button",
1390
474
  {
1391
475
  type: n,
1392
- className: `icon-button ${a} ${s} ${o}`,
1393
- ...l,
476
+ className: `icon-button ${s} ${a} ${u}`,
477
+ ...c,
1394
478
  children: [
1395
- /* @__PURE__ */ i("span", { className: c, children: r }),
1396
- t
479
+ /* @__PURE__ */ t("span", { className: o, children: r }),
480
+ l
1397
481
  ]
1398
482
  }
1399
483
  );
1400
484
  };
1401
- function Pn(e) {
485
+ function Te(e) {
1402
486
  const {
1403
- color: t = "stroke-blue-800",
487
+ color: l = "stroke-blue-800",
1404
488
  className: r = "",
1405
489
  loaderClass: n = "",
1406
- strokeWidth: a = "4",
1407
- ...s
490
+ strokeWidth: s = "4",
491
+ ...a
1408
492
  } = 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(
493
+ return /* @__PURE__ */ t("div", { ...a, className: `loading ${r}`, children: /* @__PURE__ */ t("div", { className: "loader-container", children: /* @__PURE__ */ t("div", { className: `loader ${n}`, children: /* @__PURE__ */ t("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ t(
1410
494
  "circle",
1411
495
  {
1412
- className: `path ${t}`,
496
+ className: `path ${l}`,
1413
497
  cx: "50",
1414
498
  cy: "50",
1415
499
  r: "20",
1416
500
  fill: "none",
1417
- strokeWidth: a,
501
+ strokeWidth: s,
1418
502
  strokeMiterlimit: "10"
1419
503
  }
1420
504
  ) }) }) }) });
1421
505
  }
1422
- function Fn(e) {
1423
- const { className: t = "" } = e;
1424
- return /* @__PURE__ */ i(
506
+ function Fe(e) {
507
+ const { className: l = "" } = e;
508
+ return /* @__PURE__ */ t(
1425
509
  "svg",
1426
510
  {
1427
- className: t,
511
+ className: l,
1428
512
  xmlns: "http://www.w3.org/2000/svg",
1429
513
  viewBox: "0 0 512 512",
1430
514
  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" })
515
+ children: /* @__PURE__ */ t("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
516
  }
1433
517
  );
1434
518
  }
1435
- function Ln(e) {
1436
- const { className: t = "" } = e;
1437
- return /* @__PURE__ */ i(
519
+ function Le(e) {
520
+ const { className: l = "" } = e;
521
+ return /* @__PURE__ */ t(
1438
522
  "svg",
1439
523
  {
1440
- className: t,
524
+ className: l,
1441
525
  xmlns: "http://www.w3.org/2000/svg",
1442
526
  viewBox: "0 0 320 512",
1443
527
  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" })
528
+ children: /* @__PURE__ */ t("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
529
  }
1446
530
  );
1447
531
  }
1448
- function Mn(e) {
1449
- const { className: t = "" } = e;
1450
- return /* @__PURE__ */ i(
532
+ function Pe(e) {
533
+ const { className: l = "" } = e;
534
+ return /* @__PURE__ */ t(
1451
535
  "svg",
1452
536
  {
1453
- className: t,
537
+ className: l,
1454
538
  xmlns: "http://www.w3.org/2000/svg",
1455
539
  viewBox: "0 0 320 512",
1456
540
  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" })
541
+ children: /* @__PURE__ */ t("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
542
  }
1459
543
  );
1460
544
  }
1461
- function In(e) {
1462
- const { className: t = "" } = e;
1463
- return /* @__PURE__ */ i(
545
+ function Oe(e) {
546
+ const { className: l = "" } = e;
547
+ return /* @__PURE__ */ t(
1464
548
  "svg",
1465
549
  {
1466
- className: t,
550
+ className: l,
1467
551
  xmlns: "http://www.w3.org/2000/svg",
1468
552
  viewBox: "0 0 512 512",
1469
553
  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" })
554
+ children: /* @__PURE__ */ t("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
555
  }
1472
556
  );
1473
557
  }
1474
- function Qe(e) {
1475
- const { className: t = "" } = e;
1476
- return /* @__PURE__ */ i(
558
+ function ce(e) {
559
+ const { className: l = "" } = e;
560
+ return /* @__PURE__ */ t(
1477
561
  "svg",
1478
562
  {
1479
- className: t,
563
+ className: l,
1480
564
  xmlns: "http://www.w3.org/2000/svg",
1481
565
  viewBox: "0 0 384 512",
1482
566
  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" })
567
+ children: /* @__PURE__ */ t("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
568
  }
1485
569
  );
1486
570
  }
1487
- function Dn(e) {
1488
- const { className: t = "" } = e;
1489
- return /* @__PURE__ */ i(
571
+ function Me(e) {
572
+ const { className: l = "" } = e;
573
+ return /* @__PURE__ */ t(
1490
574
  "svg",
1491
575
  {
1492
- className: t,
576
+ className: l,
1493
577
  xmlns: "http://www.w3.org/2000/svg",
1494
578
  viewBox: "0 0 640 640",
1495
579
  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" })
580
+ children: /* @__PURE__ */ t("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
581
  }
1498
582
  );
1499
583
  }
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" }) });
584
+ const ze = (e) => {
585
+ const { className: l = "" } = e;
586
+ return /* @__PURE__ */ t("svg", { className: l, viewBox: "0 0 16 16", children: /* @__PURE__ */ t("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
587
  };
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) => {
588
+ var X = /* @__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))(X || {}), Q = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(Q || {}), _ = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(_ || {});
589
+ const ue = (e) => {
1506
590
  if (e) {
1507
- const t = {};
591
+ const l = {};
1508
592
  return Object.keys(e)?.forEach((n) => {
1509
- t[n] = { value: e[n] };
1510
- }), t;
593
+ l[n] = { value: e[n] };
594
+ }), l;
1511
595
  }
1512
596
  return {};
1513
597
  };
1514
- function _n(e, t) {
1515
- const { type: r } = t;
598
+ function De(e, l) {
599
+ const { type: r } = l;
1516
600
  switch (r) {
1517
- case q.reset:
601
+ case _.reset:
1518
602
  return {};
1519
- case q.update: {
1520
- const { toUpdate: n } = t;
603
+ case _.update: {
604
+ const { toUpdate: n } = l;
1521
605
  return { ...e, ...n };
1522
606
  }
1523
607
  default:
1524
608
  return e;
1525
609
  }
1526
610
  }
1527
- const Et = He({}), Bn = (e) => {
1528
- const { children: t } = e, { filters: r } = se(), [n, a] = zt(
1529
- _n,
1530
- pt(r)
611
+ const be = re({}), Ie = (e) => {
612
+ const { children: l } = e, { filters: r } = H(), [n, s] = we(
613
+ De,
614
+ ue(r)
1531
615
  );
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
616
+ I(() => {
617
+ s({ type: _.reset });
618
+ const u = ue(r);
619
+ Object.keys(u).length && s({
620
+ type: _.update,
621
+ toUpdate: u
1538
622
  });
1539
623
  }, [r]);
1540
- const s = {
624
+ const a = {
1541
625
  currentFilters: n,
1542
- setCurrentFilters: a
626
+ setCurrentFilters: s
1543
627
  };
1544
- return /* @__PURE__ */ i(Et.Provider, { value: s, children: t });
1545
- }, Ce = () => {
1546
- const e = qe(Et);
628
+ return /* @__PURE__ */ t(be.Provider, { value: a, children: l });
629
+ }, Y = () => {
630
+ const e = ae(be);
1547
631
  if (e === void 0)
1548
632
  throw new Error("tableOptionsContext must be used within a Provider");
1549
633
  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);
634
+ }, _e = [20, 50, 100], ge = re({}), mt = (e) => {
635
+ const { children: l } = e, [r, n] = T(0), [s, a] = T(20), [u, o] = T(0), [c, d] = T("id"), [p, h] = T(Q.DESC), [m, i] = T({}), v = C(
636
+ (E, N) => {
637
+ let y = p;
638
+ c === E && (p === Q.ASC ? y = Q.DESC : y = Q.ASC), d(E), h(y), N && N(E, y);
1555
639
  },
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),
640
+ [c, p]
641
+ ), S = C((E) => {
642
+ const N = Object.entries(E).reduce(
643
+ (y, [P, R]) => (R && typeof R.value < "u" && R.value !== null && (y[P] = R.value), y),
1560
644
  {}
1561
645
  );
1562
- p(L);
1563
- }, []), k = T(
1564
- (R) => {
1565
- R ? (delete m[R.toLowerCase()], p({ ...m })) : p({});
646
+ i(N);
647
+ }, []), $ = C(
648
+ (E) => {
649
+ E ? (delete m[E.toLowerCase()], i({ ...m })) : i({});
1566
650
  },
1567
651
  [m]
1568
- ), b = z(() => Object.keys(m).length, [m]), v = {
1569
- onSort: g,
652
+ ), w = A(() => Object.keys(m).length, [m]), L = {
653
+ onSort: v,
1570
654
  total: r,
1571
655
  setTotal: n,
1572
- sortingBy: l,
656
+ sortingBy: c,
1573
657
  setSortingBy: d,
1574
- sortingOrder: u,
658
+ sortingOrder: p,
1575
659
  setSortingOrder: h,
1576
- pageSize: a,
1577
- pageSizes: Wn,
1578
- setPageSize: s,
1579
- currentPage: o,
1580
- setCurrentPage: c,
660
+ pageSize: s,
661
+ pageSizes: _e,
662
+ setPageSize: a,
663
+ currentPage: u,
664
+ setCurrentPage: o,
1581
665
  filters: m,
1582
- onFilterApply: x,
1583
- clearFilters: k,
1584
- countOfFilters: b
666
+ onFilterApply: S,
667
+ clearFilters: $,
668
+ countOfFilters: w
1585
669
  };
1586
- return /* @__PURE__ */ i(kt.Provider, { value: v, children: t });
1587
- }, se = () => {
1588
- const e = qe(kt);
670
+ return /* @__PURE__ */ t(ge.Provider, { value: L, children: l });
671
+ }, H = () => {
672
+ const e = ae(ge);
1589
673
  if (e === void 0)
1590
674
  throw new Error("tableOptionsContext must be used within a Provider");
1591
675
  return e;
1592
- }, At = He(
676
+ }, Ne = re(
1593
677
  {}
1594
678
  );
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 });
679
+ function ft(e) {
680
+ const { children: l, t: r, language: n } = e;
681
+ return /* @__PURE__ */ t(Ne.Provider, { value: { t: r, language: n }, children: l });
1598
682
  }
1599
- const X = () => {
1600
- const e = qe(At);
683
+ const V = () => {
684
+ const e = ae(Ne);
1601
685
  if (e === void 0)
1602
686
  throw new Error("translationContext must be used within a Provider");
1603
687
  return e;
1604
688
  };
1605
- function jn(e) {
1606
- const { t } = X(), {
689
+ function Ce(e) {
690
+ return [...e].sort((l, r) => (r.pos ?? 0) - (l.pos ?? 0)).filter((l) => l.display !== "none");
691
+ }
692
+ function Be(e) {
693
+ const { t: l } = V(), {
1607
694
  entity: r = "",
1608
695
  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(
696
+ hasAction: s = !0,
697
+ onSortCallback: a,
698
+ selectionState: u,
699
+ onToggleAllRows: o
700
+ } = e, c = B(null);
701
+ I(() => {
702
+ c.current && (c.current.indeterminate = !!(u?.hasSomeSelected && !u?.allSelected));
703
+ }, [u]);
704
+ const { onSort: d, sortingOrder: p, sortingBy: h } = H(), m = A(() => Ce(n).map((i) => ({
705
+ id: i.key,
706
+ label: i.label,
707
+ className: i.className ?? "",
708
+ sortable: i.sortable ?? !0,
709
+ sortOptions: i.sortOptions
710
+ })), [n, r, l]);
711
+ return /* @__PURE__ */ t("thead", { className: "table-headers-row", children: /* @__PURE__ */ g("tr", { children: [
712
+ /* @__PURE__ */ t("th", { scope: "col", className: "table-headers-column table-headers-checkbox", children: o ? /* @__PURE__ */ t(
1626
713
  "input",
1627
714
  {
1628
715
  type: "checkbox",
1629
- ref: l,
1630
- checked: o?.allSelected ?? !1,
1631
- onChange: c,
1632
- "aria-label": t("_accessibility:components.table.selectAllRows")
716
+ ref: c,
717
+ checked: u?.allSelected ?? !1,
718
+ onChange: o,
719
+ "aria-label": l("_accessibility:components.table.selectAllRows")
1633
720
  }
1634
721
  ) : null }),
1635
- m.map((p) => /* @__PURE__ */ i(
722
+ m.map((i) => /* @__PURE__ */ t(
1636
723
  "th",
1637
724
  {
1638
725
  scope: "col",
1639
- className: `table-headers-column ${p.className}`,
1640
- children: /* @__PURE__ */ S(
1641
- Wt,
726
+ className: `table-headers-column ${i.className}`,
727
+ children: /* @__PURE__ */ g(
728
+ Re,
1642
729
  {
1643
- disabled: !p.sortable,
1644
- onClick: () => d(p.id, s),
730
+ disabled: !i.sortable,
731
+ onClick: () => d(i.id, a),
1645
732
  className: "table-headers-cell",
1646
733
  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,
734
+ /* @__PURE__ */ t("span", { className: "table-headers-label", children: i.label }),
735
+ i.sortable && h === i.id && /* @__PURE__ */ t("span", { children: p === Q.ASC ? i.sortOptions?.icons?.asc ?? /* @__PURE__ */ t(
736
+ Oe,
1650
737
  {
1651
- className: p.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
738
+ className: i.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
1652
739
  }
1653
- ) : p.sortOptions?.icons?.desc ?? /* @__PURE__ */ i(
1654
- Fn,
740
+ ) : i.sortOptions?.icons?.desc ?? /* @__PURE__ */ t(
741
+ Fe,
1655
742
  {
1656
- className: p.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
743
+ className: i.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
1657
744
  }
1658
745
  ) })
1659
746
  ]
1660
747
  }
1661
748
  )
1662
749
  },
1663
- p.id
750
+ i.id
1664
751
  )),
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") }) })
752
+ s && /* @__PURE__ */ t("th", { scope: "col", className: "table-headers-action", children: /* @__PURE__ */ t("span", { className: "button text default disabled", children: l("_accessibility:labels.actions") }) })
1666
753
  ] }) });
1667
754
  }
1668
- const Vn = (e) => {
1669
- const { items: t, text: r, id: n, onClearFilter: a } = e;
1670
- return /* @__PURE__ */ i(
1671
- ue,
755
+ const Ve = (e) => {
756
+ const { items: l, text: r, id: n, onClearFilter: s } = e;
757
+ return /* @__PURE__ */ t(
758
+ G,
1672
759
  {
1673
- text: `${r}: ${t.map((s) => s.value ?? s.name).join(", ")}`,
1674
- onDelete: () => a(n)
760
+ text: `${r}: ${l.map((a) => a.value ?? a.name).join(", ")}`,
761
+ onDelete: () => s(n)
1675
762
  }
1676
763
  );
1677
- }, Gn = (e) => {
1678
- const { end: t, start: r, text: n, id: a, onClearFilter: s } = e;
1679
- return /* @__PURE__ */ i(
1680
- ue,
764
+ }, je = (e) => {
765
+ const { end: l, start: r, text: n, id: s, onClearFilter: a } = e;
766
+ return /* @__PURE__ */ t(
767
+ G,
1681
768
  {
1682
- text: `${n}: ${r || "♾️"} - ${t || "♾️"}`,
1683
- onDelete: () => s(a)
769
+ text: `${n}: ${r || "♾️"} - ${l || "♾️"}`,
770
+ onDelete: () => a(s)
1684
771
  }
1685
772
  );
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,
773
+ }, We = (e) => {
774
+ const { filtersDefinition: l } = e, r = A(() => {
775
+ const o = {};
776
+ return l.forEach((c) => {
777
+ o[c.propertyName] = c.label ?? c.propertyName;
778
+ }), o;
779
+ }, [l]), { filters: n, clearFilters: s } = H(), a = A(() => Object.keys(n), [n]), u = C(
780
+ (o) => n[o]?.end || n[o]?.start ? /* @__PURE__ */ t(
781
+ je,
1695
782
  {
1696
- id: c,
1697
- text: r[c],
1698
- start: n[c].start,
1699
- end: n[c].end,
1700
- onClearFilter: a
783
+ id: o,
784
+ text: r[o],
785
+ start: n[o].start,
786
+ end: n[o].end,
787
+ onClearFilter: s
1701
788
  }
1702
- ) : Array.isArray(n[c]) ? /* @__PURE__ */ i(
1703
- Vn,
789
+ ) : Array.isArray(n[o]) ? /* @__PURE__ */ t(
790
+ Ve,
1704
791
  {
1705
- id: c,
1706
- text: r[c],
1707
- items: n[c],
1708
- onClearFilter: a
792
+ id: o,
793
+ text: r[o],
794
+ items: n[o],
795
+ onClearFilter: s
1709
796
  }
1710
- ) : /* @__PURE__ */ i(
1711
- ue,
797
+ ) : /* @__PURE__ */ t(
798
+ G,
1712
799
  {
1713
- text: `${r[c]}: ${n[c]?.value ?? n[c]?.name ?? n[c]}`,
1714
- onDelete: () => a(c)
800
+ text: `${r[o]}: ${n[o]?.value ?? n[o]?.name ?? n[o]}`,
801
+ onDelete: () => s(o)
1715
802
  }
1716
803
  ),
1717
804
  [n, r]
1718
805
  );
1719
- return /* @__PURE__ */ i("ul", { className: "active-filters-main", children: s?.map((c) => /* @__PURE__ */ i("li", { children: o(c) }, c)) });
806
+ return /* @__PURE__ */ t("ul", { className: "active-filters-main", children: a?.map((o) => /* @__PURE__ */ t("li", { children: u(o) }, o)) });
1720
807
  };
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,
808
+ function Ue(e) {
809
+ const { propertyName: l, label: r, placeholder: n, options: s, multiple: a = !0 } = e, { currentFilters: u, setCurrentFilters: o } = Y(), c = A(() => u[l] ?? s[0], [u]), d = C(
810
+ (p) => {
811
+ o({
812
+ type: _.update,
1726
813
  toUpdate: {
1727
- [t]: {
1728
- value: u
814
+ [l]: {
815
+ value: p
1729
816
  }
1730
817
  }
1731
818
  });
1732
819
  },
1733
- [s]
820
+ [a]
1734
821
  );
1735
- return /* @__PURE__ */ i(
1736
- Tn,
822
+ return /* @__PURE__ */ t(
823
+ ke,
1737
824
  {
1738
- value: l?.value,
825
+ value: c?.value,
1739
826
  label: r,
1740
- options: a,
1741
- multiple: s,
827
+ options: s,
828
+ multiple: a,
1742
829
  helperTextClassName: "hidden",
1743
830
  containerClassName: "options-widget-container",
1744
831
  onChange: d,
@@ -1746,766 +833,829 @@ function Hn(e) {
1746
833
  }
1747
834
  );
1748
835
  }
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 } }
836
+ const He = (e) => {
837
+ const { propertyName: l, label: r } = e, { currentFilters: n, setCurrentFilters: s } = Y(), a = A(() => n[l]?.value ?? "", [n]), u = C((o) => {
838
+ s({
839
+ type: _.update,
840
+ toUpdate: { [l]: { value: o.target.checked } }
1754
841
  });
1755
842
  }, []);
1756
- return /* @__PURE__ */ i(On, { label: r, checked: s ?? !1, onChange: o });
843
+ return /* @__PURE__ */ t(Ae, { label: r, checked: a ?? !1, onChange: u });
1757
844
  };
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 } }
845
+ function qe(e) {
846
+ const { propertyName: l, options: r, label: n, placeholder: s } = e, { currentFilters: a, setCurrentFilters: u } = Y(), o = A(() => a[l]?.value ?? r[0], [a]), c = C((d) => {
847
+ u({
848
+ type: _.update,
849
+ toUpdate: { [l]: { value: d.target.value } }
1763
850
  });
1764
851
  }, []);
1765
- return /* @__PURE__ */ i(
1766
- Xe,
852
+ return /* @__PURE__ */ t(
853
+ ie,
1767
854
  {
1768
- value: c,
855
+ value: o,
1769
856
  label: n,
1770
857
  options: r,
1771
858
  helperTextClassName: "hidden",
1772
859
  containerClassName: "options-widget-container",
1773
- onChange: l,
1774
- placeholder: a
860
+ onChange: c,
861
+ placeholder: s
1775
862
  }
1776
863
  );
1777
864
  }
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 } }
865
+ const Je = (e) => {
866
+ const { propertyName: l, label: r, placeholder: n } = e, { currentFilters: s, setCurrentFilters: a } = Y(), u = A(() => s[l]?.value ?? "", [s]), o = C((c) => {
867
+ a({
868
+ type: _.update,
869
+ toUpdate: { [l]: { value: c.target.value } }
1783
870
  });
1784
871
  }, []);
1785
- return /* @__PURE__ */ i(
1786
- Ie,
872
+ return /* @__PURE__ */ t(
873
+ ne,
1787
874
  {
1788
- value: o ?? "",
875
+ value: u ?? "",
1789
876
  label: r,
1790
- onChange: c,
877
+ onChange: o,
1791
878
  containerClassName: "input-widget-container",
1792
879
  helperTextClassName: "",
1793
880
  placeholder: n
1794
881
  }
1795
882
  );
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,
883
+ }, pe = (e) => {
884
+ const { propertyName: l, label: r, inputType: n } = e, { t: s } = V(), { currentFilters: a, setCurrentFilters: u } = Y(), o = B(null), c = B(null), d = C((h) => {
885
+ u({
886
+ type: _.update,
1800
887
  toUpdate: {
1801
- [t]: {
1802
- value: { end: l?.current?.value ?? null, start: h.target.value }
888
+ [l]: {
889
+ value: { end: c?.current?.value ?? null, start: h.target.value }
1803
890
  }
1804
891
  }
1805
892
  });
1806
- }, []), u = T((h) => {
1807
- o({
1808
- type: q.update,
893
+ }, []), p = C((h) => {
894
+ u({
895
+ type: _.update,
1809
896
  toUpdate: {
1810
- [t]: {
897
+ [l]: {
1811
898
  value: {
1812
- start: c?.current?.value ?? null,
899
+ start: o?.current?.value ?? null,
1813
900
  end: h.target.value
1814
901
  }
1815
902
  }
1816
903
  }
1817
904
  });
1818
905
  }, []);
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,
906
+ return /* @__PURE__ */ g("div", { className: "range-widget-container", children: [
907
+ /* @__PURE__ */ t("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
908
+ /* @__PURE__ */ g("div", { className: "range-widget-row", children: [
909
+ /* @__PURE__ */ t(
910
+ ne,
1824
911
  {
1825
- value: s[t]?.value?.start ?? "",
1826
- placeholder: a("_accessibility:components.table.filters.range.start"),
912
+ value: a[l]?.value?.start ?? "",
913
+ placeholder: s("_accessibility:components.table.filters.range.start"),
1827
914
  type: n,
1828
- ref: c,
915
+ ref: o,
1829
916
  onChange: d,
1830
917
  containerClassName: "input-widget-container",
1831
918
  helperTextClassName: ""
1832
919
  }
1833
920
  ),
1834
- /* @__PURE__ */ i(
1835
- Ie,
921
+ /* @__PURE__ */ t(
922
+ ne,
1836
923
  {
1837
- value: s[t]?.value?.end ?? "",
1838
- placeholder: a("_accessibility:components.table.filters.range.end"),
924
+ value: a[l]?.value?.end ?? "",
925
+ placeholder: s("_accessibility:components.table.filters.range.end"),
1839
926
  type: n,
1840
- ref: l,
1841
- onChange: u,
927
+ ref: c,
928
+ onChange: p,
1842
929
  containerClassName: "input-widget-container",
1843
930
  helperTextClassName: ""
1844
931
  }
1845
932
  )
1846
933
  ] })
1847
934
  ] });
1848
- }, Zn = (e) => {
935
+ }, Ke = (e) => {
1849
936
  switch (e.type) {
1850
- case le.text:
1851
- return /* @__PURE__ */ i(Yn, { ...e });
1852
- case le.number:
1853
- return /* @__PURE__ */ i(
1854
- ht,
937
+ case X.text:
938
+ return /* @__PURE__ */ t(Je, { ...e });
939
+ case X.number:
940
+ return /* @__PURE__ */ t(
941
+ pe,
1855
942
  {
1856
943
  ...e,
1857
944
  inputType: "number"
1858
945
  }
1859
946
  );
1860
- case le.date:
1861
- return /* @__PURE__ */ i(
1862
- ht,
947
+ case X.date:
948
+ return /* @__PURE__ */ t(
949
+ pe,
1863
950
  {
1864
951
  ...e,
1865
952
  inputType: "date"
1866
953
  }
1867
954
  );
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 });
955
+ case X.select:
956
+ return /* @__PURE__ */ t(qe, { ...e });
957
+ case X.autocomplete:
958
+ return /* @__PURE__ */ t(Ue, { ...e });
959
+ case X.check:
960
+ return /* @__PURE__ */ t(He, { ...e });
1874
961
  }
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));
962
+ return /* @__PURE__ */ t(ee, {});
963
+ }, Xe = (e) => {
964
+ const { filters: l = [], show: r, handleShow: n } = e, { onFilterApply: s } = H(), { currentFilters: a, setCurrentFilters: u } = Y(), { t: o } = V(), c = B(null);
965
+ return I(() => {
966
+ const d = ({ target: h }) => {
967
+ c.current && (h?.closest(".filter-dropdown-trigger") || !r || c.current.contains(h) || n(!1));
968
+ }, p = ({ code: h }) => {
969
+ !r || h !== "Escape" || n(!1);
1881
970
  };
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);
971
+ return document.addEventListener("click", d), document.addEventListener("keydown", p), () => {
972
+ document.removeEventListener("click", d), document.removeEventListener("keydown", p);
1886
973
  };
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(
974
+ }, [n, r]), /* @__PURE__ */ t("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */ g("div", { className: "filter-popup", ref: c, children: [
975
+ /* @__PURE__ */ t("div", { className: "filter-title", children: o("_accessibility:buttons.filters") }),
976
+ /* @__PURE__ */ t("ul", { className: "filter-container", children: l.map((d) => /* @__PURE__ */ t("li", { className: "filter-container-item", children: Ke(d) }, d.propertyName)) }),
977
+ /* @__PURE__ */ t("div", { className: "filter-footer", children: /* @__PURE__ */ g("ul", { className: "filter-buttons-row", children: [
978
+ /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
1893
979
  "button",
1894
980
  {
1895
- onClick: () => o({
1896
- type: q.reset,
1897
- filters: t
981
+ onClick: () => u({
982
+ type: _.reset,
983
+ filters: l
1898
984
  }),
1899
985
  className: "filter-dropdown-button small filter-dropdown-cancel",
1900
- children: c("_accessibility:buttons.clear")
986
+ children: o("_accessibility:buttons.clear")
1901
987
  }
1902
988
  ) }),
1903
- /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
989
+ /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
1904
990
  "button",
1905
991
  {
1906
992
  className: "filter-dropdown-button small filter-dropdown-submit",
1907
993
  onClick: () => {
1908
- n(!1), a(s);
994
+ n(!1), s(a);
1909
995
  },
1910
- onBlur: () => n(!1),
1911
- children: c("_accessibility:buttons.applyFilters")
996
+ children: o("_accessibility:buttons.applyFilters")
1912
997
  }
1913
998
  ) })
1914
999
  ] }) })
1915
1000
  ] }) });
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,
1001
+ }, Ge = () => {
1002
+ const { t: e } = V(), { total: l, pageSize: r, pageSizes: n, currentPage: s } = H(), a = (s + 1) * r > l ? l : (s + 1) * r;
1003
+ return /* @__PURE__ */ g("div", { className: "table-navigation-sizes", children: [
1004
+ n[0] < l && /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ g("p", { children: [
1005
+ s * r + 1,
1921
1006
  " - ",
1922
- s,
1007
+ a,
1923
1008
  " ",
1924
1009
  e("_accessibility:components.table.of")
1925
1010
  ] }) }),
1926
- /* @__PURE__ */ i("p", { children: t })
1011
+ /* @__PURE__ */ t("p", { children: l })
1927
1012
  ] });
1928
1013
  };
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
1014
+ function Qe() {
1015
+ const { t: e } = V(), { total: l, pageSize: r, currentPage: n, setCurrentPage: s } = H(), a = A(() => {
1016
+ const u = Math.ceil(l / r);
1017
+ return Array.from({ length: u }, (o, c) => ({
1018
+ id: c,
1019
+ value: c + 1
1935
1020
  }));
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,
1021
+ }, [l, r]);
1022
+ return /* @__PURE__ */ g("div", { className: "jump-to-page", children: [
1023
+ /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.jumpToPage") }),
1024
+ /* @__PURE__ */ t(
1025
+ ie,
1941
1026
  {
1942
1027
  value: n,
1943
- options: s,
1028
+ options: a,
1944
1029
  inputClassName: "jump-to-page-input",
1945
1030
  containerClassName: "jump-to-page-input-container",
1946
1031
  helperTextClassName: "hidden",
1947
- onChange: (o) => a(Number(o.target.value))
1032
+ onChange: (u) => s(Number(u.target.value))
1948
1033
  }
1949
1034
  )
1950
1035
  ] });
1951
1036
  }
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,
1037
+ const Ye = () => {
1038
+ const { t: e } = V(), { total: l, pageSize: r, currentPage: n, setCurrentPage: s } = H();
1039
+ return /* @__PURE__ */ g("div", { className: "table-navigation-pages", children: [
1040
+ /* @__PURE__ */ t(
1041
+ q,
1957
1042
  {
1958
- icon: /* @__PURE__ */ i(Ln, { className: "w-2.5" }),
1043
+ icon: /* @__PURE__ */ t(Le, { className: "w-2.5" }),
1959
1044
  className: "table-navigation-buttons",
1960
1045
  disabled: n === 0,
1961
1046
  "aria-label": e("_accessibility:buttons.previous"),
1962
1047
  name: e("_accessibility:buttons.previous"),
1963
- onClick: () => a(n - 1)
1048
+ onClick: () => s(n - 1)
1964
1049
  }
1965
1050
  ),
1966
- /* @__PURE__ */ i(
1967
- de,
1051
+ /* @__PURE__ */ t(
1052
+ q,
1968
1053
  {
1969
- icon: /* @__PURE__ */ i(Mn, { className: "w-2.5" }),
1970
- disabled: Math.floor(t / ((n + 1) * r)) === 0,
1054
+ icon: /* @__PURE__ */ t(Pe, { className: "w-2.5" }),
1055
+ disabled: Math.floor(l / ((n + 1) * r)) === 0,
1971
1056
  className: "table-navigation-buttons",
1972
1057
  name: e("_accessibility:buttons.next"),
1973
1058
  "aria-label": e("_accessibility:buttons.next"),
1974
- onClick: () => a(n + 1)
1059
+ onClick: () => s(n + 1)
1975
1060
  }
1976
1061
  )
1977
1062
  ] });
1978
1063
  };
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]
1064
+ function Ze() {
1065
+ const { t: e } = V(), { pageSizes: l, pageSize: r, setPageSize: n } = H(), s = A(
1066
+ () => l?.map((a) => ({ id: a, value: a })),
1067
+ [l]
1983
1068
  );
1984
- return /* @__PURE__ */ S("div", { className: "page-size", children: [
1985
- /* @__PURE__ */ i("p", { children: e("_accessibility:components.table.pageSizes") }),
1986
- /* @__PURE__ */ i(
1987
- Xe,
1069
+ return /* @__PURE__ */ g("div", { className: "page-size", children: [
1070
+ /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.pageSizes") }),
1071
+ /* @__PURE__ */ t(
1072
+ ie,
1988
1073
  {
1989
1074
  value: r,
1990
- options: a,
1075
+ options: s,
1991
1076
  inputClassName: "page-size-input",
1992
1077
  containerClassName: "page-size-input-container",
1993
1078
  helperTextClassName: "hidden",
1994
- onChange: (s) => n(Number(s.target.value))
1079
+ onChange: (a) => n(Number(a.target.value))
1995
1080
  }
1996
1081
  )
1997
1082
  ] });
1998
1083
  }
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, {})
1084
+ function et() {
1085
+ return /* @__PURE__ */ g("div", { className: "table-footer", children: [
1086
+ /* @__PURE__ */ t(Qe, {}),
1087
+ /* @__PURE__ */ t(Ze, {}),
1088
+ /* @__PURE__ */ t(Ge, {}),
1089
+ /* @__PURE__ */ t(Ye, {})
2005
1090
  ] });
2006
1091
  }
2007
- const rr = (e) => e, ar = (e) => {
2008
- const { t } = X(), {
1092
+ const tt = (e) => e, nt = (e) => {
1093
+ const { t: l } = V(), {
2009
1094
  columns: r,
2010
1095
  softDeleteProperty: n = "deletedAt",
2011
- data: a,
2012
- actions: s,
2013
- selectedRows: o,
2014
- expandedRows: c = [],
2015
- onRowSelectionChange: l,
1096
+ data: s,
1097
+ actions: a,
1098
+ selectedRows: u,
1099
+ expandedRows: o = [],
1100
+ onRowSelectionChange: c,
2016
1101
  onRowExpand: d
2017
- } = e, u = z(
2018
- () => r.sort((m, p) => (p.pos ?? 0) - (m.pos ?? 0)).filter((m) => m.display !== "none"),
1102
+ } = e, p = A(
1103
+ () => Ce(r),
2019
1104
  [r]
2020
- ), h = z(
1105
+ ), h = A(
2021
1106
  () => new Map(
2022
- c.map((m) => [m.rowId, m])
1107
+ o.map((m) => [m.rowId, m])
2023
1108
  ),
2024
- [c]
1109
+ [o]
2025
1110
  );
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(
1111
+ return s?.map((m) => {
1112
+ const i = u.has(m.id), v = h.get(m.id), S = !!v, $ = p.length + 1 + (a ? 1 : 0);
1113
+ return /* @__PURE__ */ g(xe, { children: [
1114
+ /* @__PURE__ */ g(
2030
1115
  "tr",
2031
1116
  {
2032
- className: `table-row ${d ? "expandable" : ""} ${m[n] ? "deleted-class" : ""} ${p ? "selected" : ""} ${x ? "expanded" : ""}`,
1117
+ className: `table-row ${d ? "expandable" : ""} ${m[n] ? "deleted-class" : ""} ${i ? "selected" : ""} ${S ? "expanded" : ""}`,
2033
1118
  onClick: () => d?.(m),
2034
1119
  children: [
2035
- /* @__PURE__ */ i("td", { className: "table-row-cell table-row-checkbox", children: /* @__PURE__ */ i(
1120
+ /* @__PURE__ */ t("td", { className: "table-row-cell table-row-checkbox", children: /* @__PURE__ */ t(
2036
1121
  "input",
2037
1122
  {
2038
1123
  type: "checkbox",
2039
- checked: p,
2040
- onClick: (b) => b.stopPropagation(),
2041
- onChange: () => l(m),
2042
- "aria-label": t("_accessibility:components.table.selectRow")
1124
+ checked: i,
1125
+ onClick: (w) => w.stopPropagation(),
1126
+ onChange: () => c(m),
1127
+ "aria-label": l("_accessibility:components.table.selectRow")
2043
1128
  }
2044
1129
  ) }),
2045
- u?.map((b, v) => /* @__PURE__ */ i(
1130
+ p?.map((w, L) => /* @__PURE__ */ t(
2046
1131
  "td",
2047
1132
  {
2048
- className: `table-row-cell ${v === 0 ? "basic" : ""} ${b.className ?? ""}`,
2049
- children: b.renderBody ? b.renderBody(m[b.key], m) : rr(m[b.key])
1133
+ className: `table-row-cell ${L === 0 ? "basic" : ""} ${w.className ?? ""}`,
1134
+ children: w.renderBody ? w.renderBody(m[w.key], m) : tt(m[w.key])
2050
1135
  },
2051
- b.key
1136
+ w.key
2052
1137
  )),
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,
1138
+ a ? /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", { className: "table-row-cell-action", children: a(m).filter((w) => !w.hidden)?.map((w) => /* @__PURE__ */ t(le, { content: w.tooltip, children: /* @__PURE__ */ t(
1139
+ q,
2055
1140
  {
2056
- icon: b.icon,
1141
+ icon: w.icon,
2057
1142
  className: "row-table-action",
2058
- onClick: (v) => {
2059
- v.stopPropagation(), b.onClick(m);
1143
+ onClick: (L) => {
1144
+ L.stopPropagation(), w.onClick(m);
2060
1145
  }
2061
1146
  }
2062
- ) }, b.id)) }) }) : null
1147
+ ) }, w.id)) }) }) : null
2063
1148
  ]
2064
1149
  }
2065
1150
  ),
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(
1151
+ S && v?.content !== null && typeof v?.content < "u" && /* @__PURE__ */ t("tr", { className: "table-row-expanded", children: /* @__PURE__ */ t("td", { className: "table-row-expanded-cell", colSpan: $, children: /* @__PURE__ */ t(
2067
1152
  "div",
2068
1153
  {
2069
- className: `table-row-expanded-content ${g.isVisible ? "open" : "closed"}`,
2070
- children: /* @__PURE__ */ i("div", { className: "table-row-expanded-inner", children: g.content })
1154
+ className: `table-row-expanded-content ${v.isVisible ? "open" : "closed"}`,
1155
+ children: /* @__PURE__ */ t("div", { className: "table-row-expanded-inner", children: v.content })
2071
1156
  }
2072
1157
  ) }) })
2073
1158
  ] }, m.id);
2074
1159
  });
2075
1160
  };
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);
1161
+ function lt() {
1162
+ const { t: e } = V();
1163
+ return /* @__PURE__ */ t("div", { className: "table-empty", children: /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.empty") }) });
1164
+ }
1165
+ const st = (e) => {
1166
+ const { columns: l, title: r, isLoading: n, toolbar: s, filterOptions: a } = e, { countOfFilters: u } = H(), { t: o } = V(), c = A(() => l ? l.sort((i, v) => (v.pos ?? 0) - (i.pos ?? 0)).filter((i) => !!i.filterOptions).map((i) => ({
1167
+ ...i.filterOptions,
1168
+ label: i.filterOptions?.label ?? i.label,
1169
+ propertyName: i.key
1170
+ })) : [], [l]), [d, p] = T(!1), h = C(
1171
+ (i) => {
1172
+ a?.dropdown?.setOpened ? a.dropdown.setOpened(i ?? !1) : p(i ?? !1);
2088
1173
  },
2089
- [s]
2090
- ), m = z(
2091
- () => s?.dropdown?.opened ?? d,
2092
- [s, d]
1174
+ [a]
1175
+ ), m = A(
1176
+ () => a?.dropdown?.opened ?? d,
1177
+ [a, d]
2093
1178
  );
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,
1179
+ return /* @__PURE__ */ g("div", { className: `table-header ${m ? "showing-filters" : ""}`, children: [
1180
+ /* @__PURE__ */ g("div", { children: [
1181
+ r && /* @__PURE__ */ t("h1", { className: "table-header-title", children: r }),
1182
+ n ? null : /* @__PURE__ */ g("div", { className: "table-header-content", children: [
1183
+ s,
1184
+ a?.button?.hide !== !0 && /* @__PURE__ */ g(
1185
+ q,
2101
1186
  {
2102
- icon: s?.button?.icon ?? /* @__PURE__ */ i(zn, { className: "filter-dropdown-trigger-icon" }),
1187
+ icon: a?.button?.icon ?? /* @__PURE__ */ t(ze, { className: "filter-dropdown-trigger-icon" }),
2103
1188
  className: "filter-dropdown-button normal filter-dropdown-trigger",
2104
1189
  "aria-haspopup": "true",
2105
1190
  onClick: () => h(!m),
2106
1191
  "aria-expanded": m,
2107
1192
  children: [
2108
- /* @__PURE__ */ i(
2109
- Bt,
1193
+ /* @__PURE__ */ t(
1194
+ Ee,
2110
1195
  {
2111
- count: o,
2112
- className: `${o > 0 ? "show" : "hide"} `
1196
+ count: u,
1197
+ className: `${u > 0 ? "show" : "hide"} `
2113
1198
  }
2114
1199
  ),
2115
- /* @__PURE__ */ i("span", { className: "sr-only", children: c("_accessibility:buttons.filters") }),
2116
- /* @__PURE__ */ i("wbr", {})
1200
+ /* @__PURE__ */ t("span", { className: "sr-only", children: o("_accessibility:buttons.filters") }),
1201
+ /* @__PURE__ */ t("wbr", {})
2117
1202
  ]
2118
1203
  }
2119
1204
  )
2120
1205
  ] })
2121
1206
  ] }),
2122
- !!l && !!l.length && /* @__PURE__ */ i(
2123
- Jn,
1207
+ !!c && !!c.length && /* @__PURE__ */ t(
1208
+ Xe,
2124
1209
  {
2125
- filters: l,
1210
+ filters: c,
2126
1211
  show: m,
2127
1212
  handleShow: h,
2128
- options: s
1213
+ options: a
2129
1214
  }
2130
1215
  ),
2131
- /* @__PURE__ */ i(Un, { filtersDefinition: l })
1216
+ /* @__PURE__ */ t(We, { filtersDefinition: c })
2132
1217
  ] });
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(
1218
+ };
1219
+ function rt({
1220
+ count: e,
1221
+ multiActions: l,
1222
+ onActionClick: r
1223
+ }) {
1224
+ const { t: n } = V();
1225
+ return /* @__PURE__ */ g("div", { className: "table-selection-bar", children: [
1226
+ /* @__PURE__ */ t("p", { className: "table-selection-bar-count", children: n("_accessibility:components.table.selectedCount", { count: e }) }),
1227
+ l.length > 0 && /* @__PURE__ */ t("div", { className: "table-selection-bar-actions", children: l.map((s) => /* @__PURE__ */ t(le, { content: s.tooltip, children: /* @__PURE__ */ t(
1228
+ q,
1229
+ {
1230
+ icon: s.icon,
1231
+ className: "multi-table-action",
1232
+ onClick: () => r(s),
1233
+ disabled: s.disabled
1234
+ }
1235
+ ) }, s.id)) })
1236
+ ] });
1237
+ }
1238
+ const se = 220;
1239
+ function at({
1240
+ data: e,
1241
+ allowMultipleExpandedRows: l,
1242
+ controlledExpandedRowId: r,
1243
+ onExpandedRowChange: n,
1244
+ onRowExpand: s,
1245
+ findRowById: a
1246
+ }) {
1247
+ const [u, o] = T(null), [c, d] = T(null), [p, h] = T(null), [m, i] = T(null), [v, S] = T(!1), [$, w] = T(/* @__PURE__ */ new Set()), [L, E] = T([]), N = B(null), y = B(null), P = B(/* @__PURE__ */ new Map()), R = typeof r < "u", O = l && !R, F = R ? r ?? null : u, j = C(() => {
1248
+ y.current && (clearTimeout(y.current), y.current = null);
1249
+ }, []), z = C(
2161
1250
  (f) => {
2162
1251
  if (typeof f < "u") {
2163
- const w = he.current.get(f);
2164
- if (!w) return;
2165
- clearTimeout(w), he.current.delete(f);
1252
+ const x = P.current.get(f);
1253
+ if (!x) return;
1254
+ clearTimeout(x), P.current.delete(f);
2166
1255
  return;
2167
1256
  }
2168
- he.current.forEach(
2169
- (w) => clearTimeout(w)
2170
- ), he.current.clear();
1257
+ P.current.forEach(
1258
+ (x) => clearTimeout(x)
1259
+ ), P.current.clear();
2171
1260
  },
2172
1261
  []
2173
- ), tt = T(
1262
+ ), J = C(
2174
1263
  (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(
1264
+ z(f), E((x) => x.some(
1265
+ (D) => D.rowId === f
1266
+ ) ? x.map(
1267
+ (D) => D.rowId === f ? { ...D, isVisible: !1 } : D
1268
+ ) : x), P.current.set(
2180
1269
  f,
2181
1270
  setTimeout(() => {
2182
- fe(
2183
- (w) => w.filter((y) => y.rowId !== f)
2184
- ), he.current.delete(f);
2185
- }, Ve)
1271
+ E(
1272
+ (x) => x.filter((k) => k.rowId !== f)
1273
+ ), P.current.delete(f);
1274
+ }, se)
2186
1275
  );
2187
1276
  },
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
1277
+ [z]
1278
+ ), b = C(
1279
+ (f, x) => {
1280
+ z(f), E((k) => k.some(
1281
+ (U) => U.rowId === f
1282
+ ) ? k.map(
1283
+ (U) => U.rowId === f ? { ...U, content: x, isVisible: !1 } : U
1284
+ ) : [...k, { rowId: f, content: x, isVisible: !1 }]), requestAnimationFrame(() => {
1285
+ E(
1286
+ (k) => k.map(
1287
+ (D) => D.rowId === f ? { ...D, isVisible: !0 } : D
2199
1288
  )
2200
1289
  );
2201
1290
  });
2202
1291
  },
2203
- [Z]
1292
+ [z]
2204
1293
  );
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);
1294
+ I(() => {
1295
+ if (!O) return;
1296
+ const f = new Set(e.map((x) => x.id));
1297
+ w((x) => {
1298
+ const k = /* @__PURE__ */ new Set();
1299
+ return x.forEach((D) => {
1300
+ if (f.has(D)) {
1301
+ k.add(D);
2224
1302
  return;
2225
1303
  }
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)
1304
+ z(D);
1305
+ }), k;
1306
+ }), E((x) => (x.forEach((k) => {
1307
+ f.has(k.rowId) || z(k.rowId);
1308
+ }), x.filter(
1309
+ (k) => f.has(k.rowId)
2232
1310
  )));
2233
- }, [t, te, Z]), j(() => {
2234
- if (te) return;
2235
- if (V === null) {
2236
- N(null), ee && (pe.current = null);
1311
+ }, [e, O, z]), I(() => {
1312
+ if (O) return;
1313
+ if (F === null) {
1314
+ d(null), R && (N.current = null);
2237
1315
  return;
2238
1316
  }
2239
- me(V) || (ee || O(null), N(null), ee && (pe.current = null));
1317
+ a(F) || (R || o(null), d(null), R && (N.current = null));
2240
1318
  }, [
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);
1319
+ e,
1320
+ F,
1321
+ a,
1322
+ R,
1323
+ O
1324
+ ]), I(() => {
1325
+ if (!O) {
1326
+ if (j(), F === null || c === null) {
1327
+ if (p === null) {
1328
+ S(!1), i(null);
2251
1329
  return;
2252
1330
  }
2253
- F(!1), oe.current = setTimeout(() => {
2254
- xe(null), ae(null), oe.current = null;
2255
- }, Ve);
1331
+ S(!1), y.current = setTimeout(() => {
1332
+ h(null), i(null), y.current = null;
1333
+ }, se);
2256
1334
  return;
2257
1335
  }
2258
- if (Q === null) {
2259
- xe(V), ae(P), requestAnimationFrame(() => F(!0));
1336
+ if (p === null) {
1337
+ h(F), i(c), requestAnimationFrame(() => S(!0));
2260
1338
  return;
2261
1339
  }
2262
- if (Q === V) {
2263
- ae(P), requestAnimationFrame(() => F(!0));
1340
+ if (p === F) {
1341
+ i(c), requestAnimationFrame(() => S(!0));
2264
1342
  return;
2265
1343
  }
2266
- F(!1), oe.current = setTimeout(() => {
2267
- xe(V), ae(P), requestAnimationFrame(() => F(!0)), oe.current = null;
2268
- }, Ve);
1344
+ S(!1), y.current = setTimeout(() => {
1345
+ h(F), i(c), requestAnimationFrame(() => S(!0)), y.current = null;
1346
+ }, se);
2269
1347
  }
2270
1348
  }, [
2271
- Ae,
2272
- P,
2273
- V,
2274
- te,
2275
- Q
2276
- ]), j(
1349
+ j,
1350
+ c,
1351
+ F,
1352
+ O,
1353
+ p
1354
+ ]), I(
2277
1355
  () => () => {
2278
- Ae(), Z();
1356
+ j(), z();
2279
1357
  },
2280
- [Ae, Z]
2281
- ), j(() => {
2282
- if (!ee) return;
2283
- if (V === null) {
2284
- N(null), pe.current = null;
1358
+ [j, z]
1359
+ ), I(() => {
1360
+ if (!R) return;
1361
+ if (F === null) {
1362
+ d(null), N.current = null;
2285
1363
  return;
2286
1364
  }
2287
- const f = me(V);
1365
+ const f = a(F);
2288
1366
  if (!f) {
2289
- N(null), pe.current = null;
1367
+ d(null), N.current = null;
2290
1368
  return;
2291
1369
  }
2292
- const w = pe.current;
2293
- N(x?.(f, w) ?? null), pe.current = f;
2294
- }, [V, me, ee, x]);
2295
- const Pt = T(
1370
+ const x = N.current;
1371
+ d(s?.(f, x) ?? null), N.current = f;
1372
+ }, [F, a, R, s]);
1373
+ const M = C(
2296
1374
  (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);
1375
+ if (O) {
1376
+ if ($.has(f.id)) {
1377
+ w((Z) => {
1378
+ const K = new Set(Z);
1379
+ return K.delete(f.id), K;
1380
+ }), J(f.id), n?.(null, f);
2311
1381
  return;
2312
1382
  }
2313
- Ne((_) => {
2314
- const J = new Set(_);
2315
- return J.add(f.id), J;
1383
+ w((Z) => {
1384
+ const K = new Set(Z);
1385
+ return K.add(f.id), K;
2316
1386
  });
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);
1387
+ const U = s?.(f, null) ?? null;
1388
+ U !== null && typeof U < "u" ? b(f.id, U) : (z(f.id), E(
1389
+ (Z) => Z.filter((K) => K.rowId !== f.id)
1390
+ )), n?.(f, null);
2321
1391
  return;
2322
1392
  }
2323
- const w = V === f.id, y = w ? f : me(V);
2324
- if (ee) {
2325
- g?.(w ? null : f, y);
1393
+ const x = F === f.id, k = x ? f : a(F);
1394
+ if (R) {
1395
+ n?.(x ? null : f, k);
2326
1396
  return;
2327
1397
  }
2328
- if (w) {
2329
- O(null), N(null), g?.(null, f);
1398
+ if (x) {
1399
+ o(null), d(null), n?.(null, f);
2330
1400
  return;
2331
1401
  }
2332
- O(f.id), N(x?.(f, y) ?? null), g?.(f, y);
1402
+ o(f.id), d(s?.(f, k) ?? null), n?.(f, k);
2333
1403
  },
2334
1404
  [
2335
- V,
2336
- tt,
2337
- Z,
2338
- nt,
2339
- me,
2340
- K,
2341
- ee,
2342
- te,
2343
- g,
2344
- x
1405
+ F,
1406
+ J,
1407
+ z,
1408
+ b,
1409
+ a,
1410
+ $,
1411
+ R,
1412
+ O,
1413
+ n,
1414
+ s
2345
1415
  ]
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
1416
+ );
1417
+ return { expandedRowsToRender: A(() => O ? L : p === null || m === null || typeof m > "u" ? [] : [
1418
+ {
1419
+ rowId: p,
1420
+ content: m,
1421
+ isVisible: v
1422
+ }
1423
+ ], [
1424
+ v,
1425
+ O,
1426
+ m,
1427
+ p,
1428
+ L
1429
+ ]), onRowExpandChange: M };
1430
+ }
1431
+ function ot({
1432
+ actions: e,
1433
+ selectedRowsData: l
1434
+ }) {
1435
+ const r = A(() => !e || !l.length ? [] : l.reduce(
1436
+ (s, a, u) => {
1437
+ const o = e(a).filter(
1438
+ (d) => d.multiple && !d.hidden
2369
1439
  );
2370
- if (y === 0) return A;
2371
- const I = new Map(
2372
- f.map((_) => [_.id, _])
1440
+ if (u === 0) return o;
1441
+ const c = new Map(
1442
+ s.map((d) => [d.id, d])
2373
1443
  );
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
- }), _;
1444
+ return o.reduce((d, p) => {
1445
+ const h = c.get(p.id);
1446
+ return h && d.push({
1447
+ ...h,
1448
+ ...p,
1449
+ disabled: p.disabled || h.disabled
1450
+ }), d;
2381
1451
  }, []);
2382
1452
  },
2383
1453
  []
2384
- ), [s, Y]), It = T(
2385
- (f) => {
2386
- if (Y.length) {
2387
- if (f.onMultipleClick) {
2388
- f.onMultipleClick(Y);
1454
+ ), [e, l]), n = C(
1455
+ (s) => {
1456
+ if (l.length) {
1457
+ if (s.onMultipleClick) {
1458
+ s.onMultipleClick(l);
2389
1459
  return;
2390
1460
  }
2391
- Y.forEach((w) => f.onClick(w));
1461
+ l.forEach((a) => s.onClick(a));
2392
1462
  }
2393
1463
  },
2394
- [Y]
2395
- ), Dt = z(() => te ? et : Q === null || ce === null || typeof ce > "u" ? [] : [
2396
- {
2397
- rowId: Q,
2398
- content: ce,
2399
- isVisible: C
1464
+ [l]
1465
+ );
1466
+ return { multiActions: r, handleMultipleActionClick: n };
1467
+ }
1468
+ function it({
1469
+ data: e,
1470
+ onRowSelect: l,
1471
+ onSelectedRowsChange: r
1472
+ }) {
1473
+ const [n, s] = T(/* @__PURE__ */ new Set()), a = A(
1474
+ () => e?.filter((d) => n.has(d.id)) ?? [],
1475
+ [e, n]
1476
+ );
1477
+ I(() => {
1478
+ if (!e?.length) {
1479
+ s(/* @__PURE__ */ new Set());
1480
+ return;
2400
1481
  }
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,
1482
+ s((d) => {
1483
+ const p = /* @__PURE__ */ new Set(), h = new Set(e.map((m) => m.id));
1484
+ return d.forEach((m) => {
1485
+ h.has(m) && p.add(m);
1486
+ }), p;
1487
+ });
1488
+ }, [e]), I(() => {
1489
+ r && r(a);
1490
+ }, [a, r]);
1491
+ const u = C(
1492
+ (d) => {
1493
+ s((p) => {
1494
+ const h = new Set(p);
1495
+ return h.has(d.id) ? (h.delete(d.id), l?.(d, !1)) : (h.add(d.id), l?.(d, !0)), h;
1496
+ });
1497
+ },
1498
+ [l]
1499
+ ), o = C(() => {
1500
+ s((d) => {
1501
+ const p = new Set(d), h = e ?? [], m = h.every(
1502
+ (i) => p.has(i.id)
1503
+ );
1504
+ return h.forEach((i) => {
1505
+ const v = p.has(i.id);
1506
+ m ? v && (p.delete(i.id), l?.(i, !1)) : v || (p.add(i.id), l?.(i, !0));
1507
+ }), p;
1508
+ });
1509
+ }, [e, l]), c = A(() => {
1510
+ if (!e?.length)
1511
+ return { allSelected: !1, hasSomeSelected: !1 };
1512
+ const d = e.every((h) => n.has(h.id)), p = e.some((h) => n.has(h.id));
1513
+ return { allSelected: d, hasSomeSelected: p };
1514
+ }, [e, n]);
1515
+ return {
1516
+ selectedRows: n,
1517
+ selectedRowsData: a,
1518
+ selectionState: c,
1519
+ onRowSelectionChange: u,
1520
+ onToggleAllRows: o
1521
+ };
1522
+ }
1523
+ function bt(e) {
1524
+ const {
1525
+ data: l,
1526
+ onSort: r,
1527
+ entity: n = "",
1528
+ isLoading: s = !1,
1529
+ actions: a,
1530
+ columns: u = [],
1531
+ contentClassName: o = "",
1532
+ className: c = "",
1533
+ softDeleteProperty: d = "deletedAt",
1534
+ onRowSelect: p,
1535
+ onSelectedRowsChange: h,
1536
+ allowMultipleExpandedRows: m = !1,
1537
+ expandedRowId: i,
1538
+ onExpandedRowChange: v,
1539
+ onRowExpand: S,
1540
+ ...$
1541
+ } = e, w = A(() => !l?.length, [l]), L = C(
1542
+ (J) => J === null ? null : l.find((b) => b.id === J) ?? null,
1543
+ [l]
1544
+ ), {
1545
+ selectedRows: E,
1546
+ selectedRowsData: N,
1547
+ selectionState: y,
1548
+ onRowSelectionChange: P,
1549
+ onToggleAllRows: R
1550
+ } = it({ data: l, onRowSelect: p, onSelectedRowsChange: h }), { expandedRowsToRender: O, onRowExpandChange: F } = at({
1551
+ data: l,
1552
+ allowMultipleExpandedRows: m,
1553
+ controlledExpandedRowId: i,
1554
+ onExpandedRowChange: v,
1555
+ onRowExpand: S,
1556
+ findRowById: L
1557
+ }), { multiActions: j, handleMultipleActionClick: z } = ot({
1558
+ actions: a,
1559
+ selectedRowsData: N
1560
+ });
1561
+ return /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ g("div", { className: `${c} table-main`, children: [
1562
+ /* @__PURE__ */ t(st, { columns: u, isLoading: s, ...$ }),
1563
+ s ? /* @__PURE__ */ t(Te, { className: "table-loading" }) : /* @__PURE__ */ t(ee, { children: w ? /* @__PURE__ */ t(lt, {}) : /* @__PURE__ */ g(ee, { children: [
1564
+ !!N.length && /* @__PURE__ */ t(
1565
+ rt,
1566
+ {
1567
+ count: N.length,
1568
+ multiActions: j,
1569
+ onActionClick: z
1570
+ }
1571
+ ),
1572
+ /* @__PURE__ */ t("div", { className: `${o} table-body`, children: /* @__PURE__ */ g("table", { className: "table-content", children: [
1573
+ /* @__PURE__ */ t(
1574
+ Be,
2428
1575
  {
2429
1576
  entity: n,
2430
- columns: o,
1577
+ columns: u,
2431
1578
  onSortCallback: r,
2432
- hasAction: !!s,
2433
- selectionState: Mt,
2434
- onToggleAllRows: Lt
1579
+ hasAction: !!a,
1580
+ selectionState: y,
1581
+ onToggleAllRows: R
2435
1582
  }
2436
1583
  ),
2437
- /* @__PURE__ */ i("tbody", { children: /* @__PURE__ */ i(
2438
- ar,
1584
+ /* @__PURE__ */ t("tbody", { children: /* @__PURE__ */ t(
1585
+ nt,
2439
1586
  {
2440
- data: t,
2441
- actions: s,
2442
- columns: o,
1587
+ data: l,
1588
+ actions: a,
1589
+ columns: u,
2443
1590
  softDeleteProperty: d,
2444
- selectedRows: v,
2445
- expandedRows: Dt,
2446
- onRowSelectionChange: Pt,
2447
- onRowExpand: x ? Ft : void 0
1591
+ selectedRows: E,
1592
+ expandedRows: O,
1593
+ onRowSelectionChange: P,
1594
+ onRowExpand: S ? F : void 0
2448
1595
  }
2449
1596
  ) })
2450
1597
  ] }) }),
2451
- /* @__PURE__ */ i(nr, {})
1598
+ /* @__PURE__ */ t(et, {})
2452
1599
  ] }) })
2453
1600
  ] }) });
2454
1601
  }
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 })
1602
+ function le(e) {
1603
+ const { content: l, children: r, className: n = "" } = e, s = ye(), a = Se(r) ? $e(r, {
1604
+ "aria-describedby": s
1605
+ }) : r;
1606
+ return /* @__PURE__ */ g("div", { className: `tooltip-container ${n}`, children: [
1607
+ a,
1608
+ /* @__PURE__ */ t("div", { id: s, role: "tooltip", className: "tooltip-text", children: l })
2460
1609
  ] });
2461
1610
  }
2462
1611
  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
1612
+ We as ActiveFilters,
1613
+ Ve as ArrayChip,
1614
+ ke as AutocompleteInput,
1615
+ Ee as Badge,
1616
+ Re as Button,
1617
+ Ae as CheckInput,
1618
+ Fe as ChevronDown,
1619
+ Le as ChevronLeft,
1620
+ Pe as ChevronRight,
1621
+ Oe as ChevronUp,
1622
+ G as Chip,
1623
+ ce as Close,
1624
+ Be as Columns,
1625
+ Ge as CountOfTotal,
1626
+ pt as Dropdown,
1627
+ Me as File,
1628
+ ht as FileInput,
1629
+ Xe as FilterDropdown,
1630
+ X as FilterTypes,
1631
+ ze as Filters,
1632
+ _ as FiltersActions,
1633
+ Ie as FiltersProvider,
1634
+ et as Footer,
1635
+ q as IconButton,
1636
+ Te as Loading,
1637
+ Ye as Navigation,
1638
+ Ze as PageSize,
1639
+ je as RangeChip,
1640
+ nt as Rows,
1641
+ ie as SelectInput,
1642
+ Q as SortOrder,
1643
+ oe as State,
1644
+ bt as Table,
1645
+ lt as TableEmpty,
1646
+ st as TableHeader,
1647
+ mt as TableOptionsProvider,
1648
+ rt as TableSelectionBar,
1649
+ ne as TextInput,
1650
+ le as Tooltip,
1651
+ ft as TranslationProvider,
1652
+ De as filtersReducer,
1653
+ fe as helperTextStateClassName,
1654
+ ue as initializer,
1655
+ he as inputStateClassName,
1656
+ me as labelStateClassName,
1657
+ Ke as renderFilterComponent,
1658
+ Y as useFilters,
1659
+ H as useTableOptions,
1660
+ V as useTranslation
2511
1661
  };