@sito/dashboard 0.0.45 → 0.0.46

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