@sito/dashboard 0.0.45 → 0.0.47

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,77 +1,90 @@
1
1
  import "./main.css";
2
- import { jsx as t, jsxs as b, Fragment as j } from "react/jsx-runtime";
3
- import { forwardRef as H, useState as F, useRef as A, useEffect as R, useCallback as x, createContext as q, useContext as J, useMemo as w, useReducer as se } from "react";
4
- function ae(e) {
5
- const { className: s = "" } = e;
6
- return /* @__PURE__ */ t(
2
+ import { jsx as c, jsxs as y, Fragment as te } from "react/jsx-runtime";
3
+ import { forwardRef as ce, useState as M, useRef as V, useEffect as ne, useCallback as z, createContext as $e, useContext as Se, useMemo as F, useReducer as lt } from "react";
4
+ function ut(e) {
5
+ const { className: t = "" } = e;
6
+ return /* @__PURE__ */ c(
7
7
  "svg",
8
8
  {
9
- className: s,
9
+ className: t,
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  viewBox: "0 0 512 512",
12
12
  fill: "currentColor",
13
- 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" })
13
+ children: /* @__PURE__ */ c("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" })
14
14
  }
15
15
  );
16
16
  }
17
- function re(e) {
18
- const { className: s = "" } = e;
19
- return /* @__PURE__ */ t(
17
+ function dt(e) {
18
+ const { className: t = "" } = e;
19
+ return /* @__PURE__ */ c(
20
20
  "svg",
21
21
  {
22
- className: s,
22
+ className: t,
23
23
  xmlns: "http://www.w3.org/2000/svg",
24
24
  viewBox: "0 0 512 512",
25
25
  fill: "currentColor",
26
- 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" })
26
+ children: /* @__PURE__ */ c("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" })
27
27
  }
28
28
  );
29
29
  }
30
- function le(e) {
31
- const { className: s = "" } = e;
32
- return /* @__PURE__ */ t(
30
+ function ft(e) {
31
+ const { className: t = "" } = e;
32
+ return /* @__PURE__ */ c(
33
33
  "svg",
34
34
  {
35
- className: s,
35
+ className: t,
36
36
  xmlns: "http://www.w3.org/2000/svg",
37
37
  viewBox: "0 0 320 512",
38
38
  fill: "currentColor",
39
- 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" })
39
+ children: /* @__PURE__ */ c("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" })
40
40
  }
41
41
  );
42
42
  }
43
- function oe(e) {
44
- const { className: s = "" } = e;
45
- return /* @__PURE__ */ t(
43
+ function ht(e) {
44
+ const { className: t = "" } = e;
45
+ return /* @__PURE__ */ c(
46
46
  "svg",
47
47
  {
48
- className: s,
48
+ className: t,
49
49
  xmlns: "http://www.w3.org/2000/svg",
50
50
  viewBox: "0 0 320 512",
51
51
  fill: "currentColor",
52
- 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" })
52
+ children: /* @__PURE__ */ c("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" })
53
53
  }
54
54
  );
55
55
  }
56
- const ce = (e) => {
57
- const { className: s = "" } = e;
58
- return /* @__PURE__ */ t("svg", { className: s, 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" }) });
56
+ const pt = (e) => {
57
+ const { className: t = "" } = e;
58
+ return /* @__PURE__ */ c("svg", { className: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ c("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" }) });
59
59
  };
60
- function Q(e) {
61
- const { className: s = "" } = e;
62
- return /* @__PURE__ */ t(
60
+ function ke(e) {
61
+ const { className: t = "" } = e;
62
+ return /* @__PURE__ */ c(
63
63
  "svg",
64
64
  {
65
- className: s,
65
+ className: t,
66
66
  xmlns: "http://www.w3.org/2000/svg",
67
67
  viewBox: "0 0 384 512",
68
68
  fill: "currentColor",
69
- 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" })
69
+ children: /* @__PURE__ */ c("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" })
70
+ }
71
+ );
72
+ }
73
+ function mt(e) {
74
+ const { className: t = "" } = e;
75
+ return /* @__PURE__ */ c(
76
+ "svg",
77
+ {
78
+ className: t,
79
+ xmlns: "http://www.w3.org/2000/svg",
80
+ viewBox: "0 0 640 640",
81
+ fill: "currentColor",
82
+ children: /* @__PURE__ */ c("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" })
70
83
  }
71
84
  );
72
85
  }
73
- var I = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(I || {});
74
- const X = (e) => {
86
+ var ie = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(ie || {});
87
+ const qe = (e) => {
75
88
  switch (e) {
76
89
  case "error":
77
90
  return "input-error";
@@ -80,7 +93,7 @@ const X = (e) => {
80
93
  default:
81
94
  return "input-normal";
82
95
  }
83
- }, Y = (e) => {
96
+ }, Ke = (e) => {
84
97
  switch (e) {
85
98
  case "error":
86
99
  return "input-label-error";
@@ -89,7 +102,7 @@ const X = (e) => {
89
102
  default:
90
103
  return "input-label-normal";
91
104
  }
92
- }, Z = (e) => {
105
+ }, Ye = (e) => {
93
106
  switch (e) {
94
107
  case "error":
95
108
  return "input-helper-text-error";
@@ -99,398 +112,1377 @@ const X = (e) => {
99
112
  return "input-helper-text-normal";
100
113
  }
101
114
  };
102
- const V = H(function(e, s) {
115
+ const Ee = ce(function(e, t) {
103
116
  const {
104
- value: l,
117
+ value: r,
105
118
  onChange: n,
106
- options: r,
107
- containerClassName: a = "",
108
- inputClassName: o = "",
109
- labelClassName: i = "",
110
- helperText: c = "",
111
- helperTextClassName: m = "",
119
+ options: a,
120
+ containerClassName: s = "",
121
+ inputClassName: l = "",
122
+ labelClassName: o = "",
123
+ helperText: i = "",
124
+ helperTextClassName: f = "",
112
125
  placeholder: u = "",
113
126
  label: d = "",
114
- name: N = "",
115
- id: g = "",
116
- state: C = I.default,
117
- children: f,
118
- ...p
127
+ name: b = "",
128
+ id: v = "",
129
+ state: g = ie.default,
130
+ children: p,
131
+ ...h
119
132
  } = e;
120
- return /* @__PURE__ */ b("div", { className: `select-input-container ${a}`, children: [
121
- /* @__PURE__ */ t(
133
+ return /* @__PURE__ */ y("div", { className: `select-input-container ${s}`, children: [
134
+ /* @__PURE__ */ c(
122
135
  "select",
123
136
  {
124
- ...p,
125
- id: g,
126
- ref: s,
127
- name: N,
128
- value: l,
137
+ ...h,
138
+ id: v,
139
+ ref: t,
140
+ name: b,
141
+ value: r,
129
142
  onChange: n,
130
- className: `select-input ${X(C)} peer ${o}`,
131
- children: r == null ? void 0 : r.map((v) => /* @__PURE__ */ t("option", { value: v.id, children: v.value ?? v.name ?? v.id }, v.id))
143
+ className: `select-input ${qe(g)} peer ${l}`,
144
+ children: a == null ? void 0 : a.map((m) => /* @__PURE__ */ c("option", { value: m.id, children: m.value ?? m.name ?? m.id }, m.id))
132
145
  }
133
146
  ),
134
- /* @__PURE__ */ t(
147
+ /* @__PURE__ */ c(
135
148
  "label",
136
149
  {
137
- htmlFor: N,
138
- className: `select-input-label ${Y(C)} ${i}`,
150
+ htmlFor: b,
151
+ className: `select-input-label ${Ke(g)} ${o}`,
139
152
  children: d
140
153
  }
141
154
  ),
142
- f,
143
- /* @__PURE__ */ t(
155
+ p,
156
+ (u || i) && /* @__PURE__ */ c(
144
157
  "p",
145
158
  {
146
- className: `select-input-helper-text ${Z(C)} ${m}`,
147
- children: C !== "error" && C !== "good" ? u : c
159
+ className: `select-input-helper-text ${Ye(g)} ${f}`,
160
+ children: g !== "error" && g !== "good" ? u : i
148
161
  }
149
162
  )
150
163
  ] });
151
164
  });
152
- const U = H(function(e, s) {
165
+ const he = ce(function(e, t) {
153
166
  const {
154
- children: l,
155
- state: n = I.default,
156
- label: r = "",
157
- containerClassName: a = "",
158
- inputClassName: o = "",
159
- labelClassName: i = "",
160
- helperText: c = "",
161
- helperTextClassName: m = "",
167
+ children: r,
168
+ state: n = ie.default,
169
+ label: a = "",
170
+ containerClassName: s = "",
171
+ inputClassName: l = "",
172
+ labelClassName: o = "",
173
+ helperText: i = "",
174
+ helperTextClassName: f = "",
162
175
  value: u = "",
163
176
  ...d
164
177
  } = e;
165
- return /* @__PURE__ */ b("div", { className: `text-input-container ${a}`, children: [
166
- /* @__PURE__ */ t(
178
+ return /* @__PURE__ */ y("div", { className: `text-input-container ${s}`, children: [
179
+ /* @__PURE__ */ c(
167
180
  "input",
168
181
  {
169
- ref: s,
182
+ ref: t,
170
183
  value: u,
171
- className: `text-input ${X(n)} peer ${o} ${u ? "has-value" : ""} ${d.placeholder ? "has-placeholder" : ""}`,
184
+ className: `text-input ${qe(n)} peer ${l} ${u ? "has-value" : ""} ${d.placeholder ? "has-placeholder" : ""}`,
172
185
  ...d
173
186
  }
174
187
  ),
175
- !!r && /* @__PURE__ */ b(
188
+ !!a && /* @__PURE__ */ y(
176
189
  "label",
177
190
  {
178
191
  htmlFor: d.name,
179
- className: `text-input-label ${Y(n)} ${i}`,
192
+ className: `text-input-label ${Ke(n)} ${o}`,
180
193
  children: [
181
- r,
194
+ a,
182
195
  d.required ? " *" : ""
183
196
  ]
184
197
  }
185
198
  ),
186
- l,
187
- !!c && /* @__PURE__ */ t(
199
+ r,
200
+ !!i && /* @__PURE__ */ c(
188
201
  "p",
189
202
  {
190
- className: `text-input-helper-text ${Z(n)} ${m}`,
191
- children: c
203
+ className: `text-input-helper-text ${Ye(n)} ${f}`,
204
+ children: i
192
205
  }
193
206
  )
194
207
  ] });
195
208
  });
196
- const ie = H(function(e, s) {
209
+ const bt = ce(function(e, t) {
197
210
  const {
198
- checked: l,
211
+ checked: r,
199
212
  onChange: n,
200
- state: r = I.default,
201
- name: a = "",
202
- id: o = "",
203
- type: i = "text",
204
- label: c = "",
205
- containerClassName: m = "",
213
+ state: a = ie.default,
214
+ name: s = "",
215
+ id: l = "",
216
+ type: o = "text",
217
+ label: i = "",
218
+ containerClassName: f = "",
206
219
  inputClassName: u = "",
207
220
  labelClassName: d = "",
208
- helperText: N = "",
209
- helperTextClassName: g = "",
210
- ...C
221
+ helperText: b = "",
222
+ helperTextClassName: v = "",
223
+ ...g
211
224
  } = e;
212
- return /* @__PURE__ */ b("label", { className: `input-check-container ${m}`, children: [
213
- /* @__PURE__ */ t(
225
+ return /* @__PURE__ */ y("label", { className: `input-check-container ${f}`, children: [
226
+ /* @__PURE__ */ c(
214
227
  "input",
215
228
  {
216
- id: o,
217
- ref: s,
218
- name: a,
229
+ id: l,
230
+ ref: t,
231
+ name: s,
219
232
  type: "checkbox",
220
- checked: l,
233
+ checked: r,
221
234
  onChange: n,
222
235
  className: `input-check ${u}`,
223
- ...C
236
+ ...g
224
237
  }
225
238
  ),
226
- /* @__PURE__ */ t("span", { className: `input-check-label ${d}`, children: c })
239
+ /* @__PURE__ */ c("span", { className: `input-check-label ${d}`, children: i })
227
240
  ] });
228
241
  });
229
- const de = H(function(e, s) {
242
+ var gt = !1;
243
+ function vt(e) {
244
+ if (e.sheet)
245
+ return e.sheet;
246
+ for (var t = 0; t < document.styleSheets.length; t++)
247
+ if (document.styleSheets[t].ownerNode === e)
248
+ return document.styleSheets[t];
249
+ }
250
+ function Ct(e) {
251
+ var t = document.createElement("style");
252
+ 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;
253
+ }
254
+ var wt = /* @__PURE__ */ function() {
255
+ function e(r) {
256
+ var n = this;
257
+ this._insertTag = function(a) {
258
+ var s;
259
+ 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);
260
+ }, this.isSpeedy = r.speedy === void 0 ? !gt : 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;
261
+ }
262
+ var t = e.prototype;
263
+ return t.hydrate = function(n) {
264
+ n.forEach(this._insertTag);
265
+ }, t.insert = function(n) {
266
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Ct(this));
267
+ var a = this.tags[this.tags.length - 1];
268
+ if (this.isSpeedy) {
269
+ var s = vt(a);
270
+ try {
271
+ s.insertRule(n, s.cssRules.length);
272
+ } catch {
273
+ }
274
+ } else
275
+ a.appendChild(document.createTextNode(n));
276
+ this.ctr++;
277
+ }, t.flush = function() {
278
+ this.tags.forEach(function(n) {
279
+ var a;
280
+ return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
281
+ }), this.tags = [], this.ctr = 0;
282
+ }, e;
283
+ }(), O = "-ms-", pe = "-moz-", x = "-webkit-", Ze = "comm", Ae = "rule", Pe = "decl", Nt = "@import", Je = "@keyframes", yt = "@layer", xt = Math.abs, me = String.fromCharCode, $t = Object.assign;
284
+ function St(e, t) {
285
+ return T(e, 0) ^ 45 ? (((t << 2 ^ T(e, 0)) << 2 ^ T(e, 1)) << 2 ^ T(e, 2)) << 2 ^ T(e, 3) : 0;
286
+ }
287
+ function Qe(e) {
288
+ return e.trim();
289
+ }
290
+ function kt(e, t) {
291
+ return (e = t.exec(e)) ? e[0] : e;
292
+ }
293
+ function $(e, t, r) {
294
+ return e.replace(t, r);
295
+ }
296
+ function Ne(e, t) {
297
+ return e.indexOf(t);
298
+ }
299
+ function T(e, t) {
300
+ return e.charCodeAt(t) | 0;
301
+ }
302
+ function re(e, t, r) {
303
+ return e.slice(t, r);
304
+ }
305
+ function W(e) {
306
+ return e.length;
307
+ }
308
+ function Te(e) {
309
+ return e.length;
310
+ }
311
+ function le(e, t) {
312
+ return t.push(e), e;
313
+ }
314
+ function Et(e, t) {
315
+ return e.map(t).join("");
316
+ }
317
+ var be = 1, J = 1, Xe = 0, L = 0, A = 0, Q = "";
318
+ function ge(e, t, r, n, a, s, l) {
319
+ return { value: e, root: t, parent: r, type: n, props: a, children: s, line: be, column: J, length: l, return: "" };
320
+ }
321
+ function ee(e, t) {
322
+ return $t(ge("", null, null, "", null, null, 0), e, { length: -e.length }, t);
323
+ }
324
+ function At() {
325
+ return A;
326
+ }
327
+ function Pt() {
328
+ return A = L > 0 ? T(Q, --L) : 0, J--, A === 10 && (J = 1, be--), A;
329
+ }
330
+ function D() {
331
+ return A = L < Xe ? T(Q, L++) : 0, J++, A === 10 && (J = 1, be++), A;
332
+ }
333
+ function _() {
334
+ return T(Q, L);
335
+ }
336
+ function ue() {
337
+ return L;
338
+ }
339
+ function oe(e, t) {
340
+ return re(Q, e, t);
341
+ }
342
+ function ae(e) {
343
+ switch (e) {
344
+ case 0:
345
+ case 9:
346
+ case 10:
347
+ case 13:
348
+ case 32:
349
+ return 5;
350
+ case 33:
351
+ case 43:
352
+ case 44:
353
+ case 47:
354
+ case 62:
355
+ case 64:
356
+ case 126:
357
+ case 59:
358
+ case 123:
359
+ case 125:
360
+ return 4;
361
+ case 58:
362
+ return 3;
363
+ case 34:
364
+ case 39:
365
+ case 40:
366
+ case 91:
367
+ return 2;
368
+ case 41:
369
+ case 93:
370
+ return 1;
371
+ }
372
+ return 0;
373
+ }
374
+ function et(e) {
375
+ return be = J = 1, Xe = W(Q = e), L = 0, [];
376
+ }
377
+ function tt(e) {
378
+ return Q = "", e;
379
+ }
380
+ function de(e) {
381
+ return Qe(oe(L - 1, ye(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
382
+ }
383
+ function Tt(e) {
384
+ for (; (A = _()) && A < 33; )
385
+ D();
386
+ return ae(e) > 2 || ae(A) > 3 ? "" : " ";
387
+ }
388
+ function Ot(e, t) {
389
+ for (; --t && D() && !(A < 48 || A > 102 || A > 57 && A < 65 || A > 70 && A < 97); )
390
+ ;
391
+ return oe(e, ue() + (t < 6 && _() == 32 && D() == 32));
392
+ }
393
+ function ye(e) {
394
+ for (; D(); )
395
+ switch (A) {
396
+ case e:
397
+ return L;
398
+ case 34:
399
+ case 39:
400
+ e !== 34 && e !== 39 && ye(A);
401
+ break;
402
+ case 40:
403
+ e === 41 && ye(e);
404
+ break;
405
+ case 92:
406
+ D();
407
+ break;
408
+ }
409
+ return L;
410
+ }
411
+ function Ft(e, t) {
412
+ for (; D() && e + A !== 47 + 10; )
413
+ if (e + A === 42 + 42 && _() === 47)
414
+ break;
415
+ return "/*" + oe(t, L - 1) + "*" + me(e === 47 ? e : D());
416
+ }
417
+ function Lt(e) {
418
+ for (; !ae(_()); )
419
+ D();
420
+ return oe(e, L);
421
+ }
422
+ function Rt(e) {
423
+ return tt(fe("", null, null, null, [""], e = et(e), 0, [0], e));
424
+ }
425
+ function fe(e, t, r, n, a, s, l, o, i) {
426
+ for (var f = 0, u = 0, d = l, b = 0, v = 0, g = 0, p = 1, h = 1, m = 1, N = 0, k = "", E = a, S = s, P = n, w = k; h; )
427
+ switch (g = N, N = D()) {
428
+ case 40:
429
+ if (g != 108 && T(w, d - 1) == 58) {
430
+ Ne(w += $(de(N), "&", "&\f"), "&\f") != -1 && (m = -1);
431
+ break;
432
+ }
433
+ case 34:
434
+ case 39:
435
+ case 91:
436
+ w += de(N);
437
+ break;
438
+ case 9:
439
+ case 10:
440
+ case 13:
441
+ case 32:
442
+ w += Tt(g);
443
+ break;
444
+ case 92:
445
+ w += Ot(ue() - 1, 7);
446
+ continue;
447
+ case 47:
448
+ switch (_()) {
449
+ case 42:
450
+ case 47:
451
+ le(zt(Ft(D(), ue()), t, r), i);
452
+ break;
453
+ default:
454
+ w += "/";
455
+ }
456
+ break;
457
+ case 123 * p:
458
+ o[f++] = W(w) * m;
459
+ case 125 * p:
460
+ case 59:
461
+ case 0:
462
+ switch (N) {
463
+ case 0:
464
+ case 125:
465
+ h = 0;
466
+ case 59 + u:
467
+ m == -1 && (w = $(w, /\f/g, "")), v > 0 && W(w) - d && le(v > 32 ? Ie(w + ";", n, r, d - 1) : Ie($(w, " ", "") + ";", n, r, d - 2), i);
468
+ break;
469
+ case 59:
470
+ w += ";";
471
+ default:
472
+ if (le(P = Me(w, t, r, f, u, a, o, k, E = [], S = [], d), s), N === 123)
473
+ if (u === 0)
474
+ fe(w, t, P, P, E, s, d, o, S);
475
+ else
476
+ switch (b === 99 && T(w, 3) === 110 ? 100 : b) {
477
+ case 100:
478
+ case 108:
479
+ case 109:
480
+ case 115:
481
+ fe(e, P, P, n && le(Me(e, P, P, 0, 0, a, o, k, a, E = [], d), S), a, S, d, o, n ? E : S);
482
+ break;
483
+ default:
484
+ fe(w, P, P, P, [""], S, 0, o, S);
485
+ }
486
+ }
487
+ f = u = v = 0, p = m = 1, k = w = "", d = l;
488
+ break;
489
+ case 58:
490
+ d = 1 + W(w), v = g;
491
+ default:
492
+ if (p < 1) {
493
+ if (N == 123)
494
+ --p;
495
+ else if (N == 125 && p++ == 0 && Pt() == 125)
496
+ continue;
497
+ }
498
+ switch (w += me(N), N * p) {
499
+ case 38:
500
+ m = u > 0 ? 1 : (w += "\f", -1);
501
+ break;
502
+ case 44:
503
+ o[f++] = (W(w) - 1) * m, m = 1;
504
+ break;
505
+ case 64:
506
+ _() === 45 && (w += de(D())), b = _(), u = d = W(k = w += Lt(ue())), N++;
507
+ break;
508
+ case 45:
509
+ g === 45 && W(w) == 2 && (p = 0);
510
+ }
511
+ }
512
+ return s;
513
+ }
514
+ function Me(e, t, r, n, a, s, l, o, i, f, u) {
515
+ for (var d = a - 1, b = a === 0 ? s : [""], v = Te(b), g = 0, p = 0, h = 0; g < n; ++g)
516
+ for (var m = 0, N = re(e, d + 1, d = xt(p = l[g])), k = e; m < v; ++m)
517
+ (k = Qe(p > 0 ? b[m] + " " + N : $(N, /&\f/g, b[m]))) && (i[h++] = k);
518
+ return ge(e, t, r, a === 0 ? Ae : o, i, f, u);
519
+ }
520
+ function zt(e, t, r) {
521
+ return ge(e, t, r, Ze, me(At()), re(e, 2, -2), 0);
522
+ }
523
+ function Ie(e, t, r, n) {
524
+ return ge(e, t, r, Pe, re(e, 0, n), re(e, n + 1, -1), n);
525
+ }
526
+ function Z(e, t) {
527
+ for (var r = "", n = Te(e), a = 0; a < n; a++)
528
+ r += t(e[a], a, e, t) || "";
529
+ return r;
530
+ }
531
+ function Dt(e, t, r, n) {
532
+ switch (e.type) {
533
+ case yt:
534
+ if (e.children.length)
535
+ break;
536
+ case Nt:
537
+ case Pe:
538
+ return e.return = e.return || e.value;
539
+ case Ze:
540
+ return "";
541
+ case Je:
542
+ return e.return = e.value + "{" + Z(e.children, n) + "}";
543
+ case Ae:
544
+ e.value = e.props.join(",");
545
+ }
546
+ return W(r = Z(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
547
+ }
548
+ function Mt(e) {
549
+ var t = Te(e);
550
+ return function(r, n, a, s) {
551
+ for (var l = "", o = 0; o < t; o++)
552
+ l += e[o](r, n, a, s) || "";
553
+ return l;
554
+ };
555
+ }
556
+ function It(e) {
557
+ return function(t) {
558
+ t.root || (t = t.return) && e(t);
559
+ };
560
+ }
561
+ function Wt(e) {
562
+ var t = /* @__PURE__ */ Object.create(null);
563
+ return function(r) {
564
+ return t[r] === void 0 && (t[r] = e(r)), t[r];
565
+ };
566
+ }
567
+ var Bt = function(t, r, n) {
568
+ for (var a = 0, s = 0; a = s, s = _(), a === 38 && s === 12 && (r[n] = 1), !ae(s); )
569
+ D();
570
+ return oe(t, L);
571
+ }, _t = function(t, r) {
572
+ var n = -1, a = 44;
573
+ do
574
+ switch (ae(a)) {
575
+ case 0:
576
+ a === 38 && _() === 12 && (r[n] = 1), t[n] += Bt(L - 1, r, n);
577
+ break;
578
+ case 2:
579
+ t[n] += de(a);
580
+ break;
581
+ case 4:
582
+ if (a === 44) {
583
+ t[++n] = _() === 58 ? "&\f" : "", r[n] = t[n].length;
584
+ break;
585
+ }
586
+ default:
587
+ t[n] += me(a);
588
+ }
589
+ while (a = D());
590
+ return t;
591
+ }, jt = function(t, r) {
592
+ return tt(_t(et(t), r));
593
+ }, We = /* @__PURE__ */ new WeakMap(), Gt = function(t) {
594
+ if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
595
+ // negative .length indicates that this rule has been already prefixed
596
+ t.length < 1)) {
597
+ for (var r = t.value, n = t.parent, a = t.column === n.column && t.line === n.line; n.type !== "rule"; )
598
+ if (n = n.parent, !n)
599
+ return;
600
+ if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !We.get(n)) && !a) {
601
+ We.set(t, !0);
602
+ for (var s = [], l = jt(r, s), o = n.props, i = 0, f = 0; i < l.length; i++)
603
+ for (var u = 0; u < o.length; u++, f++)
604
+ t.props[f] = s[i] ? l[i].replace(/&\f/g, o[u]) : o[u] + " " + l[i];
605
+ }
606
+ }
607
+ }, Ht = function(t) {
608
+ if (t.type === "decl") {
609
+ var r = t.value;
610
+ // charcode for l
611
+ r.charCodeAt(0) === 108 && // charcode for b
612
+ r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
613
+ }
614
+ };
615
+ function nt(e, t) {
616
+ switch (St(e, t)) {
617
+ case 5103:
618
+ return x + "print-" + e + e;
619
+ case 5737:
620
+ case 4201:
621
+ case 3177:
622
+ case 3433:
623
+ case 1641:
624
+ case 4457:
625
+ case 2921:
626
+ case 5572:
627
+ case 6356:
628
+ case 5844:
629
+ case 3191:
630
+ case 6645:
631
+ case 3005:
632
+ case 6391:
633
+ case 5879:
634
+ case 5623:
635
+ case 6135:
636
+ case 4599:
637
+ case 4855:
638
+ case 4215:
639
+ case 6389:
640
+ case 5109:
641
+ case 5365:
642
+ case 5621:
643
+ case 3829:
644
+ return x + e + e;
645
+ case 5349:
646
+ case 4246:
647
+ case 4810:
648
+ case 6968:
649
+ case 2756:
650
+ return x + e + pe + e + O + e + e;
651
+ case 6828:
652
+ case 4268:
653
+ return x + e + O + e + e;
654
+ case 6165:
655
+ return x + e + O + "flex-" + e + e;
656
+ case 5187:
657
+ return x + e + $(e, /(\w+).+(:[^]+)/, x + "box-$1$2" + O + "flex-$1$2") + e;
658
+ case 5443:
659
+ return x + e + O + "flex-item-" + $(e, /flex-|-self/, "") + e;
660
+ case 4675:
661
+ return x + e + O + "flex-line-pack" + $(e, /align-content|flex-|-self/, "") + e;
662
+ case 5548:
663
+ return x + e + O + $(e, "shrink", "negative") + e;
664
+ case 5292:
665
+ return x + e + O + $(e, "basis", "preferred-size") + e;
666
+ case 6060:
667
+ return x + "box-" + $(e, "-grow", "") + x + e + O + $(e, "grow", "positive") + e;
668
+ case 4554:
669
+ return x + $(e, /([^-])(transform)/g, "$1" + x + "$2") + e;
670
+ case 6187:
671
+ return $($($(e, /(zoom-|grab)/, x + "$1"), /(image-set)/, x + "$1"), e, "") + e;
672
+ case 5495:
673
+ case 3959:
674
+ return $(e, /(image-set\([^]*)/, x + "$1$`$1");
675
+ case 4968:
676
+ return $($(e, /(.+:)(flex-)?(.*)/, x + "box-pack:$3" + O + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + x + e + e;
677
+ case 4095:
678
+ case 3583:
679
+ case 4068:
680
+ case 2532:
681
+ return $(e, /(.+)-inline(.+)/, x + "$1$2") + e;
682
+ case 8116:
683
+ case 7059:
684
+ case 5753:
685
+ case 5535:
686
+ case 5445:
687
+ case 5701:
688
+ case 4933:
689
+ case 4677:
690
+ case 5533:
691
+ case 5789:
692
+ case 5021:
693
+ case 4765:
694
+ if (W(e) - 1 - t > 6)
695
+ switch (T(e, t + 1)) {
696
+ case 109:
697
+ if (T(e, t + 4) !== 45)
698
+ break;
699
+ case 102:
700
+ return $(e, /(.+:)(.+)-([^]+)/, "$1" + x + "$2-$3$1" + pe + (T(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
701
+ case 115:
702
+ return ~Ne(e, "stretch") ? nt($(e, "stretch", "fill-available"), t) + e : e;
703
+ }
704
+ break;
705
+ case 4949:
706
+ if (T(e, t + 1) !== 115)
707
+ break;
708
+ case 6444:
709
+ switch (T(e, W(e) - 3 - (~Ne(e, "!important") && 10))) {
710
+ case 107:
711
+ return $(e, ":", ":" + x) + e;
712
+ case 101:
713
+ return $(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + x + (T(e, 14) === 45 ? "inline-" : "") + "box$3$1" + x + "$2$3$1" + O + "$2box$3") + e;
714
+ }
715
+ break;
716
+ case 5936:
717
+ switch (T(e, t + 11)) {
718
+ case 114:
719
+ return x + e + O + $(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
720
+ case 108:
721
+ return x + e + O + $(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
722
+ case 45:
723
+ return x + e + O + $(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
724
+ }
725
+ return x + e + O + e + e;
726
+ }
727
+ return e;
728
+ }
729
+ var Ut = function(t, r, n, a) {
730
+ if (t.length > -1 && !t.return)
731
+ switch (t.type) {
732
+ case Pe:
733
+ t.return = nt(t.value, t.length);
734
+ break;
735
+ case Je:
736
+ return Z([ee(t, {
737
+ value: $(t.value, "@", "@" + x)
738
+ })], a);
739
+ case Ae:
740
+ if (t.length)
741
+ return Et(t.props, function(s) {
742
+ switch (kt(s, /(::plac\w+|:read-\w+)/)) {
743
+ case ":read-only":
744
+ case ":read-write":
745
+ return Z([ee(t, {
746
+ props: [$(s, /:(read-\w+)/, ":" + pe + "$1")]
747
+ })], a);
748
+ case "::placeholder":
749
+ return Z([ee(t, {
750
+ props: [$(s, /:(plac\w+)/, ":" + x + "input-$1")]
751
+ }), ee(t, {
752
+ props: [$(s, /:(plac\w+)/, ":" + pe + "$1")]
753
+ }), ee(t, {
754
+ props: [$(s, /:(plac\w+)/, O + "input-$1")]
755
+ })], a);
756
+ }
757
+ return "";
758
+ });
759
+ }
760
+ }, Vt = [Ut], qt = function(t) {
761
+ var r = t.key;
762
+ if (r === "css") {
763
+ var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
764
+ Array.prototype.forEach.call(n, function(p) {
765
+ var h = p.getAttribute("data-emotion");
766
+ h.indexOf(" ") !== -1 && (document.head.appendChild(p), p.setAttribute("data-s", ""));
767
+ });
768
+ }
769
+ var a = t.stylisPlugins || Vt, s = {}, l, o = [];
770
+ l = t.container || document.head, Array.prototype.forEach.call(
771
+ // this means we will ignore elements which don't have a space in them which
772
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
773
+ document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
774
+ function(p) {
775
+ for (var h = p.getAttribute("data-emotion").split(" "), m = 1; m < h.length; m++)
776
+ s[h[m]] = !0;
777
+ o.push(p);
778
+ }
779
+ );
780
+ var i, f = [Gt, Ht];
781
+ {
782
+ var u, d = [Dt, It(function(p) {
783
+ u.insert(p);
784
+ })], b = Mt(f.concat(a, d)), v = function(h) {
785
+ return Z(Rt(h), b);
786
+ };
787
+ i = function(h, m, N, k) {
788
+ u = N, v(h ? h + "{" + m.styles + "}" : m.styles), k && (g.inserted[m.name] = !0);
789
+ };
790
+ }
791
+ var g = {
792
+ key: r,
793
+ sheet: new wt({
794
+ key: r,
795
+ container: l,
796
+ nonce: t.nonce,
797
+ speedy: t.speedy,
798
+ prepend: t.prepend,
799
+ insertionPoint: t.insertionPoint
800
+ }),
801
+ nonce: t.nonce,
802
+ inserted: s,
803
+ registered: {},
804
+ insert: i
805
+ };
806
+ return g.sheet.hydrate(o), g;
807
+ };
808
+ function Kt(e) {
809
+ for (var t = 0, r, n = 0, a = e.length; a >= 4; ++n, a -= 4)
810
+ 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): */
811
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
812
+ r >>> 24, t = /* Math.imul(k, m): */
813
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
814
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
815
+ switch (a) {
816
+ case 3:
817
+ t ^= (e.charCodeAt(n + 2) & 255) << 16;
818
+ case 2:
819
+ t ^= (e.charCodeAt(n + 1) & 255) << 8;
820
+ case 1:
821
+ t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
822
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
823
+ }
824
+ return t ^= t >>> 13, t = /* Math.imul(h, m): */
825
+ (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
826
+ }
827
+ var Yt = {
828
+ animationIterationCount: 1,
829
+ aspectRatio: 1,
830
+ borderImageOutset: 1,
831
+ borderImageSlice: 1,
832
+ borderImageWidth: 1,
833
+ boxFlex: 1,
834
+ boxFlexGroup: 1,
835
+ boxOrdinalGroup: 1,
836
+ columnCount: 1,
837
+ columns: 1,
838
+ flex: 1,
839
+ flexGrow: 1,
840
+ flexPositive: 1,
841
+ flexShrink: 1,
842
+ flexNegative: 1,
843
+ flexOrder: 1,
844
+ gridRow: 1,
845
+ gridRowEnd: 1,
846
+ gridRowSpan: 1,
847
+ gridRowStart: 1,
848
+ gridColumn: 1,
849
+ gridColumnEnd: 1,
850
+ gridColumnSpan: 1,
851
+ gridColumnStart: 1,
852
+ msGridRow: 1,
853
+ msGridRowSpan: 1,
854
+ msGridColumn: 1,
855
+ msGridColumnSpan: 1,
856
+ fontWeight: 1,
857
+ lineHeight: 1,
858
+ opacity: 1,
859
+ order: 1,
860
+ orphans: 1,
861
+ scale: 1,
862
+ tabSize: 1,
863
+ widows: 1,
864
+ zIndex: 1,
865
+ zoom: 1,
866
+ WebkitLineClamp: 1,
867
+ // SVG-related properties
868
+ fillOpacity: 1,
869
+ floodOpacity: 1,
870
+ stopOpacity: 1,
871
+ strokeDasharray: 1,
872
+ strokeDashoffset: 1,
873
+ strokeMiterlimit: 1,
874
+ strokeOpacity: 1,
875
+ strokeWidth: 1
876
+ }, Zt = !1, Jt = /[A-Z]|^ms/g, Qt = /_EMO_([^_]+?)_([^]*?)_EMO_/g, rt = function(t) {
877
+ return t.charCodeAt(1) === 45;
878
+ }, Be = function(t) {
879
+ return t != null && typeof t != "boolean";
880
+ }, Ce = /* @__PURE__ */ Wt(function(e) {
881
+ return rt(e) ? e : e.replace(Jt, "-$&").toLowerCase();
882
+ }), _e = function(t, r) {
883
+ switch (t) {
884
+ case "animation":
885
+ case "animationName":
886
+ if (typeof r == "string")
887
+ return r.replace(Qt, function(n, a, s) {
888
+ return B = {
889
+ name: a,
890
+ styles: s,
891
+ next: B
892
+ }, a;
893
+ });
894
+ }
895
+ return Yt[t] !== 1 && !rt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
896
+ }, Xt = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
897
+ function se(e, t, r) {
898
+ if (r == null)
899
+ return "";
900
+ var n = r;
901
+ if (n.__emotion_styles !== void 0)
902
+ return n;
903
+ switch (typeof r) {
904
+ case "boolean":
905
+ return "";
906
+ case "object": {
907
+ var a = r;
908
+ if (a.anim === 1)
909
+ return B = {
910
+ name: a.name,
911
+ styles: a.styles,
912
+ next: B
913
+ }, a.name;
914
+ var s = r;
915
+ if (s.styles !== void 0) {
916
+ var l = s.next;
917
+ if (l !== void 0)
918
+ for (; l !== void 0; )
919
+ B = {
920
+ name: l.name,
921
+ styles: l.styles,
922
+ next: B
923
+ }, l = l.next;
924
+ var o = s.styles + ";";
925
+ return o;
926
+ }
927
+ return en(e, t, r);
928
+ }
929
+ case "function": {
930
+ if (e !== void 0) {
931
+ var i = B, f = r(e);
932
+ return B = i, se(e, t, f);
933
+ }
934
+ break;
935
+ }
936
+ }
937
+ var u = r;
938
+ if (t == null)
939
+ return u;
940
+ var d = t[u];
941
+ return d !== void 0 ? d : u;
942
+ }
943
+ function en(e, t, r) {
944
+ var n = "";
945
+ if (Array.isArray(r))
946
+ for (var a = 0; a < r.length; a++)
947
+ n += se(e, t, r[a]) + ";";
948
+ else
949
+ for (var s in r) {
950
+ var l = r[s];
951
+ if (typeof l != "object") {
952
+ var o = l;
953
+ t != null && t[o] !== void 0 ? n += s + "{" + t[o] + "}" : Be(o) && (n += Ce(s) + ":" + _e(s, o) + ";");
954
+ } else {
955
+ if (s === "NO_COMPONENT_SELECTOR" && Zt)
956
+ throw new Error(Xt);
957
+ if (Array.isArray(l) && typeof l[0] == "string" && (t == null || t[l[0]] === void 0))
958
+ for (var i = 0; i < l.length; i++)
959
+ Be(l[i]) && (n += Ce(s) + ":" + _e(s, l[i]) + ";");
960
+ else {
961
+ var f = se(e, t, l);
962
+ switch (s) {
963
+ case "animation":
964
+ case "animationName": {
965
+ n += Ce(s) + ":" + f + ";";
966
+ break;
967
+ }
968
+ default:
969
+ n += s + "{" + f + "}";
970
+ }
971
+ }
972
+ }
973
+ }
974
+ return n;
975
+ }
976
+ var je = /label:\s*([^\s;{]+)\s*(;|$)/g, B;
977
+ function we(e, t, r) {
978
+ if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
979
+ return e[0];
980
+ var n = !0, a = "";
981
+ B = void 0;
982
+ var s = e[0];
983
+ if (s == null || s.raw === void 0)
984
+ n = !1, a += se(r, t, s);
985
+ else {
986
+ var l = s;
987
+ a += l[0];
988
+ }
989
+ for (var o = 1; o < e.length; o++)
990
+ if (a += se(r, t, e[o]), n) {
991
+ var i = s;
992
+ a += i[o];
993
+ }
994
+ je.lastIndex = 0;
995
+ for (var f = "", u; (u = je.exec(a)) !== null; )
996
+ f += "-" + u[1];
997
+ var d = Kt(a) + f;
998
+ return {
999
+ name: d,
1000
+ styles: a,
1001
+ next: B
1002
+ };
1003
+ }
1004
+ var tn = !0;
1005
+ function at(e, t, r) {
1006
+ var n = "";
1007
+ return r.split(" ").forEach(function(a) {
1008
+ e[a] !== void 0 ? t.push(e[a] + ";") : a && (n += a + " ");
1009
+ }), n;
1010
+ }
1011
+ var nn = function(t, r, n) {
1012
+ var a = t.key + "-" + r.name;
1013
+ // we only need to add the styles to the registered cache if the
1014
+ // class name could be used further down
1015
+ // the tree but if it's a string tag, we know it won't
1016
+ // so we don't have to add it to registered cache.
1017
+ // this improves memory usage since we can avoid storing the whole style string
1018
+ (n === !1 || // we need to always store it if we're in compat mode and
1019
+ // in node since emotion-server relies on whether a style is in
1020
+ // the registered cache to know whether a style is global or not
1021
+ // also, note that this check will be dead code eliminated in the browser
1022
+ tn === !1) && t.registered[a] === void 0 && (t.registered[a] = r.styles);
1023
+ }, rn = function(t, r, n) {
1024
+ nn(t, r, n);
1025
+ var a = t.key + "-" + r.name;
1026
+ if (t.inserted[r.name] === void 0) {
1027
+ var s = r;
1028
+ do
1029
+ t.insert(r === s ? "." + a : "", s, t.sheet, !0), s = s.next;
1030
+ while (s !== void 0);
1031
+ }
1032
+ };
1033
+ function Ge(e, t) {
1034
+ if (e.inserted[t.name] === void 0)
1035
+ return e.insert("", t, e.sheet, !0);
1036
+ }
1037
+ function He(e, t, r) {
1038
+ var n = [], a = at(e, n, r);
1039
+ return n.length < 2 ? r : a + t(n);
1040
+ }
1041
+ var an = function(t) {
1042
+ var r = qt(t);
1043
+ r.sheet.speedy = function(o) {
1044
+ this.isSpeedy = o;
1045
+ }, r.compat = !0;
1046
+ var n = function() {
1047
+ for (var i = arguments.length, f = new Array(i), u = 0; u < i; u++)
1048
+ f[u] = arguments[u];
1049
+ var d = we(f, r.registered, void 0);
1050
+ return rn(r, d, !1), r.key + "-" + d.name;
1051
+ }, a = function() {
1052
+ for (var i = arguments.length, f = new Array(i), u = 0; u < i; u++)
1053
+ f[u] = arguments[u];
1054
+ var d = we(f, r.registered), b = "animation-" + d.name;
1055
+ return Ge(r, {
1056
+ name: d.name,
1057
+ styles: "@keyframes " + b + "{" + d.styles + "}"
1058
+ }), b;
1059
+ }, s = function() {
1060
+ for (var i = arguments.length, f = new Array(i), u = 0; u < i; u++)
1061
+ f[u] = arguments[u];
1062
+ var d = we(f, r.registered);
1063
+ Ge(r, d);
1064
+ }, l = function() {
1065
+ for (var i = arguments.length, f = new Array(i), u = 0; u < i; u++)
1066
+ f[u] = arguments[u];
1067
+ return He(r.registered, n, sn(f));
1068
+ };
1069
+ return {
1070
+ css: n,
1071
+ cx: l,
1072
+ injectGlobal: s,
1073
+ keyframes: a,
1074
+ hydrate: function(i) {
1075
+ i.forEach(function(f) {
1076
+ r.inserted[f] = !0;
1077
+ });
1078
+ },
1079
+ flush: function() {
1080
+ r.registered = {}, r.inserted = {}, r.sheet.flush();
1081
+ },
1082
+ sheet: r.sheet,
1083
+ cache: r,
1084
+ getRegisteredStyles: at.bind(null, r.registered),
1085
+ merge: He.bind(null, r.registered, n)
1086
+ };
1087
+ }, sn = function e(t) {
1088
+ for (var r = "", n = 0; n < t.length; n++) {
1089
+ var a = t[n];
1090
+ if (a != null) {
1091
+ var s = void 0;
1092
+ switch (typeof a) {
1093
+ case "boolean":
1094
+ break;
1095
+ case "object": {
1096
+ if (Array.isArray(a))
1097
+ s = e(a);
1098
+ else {
1099
+ s = "";
1100
+ for (var l in a)
1101
+ a[l] && l && (s && (s += " "), s += l);
1102
+ }
1103
+ break;
1104
+ }
1105
+ default:
1106
+ s = a;
1107
+ }
1108
+ s && (r && (r += " "), r += s);
1109
+ }
1110
+ }
1111
+ return r;
1112
+ }, cn = an({
1113
+ key: "css"
1114
+ }), on = cn.css;
1115
+ const ln = ce(function(e, t) {
1116
+ var Le, Re, ze;
230
1117
  const {
231
- state: l,
1118
+ state: r,
232
1119
  value: n,
233
- onChange: r,
234
- options: a = [],
235
- name: o = "",
236
- id: i = "",
237
- label: c = "",
238
- containerClassName: m = "",
1120
+ onChange: a,
1121
+ options: s = [],
1122
+ name: l = "",
1123
+ id: o = "",
1124
+ label: i = "",
1125
+ containerClassName: f = "",
239
1126
  inputContainerClassName: u = "",
240
1127
  helperText: d = "",
241
- placeholder: N = "",
242
- multiple: g = !1,
243
- ...C
244
- } = e, [f, p] = F(""), [v, y] = F(!1), k = a.filter((h) => {
245
- const $ = String(h.value).toLowerCase().includes(f == null ? void 0 : f.toLowerCase());
246
- return n && n.length ? n != null && n.some ? !(n != null && n.some((W) => W.id === h.id)) : (n == null ? void 0 : n.id) !== h.id : $;
247
- }), L = A(null);
248
- R(() => {
249
- const h = (T) => {
250
- L.current && !L.current.contains(T.target) && y(!1);
251
- }, $ = (T) => {
252
- T.key === "Escape" && y(!1);
1128
+ placeholder: b = "",
1129
+ multiple: v = !1,
1130
+ ...g
1131
+ } = e, [p, h] = M(""), [m, N] = M(!1), k = s.filter((C) => {
1132
+ const R = String(C.value ?? C.name).toLowerCase().includes(p == null ? void 0 : p.toLowerCase());
1133
+ return n && n.length ? n != null && n.some ? !(n != null && n.some((K) => K.id === C.id)) : (n == null ? void 0 : n.id) !== C.id : R;
1134
+ }), E = V(null), S = V(null), [P, w] = M(!1), Oe = V(null);
1135
+ ne(() => {
1136
+ const C = (I) => {
1137
+ E.current && !E.current.contains(I.target) && N(!1);
1138
+ }, R = (I) => {
1139
+ I.key === "Escape" && N(!1);
253
1140
  };
254
- return document.addEventListener("mousedown", h), document.addEventListener("keydown", $), () => {
255
- document.removeEventListener("mousedown", h), document.removeEventListener("keydown", $);
1141
+ return document.addEventListener("mousedown", C), document.addEventListener("keydown", R), () => {
1142
+ document.removeEventListener("mousedown", C), document.removeEventListener("keydown", R);
256
1143
  };
257
1144
  }, []);
258
- const P = (h) => {
259
- p(h.target.value);
260
- }, M = x(
261
- (h) => {
262
- p(""), h ? g ? Array.isArray(n) && n.length ? r([...n, h]) : r([h]) : r(h) : r(null), y(!1);
1145
+ const ot = (C) => {
1146
+ h(C.target.value);
1147
+ }, Fe = z(
1148
+ (C) => {
1149
+ h(""), C ? v ? Array.isArray(n) && n.length ? a([...n, C]) : a([C]) : a(C) : a(null), N(!1);
263
1150
  },
264
- [g, r, n]
265
- ), B = x(
266
- (h) => {
267
- const $ = n.filter((T, W) => W !== h);
268
- $.length ? r($) : r(null);
1151
+ [v, a, n]
1152
+ ), ve = z(
1153
+ (C) => {
1154
+ if (C != null) {
1155
+ const R = n.filter((I, K) => K !== C);
1156
+ R.length ? a(R) : a(null);
1157
+ } else
1158
+ a(null);
269
1159
  },
270
- [r, n]
1160
+ [a, n]
271
1161
  );
272
- return /* @__PURE__ */ b(
1162
+ return ne(() => {
1163
+ var I, K, De;
1164
+ const C = ((I = Oe.current) == null ? void 0 : I.offsetWidth) ?? 0, R = ((De = (K = t ?? S) == null ? void 0 : K.current) == null ? void 0 : De.offsetWidth) ?? 0;
1165
+ C > R * 0.4 ? w(!0) : w(!1);
1166
+ }, [n]), /* @__PURE__ */ y(
273
1167
  "div",
274
1168
  {
275
- className: `autocomplete-input-container ${m}`,
276
- ref: L,
1169
+ className: `autocomplete-input-container ${f}`,
1170
+ ref: E,
277
1171
  children: [
278
- /* @__PURE__ */ t(
279
- U,
280
- {
281
- state: l,
282
- name: o,
283
- id: i,
284
- value: !g && n ? n.value ?? n.name : f,
285
- onChange: P,
286
- placeholder: N,
287
- helperText: d,
288
- onFocus: () => y(!0),
289
- label: c,
290
- containerClassName: `autocomplete-text-input ${u}`,
291
- ref: s,
292
- ...C,
293
- children: !g && n && /* @__PURE__ */ t(
294
- "button",
1172
+ /* @__PURE__ */ y("div", { className: "autocomplete-value-input-container", children: [
1173
+ /* @__PURE__ */ c(
1174
+ he,
1175
+ {
1176
+ state: r,
1177
+ name: l,
1178
+ id: o,
1179
+ value: !v && n ? n.value ?? n.name : p,
1180
+ onChange: ot,
1181
+ placeholder: b,
1182
+ helperText: d,
1183
+ onFocus: () => N(!0),
1184
+ label: i,
1185
+ containerClassName: `autocomplete-text-input ${u}`,
1186
+ ref: t ?? S,
1187
+ ...g,
1188
+ children: ((n == null ? void 0 : n.value) || (n == null ? void 0 : n.name)) && !v && /* @__PURE__ */ c(
1189
+ "button",
1190
+ {
1191
+ type: "button",
1192
+ className: "autocomplete-delete-button",
1193
+ onClick: (C) => {
1194
+ Fe(), C.stopPropagation();
1195
+ },
1196
+ children: /* @__PURE__ */ c(ke, {})
1197
+ }
1198
+ )
1199
+ }
1200
+ ),
1201
+ v && Array.isArray(n) && n.length ? /* @__PURE__ */ c("ul", { ref: Oe, className: "autocomplete-value-container", children: P ? /* @__PURE__ */ y(te, { children: [
1202
+ /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
1203
+ q,
295
1204
  {
296
- type: "button",
297
- className: "autocomplete-delete-button",
298
- onClick: (h) => {
299
- M(), h.stopPropagation();
300
- },
301
- children: /* @__PURE__ */ t(Q, {})
1205
+ label: ((Le = n[0]) == null ? void 0 : Le.value) ?? ((Re = n[0]) == null ? void 0 : Re.name),
1206
+ onDelete: (C) => {
1207
+ ve(0), C.stopPropagation();
1208
+ }
1209
+ }
1210
+ ) }),
1211
+ n.length > 1 && /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
1212
+ q,
1213
+ {
1214
+ label: `+${n.length - 1}`,
1215
+ onDelete: (C) => {
1216
+ ve(), C.stopPropagation();
1217
+ }
1218
+ }
1219
+ ) })
1220
+ ] }) : n.map((C, R) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
1221
+ q,
1222
+ {
1223
+ label: String(C.value ?? C.name),
1224
+ onDelete: (I) => {
1225
+ ve(R), I.stopPropagation();
302
1226
  }
303
- )
304
- }
305
- ),
306
- v && /* @__PURE__ */ t("ul", { className: "autocomplete-suggestions-container", children: k.map((h) => /* @__PURE__ */ t(
307
- "li",
308
- {
309
- className: "autocomplete-suggestion-item",
310
- onClick: ($) => {
311
- M(h), $.stopPropagation();
312
- },
313
- children: h.value ?? h.name
314
- },
315
- h.id ?? h.value ?? h.name
316
- )) }),
317
- g && Array.isArray(n) && n.length ? /* @__PURE__ */ t("ul", { className: "autocomplete-value-container", children: n.map((h, $) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
318
- G,
319
- {
320
- label: String(h.value ?? h.name),
321
- onDelete: (T) => {
322
- B($), T.stopPropagation();
323
1227
  }
1228
+ ) }, C.id ?? C.value ?? C.name)) }) : null
1229
+ ] }),
1230
+ m && /* @__PURE__ */ c(
1231
+ "ul",
1232
+ {
1233
+ className: `autocomplete-suggestions-container ${on({ width: (ze = E.current) == null ? void 0 : ze.offsetWidth })}`,
1234
+ children: k.map((C) => /* @__PURE__ */ c(
1235
+ "li",
1236
+ {
1237
+ className: "autocomplete-suggestion-item",
1238
+ onClick: (R) => {
1239
+ Fe(C), R.stopPropagation();
1240
+ },
1241
+ children: C.value ?? C.name
1242
+ },
1243
+ C.id ?? C.value ?? C.name
1244
+ ))
324
1245
  }
325
- ) }, h.id ?? h.value ?? h.name)) }) : null
1246
+ )
326
1247
  ]
327
1248
  }
328
1249
  );
329
1250
  });
330
- function ue(e) {
1251
+ function Ue(e, t = 25) {
1252
+ if (e.length <= t)
1253
+ return e;
1254
+ const r = e.lastIndexOf(".");
1255
+ if (r === -1)
1256
+ return e.slice(0, t - 3) + "...";
1257
+ const n = e.slice(0, r), a = e.slice(r), s = t - a.length - 3;
1258
+ return n.slice(0, s) + "..." + a;
1259
+ }
1260
+ const In = ce(function(e, t) {
1261
+ var N, k;
331
1262
  const {
332
- color: s = "stroke-blue-800",
333
- className: l = "",
1263
+ children: r,
1264
+ state: n = ie.default,
1265
+ label: a,
1266
+ containerClassName: s = "",
1267
+ inputClassName: l = "",
1268
+ labelClassName: o = "",
1269
+ helperText: i = "",
1270
+ helperTextClassName: f = "",
1271
+ iconClassName: u = "",
1272
+ value: d = "",
1273
+ multiple: b = !1,
1274
+ ...v
1275
+ } = e, [g, p] = M([]), h = (E) => {
1276
+ if (E.target.files) {
1277
+ const S = Array.from(E.target.files);
1278
+ p((P) => [...P, ...S]);
1279
+ }
1280
+ v.onChange && v.onChange(E);
1281
+ }, m = (E) => {
1282
+ p((S) => S.filter((P, w) => w !== E));
1283
+ };
1284
+ return /* @__PURE__ */ y("div", { className: `file-input-container ${s}`, children: [
1285
+ g.length === 0 && /* @__PURE__ */ y("label", { htmlFor: v.name, className: `${o}`, children: [
1286
+ a,
1287
+ /* @__PURE__ */ c(
1288
+ "input",
1289
+ {
1290
+ type: "file",
1291
+ ref: t,
1292
+ value: d,
1293
+ multiple: b,
1294
+ onChange: h,
1295
+ className: `file-input ${l}`,
1296
+ ...v
1297
+ }
1298
+ ),
1299
+ v.required ? " *" : ""
1300
+ ] }),
1301
+ g.length > 1 && /* @__PURE__ */ c("ul", { className: "file-preview-list", children: g.map((E, S) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(xe, { content: E.name, children: /* @__PURE__ */ c(
1302
+ q,
1303
+ {
1304
+ label: Ue(E.name, 25),
1305
+ onDelete: () => m(S)
1306
+ }
1307
+ ) }) }, S)) }),
1308
+ g.length === 1 && /* @__PURE__ */ y("div", { className: "file-preview", children: [
1309
+ /* @__PURE__ */ c(mt, { className: "file-icon" }),
1310
+ /* @__PURE__ */ c(xe, { content: ((N = g[0]) == null ? void 0 : N.name) ?? "", className: "!cursor-default", children: /* @__PURE__ */ c("span", { children: Ue(((k = g[0]) == null ? void 0 : k.name) ?? "", 25) }) }),
1311
+ /* @__PURE__ */ c(
1312
+ "button",
1313
+ {
1314
+ onClick: () => p([]),
1315
+ className: "chip-delete-button",
1316
+ type: "button",
1317
+ children: /* @__PURE__ */ c(ke, {})
1318
+ }
1319
+ )
1320
+ ] }),
1321
+ r,
1322
+ !!i && /* @__PURE__ */ c("p", { className: `file-input-helper-text ${f}`, children: i })
1323
+ ] });
1324
+ });
1325
+ function un(e) {
1326
+ const {
1327
+ color: t = "stroke-blue-800",
1328
+ className: r = "",
334
1329
  loaderClass: n = "",
335
- strokeWidth: r = "4",
336
- ...a
1330
+ strokeWidth: a = "4",
1331
+ ...s
337
1332
  } = e;
338
- return /* @__PURE__ */ t("div", { ...a, className: `loading ${l}`, 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(
1333
+ return /* @__PURE__ */ c("div", { ...s, className: `loading ${r}`, children: /* @__PURE__ */ c("div", { className: "loader-container", children: /* @__PURE__ */ c("div", { className: `loader ${n}`, children: /* @__PURE__ */ c("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ c(
339
1334
  "circle",
340
1335
  {
341
- className: `path ${s}`,
1336
+ className: `path ${t}`,
342
1337
  cx: "50",
343
1338
  cy: "50",
344
1339
  r: "20",
345
1340
  fill: "none",
346
- strokeWidth: r,
1341
+ strokeWidth: a,
347
1342
  strokeMiterlimit: "10"
348
1343
  }
349
1344
  ) }) }) }) });
350
1345
  }
351
- const ee = q({});
352
- function je(e) {
353
- const { children: s, t: l } = e;
354
- return /* @__PURE__ */ t(ee.Provider, { value: { t: l }, children: s });
1346
+ const st = $e({});
1347
+ function Wn(e) {
1348
+ const { children: t, t: r } = e;
1349
+ return /* @__PURE__ */ c(st.Provider, { value: { t: r }, children: t });
355
1350
  }
356
- const z = () => {
357
- const e = J(ee);
1351
+ const G = () => {
1352
+ const e = Se(st);
358
1353
  if (e === void 0)
359
1354
  throw new Error("translationContext must be used within a Provider");
360
1355
  return e;
361
1356
  };
362
- var D = /* @__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))(D || {}), O = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(O || {});
363
- const pe = [20, 50, 100], te = q({}), Re = (e) => {
364
- const { children: s } = e, [l, n] = F(0), [r, a] = F(20), [o, i] = F(0), [c, m] = F("id"), [u, d] = F(O.DESC), [N, g] = F({}), C = x(
365
- (k, L) => {
366
- let P = u;
367
- if (c === k)
1357
+ var U = /* @__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))(U || {}), Y = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(Y || {});
1358
+ const dn = [20, 50, 100], ct = $e({}), Bn = (e) => {
1359
+ const { children: t } = e, [r, n] = M(0), [a, s] = M(20), [l, o] = M(0), [i, f] = M("id"), [u, d] = M(Y.DESC), [b, v] = M({}), g = z(
1360
+ (k, E) => {
1361
+ let S = u;
1362
+ if (i === k)
368
1363
  switch (u) {
369
- case O.ASC:
370
- P = O.DESC;
1364
+ case Y.ASC:
1365
+ S = Y.DESC;
371
1366
  break;
372
1367
  default:
373
- P = O.ASC;
1368
+ S = Y.ASC;
374
1369
  break;
375
1370
  }
376
- m(k), d(P), L && L(k, P);
1371
+ f(k), d(S), E && E(k, S);
377
1372
  },
378
- [c, u]
379
- ), f = x((k) => {
380
- const L = Object.entries(k).reduce(
381
- (P, [M, B]) => (B && typeof B.value < "u" && (P[M] = B.value), P),
1373
+ [i, u]
1374
+ ), p = z((k) => {
1375
+ const E = Object.entries(k).reduce(
1376
+ (S, [P, w]) => (w && typeof w.value < "u" && (S[P] = w.value), S),
382
1377
  {}
383
1378
  );
384
- g(L);
385
- }, []), p = x((k) => {
386
- console.log(k), g({});
387
- }, []), v = w(() => Object.keys(N).length, [N]), y = {
388
- onSort: C,
389
- total: l,
1379
+ v(E);
1380
+ }, []), h = z(
1381
+ (k) => {
1382
+ k ? (delete b[k.toLowerCase()], v({ ...b })) : v({});
1383
+ },
1384
+ [b]
1385
+ ), m = F(() => Object.keys(b).length, [b]), N = {
1386
+ onSort: g,
1387
+ total: r,
390
1388
  setTotal: n,
391
- sortingBy: c,
392
- setSortingBy: m,
1389
+ sortingBy: i,
1390
+ setSortingBy: f,
393
1391
  sortingOrder: u,
394
1392
  setSortingOrder: d,
395
- pageSize: r,
396
- pageSizes: pe,
397
- setPageSize: a,
398
- currentPage: o,
399
- setCurrentPage: i,
400
- filters: N,
401
- onFilterApply: f,
402
- clearFilters: p,
403
- countOfFilters: v
1393
+ pageSize: a,
1394
+ pageSizes: dn,
1395
+ setPageSize: s,
1396
+ currentPage: l,
1397
+ setCurrentPage: o,
1398
+ filters: b,
1399
+ onFilterApply: p,
1400
+ clearFilters: h,
1401
+ countOfFilters: m
404
1402
  };
405
- return /* @__PURE__ */ t(te.Provider, { value: y, children: s });
406
- }, E = () => {
407
- const e = J(te);
1403
+ return /* @__PURE__ */ c(ct.Provider, { value: N, children: t });
1404
+ }, H = () => {
1405
+ const e = Se(ct);
408
1406
  if (e === void 0)
409
1407
  throw new Error("tableOptionsContext must be used within a Provider");
410
1408
  return e;
411
1409
  };
412
- var S = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(S || {});
413
- const he = (e) => {
1410
+ var j = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(j || {});
1411
+ const fn = (e) => {
414
1412
  if (e) {
415
- const s = {}, l = Object.keys(e);
416
- return l == null || l.forEach((n) => {
417
- s[n] = { value: e[n] };
418
- }), s;
1413
+ const t = {}, r = Object.keys(e);
1414
+ return r == null || r.forEach((n) => {
1415
+ t[n] = { value: e[n] };
1416
+ }), t;
419
1417
  }
420
1418
  return {};
421
1419
  };
422
- function me(e, s) {
423
- const { type: l } = s;
424
- switch (l) {
425
- case S.reset:
1420
+ function hn(e, t) {
1421
+ const { type: r } = t;
1422
+ switch (r) {
1423
+ case j.reset:
426
1424
  return {};
427
- case S.update: {
428
- const { toUpdate: n } = s;
1425
+ case j.update: {
1426
+ const { toUpdate: n } = t;
429
1427
  return { ...e, ...n };
430
1428
  }
431
1429
  default:
432
1430
  return e;
433
1431
  }
434
1432
  }
435
- const ne = q({}), be = (e) => {
436
- const { children: s } = e, { filters: l } = E(), [n, r] = se(
437
- me,
438
- he(l)
439
- ), a = {
1433
+ const it = $e({}), pn = (e) => {
1434
+ const { children: t } = e, { filters: r } = H(), [n, a] = lt(
1435
+ hn,
1436
+ fn(r)
1437
+ ), s = {
440
1438
  currentFilters: n,
441
- setCurrentFilters: r
1439
+ setCurrentFilters: a
442
1440
  };
443
- return /* @__PURE__ */ t(ne.Provider, { value: a, children: s });
444
- }, _ = () => {
445
- const e = J(ne);
1441
+ return /* @__PURE__ */ c(it.Provider, { value: s, children: t });
1442
+ }, X = () => {
1443
+ const e = Se(it);
446
1444
  if (e === void 0)
447
1445
  throw new Error("tableOptionsContext must be used within a Provider");
448
1446
  return e;
449
1447
  };
450
- function Ne(e) {
451
- const { t: s } = z(), { entity: l = "", columns: n = [], hasAction: r = !0, onSortCallback: a } = e, { onSort: o, sortingOrder: i, sortingBy: c } = E(), m = w(() => {
1448
+ function mn(e) {
1449
+ const { t } = G(), { entity: r = "", columns: n = [], hasAction: a = !0, onSortCallback: s } = e, { onSort: l, sortingOrder: o, sortingBy: i } = H(), f = F(() => {
452
1450
  var u;
453
- return (u = n.sort((d, N) => (N.pos ?? 0) - (d.pos ?? 0)).filter((d) => d.display !== "none")) == null ? void 0 : u.map((d) => ({
1451
+ return (u = n.sort((d, b) => (b.pos ?? 0) - (d.pos ?? 0)).filter((d) => d.display !== "none")) == null ? void 0 : u.map((d) => ({
454
1452
  id: d.key,
455
1453
  label: d.label,
456
1454
  className: d.className ?? "",
457
1455
  sortable: d.sortable ?? !0,
458
1456
  sortOptions: d.sortOptions
459
1457
  }));
460
- }, [n, l, s]);
461
- return /* @__PURE__ */ t("thead", { className: "table-headers-row", children: /* @__PURE__ */ b("tr", { children: [
462
- m.map((u) => {
463
- var d, N, g, C, f, p, v, y;
464
- return /* @__PURE__ */ t(
1458
+ }, [n, r, t]);
1459
+ return /* @__PURE__ */ c("thead", { className: "table-headers-row", children: /* @__PURE__ */ y("tr", { children: [
1460
+ f.map((u) => {
1461
+ var d, b, v, g, p, h, m, N;
1462
+ return /* @__PURE__ */ c(
465
1463
  "th",
466
1464
  {
467
1465
  scope: "col",
468
1466
  className: `table-headers-column ${u.className}`,
469
- children: /* @__PURE__ */ b(
1467
+ children: /* @__PURE__ */ y(
470
1468
  "button",
471
1469
  {
472
1470
  disabled: !u.sortable,
473
- onClick: () => o(u.id, a),
1471
+ onClick: () => l(u.id, s),
474
1472
  className: "table-headers-cell",
475
1473
  children: [
476
- /* @__PURE__ */ t("span", { className: "table-headers-label", children: u.label }),
477
- u.sortable && /* @__PURE__ */ t(
478
- "span",
1474
+ /* @__PURE__ */ c("span", { className: "table-headers-label", children: u.label }),
1475
+ u.sortable && i === u.id && /* @__PURE__ */ c("span", { children: o === Y.ASC ? ((b = (d = u.sortOptions) == null ? void 0 : d.icons) == null ? void 0 : b.asc) ?? /* @__PURE__ */ c(
1476
+ dt,
1477
+ {
1478
+ className: ((g = (v = u.sortOptions) == null ? void 0 : v.icons) == null ? void 0 : g.className) ?? "table-headers-sort-indicator"
1479
+ }
1480
+ ) : ((h = (p = u.sortOptions) == null ? void 0 : p.icons) == null ? void 0 : h.desc) ?? /* @__PURE__ */ c(
1481
+ ut,
479
1482
  {
480
- className: `${c === u.id ? "table-headers-sort-on" : "table-headers-sort"}`,
481
- children: i === O.ASC ? ((N = (d = u.sortOptions) == null ? void 0 : d.icons) == null ? void 0 : N.asc) ?? /* @__PURE__ */ t(
482
- re,
483
- {
484
- className: ((C = (g = u.sortOptions) == null ? void 0 : g.icons) == null ? void 0 : C.className) ?? "table-headers-sort-indicator"
485
- }
486
- ) : ((p = (f = u.sortOptions) == null ? void 0 : f.icons) == null ? void 0 : p.desc) ?? /* @__PURE__ */ t(
487
- ae,
488
- {
489
- className: ((y = (v = u.sortOptions) == null ? void 0 : v.icons) == null ? void 0 : y.className) ?? "table-headers-sort-indicator"
490
- }
491
- )
1483
+ className: ((N = (m = u.sortOptions) == null ? void 0 : m.icons) == null ? void 0 : N.className) ?? "table-headers-sort-indicator"
492
1484
  }
493
- )
1485
+ ) })
494
1486
  ]
495
1487
  }
496
1488
  )
@@ -498,232 +1490,290 @@ function Ne(e) {
498
1490
  u.id
499
1491
  );
500
1492
  }),
501
- r && /* @__PURE__ */ t("th", { scope: "col", className: "table-headers-action", children: s("_accessibility:labels.actions") })
1493
+ a && /* @__PURE__ */ c("th", { scope: "col", className: "table-headers-action", children: t("_accessibility:labels.actions") })
502
1494
  ] }) });
503
1495
  }
504
- function ge() {
505
- const { t: e } = z();
506
- return /* @__PURE__ */ t("div", { className: "table-empty", children: /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.empty") }) });
1496
+ function bn() {
1497
+ const { t: e } = G();
1498
+ return /* @__PURE__ */ c("div", { className: "table-empty", children: /* @__PURE__ */ c("p", { children: e("_accessibility:components.table.empty") }) });
507
1499
  }
508
- const ve = () => {
509
- const { t: e } = z(), { total: s, pageSize: l, currentPage: n, setCurrentPage: r } = E();
510
- return /* @__PURE__ */ b("div", { className: "table-navigation-pages", children: [
511
- /* @__PURE__ */ t(
1500
+ const gn = () => {
1501
+ const { t: e } = G(), { total: t, pageSize: r, currentPage: n, setCurrentPage: a } = H();
1502
+ return /* @__PURE__ */ y("div", { className: "table-navigation-pages", children: [
1503
+ /* @__PURE__ */ c(
512
1504
  "button",
513
1505
  {
514
1506
  className: "table-navigation-buttons",
515
1507
  disabled: n === 0,
516
1508
  "aria-label": e("_accessibility:buttons.previous"),
517
1509
  name: e("_accessibility:buttons.previous"),
518
- onClick: () => r(n - 1),
519
- children: /* @__PURE__ */ t(oe, { className: "w-2.5" })
1510
+ onClick: () => a(n - 1),
1511
+ children: /* @__PURE__ */ c(ht, { className: "w-2.5" })
520
1512
  }
521
1513
  ),
522
- /* @__PURE__ */ t(
1514
+ /* @__PURE__ */ c(
523
1515
  "button",
524
1516
  {
525
- disabled: Math.floor(s / ((n + 1) * l)) === 0,
1517
+ disabled: Math.floor(t / ((n + 1) * r)) === 0,
526
1518
  className: "table-navigation-buttons",
527
1519
  name: e("_accessibility:buttons.next"),
528
1520
  "aria-label": e("_accessibility:buttons.next"),
529
- onClick: () => r(n + 1),
530
- children: /* @__PURE__ */ t(le, { className: "w-2.5" })
1521
+ onClick: () => a(n + 1),
1522
+ children: /* @__PURE__ */ c(ft, { className: "w-2.5" })
531
1523
  }
532
1524
  )
533
1525
  ] });
534
- }, Ce = () => {
535
- const { t: e } = z(), { total: s, pageSize: l, pageSizes: n, currentPage: r } = E(), a = (r + 1) * l > s ? s : (r + 1) * l;
536
- return /* @__PURE__ */ b("div", { className: "table-navigation-sizes", children: [
537
- n[0] < s && /* @__PURE__ */ t(j, { children: /* @__PURE__ */ b("p", { children: [
538
- r * l + 1,
1526
+ }, vn = () => {
1527
+ const { t: e } = G(), { total: t, pageSize: r, pageSizes: n, currentPage: a } = H(), s = (a + 1) * r > t ? t : (a + 1) * r;
1528
+ return /* @__PURE__ */ y("div", { className: "table-navigation-sizes", children: [
1529
+ n[0] < t && /* @__PURE__ */ c(te, { children: /* @__PURE__ */ y("p", { children: [
1530
+ a * r + 1,
539
1531
  " - ",
540
- a,
1532
+ s,
541
1533
  " ",
542
1534
  e("_accessibility:components.table.of")
543
1535
  ] }) }),
544
- /* @__PURE__ */ t("p", { children: s })
1536
+ /* @__PURE__ */ c("p", { children: t })
545
1537
  ] });
546
1538
  };
547
- function fe() {
548
- const { t: e } = z(), { pageSizes: s, pageSize: l, setPageSize: n } = E(), r = w(
549
- () => s == null ? void 0 : s.map((a) => ({ id: a, value: a })),
550
- [s]
1539
+ function Cn() {
1540
+ const { t: e } = G(), { pageSizes: t, pageSize: r, setPageSize: n } = H(), a = F(
1541
+ () => t == null ? void 0 : t.map((s) => ({ id: s, value: s })),
1542
+ [t]
551
1543
  );
552
- return /* @__PURE__ */ b("div", { className: "page-size", children: [
553
- /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.pageSizes") }),
554
- /* @__PURE__ */ t(
555
- V,
1544
+ return /* @__PURE__ */ y("div", { className: "page-size", children: [
1545
+ /* @__PURE__ */ c("p", { children: e("_accessibility:components.table.pageSizes") }),
1546
+ /* @__PURE__ */ c(
1547
+ Ee,
556
1548
  {
557
- value: l,
558
- options: r,
1549
+ value: r,
1550
+ options: a,
559
1551
  inputClassName: "page-size-input",
560
1552
  containerClassName: "page-size-input-container",
561
1553
  helperTextClassName: "hidden",
562
- onChange: (a) => n(Number(a.target.value))
1554
+ onChange: (s) => n(Number(s.target.value))
563
1555
  }
564
1556
  )
565
1557
  ] });
566
1558
  }
567
- function we() {
568
- const { t: e } = z(), { total: s, pageSize: l, currentPage: n, setCurrentPage: r } = E(), a = w(() => {
569
- const o = Math.ceil(s / l);
570
- return Array.from({ length: o }, (i, c) => ({
571
- id: c,
572
- value: c + 1
1559
+ function wn() {
1560
+ const { t: e } = G(), { total: t, pageSize: r, currentPage: n, setCurrentPage: a } = H(), s = F(() => {
1561
+ const l = Math.ceil(t / r);
1562
+ return Array.from({ length: l }, (o, i) => ({
1563
+ id: i,
1564
+ value: i + 1
573
1565
  }));
574
- }, [s, l]);
575
- return /* @__PURE__ */ b("div", { className: "jump-to-page", children: [
576
- /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.jumpToPage") }),
577
- /* @__PURE__ */ t(
578
- V,
1566
+ }, [t, r]);
1567
+ return /* @__PURE__ */ y("div", { className: "jump-to-page", children: [
1568
+ /* @__PURE__ */ c("p", { children: e("_accessibility:components.table.jumpToPage") }),
1569
+ /* @__PURE__ */ c(
1570
+ Ee,
579
1571
  {
580
1572
  value: n,
581
- options: a,
1573
+ options: s,
582
1574
  inputClassName: "jump-to-page-input",
583
1575
  containerClassName: "jump-to-page-input-container",
584
1576
  helperTextClassName: "hidden",
585
- onChange: (o) => r(Number(o.target.value))
1577
+ onChange: (l) => a(Number(l.target.value))
586
1578
  }
587
1579
  )
588
1580
  ] });
589
1581
  }
590
- function ye() {
591
- return /* @__PURE__ */ b("div", { className: "table-footer", children: [
592
- /* @__PURE__ */ t(we, {}),
593
- /* @__PURE__ */ t(fe, {}),
594
- /* @__PURE__ */ t(Ce, {}),
595
- /* @__PURE__ */ t(ve, {})
1582
+ function Nn() {
1583
+ return /* @__PURE__ */ y("div", { className: "table-footer", children: [
1584
+ /* @__PURE__ */ c(wn, {}),
1585
+ /* @__PURE__ */ c(Cn, {}),
1586
+ /* @__PURE__ */ c(vn, {}),
1587
+ /* @__PURE__ */ c(gn, {})
596
1588
  ] });
597
1589
  }
598
- function xe(e) {
599
- const { propertyName: s, options: l, label: n } = e, { currentFilters: r, setCurrentFilters: a } = _(), o = w(() => {
600
- var c;
601
- return ((c = r[s]) == null ? void 0 : c.value) ?? l[0];
602
- }, [r]), i = x((c) => {
603
- a({
604
- type: S.update,
605
- toUpdate: { [s]: { value: c.target.value } }
1590
+ const yn = (e) => {
1591
+ const { items: t, label: r, onClearFilter: n } = e;
1592
+ return /* @__PURE__ */ c(
1593
+ q,
1594
+ {
1595
+ label: `${r}: ${t.map((a) => a.value ?? a.name).join(", ")}`,
1596
+ onDelete: () => n(r)
1597
+ }
1598
+ );
1599
+ }, xn = (e) => {
1600
+ const { end: t, start: r, label: n, onClearFilter: a } = e;
1601
+ return /* @__PURE__ */ c(
1602
+ q,
1603
+ {
1604
+ label: `${n}: ${r || "♾️"} - ${t || "♾️"}`,
1605
+ onDelete: () => a(n)
1606
+ }
1607
+ );
1608
+ };
1609
+ const $n = (e) => {
1610
+ const { filtersDefinition: t } = e, r = F(() => {
1611
+ const o = {};
1612
+ return t.forEach((i) => {
1613
+ o[i.propertyName] = i.label ?? i.propertyName;
1614
+ }), o;
1615
+ }, [t]), { filters: n, clearFilters: a } = H(), s = F(() => Object.keys(n), [n]), l = z(
1616
+ (o) => {
1617
+ var i, f;
1618
+ return n[o].end || n[o].start ? /* @__PURE__ */ c(
1619
+ xn,
1620
+ {
1621
+ label: r[o],
1622
+ start: n[o].start,
1623
+ end: n[o].end,
1624
+ onClearFilter: a
1625
+ }
1626
+ ) : Array.isArray(n[o]) ? /* @__PURE__ */ c(
1627
+ yn,
1628
+ {
1629
+ label: r[o],
1630
+ items: n[o],
1631
+ onClearFilter: a
1632
+ }
1633
+ ) : /* @__PURE__ */ c(
1634
+ q,
1635
+ {
1636
+ label: `${r[o]}: ${((i = n[o]) == null ? void 0 : i.value) ?? ((f = n[o]) == null ? void 0 : f.name) ?? n[o]}`,
1637
+ onDelete: () => a(o)
1638
+ }
1639
+ );
1640
+ },
1641
+ [n, r]
1642
+ );
1643
+ return /* @__PURE__ */ c("ul", { className: "active-filters-main", children: s == null ? void 0 : s.map((o) => /* @__PURE__ */ c("li", { children: l(o) }, o)) });
1644
+ };
1645
+ function Sn(e) {
1646
+ const { propertyName: t, options: r, label: n, placeholder: a } = e, { currentFilters: s, setCurrentFilters: l } = X(), o = F(() => {
1647
+ var f;
1648
+ return ((f = s[t]) == null ? void 0 : f.value) ?? r[0];
1649
+ }, [s]), i = z((f) => {
1650
+ l({
1651
+ type: j.update,
1652
+ toUpdate: { [t]: { value: f.target.value } }
606
1653
  });
607
1654
  }, []);
608
- return /* @__PURE__ */ t(
609
- V,
1655
+ return /* @__PURE__ */ c(
1656
+ Ee,
610
1657
  {
611
1658
  value: o,
612
1659
  label: n,
613
- options: l,
1660
+ options: r,
614
1661
  helperTextClassName: "hidden",
615
1662
  containerClassName: "options-widget-container",
616
- onChange: i
1663
+ onChange: i,
1664
+ placeholder: a
617
1665
  }
618
1666
  );
619
1667
  }
620
- const $e = (e) => {
621
- const { propertyName: s, label: l } = e, { currentFilters: n, setCurrentFilters: r } = _(), a = w(() => {
1668
+ const kn = (e) => {
1669
+ const { propertyName: t, label: r, placeholder: n } = e, { currentFilters: a, setCurrentFilters: s } = X(), l = F(() => {
622
1670
  var i;
623
- return ((i = n[s]) == null ? void 0 : i.value) ?? "";
624
- }, [n]), o = x((i) => {
625
- r({
626
- type: S.update,
627
- toUpdate: { [s]: { value: i.target.value } }
1671
+ return ((i = a[t]) == null ? void 0 : i.value) ?? "";
1672
+ }, [a]), o = z((i) => {
1673
+ s({
1674
+ type: j.update,
1675
+ toUpdate: { [t]: { value: i.target.value } }
628
1676
  });
629
1677
  }, []);
630
- return /* @__PURE__ */ t(
631
- U,
1678
+ return /* @__PURE__ */ c(
1679
+ he,
632
1680
  {
633
- value: a ?? "",
634
- label: l,
1681
+ value: l ?? "",
1682
+ label: r,
635
1683
  onChange: o,
636
1684
  containerClassName: "input-widget-container",
637
- helperTextClassName: ""
1685
+ helperTextClassName: "",
1686
+ placeholder: n
638
1687
  }
639
1688
  );
640
- }, Se = (e) => {
641
- const { propertyName: s, label: l } = e, { currentFilters: n, setCurrentFilters: r } = _(), a = w(() => {
642
- var i;
643
- return ((i = n[s]) == null ? void 0 : i.value) ?? "";
644
- }, [n]), o = x((i) => {
645
- r({
646
- type: S.update,
647
- toUpdate: { [s]: { value: i.target.checked } }
1689
+ }, En = (e) => {
1690
+ const { propertyName: t, label: r } = e, { currentFilters: n, setCurrentFilters: a } = X(), s = F(() => {
1691
+ var o;
1692
+ return ((o = n[t]) == null ? void 0 : o.value) ?? "";
1693
+ }, [n]), l = z((o) => {
1694
+ a({
1695
+ type: j.update,
1696
+ toUpdate: { [t]: { value: o.target.checked } }
648
1697
  });
649
1698
  }, []);
650
- return /* @__PURE__ */ t(ie, { label: l, checked: a ?? !1, onChange: o });
1699
+ return /* @__PURE__ */ c(bt, { label: r, checked: s ?? !1, onChange: l });
651
1700
  };
652
- function ke(e) {
653
- const { propertyName: s, label: l, options: n, multiple: r = !0 } = e, { currentFilters: a, setCurrentFilters: o } = _(), i = w(() => a[s] ?? n[0], [a]), c = x(
654
- (m) => {
1701
+ function An(e) {
1702
+ const { propertyName: t, label: r, placeholder: n, options: a, multiple: s = !0 } = e, { currentFilters: l, setCurrentFilters: o } = X(), i = F(() => l[t] ?? a[0], [l]), f = z(
1703
+ (u) => {
655
1704
  o({
656
- type: S.update,
1705
+ type: j.update,
657
1706
  toUpdate: {
658
- [s]: {
659
- value: m
1707
+ [t]: {
1708
+ value: u
660
1709
  }
661
1710
  }
662
1711
  });
663
1712
  },
664
- [r]
1713
+ [s]
665
1714
  );
666
- return /* @__PURE__ */ t(
667
- de,
1715
+ return /* @__PURE__ */ c(
1716
+ ln,
668
1717
  {
669
1718
  value: i == null ? void 0 : i.value,
670
- label: l,
671
- options: n,
672
- multiple: r,
1719
+ label: r,
1720
+ options: a,
1721
+ multiple: s,
673
1722
  helperTextClassName: "hidden",
674
1723
  containerClassName: "options-widget-container",
675
- onChange: c
1724
+ onChange: f,
1725
+ placeholder: n
676
1726
  }
677
1727
  );
678
1728
  }
679
- const K = (e) => {
680
- var d, N, g, C;
681
- const { propertyName: s, label: l, inputType: n } = e, { t: r } = z(), { currentFilters: a, setCurrentFilters: o } = _(), i = A(null), c = A(null), m = x((f) => {
682
- var p;
683
- o({
684
- type: S.update,
1729
+ const Ve = (e) => {
1730
+ var d, b, v, g;
1731
+ const { propertyName: t, label: r, inputType: n } = e, { t: a } = G(), { currentFilters: s, setCurrentFilters: l } = X(), o = V(null), i = V(null), f = z((p) => {
1732
+ var h;
1733
+ l({
1734
+ type: j.update,
685
1735
  toUpdate: {
686
- [s]: {
687
- value: { end: ((p = c == null ? void 0 : c.current) == null ? void 0 : p.value) ?? null, start: f.target.value }
1736
+ [t]: {
1737
+ value: { end: ((h = i == null ? void 0 : i.current) == null ? void 0 : h.value) ?? null, start: p.target.value }
688
1738
  }
689
1739
  }
690
1740
  });
691
- }, []), u = x((f) => {
692
- var p;
693
- o({
694
- type: S.update,
1741
+ }, []), u = z((p) => {
1742
+ var h;
1743
+ l({
1744
+ type: j.update,
695
1745
  toUpdate: {
696
- [s]: {
1746
+ [t]: {
697
1747
  value: {
698
- start: ((p = i == null ? void 0 : i.current) == null ? void 0 : p.value) ?? null,
699
- end: f.target.value
1748
+ start: ((h = o == null ? void 0 : o.current) == null ? void 0 : h.value) ?? null,
1749
+ end: p.target.value
700
1750
  }
701
1751
  }
702
1752
  }
703
1753
  });
704
1754
  }, []);
705
- return /* @__PURE__ */ b("div", { className: "range-widget-container", children: [
706
- /* @__PURE__ */ t("p", { className: "text-input-label input-widget-label input-label-normal", children: l }),
707
- /* @__PURE__ */ b("div", { className: "range-widget-row", children: [
708
- /* @__PURE__ */ t(
709
- U,
1755
+ return /* @__PURE__ */ y("div", { className: "range-widget-container", children: [
1756
+ /* @__PURE__ */ c("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
1757
+ /* @__PURE__ */ y("div", { className: "range-widget-row", children: [
1758
+ /* @__PURE__ */ c(
1759
+ he,
710
1760
  {
711
- value: ((N = (d = a[s]) == null ? void 0 : d.value) == null ? void 0 : N.start) ?? "",
712
- placeholder: r("_accessibility:components.table.filters.range.start"),
1761
+ value: ((b = (d = s[t]) == null ? void 0 : d.value) == null ? void 0 : b.start) ?? "",
1762
+ placeholder: a("_accessibility:components.table.filters.range.start"),
713
1763
  type: n,
714
- ref: i,
715
- onChange: m,
1764
+ ref: o,
1765
+ onChange: f,
716
1766
  containerClassName: "input-widget-container",
717
1767
  helperTextClassName: ""
718
1768
  }
719
1769
  ),
720
- /* @__PURE__ */ t(
721
- U,
1770
+ /* @__PURE__ */ c(
1771
+ he,
722
1772
  {
723
- value: ((C = (g = a[s]) == null ? void 0 : g.value) == null ? void 0 : C.end) ?? "",
724
- placeholder: r("_accessibility:components.table.filters.range.end"),
1773
+ value: ((g = (v = s[t]) == null ? void 0 : v.value) == null ? void 0 : g.end) ?? "",
1774
+ placeholder: a("_accessibility:components.table.filters.range.end"),
725
1775
  type: n,
726
- ref: c,
1776
+ ref: i,
727
1777
  onChange: u,
728
1778
  containerClassName: "input-widget-container",
729
1779
  helperTextClassName: ""
@@ -731,310 +1781,280 @@ const K = (e) => {
731
1781
  )
732
1782
  ] })
733
1783
  ] });
734
- }, Pe = (e) => {
1784
+ }, Pn = (e) => {
735
1785
  switch (e.type) {
736
- case D.text:
737
- return /* @__PURE__ */ t($e, { ...e });
738
- case D.number:
739
- return /* @__PURE__ */ t(
740
- K,
1786
+ case U.text:
1787
+ return /* @__PURE__ */ c(kn, { ...e });
1788
+ case U.number:
1789
+ return /* @__PURE__ */ c(
1790
+ Ve,
741
1791
  {
742
1792
  ...e,
743
1793
  inputType: "number"
744
1794
  }
745
1795
  );
746
- case D.date:
747
- return /* @__PURE__ */ t(
748
- K,
1796
+ case U.date:
1797
+ return /* @__PURE__ */ c(
1798
+ Ve,
749
1799
  {
750
1800
  ...e,
751
1801
  inputType: "date"
752
1802
  }
753
1803
  );
754
- case D.select:
755
- return /* @__PURE__ */ t(xe, { ...e });
756
- case D.autocomplete:
757
- return /* @__PURE__ */ t(ke, { ...e });
758
- case D.check:
759
- return /* @__PURE__ */ t(Se, { ...e });
1804
+ case U.select:
1805
+ return /* @__PURE__ */ c(Sn, { ...e });
1806
+ case U.autocomplete:
1807
+ return /* @__PURE__ */ c(An, { ...e });
1808
+ case U.check:
1809
+ return /* @__PURE__ */ c(En, { ...e });
760
1810
  }
761
- return /* @__PURE__ */ t(j, {});
1811
+ return /* @__PURE__ */ c(te, {});
762
1812
  };
763
- const Fe = (e) => {
764
- const { filters: s = [], options: l, show: n, handleShow: r } = e, { onFilterApply: a, filters: o } = E(), { currentFilters: i, setCurrentFilters: c } = _(), { t: m } = z(), u = A(null);
765
- return R(() => {
766
- const d = ({ target: N }) => {
767
- var g;
768
- u.current && (!n || (g = u.current) != null && g.contains(N) || r(!1));
1813
+ const Tn = (e) => {
1814
+ const { filters: t = [], options: r, show: n, handleShow: a } = e, { onFilterApply: s, filters: l } = H(), { currentFilters: o, setCurrentFilters: i } = X(), { t: f } = G(), u = V(null);
1815
+ return ne(() => {
1816
+ const d = ({ target: b }) => {
1817
+ var v;
1818
+ u.current && (!n || (v = u.current) != null && v.contains(b) || a(!1));
769
1819
  };
770
1820
  return document.addEventListener("click", d), () => document.removeEventListener("click", d);
771
- }), R(() => {
772
- const d = (N) => {
773
- !n || N.code !== "Escape" || r(!1);
1821
+ }), ne(() => {
1822
+ const d = (b) => {
1823
+ !n || b.code !== "Escape" || a(!1);
774
1824
  };
775
1825
  return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
776
- }), /* @__PURE__ */ t("div", { className: `filter-dropdown-backdrop ${n ? "opened" : "closed"}`, children: /* @__PURE__ */ b("div", { className: "filter-popup", children: [
777
- /* @__PURE__ */ t("div", { className: "filter-title", children: m("_accessibility:buttons.filters") }),
778
- /* @__PURE__ */ t("ul", { className: "filter-container", children: s.map((d) => /* @__PURE__ */ t("li", { className: "filter-container-item", children: Pe(d) }, d.propertyName)) }),
779
- /* @__PURE__ */ t("div", { className: "filter-footer", children: /* @__PURE__ */ b("ul", { className: "filter-buttons-row", children: [
780
- /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
1826
+ }), /* @__PURE__ */ c("div", { className: `filter-dropdown-backdrop ${n ? "opened" : "closed"}`, children: /* @__PURE__ */ y("div", { className: "filter-popup", children: [
1827
+ /* @__PURE__ */ c("div", { className: "filter-title", children: f("_accessibility:buttons.filters") }),
1828
+ /* @__PURE__ */ c("ul", { className: "filter-container", children: t.map((d) => /* @__PURE__ */ c("li", { className: "filter-container-item", children: Pn(d) }, d.propertyName)) }),
1829
+ /* @__PURE__ */ c("div", { className: "filter-footer", children: /* @__PURE__ */ y("ul", { className: "filter-buttons-row", children: [
1830
+ /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
781
1831
  "button",
782
1832
  {
783
- onClick: () => c({
784
- type: S.reset,
785
- filters: s
1833
+ onClick: () => i({
1834
+ type: j.reset,
1835
+ filters: t
786
1836
  }),
787
1837
  className: "filter-dropdown-button small filter-dropdown-cancel",
788
- children: m("_accessibility:buttons.clear")
1838
+ children: f("_accessibility:buttons.clear")
789
1839
  }
790
1840
  ) }),
791
- /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
1841
+ /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
792
1842
  "button",
793
1843
  {
794
1844
  className: "filter-dropdown-button small filter-dropdown-submit",
795
1845
  onClick: () => {
796
- r(!1), a(i);
1846
+ a(!1), s(o);
797
1847
  },
798
- onBlur: () => r(!1),
799
- children: m("_accessibility:buttons.applyFilters")
1848
+ onBlur: () => a(!1),
1849
+ children: f("_accessibility:buttons.applyFilters")
800
1850
  }
801
1851
  ) })
802
1852
  ] }) })
803
1853
  ] }) });
804
- }, ze = (e) => {
805
- const { end: s, start: l, label: n, onClearFilter: r } = e;
806
- return /* @__PURE__ */ t(
807
- G,
808
- {
809
- label: `${n}: ${l || "♾️"} - ${s || "♾️"}`,
810
- onDelete: () => r(n)
811
- }
812
- );
813
- };
814
- const Ee = (e) => {
815
- const { filtersDefinition: s } = e, l = w(() => {
816
- const o = {};
817
- return s.forEach((i) => {
818
- o[i.propertyName] = i.label ?? i.propertyName;
819
- }), o;
820
- }, [s]), { filters: n, clearFilters: r } = E(), a = w(() => (Object.keys(n).map((o) => console.log(n[o])), Object.keys(n)), [n]);
821
- return /* @__PURE__ */ t("ul", { className: "active-filters-main", children: a == null ? void 0 : a.map((o) => {
822
- var i;
823
- return /* @__PURE__ */ t("li", { children: n[o].end || n[o].start ? /* @__PURE__ */ t(
824
- ze,
825
- {
826
- label: l[o],
827
- start: n[o].start,
828
- end: n[o].end,
829
- onClearFilter: r
830
- }
831
- ) : /* @__PURE__ */ t(
832
- G,
833
- {
834
- label: `${l[o]}: ${((i = n[o]) == null ? void 0 : i.value) ?? n[o]}`,
835
- onDelete: () => r(o)
836
- }
837
- ) }, o);
838
- }) });
839
- }, Le = (e) => {
840
- var g, C, f;
841
- const { columns: s, title: l, isLoading: n, toolbar: r, filterOptions: a } = e, { countOfFilters: o } = E(), { t: i } = z(), c = w(() => s ? s.sort((p, v) => (v.pos ?? 0) - (p.pos ?? 0)).filter((p) => !!p.filterOptions).map((p) => {
842
- var v;
1854
+ }, On = (e) => {
1855
+ var v, g, p;
1856
+ const { columns: t, title: r, isLoading: n, toolbar: a, filterOptions: s } = e, { countOfFilters: l } = H(), { t: o } = G(), i = F(() => t ? t.sort((h, m) => (m.pos ?? 0) - (h.pos ?? 0)).filter((h) => !!h.filterOptions).map((h) => {
1857
+ var m;
843
1858
  return {
844
- ...p.filterOptions,
845
- label: ((v = p.filterOptions) == null ? void 0 : v.label) ?? p.label,
846
- propertyName: p.key
1859
+ ...h.filterOptions,
1860
+ label: ((m = h.filterOptions) == null ? void 0 : m.label) ?? h.label,
1861
+ propertyName: h.key
847
1862
  };
848
- }) : [], [s]), [m, u] = F(!1), d = x(
849
- (p) => {
850
- var v, y;
851
- ((y = (v = a == null ? void 0 : a.dropdown) == null ? void 0 : v.setOpened) == null ? void 0 : y.call(v, p ?? !1)) ?? u(p ?? !1);
1863
+ }) : [], [t]), [f, u] = M(!1), d = z(
1864
+ (h) => {
1865
+ var m, N;
1866
+ ((N = (m = s == null ? void 0 : s.dropdown) == null ? void 0 : m.setOpened) == null ? void 0 : N.call(m, h ?? !1)) ?? u(h ?? !1);
852
1867
  },
853
- [a, m]
854
- ), N = w(
1868
+ [s, f]
1869
+ ), b = F(
855
1870
  () => {
856
- var p;
857
- return ((p = a == null ? void 0 : a.dropdown) == null ? void 0 : p.opened) ?? m;
1871
+ var h;
1872
+ return ((h = s == null ? void 0 : s.dropdown) == null ? void 0 : h.opened) ?? f;
858
1873
  },
859
- [a, m]
1874
+ [s, f]
860
1875
  );
861
- return /* @__PURE__ */ b(
1876
+ return /* @__PURE__ */ y(
862
1877
  "div",
863
1878
  {
864
- className: `table-header ${l && (r || !((g = a == null ? void 0 : a.button) != null && g.hide)) ? "two" : "one"}`,
1879
+ className: `table-header ${r && (a || !((v = s == null ? void 0 : s.button) != null && v.hide)) ? "two" : "one"}`,
865
1880
  children: [
866
- /* @__PURE__ */ b("div", { children: [
867
- l && /* @__PURE__ */ t("h1", { className: "table-header-title", children: l }),
868
- n ? null : /* @__PURE__ */ b("div", { className: "table-header-right", children: [
869
- r,
870
- ((C = a == null ? void 0 : a.button) == null ? void 0 : C.hide) !== !0 && /* @__PURE__ */ b(
1881
+ /* @__PURE__ */ y("div", { children: [
1882
+ r && /* @__PURE__ */ c("h1", { className: "table-header-title", children: r }),
1883
+ n ? null : /* @__PURE__ */ y("div", { className: "table-header-right", children: [
1884
+ a,
1885
+ ((g = s == null ? void 0 : s.button) == null ? void 0 : g.hide) !== !0 && /* @__PURE__ */ y(
871
1886
  "button",
872
1887
  {
873
1888
  className: "filter-dropdown-button normal filter-dropdown-trigger",
874
1889
  "aria-haspopup": "true",
875
1890
  onClick: () => {
876
- var p;
1891
+ var h;
877
1892
  return d(
878
- ((p = a == null ? void 0 : a.dropdown) == null ? void 0 : p.opened) ?? !m
1893
+ ((h = s == null ? void 0 : s.dropdown) == null ? void 0 : h.opened) ?? !f
879
1894
  );
880
1895
  },
881
- "aria-expanded": N,
1896
+ "aria-expanded": b,
882
1897
  children: [
883
- /* @__PURE__ */ t(
884
- _e,
1898
+ /* @__PURE__ */ c(
1899
+ Rn,
885
1900
  {
886
- count: o,
887
- className: `${o > 0 ? "show" : "hide"} `
1901
+ count: l,
1902
+ className: `${l > 0 ? "show" : "hide"} `
888
1903
  }
889
1904
  ),
890
- /* @__PURE__ */ t("span", { className: "sr-only", children: i("_accessibility:buttons.filters") }),
891
- /* @__PURE__ */ t("wbr", {}),
892
- ((f = a == null ? void 0 : a.button) == null ? void 0 : f.icon) ?? /* @__PURE__ */ t(ce, { className: "filter-dropdown-trigger-icon" })
1905
+ /* @__PURE__ */ c("span", { className: "sr-only", children: o("_accessibility:buttons.filters") }),
1906
+ /* @__PURE__ */ c("wbr", {}),
1907
+ ((p = s == null ? void 0 : s.button) == null ? void 0 : p.icon) ?? /* @__PURE__ */ c(pt, { className: "filter-dropdown-trigger-icon" })
893
1908
  ]
894
1909
  }
895
1910
  )
896
1911
  ] })
897
1912
  ] }),
898
- /* @__PURE__ */ t(Ee, { filtersDefinition: c }),
899
- !!c && !!c.length && /* @__PURE__ */ t(
900
- Fe,
1913
+ /* @__PURE__ */ c($n, { filtersDefinition: i }),
1914
+ !!i && !!i.length && /* @__PURE__ */ c(
1915
+ Tn,
901
1916
  {
902
- filters: c,
903
- show: N,
1917
+ filters: i,
1918
+ show: b,
904
1919
  handleShow: d,
905
- options: a
1920
+ options: s
906
1921
  }
907
1922
  )
908
1923
  ]
909
1924
  }
910
1925
  );
911
- }, Te = (e) => e, De = (e) => {
912
- const { columns: s, softDeleteProperty: l = "deleted", data: n, actions: r } = e, a = w(
913
- () => s.sort((o, i) => (i.pos ?? 0) - (o.pos ?? 0)).filter((o) => o.display !== "none"),
914
- [s]
1926
+ }, Fn = (e) => e, Ln = (e) => {
1927
+ const { columns: t, softDeleteProperty: r = "deleted", data: n, actions: a } = e, s = F(
1928
+ () => t.sort((l, o) => (o.pos ?? 0) - (l.pos ?? 0)).filter((l) => l.display !== "none"),
1929
+ [t]
915
1930
  );
916
- return n == null ? void 0 : n.map((o) => {
917
- var i;
918
- return /* @__PURE__ */ b(
1931
+ return n == null ? void 0 : n.map((l) => {
1932
+ var o;
1933
+ return /* @__PURE__ */ y(
919
1934
  "tr",
920
1935
  {
921
- className: `table-row ${o[l] ? "deleted-class" : ""}`,
1936
+ className: `table-row ${l[r] ? "deleted-class" : ""}`,
922
1937
  children: [
923
- a == null ? void 0 : a.map((c, m) => /* @__PURE__ */ t(
1938
+ s == null ? void 0 : s.map((i, f) => /* @__PURE__ */ c(
924
1939
  "td",
925
1940
  {
926
- className: `table-row-cell ${m === 0 ? "basic" : ""} ${c.className ?? ""}`,
927
- children: c.renderBody ? c.renderBody(o[c.key], o) : Te(o[c.key])
1941
+ className: `table-row-cell ${f === 0 ? "basic" : ""} ${i.className ?? ""}`,
1942
+ children: i.renderBody ? i.renderBody(l[i.key], l) : Fn(l[i.key])
928
1943
  },
929
- c.key
1944
+ i.key
930
1945
  )),
931
- r ? /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", { className: "table-row-cell-action", children: (i = r(o).filter((c) => !c.hidden)) == null ? void 0 : i.map((c) => /* @__PURE__ */ t(Oe, { content: c.tooltip, children: /* @__PURE__ */ t("button", { onClick: () => c.onClick(o), children: c.icon }) }, c.id)) }) }) : null
1946
+ a ? /* @__PURE__ */ c("td", { children: /* @__PURE__ */ c("div", { className: "table-row-cell-action", children: (o = a(l).filter((i) => !i.hidden)) == null ? void 0 : o.map((i) => /* @__PURE__ */ c(xe, { content: i.tooltip, children: /* @__PURE__ */ c("button", { onClick: () => i.onClick(l), children: i.icon }) }, i.id)) }) }) : null
932
1947
  ]
933
1948
  },
934
- o.id
1949
+ l.id
935
1950
  );
936
1951
  });
937
1952
  };
938
- function Ue(e) {
1953
+ function _n(e) {
939
1954
  const {
940
- data: s,
941
- onSort: l,
1955
+ data: t,
1956
+ onSort: r,
942
1957
  entity: n = "",
943
- isLoading: r = !1,
944
- actions: a,
945
- columns: o = [],
946
- contentClassName: i = "",
947
- className: c = "",
948
- softDeleteProperty: m = "deleted",
1958
+ isLoading: a = !1,
1959
+ actions: s,
1960
+ columns: l = [],
1961
+ contentClassName: o = "",
1962
+ className: i = "",
1963
+ softDeleteProperty: f = "deleted",
949
1964
  ...u
950
- } = e, d = w(() => !(s != null && s.length), [s]);
951
- return /* @__PURE__ */ t(be, { children: /* @__PURE__ */ b("div", { className: `${c} table-main`, children: [
952
- /* @__PURE__ */ t(Le, { columns: o, isLoading: r, ...u }),
953
- r ? /* @__PURE__ */ t(ue, { className: "table-loading" }) : /* @__PURE__ */ t(j, { children: d ? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ b(j, { children: [
954
- /* @__PURE__ */ t("div", { className: `${i} table-body`, children: /* @__PURE__ */ b("table", { className: "table-content", children: [
955
- /* @__PURE__ */ t(
956
- Ne,
1965
+ } = e, d = F(() => !(t != null && t.length), [t]);
1966
+ return /* @__PURE__ */ c(pn, { children: /* @__PURE__ */ y("div", { className: `${i} table-main`, children: [
1967
+ /* @__PURE__ */ c(On, { columns: l, isLoading: a, ...u }),
1968
+ a ? /* @__PURE__ */ c(un, { className: "table-loading" }) : /* @__PURE__ */ c(te, { children: d ? /* @__PURE__ */ c(bn, {}) : /* @__PURE__ */ y(te, { children: [
1969
+ /* @__PURE__ */ c("div", { className: `${o} table-body`, children: /* @__PURE__ */ y("table", { className: "table-content", children: [
1970
+ /* @__PURE__ */ c(
1971
+ mn,
957
1972
  {
958
1973
  entity: n,
959
- columns: o,
960
- onSortCallback: l,
961
- hasAction: !!a
1974
+ columns: l,
1975
+ onSortCallback: r,
1976
+ hasAction: !!s
962
1977
  }
963
1978
  ),
964
- /* @__PURE__ */ t("tbody", { children: /* @__PURE__ */ t(
965
- De,
1979
+ /* @__PURE__ */ c("tbody", { children: /* @__PURE__ */ c(
1980
+ Ln,
966
1981
  {
967
- data: s,
968
- actions: a,
969
- columns: o,
970
- softDeleteProperty: m
1982
+ data: t,
1983
+ actions: s,
1984
+ columns: l,
1985
+ softDeleteProperty: f
971
1986
  }
972
1987
  ) })
973
1988
  ] }) }),
974
- /* @__PURE__ */ t(ye, {})
1989
+ /* @__PURE__ */ c(Nn, {})
975
1990
  ] }) })
976
1991
  ] }) });
977
1992
  }
978
- function Oe(e) {
979
- const { content: s, children: l } = e;
980
- return /* @__PURE__ */ b("div", { className: "tooltip-container", children: [
981
- l,
982
- /* @__PURE__ */ t("div", { className: "tooltip-text", children: s })
1993
+ function xe(e) {
1994
+ const { content: t, children: r, className: n = "" } = e;
1995
+ return /* @__PURE__ */ y("div", { className: `tooltip-container ${n}`, children: [
1996
+ r,
1997
+ /* @__PURE__ */ c("div", { className: "tooltip-text", children: t })
983
1998
  ] });
984
1999
  }
985
- function G(e) {
986
- const { label: s, onDelete: l, className: n = "", spanClassName: r = "" } = e;
987
- return /* @__PURE__ */ b("div", { className: `chip-main ${n}`, children: [
988
- /* @__PURE__ */ t("span", { className: r, children: s }),
989
- l ? /* @__PURE__ */ t("button", { type: "button", className: "chip-delete-button", onClick: l, children: /* @__PURE__ */ t(Q, {}) }) : null
2000
+ function q(e) {
2001
+ const { label: t, onDelete: r, className: n = "", spanClassName: a = "" } = e;
2002
+ return /* @__PURE__ */ y("div", { className: `chip-main ${n}`, children: [
2003
+ /* @__PURE__ */ c("span", { className: a, children: t }),
2004
+ r ? /* @__PURE__ */ c("button", { type: "button", className: "chip-delete-button", onClick: r, children: /* @__PURE__ */ c(ke, {}) }) : null
990
2005
  ] });
991
2006
  }
992
- const _e = (e) => {
993
- const { count: s, className: l = "" } = e, n = A(null);
994
- return R(() => {
995
- var r, a;
996
- (r = n.current) != null && r.parentNode && (((a = n.current) == null ? void 0 : a.parentNode).style.position = "relative");
997
- }, [n]), /* @__PURE__ */ t("span", { ref: n, className: `${l} badge-main`, children: s });
2007
+ const Rn = (e) => {
2008
+ const { count: t, className: r = "" } = e, n = V(null);
2009
+ return ne(() => {
2010
+ var a, s;
2011
+ (a = n.current) != null && a.parentNode && (((s = n.current) == null ? void 0 : s.parentNode).style.position = "relative");
2012
+ }, [n]), /* @__PURE__ */ c("span", { ref: n, className: `${r} badge-main`, children: t });
998
2013
  };
999
2014
  export {
1000
- de as AutocompleteInput,
1001
- _e as Badge,
1002
- ie as CheckInput,
1003
- ae as ChevronDown,
1004
- oe as ChevronLeft,
1005
- le as ChevronRight,
1006
- re as ChevronUp,
1007
- G as Chip,
1008
- Q as Close,
1009
- Ne as Columns,
1010
- Ce as CountOfTotal,
1011
- ge as Empty,
1012
- Fe as FilterDropdown,
1013
- D as FilterTypes,
1014
- ce as Filters,
1015
- S as FiltersActions,
1016
- be as FiltersProvider,
1017
- ye as Footer,
1018
- ue as Loading,
1019
- ve as Navigation,
1020
- fe as PageSize,
1021
- De as Rows,
1022
- V as SelectInput,
1023
- O as SortOrder,
1024
- I as State,
1025
- Ue as Table,
1026
- Le as TableHeader,
1027
- Re as TableOptionsProvider,
1028
- U as TextInput,
1029
- Oe as Tooltip,
1030
- je as TranslationProvider,
1031
- me as filtersReducer,
1032
- Z as helperTextStateClassName,
1033
- he as initializer,
1034
- X as inputStateClassName,
1035
- Y as labelStateClassName,
1036
- Pe as renderFilterComponent,
1037
- _ as useFilters,
1038
- E as useTableOptions,
1039
- z as useTranslation
2015
+ $n as ActiveFilters,
2016
+ yn as ArrayChip,
2017
+ ln as AutocompleteInput,
2018
+ Rn as Badge,
2019
+ bt as CheckInput,
2020
+ ut as ChevronDown,
2021
+ ht as ChevronLeft,
2022
+ ft as ChevronRight,
2023
+ dt as ChevronUp,
2024
+ q as Chip,
2025
+ ke as Close,
2026
+ mn as Columns,
2027
+ vn as CountOfTotal,
2028
+ bn as Empty,
2029
+ mt as File,
2030
+ In as FileInput,
2031
+ Tn as FilterDropdown,
2032
+ U as FilterTypes,
2033
+ pt as Filters,
2034
+ j as FiltersActions,
2035
+ pn as FiltersProvider,
2036
+ Nn as Footer,
2037
+ un as Loading,
2038
+ gn as Navigation,
2039
+ Cn as PageSize,
2040
+ xn as RangeChip,
2041
+ Ln as Rows,
2042
+ Ee as SelectInput,
2043
+ Y as SortOrder,
2044
+ ie as State,
2045
+ _n as Table,
2046
+ On as TableHeader,
2047
+ Bn as TableOptionsProvider,
2048
+ he as TextInput,
2049
+ xe as Tooltip,
2050
+ Wn as TranslationProvider,
2051
+ hn as filtersReducer,
2052
+ Ye as helperTextStateClassName,
2053
+ fn as initializer,
2054
+ qe as inputStateClassName,
2055
+ Ke as labelStateClassName,
2056
+ Pn as renderFilterComponent,
2057
+ X as useFilters,
2058
+ H as useTableOptions,
2059
+ G as useTranslation
1040
2060
  };